Sample Header Ad - 728x90

Android Enthusiasts

Q&A for enthusiasts and power users of the Android operating system

Latest Questions

1 votes
2 answers
1855 views
Cold boot: snapshot failed to load
Sometimes I start Android Emulator with the GUI, and sometimes I start with the CLI. If I keep using the same method, everything is fine, but if I switch between methods, it causes problems. For example if I start the emulator with the CLI, then shut down, then start again using the GUI, I get this:...
Sometimes I start Android Emulator with the GUI, and sometimes I start with the CLI. If I keep using the same method, everything is fine, but if I switch between methods, it causes problems. For example if I start the emulator with the CLI, then shut down, then start again using the GUI, I get this: ~~~ Cold boot: snapshot failed to load ~~~ If I start with the GUI, then shut down and start with the CLI, I get this: ~~~ qemu-system-i386.exe: Failed to load virtio-blk:virtio ~~~ Here is the command I use with CLI: ~~~ adb start-server emulator -writable-system -avd Pixel_2_API_24 ~~~ Am I doing something wrong?
Zombo (1 rep)
Oct 19, 2021, 02:46 PM • Last activity: Jul 2, 2025, 03:53 AM
0 votes
0 answers
190 views
Android Emulator Hypervisor Driver
I am using android studio 2.2.3. I am trying to run an avd. Whenever i run it, it gives me warning that intel haxm is deprecated and to switch to android emulator hypervisor driver(aehd). I have installed aehd but the avd is not using it i guess. I still get the warning that aehd is deprecated. What...
I am using android studio 2.2.3. I am trying to run an avd. Whenever i run it, it gives me warning that intel haxm is deprecated and to switch to android emulator hypervisor driver(aehd). I have installed aehd but the avd is not using it i guess. I still get the warning that aehd is deprecated. What should i do?
Pratik Mehta (1 rep)
Mar 24, 2024, 08:47 AM
5 votes
1 answers
8499 views
Can I get more RAM in emulator while still having a Google Play image?
I know how to make a new system image, by cloning an existing one... But, I can't alter the amount of RAM in a Google Play-enabled image, without the clone being non-Google Play. Is there a way to give more RAM to the image while keeping it Google Play-able, instead of the default 1.5GB?
I know how to make a new system image, by cloning an existing one... But, I can't alter the amount of RAM in a Google Play-enabled image, without the clone being non-Google Play. Is there a way to give more RAM to the image while keeping it Google Play-able, instead of the default 1.5GB?
Malady (155 rep)
Jul 21, 2020, 12:48 AM • Last activity: Mar 17, 2024, 12:10 PM
1 votes
0 answers
960 views
Built AOSP, can't run emulator
Following the directions to build AOSP, everything seems to go fine. I run: ``` . ./build/envsetup.sh lunch sdk_phone_x86_64-userdebug make m ``` That seems to go fine. Then the instructions say simply to run `emulator`. ``` user@hostname:~/WORKING_DIRECTORY$ emulator INFO | Android emulator version...
Following the directions to build AOSP, everything seems to go fine. I run:
. ./build/envsetup.sh
lunch sdk_phone_x86_64-userdebug
make
m
That seems to go fine. Then the instructions say simply to run emulator.
user@hostname:~/WORKING_DIRECTORY$ emulator
INFO    | Android emulator version 31.3.9.0 (build_id 9070145) (CL:N/A)
ERROR   | No AVD specified. Use '@foo' or '-avd foo' to launch a virtual device named 'foo'

user@hostname:~/WORKING_DIRECTORY$ emulator -list-avds
Nothing is listed. So I feel like the instructions are missing a step? How do I create an AVD? So, I found some more instructions that say:
avdmanager create avd -n test -k "system-images;android-25;google_apis;x86"
But I'm not sure where the system[...] came from, but more importantly when I try that:
avdmanager: command not found
So again, I feel I'm missing a step. I'm looking for a COMPLETE set of steps, from soup to nuts, to compile AOSP and run the emulator. I would like to do this from the command line and avoid having to install Android Studio. Details on my machine:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.2 LTS
Release:        22.04
Codename:       jammy
Gorilla Sapiens (11 rep)
Jun 17, 2023, 04:47 AM • Last activity: Jun 17, 2023, 07:32 AM
0 votes
0 answers
104 views
Run avdmanager with sudo
I am running `avdmanager create avd` from my python script that I start with `sudo -E` to make my script be able to do priveldged stuff. But for some reason avdmanager created AVD inside `/root/.android/avd`, but not inside `/home/user/.android/avd`. How does it know that it is being run with sudo?...
I am running avdmanager create avd from my python script that I start with sudo -E to make my script be able to do priveldged stuff. But for some reason avdmanager created AVD inside /root/.android/avd, but not inside /home/user/.android/avd. How does it know that it is being run with sudo? I am really confused. Please, help me to figure this out.
Euler-Maskerony (1 rep)
Apr 24, 2023, 05:06 PM
7 votes
1 answers
18024 views
How to change location of AVD (Android Virtual Devices) files to external SSD?
I have limited SSD on my Mac. I have an external SSD. I would like to store multiple virtual devices, far beyond the capacity of the Mac internal storage. **How to configure location of AVD?** # Attempt 1 I tried using: https://stackoverflow.com/a/30614524/775359 `ln -s /Volumes/1TB/.android .androi...
I have limited SSD on my Mac. I have an external SSD. I would like to store multiple virtual devices, far beyond the capacity of the Mac internal storage. **How to configure location of AVD?** # Attempt 1 I tried using: https://stackoverflow.com/a/30614524/775359 ln -s /Volumes/1TB/.android .android The files are stored on SSD but when I try to launch, it keep bouncing in the dock 😢 enter image description here # Attempt 2 https://developer.android.com/studio/command-line/variables.html > **ANDROID_AVD_HOME:** Sets the path to the directory that contains all AVD-specific files, which mostly consist of very large disk images. The default location is $ANDROID_EMULATOR_HOME/avd/. You might want to specify a new location if the default location is low on disk space. This should be exactly what I need, trying this solution again:
export ANDROID_SDK_ROOT="/Volumes/1TB/Android/"
export ANDROID_EMULATOR_HOME="/Volumes/1TB/emulator/"
export ANDROID_AVD_HOME="/Volumes/1TB/emulator/avd/"
### 23 seconds video: https://youtu.be/8bPv85RnzP4 😢 # Attempt 3 Formatted and partitioned the external SSD. enter image description here enter image description here It doesn't start, see the split-second popup 😢 ---- Handy answer to go nuclear: https://stackoverflow.com/a/45669617/775359
rm -Rf /Applications/Android\ Studio.app
rm -Rf ~/Library/Preferences/AndroidStudio*
rm ~/Library/Preferences/com.google.android.studio.plist
rm -Rf ~/Library/Application\ Support/AndroidStudio*
rm -Rf ~/Library/Logs/AndroidStudio*
rm -Rf ~/Library/Caches/AndroidStudio*
rm -Rf ~/AndroidStudioProjects
rm -Rf ~/.gradle
rm -Rf ~/.android
rm -Rf ~/Library/Android*
Mars Robertson (181 rep)
Nov 22, 2019, 10:14 AM • Last activity: Apr 22, 2023, 03:02 AM
5 votes
2 answers
8313 views
"cannot add library libvulkan.so" when trying to start emulator
This is my first time attempting anything Android. I have installed Android Studio 2021.3.1 Patch 1 on Ubuntu 22.04 and created an Empty Compose Activity as a test. The Device Manager looks like this [![enter image description here][1]][1] But when I try to run it I get The emulator process for AVD...
This is my first time attempting anything Android. I have installed Android Studio 2021.3.1 Patch 1 on Ubuntu 22.04 and created an Empty Compose Activity as a test. The Device Manager looks like this enter image description here But when I try to run it I get The emulator process for AVD Pixel_XL_API_33 has terminated idea.log contains INFO - Emulator: Pixel XL API 33 - [...]android-sdk/emulator/emulator -netdelay none -netspeed full -avd Pixel_XL_API_33 -qt-hide-window -grpc-use-token -idle-grpc-timeout 300 INFO - Emulator: Pixel XL API 33 - Android emulator version 31.3.13.0 (build_id 9189900) (CL:N/A) INFO - Emulator: Pixel XL API 33 - emulator: INFO: Found systemPath [...]/android-sdk/system-images/android-33/google_apis/x86_64/ WARN - Emulator: Pixel XL API 33 - Failed to process .ini file ~/.android/avd/Pixel_XL_API_33.avd/quickbootChoice.ini for reading. WARN - Emulator: Pixel XL API 33 - cannot add library [...]/android-sdk/emulator/qemu/linux-x86_64/lib64/vulkan/libvulkan.so: failed INFO - Emulator: Pixel XL API 33 - WARNING: lavapipe is not a conformant vulkan implementation, testing use only. INFO - Emulator: Pixel XL API 33 - Process finished with exit code 139 (interrupted by signal 11: SIGSEGV) ERROR - Emulator: Pixel XL API 33 - Emulator terminated with exit code 139 This happens with Android 5.0 and 8.1 projects. As per [this question](https://stackoverflow.com/questions/68741533/android-emulator-does-not-start-after-arctic-fox-upgrade-libvulkan-so-failed) I have tried sudo ubuntu-drivers autoinstall which gives "/usr/bin/ubuntu-drivers", line 187, in command_install UbuntuDrivers.detect.nvidia_desktop_pre_installation_hook(to_install) File "/usr/lib/python3/dist-packages/UbuntuDrivers/detect.py", line 839, in nvidia_desktop_pre_installation_hook with_nvidia_kms = version >= 470 UnboundLocalError: local variable 'version' referenced before assignment and mesa-vulkan-drivers are already installed. How do I fix this error and run a basic project out-of-the-box in an emulator on Linux?
spraff (279 rep)
Dec 5, 2022, 10:17 AM • Last activity: Apr 12, 2023, 08:04 AM
1 votes
2 answers
6320 views
How do I resize internal storage of an Android Studio AVD image that's stuck at 200MB?
When I try to resize the internal storage partition size in AVD (Android Virtual Device) manager to anything larger than 200MB, the darn thing stays at 200MB. This mounts to `/data` directory. The problem rears it's head with Android API 19 / KitKat 4.4.x images and possibly others. I'm on a Mac.
When I try to resize the internal storage partition size in AVD (Android Virtual Device) manager to anything larger than 200MB, the darn thing stays at 200MB. This mounts to /data directory. The problem rears it's head with Android API 19 / KitKat 4.4.x images and possibly others. I'm on a Mac.
mansilladev (121 rep)
Apr 20, 2016, 12:53 AM • Last activity: Sep 16, 2022, 10:17 AM
2 votes
3 answers
5851 views
Android AVD throws errors, such as "Failed to sync vcpu reg"
[How do I fix “Failed to sync vcpu reg” error?](https://stackoverflow.com/questions/17024538/how-do-i-fix-failed-to-sync-vcpu-reg-error) does not help. I tried all the solutions I could for Mac on the post but none worked. I started a new project and tried to run the emulator, but I get these errors...
[How do I fix “Failed to sync vcpu reg” error?](https://stackoverflow.com/questions/17024538/how-do-i-fix-failed-to-sync-vcpu-reg-error) does not help. I tried all the solutions I could for Mac on the post but none worked. I started a new project and tried to run the emulator, but I get these errors: HAXM is working and emulator runs in fast virt mode emulator: Failed to sync vcpu reg emulator: Failed to sync HAX vcpu context It used to work yesterday. I didn't change/download anything. Why did it stop working? I also made sure there are no other processes of the emulator running. I'm running Android Studio in OS X Yosemite.
o.o (121 rep)
Sep 8, 2015, 04:02 AM • Last activity: Dec 23, 2021, 06:25 PM
4 votes
3 answers
81687 views
AVD doesn't work after installing Android Studio
I installed Android Studio, but when I try to run, the emulator is not working. When I googled, I find some instructions in which the > 1. Open SDK Manager and Download Intel x86 Emulator Accelerator (HAXM installer) if you haven't. > 2. Now go to your SDK directory (C:\users\username\AppData\Local\...
I installed Android Studio, but when I try to run, the emulator is not working. When I googled, I find some instructions in which the > 1. Open SDK Manager and Download Intel x86 Emulator Accelerator (HAXM installer) if you haven't. > 2. Now go to your SDK directory (C:\users\username\AppData\Local\Android\sdk, generally). In this directory Go to extra > intel > Hardware_Accelerated_Execution_Manager and run the file named "intelhaxm-android.exe". > In case you get an error like "Intel virtualization technology (vt,vt-x) is not enabled". Go to your BIOS settings and enable Hardware Virtualization. > 3. Restart Android Studio and then try to start the AVD again. but I don't know where is BIOS setting of my computer. I have HP desktop CPU and try to find the BIOS from start, F10 as well as from change PC setting in Windows, but all in vain.
shmuneeb (41 rep)
Aug 8, 2015, 12:41 PM • Last activity: Dec 11, 2021, 06:34 PM
1 votes
0 answers
189 views
Which format the system images for avd are in
After downloading an image for android virtual device via avdmanager there are system.img userdata.img ramdisk.img and kernel_ranchu in system images folder. Which format are they in and how to read/mount them outside avd? My investigation so far: As many people here and over the internet suggests t...
After downloading an image for android virtual device via avdmanager there are system.img userdata.img ramdisk.img and kernel_ranchu in system images folder. Which format are they in and how to read/mount them outside avd? My investigation so far: As many people here and over the internet suggests they are sparse images. But they are nit. Simg2img hence doesn't work. System.img is not a raw ext4 image either.
ststem.img
returns dos/mbr boot sector. With
-l
there are 2 partitions in the gpt partitioned image, labeled as linux partition.But setting up
none can be mounted. Even
-s
doesn't recognize partitions. Interestingly first partition os from offset 2048 to 4096. Second is the rest. These images are definitely not encrypted as
returns readable data like app names script contents. So I'm wondering what kind of filesystem that can be. Ps: the sw apply for both google play and aosp devices.
flappybirdy (11 rep)
Sep 3, 2021, 05:09 PM • Last activity: Sep 3, 2021, 06:08 PM
-1 votes
1 answers
1683 views
is CPU virtualization needed to run Android Virtual Device?
My Dell Laptop has **Intel® Core™2 Duo Processor T6400** (2M Cache, 2.00 GHz, 800 MHz FSB) CPU which has no virtualization support. http://ark.intel.com/products/40479/Intel-Core2-Duo-Processor-T6400-2M-Cache-2_00-GHz-800-MHz-FSB Above link says : Intel® Virtualization Technology (VT-x) ‡...
My Dell Laptop has **Intel® Core™2 Duo Processor T6400** (2M Cache, 2.00 GHz, 800 MHz FSB) CPU which has no virtualization support. http://ark.intel.com/products/40479/Intel-Core2-Duo-Processor-T6400-2M-Cache-2_00-GHz-800-MHz-FSB Above link says : Intel® Virtualization Technology (VT-x) ‡ no My basic hello world Android application using eclipse not able to open AVD. I can not see device window opening. is that CPU visualization problem ? Thanks in advance
coder007 (101 rep)
May 4, 2015, 10:42 AM • Last activity: Jul 6, 2021, 08:04 PM
0 votes
0 answers
346 views
Are the IMG files in the AVD data directory really encrypted?
If I enable phone encryption with password or PIN on my Android Virtual Device, will that actually make the raw NAND images (`*.img` / `*.qcow2`) encrypted? Does it render the data in those files inaccessible? If the `*.img` and `*.qcow2` files are really sector-level-encrypted, is there a script or...
If I enable phone encryption with password or PIN on my Android Virtual Device, will that actually make the raw NAND images (*.img / *.qcow2) encrypted? Does it render the data in those files inaccessible? If the *.img and *.qcow2 files are really sector-level-encrypted, is there a script or program to decrypt them outside of the AVD? I'm not referring to the sdcard img and qcow2 files, but rather the userdata-qemu img and qcow2 files. Reference: * https://developer.android.com/studio/run/emulator-commandline#data-filedir
Dan (131 rep)
May 10, 2021, 05:08 PM
1 votes
0 answers
264 views
Recently deleted my AVD and did not get back the 8 GB it took up?
I haven't used Android Studio in a few months so I went ahead and deleted my AVD and system image from the tools menu inside Android Studio. The image deleted fine, however I notice that while the AVD was gone, I did not get back the ~8 GB it took up. I also see that my pagefile.sys has grown to rou...
I haven't used Android Studio in a few months so I went ahead and deleted my AVD and system image from the tools menu inside Android Studio. The image deleted fine, however I notice that while the AVD was gone, I did not get back the ~8 GB it took up. I also see that my pagefile.sys has grown to roughly the same size. Is this due to the AVD using this as virtual memory and not reallocating it back to my hard drive after deletion? I can manually go into settings and change my pagefile.sys size but I want to make sure that this was a result of the AVD initial install before I mess around with my partitions. I vaguely remember Android Studio asking about RAM allocation for optimal AVD performance during the initial install.
Dave (11 rep)
Feb 23, 2021, 03:16 AM
16 votes
1 answers
31142 views
Launch AVD manager from command line
- I'm on Windows 10. - Android studio version 2.3.3 How can I launch the AVD Manager with-out opening the Android Studio and creating a project ? I remember it was possible for earlier version of Android Studio. I found the `avdmanager.bat` file in `Android\Sdk\tools\bin` but running it won't launch...
- I'm on Windows 10. - Android studio version 2.3.3 How can I launch the AVD Manager with-out opening the Android Studio and creating a project ? I remember it was possible for earlier version of Android Studio. I found the avdmanager.bat file in Android\Sdk\tools\bin but running it won't launch the avdmanger UI that we get from the Android Studio. Anyone here faced the same issue and found a way to launch AVD manager from command line ?
nkg (261 rep)
Sep 9, 2017, 08:12 AM • Last activity: Jan 4, 2021, 09:04 AM
3 votes
1 answers
1271 views
How to make Android always use external SD card instead of internal storage?
I created an AVD using bin/avdmanager create avd -d "Nexus 5" -c 2G -n nexus_5 -k "system-images;android-29;google_apis;x86_64" The `-c 2G` is supposed to create a 2GB sdcard. When I boot the emulator, however, `/sdcard` seems to point to internal storage on `/data/media` rather on the 2GB disk: ```...
I created an AVD using bin/avdmanager create avd -d "Nexus 5" -c 2G -n nexus_5 -k "system-images;android-29;google_apis;x86_64" The -c 2G is supposed to create a 2GB sdcard. When I boot the emulator, however, /sdcard seems to point to internal storage on /data/media rather on the 2GB disk:
$ adb shell df -h
Filesystem                    Size  Used Avail Use% Mounted on
tmpfs                         996M  604K  996M   1% /dev
tmpfs                         996M     0  996M   0% /mnt
tmpfs                         996M     0  996M   0% /apex
/dev/block/dm-2               2.4G  2.3G   64M  98% /
/dev/block/dm-1               124M  123M  444K 100% /vendor
/dev/block/vdc                775M  302M  473M  39% /data
/data/media                   775M  302M  473M  39% /mnt/runtime/default/emulated
/dev/block/vold/public:253,80 1.9G  532M  1.4G  27% /mnt/media_rw/1400-1801
/mnt/media_rw/1400-1801       1.9G  532M  1.4G  27% /mnt/runtime/default/1400-1801
$ adb shell ls -l /sdcard /storage/self/primary  /mnt/user/0/primary
lrwxrwxrwx 1 root root 19 2020-12-01 13:29 /mnt/user/0/primary -> /storage/emulated/0
lrw-r--r-- 1 root root 21 2020-07-21 03:02 /sdcard -> /storage/self/primary
lrwxrwxrwx 1 root root 19 2020-12-01 13:28 /storage/self/primary -> /mnt/user/0/primary
$ adb shell mount | grep storage/emulated
/data/media on /storage/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,multiuser,mask=6,derive_gid,default_normal)
When I try to adb push data to /sdcard this fails because there’s not sufficient space available (on internal storage). How can I tell the emulator to use the external sdcard instead?
rumpel (131 rep)
Dec 1, 2020, 12:53 PM • Last activity: Dec 2, 2020, 02:28 PM
2 votes
1 answers
177 views
Share virtual machine between Genymotion and Android AVD Manager?
I've installed Genymotion and configure it to use the SDK folder from Android SDK. (In preferences, ADB -> Use custom Android SDK tools, and select `/Users/XXX/Library/Android/sdk`) But when I open both Genymotion and Android AVD manager, it can't see the same virtual machine created in each other:...
I've installed Genymotion and configure it to use the SDK folder from Android SDK. (In preferences, ADB -> Use custom Android SDK tools, and select /Users/XXX/Library/Android/sdk) But when I open both Genymotion and Android AVD manager, it can't see the same virtual machine created in each other: AVD Manager showing Nexus 5X API 24 only Genymotion showing Nexus 4 API 19 only Is there a way to share the virtual machine, without taking extra disk spaces?
daisy (133 rep)
Oct 3, 2020, 02:33 PM • Last activity: Oct 3, 2020, 11:54 PM
0 votes
1 answers
3473 views
Android Emulator: Failed to sync vcpu reg Error
- **Machine**: HP ZBook 15 G3 - **Processor**: Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz, 2712 Mhz, 4 Core(s), 8 Logical Processor(s) - **System**: Windows 10.0.16299 Build 16299 - **Android**: Studio: Android Studio 3.1.4 - **Haxm version**: 7.3.0 - **Hardware Virtualization enabled in Bios**: Yes...
- **Machine**: HP ZBook 15 G3 - **Processor**: Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz, 2712 Mhz, 4 Core(s), 8 Logical Processor(s) - **System**: Windows 10.0.16299 Build 16299 - **Android**: Studio: Android Studio 3.1.4 - **Haxm version**: 7.3.0 - **Hardware Virtualization enabled in Bios**: Yes Brand new install of Android Studio. I cannot run any X86/X86_64 Android emulators. They terminate as soon as I start them with the error "Failed to sync vcpu reg". I have restarted several times and use no other virtualisation tools, although I believe the latest Haxm has solved that issue, so previous answers all suggest this. Thanks in advance.
BigBadOwl (51 rep)
Sep 6, 2018, 03:00 PM • Last activity: Aug 28, 2020, 09:05 AM
0 votes
0 answers
428 views
I was running an AVD on Android Studio and I got the following 2 errors. What do they mean?
Error number 1: ``` Emulator: E0809 05:21:56.677723102 2704 socket_utils_common_posix.cc:201] check for SO_REUSEPORT: {"created":"@1596930716.677712232","description":"SO_REUSEPORT unavailable on compiling system","file":"/mnt/tmpfs/src/android/emu-master-dev/external/grpc/src/core/lib/iomgr/socket_...
Error number 1:
Emulator: E0809 05:21:56.677723102 2704 socket_utils_common_posix.cc:201] check for SO_REUSEPORT: {"created":"@1596930716.677712232","description":"SO_REUSEPORT unavailable on compiling system","file":"/mnt/tmpfs/src/android/emu-master-dev/external/grpc/src/core/lib/iomgr/socket_utils_common_posix.cc","file_line":169}
Error number 2:
Emulator: KVM: injection failed, MSI lost (Operation not permitted)
The AVD works fine otherwise with no issues, I was just worried why I was getting these errors. I was not compiling an app or anything while running the AVD. The first error appeared when I started the AVD and the second error appeared upon shutting it down. I get two other messages that don't seem to be errors but I am including them anyway (both of these below appear upon closing the AVD. Only the first error appears when the AVD is started):
Emulator: Process finished with exit code 0
Emulator: deleteSnapshot: for default_boot
The AVD is running **Android Q (API level 29) x86_64 image with Google APIs** and the device I am virtualizing is **Pixel 3** Here are my PC specs: 16 gigs of RAM - 16 Gbs of RAM - Intel i3-8100 CPU - Linux Kubuntu - 120 gig SSD (that Linux installed on) - 1TB HDD and another 240 GB ssd for Windows (unncessary info I think but I included it anyway)
Sbavert (179 rep)
Aug 9, 2020, 12:07 AM
1 votes
0 answers
1793 views
Rooted Android Emulator
I want to install avd with google play and work with it as a root, is it possible? if not there any chance to install google play on rooted android emulator , because I have an app the I can't install not via the google play store. Thanks
I want to install avd with google play and work with it as a root, is it possible? if not there any chance to install google play on rooted android emulator , because I have an app the I can't install not via the google play store. Thanks
Elior (11 rep)
Jul 20, 2020, 11:18 PM
Showing page 1 of 20 total questions