Questions tagged [adb]
For issues specific to the Android Debug Bridge (adb), a command-line tool to interact with Android devices and emulator instances. See the full tag wiki for details and hints.
1,125
questions with no upvoted or accepted answers
11
votes
0
answers
4k
views
Interact with notification action from ADB Shell
I have an Android(7) phone [also fine if you can provide a solution for Android 10] and a Linux pc. By enabling USB debugging and using the terminal of my pc, I am able to read the notifications of my ...
11
votes
0
answers
23k
views
How to enable USB Debugging from recovery mode?
My phone screen broke. I can't see anything, and the touch screen doesn't work. I can't buy a new phone, so I'm not looking into backing up my data, I want to be able to use it from my pc.
I have a ...
10
votes
0
answers
26k
views
Device boots normally, but cannot enter recovery or fastboot
I have secondhand Vodafone Smart Tab 4G. It seems to me that previous owner messed something up.
The device boots normally but I cannot enter either bootloader, fastboot, or recovery. I have tried HW ...
9
votes
0
answers
1k
views
How to stop apps from doubling overscan?
For some reason a chunk of the digitizer broke on the bottom of my phone. I tried to use adb shell wm overscan 0,54,0,324 to resize my screen smaller until I can get a new phone, but it's giving bad ...
9
votes
1
answer
34k
views
How to get adb logcat to filter ONLY by specific app (package name)
Would like to know how can I get the adb logcat of ONLY certain app, and all its errors and messages associated.
I've tried before with adb logcat -c; adb logcat | grep com.fitbit.FitbitMobile, but ...
7
votes
0
answers
6k
views
How to make changes done through `adb settings put` persist through device reboots?
The specific changes I attempted were to a database entry following instructions in this question: Possible to turn on Airplane mode with WiFi on only?
The changes to either row would take effect ...
7
votes
0
answers
53k
views
adb>shell returns "error: closed" - how to "open" adb shell access through adb sideload
my device got broken but i am still able to connect usb in the stock recovery mode.
if i try to start a shell via adb while the device is in recovery mode, i fail. my terminal echos the line: "error: ...
7
votes
0
answers
7k
views
How do I remove orphaned permissions that are preventing an app reinstalling on Android lollipop
I have a ZTE phone I'm unable to reinstall facebook on using the Google Play Store - I get the notorious -505 unknown error.
If I install a downloaded facebook apk using adb I get the following error....
7
votes
1
answer
4k
views
Backing Up Apps With allowBackup=false
I'm trying to back up the apks and preference data for all of the apps on my device, but it only backs up about a third of them; the remainder all have allowBackup=false in their manifests, which ...
6
votes
0
answers
4k
views
`adb shell wm overscan` makes apps leave blank spaces on top
I've been following the instructions given here. Basically I just ran:
adb shell wm overscan 0,320,0,0
to fix a broken touchscreen issue on my Sony Z3 Xperia Compact with Android 6.0.1
Now some apps (...
6
votes
2
answers
46k
views
adb pull - copy whole folder to computer
How do I copy a folder from my Android device to a certain folder of my computer?
If I use this command:
adb pull efs
It copies the contents of the efs folder to my computer's root directory. I want ...
5
votes
1
answer
2k
views
ADB not responding
Multiple times per day, ADB suddenly stops responding. After this occurs, every adb shell command fails to finish or produce any output. IntelliJ and Android Studio no longer recognize my phone(s).
...
5
votes
0
answers
506
views
How can we access Settings > Safety & emergency on Android via ADB commands?
How can we access Settings > Safety & emergency via ADB commands?
I tried the below commands but none are working.
1.
adb shell am start -n com.android.settings/com.android.settings.emergency....
5
votes
1
answer
8k
views
Access encrypted /data Partition over ADB and recovery (TWRP, LineageOS 16, Redmi Note 4)
I have a Redmi Note 4 (mido) Android phone with a broken screen: the screen lights up, but otherwise it stays entirely "black". I already replaced the screen, but with no luck - the cause of the error ...
5
votes
1
answer
7k
views
Half of touchscreen is unresponsive. How can I make Android only use the top half (rotated by 90 degrees)
So I have a broken LG G2 and a near-empty bank account, so buying a new phone isn't exactly an option right now. The bottom 50% of the screen doesn't respond to touch. Right now I am running ...
5
votes
2
answers
941
views
Pattern-locked Samsung Galaxy with SuperSU and no internet
Some months ago, I rooted my Samsung Galaxy and installed SuperSU.
Stupidly, I'd had believed that the only thing that happens when you enter the pattern wrong too many times is that you have to wait ...
5
votes
0
answers
6k
views
ADB Screen Record with Audio
I have prototype hardware and an application that produces sound. I would like to use ADB to record, the screen, audio out and audio in, all at the same time. Is there a way to do this?
Note: Because ...
4
votes
0
answers
36
views
How to prevent apps from making background sound using adb?
I use a dating app, and this app makes sound in the background even though it's not running. It's very annoying because it's like telling everyone around me "hey, this guy is using dating app&...
4
votes
0
answers
514
views
Why does my phone occasionally prompt a new RSA key fingerprint for my computer?
I use ADB on my Linux PC to do stuff, but sometimes when I connect my phone, it reports an RSA key for my computer to be verified, despite I check the "remember this computer..." every time ...
4
votes
1
answer
4k
views
ADB Sideload stuck on serving update.zip at 0%
I'm using adb sideload update.zip command, but it is stuck on serving at 0% (Verifying update package ... on phone).
I tried adb usb command, but the error is closed. The device state is sideload.
...
4
votes
0
answers
1k
views
ADB/PM command to disable data and wifi access for Apps
Is there a way via adb shell to disable an apps access to WiFi and Data? I'd like to turn off internet for all apps and then selectively turn it on for required apps.
I know the manual way by going to ...
4
votes
0
answers
3k
views
Permanent ADB RSA-key authorization
My phone screen is broken but I managed to finally tap the allow button for ADB authorization so I can access the device via ADB.
My question:
Is there a way to do this once and never be asked again ...
4
votes
0
answers
5k
views
Allow USB debugging for any PC without confirmation
My phone display slowly turned black for an unknown reason; Maybe moisture (SM-A320F Android8 - no root). I use scrcpy to show phone screen on my PC (and voice assistant when I don't have access to ...
4
votes
0
answers
7k
views
How do I clear all recent apps using ADB in one command?
I am looking for a one liner solution that make use of adb to clear all recent apps, similar to clicking the overview button the click 'clear all'. Does anyone happen to know one?
My guess is that it ...
4
votes
0
answers
631
views
Recurring "Allow USB debugging?" popup during a test run
Per my work-around here ./gradlew test connectedAndroidTest erases my getFilesDir() folder, I test on two ONN tablets using a Ruby Rakefile that looks a little bit like this:
task default: [ :...
4
votes
0
answers
1k
views
Possible to change an apps SSAID aka Android_ID without rebooting? Which service handles this? Fast rebooting with Zygote kills my shell script
This may seem like an odd question, and I apologize for that. I am currently debugging an application and I am having trouble getting new Android_ID's to stick without rebooting.
To be specific ...
4
votes
3
answers
1k
views
Phone manufacturer prevents installation of apps signed by third paries, does anyone know a way around this?
I'm trying to put apps on an LG Exalt VN220, which is a flip phone that runs on a limited version of android. Whenever I try to install an apk using adb I get the following message: ...
4
votes
0
answers
2k
views
Display bound manipulation on an android device, to avoid faulty touchscreen area
I have a Oneplus 3T on which, the digitizer would not register a touch on the bottom 1cm of the display. I tried the adb shell wm overscan 0,0,0,100 command to set display margins, and it breaks a lot ...
4
votes
0
answers
26k
views
Chrome taking up lots of space on my Android device
I have an OnePlus 5T running Oxygen 5.1.4 (which is based on Android Oreo 8.1.6). According to the app DiskUsage, Google Chrome is using almost 15 GB of data.
(Click image to enlarge it)
Apart from ...
4
votes
0
answers
1k
views
Internal Storage Dying? (S.M.A.R.T. equivalent?)
I suspect the Internal Storage on my device is failing. How can I confirm?
If this were a computer, I would check the S.M.A.R.T. data for each storage device. I am looking for something similar.
...
4
votes
0
answers
4k
views
How do I toggle "Do Not Disturb" via ADB?
I would like to enable Do Not Disturb on a phone via ADB. I have located the settings namespace and key which controls Do Not Disturb:
adb shell settings put global zen_mode 2
But when I run this ...
4
votes
1
answer
2k
views
Android Backup manager - restore from Nougat to Marshmallow
Earlier Device: LG Nexus 5X.
My Device: OnePlus 3
Earlier, I was able to use Tap&Go or just import all the data by signing into my Google Acc.
However, with my device, when I used Tap&Go or ...
4
votes
0
answers
1k
views
How can I create a backup ROM compatible with ADB sideload?
Can someone explain how to backup a rooted Android device into a ZIP file that would be compatible with adb sideload? Is it possible without having a custom recovery installed?
Is there a specific ...
4
votes
0
answers
7k
views
Execute "adb tcpip <port_no>" command without using USB even once
I am trying to create a backup of all applications in Android, but I don't want the users to connect to USB even for the first time.
Let me first explain what happens when we connect our phone with ...
4
votes
2
answers
3k
views
Install OpenGApps in Android Studio Emulator (Marshmallow)
I wanted to install OpenGApps in an Android emulator (created in Android Studio). The emulator is running with Marshmallow. There is enough storage space available, so this is not the problem. I tried ...
4
votes
0
answers
690
views
Enable bluetooth tethering via command line
Is there a way to activate the bluetooth tethering mode in Lollipop using the command line? You can do it for usb tethering by running the command
service call connectivity 30 i32 1
Is there a similar ...
4
votes
1
answer
1k
views
ADB authorization prompt missing in Sony Xperia Z3 Compact (D5803)
I just bought a Sony Xperia Z3 Compact (D5803) and I'm trying to root it. I'm following this link for instructions, but I got stuck at the "Rooting with exploit" step as I can't authorize the ...
4
votes
0
answers
2k
views
adb input swipe to unlock slide screen lock and open notifications
When I use the command adb input swipe, the slider slides all the way to the right, but does not 'click', so the screen does not unlock. I calculate the coordinates based on the (not visible) 'swipe ...
3
votes
1
answer
297
views
Why does the app Automate require ADB?
I need to set up an app-killing service for unrooted Android 9 devices using Automate. The service has to launch automatically at device start and keep sending kill commands to selected system (!) ...
3
votes
0
answers
458
views
full adb restore not restoring [unencrypted] .ab file to bootloader unlocked Lineage device
This is a follow-up troubleshooting question to this one here in this very same forum.
After repeatedly confirming the connection through both of adb devices -l and fastboot devices -l tantamounting ...
3
votes
0
answers
751
views
Which partitions to back up for a "complete" backup?
I have a Galaxy S10e running crDroid 13. I don't have TWRP on it (since it had to be installed from the custom LineageOS recovery), but https://stackoverflow.com/questions/29442630/copy-full-disk-...
3
votes
0
answers
1k
views
dumpsys battery in Termux
I am trying to get battery info in Termux.
I granted android.permission.DUMP and android.permission.PACKAGE_USAGE_STATS via ADB for com.termux (Termux app)
Then I opened Termux and types in /system/...
3
votes
1
answer
677
views
ADB file transfer works on internal storage but not SD card
I am trying to transfer a large amount of files (>40k images and videos). I've had trouble transferring it by dragging and dropping in Windows File Explorer so I used the adb push command. It works ...
3
votes
0
answers
285
views
Considering the licence, can I use ADB for other purposes than creating an Android application?
When I try to download Android SDK Platform-Tools (with ADB) from the official site (https://developer.android.com/studio/releases/platform-tools) it is required to accept the license that says (among ...
3
votes
0
answers
199
views
find out what app/package uses sensor
on my device running AOSP something accesses a sensor of my phone continuously, preventing it from going into deep sleep and thus draining battery.
Logcat shows the pid, but that just links to android....
3
votes
0
answers
4k
views
Where are my files in the Explorer when I move them in the Secure Folder [SAMSUNG]
When I connect my phone (Samsung) to my computer, I see an image in DCIM\Screenshots. When I enable Secure Folder and move the image there, the image disappears in Windows Explorer. When I look at the ...
3
votes
0
answers
3k
views
How to give `adb run-as` external storage permission?
So far I've been using adb run-as and cat to extract files from apps private storage /data/user/0/com.myapp.android. Simply catting the file and piping it to a local file on my pc worked a treat.
Now ...
3
votes
0
answers
5k
views
Accessing An Android Device With Broken Screen Via ADB and Unauthorized Machine in 2022
I've done a lot of experimentation on this, but can't seem to get anywhere. I'm looking for guidance on recovering data from my broken Android phone(s). It seems like this is going to require some ...
3
votes
0
answers
3k
views
How to enable/disable VPN via adb/termux/terminal?
I have a VPN configured on my android device running Lineage OS 18.1 (Android 11). I'm not using any third party apps, I'm simply using the standard Android settings to specify my VPN login data etc.
...
3
votes
0
answers
2k
views
What EXACTLY does "pm uninstall" do on an unrooted Android 9.0 device?
There seems to be confusion regarding the behavior of pm uninstall from the ADB shell, see also here and here.
Question: What configuration files does pm uninstall write to, is it /data/system/...