Android eclipse emulator: can't access data/app - android

I wanted to delete my custom apps on the Android emulator in Eclipse. I followed this guide and encountered the same behaviour as described in this question. I also tested the root access the same way Arsalan mentioned in his first answer and got the same result.
I would like to try if Vyomas approach works, but I don't know the command for deleting an app.
Can anyone help?

I am assuming you are getting "rm failed for minesweeper.apk, Read-only file system"
If that's the case, then you could always press "page up" to bring up the menu in the homescreen and uninstalled it through Settings -> applications -> Manage Applications
Or you could keep going comando style and use this from androidkit, worked for me:
Using adb shell :
Important: The device has to be unplugged from USB if you are trying to uninstall from the emulator, else emulator should not be open and device needs to be plugged in the USB of the PC if you are trying to uninstall from the G1 Device. If either of them are not connected the adb shell command will not work.
Go to the shell and making sure adb is in PATH:
Go to shell (from cmd->adb shell or directly through a terminal)
#
#cd data
#cd app
#cd ls
#rm com.company.product.apk

Can you not just reset the device on startup if you want it removed? If your using the Eclipse add-on to use the emulator just select the box to wipe user data before you launch?
Si

Related

Unable to start the "HelloWorld" NativeScript app on an Android emulator [duplicate]

