unable to debug android/chrome remotely from ubuntu/linux - android

I'm an android newbie. I've got a an android with chrome v30 installed. I enabled USB debugging on it. On my ubuntu linux I've installed ADB extension for chrome v27. I plug usb cable, so the connection is established automatically (ubuntu recognizes android as "camera"). On my laptop chrome I've got an android icon (ADB icon), I turn it on (start ADB). Then a number "1" shows up in a rectangle - yes, a device has been recognized (hurray!). But I'm unable to debug my mobile gmail. Either there is something wrong or I don't know how to access ADB. I've got following sections in the View inspection targets:
Pages - these are just my laptop tabs
Extensions - chrome laptop extensions, such as JSONView
shared workers - empty
other - with one element: chrome-devtools://devtools/devtools.html?dockSide=bottom&toolbarColor=rgba(223,223,223,1)&textColor=…
Does anyone know what did I do wrong? The chrome version on mobile is ok (should be 24+, it's 30), the USB debug permission is set to true, USB cable is plugged both ways, ADB icon shows 1.
Besides, the official chrome ADB page says that I should run command adb devices, but I don't know where to execute it. I didn't install android SDK, since ADB is supposed to run without full android SDK installation. What is this command and how should I execute it?

I have the same problem with you, you can follow the steps: http://developer.android.com/tools/device.html#setting-up
you can type
lsusb
in your terminal to find your deveice's vendor id,
then follow the steps above, finally, you may
sudo service udev restart
then restart adb , and you will see the device

follow steps on https://developers.google.com/chrome-developer-tools/docs/remote-debugging#remote-debugging
make sure USB debugging is enabled in Chrome as well (required before Chrome 32 ships)
reconnect the device to see auth message on the device screen and accept it (Chrome 32 or Chrome Canary would list your device as pending auth unless you accept it)

Try enabling "PTP" mode on your device
On the device, in the notification for the cable connection, hit "Tap for more options" and select the "PTP" option.
This page specifically suggests this as one tip: https://developers.google.com/web/tools/chrome-devtools/remote-debugging/
More context:
Initially, connecting my USB cable, and refreshing chrome://inspect, I got no prompt on the device or any changes in the PC browser.
Fresh install of Ubuntu 20.04
Pixel 2 with latest Android OS I did not install any extra software
(ADB or anything related to Android dev)
Device was already working
for remote dev on other systems (Macos)

Related

chrome://inspect detects device but doesn't show pages or apps

I am trying to debug an app on android but found out that my chrome://inspect doesn't show any apps or pages anymore for my device despite showing the device itself.
I followed multiple tutorials, search for my problem on the internet but nothing came in useful and as it used to work I don't really know where to start with this issue. I will try to give you as much informations as possible:
I tested my build on emulator and on another phone (ungoogled rom, android 11.0) and everything worked just fine, I could see and debug the app
USB debugging is enabled in my developer options on the phone
my android version is 11.0
my webview version is 92.0.4515.131.
my build is a debug one (not production)
I recently changed my rom (from paranoid quartz 5 to ArrowOs 11.0) but I didn't use the inspector for a while before changing, so I suspect I affects the issue but I don't know how much
I tested it on MacOS Big Sur and ArchLinux, as well as with multiple chrome versions (eloston chromium, chrome, brave)
When trying to inspect other pages from just chrome from my phone, nothing appears either
The app runs with cordova
What am I missing here and is there a solution for my problem other than change rom again ?
Thank you very much for your answers
First, try to restart adb server. It can be done with these commands on unix if adb command is available to you in terminal. If not, then on unix instead of adb, type path (absolute to be sure) to adb executable.
adb kill-server
adb start-server
adb devices
If you can see your device in output of adb devices (only device ID will be visible), then try to disable ipv6 for your network. Adb server might not work properly when ipv6 is enabled on your computer. In my case, disabling ipv6 have fixed that issue and I could see 'Remote target' section (which was not visible when ipv6 was enabled) and my devices once connected.

Why does 'adb devices' show 'unauthorized' with no 'allow' prompt on the device?

I've installed Android Studio 2.0 on my Windows 7 PC. This included the Android SDK. I've done Android development on this PC before and was able to connect to the actual Android device (my Samsung Galaxy S6) but that was with Eclipse + ADT and with an older version of Android Studio.
Now, with the new installation, adb devices shows:
List of devices attached
05157df55345931c unauthorized
On the phone, I have Developer options turned on and USB debugging turned on. Also, under USB Configuration, I have it set to MTP. When I plug the phone into the USB port, I get the PC's auto play dialog and am able to see files/folder on the phone.
I've run adb kill-server and then adb devices. I see it starting the server, but no prompt on the phone to allow USB connections and it shows my device as unauthorized.
I've been searching everywhere for an answer to this, but all the articles I find simply talk about enabling the developer options on the phone and/or restarting the adb server - both of which I've already done.
adb version shows:
Android Debug Bridge version 1.0.32
Revision 09a0d98bebce-android
I think there must be a configuration on my PC somewhere which is preventing adb from connecting to my phone, but I don't know what it is. I've uninstalled Android Studio (and the sdk) and re-installed, but still the same problem persists.
Thanks,

Android Device Chooser: Cannot Detect Device

I am trying to use my Nexus 4 to run a hello world app. I'm using the Java ADT with Eclipse.
I cannot detect the device.
Nexus 4: Android 4.4.2
Java ADT: build v22.3.0-887826
Windows 7 Professional x64
Java JDK: jdk-7u51-windows-x64
ADB v1.0.31
Project build target is 4.4.2 (API 19). Minimum required version is API 8.
./adb devices shows no devices.
I am in USB debugging mode on the device. I have allowed installation of non-play-store apps.
My computer detects the phone as a media device (MTP), not as a camera (PTP).
I do not get a prompt asking me if I accept an RSA key.
Things I have tried:
Download USB drivers from here: http://developer.android.com/sdk/win-usb.html#top then:
Start > Properties > Device Manager > Portable Devices > Nexus 4 > Properties > Update Driver > Browse > {Download Folder}
I get a popup telling me that the drivers are up to date.
Changing the cable
Changing the USB port
Restarting Eclipse
Restarting the adb server (kill-server > start-server > devices)
Restarting the phone
Restarting the computer
Editing android_winusb.inf, as described here: USB driving on Android - new devices
I have tried everything I've seen on these pages:
http://developer.android.com/tools/device.html
http://androidsecurity.wordpress.com/2013/06/05/install-google-nexus-4-adb-usb-drivers-on-windows-android-studio/
Android Device Chooser -- device not showing up
How do I deploy HelloWorld app to HTC Eris Droid?
EDIT: I tried to enable ADB over wifi. So I installed ADB WiFi off the play store. It needs root permission, so I tried to root my phone using Kingo Root. Kingo Root does not work. It's giving me the message "No Device Connected!". I can transfer files from the device, and it gets detected when I plug it in, so I don't know it what capacity it "is not connected".
EDIT2: I tried to enable ADB over wifi as described here: How can I connect to Android with ADB over TCP?
adb tcpip 5555 gives me "error: device not found". Looks like inability to detect the device is a common failure mode. I suspect that fixing that will let everything else work as intended.
Android debugging via usb can be a bit hit-and-miss. I have one phone that never connects, one that rarely connects, and one that seems to work pretty much every time (I still have to do the 'unplug/replug/restart' shuffle from time to time)
I would suggest investigating WiFi ADB. If it works with your device (not all devices support it) then it'll save you a lot of time in the long term:
Install one of the various WiFi debug apps from the market
Run it and note the IP address and port it gives you
Navigate to where your android sdk platfrom tools are installed (a default Windows install should be C:\Android\sdk\platform-tools
Type adb connect [ipaddress]:[portno] (ex adb connect 192.168.1.100:5555)
If your device supports wifi debugging, it should show up in Eclipse within a couple of seconds, and you never need to do the plug in/unplug/restart shuffle again!
You don't need any third-party application. See this answer and set-up WiFi debugging with ADB.
EDIT:
You don't need root also.
Check my answer here: You should install the correct drivers its really easy by following the steps from the video
Hope that helps! :)

Native USB Debugging on Chrome 32 doesn't detect device

I have a Samsung Galaxy S3. With the release of Chrome 32, I wanted to try the native usb debugging so I could work with my phonegap apps while they're on my phone (rather than browser testing then transferring). I turned on USB debugging and downloaded the appropriate driver. My phone shows up in device manager but it doesn't show up under about:inspect on chrome. How do I get my device to show up?
I had a similar issue. I was previously able to inspect my phone using DevTools and the ADB extension. After the Chrome update where the ADB extension was deprecated my phone would no longer appear in chrome://inspect/ not matter what I tried.
What fixed the issue for me:
Download the Android SDK
Locate ADB.exe, found in the platform-tools folder.
Open the file using command prompt
cd c:\path\to\platform-tools\adb.exe
Make sure your phone is disconnected from USB
Type the following commands
adb devices
adb kill-server
adb start-server
Reconnect your phone, authorise your PC and enjoy the USB debugging
Hopefully that helps someone else.
I found the solution. I'd never run ADB before but that's what Chrome uses for debugging (not sure if it was downloaded when I downloaded the dev kit or if it came with Chrome 32).
From the command line I ran, adb devices. Got the message "daemon not running. starting it now on port 5037". Once it started, my device showed up in Chrome! If you haven't downloaded the android dev kit you may have to do that first.
You need Chrome on Android Beta (v32) to do this without ADB.

MK802 - Android 4.0 Mini PC - not listed with 'adb devices' command - how to install my app

I recently purchased the MK802; Android 4.0 Mini PC. However, I am unable to install the apps I developed. I have tried using the 'adb devices' command but the device does not appear on the list. I have also downloaded the Andorid 4.0 SDK (the version used in th MK802) on my computer but still no luck. I also made sure to enable 'USB Debugging' and 'Unknown Sources' in the device settings.
I realize I can load my app from an SD card (but I would have to buy one); or that I can download my app onto the device by making it available on a server or the android marketplace but these options seem like too much effort just to install an app.
Any suggestions or recommendations would be greatly appreciated.
Simply adb over USB doesn't work (for now)
The only thing that you can do is: USE WIRELESS ADB!
This widget can help you on enabling it.
Once you got everything up and running do an
adb connect xxx.xxx.xxx.xxx
using as IP the ip address of the MK802. Once connected run an
adb shell
as usual to access the remote shell. Still the system is in heavy development (at least allwinner told so)
EDIT: Using a shorter USB cable could solve the issue!
I managed to connect mine to ADB, even using the included USB cable.
Connect you computer to the dongle's OTG port (it's marked on the dongle).
Go into settings and enabled ADB debugging.
And finally (here's the trick) enable the special Connect to PC setting.
Google for the drivers. Installing the Android SDK will not ensure that your device gets detected.
Connect device
Install drivers downloaded from internet
Disconnect & reconnect
ADB !
In all likelihood, this will solve things for you.

Categories

Resources