ADB Cheatsheet

ADB Cheatsheet

A list of ADB Commands

List all connected devices

adb list devices
adb list devices -l # Long Output

Enable Wireless ADB on a USB Connected Device

adb tcpip 5555  # 5555 is port, can be changed if needed

adb connect using device IP

adb connect 192.168.43.1:5555 # 5555 is Port

Remove bloatware

adb shell pm uninstall --user 0 `package.name`
# Replace package name with your application package name.
# Ex: Package name for WhatsApp: com.whatsapp

Check Multi user Support

adb shell pm list max-users # Outputs more than one on multi-user support

Set/Hack Multi-user Support

adb shell setprop fw.max_users = 5
# This will temporarily set max user value to 5 and new user can be created on unsupported phones

Misc

adb shell "dumpsys package | grep -A1 'userId=UID'"
# I think it is used for getting app name from PID.

Original:  Updated: