ROOT Nexus 6 - Android M Dev Preview

Search This thread

TCPDump

Senior Member
May 26, 2014
402
288
Central US
Hey everyone!

Since the release of the Android M Preview I have been trying to figure out a way to root my device. In almost every case I found myself in a boot loop or validation error after modifying the system partition. After a day or so I finally found the following combination to root Android M on the Nexus 6. I wanted to put this in an easy to find format for anyone wanting root.

Update: Here are a few things I want to point out based on trending replies thus far:
  • Please not that this boot image sets SE Linux to Permissive rather than enforcing. If you care about this sort of thing, don't flash it.
  • Before you say "this doesn't work on my favorite CrapROM, CM, OmniROM, etc. please remember it wasn't designed to. This was designed and tested exclusively with the M Dev Preview.

I am not responsible for any damage to your devices, etc. If you get a boot loop you can get back to booting by simply flashing the stock "M" system image via fastboot.

Dev Preview 1:
  1. Download the Elite Kernel from here: http://projectelite.net/buck/shamu/M/Elite_Shamu_M-05_31_2015.zip
  2. Download and the SuperSU flashable zip package. In this case you'll want the 2.49 package. - http://xdaforums.com/apps/supersu/2014-09-02-supersu-v2-05-t2868133
  3. Put both flashable zips on your /sdcard/.
  4. Download fix_rw_boot.img from here: http://downloads.codefi.re/networkingpro/fix_rw_boot.img
  5. Reboot to bootloader mode.
  6. Flash fix_rw_boot.img to the boot partition using fastboot. (fastboot flash boot fix_rw_boot.img)
  7. Reboot phone normally and allow the phone to attempt to boot (you will see the boot animation but it will never boot completely).
  8. Wait for two minutes then reboot into TWRP recovery. You can use physical buttons or adb reboot recovery.
  9. Once rebooted into TWRP flash the Elite Kernel then the SuperSU package.
  10. Reboot - Note that the validation check is gone at this point.
  11. Profit

Update: See second post for a flashable Busybox .zip for the Android M Preview.

*** If you have already installed a different Kernel you can still keep it. To unlock system R/W simply download and flash the included fix_rw_boot.img, reboot, wait 2 minutes, reboot to TWRP and flash original boot image again via recovery.

Dev Preview 2:
It has been brought to my attention that the second Dev Preview does not work like the first. I personally have not had time to test or use it, but @abogrhen sent me the following directions, and requested I update the OP. All links are included and all credit to abogrhen. Here goes:

1. Download no encrypt img
2. Install the M Preview 2 normally, but replace the boot img with no encrypt img (you can use NRT )
3. After the phone boots normally do a factory reset (if the storage space is lower than normal) if not skip this step.
4. After booting normally enable USB debugging then flash the latest TWRP.
4. Boot into TWRP and flash the latest Elemental X (others may work ), SuperSU , and Busybox (in that exact order).
5. You now have a rooted M2 with no encryption.

http://projectelite.net/buck/shamu/insecure_noencrypt_boot.img
https://www.androidfilehost.com/?fid=24052804347786093
https://download.chainfire.eu/740/SuperSU/BETA-SuperSU-v2.49.zip
http://downloads.codefi.re/networkingpro/BusyBox-Android_M.zip


Credits:
@abogrhen - Tutorial for Dev Preview 2
Kernel - Elite Kernels - buckmarble
SuperSU - Chainfire
Root Verification - Root Checker Pro - Joey Krim - https://play.google.com/store/apps/details?id=com.joeykrim.rootcheckp&hl=en

Enjoy everyone!
NetworkingPro


Try to learn something about everything and everything about something.
NetworkingPro | TEAM CODEFIRE
 

Attachments

  • root_n6.PNG
    root_n6.PNG
    179.8 KB · Views: 12,555
  • busybox_m.PNG
    busybox_m.PNG
    122.2 KB · Views: 12,334
Last edited:

TCPDump

Senior Member
May 26, 2014
402
288
Central US
Busy Box and Ad Away

Update: Install Ad Away v 3.0 and Busy Box on Android M.

Busy Box - http://downloads.codefi.re/networkingpro/BusyBox-Android_M.zip - This is a flashable zip I made to install Busybox on Android M. Flash in TWRP. This zip also creates all Simlinks.
Ad Away v 3.0 - Verified to work on Android M - http://downloads.codefi.re/networkingpro/AdAway_v3.0.apk

