|
| 1 | +---------------------------------------------------------------------------------------------------------------------- |
| 2 | +ADB Commands: |
| 3 | +---------------------------------------------------------------------------------------------------------------------- |
| 4 | + |
| 5 | +adb help |
| 6 | +Shows ADB Help Documentation. |
| 7 | + |
| 8 | +adb devices |
| 9 | +Lists all the Android Devices connected via ADB. |
| 10 | + |
| 11 | +adb reboot |
| 12 | +Reboots your Android Device. |
| 13 | + |
| 14 | +adb reboot bootloader |
| 15 | +Reboots your Android Device into Fastboot/Bootloader Mode. |
| 16 | + |
| 17 | +adb reboot recovery |
| 18 | +Reboots your Android device into Recovery Mode. |
| 19 | + |
| 20 | +adb install |
| 21 | +Helps you install an APK File on your Android Device. |
| 22 | + |
| 23 | +adb install filename.apk |
| 24 | +Install the APK File. |
| 25 | + |
| 26 | +adb install -r filename.apk |
| 27 | +Re-installs or updates an App. |
| 28 | + |
| 29 | +adb install -s filename.apk |
| 30 | +Installs the APK File in SD Card (if the App supports). |
| 31 | + |
| 32 | +adb uninstall |
| 33 | +Helps you install an App File on your Android Device. |
| 34 | + |
| 35 | +adb uninstall com.facebook.katana |
| 36 | +Simply uninstalls the App. |
| 37 | + |
| 38 | +adb uninstall -k com.facebook.katana |
| 39 | +Keeps the Data and Cache Folder after the App is uninstalled. |
| 40 | + |
| 41 | +adb logcat |
| 42 | +Displays the Log Data onto the Screen. |
| 43 | +adb bugreport |
| 44 | +Displays the Dumpsys, Dumpstate and Logcat Data on the Screen. |
| 45 | + |
| 46 | +adb jdwp |
| 47 | +Lists the JDWP (Java Debug Wire Protocol) Processes on the Device. |
| 48 | + |
| 49 | +adb get-serialno |
| 50 | +Shows the adb instance Serial Number String with the Device. |
| 51 | + |
| 52 | +adb get-state |
| 53 | +Displays the Device Status. |
| 54 | + |
| 55 | +adb wait-for-device |
| 56 | +Used to set a delay before the next Command is issued. |
| 57 | +It executes when the Device is online but it can be programmed to wait till another Process is done. |
| 58 | + |
| 59 | +adb start-server |
| 60 | +Starts the ADB Server Process. |
| 61 | + |
| 62 | +adb kill-server |
| 63 | +Stops the ADB Server Process. |
| 64 | + |
| 65 | +adb sideload <filename.zip> |
| 66 | +Used to flash a Zip File in Recovery Mode when the Zip File is available in the Computer. |
| 67 | + |
| 68 | +adb pull </path/filename> |
| 69 | +Pulls any File from your Device and saves it on your Computer. |
| 70 | + |
| 71 | +adb push <source-path> <target-path> |
| 72 | +Used to push a File into your Android Device. |
| 73 | + |
| 74 | + |
| 75 | +---------------------------------------------------------------------------------------------------------------------- |
| 76 | +ADB Shell Commands: |
| 77 | +---------------------------------------------------------------------------------------------------------------------- |
| 78 | + |
| 79 | +adb shell |
| 80 | +Starts the Remote Shell Command Console in the Device. |
| 81 | + |
| 82 | +adb shell pm uninstall -k –user 0 package.name.com |
| 83 | +Helps you uninstall a System App from your Android Device. |
| 84 | +Replace package.name.com with the actual Package Name. |
| 85 | + |
| 86 | +adb shell dumpsys |
| 87 | +Dumps all System Data about your Android Device’s Dardware and Software Configuration |
| 88 | + |
| 89 | +adb shell dumpsys display |
| 90 | +Displays all the Hardware and Software Configuration about your Display. |
| 91 | + |
| 92 | +adb shell dumpsys battery |
| 93 | +Displays all the Hardware and Software Configuration about your Battery. |
| 94 | + |
| 95 | +adb shell dumpsys batterystats |
| 96 | +Displays all the Info about your Battery Statistics. |
| 97 | + |
| 98 | +adb shell wm density |
| 99 | +Helps you change the Pixel Density on your Android Device. |
| 100 | + |
| 101 | +adb shell pm list packages |
| 102 | +Lists all the Apps installed on your Device as Package Names. |
| 103 | + |
| 104 | +adb shell pm list packages -s |
| 105 | +Lists all the System Apps installed on your Device as Package Names. |
| 106 | + |
| 107 | +adb shell pm list packages -3 |
| 108 | +Lists all the 3rd Party Apps installed on your Device as Package Names. |
| 109 | + |
| 110 | +adb shell pm list packages -d |
| 111 | +Lists all the disabled Apps on your Device as Package Names. |
| 112 | + |
| 113 | +adb shell pm list packages -e |
| 114 | +Lists all the enabled Apps on your Device as Package Names. |
| 115 | + |
| 116 | +adb shell pm list packages -u |
| 117 | +Lists all the uninstalled Apps with installed Pages on your Device as Package Names. |
| 118 | + |
| 119 | +adb shell screencap /sdcard/screenshot.png |
| 120 | +Takes a Screenshot of your Device Screen and saves it in SDCARD with the name "screenshot.png". |
| 121 | + |
| 122 | +adb shell screenrecord /sdcard/screenrecord.mp4 |
| 123 | +Starts recording your Device Screen and saves the Video in SDCARD with the name "screenrecord.mp4". |
| 124 | +The default Record Time is 180 Seconds (Maximum). You can press CTRL + C to stop the recording any Time. |
| 125 | + |
| 126 | +adb shell screenrecord –size 1920×1080 /sdcard/screenrecord.mp4 |
| 127 | +Screen recording with custom Width and Height for the Video. |
| 128 | + |
| 129 | +adb shell screenrecord –time-limit 120 /sdcard/screenrecord.mp4 |
| 130 | +Screen recording with custom Time Limit for the Video. |
| 131 | +Max value is 180. |
| 132 | + |
| 133 | +adb shell screenrecord –bit-rate 4000000 /sdcard/screenrecord.mp4 |
| 134 | +Screen Recording with custom Bit Rate for the Video. |
| 135 | +The Value "4000000" sets the Bitrate to 4Mbmps. |
| 136 | + |
| 137 | +adb shell |
| 138 | +<Hit Enter and then execute the following command> |
| 139 | +cd /system |
| 140 | +Changes the Directory to "/system". |
| 141 | + |
| 142 | +adb shell |
| 143 | +<Hit Enter and then execute the following command> |
| 144 | +rm -f /sdcard/<filename.zip> |
| 145 | +Deletes a File from your Android Device. |
| 146 | + |
| 147 | +adb shell |
| 148 | +<Hit Enter and then execute the following command> |
| 149 | +crm -d /sdcard/example |
| 150 | +Deletes a Folder from your Android Device. |
| 151 | + |
| 152 | +mkdir /sdcard/Android |
| 153 | +Creates a new Folder named "Android" under "/sdcard" |
| 154 | + |
| 155 | +cp /sdcard/filename.apk /sdcard/FolderName/ |
| 156 | +To copy a File. |
| 157 | + |
| 158 | +mv /sdcard/filename.apk /sdcard/FolderName/ |
| 159 | +To move a File. |
| 160 | + |
| 161 | +mv /sdcard/filename.apk /sdcard/anotherfilename.apk |
| 162 | +To rename a File. |
| 163 | + |
| 164 | +adb shell |
| 165 | +<Hit Enter and then execute the following command> |
| 166 | +netstat |
| 167 | +To check the Network Statistics of your Android Device. |
| 168 | + |
| 169 | +adb shell |
| 170 | +<Hit Enter and then execute the following command> |
| 171 | +ip -f inet addr show wlan0 |
| 172 | +Displays your Phone’s Wi-Fi IP Address. |
| 173 | + |
| 174 | +adb shell |
| 175 | +<Hit Enter and then execute the following command> |
| 176 | +top |
| 177 | +Displays top CPU Processes running on your Android Device. |
| 178 | + |
| 179 | +adb shell |
| 180 | +<Hit Enter and then execute the following command> |
| 181 | +getprop ro.build.version.sdk |
| 182 | +Used to get the Properties of your Android’s build.prop Configuration. |
| 183 | + |
| 184 | +adb shell |
| 185 | +<Hit Enter and then execute the following command> |
| 186 | +setprop net.dns1 1.2.3.4 |
| 187 | +Used to set Values to the Properties present in your Android’s build.prop Configuration. |
| 188 | + |
| 189 | + |
| 190 | +---------------------------------------------------------------------------------------------------------------------- |
| 191 | +Fastboot Commands: |
| 192 | +---------------------------------------------------------------------------------------------------------------------- |
| 193 | + |
| 194 | +fastboot devices |
| 195 | +List all the Android Devices that are connected in Fastboot Mode to your Computer. |
| 196 | + |
| 197 | +fastboot oem unlock |
| 198 | +Unlocks the Bootloader on your Android Device (if the OEM allows). |
| 199 | + |
| 200 | +fastboot oem lock |
| 201 | +Relocks the Bootloader on your Android Device. |
| 202 | + |
| 203 | +fastboot reboot bootloader |
| 204 | +Reboots your Device into Fastboot/Bootloader Mode. |
| 205 | + |
| 206 | +fastboot flash |
| 207 | +Used to flash Files on your Android Device. |
| 208 | + |
| 209 | +fastboot flash boot filename.img |
| 210 | +Flashes boot Image on your Android Device’s Boot Partition. |
| 211 | + |
| 212 | +fastboot flash recovery filename.img |
| 213 | +Flashes Recovery Image on your Android Device’s Recovery Partition. |
| 214 | + |
| 215 | +fastboot boot filename.img |
| 216 | +Instead of flashing the File, this Command simply boots it (if the file is bootable). |
0 commit comments