Android Emulator screen is corrupt and stretched - android

I have been trying to get android emulator to work in a GCloud server instance with Ubuntu 18 installed, with KVM and virtualization settings are all done properly.
Because the server does not have an actual gpu, I am using -gpu swiftshader_indirect and forcing it to use software based rendering mode, i.e cpu instead of gpu.
Right after the emulator boots up, the view is in green and pinkish colors with overly stretched resolution. This both looks bad and prevents me to use it, please see the attached image below.
Please see the image of the problem
I had also had problems to get a proper view of the whole Ubuntu Desktop UI with using VNC Viewer, and kinda hacked some startup config file to get things proper (not sure If I did everything correct), could this be related to it all? Apart from the emulator screen, I have no problems elsewhere on the system UI though

Related

Android Emulator shows only on a small part of the screen

I have a problem with my android emulator. It only shows a fraction of the screen.
Screenshot:
I have Android Studio version 3.0.
I tried a lot of things. I could fix the error when I use the emulator with Software emulated graphics but it is really slow.
know someone the solution?
thank you.
Make sure you have configured hardware acceleration correctly.
Disable the Device Frame by edit action.
Start the emulator and Go to Extended Control
Go to Settings and change OpenGLES render to Desktop native OpenGL
Restart Emulator and Resize the Emulator Window.

4k display & Android emulator: fail

I'm moving to my new laptop which has 4k screen (3840x2160, to be exact). As my OS of choice I have Linux, and all scaling I have set up for this is done via Gnome (scaling-factor in gnome tweaks is set to 2). Overall, setup looks perfect, except for Android AVD run in IntelliJ IDEA.
AVD is configured to use skin with 1920x1080 dimensions, and I've expected that it would be roughly the height of the screen, however for some reason AVD is scaled up, which obviously looks.. weird and unusable.
I've took a look at relevant questions here about scaling the emulator, but it seems that IntelliJ interface has changed, as there is no Emulator tab in Edit Configurations menu (and answers to questions I've seen said to use that option to downscale the emulator). So, question is: how do I scale it down (or, to put more correctly, how do I disable the scaling for emulator)?
Ok, I've found out what the issue was. UI scaling is handled by Qt in case of android emulator. It was set to: QT_DEVICE_PIXEL_RATIO=2 somewhere in my configs. This made emulator act weird. Cheers!
Just delete the environment variable and restart Android Studio to get the new env variables.

Android Studio screen tearing on dual monitors

I recently installed Android Studio to learn more about app development. However, I'm seeing screen tearing to such an extent that the IDE is pretty much unusable. Demonstration in the photos below:
Example showing a typical screen tear
Example showing NO tearing (same project, same editor view - captured by minimising the window, re-maximising it, then quickly taking the pic)
For the avoidance of doubt, this screen tearing is only happening within Android Studio on my Windows 10 machine. No screen tearing happens within games, editors such as Notepad++, or suchlike.
Some of the things I've tried to pinpoint the issue:
Changing my graphics card settings, back when I didn't know it was limited to Android Studio. I have a GeForce GTX 980, and various googling led me to tweaking VSync to adaptive and Triple Buffering to On in the hope it resolved the issue. I also tried changing my two identical monitors' refresh rate (connected via Display Port cables, Extended desktops) from 60hz to 59 and 50 to see if it might resolve it. No luck.
Changing many of the Android Studio appearance settings e.g. turning window animations on or off, changing the tooltip MS delay timer, turning off file synchronization/file saving on frame activation and background saving entirely, etc.
Even changing the Android Studio config e.g. -Xmx2048m instead of the default 750mb.
In terms of triggers, the issue is intermittent, but when it does start, it's there until I reboot my machine. In other words, it doesn't relate to my running a phone emulation or having a specific phone emulated, nor what other programs are running on my machine at the same time, nor if the phone "preview" screen is showing, nor if a gradle build is running in the background, etc.
Other interesting aspects that I've spotted are:
The screen tearing seems to be concentrated around where the mouse cursor or keyboard input is located, not randomly on the screen.
I think the issue is not occurring when my monitors are set to Duplicate their displays, rather than Extend. I'm not 100% sure on this yet though; I certainly haven't seen it in half hour experiment using the Duplicated monitors.
I'm now out of ideas, and ready to give up on Android Studio.
Although this feels more likely to be a hardware or graphics issue, because Android Studio is the first and only thing that I've experienced issues with, I was hoping someone else may have an answer about what else to try.
I was having this issue as well on Android Studio 2.0. I fixed by disabling G-Sync on my Nvidia GTX980
See Android Issue Tracker http://code.google.com/p/android/issues/detail?id=189308 ("Screen garbled / messed up when repaint on 1.4").

