[HN Gopher] QEMU for iOS
       ___________________________________________________________________
        
       QEMU for iOS
        
       Author : funkaster
       Score  : 120 points
       Date   : 2020-02-21 18:19 UTC (4 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | neilsimp1 wrote:
       | This is cool, but I can't help but think that running a VM on an
       | iPad or iPhone would be horrendously slow.
        
         | throwaway55554 wrote:
         | Why would you think that? Apple's processors are very powerful.
        
         | akhilcacharya wrote:
         | 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
        
           | hinkley wrote:
           | 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.
        
           | anonsivalley652 wrote:
           | Nice.
           | 
           |  _Printed on electrons from a cheap(er), used iPad Pro 10.5 "
           | over 4G LTE_
        
         | nfoz wrote:
         | Sure but if it's to emulate a computer from 1985 with half a
         | meg of RAM, it might not be so bad :)
         | 
         | Edit: my bad, somehow I thought this was UAE the amiga
         | emulator.
        
       | machello13 wrote:
       | 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 wrote:
         | 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.
        
       | LeoPanthera wrote:
       | > "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_.
        
         | throwaway55554 wrote:
         | I use and enjoy Apple products, but behavior like this is so
         | annoying. My devices are _mine_ and this should _not_ be a
         | restriction.
        
           | dreamcompiler wrote:
           | IOS devices have never been your own. Apple justified this in
           | the early days on the grounds that they were protecting
           | mobile phone networks from hackers, but that argument fell
           | through when the iPod touch (an iPhone without phone
           | functionality) was equally locked down. The only thing Apple
           | is protecting with this policy is their revenue stream.
        
         | kccqzy wrote:
         | I'm not very familiar with iOS but is this restriction a
         | fundamental limitation or just a paper-cut style limitation
         | that's just one more hurdle for developers to jump through?
         | 
         | It appears to me that developers who are previously using
         | dynamic libraries now have to invest in the effort to make them
         | static libraries and link them to the main executable. So it
         | seems like it can be overcome, but just more hassle. Am I
         | correct?
        
           | earenndil wrote:
           | It is completely arbitrary, yes.
        
         | Wowfunhappy wrote:
         | > 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 wrote:
           | Do apps from a $99/yr account last for a year or is there
           | some other sort of time limit?
        
       | NamPNQ wrote:
       | The title lets me think about ios emulator run in qemu
        
       | tjoff wrote:
       | 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._
        
         | anonsivalley652 wrote:
         | Apple's control-freaking and exploitation of customers has
         | reached peak unreasonableness. I don't think SJ would've been
         | so focused on making trillions when some billions could be had
         | with cooler, repairable, lasting products. Personally, I have
         | one foot out of the door (hackintosh) regarding the Apple
         | ecosystem. I'm going to let the iPhone 6S, iPad Pro 10.5 and
         | Apple Watch 4 run however long they can, but that's probably it
         | for me, I'll stick to repairable devices like my ThinkPad T480.
        
           | dreamcompiler wrote:
           | It's ironic that Woz especially wanted to bring computing to
           | the masses, not lock it down. Apple is the antithesis of its
           | own founders' vision.
           | 
           | Apple deserves to be disrupted.
        
         | saber6 wrote:
         | You can pay for a developer account ($99/yr) which allows you
         | to get your builds signed by Apple for the purposes of you
         | running either dev-builds locally or internal-only apps for an
         | organization.
         | 
         | That's what they mean by "no jailbreak required". Flipside is
         | you gotta pay for a dev account to get your stuff signed to
         | allow it to run.
        
           | gruez wrote:
           | You don't even need a (paid) developer account. Anyone with
           | an apple id can sign ios apps with a validity of 7 days.
        
             | snazz wrote:
             | Not dynamically loaded libraries after 13.3.1, however.
        
               | jscheel wrote:
               | General consensus is that this is a bug though. Apple has
               | not come out with any announced change.
        
           | dahfizz wrote:
           | You need to pay a subscription to run your own code on your
           | own device? Why anyone puts up with Apple's anticonsumerism
           | is beyond me.
        
             | thebruce87m wrote:
             | Security. Privacy. Long term support of hardware
             | (environment). No carrier crapware.
        
         | dhosek wrote:
         | I'd imagine most of those who would have need/interest in
         | running this would probably have a developer account and could
         | just compile and install it themselves.
        
           | [deleted]
        
         | trasz wrote:
         | This is just not true. There are many emulators in AppStore,
         | from i48 (which runs HP 48's native Saturn ROM), to ZORK, which
         | runs PDP-11 binary of said game underneath, along with emulated
         | RT-11 (or was it RSX-11?).
        
         | rgovostes wrote:
         | > 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 wrote:
           | 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
        
             | tech234a wrote:
             | Pythonista has been featured by Apple several times. As
             | others have pointed out, only pure-Python modules can be
             | used unless they are precompiled and included with the app.
        
             | ericlewis wrote:
             | it is categorized as a learning application, but I am quite
             | curious how you made a proxy with it.
        
           | dwheeler wrote:
           | There's no legal risk. Microsoft allows people to install
           | emulators on their OS without issue.
           | 
           | The issue is that Apple wants a big profit cut on each app.
           | If you were allowed to download & run applications on your
           | own computer, then Apple wouldn't get its cut.
        
             | rgovostes wrote:
             | That may be _one_ factor, but it certainly isn 't the only
             | one. There are plenty of remote desktop apps on the App
             | Store. But Steam Link was held up in review because Apple
             | did not want people being able to buy games without getting
             | a cut.
             | 
             | Microsoft "allows" people to install emulators in the same
             | sense that Apple "allows" it on macOS, but a quick search
             | confirms that Microsoft does not allow emulators on their
             | app store, nor does Google. (These policies may
             | specifically be for video game emulation, which is mostly
             | what the legal grey area covers.)
        
               | tyfon wrote:
               | Google play has emulators, here are some examples [1] [2]
               | 
               | It even has Bochs [3]
               | 
               | Or am I misunderstanding something?
               | 
               | [1] https://play.google.com/store/apps/details?id=com.exp
               | lusalph...
               | 
               | [2] https://play.google.com/store/apps/details?id=org.mup
               | en64plu...
               | 
               | [3] https://play.google.com/store/apps/details?id=net.sou
               | rceforg...
        
               | rgovostes wrote:
               | Yeah, could be allowed. I did a fast search and there
               | were records of apps such as SuperRetro16 being kicked
               | out. But I don't know if it's a policy that is poorly
               | enforced, or the removals were for some other reason.
        
           | rhodysurf wrote:
           | Interpreted code is fine for most cases, but compiling is a
           | big no no. Which is unfortunate and limiting
        
       | frabert wrote:
       | > "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 :)
        
         | detaro wrote:
         | probably :D
         | 
         | https://www.spice-space.org/
        
         | anonsivalley652 wrote:
         | A different kind of "circuit." ;)
        
         | hamiltonkibbe wrote:
         | Hah, having parameters like --vga-cable-length --ambient-
         | temperature --psrr would be fun though
        
       | jasoneckert wrote:
       | Has anyone used this? What is the performance like?
        
       | lwb wrote:
       | > 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.)
        
         | jsjohnst wrote:
         | > iPad + keyboard + Windows Remote Desktop
         | 
         | Why not just install the free Microsoft RDP client for iOS?
         | Seems like extreme overkill to use an x86 emulator with a full
         | OS installed to do something that's available for free in the
         | AppStore.
        
         | anonsivalley652 wrote:
         | That's not much different than TestFlight (acquired by Apple)
         | or MS AppCenter (acquired as HockeyApp).
         | 
         | PS: I'm using an iPad Pro 10.5 over LTE right now with an
         | original Apple Wireless Keyboard 1 with proper arrow keys. I
         | use Vim on it and can save to shared services. Heck, you can
         | even fire-up the embedded python with _:!python3 <enter>_ It
         | also redirects phone calls from my vintage unlimited data plan,
         | so I don't need a phone... but it looks goofy talking into my
         | iPad John Oliver-style. ;)
        
           | lwb wrote:
           | The important difference is the turn around time -- with Expo
           | I can make a change locally and see it with my testers in
           | less than a minute, whereas with TestFlight everything has to
           | be manually reviewed for 2-3 days after a heavy-handed
           | submission process.
        
             | jsjohnst wrote:
             | I routinely do TestFlight builds without manual review and
             | fast turnaround from build -> running on beta user devices.
        
         | rhodysurf wrote:
         | 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 wrote:
           | 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?
        
             | ericlewis wrote:
             | the largest difference is that Expo uses JavaScriptCore, a
             | framework provided by apple for use by any application that
             | wishes to execute javascript code. Since it is their own
             | interpreter it is fine.
        
             | rhodysurf wrote:
             | 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/iOSProgra
             | mming/comments/dr5bxi/app_...
             | 
             | 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.
        
         | kick wrote:
         | Apple's really loose with the interpreted code policy. Not
         | going to mention some of the apps I use that do so if nothing
         | else because HN has dozens of Apple employees.
        
         | [deleted]
        
       | osy wrote:
       | 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.
        
         | lazerl0rd wrote:
         | Thanks for the amazing work, I thought about this a while back
         | when I saw WINE Hangover for Android but this is even better
         | (in some ways, at least). Sadly, the iPadOS/iOS 13.3.1 issue is
         | a headache and the certain jailbreak tools which usually get
         | around IPA signing aren't working either.
         | 
         | Whilst most people are saying it's a bug on Apple's side I'm
         | worried it's more than that. The removal of signed iPadOS/iOS
         | 13.3 from their servers, along with the returned ability of
         | flashing static lib'ed packages after all being blocked for a
         | while seems more "on purpose" from Apple rather than "by
         | accident". We gotta just wait and see, I guess.
        
           | osy wrote:
           | I think the jailbreak IPA signing isn't working because it
           | needs the `get-task-allow` entitlement which idk if every
           | tool is aware of. This entitlement is only given out in
           | development profiles and not any distribution profiles so I
           | can't upload to TestFlight either. If Apple locks down what
           | you can do with `get-task-allow` in the future then a
           | jailbreak would be required to run this.
        
             | lazerl0rd wrote:
             | Would you by any chance consider TestFlight to distribute
             | UTM? iSH (a usermode Linux "terminal" emulator) has been
             | for quite some time, and I can't see why you shouldn't be
             | able to.
        
               | osy wrote:
               | > This entitlement is only given out in development
               | profiles and not any distribution profiles so I can't
               | upload to TestFlight either.
        
               | jsjohnst wrote:
               | iSH works differently. It's not running "Linux" and it
               | isn't virtualizing hardware either. Anything you run has
               | to be compiled for ARM already and the syscalls are
               | emulated, there is no Linux kernel in iSH.
        
       ___________________________________________________________________
       (page generated 2020-02-21 23:00 UTC)