当前位置: 首页 > 工具软件 > android-adb > 使用案例 >

android adb查看应用,Android--adb命令查看第三方应用包名、应用activity名

汲睿
2023-12-01

(adb shell am start -n 包名/包名+类名)

adb shell am start -n com.android.fcc.espressif/com.android.fcc_app.MainActivity

查看activity名:

(1)启动要查看的程序;

(2)命令行输入:adb shell dumpsys window w |findstr \/ |findstr name=

补充:使用adb shell dumpsys window | findstr mCurrentFocus  命令查看当前运行的包名和Activity更清晰一些。

跳转第三方activity:

Intent intent = new Intent(Intent.ACTION_MAIN);

intent.addCategory(Intent.CATEGORY_LAUNCHER);

ComponentName cn = new ComponentName(packageName, className);

intent.setComponent(cn);

startActivity(intent);

输入: adb pull 手机存储路径  电脑路径

adb pull  /sdcard/xxx  /Users/xxxx/

xxx.tx

二 从电脑端向手机复制文件

输入: adb pull 电脑路径  手机存储路径

adb push  /Users/xxxx/xxx.txt   /sdcard/xxx

 类似资料: