Android x86 + VirtualBox - android

I try to install android x86 4.2 (I tried also 4.0 asus laptop and eeepc) to my VirtualBox. My pc configuration:
Windows 7 x64
Lenovo Y570, Intel Core i7
NTFS file system
What I create in VirtualBox:
Name: Android x86
Type: Other (I tried Linux 2.4 x86 or Linux 2.6 x86 too)
Version: Other/Unknow
RAM: 512 Mb
Create a virtual hard drive => VDI (or HDD) => Fixed size (or dynamically) => 3 Gb (or 6)
Than I start my device and see boot menu. If I try to run it without installation, I see
Detecting Android-x86... found at /dev/sr0
Warning: Not an ASUS product
A N D R O I D
and nothing more happens. But now it must run like in different tutorials.
If I install, I try to format my Primary/Logical Bootable/Unbootable disk (FS type is Linux) from Choose Partition => Create/Modify partition.
I see very quickly disappearing line "could not find valid v7 on sda", than I see "can not mount /dev/sda1 Do you want to format it?" And I again go to Choose Partition menu.
Why emulator does not run?
Edited.
Answer: It's just a destiny. I installed VBox on my big pc with Win7 x32 and all is fine. On my Lenovo with the same config but with Win7 x64 it does not work. If u really wanna good android emulator, u can try YouWave.

I have HP430 Laptop with win 7. I had the same problem. But I figured out the solution.
While booting the computer with win7 I entered BIOS menu. There was a option to optimize pc for virtualization.I selected it. After that every thing ran smooth.
Later I noticed in virtual box that, in system settings the acceleration type was VT-x AMD, Nested Paging,PAE/NX. This was different before optimization.
Hope this gives some idea.

Related

Android Emulator causing Blue Screen

Whenever I am trying to run the Android Emulator (any Nougat, Oreo, or Kitkat) laptop throws a blue screen saying STOP CODE IRQL NOT LESS OR EQUAL.
My laptop will restart in 20 minutes or so and I can do everything else on my laptop and even run the Android app on my mobile using USB Debugging.
I tried reinstalling android studio and AVD manager several times but my issue is not getting resolved.
PLEASE help!
Laptop Configuration:
Dell Inspiron 3576
Processor: Intel(R) Core(TM) i5-8250U CPU # 1.60GHz 1.80 GHz
RAM: 8.00 GB (7.87 GB usable)
System Type: 64-bit operating system, x64-based processor
Edition: Windows 10 Home Single Language
Version: 20H2 (as of 01st April, 2021)
I had the same issue with NoxPlayer which is another android emulator, the stopcode was different but it was fixed when I created a new boot entry with Hyper-V Disabled.
Check this out:
https://blog.nicholasrogoff.com/2013/12/27/create-a-no-hyper-v-boot-option/
"Don't forget to change Windows8 to windows10 in your commands, That's just a name but it has to be meaningful :D"

Android Emulator very slow on Ubuntu 20.04

My Android emulator runs very slow on my Ubuntu machine. I need it to run faster, because some apps are slowed down so much, that they change their behaviour (they use the camera).
System specs:
-x86_64
-Intel(R) Core(TM) i7-5600U CPU # 2.60 GHz
-20GB Ram
-512Gb HDD
I use Ubuntu 20.04 and Android Studio 4.1.1 (fresh installation).
I use this AVD: Pixel2 1080 x 1920: 420dpi API 28 Android 9.0 (Google X86_ARM) CPU/ABI: x86
In the extended menu I chose Graphics: Hardware - GLES 2.0. I also disabled GPS, audioInput and audioOutput with no performance improvements.
I did not try this, because selecting Hardware - GLES 2.0 worked for me and the avd started normally (but still very slow).
Other system images are equally slow though.
I tried:
sudo modprobe msr
sudo rdmsr 0x3A
and it returns 5, so VT-X is enabled
Is the hardware the bottleneck, or is something configured wrongly? Maybe it is the HDD that slows the emulator down? I tried running the emulator on Windows and it's insanely fast. The windows machine is stronger though.
Update 11.12.2020:
I also verified my KVM installation using this command:
./emulator -avd Pixel2Api28Arm -accel-check
It returned this:
28Arm -accel-check
accel:
0
KVM (version 12) is installed and usable
accel
So this does not seem to be an issue.
I was having the same problem (KVM working, but slow x64 emulator on x64 host), and found a solution here, which is to disable automatic snapshot creation.
Run your emulator, and click on the three dots (...) to open the settings:
In the settings, click "Snapshots":
Switch to the "Settings" section on top:
Set "Auto-save current state to Quickboot" to No:
It'll ask you to restart the emulator, click 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)

