yashsingh1/xdaforums huggingface dataset:
[Nexus 6 Android Development] leondestiny:
thanks for the thorough explanation !! but i have only rooted it and have a ROM on it, can i still disable this forced encryption ? :) and is it permanently or do i have to reflash the .img thats in the op every time i flash new ROM ?

Edit: i am on a LP rom 5.1.1. so which of the .img do i have to download and flash via cmd ?!this one "Stock LMY47D/LMY47E/LMY47M/LMY47I (5.1.0) - No force encrypt"?

Edit2: oouuuch ! reading further in the OP , need to format useradata for the process.. and well i can back up my files but it will be abit hassly .. so my final question is ,

is it worth it to disable forced encrytion ? >< i dont use any of the security **** on phones, so i dont need the encryption thing in the phone.

will disabling it make the phone speedier permanently ? x.x
[Nexus 6 Android Development] istperson:
Well, if you remember the last two paragraphs above, it will speed up your phone but not by so much to be worth the hassle, IMHO.

For me it was when I unlocked the bootloader that I flashed a 'No force encrypt' boot.img, unlocking erased everything anyway. IMHO, it's totally a matter of preference.
[Nexus 6 Android Development] Redfield_87:
Doing a factory reset on a previously unencrypted Nexus 6 won't encrypt the device, right?
[Nexus 6 Android Development] Stephen:
As long as the kernel you have isn't enforcing encryption. If not then no, you are good to go.
[Nexus 6 Android Development] NotATreoFan:
If you are satisfied with how the Nexus 6 is performing, then I wouldn't bother going through the decryption process.
[Nexus 6 Android Development] leondestiny:
i am very satisfied with this beast, i have only one issue, and that is the screen.

i have recently noticed a black gradient like Bar that goes from top to bottom and appears only on dark greyish themes (so like on White backgrounds i dont see that bar at all, and same goes for pitch black backgrounds), and that has turned my OCPD on , so hard to deal with it.. but i will have to deal with it cause i just love this phone too much :crying:

thanks for the advice though ! ^^ i wont go through that hassle.

thanks again!
[Nexus 6 Android Development] CCJ22:
I am on LMY48W but OP doesn't have that one.... Now what?
[Nexus 6 Android Development] istperson:
It's quite easy to do it yourself, if you have a Linux machine, virtual or real.

1. Extract the boot.img from the factory image.

2. With abootimg extract it to a folder

mkdir work
cd work
abootimg -x /path/to/boot.img

3. extract initrd.img to a folder

mkdir ramdisk
cd ramdisk
cat ../initrd.img | gunzip | cpio -vid

4. Edit the fstab.shamu file:

rw,nosuid,nodev,noatime,nodiratime,noauto_da_alloc,nobarrier wait,check,formattable,forceencrypt=/dev/block/platform/msm_sdcc.1/by-name/metadata
to
rw,nosuid,nodev,noatime,nodiratime,noauto_da_alloc,nobarrier wait,check,formattable,encryptable=/dev/block/platform/msm_sdcc.1/by-name/metadata

4a. If you want to get rid of the red triangle change system to this

/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait

5. Repack initrd.img to myinitd.img

find . | cpio --create --format='newc' | gzip > ../myinitrd.img

6. Bacukp old initrd.img and rename new

mv initrd.img initrdold.img
mv myinitrd.img initrd.img

7. Replace it in the boot.img

abootimg -u /path/to/boot.img -r initrd.img

abootimg can be installed via package manager
[Nexus 6 Android Development] provolinoo:
use fed-patcher ;)
[Nexus 6 Android Development] Xplicit84:
Here is the unencrypted boot image for the MRA58N Nexus 6 update for this month.
[Nexus 6 Android Development] itlnstln:
Here's root-enabled, no forceencrypt MRA58R
[Nexus 6 Android Development] mikeprius:
So once you flash this .img through adb, the only wait to get standard encryption back is to delete all user data ? Can you make a nandroid of the ROM first with encryption then flash this and if you want it back just re-flash the old nandroid and vice versa ?
[Nexus 6 Android Development] ecsnead69:
What do you mean by "root enabled"? I haven't seen this description before.
[Nexus 6 Android Development] itlnstln:
The sepolicy has been patched so root works properly based on Chainfire's work.
[Nexus 6 Android Development] NotATreoFan:
You mean to encrypt your data at a later point? If so, just choose the Encrypt Device option in Settings. The only modification to the kernel is so that encryption isn't forced on first boot after a factory wipe.
[Nexus 6 Android Development] mikeprius:
Yeah tht's what I meant to say. So if you choose encrypt device, it negates the .img file you flashed ? This is my first time encountering a phone where it encrypts automatically. My Galaxy S4 you toggled it, but came default unencrypted
[Nexus 6 Android Development] istperson:
On the S4 you could "unencrypt" in settings?
[Nexus 6 Android Development] NotATreoFan:
It doesn't negate the IMG, because if you go into TWRP and format internal storage (or factory reset in stock recovery), the encryption will be removed and not run automatically again. This modified boot image only removes the flag telling your N6/6P/5X to encrypt internal storage on first boot.
[Nexus 6 Android Development] mikeprius:
I looked again. You can unencrypt the sd card storage, not the whole phone. This was a feature for Touchwiz, although I've been using CM for a long time as I wasn't a fan of TW.

