FORUMS

[MOD][GUIDE] Unencrypt/Flashable - Disable Force Encryption - Any Rom/Kernel

1,523 posts
Thanks Meter: 1,181
 
By hlxanthus, Senior Member on 12th January 2015, 06:09 PM
Post Reply Email Thread
Depreciated!! See this thread for the new recommended package. All of my instruction below is still valid, just use the new package from thread linked here.

http://forum.xda-developers.com/show....php?t=3234422


~~DISCLAIMER~~

Flashing roms, kernels, and mods come with NO guarantee, NONE, ZILCH, NADA . . Do NOT use this package if you do not grasp and understand this concept. You have been warned.

This is a recovery flashable that will extract your boot.img, unpack all pieces, modify fstab.shamu to disable forced encryption, repackage, and flash boot.img back to system. It does NOT actually unencrypt your device. More on that later.

It will work on ANY kernel for this device, regardless of whether it is the stock kernel, or a custom ROM kernel. Also to date, it has shown to work on any version of android . . it is essentially future proof (unless google throws us a major curve ball in the future and radically alters how encryption is triggered at first boot).

Why use this? Who is this package for?

-If you are running 100% Stock Rom, but have a recovery installed and wish to unencrypt your storage. No root needed.
-Running a custom kernel you like, but it forces encryption and you want to change that.
-Currently unencrypted but want to flash a rom that uses FORCEENCRYPTION by default (cyanogenmod12).
-Just bored and want to toss the dice and see what happens.

That is pretty sweet right? Now you can flash anything and as long as you flash this afterwords, you wont have to worry about booting a rom and seeing that dreaded "Encrypting" screen anymore.

What doesn't this do?

-Well, to be blunt . . it does NOT actually UNENCRYPT your device. You will have to bite that bullet on your own, but I will offer some advice on that front later.

Changelog:
03/30/2015
  • Remove my ill advised attempt to auto patch nightlies, not possible
01/12/2015
  • Initial Build/Release
  • Includes fully working patch to initrd, specifically fstab.shamu to revert FORCEENCRYPTION by default.

Buglist:
  • Auto patch support removed, would never work anywayaddon.d support not currently working - fix is to flash this package with every nightly to preserve unencryption

How to download and install?

Download - NO_FORCE_ENCRYPT_shamu_v1.0-signed.zip

Reboot Recovery - TWRP only has been tested as working
Select "Install" and navigate to where ever you stored that file . . likely /sdcard/downloads/
Take a deep breath and wait for it to finish.
TADA . . done. Reboot and Profit!!

NOTE: You can feel free to flash this as part of a line of other packages.

Example: You are already unencrypted and want to flash Cyanogenmod 12 (assumes you have all packages downloaded already)
-TWRP factory reset (optional but recommended when coming from another rom)
--TWRP's built in factory reset function does quite well, but if you are like me and want a clean slate . .
---TWRP>Wipe>ADVANCED WIPE> and check System, Data, Cache (will leave internal storage intact). This is recommened specifically in conjunction with switching GApps.
-Install> and select all packages at once. I recommend the following order . . Rom, then my Kernel Patcher, then SuperSU (optional), then GApps last.


That was certainly easy right? Well the truth is, unless you are already unencrypted . . nothing will be different. You will still be encrypted. Bummer right? But that is where these next steps come in. They will give you the options available to reach the fabled unencrypted status!!

Below are the only three options I know of unencrypt once you are running a patched kernel. Select one below that works for you.

~~WARNING~~


The below methods WILL erase EVERYTHING from data, including your INTERNAL STORAGE. Backup all important files, pictures, etc before proceeding. You have been told!!

-Go to Android>Settings>Backup & restore>Factory data reset (may not work properly with a custom recovery installed)

-Reboot to recovery and go to TWRP>Wipe>FORMAT DATA . . type "yes" to confirm

-Reboot to bootloader and type . .
Code:
fastboot format userdata
[note - I originally said to use the fastboot erase userdata function. This caused a recovery bootloop. Switching to "format" instead solved this issue. Thanks @aussie1234 for pointing this issue out to me]

Edit: make sure you boot android first after unencrypting before going into recovery. This will allow the proper creation of multiuser partitions, otherwise, twrp will not use the proper /data/media/0/ as root of storage.

