adb Tools

adb Beyond Installing: Shell, Activity and Package Managers

adb and Logcat used adb install and adb logcat. The rest of adb's power is adb shell, which runs commands on the device, above all the activity manager (am), which starts components, and the package manager (pm), which queries and changes installed apps. Always name the device with -s when more than one runs:

Launching BookNest and inspecting its packageShell
adb -s emulator-5588 shell am start -W -n com.example.booknest/.MainActivity
adb -s emulator-5588 shell pm list packages booknest
adb -s emulator-5588 shell pm path com.example.booknest
adb -s emulator-5588 shell run-as com.example.booknest ls