Hot answers tagged

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 ...
Robert's user avatar
  • 19.7k
6 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.
Ashwin's user avatar
  • 71
4 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 ...
user1874594's user avatar
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 ...
44yu5h's user avatar
  • 1,520
3 votes
Accepted

termux: running termux via adb without *any* direct interaction with the device?

You can use run-as to access your Termux environment from adb without root or ssh. Run adb shell and then: run-as com.termux files/usr/bin/bash -lic 'export PATH=/data/data/com.termux/files/usr/bin:$...
josh3736's user avatar
  • 288
3 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's user avatar
  • 91.1k
3 votes

`adb shell mv` moves files but app doesn't work anymore, while it works if I move the same files via file manager

Your main problem is that you move files and folder between special sections of the file-system: from app-private folder where only the app has access to /sdcard a special folder where you can not ...
Robert's user avatar
  • 19.7k
2 votes

Obtain package name AND common name of apps via ADB

None of the suggestions were particularly good for me, so after some fiddling, here's my 100% on-device solution using Termux: Get Termux and install adb and aapt through its package manager: pkg ...
NeatNit's user avatar
  • 173
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> ...
baltpeter's user avatar
  • 121
2 votes

Enable USB debugging through recovery mode and ADB sideload

Do those steps above. However, when you get adb access on the phone, use it to rm the gesture or passwd file located in /system/system_ext/etc/passwd. This will remove the lock when you use it. Just ...
Kyle Eckhoff's user avatar
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 ...
Robert's user avatar
  • 19.7k
2 votes

How to back up OSMAnd favourites using ADB?

As mentioned in a comment relating to the export issue mentioned above, there is a working solution to this: Open OSMAnd+ Click the hamburger menu Click Settings Click OsmAnd settings Click Data ...
l0b0's user avatar
  • 421
1 vote

Samsung Galaxy Tab 2 running Lineage OS not rebooting properly after `adb reboot` unless USB disconnect

Well, I own multiple Samsung devices, but Samsung uses a custom boot process. It uses more like a custom uboot image than a standard Android boot process. Second, you will need a Samsung driver. From ...
Adrian Coanda's user avatar
1 vote
Accepted

How can I find CID from ADB shell?

It's possible to get cid info with following command. adb shell getprop|grep cid $adb shell getprop|grep cid [ro.boot.cid]: [HTC__M27]
maxemilian's user avatar
1 vote

Disabling Android swap with ADB `swapoff`

At least since Pie, it may be possible to disable swap with: adb shell settings put global zram_enabled 0
mirh's user avatar
  • 357
1 vote
Accepted

ROOT: How to allow "install unknown apps" by default for an app?

I found the solution using appops. adb shell appops set <package name> REQUEST_INSTALL_PACKAGES allow I haven't tested this for unrooted devices but it definitely works for my rooted device.
Eric's user avatar
  • 111
1 vote
Accepted

Limiting Display Frame Rate to Lower

Android 13 had a feature to lower the frame rate called Game Mode interventions. However, it is only limited to games app category, and not system-wide work. Some manufacturers may use this feature or ...
Agus Fadillah Sani's user avatar
1 vote

ADB Wifi loses connection when device's screen turns off - Realme 7 - Android 10

It's a bug in the rom in some kinds of android devices, apparently. This fixed it for me: Link: https://github.com/Genymobile/scrcpy/issues/1382 Here's what you have to do: Go to Usb preferences in ...
Bruno's user avatar
  • 11
1 vote

Smartphone locked with no access to Gboard Keyboard

You haven't mentioned android version, but I guess it's AVBv1 signed. Therefore it's possible to flash modified boot partition. download the stock ROM extract the boot.img file with AIK modify ...
alecxs's user avatar
  • 3,979
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 ...
optimuscomposite's user avatar
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 ...
Jim's user avatar
  • 121
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/...
Robert's user avatar
  • 19.7k
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.
Dovod Dovodov's user avatar
1 vote

Download file from Android shell

You have two options. Install Termux, which supports curl. Use your option number 2. adb push simply copies the file (unlike adb install, which looks for an apk file and tries to install it on the ...
Scooby-2's user avatar
  • 166
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 ...
Farouk Hajlaoui's user avatar
1 vote

Silence or disable Lenovo user experience spyware notifications without root

Same problem here. Unbelievable. Anyway. Using the simplest of tricks, this is how you can get rid of this annyoing bs *temporarily (using Lenovo Tab P11 (2nd gen) - Android 12): Find and open ...
RainbowColouredWingflapper's user avatar
1 vote

Fastboot flash boot (FAILED)

https://forum.xda-developers.com/t/fastboot-problem-on-usb-3-0-ports.3859995/ also talks about this problem, although it might be a different case. In their case, it was a Poco F1 phone, a computer ...
iTrooz's user avatar
  • 11
1 vote

Rsync-like downloads over adb?

Run SimpleSSHD https://f-droid.org/en/packages/org.galexander.sshd/ and use rsync like you would with any other ssh-enabled server. rsync -r -e 'ssh -p 2222' --info=progress2 [email protected]:/...
futpib's user avatar
  • 121
1 vote

Where can I run a .sh script on Android without root?

I am using a Samsung A52 (SM-A525F/DS) with Termux installed from Google Play. The home directory, where you can write scripts and set the execute bit, is: /data/data /com.termux/files/home You ...
Scooby-2's user avatar
  • 166
1 vote

How to enable Android USB Debugging option without the "Allow USB Debugging" popup?

The reason This is deliberately omitted from production Android. If it was allowed, it would be trivial to read the contents of a lost or stolen phone. Since many people keep much of their lives on ...
John Dallman's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible