Hot answers tagged

16

Short Answer Try using an earlier version of adb. 1.0.32 did not work for me, but 1.0.31 did. Long Answer I just encountered this issue on a Nexus 5 running CyanogenMod 11 (based on Android 4.4) using the current version of the Platform Tools and ADB (Android Debug Bridge version 1.0.32 Revision eac51f2bb6a8-android). Using adb logcat to watch the ...


7

The other answers about the command arguments being quoted is accurate. I've found that if you escape the spaces between the arguments, it works. Like this: adb backup -apk\ -shared\ -all\ -system


7

I got it to work :) NOTE: This also requires your device to be rooted. (Thankfully, mine was rooted) Connect the device to Mac or PC in recovery mode. (I had to map the process in my mind as the screen was broken). Now open terminal/CMD in computer and go to platform-tools/. type and enter ./adb devices to check if the device is connected in recovery mode....


6

Easy to do – as in any Linux system: Connect your device as usual log into it using adb shell use the ls command to list files in the current directory, and the cd command to change directories (i.e. walk the tree / navigate through directories) For details on the commands, check for the corresponding Linux man pages – e.g. man ls and man cd. Edit: If ...


6

Try the 15-seconds ADB/drivers all-in-one installer. You could also install the Samsung drivers rather than conventional OnePlus drivers. I installed these drivers and I've had mine working since the upgrade. You could also try following this guide on how to set it up.


6

If you need to do something that requires root privileges, your device must be rooted. You can't circumvent this via ADB because what ADB does is to provide a shell on your host machine through which you can run commands on the Android device. So essentially you are running commands on your device through your PC. Hence you can't do anything that requires ...


5

The fix for me was using a different micro-usb cable. No software change, no drivers to update, just the usb cable. Apparently they aren't all created equal.


5

As described by ss-3-1415926535897932384626433 there is no flag, but you have to get a list of files first and then check if your local files match. I wrote a little script for it: #!/bin/sh rfolder=/sdcard/DCIM/Camera lfolder=Camera adb shell ls "$rfolder" > android.files ls "$lfolder" -1 > local.files rm -f update.files touch update.files while ...


5

in that App Info (though grey out), click the three vertical dots and use Uninstall for All Users.


5

Note: The solution is tested on Android 4.2.1, 5.0.2 and 5.1.1. The value for the system property persist.sys.safemode determines whether the phone should boot into safe mode or in normal mode. When booted into Android OS, provided root access, the value can be changed as adb shell su -c 'setprop persist.sys.safemode 1' adb shell su -c 'echo "1" > /...


5

Yes. All you need to do is test for the presence of the file that enables it. On devices that do: # adb shell ls /system/etc/permissions/android.hardware.usb.host.xml /system/etc/permissions/android.hardware.usb.host.xml And otherwise: # adb shell ls /system/etc/permissions/android.hardware.usb.host.xml /system/etc/permissions/android.hardware.usb.host....


4

To add to Jared's answer (can't comment - not enough reputation yet :/). This works with the emulator only so I wrote an app you can run on a real device and it provides exactly the same interface (telnet to :5554 and run "geo fix ..." or "geo nmea"): MockGeoFix


4

15 seconds minimal ADB, fastboot and drivers installer. No need to navigate to the installation folder in CMD. It can be installed system-wide. No need to check for manufacturer specific drivers. Everything included in 9MB.


4

Running an APK without installing it? No matter if you won't accept the answer, running an APK is not possible. It's not an executable, it's an archive containing the application and instructions on where all it's resources should be placed so that the app can run. Android APK File Format Asking this question is the same as asking how you run an iso ...


4

Enable USB debugging on the device This is done in Settings › Development. If you don't have that entry in your settings menu, go to Settings › About, scroll to the "Build number", and hammer it like a monkey until your device congratulates you having become a developer. Go back to the main page of the Settings menu, and close to the bottom you should see ...


3

Building on kevenoid's answer, it may depend on what version of adb is running on the phone. You can find out what version the phone is running natively by doing the following: First find out what version you are running on your desktop adb version Then open the shell on your phone adb shell Once the shell is open then you can run adb version ...