can I scale genymotion emulator to "device real size"?

I just started using genymotion and I really like it.
One thing that is frustrating me is that emulators take a lot of screen space and are contained within scrolling window.. which makes it less convenient to use
I tried to change screen resolution or look for some kind of option myself but with no luck
is there "scale to real device size" option like in sdk emulator?
UPDATE
when I start genymotion binary, get the following in the console
~/coding/genymotion$ sudo ./genymotion
Genymotion log file: /home/u238/.Genymobile/genymotion.log
Player log file: /home/u238/.Genymobile/genymotion-player.log
OpenGL connected to 192.168.56.101:25000
Port 22468 will be used for OpenGL data connections
The emulator shows up for about 5 sec.. black screen with white ui buttons on the right.. and then it disapears from screen
UPDATE
[facepalm] to solve the vanishing emulator just install graphic drivers supporting opengl 2
GenyMotion Virtual Device opens and disappears immediately
Ok I get it.
You're not running the Genymotion player but Virtual Box. Try to run the genymotion binary (the one where you downloaded the templates) and to launch your VMs from it directly. It brings a lot of improvements.

Is it just me...or is android honeycomb 3.0 emulator really slow?

Well? I've tried increasing the RAM size of the emulator to 1024 MB and there was little improvement on the speed, however, it's still unusable. It has the speed of a turtle.
Anyone got better ideas to make it faster? Is there something I'm not doing correctly?
Check out the android developer documentation regarding 3.0 emulator performance. Scroll down to About Emulator Performance.
Copied tip for convenience:
Tip: To improve the startup time for the emulator, enable snapshots for the AVD when you create it with the SDK and AVD Manager (there's a checkbox in the AVD creator to Enable snapshots). Then, start the AVD from the AVD manager and check Launch from snapshot and Save to snapshot. This way, when you close the emulator, a snapshot of the AVD state is saved and used to quickly relaunch the AVD next time. However, when you choose to save a snapshot, the emulator will be slow to close, so you might want to disable Save to snapshot after you've acquired an initial snapshot (after you close the AVD for the first time).
Seems like everything 3.0 and beyond is slow for me. Everything before that runs very fast in emulator for me. However, I have an Intel integrated graphics card in my laptop. When I turn 3D setting to "Application Settings," I get relatively decent performance from the emulator, at least when it starts up, but then when I try to start any app from the default main app menu (contacts, for example) I get launcher errors. That happens for me on 3.0, 3.1 and 3.2. The one thing I'm suspicious of is that I'm running 64-bit Java SDK. Seem to be a number of posts out there related to 64-bit, but mostly they seem to be point to using 64-bit SDK with 32-bit Eclipse or vice versa, but in my tests, I am not even running Eclipse, haven't even reinstalled the ADT yet, just the Android SDK and created a few emulator instances. Again, prior to 3.0 everything is fast. 3.0 and beyond not good, but A LOT better with graphics settings as I mentioned above. If I could get past the launcher issues, I think I might be all set. Oh, btw also, for 3.0 and beyond, I bumped the memory up to 1024. I've tried increasing the heap for apps to double the default (from 48 to 96) but that doesn't seem to have alleviated my launcher problems.
It is slow. You can try creating a new Emulator with a smaller resolution.
I remember someone at google I/O saying that the HoneyComb emulator will run really really slow due to hardware acceleration turned on.
The PC may use software rendering for OpenGL hence the bad performance. The almost everything you see on the HoneyComb screen is rendered using OpenGL ES.
감사합니다,
Reno

Categories

Resources