Android ADB Cheat Sheet

From myWiki
Revision as of 16:05, 9 January 2023 by Stevet (talk | contribs)

Start the server/service

./adb kill-server
./adb start-server

Show connected devices

./adb devices

Enter the O/S shell (ls,...)

./adb shell

On a un-rooted device you'll need to run-as within the shell

run-as me.stevet.android.gpsapplication

You can use package manager (pm) over adb shell to list packages:

./adb shell pm list packages | sort

and to display where the .apk file is:

./adb shell pm path com.myzeo.android
package:/data/app/com.myzeo.android-1/base.apk

And adb pull to download the apk. ./adb pull data/app//data/app/com.myzeo.android-1/base.apk