Note: This version of Busy Box is NOT the same as most Busy Box installers on the play store. Never versions of Android, including Android M, require that Busybox be compiled using (PIE) Position Independent Executable support. This version has been compiled specifically for that on the ARM architecture.

Enjoy, and let me know if you have any issues!
 

bweN diorD

Senior Member
Jun 12, 2011
3,820
2,140
Update: Install Ad Away v 3.0 and Busy Box on Android M.

Busy Box - http://downloads.codefi.re/networkingpro/BusyBox-Android_M.zip - This is a flashable zip I made to install Busybox on Android M. Flash in TWRP. This zip also creates all Simlinks.
Ad Away v 3.0 - Verified to work on Android M - http://downloads.codefi.re/networkingpro/AdAway_v3.0.apk

Note: This version of Busy Box is NOT the same as most Busy Box installers on the play store. Never versions of Android, including Android M, require that Busybox be compiled using (PIE) Position Independent Executable support. This version has been compiled specifically for that on the ARM architecture.

Enjoy, and let me know if you have any issues!

thanks for posting this,
btw, your bb and aa links are 403.
 

gerard_f

Senior Member
Sep 25, 2008
485
1,460
Catalunya
But this kernel change the selinux to permissive or disabled, right?
I don't like this, I will wait root for enforcing selinux.
 

arregull

Member
Jun 30, 2011
14
0
At first, I reflashed android M again after getting that nasty error. Though, your phone will still boot. However, I got rid of it when I went back to 5.1.1.

Sent from my Nexus 6 using XDA Free mobile app
 

jodvova

Senior Member
Oct 2, 2012
1,193
167
London
At first, I reflashed android M again after getting that nasty error. Though, your phone will still boot. However, I got rid of it when I went back to 5.1.1.

Sent from my Nexus 6 using XDA Free mobile app

Tried reflashing M, but its still there.

So you are not on M in the end? I want to keep M for now.
 

jason1332

Senior Member
Apr 25, 2008
396
103
Well, I got root and I am so grateful for that. Ad away will not apply hosts however and that was the biggest reason for rooting! Any ideas?

Update, AdBlockPlus is working. BBS and Gsam Root Companion are no go, seems like the priv-app folder is still locked despite root. Tried Root Explorer and get an error. Greenify is working! Thanks so much @NetworkingPro
 
Last edited:

TCPDump

Senior Member
May 26, 2014
402
288
Central US
Well, I got root and I am so grateful for that. Ad away will not apply hosts however and that was the biggest reason for rooting! Any ideas?

Update, AdBlockPlus is working. BBS and Gsam Root Companion are no go, seems like the priv-app folder is still locked despite root. Tried Root Explorer and get an error. Greenify is working! Thanks so much @NetworkingPro

You're welcome. It may very well be hit and miss for some apps. Thanks for the feedback. Glad to hear its all working for you so far.
 
Last edited:
  • Like
Reactions: jason1332

