In Android Studio (version: Android Studio Dolphin 2021.3.1 Patch 1) before downloading virtual image with Android 12 (API 33, Tiramisu) I had to agree to the license agreement that start with the following worrying me statement:
To get started with the Android SDK Preview, you must agree to the
following terms and conditions. As described below, please note that
this is a preview version of the Android SDK, subject to change, that
you use at your own risk. The Android SDK Preview is not a stable
release, and may contain errors and defects that can result in serious
damage to your computer systems, devices and data.
The same for 32 API (Android 11). For Android 7 there was no such warning.
Is it safe now to install and use this emulators? What damage can happen to computer? How to prevent it? Does someone already install and use them?
In the similar question I found the following recommendations about potential overheating PC:
It could potentially damage your laptop if it overheats. But that is
why the fan is running. It is trying to cool down. If it gets too hot
your computer will start throttling programs, apps and processes to
try and cool down. And if it gets too hot it should shut itself down
to prevent damage. Make sure to keep and vents and fans clear, clean
and free for airflow.
This is the only main problem with this emulators?
Any emulator is doing something the pc isn't handled to do, this goes double for mobile apps. Worst case scenario I had with emulating a G phone was that when closing the app the pc would slowly start to crash which I would need to restart in order to get it working normally (also the lack of space on the ssd made a problem too) but no major damage was made. Of course don't neglect your pc, the more you complex stuff you try to emulate the more your pc will gasp for air, give it some breathing room now and then, take a break and keep going. If for example you are using flutter dart has a nice API that you can use online that won't effect your pc at all.
Also this goes triple for laptops since most don't have that good of a cooling.
I tried to install 33 API (Tiramisu) emulator on Notebook ThinkPad T420 (processor: i5-2520M CPU 2.50GHz, memory: 8 Gb, SSD) with enabled virtualization. Emulator boots about 8 minutes. Works terribly slow. Always reads or writes something to SSD (since memory is not enough it is using swap). Not possible to use. Temperature of CPU is near to critical level: ~90°C.
PC must have more resources otherwise there is real risk to damage it.
Related
More specifically, I'm wanting to run OpenCL / Renderscript code in an Android Emulator that actually runs on my computer's GPU instead of CPU. Unluckily I'm using an AMD CPU and GPU.
I know that AMD has OpenGL ES support (and everything supports OpenCL pretty much) via SDKs but that's as far as I've gotten on that front - the only OpenCL / Renderscript information I've found regarding emulators is that they either don't work at all or, if I had an Intel CPU, I could install OpenCL in the emulator but it would only use the CPU (and frankly I wouldn't be surprised if behind the scenes my emulator(s) aren't already doing this - OpenCV runs without incident but OpenCL-Z says there's no OpenCL support).
Is there some way to send the commands from the emulator to my OS and have it automatically run? The only ways I've come up with involve saving and loading a text file which isn't likely to be faster (or good for my hard drive) given I'm running 2 Emulator Instances.
I found some mention of RenderScript being supported in the official emulator but said emulator isn't meant for my use-case and I strongly doubt that it's going to use my GPU.
I'm using Memu at the moment because Bluestacks 3 uses more resources when running 2 instances and the 2nd instance doesn't work very well with adb commands / root for some reason - it thinks it's working but it doesn't do anything. If there's a faster emulator when it comes to running 2 instances I'm sure it would help but oddly enough comparing them is difficult and time consuming (especially when every one of them is like "No, I'M the fastest - look at MY bar graphs!" lol) and ultimately I believe my problem to be with OpenCV not getting GPU acceleration (because it runs much faster on my phone) and not the emulator's base speed.
I have AMD's virtualization features enabled (confirmed with Leomoon or w/e) and they're enabled in the manager for Memu. Perhaps this is already working behind the scenes, then? Either way, emulation costs increase by 10% per instance once the OpenCV stuff comes into play (taking it from 60 to 80%+)
Use a language (like Python) and send commands via ADB. Python can hook into OpenCL and OpenCV; ADB can be used to get the Framebuffer for screenshots or Python can just capture the emulator's window render.
Alternatively, a connection can be made using SocketIO (Flask Socket IO and Javascript's client socket IO in my case) and they can communicate that way. Confirmed via the browser on the emulator and real device. Every emulator has ports to communicate to your native OS. I ultimately chose not to go this route as it's a little convoluted (2 servers, different languages, no better than ADB over LAN) but it's an option. Java (iirc) also runs SocketIO just fine and would likely be a decent option for many devs who are familiar with the language and wish to run some stuff natively on Android Devices.
Feeling physically ill atm and typing on a phone so my apologies for the present lack of examples and assistance. Hopefully I can catch the time to address this but, frankly, there are few use cases for this outside of the one I'm presently targeting and it's quite niche to begin with.
Obviously, there will be minor differences between the emulator and hardware, but I'm running across major issues and wondering if others have found any solutions.
I have an .apk of my application, which loads and starts fine on the 2 pieces of hardware I have on hand (both OS 4.1.2). It then freezes up on a screen switch inside the application. This has happened before and it was due to that exact version of the OS having a particular bug (which should be worked around). Anyways, those details are not terribly important, that's simply how I got to thinking I'd test other versions via the emulator. However, here's what I hit:
Newer versions (5+) of the OS have an "Intel" option and my .apk crashes immediately on start on those versions.
Newer versions (5+) the Google version and 4.x generic (including the very same 4.1.2 I have on 2 hardware devices) starts my .apk fine, except that all the graphics are missing!
No difference between architectures on any given OS/class (32/64 bit, mips, arm)
What's the difference between Intel and Google versions of Android that would cause such a huge difference? Also, why does my app have graphics on hardware, but graphics vanish on the very same OS on the emulator? Are there options I need to change somewhere?
First update your SDK.
Then install emulator system image you need.
In SDK Manager you can find that Intel/ARM Android images start from 4.0.3 . Google Intel/ARM start from 4.4.2 instead .
Make sure you have hardware virtualization enabled in PC BIOS because Intel images need that and they are much faster for that.
Try to reinstall Intel HAXM . You can find setup in <Android SDK Path>/extras/intel\Hardware_Accelerated_Execution_Manager
Intel/ARM images use different CPU architecture. Instead Google/Android images have only a different software configuration. Google images include Google services like Play,Maps,ecc. Android images haven't them
It appears to be due to timeouts. Differing versions and "equipment levels" of Android devices take varying times to respond. The difference is especially large in the emulator. By bumping up all the system timeouts in the code I'm able to avoid all of the avoid weird issues.
Is there any benchmark tests results comparing this two emulators ?
I know that Genymotion is seems to be more faster when loading and rebooting the emulator,
but is there any tests show result like, Camera, GPS, networking and etc. ?
Have a look here for some informal benchmark comparisons. However, take these with a grain of salt because benchmark scores will vary greatly depending on the host system.
As for the items you want benchmarks for, not sure that camera/gps can even be benchmarked (what would you test), and networking is perfect since it uses VirtualBox, which has always had great virtual network support.
As a graphics/game developer, I find Genymotion unparalleled for running OpenGL code - on Genymotion it runs much smoother framerate wise, than using an x86+HAXM+HW GPU android emulator. Also, the integration of Google Apps/Services in Genymotion is fantastic.
Compatibility is the only downside, since Genymotion only provides v4.1+ images there is no way to test compatibility on older android versions - but for these tests I just use the standard android emulator (which is fine since it is not as frequent as normal testing).
Update: As of January 2014, Genymotion supports Android v2.3.7 as well as v4.3 (with v4.4 in preview). This means it now covers all relevant android versions except Froyo (v2.2), which at this time accounts for only 1-2% of all devices :)
I've been investigating whether to use Genymotion, with a particular focus on running automated Robotium tests.
The Genymotion startup time is around 5 seconds (compared to at least 30 seconds for the Android emulator). Genymotion also runs Robotium tests visibly faster, and with a smoother UI.
However, be warned there are some noticable differences between Genymotion and the default Android emulators:
You cannot use the special 10.0.2.2 IP address with Genymotion to access localhost on the machine you are running the emulator from. This means for local tests you may need to explicitly configure the IP address of the machine the emulator should connect to.
The difference in emulator speeds will expose timing issues in your tests. The most common one is list views needing to load their data.
I think that some Robotium Solo utilities might behave slightly differently between Genymotion and the default Android emulators. On Genymotion, I vaguely recall some problems with searchText(String) scrolling my screen to the bottom, even when the text I am searching for is already in view. However I suspect this was just another symptom of timing issues than anything being fundamentally different though (in that particular case you could always call searchText(String, true) to prevent the scrolling).
Use Android Emulator
I've personally tried both and android emulator is way better.
You just have to configure the emulator right.
My use case is mostly to manual test things here and there and run automation tests. I've benchmarked them both, android emulator is faster when running tests.
Almost all the sensors are present in android emulator and you also get an awesome command line tool with it.
For more detail, check out my blog benchmarking this.
So far I have been developing directly on my galaxy nexus and nexus 7 using the amazing AID app.
However, as the N7 can't provide logs due to it being jelly bean, i feel the need to get a mini notebook in order to utilise adb logcat.
My main worry is that something with only 1gb (2gb if i upgrade, which i will) and a 1.5-1.83GHz atom CPU won't be powerful enough.
I can possibly get around certain worries by not using emulators and testing directly on my two devices, so that will save me a great deal. Also I am tempted to just use vim and command line tools instead of eclipse which again might save me from a slow PC.
What do you guys think? Is the notebook way under powered? What if i just use vim and no emulators?
Side note, does anyone actually code in vim/command line?
something with only 1gb (2gb if i upgrade, which i will) and a 1.5-1.83GHz atom CPU
will work just fine, as long as you're not planning to run a tablet emulator. I sometimes have to work at my Asus EEEPC with the same exact CPU and I've got no problems so far
It is doable with 1gb RAM and using vim/commandline tools. However, eclipse provides a project wide perspective which is hard to duplicate in vim (vim power users may be as productive, if not more though). So in terms of memory 1, 2gb RAM will be fine. Testing on devices is always better than emulators.
One thing else though, a commandline build with multiple module dependency is non-trivial to setup and maintain. This is because Google has historically been modifying the build.xml file, breaking existing build scripts fairly regularly. So if you are well versed with build script internals and prepared to work on them you should be ok.
Debugging Android apps without Eclipse based breakpoint debugging support may be a significant issue too. Some bugs are caught in a lot lesser time with this. So plan accordingly if you don't want to use Eclipse.
Eclipse also provides very good JUnit/Robotium support for writing test cases, You won't get this with vim.
As I wrote down these points I think running Eclipse in 2gb notebook should be possible (just don't run other apps with doing development) and thus is recommended.
I have extensively used vim just not for Android development. You can also install vim plugin for eclipse if you prefer that.
Modern notebook hardware certainly is capable for software development; in fact, many (hobbyists as well as professionals) use a notebook as their main development platform.
However, with a mini / ultra-small form factor, you'll pay more for a less capable machine. Unless you need extreme mobility, I would suggest a standard notebook, with a little extra money spent on RAM (8+ GB) and an SSD. (Then, neither big IDEs nor emulation is out of scope.) If money is an issue, you can still get clunky-looking, but fairly powerful 15" or 17" laptops.
i think you Configuration is good enought to run Eclipse , Myself i had to Remove some Composant on my PC beacause we have 1 PC for Work/Internet/Eclipse and 1 PC for Gaming Etc ... , iam using Galaxy S2 and dont use Emulator many times , Yes i have some Slow Down some Time , but try Eclipse with the Minimal Configuration and No Emulators but Upgrade to 2 GB i have myself 2 GB Here and DUal Core E5200
Yeah that's under powered. For a windows PC I'd want 4gb of ram, not sure about Linux but atoms are dog slow either way.
I'm sure it'll work but it won't be fun, I'd be most worried about disk speed as that's what drives me nuts most.
I'd also take advantage of the ide and all its nice features too
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Slow Android emulator
is it my computer's hardware limitation? it has 1024 megabytes of ram 2200 x 2 dual core amd cpu i can't develop any android. the emulators are heavy what can I do? i download old sdk and newer ones but it still the same.
You could try using the x86 (Atom) system image it's faster than the arm images
See this link for more info
I have much better PC than you and even I have difficulties with emulating some OpenGL ES applications that I develop for android.
You must understand that emulating a CPU which is different than current architecture is very hard to do and as such very hard to do very optimized. Running machine code for ARM on x86 must bring some delays in running it. Conversion and repacking back and forth.
I would rather try to use your own Android device for testing and debuging purposes instead of emulator. It runs in real time and it will be better for you if you don't want to upgrade your CPU and RAM.
1 gigabyte of ram isn't enough. Eclipse alone would take up almost a two-thirds of that
(mine takes up 900mb - tweaked in eclipse.ini), and a 2.2 Emulator on HomeScreen would take up about 200mb. Unless you don't open anything else while coding - firefox, chrome (that ram sucker of a browser), mail client, chat client, etc., you're only a pinch below the limit.
The best you can do outside of upgrading memory is to run emulator in QVGA (in AVD Manager, click on your virtual device, click edit, under Skin, change Built-in to QVGA. But it would only do so much - you need at least 4 gig to go smoothly with all other apps open.