8 ms·
QEMU-iOS, an emulator for legacy Apple devices
- glimshe 3y agoThis is cool. For some reason Apple devices are particularly poorly represented in emulators when compared to other systems. The emulators do exist, and recently we've seen better options for the Macs from the 80s and 90s, but they are generally not as feature rich or well supported.
- binwiederhier 3y agoPretty sure the "some reason" is just legal reasons. Afaik, Apple does not allow Apple software to be virtualized on non-Apple hardware. So while it may be technically possible, it may be legally questionable. In my head, when I saw this post, I instantly thought "Time to Apple legal action.... 3, 2, 1...". But maybe I'm wrong or things have changed.
- ianlevesque 3y agoAs long as they're not distributing iOS or any proprietary ROMs with it then the emulator is perfectly legal.
- lxgr 3y agoMany modern emulators need a BIOS-like ROM/flash image to even boot up; the situation is much less clear there, since these usually contain software and can accordingly be copyrighted. Some emulators solve this by providing their own (re)implementation, but that’s not always easy. And even when it’s “just” iOS: That is copyrighted too! So it’s the same problem – either there needs to be an iOS ABI-compatible OS, or it’s probably not possible to emulate any application legally, unfortunately.
- ianlevesque 3y agoYou are correct on all points of course. My main point was that unlike projects that distribute those components there's really no grounds for Apple to DMCA down the emulator's GitHub repo itself.
- lxgr 3y agoAgreed, unless Apple wants to make some Oracle v. Google-like claim on that iOS or firmware reimplementation violating their copyright, or maybe the emulator being capable at circumventing their FairPlay DRM for apps…? I really hope I’m wrong about this, but I feel like between this and iMessage, Apple might lean on DMCA before too long to protect their walled garden.
- amelius 3y agoJust look at how hard Nintendo shut down any attempt at emulation.
- a1xndr 3y agoDoing this is a huge amount of engineering work. Things like the usb controller, modem, audio, touch sensor, and many many more are often custom hardware without any specs available that you somehow need to simulate. That's not even getting into the display tech. And these things change with each new hardware iteration. In the OP repo, there appear to be 25 of these things that the author had to reverse engineer an emulate. And that's for 15 year old hardware. Things like usb controllers require thousands of lines of dense C code. Then you have all of the CPU extensions leveraged by iPhones that generally have poor/nonexistent emulation support. This type of emulation/rehosting is a notoriously hard problem even for simpler devices like routers. Modern game emulators typically move up the stack and intercept high-level graphics etc APIs because emulating all of the hardware would be a ton of work (and doing so in performantly would be impossible). The simulator that comes with xcode works in a similar way. But by doing this, you lose a lot of the capabilities that you might want from an emulated device (kernel/driver debugging, etc). There is a reason that Corellium can charge so much for SASS access to recent-model emulated iPhones.
- beeboobaa 3y agoApple's whole deal is that you either submit to their lock in, or you gtfo. The only way to make an ios app is to: 1) Spend $100 a year for the privilege of being allowed to access their app store 2) Buy several $1000 iPhones (you'll be expected to test on every model they currently support by app store reviewers) 3) Buy one $2000 macbook per developer that needs to work on the iOS app (build tooling only runs on macos) 4) Good luck if you want to integrate this with your CI! Either another mac mini ($1000) or a subscription to some service that does it for you. Forget about using your linux boxes that you use for everything else. Apple says no! 5) Everyone who needs to log in to the apple developer portal also needs an iDevice. Apple is so secure they only support their own proprietary second factor push messages to iDevices! You can see why they don't allow emulators or virtual machines. Think of the sweet, sweet $$$ they'd be losing out on!
- madeofpalk 3y agoHow is this different to other commonly emulated devices?
- i5-2520M 3y agoOther commonly emulated devices are not "general purpose" computers like phones, tablets and laptops. There is no need to emulate those systems generally since they can be ran in a VM (Linux, Android (mostly), and Windows). I know your main point is comparing to consoles and that is probably fair to some extent, but still, I wanted to mention these.
- beeboobaa 3y agoIn practically every way. You don't run into any of this shit when developing for Android, Windows or (obviously) Linux.
- lxgr 3y ago> Apple is so secure they only support their own proprietary second factor push messages to iDevices! Don’t they support SMS 2FA as well? They do for my dev Apple ID that’s not logged in on any other device at least, and I see the option as a fallback on my personal ID too.
- bzbz 3y ago> For some reason […] Likely because Apple themselves provide an emulator that accommodates most developers’ needs.
- afavour 3y ago> For some reason Apple devices are particularly poorly represented in emulators when compared to other systems. Well, what would you use one for? Apple provides emulators for current iOS versions and the centralised App Store means versions of iOS apps for old OS versions aren’t readily available the way they are for Windows etc. Beyond maybe testing old versions of Safari it’s more of a historical curiosity than something with real use. It’s kind of weird, given the number of user hours spent on, say, iOS 6 era Instagram, that we have no way of replicating the experience today.
- pmarreck 3y ago> For some reason Apple devices are particularly poorly represented in emulators when compared to other systems Must be all that lockdown they do. Which is a damn shame, as some early iOS games and whatnot were actually really cool and no longer exist in a runnable form except on those devices (and that is assuming you already had them installed!)
- infotainment 3y agoWhat’s sad about this is that without backups of the old App Store as it existed at that time, you can’t do much beyond playing with the calculator and notes apps. Digital distribution and lock-in are a disaster for historical preservation.
- JTon 3y ago> Digital distribution and lock-in are a disaster for historical preservation. Agreed. This reality slapped me in the face quite hard after I was given an ipad 2 (circa 2011). I figured I'd use it as a couch-side device for spotify. Soon realized nothing worked on it, even with old version apps loaded. Server side shut it down.
- dkonofalski 3y agoThat's partially because of web security, though, if I'm not mistaken. I have an old Windows PC and an old Mac mini that I use as servers and, outside of local stuff that's bridged to the outside network (and heavily crippled), I can't do much on them because of the changes to the TLS protocol for SSL certs. That means that the browsers won't connect to most modern servers, any apps that hardcoded instances of TSL can't connect to the internet, and, if I managed to get something to connect, it would be a huge security risk for anything on those machines. So, if the connection is being shut down on the server side, it's likely because of the TLS version mismatch. I thought it would be a simple solution just via updated software but was told (by peeps on Reddit, so it's likely to be total nonsense) that, although it can be updated, it won't run reliably on older hardware unless that hardware can also support newer OSs. Win7 and below (?) don't support it and MS won't provide updates with it and MacOS versions before Lion don't have it. I've heard you can also update OpenSSL by breaking the symlinks to the OS's install and get it working again but that's more hassle than I cared to put in. Also, most of those old iPads are able to be jailbroken. You can update OpenSSL on them and probably get Spotify working again.
- gnyman 3y agoYes. Although I would disagree with the statement "it would be a huge security risk for anything on those machines" Older TLS protocols have vulnerabilities yes, but most of them require a very motivated attacker with the ability to do a MITM. I wrote a blog post about why I have decided to support older protocols, https://blog.nyman.re/2021/02/07/usability-security.html https://blog.nyman.re/2021/02/07/usability-security.html , the tl.dr. is that only allowing new TLS just means more forced obsoletion. For Banks and other sensitive things, yes it makes sense, for your personal blog, not so much. I mean... Google still allows TLS 1.0 , if it was a "huge security risk", do you think they would? The updating OpenSSL/breaking symlinks sounds interesting, do you have more info? Personally I have a old iPhone 5S running iOS6 which I use for listening to podcasts. I ran in the the TLS issue there and my solution was to use a proxy https://bitbucket.org/ValdikSS/oldssl-proxy https://bitbucket.org/ValdikSS/oldssl-proxy Works well, and until maybe a year ago or I could even browse Apple's Podcast Store, but at some point that stopped working so now I'm stuck with the ones I have there. (Cydia still works though... Thanks Saurik)
- xvilka 3y agoHopefully merged into the mainstream one day.
- daniel5151 3y agoIf you're curious about emulating even older apple devices (Clickwheel iPod), I worked on an emulator for a few months called `clicky`. Very nifty project, given the weird and undocumented architecture of those early iPods https://github.com/daniel5151/clicky https://github.com/daniel5151/clicky