Android 5.0 emulator showing Storage space running out - android

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..)

Related

Android emulator power off button does not work when using avd with system image > android 30

I am using avdmanager to create an avd to run with the latest android emulator on Ubuntu 21.10.
I am using Android emulator version 31.2.8.
When I create and avd with system image 28...
avdmanager create avd -n pixel_5 -k "system-images;android-28;google_apis_playstore;x86_64" --device "pixel_5"
and run it..
emulator -avd pixel_5
I can then subsequently hold the power button, and the android OS on the emulator properly powers off.
When I create and avd with system image 30 or 31...
avdmanager create avd -n pixel_5 -k "system-images;android-31;google_apis_playstore;x86_64" --device "pixel_5"
Once the emulator starts, the power button does absolutely nothing, if I click on long click.
It's because a bad person at Google decided that the power button should trigger the Google Assistant. You can un-break it in Settings->System->Gestures->Power menu->Hold for Assistant
Find your avd path(default~/.android/avd)
Find the AVD name (your is pixel_5)
Open the folder and find config.ini
Edit hw.keyboard = yes

Black Screen with Android Emulator

I am a newbie to android development and am running Ubuntu Linux with an AMD cpu. I installed Android Studio, JDK, SDK, etc, and have been trying to run the emulator. However, whenever I try launching the emulator, it stays a black screen. The message I repeatedly get in terminal is
WARN - run.EmulatorConnectionListener - Emulator not ready yet, dev.bootcomplete = null
I have tried waiting for a while, I have tried updating it, I have tried different APIs, I have tried setting emulated performance to software, and everything else I could find online. Help would be greatly appreciated!
Specs:
Ubuntu 16.04 LTS
Android Studio 2.3.3
Radeon R9 270x 4gb
AMD FX4100
32g ram
SVM is enabled in BIOS
This happened to me recently (emulator with black screen, with all AVDs, even those which worked previously), maybe after some system or Android SDK updates.
How I fixed it:
delete whole .android directory (is in your home directory) - backup this directory before deleting (it contains your AVDs, your debug signing key or other things you might wish to return to later) - yes, this was the thing that really helped
create new AVD - you have to do this after deleting that .android directory (it did not work if I copied backed up AVD back there)
For reference, here is AVD configuration which works for me now (created directly using Android SDK, not using the wizard in Android Studio):
Device: Nexus One (3.7", 480 x 800: hdpi)
Target: Android 7.0 - API Level 24
CPU/ABI: Intel Atom (x86_64)
Keyboard: [x] Hardware keyboard present
Skin: Skin with dynamic hardware controls
Front Camera: None
Back Camera: None
RAM: 1024
VM Heap: 64
Internal Storage: 200 MiB
SD Card: (empty)
[ ] Snapshot (unchecked)
[ ] Use Host GPU (unchecked)

ERROR: resizing partition e2fsck failed with exit code 8

I'm new to android studio. When I try to run my first programme in android studio on the emulator, I get this error.
I have searched through other comments and have also tried decreasing my build.gradle from 24.0.0 to 23.0.3 as shown below, but it still doesn't work. I'm running on Nexus 5X API 23.
android {
compileSdkVersion 24
buildToolsVersion "23.0.3"
}
The error shown is:
Cannot launch AVD in emulator.
Output:
emulator: WARNING: userdata partition is resized from 756 M to 800 M ERROR: resizing partition e2fsck failed with exit code 8
Hax is enabled
Hax ram_size 0x60000000
HAX is working and emulator runs in fast virt mode.
emulator: Listening for console connections on port: 5554
emulator: Serial number of this emulator (for ADB): emulator-5554
I had the same issue after updating Android SDK tools package to version 25.2.2. To fix the problem i've restarted Android SDK Manager and then created new virtual device instead of using the old one.
I know this is an "old" question, but the following command solved the problem for me:
./emulator -data /sdk/path/here/system-images/android-API/default/x86/userdata.img -avd your_avd_name
where API is the api level you want to use. I found that this is only needed for API<20
Note: I had that problem with libstdc++, so I had to use the LD_PRELOAD envvar. I removed it in the example, so for me, the complete command looks like this:
LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6 ./emulator -data /home/username/Android/Sdk/system-images/android-API/default/x86/userdata.img -avd Whatever
I ran into the same type of problem after installing an update to one the SDK platforms, except my output log contained more than complaints. It contained a possible solution to the problem. See the log below.
emulator: WARNING: userdata partition is resized from 769 M to 770 MERROR: resizing partition e2fsck failed with exit code 8
Hax is enabled
Hax ram_size 0x40000000
HAX is working and emulator runs in fast virt mode.
emulator: Listening for console connections on port: 5554
emulator: Serial number of this emulator (for ADB): emulator-5554
Your emulator is out of date, please update by launching Android Studio:
- Start Android Studio
- Select menu "Tools > Android > SDK Manager"
- Click "SDK Tools" tab
- Check "Android SDK Tools" checkbox
- Click "OK"
Emulator Android_Accelerated_x86_Nougat is running.
Waiting for emulator to be ready...
Solution 1: Update the SDK Tools
Open Android SDKs and Tools window.
Go to the Tools tab (the name of this tab has changed).
Expand the Android SDK Tools group and make sure you select the
latest available version.
Click Apply Changes.
Possible problem with this solution:
You may run into a new problem by following this solution. When you run the emulator it will do a cold boot and ask you for a decryption password. If you don't provide the right password, it will display a black screen and then tell you that the decryption failed.
So this did not work in my case, but your mileage may vary.
Solution 2: Factory reset the emulator
I don't use Android Studio. I use Xamarin with Visual Studio. Installing the Xamarin Device Manager and doing a factory reset of the emulator is what fixed the problem for me.
You should have a similar option if you are using Android Studio. But if you would like to, you can try downloading and installing the Xamarin Device Manager by Microsoft. It's an independent application that does not require installation of Visual Studio or Xamarin.
The misleading ERROR: resizing partition e2fsck failed with exit code 8 when starting an Android Virtual Device (AVD) can occur when you have an old version of Android SDK installed, but without the Android Studio. The old standalone graphical SDK Manager is deprecated as of SDK Tools v25.2.3 - running it does not report any errors, but does not properly update your Android SDK.
Use the new command line SDK Manager ./sdkmanager --update to properly update your Android SDK and the e2fsck failed with exit code 8 problem will be gone.
More information: How to update Android emulator without Android Studio?
WARNING: userdata partition is resized from 756 M to 800 M
For this warning set Internal Storage = 756 MB
error warning will be removed.
Change disk.dataPartition.size to 756M in:
~/.android/avd/your_avd_name.avd/config.ini
I had the same issue, and tried everything that is suggested above, without success.
Being desperate, I tried every menu I could find in AVD. So, I came on "show on disk" menu, at the right of the line of my device, in AVD device list.
Android Studio opened an explorer window, and showed me a directory with a name not matching my device name... Probably because I had renamed my device in AVD, and Android Studio had not reported this change on disk.
So I deleted my device, created a new one with same parameters, verified that directory and name matched, and launched the device... and it worked!!!
Hope this will be helpfull to anyone...
None of the answers here solved my issue, but I did find this after searching for a while and it solved my issue. If all else fails, check out the answer here:
Emulator: ERROR: resizing partition e2fsck failed with exit code 1

Creating an AVD and linking it to the AOSP

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

How to add sd card to android emulator in android studio 1.5.1?

I am using android studio 1.5.1 and ubuntu 14.04. I want to add sd card to mobile device emulator.
I created new virtual device using Android Virtual Device Manager from android studio menus Tools --> Android --> AVD Manager. But there is no option to add sd card to virtual device. So tried command line tool mksdcard to create sd card as per instructions given in developer.android.com.
./mksdcard -l mySdCard 128M mySdCardFile.img
And then used following command to start emulator and load sd card.
./emulator -avd Nexus_5_API_23_x86 -sdcard mySdCardFile.img
But it gave me warning emulator: WARNING: Emulated hardware doesn't support SD Cards. -sdcard option ignored.
How can I use sd card in emulator? Please help!
Go to your avd location (typically at ~/.android/avd/your-android-avd-id)
There is a file named config.ini
Open that and look for the line hw.sdCard=no and change it to hw.sdCard=yes.
Should work now.
If you open the settings for this avd in the avd manager, you will have to set this setting in config.ini again.
In your Android emulator's avd files folder (normally it is named as same as the name of the emulator plus ".avd" at the end, and it should be "Nexus_5_API_23_x86.avd" in your case) inside "~/.android/avd" directory.
Find the file named "hardware-qemu.ini", and make sure there is a line set to "hw.sdCard = true".

Categories

Resources