Useful ADB commands for every android developer :)
1. Clear the user data for your app using package name
adb shell pm clear <package>
2. Take screen shot :-
adb shell screencap /pathTofile/scr.png
3. Record the screen display
adb shell screenrecord /pathTofile/recordFilenName.mp4
4. WiFi On/off
Turn on the wifi:-
adb shell svc wifi enable
Turn off the wifi:-
adb shell svc wifi disable
5. Generate boot completed broadcast to test application behavior after reboot
adb shell am broadcast -a android.intent.action.BOOT_COMPLETED -c android.intent.category.HOME -n my.app.name/myapp.BootListener
6. Install/ Re-install application
adb install path/app.apk
adb install -r path/app.apk
adb uninstall path/app.apk
7. Print your application info such as version num, name etc ...
adb shell dumpsys package <my.package.name>
8. Logcat with thread Id
adb logcat -v threadtime
9. clear all logs :-
adb logcat -c
Thanks for Reading!!
1. Clear the user data for your app using package name
adb shell pm clear <package>
2. Take screen shot :-
adb shell screencap /pathTofile/scr.png
3. Record the screen display
adb shell screenrecord /pathTofile/recordFilenName.mp4
4. WiFi On/off
Turn on the wifi:-
adb shell svc wifi enable
Turn off the wifi:-
adb shell svc wifi disable
5. Generate boot completed broadcast to test application behavior after reboot
adb shell am broadcast -a android.intent.action.BOOT_COMPLETED -c android.intent.category.HOME -n my.app.name/myapp.BootListener
6. Install/ Re-install application
adb install path/app.apk
adb install -r path/app.apk
adb uninstall path/app.apk
7. Print your application info such as version num, name etc ...
adb shell dumpsys package <my.package.name>
8. Logcat with thread Id
adb logcat -v threadtime
9. clear all logs :-
adb logcat -c
Thanks for Reading!!
Comments
Post a Comment