I'm having a problem with emulator-5554, it keeps telling me it is offline.
When I do a adb devices from the command line it says
emulator-5554 offline
Even after a fresh restart, I try that command and it still says it is offline.
The problem is when I try to install .apk files to the emulator using abd install <path> from the command prompt, it tells me that it is offline, if I create another device and run that one, then try to install the .apk files, it says I have too many devices connected. So in other words, I can't install my .apk files.
How in the world can I get rid of that damn emulator-5554? I heard that if you do a restart, it should clear all the devices, but that does not seem to be working. It is like it is getting initialized when my computer starts up. Has anyone run into this issue?
Thanks
1 . Simply "Wipe data" to fix this issue.
2 . If it doesn't work, go to emulated device and enable developer options > enable usb debugging
In such a case, you can do all of the following in order to be assured that your emulator starts working again :
Go to cmd and type adb kill-server
Go to task manager and find adb in processes. If you find one, right click on it and click on end process tree.
In eclipse, go to Window>Android Virtual Device Manager, click on the AVD you want to launch, click on start and uncheck "Launch From Snapshot" and then click on launch.
That's it! It will take a while and it should resolve your problem.
The way that Android detects emulators is by scanning ports starting at port 5555.
The number you see in the adb devices list (in your case 5554) will be one less than the port that adb is finding open.
You probably have a process running that is listening on port 5555. To get rid of the "offline" device, you will need to find that application and close it or reconfigure it to listen to a different port.
This solution is for Windows.
(See #Chris Knight's solution for Mac/Linux)
Start Windows Powershell:
Start -> type 'powershell' -> Press ENTER
Run the following command: adb devices
PS C:\Users\CJBS>adb devices
List of devices attached
emulator-5656 host
emulator-5652 host
12b80FF443 device
In this case, 12b80FF443 is my physical device, and the emulator-* entries are garbage.
Per #Brigham, "The way that Android detects emulators is by
scanning ports starting at port 5555.". The port number is indicated after the emulator name (in this case 5656 and 5652). The port number to check is the emulator port number plus 1. So in this case:-
5656 + 1 = 5657
5652 + 1 = 5653
So let's see which program is using these ports. In this case, the ports to check both start with "565". So I'll search for ports in use starting with 565. Execute: netstat -a -n -o | Select-String ":565"
PS C:\Users\CJBS> netstat -a -n -o | Select-String ":565"
TCP 127.0.0.1:5653 127.0.0.1:5653 ESTABLISHED 5944
TCP 127.0.0.1:5657 127.0.0.1:5657 ESTABLISHED 5944
The final field in this output is the PID (Process ID) - in this case it's PID 5944 for both of these two ports. So let's see what this process ID is. Execute: tasklist /v | Select-String 5944. Replace 5944 with the output of the previous command:
PS C:\Users\CJBS> tasklist /v | Select-String 5944
adb.exe 5944 Console 1 6,800 K Running MyPCName\CJBS 0:06:03 ADB Power Notification Window
What a surprise. It's ADB. As noted by other answers, it could be other programs, too.
Now, just kill this process ID. Execute kill 5944, replacing 5944 with the PID in the previous command.
PS C:\Users\CJBS> kill 5944
To confirm that the spurious emulator is gone, re-run the following command: adb devices
PS C:\Users\CJBS>adb devices
List of devices attached
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
12b80FF443 device
ADB re-starts (as it was previously killed), and it detects no more fake emulators.
From the AVD Manager try the "Cold Boot Now" option in the drop-down. It worked for me!
If you are on Linux or Mac, and assuming the offline device is 'emulator-5554', you can run the following:
netstat -tulpn|grep 5554
Which yields the following output:
tcp 0 0 127.0.0.1:5554 0.0.0.0:* LISTEN 4848/emulator64-x86
tcp 0 0 127.0.0.1:5555 0.0.0.0:* LISTEN 4848/emulator64-x86
This tells me that the process id 4848 (yours will likely be different) is still listening on port 5554. You can now kill that process with:
sudo kill -9 4848
and the ghost offline-device is no more!
On macOS Big Sur and later, use
sudo lsof -i -P | grep LISTEN | grep 5554
to find out the process.
I finally solved this problem,
I had to go to the Developer options from the Settings in the Emulator,
then scrolled down a little, turned on the USB debugging. Instantly my device was recognized online, and I no longer faced that issue. I tried restarting android studio and emulator, killing adb process, but those did not work.
I also had the same issue. I've tried all solutions described here, but they didn't help me. Then I've removed all emulators in the Android Virtual Device Manager and created new ones. The problem was in the CPU/ABI system image configuration of the Android Virtual Device Manager. My Windows10 machine emulator with system image x86 is always offline, where the emulator with system image x86_64 is working fine as expected. Just be aware of this
I solved this by opening my commandprompt:
adb kill-server
adb devices
After starting up, ADB now detects the device/emulator.
In my case, I found some process that makes adb not work well.
You can try to kill some strange process and run "adb devices" to test.
It worked for me:
kill the process name MONyog.exe
Just write
adb -e reboot
and be happy with adb))
Enable USB Debugging into your emulator
Settings > About Phone > Build number > Tap it 7 times to become developer;
Settings > Developer Options > USB Debugging.
That's it enjoy
The "wipe user data" option finally solved my problem. just wipe user data every time you start the emulator. This always works for me!
I use windows 8 x64 , eclipse
open your emulator,
setting --> about emulated device --> click Build number repeatedly-->open developer options --> open USB debuggin
From AVD manager list at the actions dropdown:
Cold Boot Now
restarts it without all pain above.
Do you have bluestacks installed? If you do, the background processes that it runs creates the offline device "emulator-5554".
Go to the task manager and end all the processes with the description of "Bluestacks"
Try this ...
Close emulator if it Running.
Start Emulator again and wait for its online.
enter Command in commandprompt and press ENTER key : adb tcpip 5555
(Make sure that only One emulator running at a time.)
adb -s emulator-5555 emu kill
Press Enter Key....
Done.
check devices by command "adb devices" in cmd.
In my case, I started in 'Cold Boot Now' and clicked on Message to allow the connection.
Did you try deleting and recreating your AVD?
You can manually delete the AVD files by going to the directory they're stored in (in your user's /.android/avd subdirectory).
Go to windows task manager and end process "adb.exe". There might be more than 1 instances of the same process, make sure to end all of them.
on linux or mac the port thats blocked will emulator-id + 1 so 5555 so:
sudo lsof -i :5555
will show you the pid of process that are taking the port (should be the second column) so to kill it:
sudo lsof -i :5555 | awk '{print $2}' | xargs kill
then adb (fake) devices will no longer show on the list
In my case, the emulator was working with Oreo and lower, but not with Pie, and everything I tried seemed to have no effect. What finally worked was updating the emulator to latest (version 28).
I found that the emulation environment comes up as "offline" when the adb revision I am using was not recent. I properly updated my paths (and deleted the old adb version) and upon "adb kill-server", "adb devices", the emulation environment no longer came up as "offline".
I was immediately able to use "adb shell" after that point.
If the emulator is already open or executing it will tell you is offline. You can double check on the Command Line (Ubuntu) and execute:
adb devices
You must see your emulator offline, you have to close the running instance of the emulator (since the port will show as busy) and after that you can run your application. Hope this helps someone.
I tried everything but only this one works for my case:
Use SDK manager, and reinstall the system image.
Android Studio, click Configure, SDK Manager, Launch Standalone SDK Manager,
Check all "Google APIs Intel x86* System Image", "Intel x86 Atom*System Image" and install. Then re-start Android studio.
You might have to reconfigure and wipe the virtual device with AVD Manager, make sure you choose x86 version.
Ensure that your enable ADB integration is marked;
go to Tools>Android>Enable ADB integration .
if doesn't checked , check this option and close your virtual device and re-open it . this worked for me.. good luck!!
In MAC, you can use Activity Monitor utility, since, unlike Linux, we cannot use netstat -tulpn command in MAC. Search for the running instance of the emulator, typically qemu-system-i386. Kill that instance and you will see none of the ghost emulator running.
Simplest way to grab Activity monitor utility is to use spotlight search. just hit cmd-space and type in Activity Monitor.
I had the same issue with my virtual device. The problem is due to the Oreo image of the virtual devices that have the Play Store integrated. To solve this problem I installed a new device without the Play Store integrated and all it was fine.
Hope it helps, Bye
See emulator-5554 unauthorized for adb devices. On API 29 emulator I run adb devices command and got emulator-5554 unauthorized message. Then I created a new avd device from Google APIs image (in my case Q, x86), not from Google Play.
Simply delete and created gear avd again.It will work.

