[How-To] Disable Forced Encryption

Search This thread
I tried removing decryption while on cm12, is there any way to remove it? I tried using this same method but it hasnt removed the encryption. I have an unlocked bootloader and twrp, I fastboot flash the boot img, I then went into twrp and did a factory reset, nothing, then I did wiped, dalvik and cache, data and system and still nothing. Any suggestion?

CM12 should by default encrypt your phone.
There is an ption to encrypt your phone in Security settings as well.
 

Pecata

Senior Member
Dec 31, 2009
1,119
236
Salt Lake City
Yeah, I finally removed the encryption myself and I gotta say that I don't see much of a difference in day to day use...the phone seems to be a tad faster transferring files and booting up but that's about it...
Thanks so much for the info guys.
 

Radeon1337

Senior Member
Sep 5, 2009
207
24
Good evening fellas, tried searching but couldn't find an answer so dont shoot me if this is asked a lot. :)

I'm rooted and running "Pure Shamu b3.92" encrypted, is there anyway to decrypt without losing my data now?
Thanks.
 

Pecata

Senior Member
Dec 31, 2009
1,119
236
Salt Lake City
Good evening fellas, tried searching but couldn't find an answer so dont shoot me if this is asked a lot. :)

I'm rooted and running "Pure Shamu b3.92" encrypted, is there anyway to decrypt without losing my data now?
Thanks.

As far as I know-no. Decrypting the device requires a factory reset in order to work.
Please correct me if I am wrong.
 

treIII

Senior Member
Jul 10, 2012
3,188
586
Google Pixel 5
Google Pixel 6
Good evening fellas, tried searching but couldn't find an answer so dont shoot me if this is asked a lot. :)

I'm rooted and running "Pure Shamu b3.92" encrypted, is there anyway to decrypt without losing my data now?
Thanks.

Back up your data to a computer. Reset. Put data back on. Just dump the SD card to the computer. That's how I would do it. Then send it right back. Not hard. 10 minutes maybe?

Sent from my Nexus 6 using Xparent Blue Tapatalk 2
 

treIII

Senior Member
Jul 10, 2012
3,188
586
Google Pixel 5
Google Pixel 6
OK. If I flash a new ROM can I just pull the boot. IMG from the rom and flash the ROM without it and remain decrypted? I'd like to flash a ROM but don't want to lose decryption. Also I'm having a problem finding how while in twrp after flashing this using flashify I had to erase user data or something like that. Thanks

Sent from my Nexus 6 using Xparent Blue Tapatalk 2
 

gamewarden234

Senior Member
Apr 9, 2011
427
176
OK. If I flash a new ROM can I just pull the boot. IMG from the rom and flash the ROM without it and remain decrypted? I'd like to flash a ROM but don't want to lose decryption. Also I'm having a problem finding how while in twrp after flashing this using flashify I had to erase user data or something like that. Thanks

Sent from my Nexus 6 using Xparent Blue Tapatalk 2

If your already decrypted flash any custom rom and flash any kernel like Franco or sensei and you will remain decrypted. All the custom kernels have removed the flag that triggers encryption if your already decrypted that is. Just don't ever flash the stock boot image again. Most custom roms are using lean kernel or other custom kernels already like liquid. Just flash rom gapps custom kernel and your golden. I hope that was what you were asking.
 
Last edited:

treIII

Senior Member
Jul 10, 2012
3,188
586
Google Pixel 5
Google Pixel 6
Yes that was what I was asking. I'm going to flash clean ROM. I was just going to pull the boot.IMG and then flash the boot. IMG from my nandroid of what I have now v which is decrypted. Seems like that would work.

Sent from my Nexus 6 using Xparent Blue Tapatalk 2
 

gamewarden234

Senior Member
Apr 9, 2011
427
176
Yes that was what I was asking. I'm going to flash clean ROM. I was just going to pull the boot.IMG and then flash the boot. IMG from my nandroid of what I have now v which is decrypted. Seems like that would work.

Sent from my Nexus 6 using Xparent Blue Tapatalk 2

Just curious why you wouldn't want to flash Franco. Increased my battery life a lot. Do you just like the stock decrypted kernel or want to stay as close to stock as possible.
 

treIII

Senior Member
Jul 10, 2012
3,188
586
Google Pixel 5
Google Pixel 6
Interesting. Do I have to use an app to set the parameters of Franco kernel? I used to really like to fiddle a lot but not so much any more. I purchased his app though around a year ago. Also, do I have to format user data when flashing a custom kernel if they are running decrypted? Thanks for replying

