8
votes
Accepted
Stock Android always using 100% physical memory. How to free it up with ADB?
Android memory management works differently than traditional OS. The main principle is to keep apps in RAM even if they are not used at the moment because the OS never knows when the user switches ...
5
votes
How do you pair a Device for Wireless Debugging with a QR Code?
This answer explains the technology used and 3rd-party software. For background history of the built-in feature in Android Studio, you can read my answer here.
Android 11 and ADB utilize multicast ...
4
votes
Getting "java.lang.SecurityException: Shell does not have permission to access user 150" when uninstalling apps from Samsung Secure folder using ADB
Uninstall the Samsung Secure Folder from the Settings.
Settings -> Lock screen and security -> Secure Folder -> Enter your lock details -> Uninstall.
Refer to this blog.
4
votes
Obtain package name AND common name of apps via ADB
Push the given script to Android device and run:
adb push list_app_labels.sh /data/local/tmp/ && adb shell sh /data/local/tmp/list_app_labels.sh
It should print the UID, package name and app ...
3
votes
Is there a universal ADB interface for microcontrollers?
I never heard of it before. Pretty interesting.. and also a great website (talking of the content lol)
This is a partial answer - About the inactive links
Seeing that the website was working, I was ...
3
votes
Disabling Android swap with ADB `swapoff`
most Android devices do not have a swap area like typical operating systems do. Instead, Android manages memory differently, using techniques such as zRAM and low-memory killers to manage memory ...
2
votes
How to pull only newer files with “adb pull”? (Android SDK utility)
Though not fully documented, starting with 27.0.1 aka platform tools r27 (not before) the following can be used:
adb push --sync local/ device/
# adb pull --sync -a device/. local/
(note the trailing ...

Izzy♦
- 90.6k
2
votes
Get IMEI number with ADB command
esim imei is available via:
input keyevent KEYCODE_CALL;
sleep 1;
input text '*#06#';
uiautomator dump --compressed /dev/stdout\
|tr ' ' '\n'\
|awk -F'"' '{print $2}'|grep "^[0-9]\{...
2
votes
Enabling Wireguard tunnel through ADB shell
This is the most reliable way that I have found:
am broadcast -a com.wireguard.android.action.SET_TUNNEL_UP -n 'com.wireguard.android/.model.TunnelManager$IntentReceiver' -e tunnel <tunnel_name>
...
2
votes
Does "adb shell settings put secure location_mode 0" reliably turn off/disable GPS?
The location_mode of the Secure settings will disable the Location service until it will be turned on on the settings or by changing the value of the key location_mode. (Checks if location is enabled, ...
2
votes
How to flash something if the data partition is encrypted?
First, let's clarify the terms 'decrypted' and 'unencrypted':
When data on the phone is encrypted, one must (online) decrypt it with the proper PIN/pattern/password in order to access files.
When ...
2
votes
Accepted
How to flash something if the data partition is encrypted?
TWRP (Recommended)
TWRP allows you to temporarily decrypt your data by using your phone's password
Why is this solution recommended?
Flashing incidents
I was trying to uninstall NikGapps by renaming ....
2
votes
How can I reset the WindowManager resolution and DPI settings in the Google TV user selection screen?
The issue is caused by a problematic resolution setting. When the resolution is set to 4K with a command like wm size 3840x2160, the WindowManager resolution stays at 1080p, but halves the emulated ...
2
votes
Accepted
How do I upgrade an Android phone's version from my pc
Unlocked Bootloader
I rooted early on, and then didn't for a long time. Being a computer power user, it is hard to wrap my head around all the restrictions I have to endure on my miniature computer ...
2
votes
Accepted
How to open an app using ADB?
You can use an app like Activity Launcher
and if the app shows no activity to launch, that means in the process of decompiling you destroyed the app's ability to be launched.
And if you want to start ...
2
votes
adb pull not honoring trailing slash, push ignores permissions
Took me almost a full day to find a partly solution rather by accident. While adding a wildcard (adb pull /sdcard/Documents/*) just leads to an error, adding a dot leads to the intended result:
adb ...

Izzy♦
- 90.6k
2
votes
Backup/Restore SMS/MMS via ADB on a non-rooted device?
Partial answer at least, covering the backup part: you can obtain your SMS with e.g.
adb ${ADBOPTS} shell "content query --uri content://sms/ --projection ${projection}" > sms.lst
where $...

Izzy♦
- 90.6k
2
votes
Getting "java.lang.SecurityException: Shell does not have permission to access user 150" when uninstalling apps from Samsung Secure folder using ADB
I've encountered the same messages after trying to get to the list of packages. Nonetheless, knowing the name of the package, I was able to get rid of bloatware using the standard pm uninstall -k --...
2
votes
How to use `adb push` after mounting /system R/W without losing R/W permissions to install app as /system/apps?
adb push is never affected from calling su from within a shell.
If you execute su within a shell a new shell instance is created that get the root permissions.
However adb push does not use a shell at ...
1
vote
"Neither user 2000 nor current process has android.permission.GRANT_RUNTIME_PERMISSIONS" when using `adb shell pm grant` command
For Oppos Color OS 12.1 (Android 12) this worked for me:
I disabled the option (sorry: it's German): "Über USB installierte Apps prüfen" (probably "Check apps installed via USB"):
...
1
vote
Accepted
My Android TV seems to be rebooting frequently in sleep mode and causing ADB to be disconnected, why?
Figured it out myself.
The TV has three modes for remote power on:
Off
Through network
Through application (ADB)
If you choose the third option, the TV periodically "pre-power on" itself ...
1
vote
Accepted
Is there a way to permanently delete specific (phantom) alarms using adb shell?
OK, it turns out that the service call did work, as far as I can tell. I just needed to tweak the command a little.
Most important thing was to correctly determine the ID of the alarm. Using the link ...
1
vote
Accepted
ADB sideload regularly loads LineageOS ROM, but gets stuck at 0% with stock firmware, why?
Not every ZIP file can be side-loaded.
I am not sure what properties need to be fulfilled by an ZIP file that can be side-loaded.
One indicator is the existence of the directory META-INF/com/google/...
1
vote
Accepted
What might prevent ADB from writing to a Settings.Secure key?
Problem solved. I had the app SystemUI Tuner installed, which can manage such settings and apparently had a way to make its own preferences persist even if a setting were changed by another method, ...
1
vote
Accepted
adb server stutters ubuntu desktop
Okay, so I ended up connecting the mouse using a USB dongle instead of built-in Bluetooth. Not a solution to the initial problem, but anyway, this is a note for somebody who faces similar issues.
1
vote
Accepted
How to chose an Android device for testing software?
The simplest solution is to use a 'phone based on a SoC that uses sufficiently little power that it can stay fully charged while running its CPU full-time. This is much easier if there's no need for ...
1
vote
Accepted
root - Can't edit hosts file
Thank you everyone for your help.
I managed to edit the hosts file successfully and changes are still intact even after removing Magisk and root.
This is what I did:
Important. Very very important:
...
1
vote
Cannot disable the clipboard history feature on Samsung galaxy device
So I found out a workaround. Please Backup everything before doing this!
Install openboard -> make it your default keyboard -> uninstall com.samsung.clipboardsaveservice using adb -> ...
1
vote
Accepted
"media: inaccessible or not found" error when attempting to control device volume via ADB
To send adb command to Android 11 or 12 devices, the syntax of controlling volume has changed:
adb shell cmd media_session volume --set 10
This is used to set the volume at 10 — just replace 10 with ...
1
vote
assert failed: asus.verify_modem
I've found a workaround that might be useful. It worked with me using the Asus Zenfone Max Pro M1. I was having the exact same error using the latest Lineage version lineage-19.1-20221115-nightly-...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
adb × 2296fastboot × 227
shell × 186
backup × 181
recovery-mode × 163
root-access × 142
usb-debugging × 120
rooting × 102
twrp × 100
linux × 95
usb × 87
applications × 79
cyanogenmod × 75
data-recovery × 72
broken-screen × 69
samsung × 68
bootloader × 65
command-line × 58
rom-flashing × 57
boot-loop × 57
usb-drivers × 56
restore × 53
windows × 51
wi-fi × 49
installation × 46