Top Liked Posts

  • There are no posts matching your filters.
  • 39
    Hey everyone!

    Since the release of the Android M Preview I have been trying to figure out a way to root my device. In almost every case I found myself in a boot loop or validation error after modifying the system partition. After a day or so I finally found the following combination to root Android M on the Nexus 6. I wanted to put this in an easy to find format for anyone wanting root.

    Update: Here are a few things I want to point out based on trending replies thus far:
    • Please not that this boot image sets SE Linux to Permissive rather than enforcing. If you care about this sort of thing, don't flash it.
    • Before you say "this doesn't work on my favorite CrapROM, CM, OmniROM, etc. please remember it wasn't designed to. This was designed and tested exclusively with the M Dev Preview.

    I am not responsible for any damage to your devices, etc. If you get a boot loop you can get back to booting by simply flashing the stock "M" system image via fastboot.

    Dev Preview 1:
    1. Download the Elite Kernel from here: http://projectelite.net/buck/shamu/M/Elite_Shamu_M-05_31_2015.zip
    2. Download and the SuperSU flashable zip package. In this case you'll want the 2.49 package. - http://xdaforums.com/apps/supersu/2014-09-02-supersu-v2-05-t2868133
    3. Put both flashable zips on your /sdcard/.
    4. Download fix_rw_boot.img from here: http://downloads.codefi.re/networkingpro/fix_rw_boot.img
    5. Reboot to bootloader mode.
    6. Flash fix_rw_boot.img to the boot partition using fastboot. (fastboot flash boot fix_rw_boot.img)
    7. Reboot phone normally and allow the phone to attempt to boot (you will see the boot animation but it will never boot completely).
    8. Wait for two minutes then reboot into TWRP recovery. You can use physical buttons or adb reboot recovery.
    9. Once rebooted into TWRP flash the Elite Kernel then the SuperSU package.
    10. Reboot - Note that the validation check is gone at this point.
    11. Profit

    Update: See second post for a flashable Busybox .zip for the Android M Preview.

    *** If you have already installed a different Kernel you can still keep it. To unlock system R/W simply download and flash the included fix_rw_boot.img, reboot, wait 2 minutes, reboot to TWRP and flash original boot image again via recovery.

    Dev Preview 2:
    It has been brought to my attention that the second Dev Preview does not work like the first. I personally have not had time to test or use it, but @abogrhen sent me the following directions, and requested I update the OP. All links are included and all credit to abogrhen. Here goes:

    1. Download no encrypt img
    2. Install the M Preview 2 normally, but replace the boot img with no encrypt img (you can use NRT )
    3. After the phone boots normally do a factory reset (if the storage space is lower than normal) if not skip this step.
    4. After booting normally enable USB debugging then flash the latest TWRP.
    4. Boot into TWRP and flash the latest Elemental X (others may work ), SuperSU , and Busybox (in that exact order).
    5. You now have a rooted M2 with no encryption.

    http://projectelite.net/buck/shamu/insecure_noencrypt_boot.img
    https://www.androidfilehost.com/?fid=24052804347786093
    https://download.chainfire.eu/740/SuperSU/BETA-SuperSU-v2.49.zip
    http://downloads.codefi.re/networkingpro/BusyBox-Android_M.zip


    Credits:
    @abogrhen - Tutorial for Dev Preview 2
    Kernel - Elite Kernels - buckmarble
    SuperSU - Chainfire
    Root Verification - Root Checker Pro - Joey Krim - https://play.google.com/store/apps/details?id=com.joeykrim.rootcheckp&hl=en

    Enjoy everyone!
    NetworkingPro


    Try to learn something about everything and everything about something.
    NetworkingPro | TEAM CODEFIRE
    15
    Busy Box and Ad Away

    Update: Install Ad Away v 3.0 and Busy Box on Android M.

    Busy Box - http://downloads.codefi.re/networkingpro/BusyBox-Android_M.zip - This is a flashable zip I made to install Busybox on Android M. Flash in TWRP. This zip also creates all Simlinks.
    Ad Away v 3.0 - Verified to work on Android M - http://downloads.codefi.re/networkingpro/AdAway_v3.0.apk

    Note: This version of Busy Box is NOT the same as most Busy Box installers on the play store. Never versions of Android, including Android M, require that Busybox be compiled using (PIE) Position Independent Executable support. This version has been compiled specifically for that on the ARM architecture.

    Enjoy, and let me know if you have any issues!
    5
    Custom kernel preview 3

    I made my custom kernel for preview 3 with this features:

    - Root with rw
    - Disabled boot warning
    - Color control
    - Headphone and mic gain control

    The other things have stock behaviour.

    Encryption is forced by default.

    IMG: https://goo.gl/QBi2In
    Flashable zip: https://goo.gl/5ZzyfO

    Enjoy.
    4
    Here is the no forceencrypt boot image for M Preview 3. This is not a flashable zip, extract the img file first.

    Let me know if it's working ok for you guys!
    4
    I used the factory image, and can successfully write to system, so I'm not so sure dirty flashing or clean flashing is the reason as to why some can, and can't write to system.

    Edit: Here is the updated image/kernel I used to achieve read/write on M P2

    http://xdaforums.com/showpost.php?p=61785382&postcount=371

    Ah, ok now. Using the image and zip from that post I got both.

    Clean flash-all.sh of Preview 2
    Just before it rebooted, I immediately flashed, TWRP and insecure_noencrypt_boot.img.
    From TWRP I flashed Elite_Shamu_M-07_07_2015_blu_zen_updated.zip, BETA-SuperSU-v2.49.zip and BusyBox-Android_M.zip
    Rebooted, ran through setup and had both root and r/w.
    I already had an adb backup so I just restored that but I'll try TiBu in a bit.

    UPDATE: TiBu is working fine.