
QEMU for iOS - funkaster
https://github.com/utmapp/UTM
======
osy
Hi, author here. I’m here to answer any questions but also I want to advertise
the fact that it would be really really awesome if interested devs can join
the project. Currently it’s just me doing this on my spare time for the past
year. Specifically I’m a complete newbie at UI/UX stuff and the project could
use a real designer/front end developer.

Also for more info and a few videos demonstrating capabilities and performance
check out the website: [https://getutm.app/](https://getutm.app/)

~~~
nottorp
Question then: why are you investing time in something that Apple will never
allow in the app store? Isn't it better to spend your effort on a more open
platform?

Note: i use an iPhone and iPads. I do my hacking/customizing elsewhere.

~~~
osy
Because it’s fun to do and it’s cool to play with. I want to run a Linux
development machine on my iPad. I couldn’t care less about making money or
growth hacking or starting a side hussle or one of the dozen other reasons why
people here believe they must do to have their free time be seen as “optimal”.
I just want to have fun with it.

~~~
masterjefferson
HOW DARE YOU

------
tjoff
Not being in the apple world I wondered if this submission meant anything had
changed regarding running stuff like this on iOS, but no:

> _Why isn 't this in the AppStore?

Apple does not permit any apps that has interpreted or generated code
therefore it is unlikely that UTM will ever be allowed. However, there are
various ways people on the internet have come up to side load apps without
requiring a jailbreak. We do not condone or support any of these methods._

~~~
rgovostes
> 2.5.2 Apps [may not] download, install, or execute code which introduces or
> changes features or functionality of the app, including other apps.

The rule changed, I think around the time that Swift Playgrounds came out, to
add:

> Educational apps designed to teach, develop, or allow students to test
> executable code may, in limited circumstances, download code provided that
> such code is not used for other purposes. Such apps must make the source
> code provided by the Application completely viewable and editable by the
> user.

There are probably plenty of apps that do interpret downloaded code (the Frotz
app to play old text adventures comes to mind) and fly under the radar. But
Apple would surely be on the lookout for any kind of emulator, due to the
legal risk.

~~~
rlyshw
You can run seemingly unrestricted python code on your iOS devices with
Pythonista [0]. I'm using it right now to proxy my hotspot connection through
my iPhone.

Not sure how they're allowed to exist on the app store, but it's been solid
for me for a while now.

[0]
[https://apps.apple.com/us/app/pythonista-3/id1085978097](https://apps.apple.com/us/app/pythonista-3/id1085978097)

~~~
ericlewis
it is categorized as a learning application, but I am quite curious how you
made a proxy with it.

~~~
zakki
I guess he made an app that open a port to let user to connect to it and
proxy-ing the request

------
LeoPanthera
> "Since iOS 13.3.1, it appears Apple has stopped allowing free developer
> profiles to sign dylibs."

A terrible decision. Users should always be allowed, at the very least, to
build and sideload _their own code_.

~~~
Wowfunhappy
> Users should always be allowed, at the very least, to build and sideload
> their own code.

You barely can anyway. Unless you pay $99/yr for a developer account, any
self-compiled apps you install will expire after seven days. If you want your
app to keep working, you need to plug your phone into a computer and recompile
every single week. That's just not realistically usable for anything other
than simple testing.

Yes, it should be allowed. But it's not. It's been this way for the entire
history of iOS and it's awful.

~~~
sigjuice
Do apps from a $99/yr account last for a year or is there some other sort of
time limit?

~~~
anta40
Only last for a year. After that, renew it. Unlike Google dev account which is
$25 for lifetime, single payment only.

------
frabert
> "Fast native graphics through para-virtualization thanks to SPICE"

I'm assuming the SPICE referred to here is not the SPICE I know, unless
they've gone the full video circuit emulation route, which I don't imagine
being fast at all :)

~~~
hamiltonkibbe
Hah, having parameters like --vga-cable-length --ambient-temperature --psrr
would be fun though

~~~
anticensor
And you would have to specify all those parameters in imperial units, but
according to most idiosyncratic measurement methods possible, like that: cable
length includes the connector, but only one end counts.

------
terminaljunkid
On Android, there is termux terminal emulator, which allows to run native
Linux binaries and already has many packages. Arguably there were other ways
also before termux existed: GNURoot Debian was an app that ran a minimal
Debian chroot in fake root (`proot`), Before that there was KBox. In termux
also I run a full Debian chroot using proot. None of this requires root.

Even without that, static binaries could run till some recent version. I have
poked with dynamic loading and LD_PRELOAD to set up my own environment which
could run most Debian packages using libfakechroot && libfakeroot.

People like to shit on Android. But in terms of power user freedom, apple
doesn't even come near.

------
lwb
> Apple does not permit any apps that has interpreted or generated code

An interesting exception to this is Expo, an app that lets you load React
Native apps built by other developers over the internet. Expo gets around this
on Apple by forcing you to sign into that developer's account before
downloading their app, so that it's plausibly "yours". I've used to distribute
early builds of a React Native app really easily.

All of this to say, I wonder to what degree Apple's policy applies when it's
"your" app, or you are the developer, or whatever. I suspect Expo, as a
venture backed startup, has some kind of a working relationship with Apple
that affords them a tiny amount more leeway than the average Github user.

This could actually be an incredibly useful application that many people pay
lots of money for if were ever allowed on the market -- think of the
combination of iPad + keyboard + Windows Remote Desktop. Really sad that Apple
makes their platform so restrictive. (Yes, security issues, but still, seems
like a good enough sandbox could overcome the danger of remote execution.)

~~~
rhodysurf
Expo is also completely different and within the rules. They arent installing
apps, they are simply loading JS and running it like any RN app could do. They
just make it easy by pre-bundling deps so that they can be loaded on the fly.
Its literally just downloading JS and assets from a server and then executing
the JS with JSC on ios.

They also get around the limitation of having half the screen showing the
executed code by not letting users modify the code through their app.

~~~
lwb
Right, but the QEMU project is also simply loading X86 (or other) assembly
code and interpreting it in a virtual machine... unless I misunderstand this
project and it does something more sophisticated.

> the limitation of having half the screen showing the executed code

I'm not aware of this limitation, could the QEMU port use this to show the ASM
that's being executed to get around this?

~~~
rhodysurf
IDK about virtual machines and why this isnt allowed. But related is how this
app works that is a c compiler for iOS and is in the app store:
[https://www.reddit.com/r/iOSProgramming/comments/dr5bxi/app_...](https://www.reddit.com/r/iOSProgramming/comments/dr5bxi/app_for_coding_and_running_c_code_in_ios_locally/)

It basically does the same thing Swift Playgrounds does where is compiles to
LLVM machine code and runs it will LLVM compiled for iOS. And it is on the app
store so IDK the rules at all apparently and why QEMU wouldnt be allowed.

~~~
dfox
The rules apparently (since last year or so) are that you can interpret
arbitrary code as long as the code in question not only legally but in
practice meets the definition of the zeroth FSF's rule (notice that the
“executables” on the FS image distributed with SeeLess are LLVM IR assembly
text files, which is probably the reason why the thing is so damn huge)

------
rcarmo
I have been using iSH for many months to have a moderately sane CLI
environment on my iPad, and bemoaning the App Store restrictions that prevent
it from being better integrated and more popular.

I fear this will also never reach its full potential... but it is great to
see.

------
machello13
serious question as someone who has an iPhone + iPad but isn't very familiar
with emulation. What could you do with this? How feasible is it to run Windows
and then install Steam or something like that?

~~~
jsjohnst
I ran Linux and Windows 95 on a first gen iPad using Bochs. Boot time was
utterly terrible, but it was kinda useable after. Given the performance
improvements in recent iPads, I’m hoping this will be better, but I’ll let you
know once I get home and try it.

------
bibyte
If you want this on Android it is available in the Termux repository. If you
have a flagship device it should be fast enough to be usable.

~~~
tluyben2
What Android tablet is comparable to a modern iPad pro in performance, screen
and battery life? I really like the iPad pro but I hate the artificial
restrictions... All the Android tablets I tried out, flag ship ones, just fell
down compared. I have a Surface Go for when I need Windows, but that is
probably one of the worst buys of my life.

I currently use iPad Pro with Remotix to access OS X + Windows which works
really well. If there was a Remotix for Linux, I would use Linux only, but
there is no comparable VNC client for Linux. Compared the ones under Linux are
unusable (and I did try them all).

~~~
bibyte
What about the Samsung Galaxy Tab S6? It seems to be comparable to the iPad
Pro in terms of performance and screen. I tried out an Android tablet a few
months ago and it seemed pretty fine.

If your want to do portable programming I would recommend a light 2 in 1
laptop. You can dual boot Windows and Linux on it (Windows for media
consumption and Linux for programming). But it is bigger then a tablet.

Of course if you use a server you can use anything you want to do programming.
But personally the latency is a dealbreaker for me.

~~~
tluyben2
I will try the S6; it seems good but someone told me there are no really solid
keyboards for it? I never checked it because I already had an iPad.

> But personally the latency is a dealbreaker for me.

I had that issue too :) However that changed when remotemac (no affiliation)
introduced me to Remotix; I live in the mountains and my internet is bad, and
yet it has no latency with 4k screen transferring. Anything on Linux is just
horrible compared. I develop apps on my iPad and it works really well like
that.

