I am really struggling to get Google Chrome Remote Debugging to work! I have the phone setup and confirmed:
Then below are what I see in chrome://inspect/#devices and also F12 (both open at the same time);
It flashes with the "Connected" for about 3 seconds, and then goes to:
Offline
ZX1G324RSV Pending authentication: please accept debugging session on the device.
It's driving me nuts, as it should be simple to do, but it just doesn't want to play ball :/ Do I need to do anything special? I've used it before on this PC and although I had some fun and games with it the first time around, it worked after that.
There seems to be a ton of posts/articles about how to fix it, but none of them are working for me. https://bugs.chromium.org/p/chromium/issues/detail?id=450492 for example.
Download Android SDK here ("SDK Tools Only" section) and unzip the content.
Run SDK Manager.exe and install Android SDK platform tools
Open up the Command prompt (simply by pressing the windows button and type in cmd.exe)
Enter the path with ex: cd c:/downloads/sdk/platform-tools
Open ADB by typing in adb.exe
Run the following command by typing it and pressing enter: adb devices
Check if you get the prompt on your device, if you still can't see your phone in Inspect Devices run the following commands one by one (excluding the ") "adb kill-server" "adb start-server" "adb devices"
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.
Related
I am working in WSL2 on Windows 11 trying to run an index.js file with Live Server. Whenever I open Live Server it seems that I can only do so when I use Microsoft Edge. This seems to add another layer of problems because the JavaScript does not seem to be working as I would expect. For example, if I click a button element I don't see any animations to signify a "click".
I have checked that "liveServer.settings.CustomBrowser": "chrome" is indeed reflectin Chrome in the VS Code settings, but when this is the case there are no windows that pop up at all. The only thing that I see trigger is a notification that tells me that the server is active on Port 5000, just no window popping up to demonstrate that. Ideally I would like to try and open Live Server with Chrome, but if this isn't possible in Windows 11 then is there a way to make JavaScript behave in Microsoft Edge?
I've the same configuration and the same issue. I've raised the issue #2445 in Github.
A workaround solution is to call directly your chrome program installed under windows to your liveserver setting.
check that chrome is well installed on W10 or W11. You can test it by opening a command line and running "start chrome", then chrome browser must open.
look for chrome' installed directory. You can use this command to find it: sudo find /mnt/c/ -type f -iname chrome.exe 2>&1 | grep -v "Permission denied". For me this it's here:mnt/c/Program Files/Google/Chrome/Application.chrome.exe.
Now change liveserver setting on your settings.json file:
{
"liveServer.settings.AdvanceCustomBrowserCmdLine": "/mnt/c/Program Files/Google/Chrome/Application/chrome.exe --remote-debugging-port=9222",
}
Now chrome should start when you run liverserver.
Hope this help
I can see the device list on VSCode in Windows.
And I can select any one.
And the emulator is opening.
But I can see a single message. "Waiting for a connection from Flutter.."
Application does not open.
It doesn't get any errors either. Waiting like this.
Make sure that your API level you're running your device on is the
same as what you have installed on Android Studio.
1.1 Click on the SDK Manager button around the top right corner of AS (The icon is a box with a down arrow next to it).
1.2 Choose the same API level as your device, (When I didn't do this I had a partial install and it took some time to compile), then
click apply and wait for it to install.
We're going to run the project to our avd or mobile device from the directory of ourproject.
2.1 Open up the Command Prompt (preferably as Admin), and chage the directoy to where your project is, the command should look something
like this:
cd Documents/flutterprojects/yourflutterproject.
2.2 Finally type the command flutter run.
Restart the Emulator by holding the power Button and Selecting restart and then try again.
if that failed to work, simply restart your computer.
I have already tried with following process:
Click Start, and then click Control Panel.
2 .On the Control Panel Home page, click Programs.
In the Programs and Features section, click Turn Windows features on or off.
If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Continue.
In the Windows Features list, select Telnet Client, and then click OK.
After successful installations, run the same telnet command.
iii). Type:
power capacity 100
After following the mentioned process, emulator stops working?
If anyone could help me in this regard, please leave a comment.
Is it only the power command that makes the emulator stop? Try running other commands on telnet and let me know
If it is only power that does not work then try this
In your avd manager check the details of your emulator. See to it that hw.battery is yes and then run your emulator again and try using the power capacity 100 command from telnet localhost. It should work
use telnet command:
power status discharging
I know there are numerous threads on how to capture network traffic using tcpdump, wireshark etc. I tried enabling -tcpdump emulator1.cap in Eclipse > Run Configurations. But I don't know where
this data is captured. Can someone please let me know the step by step instructions on how to use tcpdump to capture traffic?
It is stored on the PWD of the emulator. If I start the emulator from the command line, like
$ emulator -tcpdump emulator1.cap -avd x86
then I get a nice emulator1.cap file.
Using Eclipse you'd probably like to do an absolute path.
Try writing -tcpdump /tmp/emulator1.cap or -tcpdump C:\emulator1.cap (on Windows)
In my case I tried doing that but I got some emulator warning like:
emulator: WARNING: The -tcpdump flag is not supported in QEMU2 yet and will be ignored.
By the way, the command I issued in the console is /path_to_sdk/sdk/tools/emulator -tcpdump /path_to_save/emulator1.cap -avd Nexus_7_API_22.
Does anyone have ideas about what image or engine does the emulator support tcpdump flag?
Today I installed the latest version of Eclipse, Android SDK and AVD plugin. But I have a tedious problem. When I want to quit the emulator (with the X button), the emulator freezes and I can't click anything there anymore. Obviously it has something to do with the sound, because when I execute "pulseaudio -k" in console, the emulator quits.
Due to this fact, I tried the following to let the emulator at least run properly:
In Preferences->Android->Launch -> Default Emulator option -> -noaudio
and
Run Configuration -> Android Application -> [Application] -> Target -> Addidtional Emulator Command Line Options -> -noaudio
But nothing helps. Emulator stays frozen. Actually I want audio to run, but switching it off doesn't work either. So what can I do?
I replied on the issue, but just if interested:
you may need to disable audio output instead, this is not desirable for me, so just select alsa (or esd/oss) by setting environment variable
QEMU_AUDIO_DRV=alsa
Looks like there is no way to specify audio drivers in hardware.ini so the best solution is going to sdk tools directory, rename emulator in emulator.real and make a shell script named emulator containing:
#!/bin/sh
export QEMU_AUDIO_DRV=alsa
exec $(dirname $0)/emulator.real $*
then chmod 755 emulator
It's this problem described here:
http://code.google.com/p/android/issues/detail?id=17294
There is a workaround so that you can quit the emulator:
Set in your virtual devices "Audio Playback Support" and "Audio recording support" to "no".