ADB is not working after android studio update

I have updated android studio to Android Studio v2.3.3 (June 2017) and adb stopped showing logs when I launch app on android studio emulator
The log shows:
07/11 13:08:17: Launching app
$ adb push C:\Users\1\AndroidStudioProjects\Don'tWakeMeApp4\app\build\outputs\apk\app-debug.apk /data/local/tmp/oleksandr.ivanets.dontwakemeapp
$ adb shell pm install -r "/data/local/tmp/oleksandr.ivanets.dontwakemeapp"
Success
$ adb shell am start -n "oleksandr.ivanets.dontwakemeapp/oleksandr.ivanets.dontwakemeapp.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Client not ready yet..Waiting for process to come online
Connected to process 4429 on device Nexus_5X_API_26 [emulator-5554]
Click on below link
http://adbshell.com/downloads
and download the first link with name ADB Kits ( contains adb.exe and necessary .dll files).
After downloading replace these files with the ones in the path
Android/Sdk/platform-tools/
Now click on adb.exe and it will open cmd and will start the adb server.
Now it will detect the device and no problem. OOOOOllllaaaaa.....
If the Problem persists again then do the same... save the folder
somewhere.... just replace files... it will detect the device
automatically then
Preface: Although my answer focuses on Android Studio's perspective of ADB errors, I'm sure it is helpful for Windows ADB debugging in general!
#sHaRkBoY 's answer helped me look in the right direction. I used to get "Unable to detect adb version, adb output:" on Android Studio while trying to "run" the app onto the phone... and no devices showed up when phone was connected to PC.
I had tried all these (from different SO answers) but none of them worked!!!:
"Invalidate cache and restart" from File toolbar.
Turn off and turn on USB debugging on phone multiple times
Experimented with "MTP", "PTP", "Midi" and "Charging" modes to see if ADB detects something...
Checked my anti-virus software to see if adding exceptions to the adb directory works...
Installed various unnecessary C++ re-distributables
Tried a different USB cable (and USB port)
Restarted Android Studio and PC
and even uninstalled and re-installed Android studio!
The problem finally was that the platform_tools\adb.exe file downloaded by the official SDK tool manager was corrupted! So I used to get windows error code 0xc0000142 on launching adb.exe from command prompt! :(
SOLUTION:
For future readers (and victims xD) of the above ADB problem, please do the following:
Firstly, add the platform_tools\ directory into the system path environment variable.
Go ahead and replace the following 3 files in your platform_tools (C:\Users\{YourAccount}\AppData\Local\Android\Sdk\platform-tools) directory. (Please backup the same folder before, just in case.)
ADB kit (internal version number: 32)
Note: Please prefer this ADB kit (exe and dll files), compared to #sHaRkBoY 's ADB kit (2.0.0.0), since it has an updated version of AdbWinUsbApi.dll (2.0.0.1), where a race condition issue has been fixed!
I hope my answer saves your from the traumatic experience I went through while troubleshooting magical ADB for an entire day! :)

