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