Sent from my Nexus 6 using Xparent Blue Tapatalk 2
 

gamewarden234

Senior Member
Apr 9, 2011
427
176
Interesting. Do I have to use an app to set the parameters of Franco kernel? I used to really like to fiddle a lot but not so much any more. I purchased his app though around a year ago. Also, do I have to format user data when flashing a custom kernel if they are running decrypted? Thanks for replying

Sent from my Nexus 6 using Xparent Blue Tapatalk 2

If all your doing is flashing a kernel the answer is no. Just flash the kernel but I would make back up in TWRP first. A new custom rom factory reset is the norm unless you already are running the rom, an then you can dirty flash but I would make a backup first in TWRP just in case . If your decrypted stock rooted with TWRP installed you can download his app and it will download and flash his kernel auto magically if you are on a custom recovery like TWRP. I would back up first again just to make sure. When I came from the factory rom when I got the phone I unlocked rooted decrypted and put on TWRP. Then factory reset in TWRP and flashed liquid rom gapps and lean kernel and have now switch to Franco and dirty flash ever night as liquid updates
 
  • Like
Reactions: treIII
Mar 16, 2013
38
6
Ok so heres my story I disabled encryption on stock fine and living with it, yesterday i flashed the CM12 daily nightly which was build LRX22G so again I tried to disable the encryption by flashing the LRX22C kernel from the thread as LRX22G wasn't there. The phone went badass after boot too much lag and still encrypted plus from the three softkeys below home and overview were gone. Then I flashed fresh Rom again from recovery. Now I am still encrypted. Which kernel should be flashed for CM12 5.0.2 builds .
 
Last edited:

gamewarden234

Senior Member
Apr 9, 2011
427
176
Ok so heres my story I disabled encryption on stock fine and living with it, yesterday i flashed the CM12 daily nightly which was build LRX22G so again I tried to disable the encryption by flashing the LRX22C kernel from the thread as LRX22G wasn't there. The phone went badass after boot too much lag and still encrypted plus from the three softkeys below home and overview were gone. Then I flashed fresh Rom again from recovery. Now I am still encrypted. Which kernel should be flashed for CM12 5.0.2 builds .

Elemental x or Franco or lean or sensei. I like the first two..but I'm sure you know flash rom gapps and one of those kernels after you have decrypted again. If any encrypted data is on your phone it will remain encrypted regardless of the kernel or rom.
 
Last edited:

Radeon1337

Senior Member
Sep 5, 2009
207
24
Back up your data to a computer. Reset. Put data back on. Just dump the SD card to the computer. That's how I would do it. Then send it right back. Not hard. 10 minutes maybe?

Sent from my Nexus 6 using Xparent Blue Tapatalk 2

So what you are saying is that if i make a nandroid then decrypt i could use that nandroid to return to the same setup without encryption?
 

treIII

Senior Member
Jul 10, 2012
3,188
586
Google Pixel 5
Google Pixel 6
Im not sure. Give it a try. Once you decrypt you can stay decrypted rather easily. I was saying to do this though so you could keep your pictures etc.... Without losing anything. Then put whatever you want back on the phone once you are decrypted.

Sent from my Nexus 6 using Xparent Blue Tapatalk 2
 

Radeon1337

Senior Member
Sep 5, 2009
207
24
Im not sure. Give it a try. Once you decrypt you can stay decrypted rather easily. I was saying to do this though so you could keep your pictures etc.... Without losing anything. Then put whatever you want back on the phone once you are decrypted.

Sent from my Nexus 6 using Xparent Blue Tapatalk 2

I don't have anything important on my phone so there is nothing to back up, i just dont wanna install all apps and set up everything all over again :p
But maybe i'll just have to do it.
 

markwebb

Senior Member
So what you are saying is that if i make a nandroid then decrypt i could use that nandroid to return to the same setup without encryption?

