├── CNAME
├── README.md
├── _config.yml
├── at.md
├── previews
├── adb_mirror.gif
├── android-wpull-system-apks.gif
└── wifi_result.png
├── scripts
├── wpull-all-apks.sh
├── wpull-system-apks.sh
└── wpull-third-party-apks.sh
└── uusd_codes.md
/CNAME:
--------------------------------------------------------------------------------
1 | android.nr1.nu
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
# Android™ Debug Bridge (adb)
4 | Your journey to master Android™ Shell begins here
5 |
6 |
7 | Time flies, it's about time to get up new commands for our Android devices since there is really much stuff that is being added,updated and removed for our devices, I havent seen all those new commands anywere so hopefully this will be useful for you guys aswell.
8 |
9 | Feel free to contribute to this repo if there is something that i forgot and is worth to know, however, let me show you what's new.
10 |
11 | I decided to not add 'adb shell ' wich means all commands is executed when we are connected to device but of course if you want to, just add 'adb shell' infront of all commands and it will work aswell without being connected to the device shell
12 |
13 | All commands that require root will have (Root_Required) in descriptionn.
14 |
15 | ## For FRP Bypass and hack any Samsung device with Android 12 installed, see my wiki:
16 |
17 | Samsung Android 12 FRPBypass - All models
18 |
19 | ## Websites linked to this Repository
20 |
21 | * [Android™ Debug Bridge - Main](https://android.nr1.nu)
22 | * [Android™ Debug Bridge - Wiki](https://github.com/wuseman/adb-cheatsheet/wiki/Android%E2%84%A2-Debug-Bridge-(adb))
23 |
24 | ## Download Android™ Google Account Manager
25 |
26 | Google Account Manager Android 4.0.3
27 | Google Account Manager Android 4.4.4
28 | Google Account Manager Android 5.0.1
29 | Google Account Manager Android 6.0
30 | Google Account Manager Android 7.0
31 | Google Account Manager Android 7.1.2
32 | Google Account Manager Android 7.1.25
33 | Google Account Manager Android 8.0
34 | Google Account Manager Android 8.1
35 | Google Account Manager Android 9
36 | Google Account Manager Android 10
37 |
38 | ### Custom Apks ™ Blocked
39 |
40 | :bangbang: - Notice! On rooted devices samsung health crashing and wont launch anymore and it wont help to change tima from 1 to 0 in build.prop anymore, download the below apk instead to get samsung health working on your rooted device
41 |
42 |
43 | Samsung Health - Android 12
44 |
45 |
46 | ## Open Android™ Applications
47 |
48 | Links works when you clicking the links with your mobile device, please visit [android.nr1.nu](https://www.android.nr1.nu) to get clickable links.
49 |
50 | * [Click to Erase Lock Settings (dont press unless you frp unlocking)](intent://com.google.android.gms/#Intent;scheme=promote_smartlock_scheme;en)
51 | * [Click to Open My Files](intent://com.sec.android.app.myfiles/#Intent;scheme=android-app;end)
52 | * [Google Search App](intent://com.google.android.googlequicksearchbox/#Intent;scheme=android-app;end)
53 | * [Samsung Apps](intent://com.sec.android.app.samsungapps/#Intent;scheme=android-app;end)
54 | * [Alliance Shield X (Galaxy Store)](https://galaxy.store/alliance)
55 |
56 | #### Android™ Source Code
57 |
58 | * [Android™ Source Code](https://cs.android.com/android/platform/superproject/)
59 |
60 | #### Android™ Issue Tracker
61 |
62 | * [Android™ Issue Tracker](https://code.google.com/p/android/issues/entry)
63 |
64 | ## ADB install
65 |
66 | #### Source Files
67 |
68 | * [Download SDK Platform-Tools for Linux](https://dl.google.com/android/repository/platform-tools_r32.0.0-linux.zip)
69 | * [Download SDK Platform-Tools for MacOSX](https://dl.google.com/android/repository/platform-tools_r32.0.0-darwin.zip)
70 | * [Download SDK Platform-Tools for Windows](https://dl.google.com/android/repository/platform-tools-latest-windows.zip)
71 |
72 | #### MacOSX
73 |
74 | 1. Download the Android SDK Platform Tools ZIP file for macOS.
75 | 2. Extract the ZIP to an easily-accessible location (like the Desktop for example).
76 | 3. Open Terminal.
77 | 4. To browse to the folder you extracted ADB into, enter the following command: cd /path/to/extracted/folder/
78 | 5. For example, on my Mac it was this: cd /Users/Doug/Desktop/platform-tools/
79 | 6. Connect your device to your Mac with a compatible USB cable.
80 | Change the USB connection mode to “file transfer (MTP)” mode.
81 | This is not always required for every device, but it’s best to just leave it in this mode so you don’t run into any issues.
82 | 7. Once the Terminal is in the same folder your ADB tools are in, you can execute the following command to launch the ADB daemon: ./adb devices
83 | 8. On your device, you’ll see an “Allow USB debugging” prompt. Allow the connection.
84 | 9. Finally, re-enter the command from step #7. If everything was successful,
85 | you should now see your device’s serial number in macOS’s Terminal window.
86 |
87 | #### Linux
88 |
89 | 1. Download the Android SDK Platform Tools ZIP file for Linux.
90 | 2. Extract the ZIP to an easily-accessible location (like the Desktop for example).
91 | 3. Open a Terminal window.
92 | 4. Enter the following command: cd /path/to/extracted/folder/
93 | 5. This will change the directory to where you extracted the ADB files.
94 | 6. So for example: cd /Users/Doug/Desktop/platform-tools/
95 | 7.Connect your device to your Linux machine with your USB cable.
96 | Change the connection mode to “file transfer (MTP)” mode.
97 | This is not always necessary for every device, but it’s recommended so you don’t run into any issues.
98 | 8. Once the Terminal is in the same folder your ADB tools are in, you can execute the following command to launch the ADB daemon: ./adb devices
99 | 9. Back on your smartphone or tablet device, you’ll see a prompt asking you to allow USB debugging. Go ahead and grant it.
100 |
101 | #### Windows 10
102 |
103 | 1: Download: https://dl.google.com/android/repository/platform-tools-latest-windows.zip
104 | 2: Extract the contents of this ZIP file into an easily accessible folder (such as C:\platform-tools)
105 | 3: Open Windows explorer and browse to where you extracted the contents of this ZIP file
106 | 4: Then open up a Command Prompt from the same directory as this ADB binary. This can be done by holding
107 | Shift and Right-clicking within the folder then click the “Open command window here” option.
108 | 5: Connect your smartphone or tablet to your computer with a USB cable.
109 | Change the USB mode to “file transfer (MTP)” mode. Some OEMs may or may not require this,
110 | but it’s best to just leave it in this mode for general compatibility.
111 | 6: In the Command Prompt window, enter the following command to launch the ADB daemon: adb devices
112 | 7: On your phone’s screen, you should see a prompt to allow or deny USB Debugging access. Naturally,
113 | you will want to grant USB Debugging access when prompted (and tap the always allow check box if you never want to see that prompt again).
114 | 8: Finally, re-enter the command from step #6. If everything was successful,
115 | you should now see your device’s serial number in the command prompt (or the PowerShell window).
116 |
117 | #### Arch Linux
118 |
119 | pacman -S android-tools
120 |
121 | #### Gentoo
122 |
123 | emerge --ask dev-util/android-sdk-update-manager
124 |
125 | #### Fedora
126 |
127 | dnf install adb
128 |
129 | #### Ubuntu
130 |
131 | apt install adb fastboot -y
132 |
133 | ## Android™ files
134 |
135 | #### SMS and Phone Phone logs is stored in below files
136 |
137 | /data/user_de/0/com.android.providers.telephony/databases/mmssms.db
138 | /data/user_de/0/com.android.providers.telephony/databases/telephony.db
139 |
140 | #### Audio files is stored in
141 |
142 | /system/media/audio/ui/
143 | /system/media/audio/ringtones
144 | /system/media/audio/notifications
145 |
146 | ## ADB commands
147 |
148 | #### Start ADB server:
149 |
150 | adb start-server
151 |
152 | #### Stop ADB server:
153 |
154 | adb stop-server
155 |
156 | #### Kill ADB server:
157 |
158 | adb kill-server
159 |
160 | #### Setup ADB server via Wi-Fi
161 |
162 | adb tcpip
163 |
164 | #### Connect to ADB server:
165 |
166 | adb connect
167 |
168 | #### Restarts the adbd daemon listening on USB
169 |
170 | adb usb
171 |
172 | #### List Connected Devices:
173 |
174 | adb devices
175 |
176 | #### Get Status:
177 |
178 | adb get-state
179 |
180 | #### Print Serial Number:
181 |
182 | adb get-serialno
183 |
184 | #### Backup Device:
185 |
186 | adb backup -all
187 |
188 | #### Restore Device:
189 |
190 | adb restore /path/to/backupflile.adb
191 |
192 | #### Enter ADB shell:
193 |
194 | adb shell
195 |
196 | #### Enter ADB shell if there is multiple devices connected:
197 |
198 | adb -s shell
199 |
200 | #### To print device serial no:
201 |
202 | adb get-serialno
203 |
204 | #### Create a bugreport:
205 |
206 | adb bugreport
207 |
208 | #### Install an app:
209 |
210 | adb install
211 |
212 | #### Install an app and keep all it's data from a previous setup:
213 |
214 | adb install -r
215 |
216 | #### Uninstall an app:
217 |
218 | adb uninstall
219 |
220 | #### Push a file
221 |
222 | adb push = tansfer a file: pc > device
223 |
224 | adb push mypicture.png /storage/on/device
225 |
226 | #### Push a folder (Transfer a folder FROM pc > device)
227 |
228 | adb push myfolder /storage/on/device
229 |
230 | #### Pull a file
231 |
232 | adb pull = tansfer a file: device > pc
233 |
234 | adb pull /storage/on/device/mypicture.png /path/on/pc
235 |
236 | #### Pull a folder (Transfer a folder FROM device > pc)
237 |
238 | adb pull /storage/on/device /path/on/pc
239 |
240 | #### Pull installed apk files
241 |
242 | 
243 |
244 | * [Script for pull all installed Apks](https://raw.githubusercontent.com/wuseman/adb-cheatsheet/main/scripts/wpull-all-apks.sh)
245 | * [Script for pull all installed system Apks](https://raw.githubusercontent.com/wuseman/adb-cheatsheet/main/scripts/wpull-system-apks.sh)
246 | * [Script for pull all Apks installed by you](https://raw.githubusercontent.com/wuseman/adb-cheatsheet/main/scripts/wpull-third-party-apks.sh)
247 |
248 | #### Pull all files inside a folder to a path (Transfer all files in a folder FROM device > pc)
249 |
250 | adb pull /storage/on/device/ /path/on/pc # Notice the trial slash
251 |
252 | ## ADB exec-out
253 |
254 | Stream Device Screen on your PC
255 |
256 | ### TIPS WANTED!
257 |
258 | Does anyone know how to to view AND record the stream at same time? Let me know!
259 |
260 | Exec Out Syntax
261 |
262 | adb exec-out screenrecord --Example Output-format=h264 - | prefered tool -
263 |
264 | ### Stream via Mplayer (Recommended)
265 |
266 | Recommended since it is starts immediately, very little delay, and doesn't freak out like vlc.
267 |
268 | adb exec-out screenrecord --output-format=h264 - | ffplay -framerate 60 -probesize 32 -sync video -
269 |
270 | ffplay works, but it seems to take a few seconds to decide to start, and ends up lagging well behind the entire time.
271 |
272 | ### Stream via FFPLay
273 |
274 | FFPlay Default - No Settings
275 |
276 | adb shell screenrecord --Example Output-format=h264 - | ffplay -
277 |
278 | FFplay Customized
279 |
280 | ```sh
281 | adb exec-out screenrecord --Example Output-format=h264 - | ffplay -framerate 60 -probesize 32 -sync video -
282 | ```
283 |
284 | ```sh
285 | adb shell screenrecord --bit-rate=16m --Example Output-format=h264 --size 800x600 - | ffplay -framerate 60 -framedrop -bufsize 16M -
286 | ```
287 |
288 | 
289 |
290 | FFplay Customized - Stream vin 1080p
291 |
292 | ```sh
293 | adb exec-out screenrecord --bit-rate=16m --Example Output-format=h264 --size 1920x1080 -
294 | ```
295 |
296 | ### Stream via VLC
297 |
298 | Adding --clock-jitter=0 seems to make the errors less traumatic, but it's still pretty messed up vlc is not recommended for this, use FFplay or Mplayer if possible
299 |
300 | Stream via VLC on Windows
301 |
302 | ```sh
303 | adb exec-out screenrecord --bit-rate=4m --Example Output-format=h264 --size 800x600 --show-frame-time - \
304 | |"c:\Program Files\VideoLAN\VLC\vlc" --demux h264 - vlc://quit
305 | ```
306 |
307 | Record your device screen via VLC on Windows
308 |
309 | ```sh
310 | adb exec-out screenrecord --bit-rate=4m --Example Output-format=h264 --size 800x600 --show-frame-time - \
311 | |"c:\Program Files\VideoLAN\VLC\vlc" --demux h264 --sout file/ts:c:\temp\screenrec.mpg - vlc://quit
312 | ```
313 |
314 | ### Network Analyze
315 |
316 | Sniff your device network and SMS traffic via Wireshark on your PC
317 |
318 | adb exec-out "tcpdump -i any -U -w - 2>/dev/null" | wireshark -k -S -i -
319 |
320 | ## ADB reboot
321 |
322 | #### System
323 |
324 | adb reboot
325 |
326 | #### Recovery
327 |
328 | adb reboot recovery
329 |
330 | #### Bootloader
331 |
332 | adb reboot bootloader
333 |
334 |
335 | #### Fastboot (some brands)
336 |
337 | adb reboot fastboot
338 |
339 | ## ADB date
340 |
341 | #### Set date
342 |
343 | date MMDDYYYY.XX;am broadcast -a android.intent.action.TIME_SET
344 |
345 |
346 | ## ADB cmd
347 |
348 | #### cmd testharness
349 | About:
350 | Test Harness Mode is a mode that the device can be placed in to prepare
351 | the device for running UI tests. The device is placed into this mode by
352 | first wiping all data from the device, preserving ADB keys.
353 |
354 | By default, the following settings are configured:
355 | * Package Verifier is disabled
356 | * Stay Awake While Charging is enabled
357 | * OTA Updates are disabled
358 | * Auto-Sync for accounts is disabled
359 |
360 | Other apps may configure themselves differently in Test Harness Mode by
361 | checking ActivityManager.isRunningInUserTestHarness()
362 |
363 | Test Harness Mode commands:
364 | help
365 | Print this help text.
366 |
367 | enable|restore
368 | Erase all data from this device and enable Test Harness Mode,
369 | preserving the stored ADB keys currently on the device and toggling
370 | settings in a way that are conducive to Instrumentation testing.
371 |
372 |
373 |
374 |
375 | #### cmd stats meminfo
376 |
377 | * *Prints the malloc debug information. You need to run the following first:
378 |
379 | adb shell stop
380 | adb shell setprop libc.debug.malloc.program statsd
381 | adb shell setprop libc.debug.malloc.options backtrace
382 | adb shell start
383 | cmd stats print-stats
384 |
385 |
386 | #### Send a broadcast that triggers the subscriber to fetch metrics.
387 |
388 | cmd stats send-broadcast [UID] NAME
389 |
390 | UID The uid of the configuration. It is only possible to pass
391 | the UID parameter on eng builds. If UID is omitted the
392 | calling uid is used.
393 | NAME The name of the configuration
394 |
395 |
396 |
397 |
398 | #### Flushes all data on memory to disk.
399 |
400 | cmd stats write-to-disk
401 |
402 |
403 | #### Prints the UID, app name, version mapping.
404 |
405 | cmd stats print-uid-map
406 |
407 | #### Log a binary push state changed event.
408 |
409 | cmd stats log-binary-push NAME VERSION STAGING ROLLBACK_ENABLED LOW_LATENCY STATE EXPERIMENT_IDS
410 |
411 | NAME The train name.
412 | VERSION The train version code.
413 | STAGING If this train requires a restart.
414 | ROLLBACK_ENABLED If rollback should be enabled for this install.
415 | LOW_LATENCY If the train requires low latency monitoring.
416 | STATE The status of the train push.
417 | Integer value of the enum in atoms.proto.
418 | EXPERIMENT_IDS Comma separated list of experiment ids.
419 | Leave blank for none.
420 |
421 |
422 |
423 |
424 | #### Hide all notifications icons on Status Bar
425 |
426 | cmd statusbar send-disable-flag notification-icons
427 |
428 | ### Reset all flags to default
429 |
430 | cmd statusbar send-disable-flag none
431 |
432 | #### Print Status Bar Icons
433 |
434 | cmd statusbar get-status-icons
435 |
436 | #### Print Preferences for Status Bar
437 |
438 | cmd statusbar prefs list-prefs
439 |
440 | #### Expand Status Bar
441 |
442 | cmd statusbar expand-notifications
443 |
444 | #### Collapse Status Bar
445 |
446 | cmd statusbar collapse
447 |
448 | #### Expand Full Settings
449 |
450 | cmd statusbar expand-settings
451 |
452 | #### Status Bar Help
453 |
454 | cmd statusbar help
455 |
456 | #### Print auth user
457 |
458 | cmd user list
459 |
460 | #### Enable night mode (Dark Mode)
461 |
462 | cmd uimode night yes
463 |
464 | #### Disable night mode
465 |
466 | cmd uimode night no
467 |
468 | #### Enable car Mode
469 |
470 | cmd uimode car yes
471 |
472 | #### Disable car (car Mode)
473 |
474 | cmd uimode car no
475 |
476 | #### Scan for nearby ssid:s, give it 7 seconds for scan and fetch some wifi data
477 |
478 | 
479 |
480 | cmd -w wifi start-scan
481 | sleep 7
482 | cmd -w wifi list-scan-results
483 |
484 | #### Sets whether we are in the middle of an emergency call.
485 |
486 | Equivalent to receiving the `TelephonyManager.ACTION_EMERGENCY_CALL_STATE_CHANGED` broadcast.
487 |
488 | cmd -w wifi set-emergency-call-state enabled|disabled
489 |
490 | #### Sets whether Emergency Callback Mode (ECBM) is enabled.
491 |
492 | cmd -w wifi set-emergency-callback-mode enabled|disabled
493 |
494 | #### Lists the suggested networks from the app
495 |
496 | cmd -w wifi list-suggestions-from-app
497 |
498 | #### Lists all suggested networks on this device
499 |
500 | cmd -w wifi list-all-suggestions
501 |
502 | #### Note: This only returns whether the app was set via the 'network-requests-set-user-approved' shell command
503 |
504 | Queries whether network requests from the app is approved or not.
505 |
506 | cmd -w wifi network-requests-has-user-approved
507 |
508 | #### Note: Only 1 such app can be approved from the shell at a time
509 |
510 | Sets whether network requests from the app is approved or not.
511 |
512 | cmd -w wifi network-requests-set-user-approved yes|no
513 |
514 | #### Lists the requested networks added via shell
515 |
516 | cmd -w wifi list-requests
517 |
518 | #### Removes all active requests added via shell
519 |
520 | cmd -w wifi remove-all-requests
521 |
522 | #### Remove a network request with provided SSID of the network
523 |
524 | cmd -w wifi remove-request
525 |
526 | #### Add a network request with provided params
527 |
528 | cmd -w wifi add-request open|owe|wpa2|wpa3 [] [-b ]
529 |
530 | #### Initiates wifi settings reset
531 |
532 | cmd -w wifi settings-reset
533 |
534 | #### Gets softap supported features. Will print 'wifi_softap_acs_supported'
535 |
536 | cmd -w wifi get-softap-supported-features
537 |
538 | #### Gets setting of wifi watchdog trigger recovery.
539 |
540 | cmd -w wifi get-wifi-watchdog
541 |
542 | #### Sets whether wifi watchdog should trigger recovery
543 |
544 | cmd -w wifi set-wifi-watchdog enabled|disabled
545 |
546 | #### Sets country code to or left for normal value
547 |
548 | cmd -w wifi force-country-code enabled | disabled
549 |
550 | #### Manually triggers a link probe.
551 |
552 | cmd -w wifi send-link-probe
553 |
554 | #### Clears the user disabled networks list.
555 |
556 | cmd -w wifi clear-user-disabled-networks
557 |
558 | #### Removes all user approved network requests for the app.
559 |
560 | cmd -w wifi network-requests-remove-user-approved-access-points
561 |
562 | #### Clear the user choice on Imsi protection exemption for carrier
563 |
564 | cmd -w wifi imsi-protection-exemption-clear-user-approved-for-carrier
565 |
566 | #### Queries whether Imsi protection exemption for carrier is approved or not
567 |
568 | cmd -w wifi imsi-protection-exemption-has-user-approved-for-carrier
569 |
570 | #### Sets whether Imsi protection exemption for carrier is approved or not
571 |
572 | cmd -w wifi imsi-protection-exemption-set-user-approved-for-carrier yes|no
573 |
574 | #### Queries whether network suggestions from the app is approved or not.
575 |
576 | cmd -w wifi network-suggestions-has-user-approved
577 |
578 | #### Sets whether network suggestions from the app is approved or not.
579 |
580 | cmd -w wifi network-suggestions-set-user-approved yes|no
581 |
582 | #### Sets whether low latency mode is forced or left for normal operation.
583 |
584 | cmd -w wifi force-low-latency-mode enabled|disabled
585 |
586 | #### Sets whether hi-perf mode is forced or left for normal operation.
587 |
588 | cmd -w wifi force-hi-perf-mode enabled|disabled
589 |
590 | #### Gets current interval between RSSI polls, in milliseconds.
591 |
592 | cmd -w wifi get-poll-rssi-interval-msecs
593 |
594 | #### Sets the interval between RSSI polls to milliseconds.
595 |
596 | cmd -w wifi set-poll-rssi-interval-msecs
597 |
598 | #### Gets setting of CMD_IP_REACHABILITY_LOST events triggering disconnects.
599 |
600 | Equivalent to receiving the `TelephonyManager.ACTION_EMERGENCY_CALL_STATE_CHANGED` broadcast,
601 | sets whether we are in the middle of an emergency call.
602 |
603 | cmd -w wifi set-emergency-call-state enabled|disabled
604 |
605 | #### Equivalent to receiving the TelephonyManager.ACTION_EMERGENCY_CALLBACK_MODE_CHANGED broadcast.
606 |
607 | cmd -w wifi set-emergency-callback-mode enabled|disabled
608 |
609 | #### Lists the suggested networks from the app
610 |
611 | cmd -w wifi list-suggestions-from-app
612 |
613 | #### Lists all suggested networks on this device
614 |
615 | cmd -w wifi list-all-suggestions
616 |
617 | #### Notice: This only returns whether the app was set via the 'network-requests-set-user-approved' shell command
618 |
619 | Queries whether network requests from the app is approved or not
620 |
621 | cmd -w wifi network-requests-has-user-approved
622 |
623 | #### Note: Only 1 such app can be approved from the shell at a time
624 |
625 | Sets whether network requests from the app is approved or not.
626 |
627 | cmd -w wifi network-requests-set-user-approved yes|no
628 |
629 | #### Lists the requested networks added via shell
630 |
631 | cmd -w wifi list-requests
632 |
633 | #### Removes all active requests added via shell
634 |
635 | cmd -w wifi remove-all-requests
636 |
637 | #### Remove a network request with provided SSID of the network
638 |
639 | cmd -w wifi remove-request
640 |
641 | #### Add a network request with provided params
642 |
643 | cmd -w wifi add-request open|owe|wpa2|wpa3 [] [-b ]
644 |
645 | #### Initiates wifi settings reset
646 |
647 | cmd -w wifi settings-reset
648 |
649 | #### and/or 'wifi_softap_wpa3_sae_supported', each on a separate line.
650 |
651 | cmd -w wifi get-softap-supported-features
652 |
653 | #### Gets setting of wifi watchdog trigger recovery.
654 |
655 | cmd -w wifi get-wifi-watchdog
656 |
657 | #### Sets whether wifi watchdog should trigger recovery
658 |
659 | cmd -w wifi set-wifi-watchdog enabled|disabled
660 |
661 | #### Sets country code to or left for normal value
662 |
663 | cmd -w wifi force-country-code enabled | disabled
664 |
665 | #### Sets whether soft AP channel is forced to MHz
666 |
667 | cmd -w wifi force-softap-channel enabled | disabled
668 |
669 | #### Manually triggers a link probe.
670 |
671 | cmd -w wifi send-link-probe
672 |
673 | #### Clears the user disabled networks list.
674 |
675 | cmd -w wifi clear-user-disabled-networks
676 |
677 | #### Removes all user approved network requests for the app.
678 |
679 | cmd -w wifi network-requests-remove-user-approved-access-points
680 |
681 | #### Clear the user choice on Imsi protection exemption for carrier
682 |
683 | cmd -w wifi imsi-protection-exemption-clear-user-approved-for-carrier
684 |
685 | #### Queries whether Imsi protection exemption for carrier is approved or not
686 |
687 | cmd -w wifi imsi-protection-exemption-has-user-approved-for-carrier
688 |
689 | #### Sets whether Imsi protection exemption for carrier is approved or not
690 |
691 | cmd -w wifi imsi-protection-exemption-set-user-approved-for-carrier yes|no
692 |
693 | #### List uid owner of a app
694 |
695 | cmd package list packages -U####
696 |
697 | #### List packages a.k.a: pm list packages
698 |
699 | cmd package list packages -l
700 |
701 | #### List disabled packages
702 |
703 | cmd package list packages -d
704 |
705 | #### Filter to only show enabled packages
706 |
707 | cmd package list packages -e
708 |
709 | #### Filter to only show third party packages
710 |
711 | cmd package list packages -3
712 |
713 | #### Set the default home activity (aka launcher)
714 |
715 | cmd package set-home-activity [--user USER_ID] TARGET-COMPONENT
716 |
717 | #### Prints all features of the system
718 |
719 | cmd package list features
720 |
721 | #### Print briefs
722 |
723 | cmd package resolve-activity --brief com.facebook.katana
724 | priority=0 preferredOrder=0 match=0x108000 specificIndex=-1 isDefault=false
725 | com.facebook.katana/.LoginActivity
726 |
727 | ## ADB pm
728 |
729 | #### Print all applications in use
730 |
731 | ```sh
732 | pm list packages|sed -e "s/package://"
733 |
734 | |while read x; do
735 | cmd package resolve-activity --brief $x \
736 | |tail -n 1 \
737 | |grep -v "No activity found"
738 | done
739 | ```
740 |
741 | #### List all packages installed on device
742 |
743 | pm list packages
744 |
745 | #### List enabled packages
746 |
747 | pm list packages -e
748 |
749 | #### List disabled packages
750 |
751 | pm list packages -d
752 |
753 | #### List third party packages installed by user
754 |
755 | pm list packages -3
756 |
757 | #### List users
758 |
759 | pm list users
760 |
761 | #### List permission groups
762 |
763 | pm list permission-groups
764 |
765 | #### List features
766 |
767 | pm list features
768 |
769 | #### Uninstall any installed package:
770 |
771 | pm uninstall --user 0 com.package.name
772 |
773 | #### Uninstall multiple apps:
774 |
775 | ```sh
776 | for packages in com.package1 com.package2; do
777 | adb shell pm uninstall --user 0 "${packages}"
778 | done
779 | ```
780 |
781 | #### Clear application data:
782 |
783 | pm clear PACKAGE_NAME
784 |
785 | #### List permission groups:
786 |
787 | pm list permission-groups
788 |
789 | #### List instrumentation:
790 |
791 | pm list instrumentation
792 |
793 | #### Grant permission to an app (Example Only For Grant):
794 |
795 | pm grant com.application android.permission.READ_LOGS
796 |
797 | #### Revoke permission to an app (Example Only For Revoke):
798 |
799 | pm revoke com.application android.permission.READ_LOGS
800 |
801 | #### Reset all permissions for an app:
802 |
803 | pm reset-permissions -p your.app.package
804 |
805 | ## ADB logcat
806 |
807 | #### Default options:
808 |
809 | Example Output
810 | ```ini
811 | * V — Verbose (lowest priority)
812 | * D — Debug
813 | * I — Info (default priority)
814 | * W — Warning
815 | * E — Error
816 | * F — Fatal
817 | * S — Silent (highest priority, on which nothing is ever printed)
818 | ```
819 |
820 | #### Use -v time for print timestamps, and threadtime for dates:
821 |
822 | adb logcat -v time ...
823 | adb logcat -v threadtime ....
824 |
825 | #### For get Example Output colorized with logcat:
826 |
827 | adb logcat ... -v color
828 |
829 | #### Displays current log buffer sizes:
830 |
831 | adb logcat -g
832 |
833 | #### Sets the buffer size (K or M):
834 |
835 | adb logcat -G 16M
836 |
837 | #### Clear the log buffer:
838 |
839 | adb logcat -c
840 |
841 | #### Enables ALL log messages (verbose mode)
842 |
843 | adb logcat *:V
844 |
845 | #### Dump everything to a file:
846 |
847 | adb logcat -f Dumps to specified file
848 |
849 | #### Display PID with the log info
850 |
851 | adb logcat -v process
852 |
853 | #### Display the raw log message, with no other metadata fields
854 |
855 | adb logcat -v raw
856 |
857 | #### Display the date, invocation time, priority/tag, and PID of the process issuing the message
858 |
859 | adb logcat -v time
860 |
861 | #### Display the priority, tag, and the PID and TID of the thread issuing the message
862 |
863 | adb logcat -v thread
864 |
865 | #### Display the date, invocation time, priority, tag, and the PID and TID of the thread issuing the message
866 |
867 | adb logcat -v threadtime
868 |
869 | #### Display all metadata fields and separate messages with blank lines
870 |
871 | adb logcat -v long
872 |
873 | #### Log multiple options (-b ... -b ....):
874 |
875 | adb logcat -b main -b radio -b events
876 |
877 | ### Run all at once, no reason for use it like this really
878 |
879 | adb logcat -v brief -v long -v process -v raw -v tag -v thread -v threadtime -v time -v color
880 |
881 | ## ADB dumpsys
882 |
883 | #### List all active services:
884 |
885 | dumpsys -l
886 |
887 | List services on older devices via command below
888 |
889 | ```sh
890 | dumpsys -l |sed 's/^ / /g'
891 | ```
892 |
893 | Example Output
894 | ```ini
895 | Currently running services:
896 | AAS
897 | AODManagerService
898 | CCM
899 | CocktailBarService
900 | CodecSolution
901 | CustomFrequencyManagerService
902 | DeviceRootKeyService
903 | DirEncryptService
904 | DisplaySolution
905 | DockObserver
906 | EngineeringModeService
907 | HqmManagerService
908 | ImsBase
909 | OcfKeyService
910 | ReactiveService
911 | SEAMService
912 | SamsungKeyProvisioningManagerService
913 | SatsService
914 | SecExternalDisplayService
915 | ```
916 |
917 | #### Dumpsys lock_settings
918 |
919 | ```sh
920 | dumpsys lock_settings
921 | ```
922 |
923 | Example Output
924 | ```ini
925 | Current lock settings service state:
926 |
927 | User State:
928 | User 0
929 | SP Handle: 5f0ef3437a85f55
930 | Last changed: 2021-07-28 20:22:36 (b8212446331f2358)
931 | SID: 3fffcda35ee6c180
932 | Quality: 0
933 | CredentialType: Pin
934 | SeparateChallenge: true
935 | Metrics: known
936 |
937 | Storage:
938 | User 0 [/data/system_de/0/spblob]:
939 | 5 2021-07-28 20:22:36 05f0ef3437a85f55.weaver
940 | 31 2021-07-28 20:22:36 05f0ef3437a85f55.pwd
941 | 72 2021-07-28 20:22:36 05f0ef3437a85f55.metrics
942 | 186 2021-07-28 20:22:36 05f0ef3437a85f55.spblob
943 | 58 2021-07-28 20:22:36 0000000000000000.handle
944 |
945 | StrongAuth:
946 | PrimaryAuthFlags state:
947 | userId=0, primaryAuthFlags=0
948 |
949 | NonStrongBiometricAllowed state:
950 |
951 |
952 | RebootEscrow:
953 | mRebootEscrowWanted=false
954 | mRebootEscrowReady=false
955 | mRebootEscrowListener=com.android.server.recoverysystem.RecoverySystemService@bc1c4d8
956 | mPendingRebootEscrowKey is not set
957 | ```
958 |
959 | #### Print codecs for bluetooth headphones
960 |
961 | dumpsys media.audio_flinger | grep -A3 Input
962 |
963 | #### Show bluetooth macaddr, bluetooth name and such things
964 |
965 | dumpsys bluetooth_manager
966 |
967 | #### Dump phone registry
968 |
969 | dumpsys telephony.registry
970 |
971 | #### Dump GPS Data:
972 |
973 | dumpsys location
974 |
975 | #### Dump Settings
976 |
977 | ```sh
978 | adb shell dumpsys settings
979 | ```
980 |
981 | Example Output
982 | ```ini
983 | _id:225 name:lock_screen_show_notifications pkg:com.android.settings value:1
984 | _id:6 name:volume_bluetooth_sco pkg:android value:7 default:7
985 | _id:192 name:ringtone_set pkg:com.google.android.gsf value:1
986 | _id:159 name:lock_screen_allow_rotation pkg:android value:0
987 | _id:2997 name:Flashlight_brightness_level pkg:com.android.systemui value:1001
988 | _id:67 name:SEM_VIBRATION_NOTIFICATION_INTENSITY pkg:android value:5
989 | _id:175 name:call_popup pkg:android value:0 default:0
990 | _id:59 name:install_non_market_apps pkg:android value:1 default:1
991 | ```
992 | #### Display Contacts On Sim Card
993 |
994 | adb shell dumpsys simphonebook
995 |
996 | #### Show hardware info as thermal stuff for cpu, gpu and battery
997 |
998 | ```sh
999 | adb shell dumpsys hardware_properties
1000 | ```
1001 | Example Output
1002 | ```ini
1003 | ****** Dump of HardwarePropertiesManagerService ******
1004 | CPU temperatures: [38.0, 38.0]
1005 | CPU throttling temperatures: [55.0, 76.0]
1006 | CPU shutdown temperatures: [115.0, 115.0]
1007 | ```
1008 |
1009 | #### Show all application you have an account on:
1010 |
1011 | ```sh
1012 | dumpsys account|grep -i com.*$ -o|cut -d' ' -f1|cut -d} -f1|grep -v com$
1013 | ```
1014 | Example Output
1015 | ```ini
1016 | com.microsoft.workaccount
1017 | com.skype.raider
1018 | com.samsung.android.mobileservice
1019 | com.facebook.messenger
1020 | com.google.android.gm.exchange
1021 | ```
1022 |
1023 | #### Show all notifications listener and so on:
1024 |
1025 | dumpsys notification
1026 |
1027 | #### List email addresses registerd on different stuff on device:
1028 |
1029 | dumpsys | grep -E -o "\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}\b"
1030 |
1031 | #### Print version of a specifik package
1032 |
1033 | dumpsys package com.lge.signboard | grep versionName
1034 | versionName=6.00.170603-0
1035 |
1036 | #### Check state for screen and figoure how device was unlcked last time:
1037 |
1038 | ```sh
1039 | adb shell dumpsys user
1040 | ```
1041 | Example Output
1042 | ```ini
1043 | State: RUNNING_UNLOCKED
1044 | Last logged in fingerprint
1045 | agree Knox Privacy Policy: false
1046 | ```
1047 |
1048 | #### And for example, you can dump data for all of the running services, dump all data for battery:
1049 |
1050 | adb shell dumpsys battery
1051 |
1052 | #### Dump stats for your battery:
1053 |
1054 | adb shell dumpsys batterystats
1055 |
1056 | #### Erase old stats for battery:
1057 |
1058 | dumpsys batterystats --reset
1059 |
1060 | #### Sort Applications By Ram Usage:
1061 |
1062 | ```sh
1063 | dumpsys meminfo
1064 | ```
1065 | Example Output
1066 | ```ini
1067 | Applications Memory Usage (in Kilobytes):
1068 | Uptime: 29602806 Realtime: 57806941
1069 |
1070 | Total PSS by process:
1071 | 265,435K: com.android.systemui (pid 4190)
1072 | 264,671K: system (pid 3838)
1073 | 171,192K: surfaceflinger (pid 3360)
1074 | 152,523K: android.hardware.graphics.composer@2.1-service (pid 3338)
1075 | 128,781K: com.sec.android.app.launcher (pid 5597 / activities)
1076 | 92,656K: se.kronansapotek.kronan (pid 26729 / activities)
1077 | 84,563K: logd (pid 3203)
1078 | 80,944K: com.google.android.talk (pid 32314 / activities)
1079 | 79,754K: com.google.android.googlequicksearchbox:search
1080 | ```
1081 |
1082 | #### Unplug AC:
1083 |
1084 | dumpsys battery unplug
1085 |
1086 | #### See current used app:
1087 |
1088 | dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp'|grep '/'|awk -F'u0' '{print $2}'|awk '{print $1}'
1089 |
1090 | #### Print how many notifications you have:
1091 |
1092 | dumpsys notification | grep NotificationRecord | wc -l
1093 |
1094 | ## ADB dumpstate
1095 |
1096 | #### Dump info about your sim provider and kernel bootloader ID etc.
1097 |
1098 | ```sh
1099 | dumpstate -v
1100 | ```
1101 |
1102 | Example Output
1103 | ```ini
1104 | ========================================================
1105 | == dumpstate: 2019-08-30 19:31:05
1106 | ========================================================
1107 |
1108 | Build: PPR1.180610.011.G950FXXS5DSF1
1109 | Build fingerprint: 'samsung/dreamltexx/dreamlte:9/PPR1.180610.011/G950FXXS5DSF1:user/release-keys'
1110 | Bootloader: G950FXXS5DSF1
1111 | Radio: G950FXXS5DSF1
1112 | Network: Comviq
1113 | Linux version 4.4.111-16019454 (dpi@21DHA724) (gcc version 4.9.x 20150123 (prerelease) (GCC) ) #1 SMP PREEMPT Mon Jun 3 20:16:50 KST 2019
1114 | Kernel: Command line: (unknown)
1115 | up 0 weeks, 0 days, 16 hours, 21 minutes
1116 | Uptime: Bugreport format version: 2.0
1117 | Dumpstate info: id=0 pid=26940 dry_run=0 args=dumpstate -v extra_options=
1118 | ```
1119 |
1120 | ## ADB am
1121 |
1122 | #### How to use Demo Mode
1123 | #### First you enable the Demo Mode:
1124 |
1125 | settings put global sysui_demo_allowed 1
1126 |
1127 | #### Display time 12:00
1128 |
1129 | am broadcast -a com.android.systemui.demo -e command clock -e hhmm 1200
1130 |
1131 | #### Display full mobile data without type
1132 |
1133 | am broadcast -a com.android.systemui.demo -e command network -e mobile show -e level 4 -e datatype false
1134 |
1135 | #### Hide notifications
1136 |
1137 | am broadcast -a com.android.systemui.demo -e command notifications -e visible false
1138 |
1139 | #### Show full battery but not in charging state
1140 |
1141 | am broadcast -a com.android.systemui.demo -e command battery -e plugged false -e level 100
1142 |
1143 | #### Exit Demo Mode
1144 |
1145 | am broadcast -a com.android.systemui.demo -e command exit
1146 |
1147 | ***
1148 |
1149 | #### Add a value to default shared preferences.
1150 |
1151 | adb shell 'am broadcast -a org.example.app.sp.PUT --es key key_name --es value "hello world!"'
1152 |
1153 | #### Remove a value to default shared preferences.
1154 |
1155 | adb shell 'am broadcast -a org.example.app.sp.REMOVE --es key key_name'
1156 |
1157 | #### Clear all default shared preferences.
1158 |
1159 | adb shell 'am broadcast -a org.example.app.sp.CLEAR --es key key_name'
1160 |
1161 | #### It's also possible to specify shared preferences file.
1162 |
1163 | adb shell 'am broadcast -a org.example.app.sp.PUT --es name Game --es key level --ei value 10'
1164 |
1165 | #### Play a mp3 track on device
1166 |
1167 | am start -a android.intent.action.VIEW -d file:////storage/9A8A-1069/wuseman/ringtones/.mp3 -t audio/mp3
1168 |
1169 | #### Data types
1170 |
1171 | adb shell 'am broadcast -a org.example.app.sp.PUT --es key string --es value "hello world!"'
1172 | adb shell 'am broadcast -a org.example.app.sp.PUT --es key boolean --ez value true'
1173 | adb shell 'am broadcast -a org.example.app.sp.PUT --es key float --ef value 3.14159'
1174 | adb shell 'am broadcast -a org.example.app.sp.PUT --es key int --ei value 2015'
1175 | adb shell 'am broadcast -a org.example.app.sp.PUT --es key long --el value 9223372036854775807'
1176 |
1177 | #### Restart application process after making changes
1178 |
1179 | adb shell 'am broadcast -a org.example.app.sp.CLEAR --ez restart true'
1180 |
1181 | #### Open Google Camera (Pixel 4)
1182 |
1183 | am start com.google.android.GoogleCamera
1184 |
1185 | #### Set default preferences for an app:
1186 |
1187 | am broadcast -a org.example.app.sp.CLEAR --es key key_name
1188 |
1189 | #### WARNING!! Factory Reset
1190 |
1191 | am broadcast -a android.intent.action.MASTER_CLEAR
1192 |
1193 | #### Open Special Menu
1194 |
1195 | am start -a android.intent.action.VIEW \
1196 |
1197 | #### Open settings:
1198 |
1199 | am start -n com.android.settings/com.android.settings.Settings
1200 |
1201 | #### Open activity to new APN
1202 |
1203 | am start -a android.intent.action.INSERT content://telephony/carriers --ei simId
1204 |
1205 | #### Open hiden menu (require root)
1206 |
1207 | su -c "am broadcast -a android.provider.Telephony.SECRET_CODE -d android_secret_code://IOTHIDDENMENU"
1208 |
1209 | #### Start prefered webbrowser:
1210 |
1211 | am start -a android.intent.action.VIEW -d (com.android.browser | com.android.chrome | com.sec.android.sbrowser)
1212 |
1213 | #### Print Activities:
1214 |
1215 | am start -a com.android.settings/.wifi.CaptivePortalWebViewActivity
1216 |
1217 | #### Open Camera in Photo mode
1218 |
1219 | am start -a android.media.action.IMAGE_CAPTURE
1220 |
1221 | #### Open Camera in Photo mode and take a picture
1222 |
1223 | am start -a android.media.action.IMAGE_CAPTURE
1224 | input keyevent 66
1225 |
1226 | #### Open Camera in Video mode
1227 |
1228 | am start -a android.media.action.VIDEO_CAMERA
1229 |
1230 | #### Open Camera in Video mode and start recording
1231 |
1232 | am start -a android.media.action.VIDEO_CAMERA
1233 | input keyevent 66
1234 |
1235 | #### Go to gallary and choose a picture and then set wallpaper:
1236 |
1237 | am start -a android.intent.action.SET_WALLPAPER
1238 |
1239 | #### Open any URL in default browser
1240 |
1241 | am start -a android.intent.action.VIEW -d https://github.com/wuseman
1242 |
1243 | #### Open Google Maps with fixed coordinates
1244 |
1245 | am start -a android.intent.action.VIEW -d "geo:46.457398,-119.407305"
1246 |
1247 | #### Simulate waking your app using the following commands
1248 |
1249 | am set-inactive
1250 | am set-inactive false
1251 |
1252 | #### Enabling Night Mode (If Supported)
1253 |
1254 | am start --ez show_night_mode true com.android.systemui/.tuner.TunerActivity
1255 |
1256 | #### Start facebook application inbox by using URI
1257 |
1258 | am start -a android.intent.action.VIEW -d facebook://facebook.com/inbox
1259 |
1260 | #### Open a vcard file from sdcard (will open contacts app)
1261 |
1262 | am start -a android.intent.action.VIEW -d file:///sdcard/me.vcard -t text/x-vcard
1263 |
1264 | #### Open an application to get content (in this case to get a jpeg picture)
1265 |
1266 | am start -a android.intent.action.GET_CONTENT -t image/jpeg
1267 |
1268 | #### There is several ways to send a SMS via AM, here is just one of several ways:
1269 |
1270 | am broadcast -a com.whereismywifeserver.intent.TEST --es sms_body "test from adb"
1271 |
1272 | #### Simulate waking your app using the following commands:
1273 |
1274 | am set-inactive
1275 | am set-inactive false
1276 |
1277 | #### Start facebook application inbox by using URI
1278 |
1279 | am start -a android.intent.action.VIEW -d facebook://facebook.com/inbox
1280 |
1281 | #### Open a vcard file from sdcard (will open contacts app)
1282 |
1283 | am start -a android.intent.action.VIEW -d file:///sdcard/me.vcard -t text/x-vcard
1284 |
1285 | #### Open an application to get content (in this case to get a jpeg picture)
1286 |
1287 | am start -a android.intent.action.GET_CONTENT -t image/jpeg
1288 |
1289 | #### There is several ways to send a SMS via AM, here is one example:
1290 |
1291 | am broadcast -a com.whereismywifeserver.intent.TEST --es sms_body "test from adb"
1292 |
1293 | #### Open settings for a specifik app
1294 |
1295 | am start -a android.settings.APPLICATION_DETAILS_SETTINGS package:
1296 |
1297 | #### Add Contacts
1298 |
1299 | Add a Contact - Example 1
1300 |
1301 | am start -a android.intent.action.INSERT -t vnd.android.cursor.dir/contact -e name "$(dialog --stdout --inputbox 'wuseman' 0 0)" -e postal "$(dialog --stdout --inputbox 'Postal Address' 0 0)" -e phone "$(dialog --stdout --inputbox 'Phone Number' 0 0)" -e email "$(dialog --stdout --inputbox 'Email' 0 0)"
1302 |
1303 | Add a Contact - Example 2
1304 |
1305 | am start -a android.intent.action.INSERT -t vnd.android.cursor.dir/contact -e name 'wuseman' -e phone
1306 |
1307 | #### Open Projectmenu (Huawei only)
1308 |
1309 | am start com.huawei.android.projectmenu/com.huawei.android.projectmenu.ProjectMenuActivity
1310 |
1311 | #### Make Demo Call
1312 |
1313 | Establishes a fake Bluetooth connection to Dialer and must be called first to enable access to all call-related commands.
1314 |
1315 | #### To connect a device
1316 |
1317 | adb shell am broadcast -a com.android.car.dialer.intent.action.adb --es "action" "connect"
1318 |
1319 | #### Place an outgoing call
1320 |
1321 | adb shell am broadcast -a com.android.car.dialer.intent.action.adb --es "action" "addCall" --es "id" "4085524874"
1322 |
1323 | #### Receive an incoming call
1324 |
1325 | adb shell am broadcast -a com.android.car.dialer.intent.action.adb --es "action" "rcvCall" --es "id" "4085524874"
1326 |
1327 | #### End a call
1328 |
1329 | adb shell am broadcast -a com.android.car.dialer.intent.action.adb --es "action" "endCall" --es "id" "4085524874"
1330 |
1331 | #### Hold the current call
1332 |
1333 | adb shell am broadcast -a com.android.car.dialer.intent.action.adb --es "action" "holdCall"
1334 |
1335 | #### Unhold the current call
1336 |
1337 | adb shell am broadcast -a com.android.car.dialer.intent.action.adb --es "action" "unholdCall"
1338 |
1339 | #### Merge calls
1340 |
1341 | adb shell am broadcast -a com.android.car.dialer.intent.action.adb --es "action" "unholdCall"
1342 |
1343 | #### Clear all calls, To remove all calls in the call list:
1344 |
1345 | adb shell am broadcast -a com.android.car.dialer.intent.action.adb --es "action" "clearAll"
1346 |
1347 | ## ADB acpi
1348 |
1349 | #### Get Battery Percentage
1350 |
1351 | acpi
1352 |
1353 | #### Show batteries
1354 |
1355 | acpi -b
1356 |
1357 | #### Show Cooling Device State
1358 |
1359 | acpi -c
1360 |
1361 | #### Show Temperatures
1362 |
1363 | acpi -t
1364 |
1365 | #### Just print everything from acpi
1366 |
1367 | acpi -V
1368 |
1369 | ## ADB dpm
1370 |
1371 | #### Enable Device Admin
1372 |
1373 | dpm set-device-owner com.package.name/.DeviceAdminReceiver
1374 |
1375 | ## ADB service
1376 |
1377 | ### StatusBar
1378 |
1379 | #### Expand Status Bar
1380 |
1381 | service call statusbar 1
1382 |
1383 | #### Expand Status Bar
1384 |
1385 | service call statusbar 2
1386 |
1387 | #### Collapse Status Bar
1388 |
1389 | service call statusbar 2
1390 |
1391 | ### IMEI Related
1392 |
1393 | ### Slot 1
1394 |
1395 | #### Print IMEI - Example 1
1396 |
1397 | service call iphonesubinfo 1| cut -d "'" -f2| grep -Eo '[0-9]'| xargs| sed 's/\ //g'
1398 |
1399 | #### Print IMEI - Example 2
1400 |
1401 | service call iphonesubinfo 3 i32 1 | grep -oE '[0-9a-f]{8} ' | while read hex; do echo -ne "\u${hex:4:4}\u${hex:0:4}"; done; echo
1402 |
1403 | #### Print IMEI - Example 3
1404 |
1405 | echo "[device.imei]: [$(adb shell service call iphonesubinfo 1 | awk -F "'" '{print $2}' | sed '1 d'| tr -d '\n' | tr -d '.' | tr -d ' ')]"
1406 |
1407 | #### Print IMEI - Example 4
1408 |
1409 | adb shell service call iphonesubinfo 1 | awk -F"'" 'NR>1 { gsub(/\./,"",$2); imei=imei $2 } END {print imei}'
1410 |
1411 | #### Print IMEI - Example 5
1412 |
1413 | adb shell "service call iphonesubinfo 1 | cut -c 52-66 | tr -d '.[:space:]'"
1414 |
1415 | #### Print IMEI - Example 6
1416 |
1417 | adb shell service call iphonesubinfo 1 | awk -F "'" '{print }' | sed '1 d' | tr -d '.' | awk '{print}' ORS=
1418 |
1419 | ### Slot 2
1420 |
1421 | Some devices has 2 sim card slot, for print the second simcards imei use below:
1422 |
1423 | Print IMEI - Slot 2
1424 |
1425 | service call iphonesubinfo 3 i32 2 | grep -oE '[0-9a-f]{8} ' | while read hex; do echo -ne "\u${hex:4:4}\u${hex:0:4}"; done; echo
1426 |
1427 | ## ADB settings
1428 |
1429 | #### List how many times we booted device:
1430 |
1431 | settings list global|grep "boot_count="|cut -d= -f2|head -n 1|xargs echo "Booted:"|sed 's/$/ times/g'
1432 |
1433 | #### Hide Status bar
1434 |
1435 | settings put global policy_control immersive.status=*
1436 |
1437 | #### Hide Navigation bar
1438 |
1439 | settings put global policy_control immersive.navigation=*
1440 |
1441 | #### Hide both status and navigation bars
1442 |
1443 | settings put global policy_control immersive.full=*
1444 |
1445 | #### Revert bars to stock configuration
1446 |
1447 | settings put global policy_control null*
1448 |
1449 | ##### It is also possible to specify this behavior for a specific application.
1450 | ##### Examples to modify the behavior when Enterprise Browser is in the foreground:
1451 |
1452 | settings put global policy_control immersive.full=com.honeywell.enterprisebrowser
1453 | settings put global policy_control immersive.navigation=com.honeywell.enterprisebrowser
1454 | settings put global policy_control immersive.status=com.honeywell.enterprisebrowser
1455 |
1456 | ## ADB content
1457 |
1458 | #### Trick device that setup already has been done (FRP Bypassing)
1459 |
1460 | content insert --uri content://settings/secure --bind name:s:user_setup_complete --bind value:s:1
1461 | am start -n com.google.android.gsf.login/
1462 | am start -n com.google.android.gsf.login.LoginActivity
1463 |
1464 | #### Global/Settings/Secure
1465 |
1466 | content query --uri content://settings/global
1467 | content query --uri content://settings/settings
1468 | content query --uri content://settings/seure
1469 |
1470 | #### Print files for all applications
1471 |
1472 | content query --uri content://media/external/file --projection _data
1473 |
1474 | #### Select "name" and "value" columns from secure settings where "name" is equal to "new_setting" and sort the result by name in ascending order
1475 |
1476 | content query --uri content://settings/secure --projection name:value
1477 |
1478 | #### Remove "new_setting" secure setting.
1479 |
1480 | content delete --uri content://settings/secure --where "name='new_setting'"
1481 |
1482 | #### Download current ringtone and play on PC via ffplay:
1483 |
1484 | adb shell 'content read --uri content://settings/system/ringtone_cache' > a.ogg|xargs ffplay a.ogg
1485 |
1486 | #### Various ways to print contacts
1487 |
1488 | content query --uri content://contacts/phones/ --projection display_name:number:notes
1489 | content query --uri content://com.android.contacts/data --projection display_name:data1:data4:contact_id
1490 | content query --uri content://contacts/people/
1491 |
1492 | #### Print Contacts Phone Numbers:
1493 |
1494 | content query --uri content://contacts/phones/
1495 |
1496 | #### Print Contacts Added In Groups:
1497 |
1498 | content query --uri content://contacts/groups/
1499 |
1500 | #### Print Group Mmembership:
1501 |
1502 | content query --uri content://contacts/groupmembership/
1503 |
1504 | #### Print organiztations:
1505 |
1506 | content query --uri content://contacts/organizations/
1507 |
1508 | #### Print Call Logs
1509 |
1510 | content query --uri content://call_log/calls
1511 |
1512 | #### Print text from SMS sections
1513 |
1514 | content query --uri content://sms/conversations
1515 | content query --uri content://sms/conversations
1516 | content query --uri content://sms/draft
1517 | content query --uri content://sms/inbox
1518 | content query --uri content://sms/outbox
1519 | content query --uri content://sms/sent
1520 |
1521 | #### Print text from MMS sections
1522 |
1523 | content query --uri content://mms
1524 | content query --uri content://mms/inbox
1525 | content query --uri content://mms/outbox
1526 | content query --uri content://mms/part
1527 | content query --uri content://mms/sent
1528 | content query --uri content://mms-sms/conversations
1529 | content query --uri content://mms-sms/draft
1530 | content query --uri content://mms-sms/locked
1531 | content query --uri content://mms-sms/search
1532 |
1533 | #### Auto rotation on
1534 |
1535 | content insert –uri content://settings/system –bind name:s:accelerometer_rotation –bind value:i:1
1536 |
1537 | #### Auto rotation off
1538 |
1539 | content insert –uri content://settings/system –bind name:s:accelerometer_rotation –bind value:i:0
1540 |
1541 | #### Rotate to landscape
1542 |
1543 | content insert —uri content://settings/system –bind name:s:user_rotation –bind value:i:1
1544 |
1545 | #### Rotate portrait
1546 |
1547 | content insert –uri content://settings/system –bind name:s:user_rotation –bind value:i:0
1548 |
1549 | ## ADB input
1550 |
1551 | #### Simulate a swipe down for notification bar:
1552 |
1553 | input swipe 0 0 0 300
1554 |
1555 | #### Swipe and unlock screen:
1556 |
1557 | input swipe 300 1000 300 500
1558 |
1559 | ## ADB wm
1560 |
1561 | #### Print Screen Resolution
1562 |
1563 | wm size
1564 |
1565 | #### Set Screen Size
1566 |
1567 | wm size WxH
1568 |
1569 | #### Set Overscan:
1570 |
1571 | wm overscan 0,0,0,200
1572 |
1573 | ## ADB getprop
1574 |
1575 | It is not so much to describe here, get info via getprop command.
1576 |
1577 | Example Usage
1578 |
1579 | ```sh
1580 | getprop | grep "model\|version.sdk\|manufacturer\|hardware\|platform\|revision\|serialno\|product.name\|brand"
1581 | ```
1582 |
1583 | #### Print CPU abi
1584 |
1585 | getprop ro.product.cpu.abi
1586 |
1587 |
1588 | #### Get info if OEM Unlock is Allowed
1589 |
1590 | ```ini
1591 | 1 = Enabled
1592 | 0 = Disabled
1593 | ```
1594 |
1595 | ```sh
1596 | getprop sys.oem_unlock_allowed
1597 | ```
1598 |
1599 | #### Is System boot completed
1600 |
1601 | getprop sys.boot_completed
1602 |
1603 | ## ADB setprop
1604 |
1605 | #### Auto answer any call after 2 seconds:
1606 |
1607 | setprop persist.sys.tel.autoanswer.ms 2000
1608 |
1609 | #### Turn off auto answer:
1610 |
1611 | setprop persist.sys.tel.autoanswer.ms 0
1612 |
1613 | ## ADB /sys
1614 |
1615 | #### Set Screen Brightness
1616 |
1617 | #### Set Brightness Off
1618 |
1619 | - 0 is the same as 1
1620 |
1621 | echo 1 > /sys/class/backlight/panel/brightness
1622 |
1623 | #### Set to maximum
1624 |
1625 | echo 48600 > /sys/class/backlight/panel/brightness
1626 |
1627 | #### Set to max normal
1628 |
1629 | echo 255 > /sys/class/backlight/panel/brightness
1630 |
1631 | #### Try vibrator
1632 |
1633 | echo 200 > /sys/class/timed_Example Output/vibrator/enable
1634 |
1635 | #### Print USB Mode (Charging only, MTP)
1636 |
1637 | cat /sys/devices/soc0/hw_platform'
1638 |
1639 | ## ADB sm
1640 |
1641 | #### Adopting USB-Drive
1642 |
1643 | sm set-force-adoptable true
1644 |
1645 | ## ADB keytool
1646 |
1647 | #### Genereate hash from keystore -Typically used in Facebook
1648 |
1649 | keytool -exportcert -alias your_alias -keystore debug.keystore | openssl sha1 -binary | openssl base64
1650 |
1651 | #### Typically used in Google Maps
1652 |
1653 | keytool -list -v -keystore ~/.android/debug.keystore -alias your_alias
1654 |
1655 | ## ADB monkey
1656 |
1657 | #### Test any app by pressing 10000 times at once, this will start your application and perform 10000 random events.#
1658 |
1659 | ```sh
1660 | monkey -p com.example.myapp -v 10000
1661 | ```
1662 |
1663 | Example Output
1664 | ```ini
1665 | com.google.android.youtube/.app.honeycomb.Shell$HomeActivity
1666 | com.google.android.googlequicksearchbox/.SearchActivity
1667 | com.google.android.apps.docs.editors.docs/com.google.android.apps.docs.app.NewMainProxyActivity
1668 | com.android.documentsui/.LauncherActivity
1669 | com.google.android.apps.docs.editors.sheets/com.google.android.apps.docs.app.NewMainProxyActivity
1670 | com.google.android.apps.docs.editors.slides/com.google.android.apps.docs.app.NewMainProxyActivity
1671 | com.android.vending/.AssetBrowserActivity
1672 | ```
1673 |
1674 | ## ADB sqlite3
1675 |
1676 | #### Read SIM Card info
1677 |
1678 | ```sh
1679 | sqlite3 -line /data/user_de/0/com.android.providers.telephony/databases/telephony.db 'select icc_id,card_id,carrier_name,display_name,mcc,mnc from siminfo'
1680 | ```
1681 |
1682 | Example Output
1683 | ```ini
1684 | icc_id = 8946209802SSSSSSSSS
1685 | card_id = 8946209802SSSSSSSSS
1686 | display_name = CARD
1687 | mcc = 0
1688 | mnc = 0
1689 |
1690 | icc_id = 8946209802SSSSSSSSS
1691 | card_id = 8946209802SSSSSSSSS
1692 | carrier_name = Telia
1693 | display_name = Telia
1694 | mcc = 240
1695 | mnc = 7
1696 | ```
1697 |
1698 | #### Read All SIM Card Info
1699 |
1700 | ```sh
1701 | sqlite3 -line /data/user_de/0/com.android.providers.telephony/databases/telephony.db 'select * from siminfo'
1702 | ```
1703 |
1704 | #### Print ICCID
1705 |
1706 | ```sh
1707 | sqlite3 /data/vendor/radio/qcril.db 'select ICCID from qcril_manual_prov_table'
1708 | ```
1709 |
1710 | #### Print data in .db files, clean:
1711 |
1712 | grep -vx -f <(sqlite3 Main.db .dump) <(sqlite3 ${DB} .schema)
1713 |
1714 | #### Use below command fr update dg.db file:
1715 |
1716 | sqlite3 /data/data/com.google.android.gms/databases/dg.db "update main set c='0' where a like '%attest%';"
1717 |
1718 | #### Grab all file extensions of a kind and download to PC
1719 |
1720 | ```sh
1721 | for i in `adb shell "su -c find /data /system -name '*.key'"`; do
1722 | mkdir -p ".`dirname $i`";adb shell "su -c cat $i" > ".$i";
1723 | done
1724 | ```
1725 |
1726 | #### Print uptime for your device by days + time
1727 |
1728 | ```sh
1729 | TZ=UTC date -d@$(cut -d\ -f1 /proc/uptime) +'%j %T' | awk '{print $1-1"d",$2}'
1730 | ```
1731 |
1732 | ## Android paths
1733 |
1734 | ```ini
1735 | /data/ssh
1736 | /data/adb/magisk
1737 | /data/data//databases (app databases)
1738 | /data/data//shared_prefs/ (shared preferences)
1739 | /data/app (apk installed by user)
1740 | /system/app (pre-installed APK files)
1741 | /mmt/asec (encrypted apps) (App2SD)
1742 | /mmt/emmc (internal SD Card)
1743 | /mmt/adcard (external/Internal SD Card)
1744 | /mmt/adcard/external_sd (external SD Card)
1745 | ```
1746 |
1747 | ## Android root
1748 |
1749 | Commands for rooted devices
1750 |
1751 | #### Find out if the device is rooted and if su exist
1752 |
1753 | which su &> /dev/null;[[ $? = "0" ]] && echo "Rooted" || echo "Not rooted"
1754 |
1755 | ### Bypass Google Pay Block
1756 |
1757 | #### Stop wallnetfcrel
1758 |
1759 | am force-stop /data/data/com.google.android.apps.walletnfcrel
1760 |
1761 | Hide root for Google apps:
1762 |
1763 | ```sh
1764 | for google_apps in $(cmd package list packages|grep -i com.google |cut -d: -f2); do
1765 | magiskhide add ${google_apps};
1766 | done
1767 | ```
1768 |
1769 | #### Change permissions on dg.db to read-and-write:
1770 |
1771 | su sh -c chmod 0777 /data/data/com.google.android.gms/databases/dg.db
1772 |
1773 | #### Now change permissions on dg.db to 0444
1774 |
1775 | chmod 0444 /data/data/com.google.android.gms/databases/dg.db
1776 |
1777 | Clear cache for your Google Pay application and have fun! :)
1778 |
1779 | #### Grab all file extensions of a kind and download to PC
1780 |
1781 | ```sh
1782 | for i in `adb shell "su -c find /data /system -name '*.key'"`; do
1783 | mkdir -p ".`dirname $i`";adb shell "su -c cat $i" > ".$i";
1784 | done
1785 | ```
1786 |
1787 | ## Android wuseman's notices
1788 |
1789 | Find out happens when we remove below file
1790 |
1791 | ```sh
1792 | rm /data/misc/bootstat/boot_complete?
1793 | ```
1794 |
1795 |
1796 | ## Android magisk (updated version - zygisk - comming soon)
1797 |
1798 | ..... will be added very soon.
1799 |
1800 | ## Android magisk (older versions)
1801 |
1802 | #### Enable magiskhide
1803 |
1804 | /sbin/magisk magiskhide enable
1805 |
1806 | #### List hided apps by magisk
1807 |
1808 | /sbin/magisk magiskhide list
1809 |
1810 | #### Add package to magiskhide
1811 |
1812 | /sbin/magisk magiskhide add com.package
1813 |
1814 | ## ADB commands sorted by brand
1815 |
1816 | #### Samsung
1817 |
1818 | #### Bypass Samsung Health block on rooted samsung devices
1819 |
1820 | mount -o rw,remount /system/etc/mkshrc
1821 | sed -i 's/ro.config.tima=1/ro.config.tima=0/g' build.prop
1822 |
1823 | ## ADB screencap
1824 |
1825 | screencap /storage/emulated/0/Pictures/screenshot.png
1826 |
1827 | ## ADB screenrecord
1828 |
1829 | screenrecord --time-limit 10 /storage/emulated/0/Video/record.mp4
1830 |
1831 | ## Android FRP Bypass
1832 |
1833 | * [wuseman - Samsung Galaxy A10](https://github.com/wuseman/Samsung_Galaxy.A10_FRP.Bypass)
1834 | * [wuseman - Samsung Galaxy A10](https://github.com/wuseman/Samsung_Galaxy.A10_Rooting)
1835 | * [wuseman - Samsung Galaxy A5](https://github.com/wuseman/Samsung_Galaxy.A5_FRP.Bypass)
1836 | * [wuseman - Samsung Galaxy S10](https://github.com/wuseman/Samsung_Galaxy.s10_FRP.Bypass)
1837 | * [wuseman - Samsung Galaxy S8](https://github.com/wuseman/Samsung_Galaxy.S8-FRP.Bypass)
1838 | * [wuseman - Samsung Galaxy Xcover 4](https://github.com/wuseman/Samsung.Xcover.4-FrpBypass)
1839 | * [wuseman - Motorola Moto E4 Plus](https://github.com/wuseman/Motorola_Moto_E4.Plus.v7.1-FRP_BYPASS)
1840 | * [wuseman - Huawei MediaTab T5](https://github.com/wuseman/Huawei_Mediatab-T5-FRP-Bypass_V8.0)
1841 | * [wuseman - LG G6](https://github.com/wuseman/LG_G6-FRP-Bypass)
1842 |
1843 |
1844 | ## Similiar websites
1845 |
1846 | #### Gentoo Wiki
1847 |
1848 | * [Gentoo Wiki - ADB](https://wiki.gentoo.org/wiki/Android/adb) (__Maintained by wuseman__)
1849 |
1850 | #### Nr1 / wuseman
1851 |
1852 | * [Nr1 - Your journey to master Android™ Shell begins here](https://android.nr1.nu)
1853 | * [wuseman - ADB Cheatsheet](https://github.com/wuseman/adb-cheatsheet)
1854 | * [Stackoverflow - Bluetooth](https://stackoverflow.com/a/55064471)
1855 |
1856 | #### ADB Shell
1857 |
1858 | *[ADB Shell - Just Another ADB Cheatsheet wiki](https://adbshell.com/commands/adb-install)
1859 |
1860 | #### Android
1861 |
1862 | * [Android™ Developer - Emulator Console](https://developer.android.com/studio/run/emulator-console)
1863 | * [Android™ Developer - Write your app](https://developer.android.com/studio/write)
1864 | * [Android™ Google Source - Source Code](https://android.googlesource.com/)
1865 | * [Android™ Google Source - CMD Command](https://android.googlesource.com/platform/frameworks/native/+/master/cmds/cmd/)
1866 | * [Android™ Generic Project](https://android-generic.github.io/#documentation)
1867 | * [Android™ GDB](https://source.android.com/devices/tech/debug/gdb)
1868 | * [Android™ Source - Understand Logging](https://source.android.com/devices/tech/debug/understanding-logging)
1869 | * [Android™ Source - Network Connectivity Tests](https://source.android.com/devices/tech/connect/connect_tests)
1870 | * [Android™ Platform Tools](https://android.googlesource.com/platform/prebuilts/cmdline-tools/+/34a182b3646de1051ea2c9b23132d073bcaa5087/tools/bin/)
1871 |
1872 | #### Github
1873 |
1874 | * [Github Randorise - Mobile Hacking CheatSheet](https://github.com/randorisec/MobileHackingCheatSheet)
1875 |
1876 | #### Mazhuang
1877 |
1878 | * [Mazhuang - Awesome ADB - Another Cheatsheet Wiki](https://mazhuang.org/awesome-adb/README.en.html)
1879 |
1880 | #### Jfsso
1881 |
1882 | * [Jfsso - Preferences Editor](https://github.com/jfsso/PreferencesEditor)
1883 |
1884 | #### Nahamsec
1885 |
1886 | * [Nahamsec - Resources For Beginner - Bug Bounty Hunters](https://github.com/nahamsec/Resources-for-Beginner-Bug-Bounty-Hunters/blob/master/assets/mobile.md)
1887 |
1888 | #### Raywenderlich
1889 |
1890 | * [Raywenderlich -Forensic Artifacts](https://www.raywenderlich.com/3419415-hack-an-android-app-finding-forensic-artifacts#toc-anchor-002)
1891 |
1892 | #### Noobsec
1893 |
1894 | * [Noobsec - Bypass Fingerprint Lock In Just 1 Second](https://noobsec.org/project/2019-12-22-bypass-fingerprint-lock-in-just-1-second/)
1895 | * [Noobsec - Cara Reverse Engineering](https://noobsec.org/project/2018-11-04-cara-reverse-engineering-apk/)
1896 |
1897 | #### Oracle
1898 |
1899 | * [Oracle- JVMS](https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html)
1900 |
1901 | #### Tjtech
1902 |
1903 | * [Tjtech - Analyze OEM Unlocking Under Android](http://tjtech.me/analyze-oem-unlocking-under-android.html)
1904 |
1905 | #### U'Smile
1906 |
1907 | * [U'Smile - How to change the IMEI on Android devices](https://usmile.at/blog/how-to-change-imei-on-android-devices)
1908 |
1909 | #### XDA Developers
1910 |
1911 | * [Android™ Q Navigation - Gesture Controls](https://www.xda-developers.com/android-q-navigation-gesture-controls/#fitvid892986)
1912 |
1913 | ## Get in Touch
1914 |
1915 | Want your website listed here and you think you have something to contribute?
1916 |
1917 | Send me an email or contact me on ÍRC:
1918 |
1919 | - **iRC**: wuseman@**Libera**
1920 |
1921 | Enter Libera's network via your own client 'chat.libera.chat:+6697 or use their new web client [here](https://web.libera.chat/).
1922 |
1923 | - **Mail**: wuseman@**nr1.nu**
1924 |
1925 | ## Wiki author
1926 |
1927 | - *wuseman **
1928 |
1929 | ## Wiki License
1930 |
1931 | Android Nr1 nu wiki is licensed under the GNU General Public License v3.0 - See the [LICENSE.md](LICENSE.md) file for details
1932 |
1933 | - Happy Hacking!
1934 |
1935 |
--------------------------------------------------------------------------------
/_config.yml:
--------------------------------------------------------------------------------
1 | theme: jekyll-theme-hacker
--------------------------------------------------------------------------------
/at.md:
--------------------------------------------------------------------------------
1 | ### Commands from the legends on below URL
2 |
3 | https://forum.xda-developers.com/t/a-sgs2-serial-how-to-talk-to-the-modem-with-at-commands.1471241/
4 |
5 | ```sh
6 | AT+CAAP 7.25 - Automatic answer for eMLPP Service
7 | AT+CACM 8.25 - Accumulated call meter
8 | AT+CAEMLPP 7.22 - eMLPP Priority Registration and Interrogation
9 | AT+CAHLD 11.1.3 - Leave an ongoing Voice Group or Voice Broadcast Call
10 | AT+CAJOIN 11.1.1 - Accept an incoming Voice Group or Voice Broadcast Call
11 | AT+CALA 8.16 - Alarm
12 | AT+CALCC 11.1.6 - List current Voice Group and Voice Broadcast Calls
13 | AT+CALD 8.38 - Delete alarm
14 | AT+CALM 8.20 - Alert sound mode
15 | AT+CAMM 8.26 - Accumulated call meter maximum
16 | AT+CANCHEV 11.1.8 - NCH Support Indication
17 | AT+CAOC 7.16 - Advice of Charge
18 | AT+CAPD 8.39 - Postpone or dismiss an alarm
19 | AT+CAPTT 11.1.4 - Talker Access for Voice Group Call
20 | AT+CAREJ 11.1.2 - Reject an incoming Voice Group or Voice Broadcast Call
21 | AT+CAULEV 11.1.5 - Voice Group Call Uplink Status Presentation
22 | AT+CBC 8.4 - Battery charge
23 | AT+CBCAP 8.59 - Battery Capacity
24 | AT+CBCHG 8.61 - Battery Charger Status
25 | AT+CBCON 8.60 - Battery Connection Status
26 | AT+CBCS 11.3.2 - VBS subscriptions and GId status
27 | AT+CBKLT 8.51 - Backlight
28 | AT+CBST 6.7 - Select bearer service type
29 | AT+CCFC 7.11 - Call forwarding number and conditions
30 | AT+CCHC 8.46 - Close Logical Channel
31 | AT+CCHO 8.45 - Open Logical Channel
32 | AT+CCLK 8.15 - Clock
33 | AT+CCUG 7.10 - Closed user group
34 | AT+CCWA 7.12 - Call waiting
35 | AT+CCWE 8.28 - Call Meter maximum event
36 | AT+CDIP 7.9 - Called line identification presentation
37 | AT+CDIS 8.8 - Display control
38 | AT+CEAP 8.47 - EAP authentication
39 | AT+CEER 6.10 - Extended error report
40 | AT+CEMODE 10.1.28 - UE modes of operation for EPS
41 | AT+CEPTT 11.1.10 - Short Data Transmission during ongoing VGCS
42 | AT+CEREG 10.1.22 - EPS network registration status
43 | AT+CERP 8.48 - EAP Retrieve Parameters
44 | AT+CFCS 7.24 - Fast call setup conditions
45 | AT+CFUN 8.2 - Set phone functionality
46 | AT+CGACT 10.1.10 - PDP context activate or deactivate
47 | AT+CGATT 10.1.9 - PS attach or detach
48 | AT+CGCLASS 10.1.17 - GPRS mobile station class
49 | AT+CGCLOSP 10.1.13 - Configure local Octet Stream PAD parameters
50 | AT+CGCMOD 10.1.11 - PDP Context Modify
51 | AT+CGCONTRDP 10.1.23 - PDP Context Read Dynamic Parameters
52 | AT+CGCS 11.3.1 - VGCS subscriptions and GId status
53 | AT+CGDATA 10.1.12 - Enter data state
54 | AT+CGDCONT 10.1.1 - Define PDP Context
55 | AT+CGDSCONT 10.1.2 - Define Secondary PDP Context
56 | AT+CGEQOS 10.1.26 - Define EPS Quality Of Service
57 | AT+CGEQOSRDP 10.1.27 - EPS Quality Of Service Read Dynamic Parameters
58 | AT+CGEREP 10.1.19 - Packet Domain event reporting
59 | AT+CGLA 8.43 - Generic UICC Logical Channel access
60 | AT+CGMI 5.1 - Request manufacturer identification
61 | AT+CGMM 5.2 - Request model identification
62 | AT+CGMR 5.3 - Request revision identification
63 | AT+CGREG 10.1.20 - GPRS network registration status
64 | AT+CGSMS 10.1.21 - Select service for MO SMS messages
65 | AT+CGSN 5.4 - Request product serial number identification
66 | AT+CGTFT 10.1.3 - Traffic Flow Template
67 | AT+CGTFTRDP 10.1.25 - Traffic Flow Template Read Dynamic Parameters
68 | AT+CHLD 7.13 - Call related supplementary services
69 | AT+CHSC 6.15 - HSCSD current call parameters
70 | AT+CHSD 6.12 - HSCSD device parameters
71 | AT+CHSR 6.16 - HSCSD parameters report
72 | AT+CHST 6.13 - HSCSD transparent call configuration
73 | AT+CHSU 6.17 - HSCSD automatic user initiated upgrading
74 | AT+CHUP 6.5 - Hangup call
75 | AT+CIMI 5.6 - Request international mobile subscriber identity
76 | AT+CIND 8.9 - Indicator control
77 | AT+CKPD 8.7 - Keypad control
78 | AT+CLAC 8.37 - List all available AT commands
79 | AT+CLAE 8.31 - Language Event
80 | AT+CLAN 8.30 - Set Language
81 | AT+CLCC 7.18 - List current calls
82 | AT+CLCK 7.4 - Facility lock
83 | AT+CLIP 7.6 - Calling line identification presentation
84 | AT+CLIR 7.7 - Calling line identification restriction
85 | AT+CLVL 8.23 - Loudspeaker volume level
86 | AT+CMAR 8.36 - Master Reset
87 | AT+CMEC 8.6 - Mobile Termination control mode
88 | AT+CMEE 9.1 - Report mobile termination error
89 | AT+CMER 8.10 - Mobile Termination event reporting
90 | AT+CMOD 6.4 - Call mode
91 | AT+CMOLR 8.50 - Mobile Originated Location Request
92 | AT+CMOLRE 9.1 - Report mobile originated location request error
93 | AT+CMOLRE 9.3 - Mobile termination error result code
94 | AT+CMTLR 8.57 - Mobile Terminated Location Request notification
95 | AT+CMUT 8.24 - Mute control
96 | AT+CMUX 5.7 - Multiplexing mode
97 | AT+CNAP 7.30 - Calling name identification presentation
98 | AT+CNUM 7.1 - Subscriber number
99 | AT+COLP 7.8 - Connected line identification presentation
100 | AT+COLR 7.31 - Connected line identification restriction status
101 | AT+COPN 7.21 - Read operator names
102 | AT+COPS 7.3 - PLMN selection
103 | AT+COTDI 11.1.9 - Originator to Dispatcher Information
104 | AT+CPAS 8.1 - Phone activity status
105 | AT+CPBF 8.13 - Find phonebook entries
106 | AT+CPBR 8.12 - Read phonebook entries
107 | AT+CPBS 8.11 - Select phonebook memory storage
108 | AT+CPBW 8.14 - Write phonebook entry
109 | AT+CPIN 8.3 - Enter PIN
110 | AT+CPLS 7.20 - Selection of preferred PLMN list
111 | AT+CPNET 7.27 - Preferred network indication
112 | AT+CPNSTAT 7.28 - Preferred network status
113 | AT+CPOL 7.19 - Preferred PLMN list
114 | AT+CPOS 8.55 - Positioning Control
115 | AT+CPOSR 8.56 - Positioning Reporting
116 | AT+CPPS 7.23 - eMLPP subscriptions
117 | AT+CPROT 8.42 - Enter protocol mode
118 | AT+CPSB 7.29 - Current Packet Switched Bearer
119 | AT+CPUC 8.27 - Price per unit and currency table
120 | AT+CPWC 8.29 - Power class
121 | AT+CPWD 7.5 - Change password
122 | AT+CR 6.9 - Service reporting control
123 | AT+CRC 6.11 - Cellular result codes
124 | AT+CREG 7.2 - Network registration
125 | AT+CRLA 8.44 - Restricted UICC Logical Channel access
126 | AT+CRLP 6.8 - Radio link protocol
127 | AT+CRMC 8.34 - Ring Melody Control
128 | AT+CRMP 8.35 - Ring Melody Playback
129 | AT+CRSL 8.21 - Ringer sound level
130 | AT+CRSM 8.18 - Restricted SIM access
131 | AT+CSCC 8.19 - Secure control command
132 | AT+CSCS 5.5 - Select TE character set
133 | AT+CSDF 6.22 - Settings date format
134 | AT+CSGT 8.32 - Set Greeting Text
135 | AT+CSIL 6.23 - Silence Command
136 | AT+CSIM 8.17 - Generic SIM access
137 | AT+CSNS 6.19 - Single numbering scheme
138 | AT+CSQ 8.5 - Signal quality
139 | AT+CSSAC 7.32 - Service Specific Access Control restriction status
140 | AT+CSSN 7.17 - Supplementary service notifications
141 | AT+CSTA 6.1 - Select type of address
142 | AT+CSTF 6.24 - Settings time format
143 | AT+CSVM 8.33 - Set Voice Mail Number
144 | AT+CTFR 7.14 - Call deflection
145 | AT+CTZR 8.41 - Time Zone Reporting
146 | AT+CTZU 8.40 - Automatic Time Zone Update
147 | AT+CUAD 8.49 - UICC Application Discovery
148 | AT+CUSD 7.15 - Unstructured supplementary service data
149 | AT+CVHU 6.20 - Voice Hangup Control
150 | AT+CVIB 8.22 - Vibrator mode
151 | AT+CVMOD 6.4 - Voice Call Mode
152 | AT+FCLASS C.2.1 - Select mode
153 | AT+VBT C.2.2 - Buffer threshold setting
154 | AT+VCID C.2.3 - Calling number ID presentation
155 | AT+VGR C.2.4 - Receive gain selection
156 | AT+VGT C.2.5 - Transmit gain selection
157 | AT+VIP C.2.6 - Initialise voice parameters
158 | AT+VIT C.2.7 - Inactivity timer
159 | AT+VLS C.2.8 - Line selection
160 | AT+VRX C.2.9 - Receive data state
161 | AT+VSM C.2.10 - Select compression method
162 | AT+VTD C.2.12 - Tone duration
163 | AT+VTS C.2.11 - DTMF and tone generation
164 | AT+VTX C.2.13 - Transmit data state
165 | ```
166 |
--------------------------------------------------------------------------------
/previews/adb_mirror.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vaginessa/adb-cheatsheet/8310200a5e431e01964050ff4aa46a3b8a5d4ab6/previews/adb_mirror.gif
--------------------------------------------------------------------------------
/previews/android-wpull-system-apks.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vaginessa/adb-cheatsheet/8310200a5e431e01964050ff4aa46a3b8a5d4ab6/previews/android-wpull-system-apks.gif
--------------------------------------------------------------------------------
/previews/wifi_result.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vaginessa/adb-cheatsheet/8310200a5e431e01964050ff4aa46a3b8a5d4ab6/previews/wifi_result.png
--------------------------------------------------------------------------------
/scripts/wpull-all-apks.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # - iNFO -----------------------------------------------------------------------------
4 | #
5 | # Author: wuseman
6 | # FileName: wpull.sh
7 | # Version: 1.0
8 | #
9 | # Created: 2021-09-14 (18:51:48)
10 | # Modified: 2021-10-15 (02:22:09)
11 | #
12 | # iRC: wuseman (Libera/EFnet/LinkNet)
13 | # Website: https://www.nr1.nu/
14 | # GitHub: https://github.com/wuseman/
15 | #
16 | # - Descrpiption --------------------------------------------------------------------
17 | #
18 | # No description has been added
19 | #
20 | # - LiCENSE -------------------------------------------------------------------------
21 | #
22 | # Copyright (C) 2021, wuseman
23 | #
24 | # This program is free software; you can redistribute it and/or modify
25 | # it under the terms of the GNU General Public License as published by
26 | # the Free Software Foundation; either version 3 of the License, or
27 | # (at your option) any later version.
28 | #
29 | # This program is distributed in the hope that it will be useful,
30 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
31 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 | # GNU General Public License for more details.
33 | #
34 | # You must obey the GNU General Public License. If you will modify
35 | # the file(s), you may extend this exception to your version
36 | # of the file(s), but you are not obligated to do so. If you do not
37 | # wish to do so, delete this exception statement from your version.
38 | # If you delete this exception statement from all source files in the
39 | # program, then also delete it here.
40 | #
41 | # You should have received a copy of the GNU General Public License
42 | # along with this program. If not, see .
43 | #
44 | # - End of Header -------------------------------------------------------------
45 |
46 | line='..............................................'
47 | printf "Please enter path to store the apk files in, path: "; read storagepath
48 | echo ""
49 | mkdir -p $storagepath
50 | cd $storagepath
51 | printf "%61s\n" | tr ' ' '='
52 | printf "Pulling applications installed from playstore..........[\e[0;33mWAIT\e[0m]\n"
53 | printf "%61s\n" | tr ' ' '='
54 |
55 | for package in $(adb shell pm list packages| tr -d '\r' | sed 's/package://g'); do
56 | apk=$(adb shell pm path $package | tr -d '\r' | sed 's/package://g' | cut -d\/ -f4|cut -d- -f1)
57 | apk_real=$(adb shell pm path $package | tr -d '\r' | sed 's/package://g')
58 | printf "Pulling: $apk";
59 | adb pull -p $apk_real "$package".apk &> /dev/null
60 | printf "%s%s[\e[1;32mDONE\e[0m]\n" "${line:${#apk}}"
61 | done
62 | PCKS="$(adb shell pm list packages | tr -d '\r' | sed 's/package://g' | wc -l)"
63 | printf "%61s\n" | tr ' ' '='
64 | printf "Pulled $PCKS apk packages from your device................[\e[1;32mDONE\e[0m]\n"
65 | printf "%61s\n" | tr ' ' '='
66 | exit
67 |
68 |
--------------------------------------------------------------------------------
/scripts/wpull-system-apks.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # - iNFO -----------------------------------------------------------------------------
4 | #
5 | # Author: wuseman
6 | # FileName: wpull.sh
7 | # Version: 1.0
8 | #
9 | # Created: 2021-09-14 (18:51:48)
10 | # Modified: 2021-10-15 (02:22:31)
11 | #
12 | # iRC: wuseman (Libera/EFnet/LinkNet)
13 | # Website: https://www.nr1.nu/
14 | # GitHub: https://github.com/wuseman/
15 | #
16 | # - Descrpiption --------------------------------------------------------------------
17 | #
18 | # No description has been added
19 | #
20 | # - LiCENSE -------------------------------------------------------------------------
21 | #
22 | # Copyright (C) 2021, wuseman
23 | #
24 | # This program is free software; you can redistribute it and/or modify
25 | # it under the terms of the GNU General Public License as published by
26 | # the Free Software Foundation; either version 3 of the License, or
27 | # (at your option) any later version.
28 | #
29 | # This program is distributed in the hope that it will be useful,
30 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
31 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 | # GNU General Public License for more details.
33 | #
34 | # You must obey the GNU General Public License. If you will modify
35 | # the file(s), you may extend this exception to your version
36 | # of the file(s), but you are not obligated to do so. If you do not
37 | # wish to do so, delete this exception statement from your version.
38 | # If you delete this exception statement from all source files in the
39 | # program, then also delete it here.
40 | #
41 | # You should have received a copy of the GNU General Public License
42 | # along with this program. If not, see .
43 | #
44 | # - End of Header -------------------------------------------------------------
45 |
46 | line='..............................................'
47 | printf "Please enter path to store the apk files in, path: "; read storagepath
48 | echo ""
49 | mkdir -p $storagepath
50 | cd $storagepath
51 | printf "%61s\n" | tr ' ' '='
52 | printf "Pulling applications installed from playstore..........[\e[0;33mWAIT\e[0m]\n"
53 | printf "%61s\n" | tr ' ' '='
54 |
55 | for package in $(adb shell pm list packages -s| tr -d '\r' | sed 's/package://g'); do
56 | apk=$(adb shell pm path $package | tr -d '\r' | sed 's/package://g' | cut -d\/ -f4|cut -d- -f1)
57 | apk_real=$(adb shell pm path $package | tr -d '\r' | sed 's/package://g')
58 | printf "Pulling: $apk";
59 | adb pull -p $apk_real "$package".apk &> /dev/null
60 | printf "%s%s[\e[1;32mDONE\e[0m]\n" "${line:${#apk}}"
61 | done
62 | PCKS="$(adb shell pm list packages -s| tr -d '\r' | sed 's/package://g' | wc -l)"
63 | printf "%61s\n" | tr ' ' '='
64 | printf "Pulled $PCKS apk packages from your device................[\e[1;32mDONE\e[0m]\n"
65 | printf "%61s\n" | tr ' ' '='
66 | exit
67 |
68 |
--------------------------------------------------------------------------------
/scripts/wpull-third-party-apks.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # - iNFO -----------------------------------------------------------------------------
4 | #
5 | # Author: wuseman
6 | # FileName: wpull.sh
7 | # Version: 1.0
8 | #
9 | # Created: 2021-09-14 (18:51:48)
10 | # Modified: 2021-10-15 (02:22:02)
11 | #
12 | # iRC: wuseman (Libera/EFnet/LinkNet)
13 | # Website: https://www.nr1.nu/
14 | # GitHub: https://github.com/wuseman/
15 | #
16 | # - Descrpiption --------------------------------------------------------------------
17 | #
18 | # No description has been added
19 | #
20 | # - LiCENSE -------------------------------------------------------------------------
21 | #
22 | # Copyright (C) 2021, wuseman
23 | #
24 | # This program is free software; you can redistribute it and/or modify
25 | # it under the terms of the GNU General Public License as published by
26 | # the Free Software Foundation; either version 3 of the License, or
27 | # (at your option) any later version.
28 | #
29 | # This program is distributed in the hope that it will be useful,
30 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
31 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 | # GNU General Public License for more details.
33 | #
34 | # You must obey the GNU General Public License. If you will modify
35 | # the file(s), you may extend this exception to your version
36 | # of the file(s), but you are not obligated to do so. If you do not
37 | # wish to do so, delete this exception statement from your version.
38 | # If you delete this exception statement from all source files in the
39 | # program, then also delete it here.
40 | #
41 | # You should have received a copy of the GNU General Public License
42 | # along with this program. If not, see .
43 | #
44 | # - End of Header -------------------------------------------------------------
45 |
46 | line='..............................................'
47 | printf "Please enter path to store the apk files in, path: "; read storagepath
48 | echo ""
49 | mkdir -p $storagepath
50 | cd $storagepath
51 | printf "%61s\n" | tr ' ' '='
52 | printf "Pulling applications installed from playstore..........[\e[0;33mWAIT\e[0m]\n"
53 | printf "%61s\n" | tr ' ' '='
54 |
55 | for package in $(adb shell pm list packages -3| tr -d '\r' | sed 's/package://g'); do
56 | apk=$(adb shell pm path $package | tr -d '\r' | sed 's/package://g' | cut -d\/ -f4|cut -d- -f1)
57 | apk_real=$(adb shell pm path $package | tr -d '\r' | sed 's/package://g')
58 | printf "Pulling: $apk";
59 | adb pull -p $apk_real "$package".apk &> /dev/null
60 | printf "%s%s[\e[1;32mDONE\e[0m]\n" "${line:${#apk}}"
61 | done
62 | PCKS="$(adb shell pm list packages -3 | tr -d '\r' | sed 's/package://g' | wc -l)"
63 | printf "%61s\n" | tr ' ' '='
64 | printf "Pulled $PCKS apk packages from your device................[\e[1;32mDONE\e[0m]\n"
65 | printf "%61s\n" | tr ' ' '='
66 | exit
67 |
68 |
--------------------------------------------------------------------------------
/uusd_codes.md:
--------------------------------------------------------------------------------
1 | ```console
2 | --------------------------------------------------------------------------------------------------------------------------------
3 | # UUSD CODES
4 | --------------------------------------------------------------------------------------------------------------------------------
5 | *#06# ## Displays IMEI number
6 | *#*#225#*#* ## Calendar Info
7 | *#*#426#*#* ## Google Play Services
8 | *#*#1357946#*#* ## EMUI version, Serial Number and Product ID
9 | *#*#2846579#*#* ## Background Settings, Veneer information, Network Information Query, Software Upgrade, Restore Factory, Battery Charge
10 | *#*#2846#*#* ## MMI Audio Simple test
11 | *#2846# ## MMI Manu Normal test
12 | *#*#1472365#*#* ## Quick GPS Test
13 | *#*#1575#*#* ## A Different Type GPS Test
14 | *#*#0*#*#* ## Android Device LCD display test
15 | *#*#0842#*#* ## Vibration and Backlight test
16 | *#*#2664#*#* ## Android Device Touch-Screen test
17 | *#*#0588#*#* ## Proximity sensor test
18 | *#*#7262626#*#* ## Device Field test
19 | *#*#232339#*#* ## Device Wireless Lan Test
20 | *#*#526#*#* ## Device Wireless Lan Test
21 | *#*#0289#*#* ## Device Audio test
22 | *#*#0673#*#* ## Device Audio test
23 | *#*#232331#*#* ## Device Bluetooth test
24 | *#*#0283#*#* ## Packet Loopback test
25 | *#*#34971539#*#* ## Shows complete information about the Device camera
26 | *#*#2663#*#* ## The displays touch-screen version of Android device
27 | *#*#3264#*#* ## Android Device Ram version*#06# Displays IMEI number
28 | *#*#232337#*# ## Displays Bluetooth device address
29 | *#*#232338#*#* ## Displays Wi-Fi Mac-address
30 | *#*#1234#*#* ## PDA and Device firmware info
31 | *#*#1111#*#* ## FTA Software version
32 | *#*#2222#*#* ## FTA Hardware version
33 | *#*#44336#*#* ## Displays Build time and change list number
34 | *#*#7780#*#* ## Reset Android device. Erase all your device data like photos, apps, and settings etc.
35 | *2767*3855# ## It will also Format all your device data and reinstall Android Device firmware.
36 | *#*#273283*255*663282*#*#* ## For a quick backup to all your media files
37 | *#*#7594#*#* ## Changing the power button behavior – Enables direct power off once you try this code
38 | *#*#8255#*#* ## For Google Talk service monitoring
39 | *#*#8351#*#* ## Enables voice dialing logging mode
40 | *#*#8350#*#* ## Disables voice dialing logging mode
41 | ##778 (+call) ## Brings up Epst menu
42 | *#*#197328640#*#* ## Enabling test mode for service activity
43 | *#*#4986*2650468#*#* ## PDA, Phone, Hardware, RF Call Date firmware information
44 | *#*#64663#*#* ## QC test
45 | *#*#759#*#* ## Rlz Debug Ul
46 | ```
47 |
--------------------------------------------------------------------------------