• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Rooting Android 5.0 / L(ollipop)...

scary alien

not really so scary
Mar 5, 2010
Don't know how many folks are following the imminent release of Android 5.0 (L(ollipop)), but for those folks getting a new Nexus 6 or Nexus 9 or have an older device that will be receiving Android 5.0 (Lollipop) OTA soon, getting root is going to be "interesting".

If you've been following Chainfire on Google+ or XDA, you might be aware of the research and testing he's been doing getting root (su / SuperSU) ready and working on Android 5.0.

Well, Android 5.0 brings us more things set in Security-Enhanced Linux enforcing mode (vs. the previous permissive mode introduced in Android 4.3).

Anyway, what he's found is that SELinux as configured in the Android 5.0 preview images (the latest being LPX13D) makes rooting a device very difficult. To root a device running Android 5.0, you'll need to:

- flash a new kernel (boot.img) which has the init.rc file (contained in the ramdisk) changed from:

service flash_recovery /system/bin/install-recovery.sh
class main
seclabel u:r:install_recovery:s0


service flash_recovery /system/bin/install-recovery.sh
class main
#seclabel u:r:install_recovery:s0

(i.e., the install_recovery.sh script to again (still) run in the init context vs. the new install_recovery context by commenting-out the above line in blue (that's what the "#" does)).

- flashing (via a custom recovery) the latest version of the UPDATE-SuperSU-v#.##.zip package (currently #.## = 2.14) to install the root components (su, SuperSU, etc.).

Needing to flash an updated kernel (boot.img) to update the init.rc (in the ramdisk) is obviously going to be an issue for devices with a locked bootloader :(.

So, as the newest Android devices with Android 5.0 / L(ollipop) are delivered and the OTA's start being sent-out, it's going to be a very interesting and challenging time for many.

~ ~ ~


~ ~ ~

Side note: I've spent time on and off over the last several weeks updating one of my root apps to work properly on Android L (version LPV79) the name of the first preview version of Lollipop). I got things working well a few weeks back and revisited it again tonight after flashing the most recent version (LPX13D) on my Nexus 5. I also read and re-read Chainfire's recent Google+ posts (see above) and realized I would indeed have to flash the new boot.img (with it's devilishly simple one-byte change) for things to work.

Kudos and many, many thanks again to Chainfire for all of the research, testing, solutions, and information he's made available regarding this.


We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.