How to configure AVD Android Studio?

I am setting up the AVD for my emulator on Android Studio and trying to get it to mimic the phone I have; it is a Samsung Galaxy s4.
Under the "Select Hardware" section are only a few names, none of which match my phone. Am I supposed to choose this part based off the screen size and resolution alone?
The next section has me select the "System Image." My device is version 4.3, but there are two download options for that: x86 and ameabi-v7a. Which do I get and what exactly do these terms mean?
The Samsung Galaxy S4 is not a part of the standard AVD, you will have to create it. What you should be doing:-
Name your device as your "Galaxy S4".
Select your screen resolution and memory after looking it up on the internet.
I suggest you download an x86 image with the HAX accelerator driver from the SDK manager. This will make your virtual device run faster. If you get the ameabi-v7a, your virtual device will be slow due to the virtualisation overhead for your CPU.
Run your AVD, make sure you have enough RAM for your host OS. I would recommend about 8GB as optimal.
To be clear x86 and ameabi-v7 refer to the cpu architectures of the regular 32 bit PCs and the ARM processors respectively.
firstly, not all physical Android phone model is built in AVD.
secondly, you can use the command bellow to get your Android device ABI, which indicates CPU types(e.g. x86) in use:
adb shell getprop ro.product.cpu.abi

Android Studio - Virtual device launch fails

You might have seen a hundred questions already by the same title so let me just tell you why mine is different:
Here's the error:
emulator: ERROR: x86 emulation currently requires hardware acceleration!
Please ensure Intel HAXM is properly installed and usable.
CPU acceleration status: HAX kernel module is not installed!
I've already installed HAXM installer from the sdk manager
When I actually go to install HAXM, it says that my computer doesn't support virtualization
True that. I have Intel Pentium E2180
My hyper -v is already disabled
My BIOS doesn't have an "enable virtualization" option (which is obvious because my processor doesn't support it)
Since all the solutions on stack overflow revolve around the above mentioned points I decided to post this quesiton as all the mentioned solutions didn't work, which I think is precisely because of me not having a supported processor, which brings me to my question:
Can I still somehow run a virtual device to test my apps? I have a Nexus 7 tab, but I still think testing on a virtual device is more convenient and also I can test more devices if they're virtual..
P.S. I'm running Windows 10 (technical preview) Build 9926.
In this case you can download and use ARM images that do not need hardware virtualization instead of using x86 system images. Need to tell you that ARM images will be very slow compared to x86 images.
You can download ARM image of respective APIs by selecting this option.
In order to run the emulator you have to use ARM image, because your PC doesn't support HAXM
Create a new AVD(Android Virtual Device) and on creation select image that uses ARM(such as armeabi-v7) so it will be emulated on your PC.
Here's picture of image selection
If you don't have any arm images installed, you can download one from SDK manager
Or else you can use Genymotion emulator which is very fast and lightweight
Genymotion
It might still work if you launch the emulator from the command line with the -no-accel switch:
Go to your SDK install directory
Go to the tools folder
Open a command/terminal window
Type emulator -avd Nexus_5X_API_23 -no-accel (replace Nexus_5X_API_23 with the name of the AVD you've set up in Android Studio / Android Developer Tools)

Categories

Resources