3

Non-Rooted Solution: Enable USB-debugging in the developer setting and connect your phone to your computer via USB. Run the adb command, adb tcpip 5555 (Make sure port 5555 is not blocked by any firewall programs) To get your Wi-Fi IP address assigned to your device, adb shell and then netcfg and run the adb command adb connect <IP_ADDRESS>. For ...


3

For the RSA verification that you asked to bypass, I don't know whether it would work in your device, but it worked in my little experiment. In Lollipop, the ADB keys (after authorization) are saved in /data/misc/adb/adb_keys. Your private key is saved in computer. In Linux the directory location is $HOME/.android/. On Windows that usually translates to %...


3

On your device, Go to Settings > About Device and repeatedly tap "Build Number" until it says you're a developer. Then go back to Settings and into Developer Options. Turn it on and check the box for USB debugging. Then Revoke USB debugging authorisations. Now, connect your device, install its drivers if you haven't and type any ADB command. A message will ...


3

First make sure that you have virtualization on in the BIOS. Next, make sure you have done what I have done in my question. What I forgot to do was install the android_winusb file in the usb_driver folder. The path should be sdk\extras\google\usb_driver. In my case, C:\Users\Ruchir\AppData\Local\Android\sdk\extras\google\usb_driver After doing that, go ...


3

There is always a lack of documentation because the drivers are device specific so you need to find documentation for your specific device. You can try using Universal ADB Driver, but the best solution is to install a companion app for your device, something like Kies for Samsung, as they usually install drivers alongside. To know if ADB is installed - it'...


3

As Firelord asked me to sum things up, here we go: First, you cannot do a backup using fastboot. Fastboot is like a one-way road: you can only use it to write partitions (either by flashing a corresponding image, or by wiping it) – but you cannot "pull" a partition. Which leaves ADB. Yes, it's possible via ADB – but it will require root. As Firelord ...


3

Install the Google Driver while in phone is booted to bootloader. Those are in your SDK folder location - extras - google - usb_driver. When my N6 is booted to bootloader, Windows 10 shows me the following: Win10 Device Manager screenshot


3

If the OTG drive is plugged in at the time of the command, you can also detect OTG by querying these directories: /storage/UsbDriveA (Samsung devices) /storage/USBstorage1 (LG G4, V10, G3, G2, LG devices) /storage/usbdisk (Moto Maxx, Turbo 2, Moto X Pure, Motorola devices) /storage/usbotg (Sony Xperia devices, Lenovo Tabs) /storage/UDiskA ...


3

Addressing Revision 4 You're still doing things incorrectly even though I noted in revision 1 of my answer that you would need adb in PC for once and once alone as long as no reboot or disabling of USB debugging occurs. Regarding your attempt: u0_a192@klimtwifi:/ $ adb connect localhost:9999 * daemon not running. starting it now on port 5038 * * ...


2

I only encountered device shown via ADB as offline in two cases: Device not authorized (ADB security features) No proper udev rules setup As the first case is most likely not your problem as these security features were not implemented in android when you asked this question. Your problem is most likely that you dont have proper udev rules. You can fix ...


2

Try using the -a option to copy all file attributes: adb pull -p -a /sdcard


2

I had the same problem described by 'pepuch' on my HTC Desire S. I tried different drivers on relatively new computers running Windows 8 and Windows 10. In the end I found a link suggesting that I should try the (same) procedure on an older (desktop) computer which I did and the computer managed to detect my Desire S in fastboot USB mode and I managed to ...


2

I figured this out on my own. I solved this by installing Airdroid using an OTG USB adapter and a wired mouse. I then used the airmirror capability of the software to control a virtual mouse on the device. I do have root on the device, this may be significant to the operation of Airmirror. I could then accept the debug confirmation on the screen and complete ...


2

No, it would not backup Contacts. Yes, it would backup Contacts. Confused, eh! Yes, it would backup Contacts. See this question: Backup/Restore SMS/MMS via ADB on a non-rooted device? The author of it was able to backup contacts. It was later revealed that the device on which the backup was performed ran Android 4.1.2. It was a bizarre revelation for ...



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