---------- Post added at 06:16 PM ---------- Previous post was at 06:14 PM ----------

Ok, but how will the phone not re-default to encryption if the internal is completely formatted via TWRP or factory reset and a stock ROM is reflashed ? ...... Or are you saying once the phone runs once encryption is turned off permanently unless otherwise reactivated ? I've read threads where people were trying to update to a newer version without losing root/encryption/data ?
[Nexus 6 Android Development] NotATreoFan:
Because your modified boot image is still present.
[Nexus 6 Android Development] mikeprius:
Oh ok. So if you adb back the stock boot.img it will revert back to automatic encryption ?
[Nexus 6 Android Development] NotATreoFan:
It would be fastboot, not ADB. But only if you did a factory reset afterward. The flag for encryption is only activated on the initial boot. Every boot after the first doesn't even look for that flag.
[Nexus 6 Android Development] mikeprius:
Ok thanks. This is more complex than when I used my S4. The only program I used was Odin then custom recovery afterwards, so I'm not familar with fastboot, sideload, adb, etc.......
[Nexus 6 Android Development] Xplicit84:
Used this for the MRA58R update and I love the fact that you got rid of that stupid error message when you boot up the phone saying the software can't be trusted. Mind sharing how you tweaked the image to get rid of that?
[Nexus 6 Android Development] itlnstln:
I mirrored the modifications chainfire made in the fstab.xxxx files from the boot images he created in the Marshmallow sticky in this forum. In fact, I just copied the fstab files in the updated images I created; there was nothing build-specific about them.
[Nexus 6 Android Development] carmatana:
Tried but after first abootimg it says that a mismatch in sizes and that it is not a valid android boot image even though I extracted it from factory image.

UPDATE: false alarm y re-downloaded the image and now it works. Thanks

UPDATE2: I went thru all the process but after flashing I ended with a dead phone. Reverting to prior stock brought it to live again.

Maybe I did something wrong but more detailed instructions could help
[Nexus 6 Android Development] istperson:
Did you also try to root it?
[Nexus 6 Android Development] carmatana:
what? the boot.img or the phone after flashing the latest stock? I followed above steps and then flashed factory image MRA58r with the modified boot.img. Phone did not boot.
[Nexus 6 Android Development] istperson:
So if you didn't try to root it, then it should have worked.

I really can't imagine being this more detailed, but if you have some specific questions that might help.

Or if you could repeat it once more and paste the contents of the terminal here? You don't have to flash it, just for me to see what it said. Maybe there was some error you missed, and final boot.img was incomplete.
[Nexus 6 Android Development] carmatana:
This works !!!

I replaced factory image's boot.img with this img, flashed all and now I am running MRA58r no ecrypted.

Thanks
[Nexus 6 Android Development] belek1979:
I'm on the latest 5.1.1, root, unencrypted, twrp, unlock.

How to make a dirty update to 6.0 and stay unencrypted and rooted?

I read that Chainfire made root in kernel (boot), but if I install chainfire's 2.52 root zip and boot.zip then I will encrypt?
[Nexus 6 Android Development] istperson:
SuperSu 2.52 is the usual one. Flash the boot.img you quoted, flash the system.img from MRA58R, clear cache and dalvik, flash SuperSu and it should work.

But since it's a big version update I recommend a clean install.
[Nexus 6 Android Development] belek1979:
Thanks.

Yes, I know. But from GB I've made dirty updates and I've never had problems.

In case of problems, I would make a clean update
[Nexus 6 Android Development] joshtb86:
can someone post the no encryupt boot.img for marshmallow here? maybe OP can put it in the original?
[Nexus 6 Android Development] abnormalreply:
This one works:

http://xdaforums.com/showpost.php?p=63678742&postcount=1047
[Nexus 6 Android Development] rudynasco:
Is this flashable via recovery mode?
[Nexus 6 Android Development] istperson:
It's a fastboot image.
[Nexus 6 Android Development] abnormalreply:
The image inside the zip needs to be flashed via fastboot. If you use TWRP, that can also be used to flash the image (not the zip.)
[Nexus 6 Android Development] belek1979:
What do you think about SuperSU 2.56?

