This document provides information on various ADB commands that can be used for activity management, package management, capturing screenshots and videos, injecting touch events, updating and debugging Android devices, analyzing memory usage, and filtering logcat logs. It lists commands for starting and stopping activities and services, sending broadcasts, switching users, installing and uninstalling apps, enabling and disabling apps, capturing screenshots and screen recordings, injecting touch events and text, mounting and updating the system partition, changing window size and density, dumping system services for debugging, finding the top activity, checking battery stats and memory usage over time, and filtering logcat by level and buffer.
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Important adb commands
1. 1
Activity Manager
1. Adb shell am start - start activity
2. Adb shell am startservice or stopservice - start or stop service
3. Adb shell am broadcast – send broadcast
4. Adb shell switch-user <UID> - switch between users
Package Manager
1. Adb shell pm list packages or users or permissions
2. Adb shell pm install or uninstall
3. Adb shell pm enable or disable
4. Adb shell pm hide or unhide
5. Adb shell pm create-user or remove-user
Snapshot
1. Adb shell screencap <filepath> - screen shot
2. Adb shell screenrecord <filepath> - record video
ADB
2. 2
Inject Events
1. Adb shell input tap x, y
2. Adb shell swipe <x1> <y1> <x2> <y2>
3. Adb shell input keyevent <Key Code> Ex. Backbut-4, Lock-26
4. Adb shell input text www.google.com -> ill update the current foucs edittext
Update
1. Mount -> adb shell mount -o remount,rw /system
2. UnMount -> adb shell mount -o remount,ro /system
3. Adb push or pull
4. adb shell getprop
model/version.sdk/manufacturer/hardware/platform/serialno/product.name/brand
Window Manager
1. Adb shell wm size WxH – change window size
2. Adb shell wm density
ADB
3. 3
Dumpsys
1. dumpsys SurfaceFlinger – to analyse different layers
Find Top Activity
1. dumpsys window windows | findstr mCurrentFocus
2. dumpsys activity activities
3. adb shell "dumpsys activity | grep top-activity"
4. dumpsys activity recents | find "Recent #0"
Battery
1. dumpsys batterystats
2. dumpsys batterystats --charged <package-name>
Memory
1. dumpsys meminfo <packageName> - Mermory usage
for system memory -> dumpsys meminfo system
2. dumpsys procstats --hours 3 - Memory usage over time
ADB
4. 4
Dumpsys
1. dumpsys cpuinfo - cpu inforamtion
2. dumpsys account – all acounts
3. dumpsys alarm – list of alarams present
4. dumpsys audio - audio information
5. dumpsys dbinfo – data base information
6. dumpsys gfxinfo <packageName> - graphics information
Logcat
1. adb logcat
2. adb logcat –c
3. adb logcat -b <buffer> i.e radio,events,main
4. Top –m 5
ADB
5. 5
1. adb logcat *:V -> lowest priority, filter to only show Verbose level
2. adb logcat *:D -> filter to only show Debug level
3. adb logcat *:I -> filter to only show Info level
4. adb logcat *:W -> filter to only show Warning level
5. adb logcat *:E -> filter to only show Error level
6. adb logcat *:F -> filter to only show Fatal level
7. adb logcat *:S -> Silent, highest priority, on which nothing is ever printed
8. adb logcat -f -> test.logs Writes log message output to test.logs .
9. adb logcat -g -> Prints the size of the specified log buffer and exits.
10. adb logcat -n <count> -> Sets the maximum number of rotated logs to <count>.
ADB Logcat filter