adb

常用adb命令

笑着哭i 提交于 2019-12-28 15:50:55
# 截屏: adb shell screencap -p/sdcard/screen.png # 保存: adb pull /sdcard/screen.png # 点击: adb shell input tap x y # 滑动: adb shell input swipe x1 y1 x2 y2 #获取屏幕分辨率: adb shell wm size #查进程名和包名: adb shell dumpsys window | findstr mCurrentFocus 一个python demo: # 截屏: adb shell screencap -p/sdcard/screen.png # 保存: adb pull /sdcard/screen.png # 点击: adb shell input tap x y # 滑动: adb shell input swipe x1 y1 x2 y2 #获取屏幕分辨率: adb shell wm size #查进程名和包名: adb shell dumpsys window | findstr mCurrentFocus import sys import os pypath = sys.executable print(pypath) #打印python解释器路径 def tap(x,y): cmd = f'adb shell

monkey常用命令

最后都变了- 提交于 2019-12-28 15:03:10
1、参数:-p ,用于指定一个或者多个包,指定包之后,monkey将只允许系统启动指定的APP,如果不指定包,将允许系统启动设备中的所有APP。 * 指定一个包: adb shell monkey -p com.huihu * 指定多个包:adb shell monkey -p com.huihu –p com.huikao * 不指定包:adb shell monkey 2、参数:-v ,用于指定反馈信息级别(信息级别就是日志的详细程度),总共分3个级别,分别对应的参数如下表所示 eg: adb shell monkey -p com.huihu –v 100 说明 缺省值,仅提供启动提示、测试完成和最终结果等少量信息 eg: adb shell monkey -p com.huihu –v -v 100 说明 提供较为详细的日志,包括每个发送到Activity的事件信息 eg: adb shell monkey -p com.huihu –v -v –v 100 说明 最详细的日志,包括了测试中选中/未选中的Activity信息 3、参数:–throttle<毫秒> ,用于指定用户操作之间的时延,单位是毫秒。 adb shell monkey -p com.huihu --throttle 5000 100 4、参数:–ignore crashes ,即使程序崩溃,仍执行时间

How to remove set-device-owner in Android DPM?

ぐ巨炮叔叔 提交于 2019-12-28 13:56:14
问题 I have made an app device owner using ADB, by following this link : How to make my app a device owner? but now, I'm not able to revert this. In the device administration Tab, this option is disabled. Not able to change the value of this app. 回答1: You can unset it programmatically. You need to call this function in your device owner application DevicePolicyManager dpm = (DevicePolicyManager) context.getSystemService(Context.DEVICE_POLICY_SERVICE); dpm.clearDeviceOwnerApp(context.getPackageName

安卓ADB官方直链

£可爱£侵袭症+ 提交于 2019-12-28 13:17:46
以下是adb工具包最新Google官方版下载地址: ADB和Fastboot for Windows https://dl.google.com/android/repository/platform-tools-latest-windows.zip ADB和Fastboot for Mac https://dl.google.com/android/repository/platform-tools-latest-darwin.zip ADB和Fastboot for Linux https://dl.google.com/android/repository/platform-tools-latest-linux.zip 来源: CSDN 作者: Liu_Mir 链接: https://blog.csdn.net/qq_40133830/article/details/103742619

react 学习笔记4

北战南征 提交于 2019-12-28 11:38:05
用react-native的安装初始化AwesomeProject 1.react-native init AwesomeProject cd AwesomeProject npm install 2 adb devices 确定android虚拟机 adb devices List of devices attached emulator-5554 device 3.react-native run-android 'enulator-5554' info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag. Jetifier found 864 file(s) to forward-jetify. Using 4 workers... info JS server already running. info Installing the app... 来源: CSDN 作者: keny-风清扬 链接: https://blog.csdn.net/keny88888/article/details/103734697

Android adb shell am broadcast: Bad component name

六眼飞鱼酱① 提交于 2019-12-28 08:09:49
问题 I am trying to 'emulate' a reboot (or anything else with the adb shell am ) and am unable to figure out how to reference my component. Then again, maybe I don't even understand what is meant by a component. Below I first include a few example commands that don't work, then my manifest. Note that StartupReceiver is successfully called when the 'phone' boots. I just want to re-trigger it without a full reboot. Failed ADB commands: $ ./adb shell am broadcast -a android.intent.action.BOOT

How to debug in Android Studio using adb over WiFi

て烟熏妆下的殇ゞ 提交于 2019-12-28 07:35:09
问题 I'm able to connect to my phone using adb connect, and I can adb shell also. But when I go to Run->Device Chooser, there are no devices there. What should I do to connect my (connected) adb Android Studio? When I plug it in through USB, it shows up on the list 回答1: You can find the adb tool in /platform-tools/ cd Library/Android/sdk/platform-tools/ You can check your devices using: ./adb devices My result: List of devices attached XXXXXXXXX device Set a TCP port: ./adb shell setprop service

Problem with bluetooth on android 2.1 (samsung spica i5700) where pairing works but connection does not work

为君一笑 提交于 2019-12-28 06:24:19
问题 I have a Samsung Spica i5700 which I already have updated to Android 2.1. I am using the phone with an application called Run.GPS (http://www.rungps.net). This application logs data such as GPS position, route, speed, bearing etc. It can also log heartrate provided the user has a Zephyr HxM bluetooth heart rate monitor ("HxM"), which I do have. I can pair the HxM to the phone through the standard bluetooth utility. I'm prompted for the PIN, which I enter and the device is shown as 'Paired but

Android ADB didn't ack issue in eclipse

空扰寡人 提交于 2019-12-28 05:53:07
问题 I have spent around 5 hrs on this problem. I have read the same question on stackoverflow, but none of the solutions solved my problem... First, it gives me: [2013-02-28 14:48:21 - adb] ADB server didn't ACK [2013-02-28 14:48:21 - adb] * failed to start daemon * To solve that, I kill the adb.exe in task manager, restart eclipse. Then go to DDMS, reset adb. NO LUCK... Then, I go to command line window, type adb kill-server and adb start-server , it gives me: adb server is out of date. killing.

adb 常用命令

拥有回忆 提交于 2019-12-28 05:23:39
adb 常用命令 adb 操作文件 //安装APK,adb install 用此命令安装的软件位于 data/app 目录,为user application adb install D:\app.apk //强制安装 adb install -r /Users/test/test.apk //卸载某应用 adb uninstall com.xxx.xxx //传APK文件到Android系统目录 adb push D:\app.apk /system/app/ //把手机目录传入到PC中 adb pull /sdcard/record/ D:\audio adb shell //进入系统中的根目录,获得系统权限 adb root //重新挂载系统分区,使系统分区重新可写 adb remount //进入系统 adb shell //重启设备 adb reboot //查看链接的设备 adb devices //删除系统目录APK adb shell rm /system/app/XXX.apk adb shell rm /sdcard/1.0.apk //包名/类名 启动应用 adb shell am start com.xxx.xxx //列出目录下所有文件 adb shell ls /system/app/ //列出所有的包名 adb shell pm list