Qemu-system-x86_64 pegging the processor - android

I have a Mid 2015 MBP that I use for developing both Android and iOS apps. I have been having a lot of issues with the Android emulator using way too much processor. Sometimes it's using 120% - 130%. My system fans run full blast the entire time I'm trying to work with it and it's gotten to the point where I really just don't want to work on the code anymore because of the effects on the computer.
I have scoured the internet looking for solutions. The one that I came across that seemed to work for a while was editing the config.ini for the emulator and updating the following lines:
hw.audioInput=no
hw.audioOutput=no
hw.cpu.ncore=1
hw.gps=no
This seemed to work and my processor dropped to 8% - 15% and my computer stopped overheating. After a while, this stopped working. I've tried everything that I can think of. I've restarted the emulator, stopped and started the emulator, and even killed and recreated the emulator. Nothing has worked.
This seems like a big enough issue that I see all kinds of posts around for it. Has there ever been a solution that works all the time? I've updated Android Studio to the latest version. I am on OS Catalina right now. I cannot think of anything else to do.

Related

Android adb crashing with segmentation fault 11 on MacOS Big Sur (11.6.4). Anyone else run into this?

Okay, so I just installed Android Studio on my new (to me) Macbook Pro. It's a mid 2014 model with i7 and 16Gigs of ram. It's fully updated to what Apple will allow, which should be plenty for Android Studio.
I've setup Emulators and coded with them using Flutter through VSCode no problem.
When I go into the terminal and run adb, all I get is Segmentation fault: 11. That's it, nothing else. It simply will not run. I plug my phone in, and of course it's not detected. I can run adb devices, which just shows none.
I've tried googling, but it seems Segmentation fault: 11 is super popular, so I can't find my way through the weeds to anything related to what I'm experiencing.
So, I've gone into Android Studio and forced it to remove the platform tools and reinstalled them through the Brew command, same thing. Is it that the latest version is incompatible with Big Sur? Should I install an older version of Android Studio? Has anyone else run into this problem? I'm hoping I'm simply overlooking something simple, but I can't for the life of me figure it out. I'm hoping to get a bit of feedback before I have to dump the whole thing and put an older version on. I have the emulator working nicely, I just want to use a physical device too.
Okay, so maybe this will help a fellow adb noob out. I recently (finally) figured out my problem, sort of. At least it's working now, so that's all I care about.
Okay, so, the first thing I ran into was that I was using a power cable, not a data cable. Rookie mistake there. So, once I had that head smacking realization, at least my phone started acting normally with the debug request.
That is, once I ran across an article the pointed out adb start-server existed. I mean, it makes sense. Maybe I'm wrong, but I would have figured that just typing adb into the terminal by itself would try and start the adb server. So, once I got that working, it finally connected with just the minimum pain that seems to go along with these types of things.
Still, I cannot understand why calling adb by itself causes a Segmentation fault, but I'll leave that up to the people who work on Android Studio to figure out, cause I'm moving on.

Android app slow when installed from Android Studio, but runs fine when installed from adb

I'm not really sure how to word this.For some reason when I install an app that I'm working on from Android Studio it runs very slow (when an option is pressed it takes 10-20 seconds to register). But if I install the app from either my coworkers Android studio or adb from my own machine it works fine.
My specs are:
OS: Windows 10
Android Studio Version: 3.0.1
Phone OS: Android API 24
It was working fine this morning, but during the course of the day, something has happened. Has anyone run into this sort of problem before?
I'm using a Samsung Galaxy S8 physical device. I have tried a factory reset on the phone which worked for one install after I changed some things I'm back where I started. I have also restarted both the machine and phone multiple times. I'm at a loss as to what is going on. If you guys need any more info let me know. Also INSTANT RUN IS NOT ON.
EDIT: I'm at a total loss as to why this is happening. I've tried everything from restoring the phone, reinstalling Android Studio, changing wires, changing settings, but nothing is working. If anyone has a suggestion I will gladly try anything.
I've finally found a solid solution to my problem. I'm positive now that something went wrong with m usb drivers for windows 10. I went to this page https://answers.microsoft.com/en-us/windows/forum/windows_10-hardware/windows-10-slow-usb-30-transfer-speeds/a5e1eebb-74bb-4777-8902-5131f3e8ec3e and I completed the steps in method 1 and that did the trick for me. it took a while to find this out, but hopefully, someone else will find this helpful.
Have you compared your yesterday build and today build which is making your app slow. Any Significant change in code?
Have you set up breakpoints or similar? Some debugging options can significantly slow the app down at runtime. When this happens, if you disconnect the phone from ADB - e.g. pull out the cable - and it speeds up again, then it's likely related to your debug connection to that particular instance of Android Studio.