Android Studio - Android Device Monitor's File explorer not working

I have just learnt using preferences in Android. For debugging purpose I need to access the preferences files. I googled and found the default location of the preference file and also how to access it via Android Device Monitor.
Somehow I am not able to open any folders under the File explorer tab of the Android device monitor. They just aren't responding. I tried waiting for ADM to load and tried again but no success. (Double click on folder is not working, STRANGE!)
Do we need to configure before using it? I am using Android studio.
Any help would be appreciated.
Attaching image
Finally I found how to make it work.
goto run -> location where your adb is
Ex: C:\Program Files (x86)\Android\android-sdk\platform-tools
type adb root , Enter (Your phone must have root)
If this doesn't work, install this app on your phone: [root] adbd Insecure or its free alternative here (update: link broken now).
Get more info at http://forum.xda-developers.com/showthread.php?t=1687590
You will need either to use the emulator or to have a rooted phone to use all functionalities.
Root your device and open adb shell and change the permissions as:
$ adb shell
$ su
1|root#android:/ # chmod -R 777 data/

Android ADB devices unauthorized

Configuration:
Windows 8.1
ADB version: 1.0.32
Smartphone: Oneplus One
Problem
I installed the Samsung drivers as it is said to do. When I run the ADB devices command, it said unauthorized.
Already tried:
I've done everything that'd been said on this post: https://stackoverflow.com/a/25546300/1848376
But the problem is that I don't get a prompt on the phone to tell me I must accept the connection.
When I run the command adb shell, here is the answer:
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.
I did "adb kill-server", but it didn't change anything. Why?
Try Revoke USB DEBUGGING Authorization.
Enable USB debugging again.
It worked.
Thankgod xda developers exist : http://forum.xda-developers.com/verizon-lg-g3/help/unable-to-access-adb-t2830087
Just had to delete adbkey file in C:Users/$Name/.android adbkey.pub was missing.
Restart after this and both files are there.
If this does not work :
- Try Revoke USB DEBUGGING Authorization.
- Enable USB debugging again.
In sequence:
adb kill-server
in your DEVICE SETUP, go to developer-options end disable usb-debugging
press REVOKE USB debugging authorizations, click OK
enable usb-debugging
adb start-server
I removed the following files from the ~/.android folder:
adbkey
adbkey.pub
I disabled and enabled ADB within device and now it works...
in Developer options,
Enable USB debugging.
Give a authorization.
(if there is no a Developer option menu, you have to click 3 times build number of Phone State menu to be developer. you can sse a developer option menu.)
Delete existing adbkeys
OR
Rename adbkeys
Best practise is to rename the keys because it provides backup.
cd ~/.Android
mv adbkey adbkey2
mv adbkey.pub adbkey.pub2
Next stop & start the server
cd ~/Android/Sdk/platform-tools
Locate the device
/Android/Sdk/platform-tools$ ./adb devices
/Android/Sdk/platform-tools$ ./adb kill-server
/Android/Sdk/platform-tools$ ./adb start-server
Then, stop the emulator Open AVD manager, click on the down arrow, then click on wipe data
Restart the emulator. Then everything works fine :)
This worked for me
1- Go to ~/.android/ and remove “adbkey”
2- Disconnect USB connection
3- adb kill-server
4- Revoke USB debugging authorizations (in developer option)
5- Reconnect the device to the Ma
6- adb devices
Try this uncheck the "verify apps via USB" in developer options and then turn on and off the "USB Debugging". It works with me.
Ensure that you have accepted the pressed the "ok" button when it is asking it is showing the fingerprint of the device after connecting through usb to your PC.
In Android studio, Run menu > Run shows OFFLINE ... for the connected device.
Below is the procedure followed to solve it:
(Read the below note first) Delete the ~/.android/adbkey (or, rename to ~/.android/adbkey2, this is even better incase you want it back for some reason)
Note: I happened to do this step, but it didn't solve the problem, after doing all the below steps it worked, so unsure if this step is required.
Run locate platform-tools/adb
Note: use the path that comes from here in below commands
Kill adb server:
sudo ~/Android/Sdk/platform-tools/adb kill-server
You will get a Allow accept.. message popup on your device. Accept it. This is important, which solves the problem.
Start adb server:
sudo ~/Android/Sdk/platform-tools/adb start-server
In Android studio, do Run menu > Run again
It will show something like Samsung ... (your phone manufacture name).
Also installs the apk on device correctly this time without error.
Hope that helps.
None of the methods listed on this page worked for me; specifically:
I had an issue where the Settings app would crash when selecting Revoke USB debugging authorizations
I was running LineageOS 14 x86_64
I was using ADB over network
The /data/misc/adb contained no adb_keys file
Removing my local ~/.android/adbkey did not help either
I had root access from the local terminal
I was not getting any confirmation dialog
adb: error: failed to get feature set: device unauthorized.
This adb server's $ADB_VENDOR_KEYS is not set
Try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.
- waiting for device -
In the end, I found a very useful post here that suggested to manually put the contents of ~/.android/adbkey.pub inside the /data/misc/adb/adb_keys file.
They suggested one of these two methods:
From another working device, copy the adb_keys file into your computer:
# On the other Android device
cp /data/misc/adb/adb_keys /sdcard
# From your computer
adb pull /sdcard/adb_keys .
Then put the working adb_keys file into the problematic Android device's sdcard (using Web or MTP) named as adb_keys, then copy the file into the correct path:
# On the problematic device
cp /sdcard/adb_keys /data/misc/adb/adb_keys
The other method is to simply copy your machine's adbkey.pub from the ~/.android/ directory, and put it into the problematic Android device's sdcard (using Web or MTP) named as adb_keys, then copy the file into the correct path:
# On the problematic device
cp /sdcard/adbkey.pub /data/misc/adb/adb_keys
(Note: there's a similar answer on SO that goes into further details for this method.)
Since I was running a web server on my computer, and I had curl installed on Android, I su'ed from the terminal and ran the following on my Android device:
cd /data/misc/adb
curl 192.168.1.35:8080/adbkey.pub > adb_keys
Killed the adb daemon (using adb kill-server) and BAM! The adb shell worked fine, like it should have been from the beginning.
Hopefully, the method described here works for you as it did for me.
First Remove the adbkey and adbkey.pub from the .android directory in your Home directory.
Make .android directory in your home with 710 permissions: $ chmod 710 .android/ and ownership as: chown -R <user>:<user> .android/. Ex:
$ chmod 710 .android/
$ chown -R ashan:ashan .android/
Go to developer options in your mobile and tap option Revoke USB debugging authorizations
Turn off all USB Debugging and Developer Options in the device and disconnect the device from your machine.
Connect the device again and at first turn on the Developer Options. Then Turn on the USB debugging.
At this point in your mobile, you will get a prompt for asking permission from you. Note: you must check the checkbox always accept from this …. option and click ok.
Now in you machine, start the adb server: adb start-server.
Hopefully when you issue the command: adb devices now, you will see your device ready authorized.
I was hit by this problem, too. I'm using my custom build of AOSP on Nexus 5X. I've added a single line in build/core/main.mk:
diff --git a/core/main.mk b/core/main.mk
index a6f829ab6..555657539 100644
--- a/core/main.mk
+++ b/core/main.mk
## -362,6 +362,8 ## else # !enable_target_debugging
ADDITIONAL_DEFAULT_PROPERTIES += ro.debuggable=0
endif # !enable_target_debugging
+ADDITIONAL_DEFAULT_PROPERTIES += ro.adb.secure=1
+
## eng ##
ifeq ($(TARGET_BUILD_VARIANT),eng)
Now adb shell works fine
Those materials are useful (Chinese articles): http://www.voidcn.com/blog/kc58236582/article/p-6335996.html, http://blog.csdn.net/fanmengke_im/article/details/28389439
Try deleting the adbkey file from C/.android folder
and then run the commands as
mentioned above i.e.
adb kill-server, adb start-server and adb devices
.
Your app is being detected as some harmful program.
Turn off "Verify apps over USB" option. It's in the same view as "USB debugging".
All you need is to authorize debug mode.
1. make sure your Device is connected to your PC.
2. Allow authorized for debug mode via Android-Studio by going to
Run -> Attach debugger to Android process
than you will see the pop up window for allow debug mode in your Device, press OK. done.
i hope it help to someone.
I had the same problem after reinstalled my android studio. Here's what I did to make my adb work again:
-path to C:\Users\User\AppData\Local\Android\sdk\platform-tools
-Shift+r.click and start command from here instead.
for anyone encountering this later this may also help. I encountered this exact issue trying to use adb from a user command prompt and the answers above did not help, but the problem went away with an "adb kill-server" when running in an administrator command prompt.
This worked for me:
rm ~/.android/adbkey.pub
sudo ./adb kill-server
sudo ./adb start-server
sudo ./adb -s emulator-5554 install ~/apk_to_install.apk
I'm not sure if is a good idea run adb with sudo privileges,but it was the only way I get it works. Regards.
I got this as root when as a non-root user I was getting permissions errors trying to connect to custom recovery (Philz). so I killed adb server, copied the .android subdirectory of my user account into /root, chowned -R to root.root, and restarted adb server. I'm in!
Disconnect USB between PC and device
Stop adb server by entering "adb kill-server" in command window
On device use "Revoke USB debugging authorizations" in "Developer Options"
On PC delete "adbkey" file in user directory, for example "C:\Users\Amit\.android"
Reconnect the device to the PC
Open a command window and enter "adb devices". Watch the device's screen for any Authorization message and allow the connection.
I suppose you have enabled On-device Developer Options in your smartphone? If not you can take a look at the steps provided by Android, http://developer.android.com/tools/device.html#developer-device-options
For FIRE STICK 4K it actually says in the dialog:
Otherwise check for a confirmation dialog on your device
Indeed on the TV in the other room there was a confirmation dialog. Doh'!
I had this problem and it wasnt solved by the deleting of any keys (at least deleting them didnt fix it, maybe had an effect after i did fix it though)
I actually had a discrepancy between my sdk-tools version and my Android Studio version. After updating my tools it still didnt work, but after updating AS (to 1.4) everything worked fine again.
Always update both sdk-tools and AS version together ;)

