Android ADB (Android Debug Bridge) interesting commands. Through the ADB you can change hidden settings of your Android phone, you can also set hidden themes or change screen resolution
I am not responsible for any damage to your device
Most of these settings below are permanent and will not be reset after rebooting
Root not required (at least, for most of commands)
- ADB Commands:
- https://gist.github.com/Pulimet/5013acf2cd5b28e55036c82c91bd56d8
- https://adbshell.com/commands/adb-shell-getprop
- https://adbinstaller.com/commands/adb-shell-settings-5b670d5ee7958178a2955536
- https://source.android.com/docs/automotive/hmi/car_ui/appendix
- https://source.android.com/docs/core/runtime/rro-troubleshoot
- https://xdaforums.com/t/adb-performance-commands-update.4602209/#post-88712379
- https://gitlab.com/LineageOS/issues/android/-/issues/5857#note_1389114228
- https://xdaforums.com/t/guide-oneplus-3-custom-tasker-shell-commands.3571732
- Set Themes:
- https://4pda.to/forum/index.php?showtopic=964846&st=260#entry103344844
- https://youtu.be/sOVL-XOKVdU?t=23
- Set Screen Sizes:
- https://stackoverflow.com/questions/7527459/how-to-get-the-android-device-screen-size-from-the-adb-command-line
- https://stackoverflow.com/questions/13451231/how-to-resize-physical-android-screen-from-terminal-shell
- https://xdaforums.com/t/help-screen-size-notch-rounded-corners-change.4298929/#post-85277389
- Scaling Screen Calculators:
- https://ciox.ru/calculator-ppi-dpi
- https://bneijt.nl/pr/resolution-scale-calculator
- https://site05.ru/services/ratio
- https://displaysdb.ru/services/aspectratio
- Disable Sensors (Android 10):
- https://www.iguides.ru/main/os/kak_otklyuchit_vse_datchiki_slezheniya_na_smartfone_s_android_10
- ADB Shell Settings Descriptions:
- https://joaoapps.com/AutoApps/Help/Info/com.joaomgcd.autotools/com.joaomgcd.autotools.activity.ActivityConfigsettings.html
- http://opensource.hcltechsw.com/volt-mx-native-function-docs/Android/android.provider-Android-10.0/source/Global.html
- https://cyanogenmod.github.io/cm_platform_sdk/reference/cyanogenmod/app/PartnerInterface.html
- https://android.googlesource.com/platform/frameworks/base/+/oreo-mr1-release/core/java/android/provider/Settings.java
- https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/provider/Settings.java
- https://chromium.googlesource.com/android_tools/+/2403/sdk/sources/android-22/android/provider/Settings.java
- https://android.googlesource.com/platform/frameworks/base/+/4f868ed/core/java/android/provider/Settings.java
- https://android.googlesource.com/platform/frameworks/base/+/9a0581c0c9df6bb2c4e925b0ee0e9b3b746f786a/core/java/android/provider/Settings.java
- Disable Fingerprint Animation on Lockscreen:
- https://xdaforums.com/t/guide-remove-fingerprint-animation-for-faster-unlock.3966514/page-3#post-83100401
- https://4pda.to/forum/index.php?showtopic=951615&st=1260#entry88771908
- Disable Fingerprint Vibration on Lockscreen:
- https://xdaforums.com/t/how-to-disable-vibrations-on-unlocking-the-phone-via-fingerprint-scanner.4065281/#post-82601961
- https://4pda.to/forum/index.php?showtopic=951615&st=11840#entry95418783
- Hide Notch (install version 34):
- https://play.google.com/store/apps/details?id=com.xda.nachonotch&hl=ru&gl=US
- https://apkpure.com/ru/nacho-notch-%E2%80%94-notch-hider/com.xda.nachonotch/download/34
- https://xdaforums.com/t/non-root-fit-status-bar-with-notch.3838646/#post-77535456
- https://xdaforums.com/t/show-hide-notch-solution.4032081/#post-81442883
- Enable hidden camera options:
- https://fossbytes.com/xiaomi-device-experimental-camera-features
- https://xiaomiui.net/what-is-the-camera2api-how-to-enable-it-4051
- Fixing video playing on chromium:
- https://www.lifewire.com/hardware-acceleration-in-chrome-4125122
- https://dzen.ru/a/ZAtzs8VOKEDcHfBr?sso_failed=blocked&uuid=02b98c0d-141e-46d1-86ee-dee1023da4ec
- Fixing ghost touches (touchscreen sensitivity):
- https://xdaforums.com/t/fix-ghost-touches-touch-sensitivity.3730988
- https://techtrickz.com/how-to/fix-ghost-touch-problem-on-android
- https://xdaforums.com/t/touchscreen-issues.2875959/page-2#post-59979020
- https://xiaomi.eu/community/threads/xiaomi-mi-9-ghost-touch-issue.51043/#post-503263
- https://xdaforums.com/t/fix-multi-touch-ghost-touch-issue.3837453
- https://fan-android.com/instructions/4909-kak-ustranit-fantomnye-nazhatija-na-smartfonah-xiaomi.html
- https://support.google.com/accessibility/android/answer/6006989?hl=en
General ADB commands:
# Check plugged-in android (ADB) devices
adb devices
# Enter android device shell
adb shell
# Show android Activity Manager commands
adb shell am
# Show android Window Manager commands
adb shell wm
# Show android cmd's
adb shell cmd
# Show android overlay cmd's
adb shell cmd overlay
# Show list of android overlay settings
adb shell cmd overlay list
# Show android settings help
adb shell settings
# Show list of android system settings
adb shell settings list system
# Show list of android secure settings
adb shell settings list secure
# Show list of android global settings
adb shell settings list global
# Show list of props (build.prop)
adb shell getprop
Manipulating with props (build.prop):
# Show list of props
adb shell getprop
# Show types of props
adb shell getprop -T
# Show value of entered prop
adb shell getprop <prop>
# Show type of value for entered prop
adb shell getprop -T <prop>
# Enter a value for chosen prop
adb shell setprop <prop> <value>
Manipulating with settings:
# ADB-settings has a 3 default/different types of settings: system, secure, global
# Show list of settings for entered type
adb shell settings list <type>
# Show value of entered setting
adb shell settings get <type> <setting>
# Enter a value for chosen setting
adb shell settings put <type> <setting> <value>
# Example for enabling/disabling seconds in clocks:
adb shell settings put secure clock_seconds 1
adb shell settings put secure clock_seconds 0
Manipulating with themes/overlay:
# Show all possible settings for your device
adb shell cmd overlay list
# Enable entered setting
adb shell cmd overlay enable <setting>
# Disable entered setting
adb shell cmd overlay disable <setting>
# Example for enabling/disabling black-colored theme:
adb shell cmd overlay enable com.android.theme.color.black
adb shell cmd overlay disable com.android.theme.color.black
# NOTE that there is many mutually exclusive settings (like icon packs), then you need firstly disable recently chosen setting like:
adb shell cmd overlay disable com.android.theme.icon.roundedrect
adb shell cmd overlay enable com.android.theme.icon.squircle
Enable Camera2API (HAL3) with build.prop:
# NOTE that it may require root permissions
# For enabling:
adb shell setprop persist.camera.HAL3.enabled 1
adb shell setprop vendor.persist.camera.HAL3.enabled 1
# For disabling
adb shell setprop persist.camera.HAL3.enabled 0
adb shell setprop vendor.persist.camera.HAL3.enabled 0
For changing screen resolution:
# NOTE that it will 100% cause artifacts (while on boot for example)
# May increase battery life
# Check current values
adb shell wm size
adb shell wm density
# For your phone you should calculate scaling resolutions and DPI/PPI (links on top)
# For Mi A2 0.5x scaling example:
adb shell wm size 540x1080
adb shell wm density 240
# Reset values
adb shell wm size reset
adb shell wm density reset
For changing screen workspaces relative to its edges:
# If you faced with not working screen workspaces on edges
# The numbers are organised: LEFT,TOP,RIGHT,BOTTOM
# The numbers can be also negative
# Example for raise bottom workspace to 50px
adb shell wm overscan 0,0,0,50
# For reset values
adb shell wm overscan 0,0,0,0
# Or
adb shell wm overscan reset
Disable fingerprint animation:
# It will only work if your phone has an in-screen fingerprint scanner
# May make it work faster
# Values are from 0 (full) to 4 (disabled)
# For disable animation
adb shell settings put system fod_animation_type 4
# For enable animation
adb shell settings put system fod_animation_type 0
Disable fingerprint vibrations:
# NOTE that it will totally disable all system vibrations
# For disabling:
adb shell settings put system haptic_feedback_intensity 0
adb shell settings put system haptic_feedback_enabled 0
# For enabling:
adb shell settings put system haptic_feedback_intensity 1
adb shell settings put system haptic_feedback_enabled 1
Enable seconds in clocks:
# For enabling:
adb shell settings put secure clock_seconds 1
# For disabling:
adb shell settings put secure clock_seconds 0
Disable double tap to wake:
# For disabling:
adb shell settings put secure double_tap_to_wake 0
# For enabling:
adb shell settings put secure double_tap_to_wake 1
Disable wake gesture:
# For disabling:
adb shell settings put secure wake_gesture_enabled 0
# For enabling:
adb shell settings put secure wake_gesture_enabled 1
Fixing hiding notch:
# Works on OnePlus androids
# For fixing hiding notch on your phone you can try these commands
adb shell settings put secure display_cutout_hide_notch 1
adb shell settings put system op_camera_notch_ignore 1
Other interesting settings for battery life:
adb shell settings put system dim_screen 1
adb shell settings put secure doze_enabled 1
adb shell settings put global zen_mode 1
# You can also try these undocummented commands:
adb shell settings put secure hide_pocket_mode_settings 0
adb shell settings put secure hide_virtual_hd_voice_menu_settings 0
adb shell settings put system fod_vibration 0
adb shell settings put secure fod_vibration 0
adb shell settings put system double_tap_to_wake 0
adb shell settings put secure double_tap_to_wake 0
adb shell settings put system double_tap_to_wake_enabled 0
adb shell settings put secure double_tap_to_wake_enabled 0
adb shell settings put system pocket_mode 1
adb shell settings put secure pocket_mode 1
adb shell settings put system pocket_mode_enabled 1
adb shell settings put secure pocket_mode_enabled 1
My own fast-copypaste commands:
# NOTE that you shouldn't use them for yourself
# For Mi A2
adb shell setprop debug.enable-vr-mode 0
adb shell setprop debug.hwc.force_gpu_vsync 1
adb shell setprop persist.camera.HAL3.enabled 1
adb shell setprop vendor.persist.camera.HAL3.enabled 1
adb shell wm size 540x1080
adb shell wm density 240
adb shell settings put system fod_animation_type 4
adb shell settings put system haptic_feedback_intensity 0
adb shell settings put system haptic_feedback_enabled 0
adb shell settings put secure double_tap_to_wake 0
adb shell settings put secure wake_gesture_enabled 0
adb shell settings put system dim_screen 1
adb shell settings put secure doze_enabled 1
adb shell settings put global zen_mode 1
adb shell settings put secure hide_pocket_mode_settings 0
adb shell settings put secure hide_virtual_hd_voice_menu_settings 0
adb shell settings put system fod_vibration 0
adb shell settings put secure fod_vibration 0
adb shell settings put system double_tap_to_wake 0
adb shell settings put secure double_tap_to_wake 0
adb shell settings put system double_tap_to_wake_enabled 0
adb shell settings put secure double_tap_to_wake_enabled 0
adb shell settings put system pocket_mode 1
adb shell settings put secure pocket_mode 1
adb shell settings put system pocket_mode_enabled 1
adb shell settings put secure pocket_mode_enabled 1