Emulator refuses to boot past Android screen

I am currently a QA intern at an app publisher and I use the AVD to test apps on various Android platforms and hardware builds. I touch nothing else within the Android SDK, just launch the android exec through the terminal and go from there.
I installed and started using AVDs with no issue about a month ago, installed the Intel HAXM with no issue, etc. It randomly stopped working for me about two weeks ago and I've been struggling with it since then. I've deleted everything from the Android SDK and reinstalled several times, tried using adb to no avail, nothing. I haven't been using Eclipse to get to the AVD Manager, but even when I do it makes no difference.
I've run into a dead end after trying every potential solution I could find on the Internet. Help me before I go insane.
Also using a Retina MacBook Pro, not that I think that'd make a difference, but just incase.
I am going to put this up as an answer just because I really found it to be the best solution to all of my native AVD issues (my default AVD emulators would creep even on my faster machines). I downloaded genymotion and must say that I am a million times happier with the emulation. It is faster, smoother, has more options, it just makes the native AVD look even worse than it already does on its own. Even if genymotion isn't for you, I highly recommend looking into third party emulators. It will make QA, development, etc. with Android that much easier. Assuming ARM isn't required (don't think it does ARM emulation)

Android development in IntelliJ IDEA causes computer to freeze

I am using IntelliJ IDEA (10.5) for Android development with latest Google USB Driver (version 4) for debugging. After some time of development in IntelliJ IDEA when Android device (Nexus One) is connected via USB, the computer (with Windows 7, 32 bit) freezes. No blue screen just freeze. Everything is visible but screen is not updating. I have to restart the computer.
Is anyone experiencing similar issues? Any solutions?
Sorry, not sure how to comment on your original post (the field is not displayed).
I'm experiencing the same issue and I'd love to determine a solution. It's very annoying!
I use Eclipse (Windows 7 64-bit) with a Nexus One (2.2) and my PC will randomly, completely freeze. The mouse pointer locks up, Caps Lock button (and others) don't toggle, touch pad doesn't react, etc. No blue screen and nothing is ever written to the system's event log. I have to physically shut down the machine and restart it each time.
At first, it happened in the same manner for me -- developing within Eclipse. I noticed it didn't happen on compile or debug launch, more during development (again, randomly). Then I noticed it started happening when Eclipse wasn't open at all. That's when I started to suspect a driver or similar issue. But I'm not sure how to troubleshoot further from here.
If anyone has ANY insight into this issue, it would be greatly appreciated.
UPDATE: Incorrectly reported N1 version as 2.1 -- corrected to 2.2
Idea is known to have long GC pauses sometimes - it may freeze completely for some time. And it takes even longer if it goes into swap - in this case, whole system may become unresponsive. See this issue and discussion in forums.
So, if it is indeed your case, try using statically-compiled version from here - it's proven to work faster.
It sounds like OS/Hardware problem

Android Eclipse Plugin Too Slow

I'm currently on a Windows 7 box with 1.83GHz processor and 1 GB RAM. I used be able to use all applications with no speed issues. I recently installed Android Plugin in Eclipse Helios and now Eclipse has slowed down badly. Running projects/creating projects/saving code changes all takes 3-4 minutes to happen. When the emulator is launched, it takes a good 10 minutes to be able to use my app. What is causing Eclipse to slow down ?? Wasting a lot of time on this. Please help.
Thanks in advance !
Your system should be running on the edge of the limit when you have Eclipse and the Emulator running. If possible work on a device or check the CPU/RAM usage while working. You should be able to see where the bottleneck is.
If you have Windows XP somewhere, I strongly recommend to switch back to XP...
Usually when your using programming envionments such as eclipse it is very taxing on your computer. The emulator taking up to ten mins to run is not shocking. I also had the same problem but if you have an android device you can use it to test your programs (its almost instant compared to the emulator.)

Categories

Resources