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".
Related
Prior to today, everything was working fine and I was able to deploy from Unity to specifically an APK. I wasn't able to operate in "Play" mode so I tried updating the Oculus Platform SDK, which proceeded to hang in "Installing..." forever, leading to my current predicament.
What happens:
I hit "download" on anything inside the Downloads section of the Oculus Developer Hub
It hangs saying "Installing..." for hours and does nothing.
Also, when I try to change my ADB Path in Oculus Developer Hub, it "fails" and asks me to try again, but the new value is present every time.
I've tried installing/uninstalling both ODH and Oculus software. I've tried changing the ADB path. I've tried installing and adding JRE and NDK to the path. I'm running out of options here. Does anyone have any advice? This is blocking me from doing development work in Unity.
To avoid issues, ODH (Oculus Developer Hub) must reference the same adb.exe as the one referenced by your Unity Editor.
If, for instance, you are using the Unity Editor 2021.3.1f1 with the standard settings (you didn't changed the default installation path and also installed the Android Build Support module and the corresponding sub-modules), then Unity will use the adb.exe found in:
C:\Program Files\Unity\Hub\Editor\2021.3.1f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\adb.exe
ODH has a buggy behavior when trying to change the ADB path (ODH > Settings > General > ADB Path > Edit): when you select the desired adb path from the Detected ADB Clients drop down and click Restart ODH, you get the following error message:
"Unable to change ADB path and restart ODH. Please try again."
Just ignore the error message. Dont' click Cancel, just close ODH and start it again. Then navigate again to the menu where you changed the ADB path, i.e. ODH > Settings > General > ADB Path > Edit. You should now have the path you chose before manually restarting ODH.
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 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.
I have Fedora 10, it's an old machine.
When I launch the Emulator, it comes up, but I don't
get any initial "Android" display text on the screen, and I've tried
waiting ages.
I installed the Java JDK 7 first then 'android-sdk-r22.2.1-linux.tgz'
and I even set the "alternates" for Java.
I've tried several Emulators, like the 4.3 with the armeabi
and an earlier 3.2. I also tried launching them from the command line with:
emulator -no-audio -gpu off -avd [AVDName] and I even tried '-force-32bit'
but nothing is working.
I've used the Emulator on Windows for a long time, so I'm
very familiar with how to use them, but I just can't get them working on Linux,
what can I try?
Thanks!
This will work:
1) Create a Phone in Eclipse using the Android Virtual Device Manager
(Navigation Bar | Window | Android Virtual Device Manager)
2) Open a terminal in: yourInstallationFolder/sdk/tools
3) Type: ./emulator #theNameofYourPhone -force-32bit
I had exactly the same issue, with the latest build tools - emulator would not launch, adding -debug-init showed that it couldn't get past this line:
ping command: /path/to/android-sdk-linux_86/tools/ddms ping
emulator 22.3.0 "NVIDIA Corporation" "GeForce 8600 GTS/PCIe/SSE2"
"3.3.0 NVIDIA 331.20
But sometimes it worked, it got past this and printed some debug info about display surface, pixel format etc - then emulator was working.
I tried soooo many things, none worked, but it seems I found the solution!
It looks like emulator always starts OK if I launch it from the first virtual desktop! And not working, 'hanging' - when launched from others.
Took some time to figure out, because my main 'development' virtual desktop is a second one :)
Dunno whos bug this is, NVIDIA's, xorg's or emulator's, but I hope this workaround will keep working :)
I have been pulling my hair out on this issue all week... I finally just tried a different DE. I launched an icewm session and the emulator is not running just fine. It seems to be an issue either with GTK or KDE's WM.
Any ways, I hope this helps solve the issues you might be having.
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?