FOSS

iPhone 7 booting Ubuntu 20.04 to full gnome-shell desktop GUI

Pinterest LinkedIn Tumblr

WE DID IT!! BOOTS TO THE FULL DEFAULT GNOME DESKTOP!

ORIGINAL THREAD: https://www.reddit.com/r/linux/comments/kux9xx/success_iphone_7_with_dead_nand_netbooting/

One developer by the name of “newhacker1746” on Reddit is taking the challenge of turning the iPhone 7 into a Linux-powered smartphone. Besides booting the ARM64 build of Ubuntu 20.04 LTS on an iPhone 7, the developer also managed to run the full-fledged graphical shell of the GNOME desktop environment on the device.

r/linux - SUCCESS: iPhone 7 booting Ubuntu 20.04 to full gnome-shell desktop GUI

BIG NOTE 0: lol i literally wrote this entire post from Firefox running on the iphone 7 XD big brain time + arm64 rocks

BIG NOTE 1: Holy shit! This blew up! Thank you everyone, I had no idea this was gonna be that big. I’m truly humbled by how much interest it’s garnered. I hope I’ve been able to effectively deliver the inspiration that Linux provides not just to me, not to just to the people reading about this, but to millions of developers, employees, and children alike. It’s a tool to change the world, and I’ve never been prouder to support a worldwide revolutionary example of software which saves devices from the trash, revives old laptops to help children in need, or simply makes a convenient server out of an otherwise useless iPhone.

BIG NOTE 2: It’s reached 9to5mac and iDownloadBlog and more! It’s been reported that I am running on a “jailbroken” iPhone and that to be able to do this one has to have already jailbroken the phone. That’s not correct; in fact there’s no possible way for me to jailbreak this iPhone, as its NVMe NAND is downright inaccessible. That is to say, iOS will never be able to boot on this phone. If there weren’t a Linux kernel port for A10, one might be able to affectionately call this phone not a Linux phone but a brick. One can pull all of this off without ever jailbreaking the phone. The only reason I’m using checkra1n is for the bootrom exploit and unsigned code execution. In fact, this iPhone had never been jailbroken before flash failure. I got it from my grandma who had the NAND die on her suddenly.

————–

Background: I actually was going to stop at just booting nogui. Believe it or not, I am going to be using this in production; I will actually be deploying this iPhone as a server to relieve capacity issues at my home servers. I’m 16 and run several school/club websites and game servers for my friends and myself, and I’ll be distributing some load to the iPhone to relieve the main server!

With A10 IPC on par with Skylake, the performance per watt of this device is downright astonishing. The entire “server” is powered off a USB port on the main server.

TO-DO: Run benchmarks

  • I would love to use the phoronix test suite, but I have no idea what benchmark suite I’d be running. Let me know what you’re interested in seeing!
  • From memory in news articles and geekbench scores, A10 nearly matched Skylake IPC, and I’d love to see whether that still holds true in a Linux environment
  • Let me know if there’s anything else you’d like to see tested/run on the Ubuntu iPhone!

Fixes since last time

  • sudo apt install linux-firmware ubuntu-desktop
    • Working on getting brcmfmac firmware (not my main focus though, as I don’t need it)
    • No compromises ubuntu-desktop, since its just an nfsroot folder that I can easily make a copy of for my actual production setup, why not go grand for a test
  • New services: https://github.com/newperson1746/iphone7-linux-nfsroot/tree/master
    • g_ether_dns.service –> /etc/systemd/system/g_ether_dns.service
      • enable it to fix DNS not being set by kernel dhcp
    • vino_server.desktop –> ~/.config/autostart/vino_server.desktop
      • For mouse/keyboard input to gnome-shell, also remote access is useful in general
  • sudo nano /etc/gdm3/custom.conf
    • Uncomment AutomaticLoginEnable and AutomaticLogin
      • set these for your user
      • As VNC doesn’t work in gdm3 but it’ll autostart on login
  • gsettings set org.gnome.Vino prompt-enabled false
    • To allow connection without triggering a prompt that we have no way of interacting with

Quick thing for anyone who’s trying this out

  1. If your nvme NAND isn’t dead, try compiling hx-touchd, fixing hx-touchd.service from https://github.com/newperson1746/iphone7-linux-nfsroot/tree/master , and moving firmware/D10.mtprops to a location like /lib/firmware/multitouch/D10.mtprops
    1. This is the daemon that uploads the firmware and config for the touchscreen; it won’t work for me because it depends on certain data on NAND (/dev/nvme0n3) from iOS, which is corrupt by the dead NAND cells.

Write A Comment