maowenbei 2020-05-03
安装APP
>adb install com.android.chrome_81.0.4044.117_404411700.apk Performing Streamed Install Success
获取包名
Mac
adb she1l dumpsys window windows | grep mFocusedApp
Windows
>adb shell dumpsys window windows | findstr mFocusedApp mFocusedApp=AppWindowToken{b8b7f7c token=Token{123c66f ActivityRecord{ef3d54e u0 com.android.chrome/org.chromium.chrome.browser.ChromeTabbedActivity t18}}}
其中:
●包名为: com.android.chrome
●界面名为: org.chromium.chrome.browser.ChromeTabbedActivity
启动APP打开指定界面
>adb shell am start -W com.android.chrome/org.chromium.chrome.browser.settings.SettingsActivity Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.android.chrome/org.chromium.chrome.browser.settings.SettingsActivity } Status: ok Activity: com.android.chrome/org.chromium.chrome.browser.settings.SettingsActivity ThisTime: 2961 TotalTime: 2961 WaitTime: 2989 Complete
adb shell cd system/app rm *.apk21. 获取管理员权限: adb root22. 启动Activity: adb shell am start -n 包名/包名+类名。
2、在设置好端口后就可输入命令连接:adb connect 192.168.2.36:5555,后面的:5555可以不用输入,例如我设置的:6666端口,则通过如下指令连接:。映像名称 PID 会话名