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,102 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
9 votes
0 answers
3k 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 ...
Soham Saha's user avatar
9 votes
0 answers
21k 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 ...
Luigi Rojas's user avatar
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 ...
Ullallulloo's user avatar
9 votes
0 answers
25k 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 ...
Fenikso's user avatar
  • 283
7 votes
1 answer
27k 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 ...
Smeterlink's user avatar
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 ...
Narfanar's user avatar
  • 171
7 votes
0 answers
51k 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: ...
homeFault's user avatar
7 votes
0 answers
6k 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....
persiflage's user avatar
7 votes
1 answer
3k 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 ...
Laef's user avatar
  • 171
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 (...
sheß's user avatar
  • 61
6 votes
2 answers
39k 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 ...
java's user avatar
  • 223
5 votes
0 answers
336 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....
Sam Sam's user avatar
  • 51
5 votes
1 answer
7k 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 ...
x-ray's user avatar
  • 151
5 votes
1 answer
6k 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 ...
Sam Lehman's user avatar
5 votes
2 answers
902 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 ...
joelproko's user avatar
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 ...
Narfanator's user avatar
4 votes
1 answer
3k 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. ...
S.ShojaEddin Rafieipour's user avatar
4 votes
0 answers
686 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 ...
0fnt's user avatar
  • 141
4 votes
0 answers
2k 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 ...
JDoe9999's user avatar
4 votes
0 answers
181 views

Is there a way to change the lockscreen message/owner's info using ADB?

My Realme 7 Pro doesn't support lockscreen messages for some reason but I was wondering if I could change my lockscreen message because when I first got my phone I backed it up immediately (Google ...
Ulbert's user avatar
  • 41
4 votes
0 answers
6k 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 ...
yelinqing's user avatar
4 votes
0 answers
549 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: [ :...
Phlip's user avatar
  • 141
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: ...
PotatoeS's user avatar
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 ...
BlackPanther's user avatar
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 ...
Markus Klyver's user avatar
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. ...
Steven's user avatar
  • 181
4 votes
0 answers
3k 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 ...
Brendan's user avatar
  • 51
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 ...
PiTRiS's user avatar
  • 51
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 ...
Val Blant's user avatar
  • 153
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 ...
Tiger98's user avatar
  • 141
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 ...
CharlyDelta's user avatar
4 votes
0 answers
659 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 ...
jojolepirate's user avatar
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 ...
Juan Manuel's user avatar
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 ...
MishaP's user avatar
  • 370
3 votes
0 answers
233 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 ...
maazkalim's user avatar
3 votes
0 answers
2k views

ADB command to permanently disable Android 12 microphone & camera indicators

I want to permanently disable the microphone and camera usage indicator on Android 12. I tried the following ADB command, but it only disable for some minutes: adb shell cmd device_config put privacy ...
user avatar
3 votes
0 answers
465 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-...
EM0's user avatar
  • 173
3 votes
1 answer
401 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 ...
Grey Bunny's user avatar
3 votes
0 answers
204 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 ...
Mekushen's user avatar
3 votes
0 answers
153 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....
Tobi Peter's user avatar
3 votes
0 answers
2k 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 ...
Kristian's user avatar
  • 131
3 votes
0 answers
2k 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. ...
Forivin's user avatar
  • 337
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/...
srhslvmn's user avatar
  • 267
3 votes
1 answer
2k views

How to list all apps with a specific permission in ADB?

I want to list all apps with a specific permission. For instance, output the package names of apps with the VIBRATE permission. The apps with a specific permission then be revoked or enabled as ...
user598527's user avatar
3 votes
0 answers
161 views

chmod and chown silently fail in shell for TwinApps media directory

I think I have a similar issue to Can't use chmod to alter permissions on emulated phone but the emulation is happening on the android device itself via the TwinApps feature, which allows you to ...
Ignat's user avatar
  • 131
3 votes
0 answers
536 views

How do I move a data file into an Android emulator application data folder?

I have a favorite Android app that saves its projects as name.ay files. I want to import such a file into an AVD running Android 11 so I can work on my PC (Fedora 35), but the app has no import ...
Brian Kowalchuk's user avatar
3 votes
0 answers
255 views

Can't boot into Recovery mode. Prestigio Multipad 2 Pro Duo 7.0

so I've had the Prestigio Multipad 2 Pro Duo 7.0 for a hell of a long time. Sitting in a box, the tablet worked fine when we bought it back in like 2015 for like 2 - 3 weeks and then we started to run ...
Tex's user avatar
  • 31
3 votes
0 answers
2k views

How to create a homescreen shortcut via ADB?

I'm using as an example the open-source app ConnectBot to demonstrate what I want to achieve. I can create a connection's shortcut through the homescreen's widget functionality, but I want to know how ...
AndroidX's user avatar
  • 131
3 votes
0 answers
1k views

How to extract data from non-rooted phone via ADB?

So, I was thinking that ADB is a superior method of backing up any device then using an App, out of privacy concerns if not for the flexibility. However, when I try to extract a system database I get ...
user362679's user avatar
3 votes
0 answers
293 views

How can I unlock/root the Vivo Z1?

I have enabled developer options, enabled USB debugging and unlocked bootloader (OEM unlocking). fastboot flashing get_unlock_ability (bootloader) get_unlock_ability: 1 OKAY [ 0.000s] Finished. Total ...
user avatar

1
2 3 4 5
23