adb help // List all comands Flashing ROM via Fastboot ROM zip package fastboot -w fastboot update To wipe your device and then to flash.zip adb devices Shows attached devices adb shell To jump from windows command prompt to android device shell: adb reboot bootloader To boot into bootloader mode adb reboot recovery To boot into recovery adb get-serial no Get Serial Number of your connected device adb install To install apps over adb adb install -r To update the existing apps with new version adb uninstall package_name.here To uninstall any apps or packages from the connected device adb uninstall -package_name.here Keep the data and cache directories after uninstalling apps adb push Upload a specified file from your computer to device adb pull Download a specified file from your device to your computer. adb backup Take backup from your device to PC adb restore Restore the backup to your phone adb sideload To sideload apps or flashable zip file to your device adb logcat Take the real-time log from your phone adb start-server start adb servers processes adb kill-server stop adb server processes adb reboot fastboot reboot your device into fastboot mode adb usb shows all devices connected to your computer via a USB cable. adb devices //show devices attached It will display the list of all devices attached to your PC. adb connect ip_address_of_device connect the IP address of your Android device to your computer. == Adb Server adb kill-server adb start-server == Adb Reboot adb reboot adb reboot recovery adb reboot-bootloader adb root //restarts adb with root permissions == Shell adb shell // Open or run commands in a terminal on the host Android device. == Devices adb usb adb devices //show devices attached adb devices -l //devices (product/model) adb connect ip_address_of_device == Get device android version adb shell getprop ro.build.version.release == LogCat adb logcat adb logcat -c // clear // The parameter -c will clear the current logs on the device. adb logcat -d > [path_to_file] // Save the logcat output to a file on the local system. adb bugreport > [path_to_file] // Will dump the whole device information like dumpstate, dumpsys and logcat output. == Files adb push [source] [destination] // Copy files from your computer to your phone. adb pull [device file location] [local file location] // Copy files from your phone to your computer. == App install adb -e install path/to/app.apk -d - directs command to the only connected USB device... -e - directs command to the only running emulator... -s ... -p ... The flag you decide to use has to come before the actual adb command: adb devices | tail -n +2 | cut -sf 1 | xargs -IX adb -s X install -r com.myAppPackage // Install the given app on all connected devices. == Uninstalling app from device adb uninstall com.myAppPackage adb uninstall adb uninstall -k -> "Uninstall .apk withour deleting data" adb shell pm uninstall com.example.MyApp adb shell pm clear [package] // Deletes all data associated with a package. adb devices | tail -n +2 | cut -sf 1 | xargs -IX adb -s X uninstall com.myAppPackage //Uninstall the given app from all connected devices == Update app adb install -r yourApp.apk // -r means re-install the app and keep its data on the device. adb install –k <.apk file path on computer> == Home button adb shell am start -W -c android.intent.category.HOME -a android.intent.action.MAIN == Activity Manager adb shell am start -a android.intent.action.VIEW adb shell am broadcast -a 'my_action' adb shell am start -a android.intent.action.CALL -d tel:+972527300294 // Make a call // Open send sms screen with phone number and the message: adb shell am start -a android.intent.action.SENDTO -d sms:+972527300294 --es sms_body "Test --ez exit_on_sent false // Reset permissions adb shell pm reset-permissions -p your.app.package adb shell pm grant [packageName] [ Permission] // Grant a permission to an app. adb shell pm revoke [packageName] [ Permission] // Revoke a permission from an app. // Emulate device adb shell wm size 2048x1536 adb shell wm density 288 // And reset to default adb shell wm size reset adb shell wm density reset == Print text adb shell input text 'Wow, it so cool feature' == Screenshot adb shell screencap -p /sdcard/screenshot.png $ adb shell shell@ $ screencap /sdcard/screen.png shell@ $ exit $ adb pull /sdcard/screen.png --- adb shell screenrecord /sdcard/NotAbleToLogin.mp4 $ adb shell shell@ $ screenrecord --verbose /sdcard/demo.mp4 (press Control + C to stop) shell@ $ exit $ adb pull /sdcard/demo.mp4 fastboot flash tz tz.mbn fastboot flash dbi sdi.mbn fastboot flash sbl1 sbl1.mbn fastboot flash rpm rpm.mbn fastboot flash aboot emmc_appsboot.mbn fastboot erase boot fastboot flash misc misc.img fastboot flash modem NON-HLOS.bin fastboot flash system system.img fastboot flash cache cache.img fastboot flash userdata userdata.img fastboot flash recovery recovery.img fastboot flash boot boot.img fastboot reboot fastboot oem fb_mode_set fastboot flash partition gpt.bin fastboot flash bootloader bootloader.img fastboot flash logo logo.bin fastboot flash boot boot.img fastboot flash recovery recovery.img fastboot flash dsp adspso.bin fastboot flash oem oem.img fastboot flash system system.img_sparsechunk.0 fastboot flash system system.img_sparsechunk.1 fastboot flash system system.img_sparsechunk.2 fastboot flash system system.img_sparsechunk.3 fastboot flash system system.img_sparsechunk.4 fastboot flash system system.img_sparsechunk.5 fastboot flash system system.img_sparsechunk.6 fastboot flash system system.img_sparsechunk.7 fastboot flash modem NON-HLOS.bin fastboot erase modemst1 fastboot erase modemst2 fastboot flash fsg fsg.mbn fastboot erase cache fastboot erase userdata fastboot erase customize fastboot erase clogo fastboot oem fb_mode_clear fastboot reboot How to flash Radio Firmware only? Use the following fastboot commands: fastboot flash modem NON-HLOS.bin fastboot erase modemst1 fastboot erase modemst2 fastboot flash fsg fsg.mbn ​fastboot oem fb_mode_set fastboot flash partition gpt.bin fastboot flash bootloader bootloader.img fastboot flash logo logo.bin fastboot flash boot boot.img fastboot flash recovery recovery.img fastboot flash system system.img_sparsechunk.0 fastboot flash system system.img_sparsechunk.1 fastboot flash system system.img_sparsechunk.2 fastboot flash system system.img_sparsechunk.3 fastboot flash system system.img_sparsechunk.4 fastboot flash system system.img_sparsechunk.5 fastboot flash system system.img_sparsechunk.6 fastboot flash system system.img_sparsechunk.7 fastboot flash system system.img_sparsechunk.8 fastboot flash modem NON-HLOS.bin fastboot erase modemst1 fastboot erase modemst2 fastboot flash fsg fsg.mbn fastboot erase cache fastboot erase userdata fastboot erase customize fastboot erase clogo fastboot oem fb_mode_clear fastboot reboot​