CODE MASTER

Software Engineering & Technology Articles

Top Android ADB commands You Should Know

Top Android ADB commands You Should Know

🕑 6 mins

Android Debug Bridge (ADB) is one of the most powerful tools available for Android developers and power users. Whether you’re installing apps, debugging issues, pulling files, or tweaking system settings, ADB gives you full control over any connected Android device.

This guide provides a complete, organized, and practical collection of essential ADB commands perfect as a quick reference for Android developers & Geeks.

1. ADB Basics

Show Connected Devices
Bash
adb devices
Select a Specific Device
Bash
adb -s {device_serial} shell

2. ADB Server Commands

Start the ADB Server
Bash
adb start-server
Stop the ADB Server
Bash
adb kill-server

3. Power & Reboot Controls

Reboot Normally
Bash
adb reboot
Reboot into Recovery Mode
Bash
adb reboot recovery
Reboot into Bootloader
Bash
adb reboot bootloader
Shutdown Device
Bash
adb shell reboot -p
Reboot to Fastboot Mode
Bash
adb reboot fastboot

4. Logcat Debugging

View Logcat Output
Bash
adb logcat
Clear Logcat
Bash
adb logcat -c
Filter Logcat by Tag
Bash
adb logcat -s {tag_name}
Filter by Priority (Warnings & Errors Only)
Bash
adb logcat *:W
Tag + Priority Filter
Bash
adb logcat {tag_name}:E
Save Logcat to a File
Bash
adb logcat -d > logcat.txt

5. Managing Apps & APKs

Install an APK
Bash
adb install Documents/apps/myApp.apk
Uninstall an App
Bash
adb uninstall com.example.app

6. Device Information Commands

Get All Device Properties
Bash
adb shell getprop
Get Device Model
Bash
adb shell getprop ro.product.model
Get Android Version
Bash
adb shell getprop ro.build.version.release
Get Serial Number
Bash
adb shell getprop ro.serialno

7. Network Commands

Show IP Route
Bash
adb shell ip route
Ping a Host
Bash
adb shell ping -c 4 google.com
View Active Internet Connections
Bash
adb shell netstat

8. File Management

Push File to Device
Bash
adb push localfile.txt /sdcard/Download/
Pull File from Device
Bash
adb pull /sdcard/Download/remotefile.txt ./localdir/
List Files
Bash
adb shell ls /sdcard/Download/
Create Directory
Bash
adb shell mkdir /sdcard/NewDirectory
Delete a File
Bash
adb shell rm /sdcard/Download/unwantedfile.txt

9. Removing Cache & Temp Files

Clear All System Caches
Bash
adb shell pm trim-caches 128G
Clear App Cache
Bash
adb shell rm -rf /sdcard/Android/data/com.example.app/cache/*
Clear App Data
Bash
adb shell pm clear com.example.app

10. Screen Recording & Screenshots

Take Screenshot
Bash
adb shell screencap /screenshot.png
Start Screen Recording
Bash
adb shell screenrecord /screenrecord.mp4
Stop Recording

Press:

CTRL + C

11. Backup & Restore

Backup Device (Settings + Apps)
Bash
adb backup -apk -all -f backup.ab
Backup Apps + Shared Storage
Bash
adb backup -apk -shared -all -f backup.ab
Backup Only Non-System Apps
Bash
adb backup -apk -nosystem -all -f backup.ab
Restore Backup
Bash
adb restore backup.ab

12. UI Custom Animation Tweaks

Change scale values for faster or smoother animations.

Bash
adb shell settings put global animator_duration_scale 0.70
adb shell settings put global window_animation_scale 0.50
adb shell settings put global transition_animation_scale 0.50

13. High Performance Tweak

Bash
adb shell settings put system peak_refresh_rate 120.0
adb shell settings put system min_refresh_rate 120.0
adb shell setprop debug.force-opengl 1
adb shell setprop debug.hwc.force_gpu_vsync
adb shell settings put system multicore_packet_scheduler 1
adb shell settings put global sem_enhanced_cpu_responsiveness 1
adb shell cmd power set-fixed-performance-mode-enabled true

MORE Articles

Share

Rate This

Post Rating: 3/5

Be the first to rate this post.