On Sun, 13 Dec 2020 07:26:23 -0500, Paul wrote:
> AMD-V VT-X "addressed the issue of privileged instructions"
> Some hosting softwares have made the claim they absolutely
> needed VT-X, then later, magically, they could live without it.
> Maybe Windows Virtual PC or VPC2007 needed it at one time.
RESOLVED... (by empirical experimentation)
Hi Paul,
I figured it out by laborious trial and error, and, as usual, it turns out
you already _knew_ what I only found out by time-consuming empirical tests.
Once I had turned AMD-V on in the BIOS (which, by the way, is absolutely
essential to get Android emulation to work on my AMD HP Pavilion desktop),
then Android emulation with Genymotion & VirtualBox worked just fine.
As you noted, Genymotion _insists_ I need to turn Hyper-V off in Windows
10, but in my tests, Genymotion Android Emulation (as did VirtualBox)
worked just fine whether or not I had the Intel Hyper-V stuff on or off.
o <
https://i.postimg.cc/zD2nHQqQ/cmos05.jpg> Hyper-V off doesn't matter
o <
https://i.postimg.cc/NF900ZCY/cmos07.jpg> Hyper-V on doesn't matter
What didn't ever work, interestingly so, was Android Studio's native Google
Android emulator, where, as with Genymotion, the Google emulator absolutely
required AMD-V to be turned on in the BIOS.
But, after that, the native Google Android emulator _still_ didn't work
properly. It would come up black and unresponsive.
o <
https://i.postimg.cc/65NKJvkt/as03.jpg> Google emulator fails on AMD CPU
Lots and lots (and lots) of threads are on the net with the same problem,
which, after a few days (elapsed) time, I gave up (which is something I
rarely do).
My conclusion is Google Android emulation on older AMD CPUs, just doesn't
work. If it does, then my secondary conclusion is that it's not documented
anywhere on the net (that I can find) how to debug why it doesn't work.
More details in this post below, which I made to the Android ng just now.
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/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/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 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>
--
There's more value in this one post than worthless pieces of shit like Rudy
Wieser % Alan Baker, combined, have added to Usenet in their entire lives.