Skip to content

Instantly share code, notes, and snippets.

@SetareMaghari
Created January 14, 2019 14:45
Show Gist options
  • Save SetareMaghari/2663f453deb9f5fc1604b22c9c5f58f2 to your computer and use it in GitHub Desktop.
Save SetareMaghari/2663f453deb9f5fc1604b22c9c5f58f2 to your computer and use it in GitHub Desktop.
## List installed packages
adb shell 'pm list packages -f
@SetareMaghari
Copy link
Author

Start launcher activity

adb shell monkey -p {your.app.package.name} -c android.intent.category.LAUNCHER 1

@SetareMaghari
Copy link
Author

SetareMaghari commented Jan 14, 2019

Find current activity

adb shell dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp'

@SetareMaghari
Copy link
Author

Connect to device through wifi

adb devices
adb tcpip 5555
adb connect 192.168.14.173 (Device ip in current network)
connected to 192.168.14.173:5555

@SetareMaghari
Copy link
Author

Install apk

adb install app.apk

@SetareMaghari
Copy link
Author

SetareMaghari commented Apr 15, 2019

Install apk on specific device

adb -s emulator-5554 install myapp.apk
adb -s a3b09a6e install "c:\my apk location\here 123\example.apk"

@SetareMaghari
Copy link
Author

Install apk on specific device replacing current app

adb install -r MyApp.apk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment