参考链接:
https://blog.csdn.net/weixue9/article/details/103348193
https://blog.csdn.net/richu123/article/details/51124632
文件操作
adb root
adb remount
adb push xxx.txt /data/tmp/
adb pull /data/tmp/***.txt
apk操作
安装apk
adb install test.apk
卸载apk
adb shell pm uninstall com.forlinx.test
启动安装的apk
adb shell am start -n com.forlinx.test/forlinx.test.MainActivity
查看 App 的 package name:
adb shell pm list packages -f
查看apk的包名和activity名
aapt dump xmltree test.apk AndroidManifest.xml > ./test.txt
查看当前运行的activity
adb shell dumpsys activity activities //列出当前运行的app的包名和activity名等信息
启动setting主页面
adb shell am start com.android.settings/com.android.settings.Settings
启动setting安全界面
adb shell am start com.android.settings/com.android.settings.SecuritySettings
启动setting手机无线信息
adb shell am start com.android.settings/com.android.settings.RadioInfo
启动Android自带浏览器Browser2
adb shell am start -a android.intent.action.VIEW -d https://liulanmi.com/labs/core.html