Is it important if I flash modified boot.img first or system.img? Doesn't system.img override boot.img, does it?
[Nexus 6 Android Development] rudynasco:
Guys please share some light how to remove encryption on marshmallow. The op instruction is crap horrible and obsolete! Im using ROM as of the moment
[Nexus 6 Android Development] joshtb86:
i had to format userspace or something from twrp/fastboot . im trying to find the instructions but i cant. its somewhere on the xda forums for what i exactly did.

after that i dl'd this

http://xdaforums.com/showpost.php?p=63678742&postcount=1047

flash that boot img

then flash any other kernel that does not force encryption and you should be good

i use franco kernel

hope this helps. search the xda forums for the exact instructions. cant seem to find them anymore
[Nexus 6 Android Development] istperson:
SuperSu 2.56 is still in experimental phase, try it and tell us if everything worked you tried.

As for the order of flashing, they are flashed to different partitions (system and boot), so the order doesn't count.

---------- Post added at 05:37 PM ---------- Previous post was at 05:34 PM ----------

The kernel is in the boot.img, and it's not the kernel that forces encryption, so if you flashed a not enforcing boot.img, you can stop there.
[Nexus 6 Android Development] belek1979:
Dirty update works gr8 but not the 2,56 root. Still calling for binary files :(
[Nexus 6 Android Development] cam30era:
Just confirming for anyone interested that this works with MRA58X also.
[Nexus 6 Android Development] joshtb86:
You also have to unencrypt it if your data is encrypted
[Nexus 6 Android Development] rudynasco:
Still nobody cant explain how to unencrypt my device. I have been reading alot for more than 1 year already, up to now i cannot find a solution how can i remove the encrption things on my phone (settings security encypted). Everybody here just talking and sending useless file without instructions.
[Nexus 6 Android Development] wase4711:
instead of complaining about the fact that no one wants to give you step by step instructions on how to do something, you should take the time to learn how to search, and teach YOURSELF how to do basic things like this. If you don't know how to use Google to search, you might want to think about NOT doing radical things to your phone, until you have learned how to find the answers to simple things like this..

The FIRST thing that came up when i did a search for "How to unencrypt a Nexus 6" was this..

https://www.google.com/search?q=how+to+unencrypt+a+nexus+6&ie=utf-8&oe=utf-8

All sorts of explanations and guides on how to do it..
[Nexus 6 Android Development] rudynasco:
Tnx for taking ur time! But u fail! Obsolete link just like the threads here!
[Nexus 6 Android Development] istperson:
[MENTION=1376019]ruden[/MENTION]asco How precise you want the steps? I've posted once the step by step recipe for modifying the ramdisk in the boot.img, but it proved to be too complicated by some, and the phone didn't boot up.

So it can't be made easier than this, if it's too complicated, don't do it.

It's here:

http://xdaforums.com/showpost.php?p=63444465&postcount=1044
[Nexus 6 Android Development] rawdealer:
Don't be rude! I think it would be better, if you change your OS for some fruitier stuff.
[Nexus 6 Android Development] wase4711:
good point, bro..that guy has NO CLUE..
[Nexus 6 Android Development] scryan:
I know I personally have covered it more then once in this thread alone.

You need to flash a kernel that does not force encryption, these are the images posted here... or basically any custom kernel.

Then you need to use fastboot to format your user data partition. There may be ways to do that in the various custom recoveries too, but I am not sure which ones wipe vs reformat.

When you reformat via "fastboot format userdata", the formatted partition is not encrypted, and your custom kernel will not force encryption on boot.
[Nexus 6 Android Development] ziddey:
I scratched my head on this one for a bit. http://xdaforums.com/showpost.php?p=64107936&postcount=6
[Nexus 6 Android Development] Xplicit84:
You mind creating a new root-enabled, no forceencryptimage file for the latest update MMB29K? I'd attempt to create it, but I can't find where you got said files and my luck I'd screw it up.
[Nexus 6 Android Development] belek1979:
It worked gr8 - pls make the same for MMB29K ;)
[Nexus 6 Android Development] itlnstln:
Here are (non-systemless) SU-enabled boot images for Angler and Volantis. These are NOT flashable zips. Please unzip and flash with fastboot.
[Nexus 6 Android Development] Xplicit84:
Just waiting on that Shamu version. Thanks again!
[Nexus 6 Android Development] belek1979:
Thx, but I was thinking of shamu :(
[Nexus 6 Android Development] andy o:
Hey guys, if you're going to root, you don't need the modified boot.img with the latest SuperSU 2.61 beta (systemless). Just make sure to not boot up the system when you're done flashing the imgs, and flash SuperSU 2.61 from TWRP right after you're done with that. I actually forgot that I had to flash a modified .img to stay unencrypted, and just flashed the boot.img. I didn't boot up, but I almost did cause I didn't have the SuperSU zip on my phone, but I just mounted /data on TWRP and copied it from the computer. For some reason adb sideload isn't working on TWRP on the N6 right now, the device is not detected. (EDIT: I forgot I had to force-install the ADB composite interface drivers via Device Manager, it worked with the N9).

I could have sworn though, that once a while ago I made the mistake to flash the stock boot.img and it immediately started encrypting everything, without even a warning message, or booting up Android. Seems that behavior is gone now.
[Nexus 6 Android Development] Xplicit84:
My dumb question is since SuperSU 2.61 enables root, does the system corrupt message still pop during initial boot or is that gone as well? The image ItInstln posts up takes that out. While not a big deal, it is definitely nice.
[Nexus 6 Android Development] belek1979:
So flashing SuperSU 2.61 zip in TWRP prevents from encrypting? How it is possible?
[Nexus 6 Android Development] Xplicit84:
No, 2.61 allows you to root. You'd still have to run a modified boot image to have no force encrypt.
[Nexus 6 Android Development] twan69666:
So should we flash 6.0.1, then a modified no encrypt boot.img, and finally flash SuperSU 2.61 for the systemless root?
[Nexus 6 Android Development] belek1979:
Do you have a modified no encrypt boot.img?

With SU 2.52 we need no encrypt and root enabled boot. But how about SU 2.61 - only no encrypt? If it will be no encrypt and root enabled boot then it won't work with google pay (with SU 2.61)?

Could someone make two boot.img:

1 no encrypt MMB29K shamu boot.img

2 no encrypt, root enabled MMB29K shamu boot.img
[Nexus 6 Android Development] Xplicit84:
Here is the No Force Encrypt image file. Looks like we have a new process to obtain root with SuperSU 2.61.
[Nexus 6 Android Development] Xplicit84:
That's what it sounds like. Anyone want to confirm? I haven't updated my phone yet.
[Nexus 6 Android Development] twan69666:
Actually, I can confirm that. I did it twice. Once with the stock boot.img and tried it again with Franco Kernel.

-Flash Everything Through Fastboot (if you're using these boot.img's in this thread, be sure to flash that vs the bone stock one)

-Reboot to recovery

-Flash the kernel (optional, otherwise you can skip)

-Flash SuperSU 2.61

Good to go. No problems at all
[Nexus 6 Android Development] belek1979:
Dirty update or clean?
[Nexus 6 Android Development] twan69666:
Sorry, dirty. I flashed everything in 6.0.1 except for userdata.img
[Nexus 6 Android Development] Xplicit84:
Good to hear. You seeing that "System is Corrupt" message upon boot up or does SuperSU take care of that issue?
[Nexus 6 Android Development] twan69666:
Nope, SuperSU is taking care of it! I ended up moving to systemless root anyway, so the 2nd time I did this, I didnt really "need" this boot.img because SuperSU automatically patches it now
[Nexus 6 Android Development] Xplicit84:
Great to hear. I'll update tomorrow now that it's clear. Thanks for the confirmation!
[Nexus 6 Android Development] alphahere:
Please clarify if possible. You actually used the stock image that will enable encryption and NOT a modifed image that disabled encryption? Just boot into recovery and flash supersu 2.61 after flashing unmodified stock boot.img?

This means one does NOT require a boot image that has disabled encryption with supersu 2.61.

Is this correct.
[Nexus 6 Android Development] twan69666:
Sorry, I see the confusion. I did use the stock 6.0.1 boot.img, but while in recovery, I flash Franco Kernel before my first boot. FK does not require encryption but the stock boot.img does without FK.

Hope that helps?
[Nexus 6 Android Development] alphahere:
I understand now. Thanks for clarifying.
[Nexus 6 Android Development] Xplicit84:
I can't put SuperSU v2.61 onto the phone from TWRP Recovery for the life of me. Copying it from my computer to the internal storage does nothing. Any ideas?
[Nexus 6 Android Development] alphahere:
Sounds like a problem with your cable, or operating system. No problems here. Check your drivers.
[Nexus 6 Android Development] andy o:
If you are already unencrypted, you can just flash supersu 2.61 and your phone will remain unencrypted. If you are encrypted it will remain encrypted. In either case, you do not need to flash a separate modified boot.img. that is the whole point of the new supersu builds, they will automatically patch the stock boot.img. Just remember not to boot up the phone until after you install supersu.
[Nexus 6 Android Development] alphahere:
That is what I thought but was getting confused. I just confirmed that this is the case by flashing original boot.img and flashing supersu. Still encrypted. This makes things so much easier.

Thanks again.
[Nexus 6 Android Development] belek1979:
Risky theory ;)