Android adb show "Allow USB debugging?" window

I am using Mobogenie software to backup data on my smartphone. When I do it, program invokes "Allow USB debugging?" window on my device, obviously via ADB. The question is - how? In the screenshot below (it is in Russian language)
button which is in red ellipse says: "Show this popup window again" and when I press it, my device shows "Allow USB debugging?" window. But i couldn't find any useful information about how to do the same thing - with ADB (which command should I use) or any other way. Maybe sombody got an idea? Or is there any way to kind of trace commands or find out how this progrom does it?
ADB Secure device authorizations are stored in a whitelist located here: /data/misc/adb/adb_keys
There's no way to remove RSA keys from the whitelist without having root access.
Having said that... If you do not "Allow USB Debugging" when that window pops up (by pressing cancel) or if you do not check the box that says "Always allow from this computer", then the RSA key is not stored in the whitelist. By running adb kill-server and then adb start-server, it forces a new check of the connected computer's RSA key.
My guess is that the button that is circled is there basically just kills and restarts the ADB server to have the popup come back, in case the user did not "Always allow" or if they Cancelled the request.
EDIT: I see that Mobogenie also includes a "one click root" feature... As sketchy as that sounds, if your device is rooted, then Mobogenie could be deleting your computer's stored key from your whitelist. As for this theory, there are multiple methods - one being simply doing a pure delete:
adb start-server
adb shell
cd /data/misc/adb
rm abd_keys
exit
adb kill-server
adb start-server
I also got the same issue in my lenovo mobile. Initially I thought the issue is with my mobile.
But actually the issue is the adb don't have enough permission to read the rsa key to communicate with the device. When we run adb server it'll create a folder named .android(Linux - /home/--username--/.android, Windows - C:/Users/--username--/.android) in the home directory of the current user which contains the adb rsa key files used to communicate between the devices.
When I check the folder is assigned with root permission(I am using Ubuntu 16.04 and I don't know how its assigned). So when I try to run adb start-server it is trying to create .android folder. But the current folder with root access is not allowing this to create the adb keys. That's why its failed.
So I deleted the folder using below command. Use the particular method to delete the folder based on your operating system. Below I mentioned for linux.
sudo rm -rf .android
Then restarted the adb server using below command.
adb start-server
Now It created the .android folder with the current user permission. Once done this I got the Allow USB debugging dialog.
Hope it help someone.

Categories

Resources