On Sun, 13 Dec 2020 07:13:54 -0500, Paul wrote:
> I had this happen here recently.
SOLVED:
Hi Paul,
I apologize for not responding sooner, as I did solve the BIOS problem.
The instant I removed everything from the desktop save for the essentials,
it booted to the BIOS (by pressing the F10 key at POST for my HP Pavilion).
Once I was in the BIOS, I could easily set the AMD-V on.
o <
https://i.postimg.cc/RhSXCJQn/cmos04.jpg> Turn on AMD-V in the BIOS
Where, for emulation, that AMD-V in the BIOS was absolutely essential.
Yet, for subsequent emulation purposes... it turns out that, despite what
it says on the net, it doesn't matter whether Hyper-V "stuff" is on or off:
o <
https://i.postimg.cc/zD2nHQqQ/cmos05.jpg> Hyper-V doesn't matter
o <
https://i.postimg.cc/NF900ZCY/cmos07.jpg> Hyper-V doesn't matter
UPDATE:
This is the BIOS/AMD-V firmware problem I was trying to solve (and did):
o <
https://i.postimg.cc/fWSnSJXQ/cmos08.jpg> Emulation fails w/o AMD-V
o <
https://i.postimg.cc/GpkgdmxT/cmos01.jpg> Access CMOS settings
o <
https://i.postimg.cc/QdqTpBsq/cmos02.jpg> Genymotion needs AMD-V
o <
https://i.postimg.cc/d1gkqrmJ/cmos03.jpg> VirtualBox needs AMD-V
o <
https://i.postimg.cc/RhSXCJQn/cmos04.jpg> Turn on AMD-V in the BIOS
o <
https://i.postimg.cc/zD2nHQqQ/cmos05.jpg> Hyper-V doesn't matter
o <
https://i.postimg.cc/NF900ZCY/cmos07.jpg> Hyper-V doesn't matter
o <
https://i.postimg.cc/hjGjkX9X/cmos06.jpg> Genymotion emulation working
This is the Android Studio root problem I was trying to solve:
o <
https://i.postimg.cc/1tvysJY1/as01.jpg> code working on phone
o <
https://i.postimg.cc/nLRWdFB1/as02.jpg> code working in Genymotion
o <
https://i.postimg.cc/65NKJvkt/as03.jpg> Google emulator fails on AMD CPU
o <
https://i.postimg.cc/QCQRxf2s/as04.jpg> Google emulator always offline
o <
https://i.postimg.cc/qB2fL7zY/as05.jpg> Google emulator always times out
o <
https://i.postimg.cc/02vTHqSN/as06.jpg> Hyper-V off doesn't matter
o <
https://i.postimg.cc/Fsx2MnbV/as07.jpg> Hyper-V on doesn't matter
Once I figured out the unintuitive step of enabling AMD-V but disabling
Intel Hyper-V in Windows 10, then it was time to add the emulators.
Adding the native Android Studio emulators works fine, but they're slow.
o So below are instructions for also adding faster Genymotion emulators.
After you get your "Hello World" running on your device over USB:
o <
https://i.postimg.cc/1tvysJY1/as01.jpg>
It's time to get "Hello World" running in Genymotion Android emulation:
0. For AMD CPUs, you have to turn ON the AMD-V hypervisor in your BIOS
o Win+R > msinfo32
Windows version: Windows 10, 10.0, version 2004, build: 19041
Hardware: NY549AA-ABA p6230y, HP-Pavilion, FOXCONN, ALOE
CPU: Authentic AMD AMD Phenom(tm) II X4 810
BIOS Version/Date: American Megatrends Inc. 5.02, 8/31/2009
SMBIOS Version 2.6
Hyper-V - VM Monitor Mode Extensions Yes
Hyper-V - Second Level Address Translation Extensions Yes
Hyper-V - Virtualization Enabled in Firmware Yes <== this is critical!
Hyper-V - Data Execution Protection Yes
Here are the before-and-after screenshots for BIOS enabling of AMD-V:
<
https://i.postimg.cc/fWSnSJXQ/cmos08.jpg> Emulation fails w/o AMD-V
<
https://i.postimg.cc/GpkgdmxT/cmos01.jpg> Access CMOS settings
<
https://i.postimg.cc/QdqTpBsq/cmos02.jpg> Genymotion needs AMD-V
<
https://i.postimg.cc/d1gkqrmJ/cmos03.jpg> VirtualBox needs AMD-V
<
https://i.postimg.cc/RhSXCJQn/cmos04.jpg> Turn on AMD-V in the BIOS
<
https://i.postimg.cc/zD2nHQqQ/cmos05.jpg> Intel-V doesn't matter
<
https://i.postimg.cc/NF900ZCY/cmos07.jpg> Hyper-V doesn't matter
<
https://i.postimg.cc/hjGjkX9X/cmos06.jpg> Genymotion emulation working
Note: As far as I have tested, it doesn't matter whether the Intel
hypervisor is enabled or disabled in your Windows 10 settings
(even as a zillion articles say you "must" either check or not check)
o Win+R > ms-settings:optionalfeatures > More Windows features
o Turn Windows Features on or off
[_]Core Isolation
[_]Credential Guard
[_]Hyper-V
[_]Virtual Machine Platform <== it doesn't seem to matter if checked
[_]Windows Hypervisor Platform <== doesn't seem to matter if checked
[_]Windows Sandbox
[_]Windows Subsystem for Linux version 2
1. Install & run Genymotion Personal Edition (with VirtualBox)
<
https://www.genymotion.com/>
(Follow instructions at the Genymotion web site, which are pretty good.)
2. Once you have Genymotion installed & Android emulation running,
then find your SDK path (if you don't already know it)
AS:Tools > SDK Manager > Android SDK Locations
3. Set ADB in Genymotion to point to that Android SDK path
Genymotion:Settings > ADB
Change from:
(o)Use Genymotion Android Tools (default)
(_)Use custom Android SDK Tools
Change to:
(_)Use Genymotion Android Tools (default)
(o)Use custom Android SDK Tools
[Browse]C:/app/editor/android/sdk
4. In Genymotion, to add a device, press the red "(+)" sign at the top.
Choose any Android device & API to emulate & press "Install"
Once installed, press the Genymotion "Start" button to boot it.
You should get an Android emulation window after a minute or two.
5. Now install the Genymotion plugins into Android Studio:
AS:File > Settings > Plugins > Marketplace > Genymotion > Install
Restart Android Studio to apply changes to plugins.
6. Now point Android Studio to your Genymotion folder
AS:File > Tools > Emulator > Genymotion Plugin >
Select the path to the Genymotion folder
C:\app\editor\android\emu\genymotion
7. Start Genymotion from your taskbar cascade accordion foldout menu
Taskbar > menu > editor > android > genymotion
Start the emulator from inside of Genymotion's installed devices
Wait for the emulator to start in a separate window in Windows.
8. From inside Android Studio, you can now select that emulator.
Then run your code on that emulator.
<
https://i.postimg.cc/nLRWdFB1/as02.jpg>
In summary, you now should have the following:
A. Android Studio runs "Hello World" on your phone over USB
<
https://i.postimg.cc/1tvysJY1/as01.jpg>
B. Android Studio runs "Hello World" over Google Android emulation:
<
https://i.postimg.cc/65NKJvkt/as03.jpg> Google emulator fails
<
https://i.postimg.cc/QCQRxf2s/as04.jpg> Google emulator always offline
<
https://i.postimg.cc/qB2fL7zY/as05.jpg> Google emulator times out
Note: It's rare for me to "just give up" but for the life of me,
I couldn't get the native AVD Android emulation to do anything
but show up blank on my AMD CPU, and, judging from the references,
many (many) people have the same (unsolved) problem set on AMD.
<
https://i.postimg.cc/02vTHqSN/as06.jpg> Hyper-V off doesn't matter
<
https://i.postimg.cc/Fsx2MnbV/as07.jpg> Hyper-V on doesn't matter
C. Android Studio runs "Hello World" over Genymotion emulation:
<
https://i.postimg.cc/nLRWdFB1/as02.jpg>
Everything above except item "B" was relatively easy; B was impossible.
o <
https://stackoverflow.com/questions/20155376/android-stop-emulator-from-command-line>
o <
https://stackoverflow.com/questions/3152681/android-emulator-5554-offline>
o <
https://stackoverflow.com/questions/59974253/android-studio-problem-timed-out-waiting-for-process-to-appear-on-device>
o <
https://stackoverflow.com/questions/62343011/android-studio-waiting-for-all-target-devices-to-come-online-and-black-avd-err>
o <
https://stackoverflow.com/questions/62560767/android-emulator-stays-with-black-screen-after-trying-a-lot-of-things-to-fix-it>
o <
https://stackoverflow.com/questions/62892194/android-emulator-was-not-loading-in-android-4-0>
(etc., there are many, most unresolved or arbitrarily resolved)
All these exact same concurrent errors exist in all articles:
a. AVD pops up the Android emulator; but it is black & unresponsive.
b. STATUS: Waiting for all target devices to come online
c. ERROR: AVD Manager Timed out after 300seconds waiting for emulator to come online.
d. AS:Tools > Troubleshoot device connections > Rescan devices
Found 1 Android device(s) with possible problems:
emulator-5554 - Device is currently in the offline state
e. Win+R > cmd
c:\> adb devices
List of devices attached
emulator-5554 offline
See also:
o Have you ever had a working PC that wouldn't go into the BIOS mode?
<
https://groups.google.com/g/alt.comp.microsoft.windows/c/p5RvsY_M978>
o Can someone please explain the logic of turning AMD-V "ON" in the BIOS, & then turning Intel Hyper-V "OFF" in "Turn Windows features on or off" just to get Android emulation to work on WIndows 10?
<
https://groups.google.com/g/alt.comp.microsoft.windows/c/zcSpBmmc6eM>
o Report: My first "hello world" using Android Studio freeware on Windows
<
https://groups.google.com/g/comp.mobile.android/c/aW64zYeBtF0>
--
Posted out of the goodness of my heart, to help others, where I can.