I am trying to use this tool GemDroid https://github.com/huz123/GemDroid_QEMU. I have downloaded the AOSP android-4.4.4_r2 and built it as well. According to the link above, an AVD has to be created using Android Studio, which I did but it give selective options to download a system image, say an Android 4.4.
My first question is how can I link the AVD to the AOSP I have
downloaded? I tried pointing the location of the SDK to the AOSP
location from Files>ProjectStructure in Android Studio but it says
"SDK does not contain any platforms".
Is there a different way whereI can create an AVD directly from the
directory of AOSP?
Or according to the step "start the emulator with
your android virtual device as usual" in the link above, how can I
start the emulator from AOSP with an AVD created using Android
Studio?
I am using Ubuntu 14.04. Please help, thanks!
You don't need the Android Studio for that - just go to your root directory and type in the command line:
emulator
If this doesn't work you probably had a problem in your build.(Build the AOSP)
This is how I run the build
source ./build/envsetup.sh
lunch aosp_shamu-userdebug
./prebuilts/android-emulator/linux-x86_64/emulator
-sysdir out/target/product/shamu/
-system out/target/product/shamu/system.img
-ramdisk out/target/product/shamu/ramdisk.img
-data out/target/product/shamu/userdata.img
-kernel prebuilts/qemu-kernel/arm64/kernel-qemu
-scale 0.7
-memory 2048
-partition-size 4096
-no-window
-verbose
Related
on Ubuntu 16.04 I have installed AndroidStudio and via its AVD manager GUI did create tow new devices. now on Terminal when I type emulator -list-avds it lists the devices correctly, but when run emulator -avd <name> I face errors:
[139684796983104]:ERROR:android/android-emu/android/qt/qt_setup.cpp:28:Qt library not found at ../emulator/lib64/qt/lib
Could not launch '/home/amir/../emulator/qemu/linux-x86_64/qemu-system-i386': No such file or directory
How should I solve it?
both in Windows 10 and Ubuntu I was facing the same problem. the simple solution is that I had to go to the directory of tools then execute the command. for instance in windows.
$ cd C:\Users\user-name\AppData\Local\Android\sdk\tools
emulator -avd <deviceName>
also it is good to mention I wanted that for React-Native development, and Expo XDE saved me
I have a problem with Android Studio AVD as You can see on the image below:
AVD screenshot
I am using Android Studio 2.3.1 up to date in Fedora Linux.
No matter if I change the resolution, screen size, phone type of the AVD it looks the same as in the image.
How can I fix it?
Thank You!
I'm struggling with similar problem right now. In my case... I've created the AVD from a command line for example avdmanager --verbose create avd --force --name myEmulator--device "4in WVGA (Nexus S)" --package "system-images;android-23;google_apis;x86" --tag "google_apis" --abi "x86" and then if you want to run newly created AVD emulator you should type the command 'emulator -avd myEmulator (and optional arguments)'. Maybe it was an issue with a path to system image.
Problem:
I'm using only command line tools. AVD just worked fine some time ago. Now with various configurations I get only "Starting emulator for AVD..." which simply closes without any error messages and leaving emulator.exe in Task Manager for eternity.
What I've tried:
Various devices, API's, RAM above and below 768, with/without Host
GPU etc;
Reinstall Java;
Reinstall Android SDK;
Run emulator from command line just launches emulator.exe without any errors;
Delete .android folder in User's folder;
Set ANDROID_SDK_HOME variable;
Run SDK Manager.exe/AVD Manager.exe with/without elevated Admin rights;
verbose key gives me the following log:
emulator:Found AVD name 'jkll'
emulator:Found AVD target architecture: arm
emulator:Auto-config: -engine classic (arm default)
emulator:Looking for emulator-arm to emulate 'arm' CPU
emulator:Probing program: C:\Soft\Android\android-sdk\tools/emulator-arm.exe
emulator:return result: C:\Soft\Android\android-sdk\tools/emulator-arm.exe
emulator:Found target-specific 32-bit emulator binary: C:\Soft\Android\android-sdk\tools/emulator-arm.exe
emulator:Adding library search path: 'C:\Soft\Android\android-sdk\tools/lib'
emulator: Found directory: C:\Soft\Android\android-sdk/add-ons\addon-google_apis-google-17\images\armeabi-v7a\
emulator: Found directory: C:\Soft\Android\android-sdk/add-ons\addon-google_apis-google-17\images\armeabi-v7a\
Configuration I am working on:
Windows 10 x64
Android SDK Manager 25.1.1
Java JDK 8 Update 91
i5 CPU with 24GB of RAM
Any suggestions? TY.
I tried all the mentioned solutions. But strangely, I reduced my windows 10 laptop's resolution (from 3840 x 2160 to 1360 x 768) and it worked.
With your verbose I found you are using arm architecture devices.As you are using i5 processor,Windows10 x64 I would Suggest you to use x86 or x86-64 architecture for your devices for this you have to Install Intel x86 Emulator Accelerator (HAXM) from SDkManager.
Hope this helps let me know.
After changed the CPU of my computer and updated sdk, I encounter this problem too.
Now I temporarily solve the problem emulator-x86 I get an error about missing Qt5Core.dll, Qt5Widgets.dll and Qt5Gui.dl:
copy *.dll files in sdk\tools\lib\qt\lib to sdk\tools where the emulator-x86.exe in.
I just updated Android SDK to version 21 and trying to start emulator. I am using Nexus 4 with CPU Intel atom (x86) 768 RAM and 524 internal storage. Emulator starts fine but it shows en error message, "Storage space running out" and it is very slow. I tried increasing the RAM also but didn't work. What could be the issue?
Open AVD Manager --> Wipe Data
You have to go in your android folder e.g. on OSX ~/.android/avd/{YOUR_AVD_NAME} and edit file config.ini.
Just add or modify row disk.dataPartition.size = YOUR_SIZE
e.g. disk.dataPartition.size = 1G
Then you may have to wipe your emulator's disk.
emulator -avd "Name" -partition-size 500
This solved the issue for me.
Update on how to execute above command:
Go to a terminal
cd [android SDK directory]/tools/
linux terminal: ./emulator -avd nameOfAvd -partition-size 500 &
windows : emulator -avd nameOfAvd -partition-size 500
Go to AVD manager on your android studio.
click on the pencil icon of the virtual device.
on the pop up window click on advanced settings at the bottom.
scroll down to memory and storage and alter the default definitions of MB/GB etc.
REinstal the emulator..
Go to your AVD location and delete all the files in avd folder( C:\Users\acer.android\avd ),
then Go to android studio AVD Manager and install a new emulator.
( but this will erase the current emulator so, you'll need to download it again..)
While trying to follow the Tweaking the Android Emulator to include the Scala libraries natively on the emulator, I can't get the custom ramdisk image to load. It appears that the emulator -ramdisk command line option is ignored.
Thanks to Colin on the scala-on-android Google group, he confirmed that there is a defect in the emulator's -ramdisk option.
His workaround, which I verified successfully is to copy the ramdisk.img to the directory of the AVD that you wish to use. On Windows, the AVD files are stored at c:/Users/[UserName]/.android/avd. On Linux, they are stored at ~/.android/avd.
After the ramdisk.img is copied, just start the emulator as usual (no -ramdisk option is necessary).