[SuperSU] Chainfire:
EXPERIMENT: Root without modifying /system #2: Automation

EXPERIMENTAL, ARE YOU SURE YOU WANT THIS ?

All discussion should go the SuperSU BETA thread

Continuing on the previous post, here is SuperSU v2.62 BETA, with automated boot image patching. It's been tested by myself on various Samsung's running anything from 4.3 to 5.1, and all of the recent Nexus devices on 6.0. Even on CM13. Other users have tested it with success on various other devices.

If you are coming from any SuperSU install in /system, you must re-flash the stock system (and vendor and oem, if present) partition contents prior to installing this.

If you are coming from a SuperSU 2.56 system-less install, you must re-flash the stock boot image prior to installing this.

If you are coming from a SuperSU 2.60 system-less install, or were not rooted at all, then you can just flash the ZIP without any special prior instructions.

If TWRP offers you to keep /system read-only, indeed keep it read-only.

If TWRP tells you SuperSU is not installed, and asks you to install it, do not do it, you will break things!

If on Android 6.0 or Samsung 5.1, the ZIP installer will install SuperSU in systemless mode and patch the boot image. The boot image patcher currently only supports gzip compressed ramdisks and the standard Android boot image format. Some devices do not use the standard format, and many custom kernels use a compression other than gzip. A backup is made (/data/stock_boot_<sha>.img.gz) of the original boot image before patching it.

Further implementation details (including an updated list of changes to the ramdisk) are explained in the installer script itself, as usual.

Notes on 2.62+

A poor man's overlay is used on /system/xbin. We are creating a copy of /system/xbin in /su/xbin_bind, adding a symlink to /su/bin/su there, then mounting the entire thing on top of the original /system/xbin. This is likely to fix some compatibility issues with some apps, without actually modifying /system. Removing /su/xbin_bind and rebooting will disable this feature, or "echo BINDSYSTEMXBIN=false>>/data/.supersu" in recovery root shell before a SuperSU ZIP flash.

If you have one of those devices that refuse to remount system r/w in Android such as the Nexus 6P, but you do want to do this, "echo FSTABSYSTEMRW=true>>/data/.supersu" in recovery root shell before a SuperSU ZIP flash will patch the boot image in such a way that remounting will work. This feature itself breaks OTA compatibility, regardless of if you end up writing to /system or not.

Both of these features are likely temporary.

Notes on 2.64+

There have been a lot of changes to the ZIP installer. Hopefully they won't break a lot of installs. If 2.64 works well, it is likely to be promoted to the "main beta" in place of 2.52, and the How-To SU document will be updated with the relevant information.

A major change in setup is that the ZIP installer will try to detect 6.0 firmwares that can be rooted without doing a systemless install. In other words, a root that modifies only /system, but not the boot image. If this is possible, the installer will install into /system (unless you override via "echo SYSTEMLESS=true>>/data/.supersu").

This may catch (a) firmwares that allow sepolicy reloading from /data but have a locked bootloader and (b) custom firmwares setup to handle this. Regarding the latter, while it is not as clean as systemless, those running custom firmwares are more likely to want to modify /system anyway, it is less likely to mess with updates to those firmwares, and it prevents the necessity of reflashing the ZIP after each kernel switch. Of course, the kernel's SELinux policies must support this! See this thread for details for devs.

Notes on 2.65+

As 2.65 adds /su/xbin, I recommend flashing the ZIP rather than installing the APK from the ZIP, as some people tend to do.

Notes on 2.67+

I recommend flashing the ZIP rather than installing the APK from the ZIP, as some people tend to do.

Downloads

BETA-SuperSU-v2.60-20151205163135.zip

BETA-SuperSU-v2.61-20151207213702.zip

BETA-SuperSU-v2.62-20151210170034.zip

BETA-SuperSU-v2.62-2-20151211155442.zip

BETA-SuperSU-v2.62-3-20151211162651.zip

BETA-SuperSU-v2.64-20151220185127.zip

BETA-SuperSU-v2.65-20151226141550.zip

BETA-SuperSU-v2.66-20160103015024.zip

BETA-SuperSU-v2.67-20160121175247.zip