Conversely. I accidentally installed a ROM which then encrypted me. I then reinstalled my prior ROM which was decrypted but my phone still remains encrypted. ;( So if everything is backed up still worth trying. I am going to decrypt again over the weekend and experiment and see what happens since I have everything backed up to usb stick.

Sent from my XT1095 using XDA Free mobile app
 

Top Liked Posts

  • There are no posts matching your filters.
  • 206
    I'm not responsible for anything blah blah

    This is intended to disable forced encryption on the nexus 6. You can still encrypt the device after doing this, but it won't be automatically done.

    After observing how this force encryption stuff works, I got it mostly figured out. (It's entirely a SW layer, as is already widely known). Basically when all the devices from fstab are mounted in android with the forceencrypt option, fs_mgr sets a flag for encryption (something like IF This_Device_Isnt_Encrypted; then This_Device_Needs_Encryption). on devices (looks like android only allows you to encrypt 1 device, which is probably to prevent such cases as over-resource usage ,maybe some other conflict that it doesn't support over 1 device, idk) that have forceencrypt set on them, if it can't unmount the device before doing these encryption checks - in other words if it's usy (like a file is open) - it just skips encryption all together. So if the device had a file preventing it from being unmounted, it just says "oh well, skip encryption." I found this kinda odd behavior anyway :p

    You can still encrypt the device, it just isn't forced. Some people are complaining about the slowness of the encryption SW-layer (why force SW encryption? At least put some HW for it in the device). This makes it the way it probably should be - optional.

    Stock LMY47D/LMY47E/LMY47M/LMY47I (5.1.0) - No force encrypt:
    https://www.androidfilehost.com/?fid=95916177934540533

    Stock LRX22C (5.0.1) - No force encrypt:
    https://www.androidfilehost.com/?fid=95857557620392411

    Stock LRX21O (5.0) - No force encrypt:
    https://www.androidfilehost.com/?fid=95784891001613336

    Prerequisites:
    - You should be running the same build as the kernel you install (E.G. if you are running 5.1.0 LMY47D you should install the LM47D no force encrypt kernel)
    - Your bootloader must be unlocked (fastboot oem unlock)

    How-to install kernel:
    1.) Reboot to boot loader
    2.) Download the appropriate boot.img above
    3.) Install it via fastboot (fastboot flash boot boot_noforceencrypt.img)

    To disable forced encryption after kernel is installed:
    1.) Reboot to boot loader
    2.) Format userdata (fastboot format userdata) - This will erase all of your data (apps, sd card, etc.) - so make appropriate backups
    23
    5.0.1 boot image force encrypt disabled

    Disabled force encrypt in 5.0.1 (lrx22c)
    only change is forceencrypt->encryptable in fstab.shamu
    22
    I assume this boot.img will also work with the LYZ28E build?

    Here's one for LYZ28E

    Doesnt take a genius to mode the boot.img


    1. Extract the Android Image Kitchen zip i uploaded in this post
    2. drag in the boot.img file you wish to modify onto the unpackimg.bat file
    3. you should get a command window pop up, it should say succesfull and you will get a few folders added.
    4. open the ramdisk folder and open the fstab.shamu file using notepad++
    5. search for forceencrypt and replace it with encryptable. there should be only one case where this exists.
    6. save the file, go back to the root of the image kitchen folder, and run the repackimg.bat file.
    7. you should get a new boot.img build called image-new.img, you can use this now to flash on your device
    12
    Here's a link for the No Force Encrypt file I made for the MRA58K Nexus 6 Marshmallow factory image. Going to flash the files on to my phone now.

    PHP:
    http://www13.zippyshare.com/v/1lvgqKcI/file.html
    10
    Thanks! What do we do to upgrade from 5.0.1 to 5.1 exactly and keep the unencrypt?

    Couple of options, but first to note:
    - adb sideload from stock recovery will not work if you are not completely stock. It does a block-level update so it will fail if it finds a mismatch on the device boot.img and what it expects, like if you are already unencrypted.

    First option:
    - Flash the 5.1.0 factory image, and repeat the entire process
    - Will wipe everything

    Second option (ONLY if you are on stock LRX22C
    - You can extract the OTA update
    - Hack the script to not install boot img patch and disable md5 checks.
    - Don't do it this way

    Third option
    - Get the factory image and extract it
    - Flash the bootloader (fastboot flash bootloader bootloader-shamu-blah.zip)
    - Flash the radio (fastboot flash radio radio-shamu-blah.zip)
    - Reboot bootloader (fastboot reboot-bootloader)
    - Extract the: image-shamu-lm47yd.zip
    - Flash recovery (fastboot flash recovery recovery.img) Skip this if you are using a custom recovery and want to keep it
    - Flash modified boot.img in OP (fastboot flash boot bootimg_noforceencrypt_lmy47d.img)
    - Flash system (fastboot flash system system.img)

    The cache/userdata img are only needed if you want to full wipe.

    You will lose root, obviously, but can easily get it back from twrp.