I went into the cyanogen recover menu and did a full factory reset before upgrading to LinageOS. Now when I try to sideload a package to the phone is shows "E: Signature Verification Failed"
Also, when I type
adb devices
I get back
List of devices attached
1a1e7719 unauthorized
Any help please! There is no OS to boot to so I cannot enable/disable USB Debugging etc.
Also, when I try to adb push I get the following
error: device unauthorized.
This adbd's $ADB_VENDOR_KEYS is not set; try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.
List of devices attached
1a1e7719 unauthorized
This means the rsa fingerprint on your computer and the device didn't authorize the computer. This is adb failure.
In Developer Options > USB Debugging > Revoke Permissions
Turn off USB Debugging
Install ADB/Fastboot properly Full article here
Windows:
Re install adb/fastboot [Download here][2]
Ensure your device drivers are recognized by the computer. Else
download accordingly
Connect the device to computer and turn on USB Debugging.
You should some message which asks you permission to authorize and it is advisable to click on "Allow always"
adb devices
Ubuntu:
Open terminal and type sudo su
adb kill-server
adb devices
If you're able to see your device code with a name, Et Voila.
16-10-14-04
You find linageOS community help on reddit or help with Report bugs, find info here: https://wiki.lineageos.org/
I think you can copy the current linage os on the sd card and fresh install it from the recovery (TWRP)? which device do you use?
And disable zip verification in TWRP...
I use Motorola XT910, called umts_spyder.
Related
I used Unity 2019.
When I connect my android devices (3 devices, tablet included) to Unity and try to run and build any apk, devices are recongized in Unity but the compilation process fails. lt's, writtren :Android device 52000... is not responding
I had this problem with my new phone, which was occurring even after enabling USB debugging and authorizing the PC through the phone. I ended up finding the answer in here Unity's documentation:
Run the adb devices command from the platform-tools directory of your
Android SDK installation and check the output.
If the output list is empty and you are using Windows, you may need to
install the driver for ADB devices. For more details, refer to the
Android SDK/NDK Setup documentation.
If the list contains entries with the unauthorized label, you may need
to authorize your computer on your device and give it permission to
debug it. Check the device’s screen for the corresponding dialog.
If the list contains your device with the device label, build your
Project in Unity again.
I resolve the problem.
In USB connection mode, on my phone, there are 4 options:
Transfer files
transfer images
Connect a MIDI device
Charge this phone.
I ONLY changed the connection mode to TRANSFER IMAGES.
After that, I received a prompt asking me the validate this connection mode. I did it and it works fine.
I resolved this issue, by changing the USB connection mode to Image Transfer(PTP) in my MI device
the problem is very clear. The compilation is successful, which means there is nothing wrong with your code. And the error message in the dialog box is clearly saying that
Make sure USB debugging has been enabled
So, to solve this simply follow the steps below -
Navigate to Settings > About Phone > Scroll to bottom > Tap Build number several times
Go back and now access the Developer options menu, check 'USB debugging' and click 'OK' on the prompt
You can also checkout this link
On android device, when prompted for "Allow USB debugging?", selecting "Always allow from this computer" checkbox solved the problem for me.
In order for my phone to show up the "Allow USB debugging?" dialog, I revoked the USB debugging authorisations from my android device and then ran "adb devices".
Also once I did this, unity was showing my device name instead of just device id.
Here's what worked for me.
Windows key type cmd
cd C:\Users\[name]\AppData\Local\Android\Sdk\platform-tools
adb kill-server
adb start-server
EDIT: I figured out the problem, i think. ADB found out I wasn't on the latest updates (at&t released a stagefright udpate and i didnt know) so ADB didn't let me debug. Everything is fine now.
I have been debugging my app on an AT&T HTC One M8 for about a month. Suddenly today when I plugged in my phone, I didn't get the authorization popup. After an hour of troubleshooting, I found the problem, but not a solution.
This is the error i get in Android Studio 1.3.1:
device unauthorized.
This adbd's $ADB_VENDOR_KEYS is not set; try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.
I googled $ADB_VENDOR_KEYS but to no avail.
Information:
Phone: AT&T HTC One M8 running 5.0.1 (API 21)
Android Studio version 1.3.1 build 141.2135290
JDK Version: 1.8.0_60
How can I get the popup again? I need to debug my app
In this case what you can do is :
Go in developer options on the device
Uncheck "USB Debugging" then check it again
A confirmation box should then appear
I tried almost anything but no help...
Every time was just this
➜ ~ adb devices
List of devices attached
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
aeef5e4e unauthorized
However, I've managed to connect my device!
This is the step-by-step tutorial.
Remove existing adb keys on PC:
$ rm -v .android/adbkey .android/adbkey.pub
Remove existing authorized adb keys on device, the path is /data/misc/adb/adb_keys
Now create a new adb keypair
adb I 47453 711886 adb_auth_host.cpp:220] generate_key '.android/adbkey'
adb I 47453 711886 adb_auth_host.cpp:173] Writing public key to '.android/adbkey.pub'
Manually copy from PC .android/adbkey.pub (public key) to Device on path /data/misc/adb/adb_keys
Reboot the device and check adb devices :
➜ ~ adb devices
List of devices attached
aeef5e4e device
Permissions of /data/misc/adb/adb_keys are (766/-rwxrw-rw-) on my device
look at this url Android adb devices unauthorized else briefly do the following:
look for adbkey with not extension in the platform-tools/.android and delete this file
look at C:\Users\*username*\.android) and delete adbkey
C:\Windows\System32\config\systemprofile\.android and delete adbkey
You may find it in one of the directories above. Or just search adbkey in the Parent folders above then locate and delete.
If you have an AVD, this might help.
Open the AVD Manager from Android Studio. Choose the dropdown in the right most of your device row. Then do Wipe Data. Restart your virtual device, and ADB will work.
I tried every method listed here and in Android adb devices unauthorized
What eventually worked for me was the option just below USB Debugging 'Revoke auths'
I had the same problem running Ubuntu 18.04. I tried multiple solutions but my device (OnePlus 5T) was always unauthorized.
Solution
Configure udev rules on Ubuntu. To do this, just follow the official documentation:
https://developer.android.com/studio/run/device
The idVendor of my device (OnePlus) is not listed. To get it, just connect your device and use lsusb:
Bus 003 Device 008: ID 2a70:4ee7
In this example, 2a70 is the idVendor.
Remove existing adb keys on Ubuntu:
rm -v ~/.android/adbkey* ~/.android/adbkey ~/.android/adbkey.pub
'Revoke USB debugging authorizations' on your device configuration (developer options).
Finally, restart the adb server to create a new key:
sudo adb kill-server
sudo adb devices
After that, I got the authorization prompt on my device and I authorized it.
Sometimes you just need to recreate new device
I want to make a simple batch script to install apk on android device. I can do this if Debugging is on and Device drivers are installed.
When device drivers are not installed it show error device not found and when debug acces is not allowed it show please allow usb debug from device.
I want to know how i can switch between these errors i want to start adbdriverinstaller.exe if no drivers are installed and if it requires usb debug access then just echo please allow usb debug access form mobile.
Here is my code
#ECHO off
echo Writing Configuration...
adb push Config.cfg /sdcard/Config.cfg
if errorlevel 1 echo Failed with error #%errorlevel%.
//here i want to switch between error types (if no device found error or allow usb debug access error)
if errorlevel 1 start "" AdbDriverInstaller.exe
if errorlevel 1 PAUSE
if errorlevel 1 EXIT
echo Installing Apk...
adb install -r myApk.apk
echo opening apk
adb shell am start -n com.myApk.myApk/.myApkActivity
PAUSE
what i want to do is
if
error: device not found
error: device not found
error arises then simply open adbdriver installer and if
error: device unauthorized. Please check the confirmation dialog on your device.
error: device unauthorized. Please check the confirmation dialog on your device.
Error arises than simply display please allow USB debug access from mobile.
ADB on its own does not tell why it could not find the device. But you could use powershell "gwmi Win32_USBControllerDevice" to get status of USB devices in Windows. This allows you to find all enumerated adb interfaces and check whether they have appropriate drivers installed. For details read adb device detection in Windows
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 am trying to install an apk file from command prompt but getting an error "Device not found".
try "adb devices" first and see the list of devices connected.
If the phone does not appear, do this :
"adb kill-server" wait a few seconds then "adb start-server"
If the phone appears in the list but its name is ?????, you have an issue of permission.
If the phone appears fine, you might have an issue in your command. Then check the following :
Is your phone in debugging mode?
Have you added the debuggable tag to the manifest of your application?
is the phone properly connected with the cable to your computer?
Have you done everything correctly on this page.
Fist turn on the emulator and then go to prompt and type:
adb install yourfile
Try adb devices
If you don't see your simulator device in the list although its on, you probably have to start the server. Execute adb start-server.
Then once the server is up again check for device by using adb devices command. Your device will be in the list
Now try to install the application. After installatio the application will be available in the menu.