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,009 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
9 votes
0 answers
2k 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 ...
user avatar
9 votes
0 answers
19k 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 ...
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 ...
user avatar
8 votes
0 answers
24k 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 ...
user avatar
  • 273
6 votes
1 answer
12k views

How to wipe data on a bootloader-locked, broken screen, Nexus 6P

I want to sell my Nexus 6P for parts, but I want to wipe it first. The screen of my Nexus 6P broke (internally, the touchscreen MIGHT be fine, idk). The phone is full-disk encrypted with a PIN and the ...
user avatar
6 votes
0 answers
48k 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: ...
user avatar
6 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....
user avatar
5 votes
0 answers
3k 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 (...
user avatar
  • 51
5 votes
0 answers
5k 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 ...
user avatar
  • 151
5 votes
2 answers
813 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 ...
user avatar
5 votes
2 answers
3k views

Force 720p Resolution on InForce 6540

I'm working with an InForce 6540 board that has 5.0.2 Lollipop installed. I am trying to connect a display device that has a max resolution of 720p at 60hz. I am using a micro HDMI connection. The ...
user avatar
5 votes
0 answers
4k 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 ...
user avatar
5 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 ...
user avatar
  • 151
4 votes
0 answers
678 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 ...
user avatar
4 votes
1 answer
4k 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 ...
user avatar
  • 141
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 ...
user avatar
4 votes
0 answers
885 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. ...
user avatar
  • 161
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 ...
user avatar
  • 51
4 votes
0 answers
934 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 ...
user avatar
  • 153
4 votes
0 answers
6k 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 ...
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 ...
user avatar
4 votes
1 answer
563 views

adb restore: 'Invalid restore data'

My Nexus 6 had a hardware fault so I sent it off for RMA. Knowing in advance that it was highly likely the service people would factory reset it during the process of fixing it, I decided to do an adb ...
user avatar
4 votes
1 answer
4k 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 ...
user avatar
4 votes
1 answer
6k views

I/O errors opening files in data partition

I'm trying to repair a Moto G (XT1008, unlocked) device. When booting normally, the motorola splash finishes and the android desktop shows up for one second, then a bunch of pop ups show up informing ...
user avatar
4 votes
1 answer
32k 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 computers root directory. I want ...
user avatar
  • 193
4 votes
0 answers
585 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 ...
user avatar
4 votes
2 answers
7k views

File "has unexpected contents" error when sideloading Android 5.0

I have a Nexus 7 (2013) (wifi) and am trying to update the software to Android 5.0. When I try to sideload I get this error: Installing update... mount: failed to mount /dev/block/platform/msm.sdcc.1/...
user avatar
4 votes
3 answers
12k views

"device unauthorized" message when trying to use ADB, but can't boot device to confirm authorization

I managed to get stuck in a boot loop after installing the Chainfire 3D driver on a Samsung Galaxy Tab 3. I can boot into the recovery mode (and download mode) but when I try to establish a connection ...
user avatar
3 votes
0 answers
197 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
3 votes
1 answer
159 views

Why does "tar -czh" produce a corrupt archive but "tar -ch | gzip" work fine?

I am trying to backup a directory from a phone over adb. When using the following command I get an archive which is corrupt: adb exec-out "tar -czh /sdcard/DCIM" > backup.tar.gz But with ...
user avatar
  • 161
3 votes
0 answers
3k views

Enable USB debugging through recovery mode and ADB sideload

This is a follow up question to this one. Basically, I intend to somehow use this command to remove the lock screen: >adb sideload customROM.zip But, the customROM.zip should be something like ...
user avatar
3 votes
0 answers
108 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 ...
user avatar
  • 31
3 votes
0 answers
301 views

Recurring "Allow USB debugging?" popup during a test run

android stackexchange com! Long time; first time. Per my work-around here https://stackoverflow.com/questions/57433975/gradlew-test-connectedandroidtest-erases-my-getfilesdir-folder/60174578#60174578 ...
user avatar
  • 131
3 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: ...
user avatar
3 votes
0 answers
8k views

ADB backup and restore app data between device and emulator?

** = Edited on 03/31/2018 * = Edited on 03/25/2018 I have an application for which I'd like to transfer the app data from my physical device to an emulator on my PC. *The data consists of a single ....
user avatar
  • 442
3 votes
0 answers
1k 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 ...
user avatar
3 votes
0 answers
3k views

NOTE: 'pm list' commands have moved! Run 'adb shell cmd package'

When I tried: adb shell 'pm list packages -f' I got long list of options with: NOTE: 'pm list' commands have moved! Run 'adb shell cmd package' What is cmd and is it new place for Android's ...
user avatar
  • 293
3 votes
0 answers
2k views

Backup strategy for non-rooted phone

With apologies for my naivete: I want, insofar as possible, to periodically back up the data on my non-rooted Samsung Galaxy S8. To this end I do two things: 1) I periodically do adb backups ...
user avatar
  • 155
3 votes
0 answers
285 views

Can I use ADB with USB Network Gate?

I have a colleague who cannot obtain the kind of Android device we need for our project. He would like to own such a device to test our project with adb and similar tools, but to reiterate, his ...
user avatar
  • 141
3 votes
0 answers
1k views

How to turn mobile hotspot off using ADB

I need to turn the mobile hotspot off using ADB. I'm using various Samsung phones with Android 7 & 8. I'm planning on opening the settings activity and using keyevents. I know the Mobile Hotspot ...
user avatar
  • 31
3 votes
0 answers
2k 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 ...
user avatar
  • 41
3 votes
0 answers
6k views

/sbin/sh: pm: not found

I was trying to install apk files from adb. I used the command adb install <app-name>.apk command. But it returned /sbin/sh: pm: not found But if I login to the shell with adb shell and do ...
user avatar
  • 148
3 votes
0 answers
4k views

Data recovery from android device with broken screen

Situation Summary - I have an Android device with a broken screen, LCD and touch I have an android phone (BQ Aquaris E4.5 Ubuntu Edition, which I have flashed with the Android firmware for the E4.5 - ...
user avatar
3 votes
0 answers
870 views

Nexus 6 automatically remounting system read-only, deleted files returning

tl;dr I mount system rw I try to copy/update/write /system/xposed.prop System is auto-remounted ro, causing the write to fail (applicable to a variety of workarounds) Moving/renaming/deleting files ...
user avatar
3 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 ...
user avatar
3 votes
0 answers
1k views

I can't see new files throught windows explorer

i can't see my new(!) files on android throught windows explorer while i can do it by ES explorer or adb shell. Is there any way to fix it?
user avatar
3 votes
0 answers
1k views

Help with this ADB REVERSE Tethering Script?

I added the functionality to automatically turn on reverse tethering after many fails: Now i only enter t into terminal alias t='r && sz $tether && r && sz $n' tether='am ...
user avatar
  • 557
3 votes
2 answers
15k views

How to change network interface used by Android?

When I boot up my Android Device and go to WiFi settings, the status of WiFi remains "Turning Wi-Fi on" forever. I looked it up in logcat logs, below is the error that I see. E/...
user avatar
  • 131
3 votes
2 answers
4k views

Problem with ADB on my Nexus 4 (unauthorized phone)

When running adb devices in cmd, it says that my phone is unauthorized. It appears that it has something to do with the RSA fingerprint prompt. I don't remember ever getting such a prompt. Yes, I am ...
user avatar
3 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 ...
user avatar
  • 350

1
2 3 4 5
21