Android--adb命令查看第三方应用包名、应用activity名
(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);