utmapp / UTM

Virtual machines for iOS and macOS
https://getutm.app
Apache License 2.0
25.13k stars 1.27k forks source link

[qemu] Port android emulator changes for qemu #29

Closed konstantintuev closed 4 years ago

konstantintuev commented 4 years ago

I don't get how to run Android arm64. All the resources I find online are from 2014 with lots of dead links and my only clue is that the standard AVD by google runs on qemu but I have no idea how to run it. Any help would be greatly appreciated!

Also is arm64 performance better on a arm64/e device than x86_64 performance or is it the same because it's emulated anyway?

osy commented 4 years ago

Yeah, this is a known issue. I also read online that Android requires some google specific patches to qemu but I haven't dug more into it. Right now, most people running android are using kvm which is not available. OSX does not have kvm and I wasn't able to get qemu working on OSX either. If someone enlightens me on how android emulator works on OSX, the same thing can be done on iOS.

Umiiii commented 4 years ago

If I remember correctly, the official Android emulator on macOS is also based on qemu. ~/Library/Android/sdk/emulator/emulator Have you ever tried it?

SarKaa commented 4 years ago

Actually I researched into this a bit, it turns out the latest version of android x86 that doesn’t require kvm is android 4.3 Link: https://archive.org/details/android-x86-4.3-20130725_201512

SarKaa commented 4 years ago

If I remember correctly, the official Android emulator on macOS is also based on qemu. ~/Library/Android/sdk/emulator/emulator Have you ever tried it?

Wouldn’t that be a bit difficult to port onto iPhone

osy commented 4 years ago

I mean obviously you would have to look at the source code, diff it with qemu 4.2.0 and then take the changes and so on.

SarKaa commented 4 years ago

I mean obviously you would have to look at the source code, diff it with qemu 4.2.0 and then take the changes and so on.

I mean if you are prepared to sure, but you probably have better stuff to do, like updating utm itself. Also what about the google patches that let you run android without the need for kvm, they could be helpful

osy commented 4 years ago

Yeah that’s why I said “you” and not “me”. I have no plans to work on this issue. It’s a suggestion for anyone who wants to take a look.

SarKaa commented 4 years ago

love to see that your still working on this,

f1shy-dev commented 4 years ago

Doesn't the android emulator on Mac use HAXM for acceleration?

osy commented 4 years ago

Two things:

1) After spending a good chunk of my morning trying to find the Android Emulator changes. I don't think Google has posted their source code since 2015. I don't think picking 5 year old changes that may or may not already be merged upstream would be useful. 2) But it doesn't matter because turns out Android x86 pretty much works without needing Google's fork after adding some args. They're still too slow to be usable because of the lack of hardware accelerated graphics. See https://getutm.app/vms/

SarKaa commented 4 years ago

Thanks man, you’re amazing