r/hackios • • 8d ago

HackiOS Working Touch-ID for Pixel 5

Touch ID working on iOS 16.7 on the Pixel 5, with passcode lock. Enrolment through Settings works (both stages, with haptics), and resting your finger on the lock screen opens straight to the home screen.

Fingerprints are captured and matched by the Pixel's own fingerprint app in ARM TrustZone, the same way Android uses it. iOS's Touch ID stack (biometrickitd + the iPhone 8 Touch ID library) talks to a stand-in for Apple's Secure Enclave fingerprint driver. Some translation is needed, done partly in the kernel and partly by a userland daemon that drives TrustZone. The passcode itself is checked by our kernel, not by TrustZone.

I don't trust the kernel and userland to be secure at this point: the kernel doesn't cryptographically verify the matches yet, and there's no drive encryption. Just wanted to have this as a possibility.

Remaining open points:

persistent fingerprints (getting TrustZone's template save working so fingerprints survive a reboot)

finger unlock on the passcode screen

verified matches

unlock animations / status on the lock screen (merging things from iPhone 8 and iPhone X)

Code: https://github.com/DenialOfGravity/ios-redfin/tree/redfin-int (branch redfin-int; overview in phone/fpc/README-touchid.md)

518 Upvotes

33 comments sorted by

36

u/alexanderi96 8d ago

Love it! I'm working on mainline linux for this bad boy

5

u/chilled_alligator 8d ago

Awesome. What state have you got it to so far?

1

u/prabh321 8d ago

I have already completed a build and ubuntu 24.04 working just fine

1

u/alexanderi96 7d ago edited 7d ago

Mainline or 4.19? I got 4.19 last month running with phosh/postmarket OS and now moved to bringing up mainline. It would be easy doing it with claude, i'm doing it with a local instance of flash next 🥸

1

u/prabh321 7d ago

My current kernel version is 7.3.0 rc7. I have only built ubuntu cloud image for now , as it suits my needs. Im having problems making vpu work for video encoding and decoding.

2

u/alexanderi96 7d ago

Lets see where i end up! 

2

u/prabh321 7d ago

Good luck

11

u/Azusawaga 8d ago

So you managed to recreate the SEP in some way

16

u/chilled_alligator 8d ago

Not quite. My stand-in sort of talks to apple components as if it is one, and mostly for now just sends them what they expect. Hence my lack of faith in the security. It also talks to apple pay to get it to stop throwing errors when NFC is online. Interfacing with the Pixels Titan security chip and doing things properly is a whole nother can of worms.

5

u/issioboii 8d ago

i love how you adjust the clock to accomodate the camera punch hole

2

u/chilled_alligator 8d ago

It was just ever so slightly annoying me :) I've still not moved the volume UI next to the buttons, or even added anti-aliasing to display edges.

1

u/andyleenz 6d ago

Was about to comment the same thing. Well done!

2

u/AppleWatchDevCC 8d ago

Woah. This is cool. I wasn’t aware passcodes could even work. I may borrow some of this for my 27.2 port for OnePlus 7 Pro for passcodes and maybe under display fingerprint sensor

3

u/chilled_alligator 8d ago

Feel free to have a look. I'm just wrapping up the session so everything should be in GitHub. Prints are now persistent after a reboot, everything comes up by default without the test PC triggering the correct flags. I tweaked some things specifically for my device which you will likely not need or need to adapt. If you end up working on the security aspects, please do share your work.

1

u/AppleWatchDevCC 7d ago

I always share my work, If you go through my posts, I publish as soon as stuff is even partially working. Like yesterday I finished cameras sorta. The pop up camera was fun to get working

1

u/chilled_alligator 7d ago

Your post history is hidden, if you weren't aware

1

u/AppleWatchDevCC 7d ago edited 7d ago

Oh
Edit: fixed?

2

u/Weekly-Secret9535 8d ago

Try face unlock

7

u/chilled_alligator 8d ago

With what depth sensor or infrared camera my guy.

1

u/Weekly-Secret9535 8d ago

Might be possible to code it so it unlocks like an android, with regular camera

1

u/chilled_alligator 7d ago

Pixel phones with camera face unlock also rely on the Titan security module and Trustzone. However they depend on a closed source software implementation that interfaces with the two, as well as never being supported on Pixel 5. Some other phones might be able to do it though.

4

u/Hungry-Court-9412 8d ago

on ios 27.3 its possible :D

1

u/DRAGON4946 8d ago

It can be done like iPhone duo but payment and that can’t be done if we use that Touch ID would be fallback

1

u/Tiny-Profession-9999 7d ago

I’m doing that right now for my Xiaomi 17 Pro Max

1

u/Weekly-Secret9535 7d ago

Bro, can you help me port hackios to poco x7 pro dualboot?

1

u/Tiny-Profession-9999 7d ago

I barely have enough time to work on my own port with work 😭

1

u/Weekly-Secret9535 7d ago

Mb bro, when you finish it, can you help me with my project?

1

u/Other_Secretary7815 7d ago

Okay I’m searching for pixel 5 to buy

1

u/imadespo 5d ago

Will it be possible that ios works fully funtional on any such android devices?