So, dirty flash of stock system.img and then SuperSU 2.61 from TWRP won't decrypt either show boot warning?

What if root failed? Some people report that dirty root doesnt work (2.56 wasn't work for me)...

After flash 2.61 (when trying to reboot), does TWRP say there is no root? And you ignore that or there is no such message? Have already TWRP 2.8.7.1 correctly recognized 2.61?
[Nexus 6 Android Development] ugabuga:
I am using Franco Kernel with [ROM] [Stock-Debloated][6.0.1][MMB29K][08/12/15][Layers]Rooted-Deoxeded-Fast & Stable.

I am currently encrypted and understand that I need to TWRP and format the data partition. Once this is complete, can i restore the nandroid backup made via TRWP and still be unencrypted? What about restoring just the data part of the nandroid?

Is there any way to do this without completely having to redo all my settings, tweaks, etc?
[Nexus 6 Android Development] belek1979:
As far as I know, you can't backup encrypted data and restore it after decryption. You can try with Titanium but I had problems with stability after that...
[Nexus 6 Android Development] andy o:
If you're updating from a SuperSU older than 2.60 you need to check the instructions at the SuperSU threads (there are like 2 or 3 but are pinned). I think you just re-flash stock boot.img and system.img and then install SuperSU 2.62.3 (as of now latest), but just read the threads to be sure, and there's more info there being updated constantly.

You do need to ignore if TWRP asks you to install SuperSU. If you have told TWRP not to modify System it won't ask you, but if you do that TWRP will be overwritten by stock recovery when you boot up to Android.

The warning still shows up for me, about the device being bootloader-unlocked. I don't really mind it. It doesn't show on the N6 and N9, FWIW, only on the N6P.
[Nexus 6 Android Development] cam30era:
There is a simple solution to avoid stock recovery overwritting TWRP:

After you have flashed your last .img file in fastboot, take your hands off your keyboard and pick up your N6. Use the volume key to navigate to "Recovery". Then press power button to select. Your device will boot to TWRP recovery, and it will stick after that.
[Nexus 6 Android Development] andy o:
Sorry, got confused, been participating also in N6P threads. Forgot this is the unencrypted N6 thread, so what you quoted there from me doesn't apply.
[Nexus 6 Android Development] belek1979:
I made with boot to 2.62.

Can I just reflash thr TWRP with 2.62.3 now?
[Nexus 6 Android Development] andrewjt19:
So I'm still learning this process with the nexus 6 since I've been on HTC for the last couple of years, but according to the SuperSU thread in XDA , if you are on SuperSU that is installed in the /system then you must reflash stock system partition. I'm assuming this means the stock image through fastboot correct? Also if that's correct then, we flash SuperSU 2.61 after that with no need to flash any further decrypting boot images? Sorry about the confusion. Trying to sort this out. Also if you want to use a separate ROM other than stock what's the process then? Thanks for the help.

taPpeD fROM my nExUs 6
[Nexus 6 Android Development] belek1979:
Yes. You don't need to flash noencryption boot if you were decrypted before.

So for example if you are 6.0.0 no force encryption, you have to flash 6.0.1 system.img, then 6.0.1 boot.img and in recovery (I have TWRP) flash 2.62.3 (newest).

Don't install root from TWRP if it asks you! You will be unencypt and systemless root.

With not stock rom it works differently. Some are prerooted, some have recovery... You have to check in rom thread

Here is the newest SuperSU:

http://xdaforums.com/showpost.php?p=64161125&postcount=3
[Nexus 6 Android Development] :
boot.img for 6.0.1

Hi there...

Im already on stock 6.0.1. Is there a way to disable encrytion without downgrade? Cause i can only find boot.img for 5.x

Thanks
[Nexus 6 Android Development] DogGunn:
The newest boot.img files can be found here:

https://www.androidfilehost.com/?w=search&s=noforce_encrypt_shamu&type=files
[Nexus 6 Android Development] Jsunn:
I didn't see mob30d No force encrypt?

The latest file says it is the "noforce_encrypt_shamu_npc56p.img" posted on the 11th of April 2016?

I thought that I would be looking for the noforce_encrypt_shamu_mob30d.img?

Is there a place I can find it?

Thanks for your help.

-Jason