My ‘dream’ (bit extreem but lets say preferred way of working) is to use my
x220 with Linux to do that; then I can do all dev on that machine while doing
iOS dev remotely. Now I still have to carry an Android tab, Windows laptop (I
can do that on the x220 but I really do not like to dual boot) or iPad with
me.

------
NamPNQ
The title lets me think about ios emulator run in qemu

------
jasoneckert
Has anyone used this? What is the performance like?

~~~
saagarjha
It took about a minute to boot Alpine Linux on a debug build. It's currently
about half an hour into booting elementary and it's just started the display
server.

~~~
saagarjha
Update: about an hour in it got stuck trying to start the login service.

~~~
hedora
I’ve had elogind deadlock on physical machines (on many distros and machines,
including elementary). I have an nfs server, so it’s probably timing related.

Try a non-systemd distro (e.g., MX linux, Devuan, slackware).

------
OrgNet
I'm surprised that Apple allows apps like QEMU... it's not like them. Gives me
hope...

~~~
saagarjha
This hasn’t been approved by Apple.

~~~
OrgNet
but it says "No jailbreak required!"... I thought that meant only appstore
apps where allowed on your device...

~~~
evanjd
You can sign and deploy apps to your own device with Xcode. This is all
explained immediately after the “no jailbreak required” dot point in the
README.

------
neilsimp1
This is cool, but I can't help but think that running a VM on an iPad or
iPhone would be horrendously slow.

~~~
akhilcacharya
The iPad Pro is very impressive, here a video of one playing Half Life 1 in XP
using UTM [0]

[0]
[https://www.youtube.com/watch?v=O19dNVTBCAs&feature=youtu.be](https://www.youtube.com/watch?v=O19dNVTBCAs&feature=youtu.be)

~~~
hinkley
Have you played Civ VI on an iPad? Except for being slightly harder to click
on things (and no keyboard shortcuts) it plays the same as the desktop
version. Same UI and graphics.