Some may notice there is an experimental addon.d included. This NOT WORKING YET. DO NOT TRY AND USE IT. Not quite sure yet where in the chain it is broken, but that will be a problem for another day. In theory it should, but . . read the "disclaimer" at the top of this post. The idea here is to be able to flash nightlies as they roll out without having to re-apply this patch manually every time. This function is NOT supported on Stock Roms. If you try it and it works, let me know. Do NOT come yelling to me that it did not work and crying that you are now encrypted again. No whiner babies allowed.[REMOVED: didn't work and caused conflicts with some packages]

At the core of this tool is a script build by @dk_zero-cool which can be found . . [DEV][INITRD][2013-10-25] Injector - An Android Ramdisk Injection Tool

Ultimately, this package is as much his as it is mine. It is his magic script that did the hard part, I just put it to work in a new way.

Please don't share this package directly, link them back here if needed. That way, they can get proper support and instruction for its use.

Also thanks to @rascarlo . . his github made it easy to find what needed modded.
The Following 61 Users Say Thank You to hlxanthus For This Useful Post: [ View ] Gift hlxanthus Ad-Free
12th January 2015, 06:18 PM |#2  
Senior Member
Thanks Meter: 294
 
More
Nice! Now just to double check, im unencrypted so if i flash cm12 and this cm12 wont encrypt my phone while still using cm's kernel?
12th January 2015, 06:26 PM |#3  
hlxanthus's Avatar
OP Senior Member
Thanks Meter: 1,181
 
More
That is correct. In my tests it has worked just fine that way.

Edit: In fact, I just tested this exactly and works as expected.

On a side note, I can confirm that addon.d support does NOT work - do not attempt it. I updated the OP to reflect this and add a stronger warning. Right now you MUST flash this everytime you flash a rom that forces encryption.
The Following 2 Users Say Thank You to hlxanthus For This Useful Post: [ View ] Gift hlxanthus Ad-Free
15th January 2015, 06:18 AM |#4  
symple's Avatar
Senior Member
Flag an island in the SUN
Thanks Meter: 27
 
More
Just what the doctor recommended for a flash-addict like my self....

Thanx

. . . uploaded from a hand-held Killer WHALE
The Following 2 Users Say Thank You to symple For This Useful Post: [ View ] Gift symple Ad-Free
16th January 2015, 01:56 PM |#5  
otisman's Avatar
Senior Member
Thanks Meter: 3,035
 
More
Works like a charm much alohas bradah hixanthus
The Following User Says Thank You to otisman For This Useful Post: [ View ] Gift otisman Ad-Free
16th January 2015, 05:54 PM |#6  
bmwh0r3's Avatar
Senior Member
Flag Millerstown, PA
Thanks Meter: 525
 
More
So say I flash a ROM. I want to do ROM, kernel, your boot.IMG, the gapps followed by a factory reset/erase user data if I understand correctly?

Example : DirtyUnicorns then leankernel your zip and then gapps
16th January 2015, 06:06 PM |#7  
hlxanthus's Avatar
OP Senior Member
Thanks Meter: 1,181
 
More
Quote:
Originally Posted by bmwh0r3

So say I flash a ROM. I want to do ROM, kernel, your boot.IMG, the gapps followed by a factory reset/erase user data if I understand correctly?

Example : DirtyUnicorns then leankernel your zip and then gapps

Well if you flash lean, don't bother with my flashable, as lean is already set for no force encryption isn't it?
The Following User Says Thank You to hlxanthus For This Useful Post: [ View ] Gift hlxanthus Ad-Free
16th January 2015, 06:15 PM |#8  
bmwh0r3's Avatar
Senior Member
Flag Millerstown, PA
Thanks Meter: 525
 
More
Quote:
Originally Posted by hlxanthus

Well if you flash lean, don't bother with my flashable, as lean is already set for no force encryption isn't it?

I'm not sure anymore. Will look. I tend to break things when flashing because I don't read closely. On my vzw note 3, I was well known to break everything. Kinda scary now that I have a nexus lol


Yes you're correct. I wonder why I can't get decrypted then?
16th January 2015, 07:15 PM |#9  
hdtechk's Avatar
Senior Member
Thanks Meter: 31
 
More
Quote:
Originally Posted by bmwh0r3

I'm not sure anymore. Will look. I tend to break things when flashing because I don't read closely. On my vzw note 3, I was well known to break everything. Kinda scary now that I have a nexus lol


Yes you're correct. I wonder why I can't get decrypted then?

Just do the factory rest then if already encrypted unless data is removed it will stay encrypted


Sent from my Nexus 6 using Tapatalk
16th January 2015, 07:42 PM |#10  
hlxanthus's Avatar
OP Senior Member
Thanks Meter: 1,181
 
More
Quote:
Originally Posted by hlxanthus

Well if you flash lean, don't bother with my flashable, as lean is already set for no force encryption isn't it?

Quote:
Originally Posted by bmwh0r3

I'm not sure anymore. Will look. I tend to break things when flashing because I don't read closely. On my vzw note 3, I was well known to break everything. Kinda scary now that I have a nexus lol


Yes you're correct. I wonder why I can't get decrypted then?


Quote:
Originally Posted by hlxanthus

Below are the only three options I know of unencrypt once you are running a patched kernel. Select one below that works for you.

~~WARNING~~


The below methods WILL erase EVERYTHING from data, including your INTERNAL STORAGE. Backup all important files, pictures, etc before proceeding. You have been told!!

-Go to Android>Settings>Backup & restore>Factory data reset
-Reboot to recovery and go to TWRP>Wipe>FORMAT DATA . . type "yes" to confirm
-Reboot to bootloader and type . .
Code:
fastboot erase userdata
Edit: make sure you boot android first after unencrypting before going into recovery. This will allow the proper creation of multiuser partitions, otherwise, twrp will not use the proper /data/media/0/ as root of storage.

https://github.com/imoseyon/leanKern...f0cd6f9027a3bb

Yes, lean kernel doesnt force encryption. If you are currently on lean kernel, so one of the three methods to unencrypted from above (quoted from my OP)
31st January 2015, 04:06 AM |#11  
jtorress's Avatar
Senior Member
Flag Jacksonville, Fl
Thanks Meter: 49
 
More
This worked great for me! Thank you SO much!
The Following User Says Thank You to jtorress For This Useful Post: [ View ] Gift jtorress Ad-Free
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes