[5.0] [info] Basic overview of root (and update) options for Lollipop

danarama

Senior Member
Aug 22, 2010
31,288
18,810
0
Oxenhope, West Yorkshire, UK
As things have changed with how root is obtained and how OTA's are limited to users since 5.0, I hope this thread to serve as a basic overview of the root options available to you. I see a lot of threads asking about updating to Lollipop and about returning to stock to receive OTA updates.. from rooted users.

*The below post covers updating to 5.0 only. For updating to 4.4.x, read this thread: [Info] Rooted user? Learn to update properly





I have created this thread as I have strong feelings about rooted users and OTA's in general, so I wanted to collect my thoughts together in a single thread to hopefully persuade rooted users to avoid OTA updates. Of course, you're free to choose to ignore this.



OTA's are simple for unrooted users. They are minimal effort, quick and require no knowledge. However they have a propensity to go wrong - often resulting in a user having to factory reset to get things working.

OTA's are designed to be small to save on data usage. This is achieved by not supplying the entire ROM, kernel or app, but instead, including patches. These patch files (*.p) will unpack the recovery.img, bootloader.img, boot.img or *.apk and insert the new code into it. This means the OTA expects an exact version to install. You cannot skip an OTA and expect to apply a later one because the code in the patch might not "fit". Also, this is why modified users cannot apply an OTA. There are ways for rooted, stock kernel, no modification users to apply OTA updates but it is not recommended

Please note, rooted users will still receive the OTA notification. You do not need to apply it though. Some Custom ROMS even receive it.



Well if you are modified, you have to first return completely to stock to apply an OTA. This is a relatively long process compared to other options available to you. If you are simply rooted with stock kernel and no modifications, you can simply re-apply root after accepting the OTA, but it's a bit messy and still - it's an OTA that can go wrong. I think part of OTA's appeal is you can do it anywhere - but this is also it's biggest problem. rooted users need resources to be available to them so they can remedy whatever needs remedying after application.

In short, it's just not the best option, Why would anyone ever choose "not the best"?




Section 1, from Stock (unrooted)


Method 1 (You are fully stock 5.0)

1. Unlock bootloader if necessary (This wipes data)
2. Fastboot flash a custom recovery image (of your choice)
3. Fastboot flash a custom boot.img (@Chainfire for basic root, @sykopompos for full permissive mode)
4. Flash from recovery, SuperSU (Please note BETA 2.27+ May mean you do not need a modified boot.img)

You can get the boot.img's and SuperSU from here: [ROM] N5 Lollipop + Stock IMG Mirrors & More! (by @vomer)


Method 2a (You are fully stock 4.4.x)

1. Unlock bootloader if necessary (This wipes data)
2. Fastboot flash a custom recovery image (of your choice)
3. Fastboot flash stock 5.0 system.img (this will not wipe data if yous till have data at this time, however, you MAY still need to wipe data later)
4. Fastboot flash a custom boot.img (@Chainfire for basic root, @sykopompos for full permissive mode)
5. Flash from recovery, SuperSU (Please note BETA 2.27+ May mean you do not need a modified boot.img)

You can get the boot.img's and SuperSU from here: [ROM] N5 Lollipop + Stock IMG Mirrors & More! (by @vomer)


Method 2b (You are fully stock 4.4.x)

1. Unlock bootloader if necessary (This wipes data)
2. Accept OTA update
3. Fastboot flash a custom recovery image (of your choice)
4. Fastboot flash a custom boot.img (@Chainfire for basic root, @sykopompos for full permissive mode)
5. Flash from recovery, SuperSU (Please note BETA 2.27+ May mean you do not need a modified boot.img)

You can get the boot.img's and SuperSU from here: [ROM] N5 Lollipop + Stock IMG Mirrors & More! (by @vomer)

Method 3a (You are fully stock 4.4.x)

1. Unlock bootloader if necessary (This wipes data)
2. Use the google Factory flash-all method to flash 5.0
3. Use the CF-Autoroot method to modify the kernel (boot.img) for root (Will not get permissive mode) and SuperSU
4. Fastboot flash a custom recovery

You can follow this guide here: [How-To][Windows] Download and Flash Android 5.0 and Reroot & Recovery (by @spc_hicks09)

Method 3b (You are fully stock 4.4.x)

1. Unlock bootloader if necessary (This wipes data)
2. Accept OTA update
3. Use the CF-Autoroot method to modify the kernel (boot.img) for root (Will not get permissive mode) and SuperSU
4. Fastboot flash a custom recovery

Method 3c (You are fully stock 5.0)

1. Unlock bootloader if necessary (This wipes data)
2. Use the CF-Autoroot method to modify the kernel (boot.img) for root (Will not get permissive mode) and SuperSU
3. Fastboot flash a custom recovery

Section 2, from rooted with custom recovery

Method 4 (You are rooted 4.4.x with custom recovery)

1. Fastboot flash stock 5.0 system.img (this will not wipe data if you still have data at this time, however, you MAY still need to wipe data later)
2. Fastboot flash a custom boot.img (@Chainfire for basic root, @sykopompos for full permissive mode)
3. Flash from recovery, SuperSU (Please note BETA 2.27+ May mean you do not need a modified boot.img)

You can get the boot.img's and SuperSU from here: [ROM] N5 Lollipop + Stock IMG Mirrors & More! (by @vomer)

Method 5 (You are rooted 4.4.x with custom recovery)

1. Flash from recovery, an existing packages ROM.zip
2. Flash from recovery, a flashable custom boot.img (@Chainfire for basic root, @sykopompos for full permissive mode)
3. Flash from recovery, SuperSU (Please note BETA 2.27+ May mean you do not need a modified boot.img)

You can get the boot.img's and SuperSU from here: [ROM] N5 Lollipop + Stock IMG Mirrors & More! (by @vomer)
You can get a ROM.zip from here: [ROM] [STOCK] Android 5.0 LRX21O - Stock/Flashable (11/12/14) )by @bigxie


Please note, there is no OTA option mentioned here in section 2. This is becuse now, since 5.0 - you MUST be fully stock (recovery included) to accept an OTA update, so the process doesn't really exist




OTA is designed for everyday users. If you're going to be rooted, you should understand what you have and what it means to be rooted. Familiarise yourselves with fastboot. Familiarise yourself with your recovery. Learn how to take backups and you will get much more out of your phone that constantly wasting time returning to stock, applying OTA's then re-rooting. You're wasting time doing this - it's a fools errand. I hope this thread helps to open your eyes and your minds.

If you still want to (return to stock in order to) accept OTA updates, even after reading this thread (perhaps because doing things properly mean more work for you) then perhaps you shouldn't be rooted. Having, maintaining and understanding root takes effort and if you're not willing to put the time in, you will become a danger to your phone and possibly a drain on this forum too ;) We write lots of guides and info threads for your benefit. If you have questions, please just ask.


Please let me know if I have missed anything

This is not a "help me update" thread so please don't post here asking for help with a particular process. Post in the thread for the method you are using. This thread is to discuss which option/method would be best for you.
 
Last edited:

pcphobic

Senior Member
Aug 10, 2010
1,604
460
0
Guide on how to retain SuperSU Root permission after flashing Code Blue kernel

How To Retain SuperSU Root Permission with Code Blue Kernel on custom Lollipop ROMs

Not sure how many here have flashed Code Blue kernel on N5X ROM (ver.5.4), but recently I discovered that even though I had Superuser in my Settings menu, my Rooted apps (MyBackup Root, Root Explorer, Wakelock Detector) were not working after I flashed a custom kernel like Code Blue kernel.

After digging through various forum threads, I have managed to make my rooted apps work again on a custom kernel like Code Blue.
Hopefully some of you may find this how to guide helpful.

Pre-requisite

Download the following files to your Nexus 5:-

Permissive Kernel Zip
- https://www.androidfilehost.com/?fid=95747613655048458

Code Blue Kernel for Lollipop
- http://forum.xda-developers.com/google-nexus-5/orig-development/kernel-t2697951

Latest SuperSU by Chainfire (at the time of this post it is [BETA][2014.11.20] SuperSU v2.27)
- http://forum.xda-developers.com/apps/supersu/2014-09-02-supersu-v2-05-t2868133
- Direct download link: http://download.chainfire.eu/630/SuperSU/BETA-SuperSU-v2.27.zip

Step 1: Reboot to TWRP Custom Recovery
1. Shut off the phone
2. Press and hold Volume Down + Power Button
3. Use Volume down to toggle to Recovery Mode and confirm selection using the Power Button

Step 2: Flash the Permissive Kernel
1. Click on Install button in TWRP Custom Recovery
2. Select the Permissive Kernel Zip file which is N5_+LPX13D_PermissiveKernel.zip
3. Swipe to Confirm Flash
4. Click on the Home button only!

Important Note: Do Not click Reboot System yet!!!

Step 3: Flash the Code Blue Kernel
1. Click on Install button in TWRP Custom Recovery
2. Select the Code Blue Kernel Zip file (at the time of this post is Code_Blue_r620-L_hammerhead.zip)
3. Swipe to Confirm Flash
4. Click on the Home button only!

Important Note: Do Not click Reboot System yet!!!

Step 4: Flash the latest SuperSU
1. Click on Install button in TWRP Custom Recovery
2. Select the SuperSU Zip file (at the time of this post is BETA-SuperSU-v2.27.zip)
3. Swipe to Confirm Flash
4. Now click on Reboot System button and wait for the phone to reboot.

Once the phone boots up, you should have SuperSU appear under the Settings menu.
Try to reinstall your rooted apps again just to make sure they get fresh root permission from SuperSU.
 

danarama

Senior Member
Aug 22, 2010
31,288
18,810
0
Oxenhope, West Yorkshire, UK
Do we really need yet another thread on updating and rooting?
Yes indeed. There is no single place that addresses all the options. Any guide we have just gives one or two methods. This thread serves as a place to direct the hundreds of people asking the same question that drives those of us who frequently assist these users a little bit batty.


Then I shall verify the lack of requirement and update accordingly - should I be satisfied. Thanks for bringing it to my attention.
 
Last edited:
  • Like
Reactions: rabaker07

b1g1an

Senior Member
Nov 29, 2011
337
82
0
Do we really need yet another thread on updating and rooting?

Also, permissive boot image is no longer needed on Lollipop.

http://www.xda-developers.com/android/supersu-beta-lollipop-root-stock-kernel/

http://forum.xda-developers.com/apps/supersu/2014-09-02-supersu-v2-05-t2868133
I was under the impression this wasn't ready for release to the masses just yet?

It's definitely the solution I'm waiting for and happy to enjoy the standard experience until it's approved for the less technical amongst us.
 

danarama

Senior Member
Aug 22, 2010
31,288
18,810
0
Oxenhope, West Yorkshire, UK
Updated OP to make it feel less like a roll-up thread as that is not what it is intended to be. It's an info thread to allow users to understand what update / root options are available to them in regards to Android 5.0.

This is not a "help me update" thread so please don't post here asking for help with a particular process. Post in the thread for the method you are using. This thread is to discuss which option/method would be best for you.
 

wangdaning

Senior Member
Sep 17, 2012
1,358
563
133
Wuxi
I appreciate the thread. There is an over abundance of random threads addressing methods. It is nice to have a centrally located one. I haven't jumped on LP just yet, as I am waiting a little while for more development. It is nice to know people are taking the time to collect the options. I am tired of reading over and over about how people failed.

As usual, good post rootSU
 
  • Like
Reactions: danarama

danarama

Senior Member
Aug 22, 2010
31,288
18,810
0
Oxenhope, West Yorkshire, UK
I appreciate the thread. There is an over abundance of random threads addressing methods. It is nice to have a centrally located one. I haven't jumped on LP just yet, as I am waiting a little while for more development. It is nice to know people are taking the time to collect the options. I am tired of reading over and over about how people failed.

As usual, good post rootSU
Thank you kindly.
 

Ben36

Senior Member
Jun 8, 2012
8,258
2,868
113
Do we really need yet another thread on updating and rooting?

Also, permissive boot image is no longer needed on Lollipop.

http://www.xda-developers.com/android/supersu-beta-lollipop-root-stock-kernel/

http://forum.xda-developers.com/apps/supersu/2014-09-02-supersu-v2-05-t2868133
If this is how you have root could you please test something for me
1 - root (mount as rw) on es file explorer
2 - installing better battery stats through app to system
3 - use Terminal Emulator and type su (press enter) type am start (press enter) and does it return with error or lots of options

Sent from my Android 5.0 Nexus 5
 

upndwn4par

Inactive Recognized Developer
Jan 22, 2012
3,640
10,375
0
New Jersey
If this is how you have root could you please test something for me
1 - root (mount as rw) on es file explorer
2 - installing better battery stats through app to system
3 - use Terminal Emulator and type su (press enter) type am start (press enter) and does it return with error or lots of options

Sent from my Android 5.0 Nexus 5
1) Works
2) Works
3) Haven't found a terminal emulator that works on lollipop. In adb shell I get what looks like a man page in Linux.
 

Attachments

  • Like
Reactions: Ben36

Ben36

Senior Member
Jun 8, 2012
8,258
2,868
113
Been using that one for years. Won't install from Google Play. Same error that a lot of people get on Lollipop.

The one in ROM Toolbox FCs.
Weird... Works fine here. But your error can't be a root issue if it's on actual install of the app from the play store

Sent from my Android 5.0 Nexus 5
 

danarama

Senior Member
Aug 22, 2010
31,288
18,810
0
Oxenhope, West Yorkshire, UK
Been using that one for years. Won't install from Google Play. Same error that a lot of people get on Lollipop.

The one in ROM Toolbox FCs.
Run a logcat. The smart money is on INSTALL_FAILED_DUPLICATE_PERMISSION. I had this when i tried to install quicksearchbox. Turned out
Code:
Package com.google.android.googlequicksearchbox attempting to redeclare permission com.android.launcher3.permission.RECEIVE_LAUNCH_BROADCASTS already owned by com.android.launcher3
Wonder if you find similar
 
  • Like
Reactions: upndwn4par

danarama

Senior Member
Aug 22, 2010
31,288
18,810
0
Oxenhope, West Yorkshire, UK
OK I tested the SuperSU 2.27 BETA on stock kernel without permissive boot.img

Most things I tested worked OK. For example, am start displayed man, which I would expect. However, Viper4Android I didn't get working, which is one app we knew previously to require permissive kernel. Also I asked @sykopompos if we still need permissive and he said SELinux is buggy in L so this method is still a bit different (patraphrasing) So although, yes this is an alternative worth mentioning, it doesn't rule out the Permissive option completely.

I will adjust the OP appropriately.
 
  • Like
Reactions: Ben36

Ben36

Senior Member
Jun 8, 2012
8,258
2,868
113
I've always used permissive with pie patch and i have never had any problems like I see others post about

Sent from my Android 5.0 Nexus 5
 

Ben36

Senior Member
Jun 8, 2012
8,258
2,868
113
I've never needed PIE patch. I thought PIE patch was if you didn't have permissive, but I don't really know a lot about it. I just use permissive
Es file explorer root access wouldn't work without pie patch even with the permissive kernel

Sent from my Android 5.0 Nexus 5