We are experiencing extremely long installation/start/run times for Android Things applications on the NXP PICO-PI-IMX6UL. This issue is observable when using both Android Studio and adb directly on the command line.
A small application of ~2MB in size takes anywhere from 5 to 15 minutes to install. The same application on the Intel Edison only takes only a few seconds to install.
It's worth noting that other adb operations seem to run very slowly as well (i.e. shell, logcat, etc.).
We have closely followed the procedures outlined using these resources to install the Android Things image:
https://developer.android.com/things/hardware/imx6ul.html
We have re-flashed the Android Things image several times and experience the same issues.
To rule out any application issues, we have tried installing/running the Android Things sample template application found here: https://github.com/androidthings/new-project-template and experience the same issues. We can verify that this application installs/runs without issue on an Intel Edison board running Android Things 4.1.
Here are a few more details about our setup:
Host:
Mac OS 10.12.6
Android Studio version 2.3.3
Android Debug Bridge version 1.0.39
i.MX6UL:
Android Things Developer Preview Image 5.1
Any suggestions on what is wrong with our setup or what might be causing these issues?
Thanks!
Update 10/20/2017
Further testing with additional NXP i.MX6UL boards has only shown minor improvements in installation and runtimes, and the results are not consistent. We also tried swapping out the daughterboard for an older version (Wandboard i.MX6UL), but the results were the same.
We plan to continue testing as newer versions of Android Things are released, but in the meantime we are going to continue development with the Intel Edison, despite it being discontinued.
I assume there is something wrong with the chip configuration, since simply keeping the kernel "alive" keeps the system rather busy with only 50% idle.. Running the gradle task "uninstallAll" solved the problem if I was not able to start further debug sessions.
Show current CPU usage:
adb shell
top
Related
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/
I've recently downloaded Visual Studio 2017 Community Edition With Xamarin (almost 21Gig), followed by latest Android SDK (another 50 gigs or so) and related tools, along with Intel HAXM tool.
All the above installations are fully succeeded and supported on my Win8, Core i5, 8GB Ram desktop development box.
The issue is The AVD launches and the build process goes on and on for like ages (I just wanted to check how soon the simple 'Hello World' app is deployed and I've waited for 2 hours).
I got no error warnings no sign-of freezing anything within VS or on OS, yet nothing seems to working. The simulator shows up however the sample application is not being deployed
Only thing I suspect for now is change of SDK location which I believe, I took care of that already.
Please advise, what could be the reason (check the screen shots for more info)
Though the reg-edit change is made according to this forum
https://forums.xamarin.com/discussion/64088/android-emulator-opens-but-project-does-not-deploy-and-start
My SDK Manager is also fully updated
The AVD in question
The following trick worked for me,
I was not noticing the release mode can have issue (even debug mode is poorly working though)
Thanks Plac3Hold3r for pointing me towards properties, I wouldn't have
noticed the other factors, other wise. Wish I could have marked you
for an partial answer. Anyway thanks for your time, really appreciate
it.
I have switched to ubuntu 14.04 from windows7 and now my android studio is hanging too much and my system configuration is as follow :
Ram : 6 GB
Processor : Dual core
Main problem is while debugging the application and for that i am using device not an emulator and i have also seen that my sdk size is 60 GB on ubuntu but on window it was about 15-18 Gb and I don't understand why it is taking this much space?
So if someone has idea why this problem is coming,
Please Help me with it.
Thanks in advance
The hanging problem can be a result of lot of different things:
-It might be because your Android Studio is using too much of RAM.
You can check this by following command:
$top -o %MEM
this would result in such an output:
the output of top command
the "Java" there in the first line, in the linked image is the Android Studio and in my case its using 47.5% of RAM.
As I have low RAM, the OS starts using SWAP memory which would make the application respond slower. Usage of swap memory can checked by using command
$vmstat 1
So, there is no way you can bring that down. You can only close other applications so as to provide the required RAM.
I have 2Gigs of RAM and therefore I login into OpenBox and then start Android Studio, this works for me quite well
While the size of SDK must not be a problem.
The size of SDK depends upon the tools and the API related SDKs that you have downloaded.
You can open up your SDK manager and delete some packages if you want but that wont make Android Studio run faster.
-The other reason can be the iBus-daemon and that is a known issue. The workarounds can be found here
http://tools.android.com/knownissues/ibus
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.
My experience with the Android emulator is that it is so slow that it is unusable. I see threads related to the issue going back over a year. The lack of a coherent response to the question is unacceptable (this is not the Community's fault).
Question: Has anyone that has experienced extreme slowness (more than 15 minutes to launch) actually resolved this issue so that startup is less than a couple of minutes? If so, what did you do?
Please note that I am not trying to tie the emulator to Eclipse. I am teaching mobile web app development using jQTouch. The web apps are testing by running the emulator standalone and opening the Browser.
While my machine is a little dated, I have no trouble running Vista, Office, PowerStudio, etc. Here are details to add to the data around this issue.
OS: Microsoft Vista, 32-bit
Processor: Intel Celeron M CPU 520 # 1.60 GHz
Memory: 1.5 GB
Symantec Antivirus - Disabled
Emulator Start with no animation - did not help
Startup time in excess of 20 minutes
Java Version: 1.6.0_21
AVD Settings: Device RAM size 1024, Snapshot support enabled both in AVD and startup. - ram size and snapshot did not help
Google needs to acknowledge the issue and provide guidance about what development environments actually work. If there were a recommendation for platform, java version, memory, etc., I would follow it.
Right now I have no options other than to tell students that the Android emulator doesn't work. The only android solution is to buy a real phone, which limits testing to a single Android version and configuration.
Students are not having trouble with the iOS simulator running on the Mac.
If someone that works for Google could actually comment, that would be great.
Thanks,
Dale
The Android emulator is just that, an emulator -- it is emulating an ARM processor. Emulation will never be as fast as native. Given you are using such a large amount of your computer's memory for the emulator, you are likely having to page consistently, which will add to making the performace suffer.
The iOS simulator on the other hand is just a set of APIs that matches the iOS SDK and pretends to be an iOS device, but is running all code natively on the machine with all the resources, processor speed and memory the machine has, and likely to run significantly faster than running on the actual device.
I have no problem running the Android emulator on my old Core Duo T2400 # 1.83GHz with 2GB of RAM. The startup time can be a few minutes, but once it is running it works well with only occasional lag.
My desktop with a Core 2 Quad Q6700 # 2.66GHz with 2GB RAM tears through the emulator.
Both machines have run the emulator under Windows and Linux with varying Java versions getting similar results. My guess is that your processor is a little on the weak side.
check this article How to speed up the android emulator by up to 400
Or in brief, download an android-x86 build here, install with virtualbox, find ip address of android vm by alt+F1 and netcfg (alt+F7 to go back to graphical mode), and connect to the vm using adb (say adb connect 192.168.1.5).
Just used it, much more faster.
I've found the emulator to be very slow too - I think it's best to have a working android device and just have the emulator for a backup 'second opinion' or a reference device. It's usable but much slower than my phone, even though my current device is quite low end.
Eventually, I found that sending my code to the physical device (or emulator) was becoming a bottleneck so I build a small framework to allow me to develop most of the work as a desktop application. This has worked very well so far and has sped up my development turn around considerably. Your milage may vary.
Try using Genymotion emulator for android which is fast and also support all major platforms including Linux/Mac and windows. It also has specific emulator image files to emulate actual mobile devices like Xeperia Z or Nexus 4 and so forth.
Use Genymotion. It s is a very fast android emulator.
Android emulator is just a emulator, it emulates an Android device. It's like virtualization, you share your computer's resources with emulator, you'll need to have the latest processor and at least 8GB or RAM to run faster. About RAM: Windows and background programs consumes a part of your resources, if you upgrade your computer resources, the consumption of these software will be almost insignificant and you'll have a lot of resources for your emulator (supposing you also have Eclipse or Android Studio running).