I am struggling to get past the "Pending Authorization" stage when trying to do some Remote Debugging with my Android phone and Chrome running on my PC.
I have successfully got past this "Pending Authorization" twice now, so I know it is possible. Also my PC can read the files on my phone as well, so the connection between them is sound.
The problem is the pop up on my phone asking for authorization rarely pops up, and when it does, allowing authorization rarely does anything.
These are the steps I have tried - all of this assumes that both my PC and Phone are on, they are not locked and they both have Chrome running on them.
Plug my phone into my PC via a USB cable
Almost immediately a "Use USB to transfer files" pop up appears on my phone, whether I ignore this pop up or tap OK or Cancel seems to make little difference to the problem I am having.
After a short while I then get the "Allow USB Debugging" pop up. In Chrome on my PC I can see under Remote devices that there is an "Unknown" device that is "Pending Authorization".
Ticking the box "Always allow from this computer" makes little difference, and my PC still complains that my device is "Pending Authorization"
If I hit OK what usually happens is very little, the pop up on the phone disappears and my PC/Chrome still shows "Pending Authorization".
Occasionally the phone and my PC connects, and I get past the "Pending Authorization" part. However this doesn't last long and I end up with "Debugging connection was closed. Reason: Connection lost." - however despite it saying "connection lost" here I can still connect to the files on my phone.
To reiterate - the connection between my phone and my PC seems stable and fine, I have no problems transferring files between the two.
The problem I am having is getting past this "Pending Authorization" stage - can anyone help?
Some details:
Phone: Nokia 3
Android: 8.0.0
Chrome (on Phone): 76.0.3809.132
PC: Windows 10
Chrome (on PC): 76.0.3809.132
You need to turn on usb debugging on your phone, otherwise you can not connect to your device. You can turn on usb debugging through the Developer options on your device.
Developer options is also something your have to turn on. You can accomplish this by following the steps explained on this page:
https://developer.android.com/studio/debug/dev-options
Related
I am using chrome://inspect/?#devices to connect with my android device.
After ~20 minutes my device gets disconnected automatically every single time.
After it gets discontinued my device asks for allowing usb device again. And if I run adb devices on my Mac, I am unable to see my device since it got disconnected.
I wanted to know the why this is happening and is there a fix available for this or not.
Aim: I want to connect my android device at least for 3 hours without interruption.
I have tried this with multiple devices, multiple data cable and multiple physical conditions but I don't think the issue is from hardware side. USB Debugging is on and the connection stays for a few minutes without any issue, everything works fine for some minutes(not fixed but it is around 20 minutes).
Adding images of my android device and macbook after the connection gets disconnected:
If you are facing similar issues then here are the things that you can try:
Try different USB cable(s)
Try different USB ports on your machine(for some people using 2.0 port worked out)
Try the same process, with unchecked 'Discover USB Devices' in chrome://inspect (then Chrome will connect through the ADB server, not directly) ==> This solution worked in my scenario.
I'm going nuts here. I am trying to debug my app on a Samsung Galaxy Tab S5e.
My application runs a VPNService and I am reasonably sure this is the root cause of the following issue:
When debugging via USB, everything works fine. However, when I debug over WIFI, it keeps prompting me to "Allow USB debugging", saying something about the computers RSA key fingerprint and whether I want to "always allow from this computer", which I obviously select and then click "allow".
If I try debug my app again, it will again prompt me...
I've tried:
restarting the device.
killing adb and starting it again
restarting my machine (Macbook Pro)
revoking all USB debugging authorisations
deleting the adbkey.pub and adbkey files
FACTORY RESET OF DEVICE
Nothing works.
Does anyone know how I can solve this? I have to go via wireless because I need to measure energy consumption... which I cannot do if the device is being charged.
I have LG Optimus L70, the system stopped working suddenly.
The problem was that the bootloader is corrupt, so I have to install a new one.
In order to do that, it would be easier to enable USB debugging mode, but the problem is:
When ever I check USB Debugging the phone vibrates indicating that it is connected to PC, when i go to Device Manager on windows, it showed that the device is connected as Single ADB Interface.
The key problem that the phone's system is corrupt even after hard resetting it, so no pop up is shown, so, no RSA authorizing pop up is shown.
How can I automatically accept RSA? or make my device usable in ADB at least?
I have tried all other posts mentioned here in stackoverflow, but non of them seems to solve the problem.
Settings -> Developer -> Revoke authorizations usb debugging
I am developing an app for a new Android device (on all other I've never had this issue).
It's running 4.2.2
I have enabled developer mode and allowed usb debugging (I receive the status notification that usb debugging enabled)
However, in chrome://inspect the screen keeps alternating between the below two messages, seems it can't make up it's mind!
ratech72_wet_rlk_lca #0123456789ABCDEF
Offline #00180123456789ABCDEF Pending authentication: please accept debugging session on the device.
I've tried unplugging and restarting everything to no avail
When I plug in the device I see the following status messages on the device systray, in this order
Connected as USB Storage
USB Debugging Connected
USB Connected
How can I access chrome inspect on this device? I am using logcat for now but it's far less powerful than chrome dev tools.
This is a known issue.
The answer in the link (changing USB mode from MTP to PTP) did work for me for some time, however others have had less success, and my setup has now regressed to the erratic connection you are seeing.
Personally, I just try to play quick draw and click on the device when it's listed before it disconnects again, which after a bit of practice doesn't take too long, and once you've done that, the actual inspect tools don't have the same erratic connect/disconnect problem so you should be fine until you physically disconnect the device.
This should be resolved in a future version of Chrome.
I know this is an old question, but nonetheless, this is what helped me:
while in Chrome chrome://inspect/#devices page is opened
turn off USB Debugging,
turn on USB Debugging again
The phone will ask me if I trust the connection...
You will need to check out the Facebook Stetho debugging tool:
http://facebook.github.io/stetho/
It is pretty easy to get up and running. And it works well if you are using OkHttp developed by square to debug networking tools.
add to gradle:
dependencies {
implementation 'com.facebook.stetho:stetho:1.5.0'
}
then in your application class:
Stetho.initializeWithDefaults(this);
and then go to chrome://inspect in your browser and you should see your device
This is what I did in Android 10 (Oneplus 7t pro), to make it to work(in addition to #gordan.sikic answer).
While in Chrome, keep chrome://inspect/#devices page opened
Click and accept, Android Phone -> Settings -> Developer Options -> Revoke USB debugging authorizations
Turn off USB debugging
Turn on USB debugging, accept Allow USB debugging.
Then you 'll see Always allow from this computer Notification
In the virtual Device Manager I selected Wipe Data from the Actions.
Then I started the virtual device.
Then I ran the app and it worked in the emulator.
I found that sometimes I am unable to inspect Android device via Chrome://inspect because I'm in some other country and connecting to US server on both the mobile device and the dev machine via VPN fixes the problem.
I am having trouble running my application on a particular phone. It runs correctly on a different phone and on an emulator. I have the standard unauthorized issue coming up in my ADB logs:
PropertyFetcher: AdbCommandRejectedException getting properties for device [My Device's ID]: device unauthorized. Please check the confirmation dialog on your device.
When I try to run the application anyway on the phone in question, it is able to target the phone and runs the app, but immediately hits a null pointer (that isn't present when running on the other phone or the emulator).
Before you insta-lock this question, I've tried everything in all of the duplicate questions. Specifically
I have set the target to show chooser dialog
I have reset the ADB server
I have revoked and re-accepted permissions, and tried changing the USB type
I have confirmed that Enable ADB Integration is checked
None of which worked.
Furthermore, the same phone was working earlier (not sure what changed), so it's not a bad USB cord.
The phone is a new Nexus 6, and the old phone that works correctly is a Samsung Galaxy S4.
Running adb devices in the android studio terminal shows:
List of devices attached
[My Device's ID] device
Which implies (?) that it is in fact authorized.
You have missed the Fingerprint Certificate Authorization popup in your phone when you connected it. To solve disconnect and plug-in again.Wait for some seconds and a confirmation popup will appear. Click OK.