phhusson / Superuser

Keeping koush's Superuser fresh
GNU General Public License v3.0
424 stars 50 forks source link

Verified boot integration #13

Open phhusson opened 9 years ago

phhusson commented 9 years ago

Coming with Android M, verified boot will become mandatory on many devices. ( https://static.googleusercontent.com/media/source.android.com/fr//compatibility/android-cdd.pdf section 9.10) It is unclear whether this refers to http://source.android.com/devices/tech/security/verifiedboot/verified-boot.html, but we might expect so.

This enables users to keep a trusted (from a user point-of-view) system, by having a verifiable (by viewing fingerprint of the keystore at boot). We could integrate this verified boot in our SU. Multiple possibilities:

phhusson commented 9 years ago

I did some tests on Nexus 9 about this:

Moment of terror: once in locked, you can't unlock back(obviously since it factory reseted, and thus reseted the "unlockable setting"), and you can't flash anything either. But it did boot. I think that when I did unlocked -> verified and verified -> locked, the bootloader booted the boot.img in a special mode with fast reboot to bootloader to ensure the system did boot, but I'm not too sure.

I think that's all I've tested yet.

phhusson commented 9 years ago

Ok, we see pictures of new Nexus-es about it: http://www.androidauthority.com/verified-boot-warnings-in-android-6-0-marshmallow-650368 It seems like they properly implemented their whitepaper on latest Nexus.

phhusson commented 9 years ago

ERM. It seems like they didn't implement the "show the fingerprint of the keystore" part...

lbdroid commented 9 years ago

The last bit of section 9.10 specifies an exemption for devices that shipped a previous android version withOUT verified boot. The interesting thing about the wording, is that rather than making it an optional exemption, it actually FORBIDS verified boot from being enabled/forced. This is probably in order to continue to support the expectations of the device owner, rather than forcing an error message on them that they previously didn't have.

This is the reason why you need to manually enable verified boot on a Nexus 9 (and presumably a 6), and why the indicated message is consistent with being a test device rather than appropriate for end users. Likely they just added the feature in order to allow people like US to work with the features without forcing us into buying this year's 5x/6p.

I wouldn't be concerned over the missing fingerprint, it would probably be present on a 5x or 6p.