1、通过屏幕点击对应的应用程序,启动应用
2、adb shell dumpsys activity top 获取包名
TASK com.android.calculator2 id=5
ACTIVITY com.android.calculator2/.Calculator 4b437a5 pid=4217
Local Activity 12a0b6d State:
mResumed=true mStopped=false mFinished=false
mChangingConfigurations=false
mCurrentConfig={1.0 460mcc11mnc [en_US] ldltr sw540dp w912dp h516dp 320dpi lrg long land -touch -keyb/v/h -nav/h s.6}
mLoadersStarted=true
FragmentManager misc state:
mHost=android.app.Activity$HostCallbacks@1b043a2
mContainer=android.app.Activity$HostCallbacks@1b043a2
mCurState=5 mStateSaved=false mDestroyed=false
3、adb shell pm path com.android.calculator2 获取相应的apk名字
package:/system/app/Calculator/Calculator.apk
4、adb shell pm list package -f 显示包名和路径
package:/system/priv-app/FMRadio/FMRadio.apk=com.android.fmradio
package:/system/app/Gba/Gba.apk=com.mediatek.gba
package:/system/priv-app/ImsService/ImsService.apk=com.mediatek.ims
package:/system/priv-app/CtsShimPrivPrebuilt/CtsShimPrivPrebuilt.apk=com.android.cts.priv.ctsshim