Hardware Emulated Performance on Arch Linux in Android Studio - android

I've been using Linux rather then Windows as my primary operating system, mostly using Jetbrains IDEs and Android Studio. But, I have one question/issue which still cannot solve. Why I can't have hardware rendering in Emulated Performance, upon creating Android Virtual Device? Whenever I choose that, it's only saying: waiting for device to come online..., I've installed all libraries I've could possibly find on Google. Using Software Rendering is awfully slow, making my application testing almost impossible. Gradle build also takes very long time.
Do I really need to switch over to Windows? (It's working on Windows, so I'm assuming I'm missing something?)
VT-d is disabled in BIOS as I couldn't even make AVD with it being enabled.
Thanks

Related

Workaround for Android Studio AVD on windows 10

Windows 10 now uses a couple default features, Credential Guard and Device guard, that use Hyper-V, along with the non-default option of Core Isolation. Unfortunately at this time, HAXM refuses to install with anything Hyper-V enabled. x86 images refuse to run without HAXM.
I found an answer that said to use the ARM images but none newer than nougat are available and I'm specifically trying to troubleshoot compatibility with sdk29 or android 10.
Short of sacrificing security for a small bit of usability (disable core isolation, and device&credential guard) and heaven knows Windows is not known for being highly secure in a non reduced security state, is there any workaround for this at the moment?
I'm running Android Studio 3.5.3 on Windows 10 Home x64 build 1909.
This issue seems to have been resolved in a later Android Studio release.
See https://devblogs.microsoft.com/visualstudio/hyper-v-android-emulator-support/

Android Studio: Hardware Acceleration

This is driving me absolutely crazy and I can't find any help. I'm fairly novice when it comes to emulators, and even more so when it comes to Android Studio. Here's my problem: I installed Android Studio. Downloaded the SDK updates, including the HAXM one, and set up my own AVD. Upon trying to start up my AVD, or even the starter AVD that was already there, I get an error stating that "emulator: ERROR: x86 emulation currently requires hardware acceleration!"
I've done some googling and tried to finish the install of HAXM using the install file in the Android/SDK folder. I was promptly told that the installation failed and that my CPU didn't allow for Intel Hardware Acceleration, or something like that. I read somewhere that the only way I can use Hardware Acceleration on AMD is if I were on Linux, with which I have no experience with. So I tried giving up. Now I can't figure out how to disable Hardware Acceleration entirely in Android Studio. I haven't even begun learning how to write in android because I can't get an AVD up and running.
Does anyone have any tips for a complete Android noob? I thought this would be something fun to try since I was at once point fairly good with C++ and I have always been a huge fan of android. However, I've avoided doing anything GUI related until now, and I'm not finding it very fun at the moment.
I'm running an AMD system with 8GB of ram. More specifically, I'm using an AMD FX-4130 Quad-Core Processor on a GIGABYTE GA-970A-DS3 Motherboard.
Unfortunately AMD's virtualization technology AMD-V is not compatible with Intel HAXM. Your only choices are to either get familiar with Linux or use a ARM-based AVD, which doesn't require virtualization.
You can find instructions for Linux on Android Developers' document on Using the Emulator.
You can use Genymotion instead of default one. Its faster than the default one. And this emulator is compatible with both Intel and AMD. Genymotion just uses Virtualbox to run Android in VM.
Here's a link to Genymotion .
Genymotion , Genymotion user guide
it may help you.
Take an android phone with its USB cord then follow these steps:
1. plug in phone to computer.
2. on the phone goto: settings>about device scroll to find build number
3. press build number 7x (this enables developer mode)
4. go back to settings press developers options select usb debugging, include bug reports, verify apps via usb, and GPU force rendering.
5. Check for device connection on the computer
6. add in build.gradle under "buildTypes{" write this
debug { debuggable true }
then when you run your project you should be able to see your phone in the avd selection then select it. Your phone will awaken automatically with your application running except it will be a little semi-efficient boot process.
Also do not forget to remove the debug code from your gradle file when you app is finished.

What emulator does Android Studio use?

This question has many parts.
Some info about my system:
64-bit Ubuntu Linux
I am wondering what the stock emulator is that comes with Android Studio (A.Studio) (if indeed it has a name).
A helpful answer would include comparing this emulator with other emulators. A list of pros and cons of using each different emulator would also be helpful.
Perhaps there is a more fundamental ~thing~ about using different emulators; information on that is welcome if anything comes to mind.
Finally, i have never used an emulator besides the one that has come with Eclipse or A.Studio. What do I need to know in order to plug any emulator into any IDE? I have had issues with IDEs being "fragile" and breaking frequently, FYI.
You can use genymotion, for fast speed the quality, both for the eclipse and Android studio, get it here.
Also you can set up the Google play service for using Google Maps and downloading apps from Google play store.
Get the package and how it use it , please refer to here.
The emulator used by Android Studio is the exact same one used with Eclipse. It is in fact included with the Android SDK (which is in turn included in Android Studio) and used by various development environments.
The way it works depends on what kind of system image you use it with. For most recent Android versions, there are 2-4 different system images - arm, arm 64-bit, x86, and x86 64-bit (the 64-bit ones are Lollipop only, and fairly experimental at this stage of the game [early 2015]).
There are also Google API versions of these images (they include various Google apps such as Google Play Services) which can be used if these components are needed by your app.
For development purposes, the x86 system images are your best bet as performance is vastly improved by the emulator not having to emulate the ARM architecture - you need to use HAXM (by intel, also available in the Android SDK) to get any real speed benefits with x86 images though. The emulator also provides GPU acceleration (it must be manually enabled for each emulator device) which allows it to use your physical GPU for rendering instead of emulating these operations in software.
The way the development environment (Android Studio) connects to the emulator is via ADB (Android Debug Bridge). This means that it can work with virtually any emulator (such as Genymotion, which runs via VirtualBox). However, there is native support for using the Android Emulator from within Android Studio (this is configured by selecting emulator in the Run/Debug configuration)...when using another emulator (such as Genymotion) you should select USB device (in Run/Debug configuration) and make sure that the ADB instance is connected to your emulator via TCP (Genymotion does this for you automatically at startup).
This should give you enough information and I will not re-post all the various instructions on how to do any of the above as they have been posted as answers to various questions here on SO.

Android, Is it possible to run Dalvik VM on any kind of OSs in order to run Android Applications?

I have some operating systems such as Windows 7 and Linux.
Is it possible to run Dalvik on this Win7 and after that running an Android application or game?
Thanks
One solution is to install Android-x86 (Android for Intel or AMD CPUs) either natively or in a virtual machine. If you only want to play some games and not to dual-boot with Windows and Android, you can use the excellent Android emulator Bluestacks. Just a warning, depending on your hardware (or virtual hardware) one version of Android-x86 may work better than another, you have to try. In a virtual machine most likely the virtual graphics card won't be detected properly, so you have to run it in VESA mode. I recommend editing the boot entry before running it and adding the commands:
nomodeset xforcevesa vga=ask
Then choose graphics mode to run Android-x86. This forces a specific VESA mode and most of the times the graphics are presented properly with correct colors on screen. Of course in that case you have a performance penalty. Some games may need to enable Developer Options and then force software rendering to be able to run them.
Android's virtual machine is tightly integrated with the OS (Linux). So, it is impossible to run it on Windows.
The lower-level components (OS and native libraries) in the Android system provide many services that Dalvik merely "translates" for the consumption of Java programs. So porting Dalvik to Windows is probably very hard and rather pointless.
dalvik can definitely run on (normal) linux, and it's likely it can also run in a cygwin environment on windows.
As for being able to run Android applications, that is quite a bit more complicated. However, the AOSP source does have a "simulator" build, which does just that - runs dalvik natively on the host machine and provides an android framework etc, for running android applications.
Keep in mind however that the simulator environment isn't actively maintained, and will probably require quite a bit of "love" to get it to work.
You can install Android on your PC with VirtualBox. Check out this tutorial.

An Alternative to the Android-Emulator?

I know I could use my Desire Z as a test phone, but what if I want to develop for 3.0 Honeycomb? What's an alternative for the emulator since it's so slow?
http://www.bluestacks.com/
This site has been getting some press recently. It seems that they are going to launch a windows runnable version of android later this year. This will be another alternative to using devices or emulators for testing I would imagine.
A general solution to the slowness of processor-emulation based emulators is to run a build of the embedded environment compiled for the same processor and general architecture as the hosting machine, in virtual machine software which can run most of the code native, and only has to trap and emulate privileged/hardware-related actions.
In other words, you run the x86 build of android in VirtualBox, vmware, or whatever, and dispense with the overhead of emulating an arm processor.
In quick web searching I'm not getting a confident answer if there's a working build of Honeycomb for x86 yet, but presumably there will be a build of that or a later android version at some point.
The only alternative is to have a physical device with Android 3.0 imaged on it.
Try this one for a change it actually provides an eclipse plugin and it uses cloud i guess it is faster than the emulator comes with android by default http://www.genymotion.com/features/

Categories

Resources