I'm stuck in recovery mode cause I forgot to flash GAPPS on my LG G2 (D802) when I update from CM12 to CM12.1 ROM. My phone is now bootlooping.
As I can't use any external storage I'm trying to send GAPPS package to my phone with fastboot from my windows 7 PC.
But when I do adb devices I see my phone as unauthorized and I can't push files to it.
I have CWM 6.0.5.0 with PhilZ Touch 6.48.4 and touch GUI revision 1.30 and my ADB version is 1.0.32.
So, I wanted to know how to enable ADB on my device from the recovery mode or how to grant access to my device from the computer ? Or simply if there was another way to achieve this.
Thanks a lot.
I solved the problem in a other way with adb sideload.
To install flashable zip on your phone in recovery mode with CWM and ADB, follow these steps from the root of the main menu :
1 - Choose install zip
2 - Install zip from sideload
3 - Plug the phone to the computer
4 - Type `adb devices` in the windows command shell from the fastboot directory
5 - Phone should now be listed as "sideload"
6 - In the Windows command shell type `adb sideload <filename>`
7 - Wait while the file is send to your phone
8 - Once the transfer is complete the file is flashed automatically
9 - Once the flash is successful unplug your phone and restart it in normal mode
10 - You can **wipe cache and dalvik cache** to avoid errors
My phone is now able to run properly.
P.S: I don't get why this question get down votes at it was clear and concise + the answer was not that hard finally.
Related
I have attempted every fix that has come up with no success. Of the things i have attempted:
Turn on/off usb debugging
use different cables
use different computers
uninstall and reinstall drivers
remove any other instances of adb
adb is not in my PATH, I navigate to the file directly
delete keys from the .android folder (keys show up in there every time I run adb)
Remove the key from /data/misc/adb on the phone (now no keys even seem to generate)
push adbkey to /data/misc/adb/ on the phone
I have even gone as far as to remove any tethering apps, SideSync, anything that needs a connection to the computer.
There is no button in developer options "Revoke USB debugging authorization" and no matter what I do, there is no popup for RSA. I don't know why i get adbkey and adbkey.pub in my .android folder whenever I start adb. I also don't know why they haven't generated on my phone after I deleted them.
I am using:
windows 10 64 bit
Samsung Android ADB Interface driver v. 2.12.4.0
adb version 1.0.36
Samsung Galaxy Note 4 (T-Mobile) with android 6.0.1
I am rooted and have a different kernel (beastmode 3.1.40) so I can use viper4android
I have exhausted just about every avenue I can think of (short of wiping my phone/computer, which i refuse to do at least for the computer, hence why I tried different computers), please let me know if you can think of anything else.
Try to kill adb kill server and start-server again.
You can find the adb tool in <sdk>/platform-tools/.`
here <sdk> : Path to your android sdk on your machine.Go to platform-tools folder and try below commands.
adb kill-server
adb start-server
Hope it works for you..
When I'm using a rooted Android device as ADB host to send adb command "adb devices" to Samsung S4, I received device unauthorized error message. However when I tried adb to Samsung Galaxy Nexus, it is working fine. Can anyone advise how to solve my Samsung S4 problem?
=========================================
# adb devices
List of devices attached
4d00f9169907301b unauthorized
=========================================
Edit:
Found that this problem only happened to Android 4.2.2 and above. The following link explained that Google has implemented some new security features for using adb.
http://nelenkov.blogspot.com/2013/02/secure-usb-debugging-in-android-422.html
Appreciate if anyone can help on this.
Get the public key from the client phone (adb host)
cat /data/.android/adbkey.pub
copy the above public key to the target phone's /data/misc/adb/adb_keys location. (you may need to stop the adb daemon first with stop adbd)
cat /data/misc/adb/adb_keys
verify both cat outputs match.
try restarting adb daemon on target start adbd or just reboot them.
If you are having problems reading or writing to ADB KEYS in above steps, try setting environment variable ADB_KEYS_PATH with a temporary path (eg: /data/local/tmp). Refer to that link it goes into more details
"On the host, the user public/private key pair is automatically generated,
if it does not exist, when the adb daemon starts and is stored in
$HOME/.android/adb_key(.pub) or in $ANDROID_SDK_HOME on windows. If needed,
the ADB_KEYS_PATH env variable may be set to a :-separated (; under
Windows) list of private keys, e.g. company-wide or vendor keys.
On the device, vendors public keys are installed at build time in
/adb_keys. User-installed keys are stored in /data/misc/adb/adb_keys"
Check and uncheck the USB Debugging option in the device.
If that doesn't work unplug and plug in the USB a couple of times.
At some point, the device should show a message box to ask you to authorize the computer. Click yes and then the device will be authorized.
If anyone has similar issue of having a phone with a cracked screen and has a need to access adb:
Root your phone (mine was already rooted, so I was blessed at least with that).
If you forgot to enable developers mode and your adb isn't running, then do the following:
Reboot your phone into recovery.
Connect the phone with a cable.
Open terminal.
If you type adb devices you should see the device in the list.
If so, type:
adb shell mount /system
abd shell
echo "persist.service.adb.enable=1" >> default.prop
echo "persist.service.debuggable=1" >> default.prop
echo "persist.sys.usb.config=mtp,adb" >> default.prop
echo "persist.service.adb.enable=1" >> /system/build.prop
echo "persist.service.debuggable=1" >> /system/build.prop
echo "persist.sys.usb.config=mtp,adb" >> /system/build.prop
Now if you are going to reboot into your phone android will tell you "oh your adb is working but please tap on this OK button, so we can trust your PC". And obviously if we can't tap on the phone stay in the recovery mode and do the following (assuming you are not in the adb shell mode, if so first type exit):
cd ~/.android
adb push adbkey.pub /data/misc/adb/adb_keys
Hurray, it all should be hunky-dory now! Just reboot the phone and you should be able to access adb when the phone is running:
adb shell reboot
P.S. Was using OS X and Moto X Style that's with the cracked screen.
Have you tried
adb kill-server
adb shell
Sometimes adb gets stuck and first killing adb server and then starting some command forces authorization window to pop-up.
Also please check adb client version on your phone.
THis feature is supported from adb 1.0.31 as far as I remember.
Experience With: ASUS ZENFONE
If at all you have faced Missing Driver for Asus Zenfones
Follow This Link
(http://donandroid.com/how-to-install-adb-interface-drivers-windows-7-xp-vista-623)
I tried with
1) Killing and starting adb server at adb cmd.
2) Switching Usb Debugging on and Off and ...
This is What WORKED with me.
Step 1:Remove Connection with Device and Close Eclipse
Step 2:Navigate to C:/Users/User_name/.android/
Step 3:You Will Find adb_key
Step 4:Just delete it.
Step 5.Connect again and System will ask you Again.
Step 6.Ask Device to remember RSA Key when it Prompts. I think its done.
If you Face The Same Problem after couple of days, just disable and enable USB debugging
For unknown reasons, I only had ~/.android/adbkey, but not ~/.android/adbkey.pub.
I guess that adb was unable to push the public key to the device, and thus the device could never show the authorization dialog.
After killing the adb server, removing the adbkey file and starting adb again, the authorization dialog popped up on the phone.
Try this steps:
unplug device
adb kill-server
adb start-server
plug device
You need to allow Allow USB debugging in your device when popup.
You need to allow Allow USB debugging when the popup shows up when you first connect to the computer!
Delete the folder .android from C:/users/<user name>/.android. It solved the issue for me.
I had to check the box for the debugger on the phone "always allow on this phone". I then did a adb devices and then entered the adb command to clear the adds. It worked fine. Before that, it did not recognize the pm and other commands
For me, the emulator could not have Google Play Services enabled. It could have Google APIs or be x86 or x64 but not google play store.
Try a USB2 port if you're plugged into a USB3 port. At least through the Pixel3 line this makes a difference. Many people have observed the same problem but I'm not sure if anybody knows why. Perhaps there's a way to tell the kernel to not do something USB3-ish on the USB port that the phones can't handle.
I got here because I forgot this workaround, found this page, then remembered to use the other port.
Please follow following steps :
Unplug your phone from system
Go to developer options of the Cellphone and then click on "Allow USB debugging" then please select the radio button prompting "Allow USB debugging when the popup shows up when you first connect to the computer!".....
That's it.. run your command again :
adb devices
You must be prompted in your s4 screen to authorize that computer. You can tell it to remember it. This is for security reasons, occurring in Android 4.4+
I found one solution with Nexus 5, and TWRP installed. Basically format was the only solution I found and I tried all solutions listed here before: ADB Android Device Unauthorized
Ask Google to make backup of your apps. Save all important files you may have on your phone
Please note that I decline all liability in case of failure as what I did was quite risky but worked in my case:
Enable USB debugging in developer option (not sure if it helped as device was unauthorized but still...)
Make sure your phone is connected to computer and you can access storage
Download google img of your nexus: https://developers.google.com/android/nexus/images
unrar your files and places them in a new folder on your computer, name it factory (any name will do).
wipe ALL datas... you will have 0 file in your android accessed from computer.
Then reboot into BOOTLOADER mode... you will have the message "you have no OS installed are you sure you want to reboot ?"
Then execute (double click) the .bat file inside the "factory" folder.
You will see command line detailed installation of the OS. Of course avoid disconnecting cable during this phase...
Phone will take about 5mn to initialize.
I have an Android-based phone (2.3.6) with unlocked root privileges.
Since i'd like to have access to my phone through my computer, today i've installed QtAdb and Android SDK.
If i open a command prompt and i do
adb shell su
i get
#
And so I am able to copy, remove, push files on my phone (on the phone i get a notification using the app "SuperSU".)
But if i launch QtAdb - under Windows 7 - i get the following error: "adbd cannot run as root in production builds". I miss something? There's something wrong with QtAdb?
The problem is that, even though your phone is rooted, the 'adbd' server on the phone does not use root permissions. You can try to bypass these checks or install a different adbd on your phone or install a custom kernel/distribution that includes a patched adbd.
Or, a much easier solution is to use 'adbd insecure' from chainfire which will patch your adbd on the fly. It's not permanent, so you have to run it before starting up the adb server (or else set it to run every boot). You can get the app from the google play store for a couple bucks:
https://play.google.com/store/apps/details?id=eu.chainfire.adbd&hl=en
Or you can get it for free, the author has posted a free version on xda-developers:
http://forum.xda-developers.com/showthread.php?t=1687590
Install it to your device (copy it to the device and open the apk file with a file manager), run adb insecure on the device, and finally kill the adb server on your computer:
% adb kill-server
And then restart the server and it should already be root.
For those who rooted the Android device with Magisk, you can install adb_root from https://github.com/evdenis/adb_root. Then adb root can run smoothly.
Use adb shell; su;
I still have not found any other solution for android 12 rooted with magisk. adb_root does not work with android 12. adbd insecure does not work for me and throws error could not patch adbd.
if anyone is still having issues, heres how i fixed it
you have to start the shell with the phone and go into the magisk app and in the superuser tab (bottom) you have to enable root access for the shell and it works!
You have to grant the Superuser right to the shell app (com.anroid.shell).
In my case, I use Magisk to root my phone Nexsus 6P (Oreo 8.1). So I can grant Superuser right in the Magisk Manager app, whih is in the left upper option menu.
I've been developing my first android apps on Eclipse installed on OSX Lion. I would like to use my Jelly Beans Galaxy Nexus for debugging, but the Android Device Bridge (adb) can't find the device:
./adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
The phone is in debugging mode.
The phone is recognizable as a camera (PTP), but not as a media device (MTP). ADB does not work regardless of PTP\MTP setting.
I have restarted noth the phone and the mac
Following this advice, I've installed Android File Transfer. The ATF recognizes the device, but no luck with the ADB.
Any ideas?
Addendum: I have reported a bug for this. Workarounds are still most welcome!
Sep 5 13:28 UTC - Workaround #1: Dropbox: I've moved the OSX Eclipse workspace to Dropbox and installed Dropbox on the device. The APK is written to bin/, and I re-install it from the Dropbox app after each successful build.
I'm answering this because my boss just had the exact same issue with his Galaxy Nexus, and we finally fixed it yesterday. He had an application, "EasyTether" that was snagging his connection to ADB and it couldn't be used anywhere else. Is it possible that you've setup this application, or a similar one that might be using ADB for you? If "Android File Transfer" works (it was working in parallel with EasyTether for my boss), then your connection is active, so as long as "USB Debugging" is enabled in your settings, you should be seeing a connection. Here's a quick how-to in the event that you do have "easytether"
BEFORE you plug your phone in run the following in terminal
sudo kextunload /System/Library/Extensions/EasyTetherUSBEthernet.kext
If that fixes the issue, and you want to remove easytether altogether, you can us the rm command with the -rf flags to keep it from happening again...
sudo kextunload /System/Library/Extensions/EasyTetherUSBEthernet.kext
sudo rm -rf /System/Library/Extensions/EasyTetherUSBEthernet.kext
You can use adb over wifi.
See this post to do it yourself.
or there are quite a lot of apps on google play. But these need root access
Try taking the usb stick out of the phone and put it back
Try taking it out of the mac and put it back
Try to put the stick in another port
Try to wriggle the stick so you are sure it is connected.
There is a long discussion with possible solutions here: Can't find android device using "adb devices" command
Have you tried a different cable? I ordered a bunch of cheap cables off of eBay, and the first one I used would not work for adb. It did work for charging and file transfers however.
I'm trying to test an app out on the Motorola Backflip with AT&T as the carrier. I checked USB debugging on the phone's Development screen.
Using Eclipse, how do I get the app to load on the Backflip so I can test it? DDMS shows a device with a bunch of question marks and unkown. Seems that it only gives me the option to load the app on the SD card which doesn't do me any good.
I searched and found a Motorola driver which I'm supposed to install to the adb folder. Where is that folder? I've checked the phone and on my development machine. Maybe I need new glasses?
More info:
I have Run set to manual. When I click on run I get:
Choose a running Android Device:
Serial number ????????
AVD Name N/A
Target Unk
State ??
and the OK button is greyed out so all I have left is to Cancel.
Still trying:
I don't know if this helps but in DDMS the following messages show up:
[2010-03-28 19:20:41 - ddms]execute: running ls -l /
[2010-03-28 19:20:41 - ddms]Got reply 'FAIL', diag='insufficient permissions for device'
[2010-03-28 19:20:41 - ddms]execute: returning
Did what Commonwares suggested:
eric#i7Linux:~/Eclipse3.5/android-sdk-linux_86/tools> ./adb kill-server
eric#i7Linux:~/Eclipse3.5/android-sdk-linux_86/tools> ./adb kill-server
eric#i7Linux:~/Eclipse3.5/android-sdk-linux_86/tools> ./adb start-server
* daemon not running. starting it now *
* daemon started successfully *
eric#i7Linux:~/Eclipse3.5/android-sdk-linux_86/tools> ./adb devices
List of devices attached
???????????? no permissions
eric#i7Linux:~/Eclipse3.5/android-sdk-linux_86/tools>
First, try adb kill-server followed by adb start-server (or just reboot your development machine). Then, with the device plugged in, run adb devices. If your device shows up (and with a real device ID, not question marks or anything), try it again from Eclipse, or use adb install ... (where ... is the path to your APK) to install it.
Since the Backflip does not support app installs outside of the Market, there was a fair bit of public experimentation to ensure the Backflip supported adb-based installs, so I know it works in general.
If you are using Eclipse. when you run the application it should automatically set your phone as the target and push the apk to the phone and execute it. You might have to set your phone as the target instead of the emulator.
Wow. Easier than I thought and I don't know how I missed that post.
If you are running Linux (I'm running Suse 11.2 x64) go to http://developer.android.com/intl/de/guide/developing/device.html for full instructions. I created the 51-android.rules file and I was able to install the app on the Motorola Backflip to test it. (Needless to say, but I'll say it anyway, more testing required. The layout on the Backflip doesn't match the emulator)
Repeating the instructions in the link:
Login as root
go to your etc/udev/rules.d folder
create a file called 51-android.rules
I put this line in the file: SUBSYSTEM=="usb", SYSFS{idVendor}=="22b8", MODE="0666"
save the file
Instructions say to chmod a+r the 51-android.rules file but I didn't have to. Permissions should be -rw-r--r--
Eclipse now sees the phone and I can load directly to it from Eclipse.
Back to coding :-))