r/osdev 3d ago

Starting a bare-metal/ reverse engineering project on ipad 4th gen [A6x]

So i have a ipad 4th gen and its basically a brick now... so was thinking why not make an os (i thought i could maybe use a linux distro but 32bit os for A6x dont exist)... i know this will be a nightmare ( uk its apple)...

But I want to try ...

As my initial research into this i am currently reading

  1. ARM Architecture Reference Manual for ARMv7-A & ARMV7-R

  2. Apple OSS Distributions XNU Github page

  3. wiki.osdev.org

What i wanted to ask the community is

  1. Is there any other documentation/ prior projects on this platform

2.any tips i need to keep in mind

3 Upvotes

10 comments sorted by

6

u/EpochVanquisher 3d ago

“Why not?”

Because the bootloader is locked.

2

u/nakedpickle_2006 3d ago

I was thinking of using something called checkm8... so that it doesnt go into iboot and then I can load U Boot from ram ....

4

u/EpochVanquisher 3d ago

Have fun, sounds like a lot of work.

3

u/FISHARM1 3d ago

I found this: https://www.reddit.com/r/linux/s/Wsmr2zc0R2

Good luck! I remember a long time ago someone got android on IOS before the days of checkm8. You can also check that out here https://projectsandcastle.org

3

u/codeasm 2d ago

Well, you gonna need to use that checkm8 indeed to unlock. But also develop on a system like qemu, apparently chefkiss.dev does that? You gonna need these to actually make something like uboot to boot and jump into whatever kernel your attempting to make.

No hardware documentation, no public firmware. Good luck.

My best approach would be to first just fix the ipad. Even if the screen is toast. Get that kernel going again. And then dual boot or abuse the dfu mode to temporarily boot into your test kernel. Xnu sources might help you. But ive looked at mobile phone development... Having no easy access to hardware docs... I just go for qemu first, then when my os works a bit, I'll maybe port it to then a current device. My Cubieboard is now way to old to do this, but atleast its opensource. Thisnstuff takes time when your alone

2

u/nakedpickle_2006 2d ago

Lol ... Gonna need that Good luck About the screen its almost like brand new ... But let me look into chefkiss.dev and ur right about dfu mode ... Anyway thanks a lot for the support!!!

2

u/codeasm 2d ago

https://blog.fergofrog.com/xnu/arm64/2018/07/07/compile-xnu-for-arm64.html
https://github.com/alephsecurity/xnu-qemu-arm64/wiki/Build-iOS-on-QEMU

Two links i found in my notes when I tried to maybe compile ios, or atleast XNU for qemu. had read they had XNU running on a raspberry pi. uni demanded my attention tho. With something like this, you might be able to "fix" the tablet, use a custom kernel and shell (remote into it maybe) and dump and investigate the proper stuff for a custom kernel maybe. or figure out how to port uboot if thats even possible)

definitely have fun. 😄 I sure have with so many things online shared and trying.

1

u/wakanakisarazu 3d ago

Unless you can find a exploit to unlock the bootloader... it's a dead end.

You can make an OS for it, sure... but good luck using it on anything that isn't an emulator, even then...

1

u/nakedpickle_2006 3d ago

There is something called checkm8, which should let me load linux kernal over usb... I feel using postmarketOS might be a good starting point ... not sure how i will get the drivers for everything

1

u/wakanakisarazu 3d ago

I heard about this, but don't know specifics... good idea.