yashsingh1/xdaforums huggingface dataset:
[Nexus 6 Android Development] stuff:
I don't need encryption. I don't do very secretive things, and I have a password on my phone. So, if someone wants to pull my data unencrypted, so be it. But chances are if they can't get through the password, and I've for sure lost it, I'll send an Erase message through the Device Manager.

Either way, my hopes are that this can increase battery life. I just got mine today, but I want to get as much battery out of it as I can.

---------- Post added at 03:36 PM ---------- Previous post was at 03:35 PM ----------

What is different from Apple's method and Google's method?
[Nexus 6 Android Development] codified:
iOS devices have hardware encyryption/decryption, so there is little overhead. Google is doing it all in software which comes with a significant performance penalty. Many Android OEMs have hardware encryption, don't know why Google chose software for the Nexii.
[Nexus 6 Android Development] pappy97:
[deleted]
[Nexus 6 Android Development] stuff:
Do you think Google chose to do this, or this was the only option? I know it is being done, but who says it's Google's fault?
[Nexus 6 Android Development] datsyuk:
Has anyone noticed a good speed increase? I don't have either device but honestly the Nexus 5 looks to fly around the UI quicker than the 6 imo from what I have seen.
[Nexus 6 Android Development] akellar:
Is it possible to do a backup in twrp, move it to a PC, flash this, wipe, and then restore that backup?
[Nexus 6 Android Development] Ingenium13:
No the backup would be encrypted. I believe TWRP just images the partition (or I could be getting it confused with CWM) rather than copying the files into an archive.
[Nexus 6 Android Development] bbedward:
The thing I don't understand about it is why it's forced. I feel like it's perfectly acceptable to leave it up to the user.

For your standard household user, there isn't extremely sensitive data to worry about.

It's a much welcomed feature, but I don't think a pure software implementation should be forced.
[Nexus 6 Android Development] stuff:
I definitely don't have any sensitive data. But I also wouldn't have any issue with encryption. So, since it's SW, not HW encryption, that is why the read/write speeds are lower?
[Nexus 6 Android Development] bbedward:
Typically, decryption/encryption occurs on the fly when it needs a file. So if you need to read 100 files really quickly every one gets decrypted which adds additional jobs/cycles to the cpu..

The fact that these software jobs are running on the CPU, adds the additional load which would he why performance differences are observed.
[Nexus 6 Android Development] Xileforce:
The only reason I've heard for google not utilizing the hardware that really makes any semblence of sense is that being as android is designed to run across pretty much any hardware, some of which may not posses the necessary hardware for hardware encryption, they are doing it through the software to make it more universally compatible. Though it seems they would be able to make it autodetect your hardware and switch it between hardware and software encryption somehow based on if your device supported it. So who knows :/
[Nexus 6 Android Development] Xplicit84:
Lets see if this works then...
[Nexus 6 Android Development] patmw123:
Can anyone confirm if the radio or bootloader have changed at all from the LMY48I build?
[Nexus 6 Android Development] czaplin:
Could you enlight a noob. I have LMY48J from Euphoria rom. Can I flash 48M? Or any other one?

---------- Post added at 07:54 AM ---------- Previous post was at 07:51 AM ----------

Hi, can I flash this over LMY48J?
[Nexus 6 Android Development] bigstunta101:
Besides speed, does anyone notice a difference with battery going unencrypted? That's my bigger concern
[Nexus 6 Android Development] itlnstln:
Are there any tools to modify the boot image for OSX? I can't seem to find any suitable tools, and I need to modify the kernel for LVY48F (Project Fi). TIA.
[Nexus 6 Android Development] fuzzybuffalo:
Here's LVY48F...

View attachment bootimg_noforceencrypt_5.1.1_LVY48F.img

Sorry, I don't know of any tools that work on OSX.
[Nexus 6 Android Development] itlnstln:
Thanks! I appreciate it.

---------- Post added at 04:42 PM ---------- Previous post was at 04:06 PM ----------

Also, check this out (it works for the N6 as well as the N9): http://xdaforums.com/nexus-9/development/fix-fed-patcher-forceencrypt-disable-t3200168
[Nexus 6 Android Development] atharwaqas:
I am looking for noforceencrypt for LYZ28K the latest build for T-Mobile Nexus 6. Really great if someone can help me out here.
[Nexus 6 Android Development] Pecata:
I had to create one for myself-you can do it too-it's easy-just follow the instructions here: Courtesy of post #902 ;)

http://xdaforums.com/showpost.php?p=61015828&postcount=902
[Nexus 6 Android Development] atharwaqas:
I went there as well, the part i am confused about it where to get the boot.img file from. Can you guide me on that?
[Nexus 6 Android Development] itlnstln:
Use this: http://xdaforums.com/showthread.php?p=62800059

It works for the N6 as well.
[Nexus 6 Android Development] sparcvx:
I've just went through the process of creating a new boot.img to be able to upgrade from LVY48E to LVY48F since I'm on Fi. Can't we get Google to disable this forced encryption so that every month when an update comes out we don't have to go though this hassle. Ever since I removed the forced encryption the N6 its been running sooo much more like a flagship phone that it really is.
[Nexus 6 Android Development] Pecata:
After you download the system image from google: https://developers.google.com/android/nexus/images?hl=en

extract it and it will in there
[Nexus 6 Android Development] Syndrome666:
Anyone mod the LYZ28K boot image? I don't own a windows machine and image kitchen doesn't work on Mac OS. I tried it out but couldn't get the boot image to unpack. Are there any other tools or applications to do this on Mac, Linux, chrome, or Android OS? I really want to upgrade to LYZ28K, but not at the cost of encryption slowdown. Something in Android OS process on LYZ28J keeps sucking down my battery a bit too quickly, and I'm hoping whatever it is, will straighten out on the new update. Thanks in advance for any input and/or links.
[Nexus 6 Android Development] itlnstln:
Check it: http://xdaforums.com/showthread.php?p=62800059. It works for the N6 as well.
[Nexus 6 Android Development] Syndrome666:
Holy smokes, thanks!

So let me get this straight, if I'm already running LYZ28J with an unencrypted boot (meaning my device's encryption is disabled), I can manually pull the LYZ28K's bootloader, boot, radio, and system images, dirty flash them all via fastboot commands, then head into twrp recovery and flash the FED-Patch zip? Am I understanding the procedure correctly, as this is what I'll want to do. I'll only clean install LYZ28K if I find something horribly wrong with how it performs. I tend to save clean installs for various ROM testing and new yearly updates as they tend to require a bit more time to set up. Curious if this zip will work when the marshmallow update comes along.
[Nexus 6 Android Development] Syndrome666:
Tried it updating from LYZ28J to LYZ28K, didn't work for me. My N6 gets stuck on the initial Google boot screen with the unlocked bootloader icon at the bottom. Perhaps the build I'm trying to update has something interfering with the FED-patch. I've read the whole thread from start to finish, and it seems to work for your N6 and a few others. Which build did you flash? I'm on T-Mobile, hence why I'm running T-Mobile based builds. I left some feedback on the dev's thread, hopefully he'll take note of it.
[Nexus 6 Android Development] itlnstln:
I'm on LVY48F on my N6 and LMY48M on my N9. The patch worked on both devices, but he did need to make an update for LMY48M. He's very responsive, so I'm sure it'll get fixed quickly.
[Nexus 6 Android Development] scryan:
Just to get things straight... Having an unencrypted boot does not mean device encryption is disabled... Your kernel either forces encryption, or it does not... But even flashing a boot image that does not force encryption is not enough to make you unencrypted... You need to format userdata as well to actually make your device not use encryption.

Not sure about the utilities you mentioned, but the kernel is what dictates if encryption will Be enforced or not... And that is in boot, so if you flash boot you need to be doing something about that.

If your just trying to update, you can pretty much just flash system.
[Nexus 6 Android Development] Syndrome666:
I'm aware of that. I formated my device several times when testing different ROMs and builds, so I know what I'm doing. I was lucky enough to find a modified boot image from every consecutive build I updated to since formatting my device to get rid of encryption. I just prefer to dirty flash when upgrading since I have quite a bit of stuff on my device and just don't find it necessary to do a wipe and clean install every time I update via fastboot using terminal command prompts. It just so happens that no one has modified the latest Google factory image from LMY28K build and posted it publicly. If I flash the factory boot the way it comes from Google's page, it'll detect that my device is unencrypted, trust me I've tried doing that before, not going to make that mistake again. I'm actually following this developer who created a more universal way to decrypt/patch encryption enabling boot images after manually flashing the updated image files. Just search for FED-patch (force encrypt disable patch). It seems to work for most builds, just not on the latest LYZ28K build yet.
[Nexus 6 Android Development] H4X0R46:
Once encryption is disabled, do you have to reinstall the stock boot.img and re format the phone before you OTA update the device? Or how does that work? Will OTA update even work after you reinstall the stock boot.img? Or does it need an entire stock image flashed first?
[Nexus 6 Android Development] scryan:
Probably just manual flash to upgrade... Stock ota would almost undoubtedly flash stock kernel with forced encryption, and when it booted you would be forced to wipe.

For the updates on the same version just fastboot flash system. With M, you may have to do more.
[Nexus 6 Android Development] Xplicit84:
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.

http://www13.zippyshare.com/v/1lvgqKcI/file.html
[Nexus 6 Android Development] okgnew:
Can you make a 'no force encrypt' kernel for official Android 6.0 MRA58K build, please?
[Nexus 6 Android Development] zephiK:
Read the post above yours.
[Nexus 6 Android Development] stevew84:
Curious if the no encrypt img works.
[Nexus 6 Android Development] jeebuspwnz:
just flashed official 6.0. Your no-encrypt worked beautifully! Thanks!
[Nexus 6 Android Development] stevew84:
I'm confused on how to properly install the new factory image and then this thing. Can someone please run through the steps real quick?
[Nexus 6 Android Development] belek1979:
And? Is it working?
[Nexus 6 Android Development] itlnstln:
Flash the modified boot.img in place of the original one from the factory image.
[Nexus 6 Android Development] Xplicit84:
Yes it is.

fastboot flash bootloader bootloader-shamu-moto-(whatever it’s made up as).img

fastboot flash radio radio-shamu-(whatever it’s made up as).img

fastboot reboot-bootloader

fastboot flash boot boot_noforceencrypt_(whatever it’s made up as).img

fastboot flash system system.img

fastboot format cache

fastboot format userdata

fastboot reboot
[Nexus 6 Android Development] belek1979:
How about update without loosing data?

I have 5.1.1 with noforceencrypt, twrp and root
[Nexus 6 Android Development] Xplicit84:
Don't flash userdata and cache
[Nexus 6 Android Development] belek1979:
So dirty update with noforceencryption looks like that (what about erase cache?):

fastboot flash bootloader C:/6/bootloader.img
fastboot reboot-bootloader
fastboot flash radio C:/image-shamu-XXXXXX/radio.img
fastboot reboot-bootloader
fastboot flash system C:/6/system.img
(no flashing userdata C:/image-shamu-XXXXXX/userdata.img)
fastboot flash recovery C:/6/recovery.img
fastboot erase cache [B]???[/B]
(no flashing cache C:/6/cache.img)
fastboot flash boot C:/6/boot.img
fastboot flash boot C:/6/bootimg_noforceencrypt_MRA58K.img

?

Then restart and let update.

Next root and TWRP (optionally) .

Please correct me if I'm wrong.
[Nexus 6 Android Development] Xplicit84:
You can save yourself time rather then constantly rebooting the bootloader. Recovery is only needed if you don't have a custom recovery installed like TWRP. For you it should look like this if you skip the constant reboot bootloader. Also root isn't working unless you install a custom kernel. Also, are you rooting/unlocking for the first time? Assuming you are based off your last statement about root and TWRP as optional. FYI, unlocking will factory reset your phone.

fastboot flash bootloader bootloader-shamu-moto-(whatever it’s made up as).img

fastboot flash radio radio-shamu-(whatever it’s made up as).img

fastboot reboot-bootloader

fastboot flash boot boot_noforceencrypt_(whatever it’s made up as).img

fastboot flash system system.img

fastboot flash recovery (Only if you don't have a custom one installed)

fastboot reboot
[Nexus 6 Android Development] belek1979:
I have TWRP, root and unlock...

I wasn't sure if TWRP (2.8.6.0) works with Android M.

so:

fastboot flash bootloader bootloader-shamu-moto-(whatever it’s made up as).img

fastboot flash radio radio-shamu-(whatever it’s made up as).img

fastboot reboot-bootloader

fastboot flash boot boot_noforceencrypt_(whatever it’s made up as).img - before or after system.img?

fastboot flash system system.img

fastboot reboot - or maybe fastboot reboot-bootloader -> go to recovery (TWRP) -> clear dalvik cache -> reboot system and let TWRP install root?
[Nexus 6 Android Development] Xplicit84:
If you have the Hellscore custom kernal then yes, install it through TWRP. That and another are the only ones seeming to get root to work. I'm going to hold out till ChainFire gets things situated.
[Nexus 6 Android Development] andy o:
Anyone getting a message on boot (between the white Google logo and the boot animation) saying "Your device is corrupt. It can't be trusted and may not work properly"?

I dirty flashed to 6.0 earlier with my no-encrypt boot.img, and I didn't notice it, but I'm not 100% sure it wasn't there. Then I did a factory reset to test some things, then after that restored the TWRP nandroid I'd made before the factory reset, and I noticed the message. It won't go away even after re-flashing the factory image (without userdata), the N6 works fine otherwise. I suspect it's because of the unencrypted state, but I don't think I saw it after updating the first time to 6.0.
[Nexus 6 Android Development] marc.ientilucci:
im getting it now and cant get the phone to boot. rooted with TWRP. i made my own boot.img but i will try the one someone posted a bit earlier today as it was confirmed working - also downloading the factory image again & trying another flash.

---------- Post added at 09:36 PM ---------- Previous post was at 09:02 PM ----------

i still got the error but Android is booting & "upgrading apps" currently happening. im wondering if its due to flashing TWRP while running commands. i may try again with stock recovery and then flash TWRP separately....

---------- Post added at 10:12 PM ---------- Previous post was at 09:36 PM ----------

grrr, flashed SuperSU in recovery and now phone wont boot, getting the error msg again...

---------- Post added at 10:31 PM ---------- Previous post was at 10:12 PM ----------

flahsed everything but userdata and cache and i still got the error. phone is encrypting now... what a nightmare.... gunna have to save all my stuff and start from scratch im guessing :(
[Nexus 6 Android Development] marc.ientilucci:
well went back to 5.1.1 (LMY48W) without wiping userdata or cache and no error message. Very odd... Has anyone had success updating using a non-encrypted boot.img without wiping userdata?
[Nexus 6 Android Development] Redfield_87:
Hi, i received my nexus 6 miinutes ago and i wanna know if this steps will get my Nexus on 5.1.1, rooted and unencrypted:

1- Install 5.1.1 Original Google Image (LMY48W) with ADB

2- Install custom boot unencrypted for 5.1.1 (i will make it following the instructions on this thread)

3- Root using CFRoot (i see on this new version you have to do it via windows/fastboot, not flashing a zip via recovery)

Will this work for getting my nexus 6 on 5.1.1 and unencrypted?

Thanks for your help!
[Nexus 6 Android Development] gladiac:
Hey there!

It seems like this error is new. Take a look HERE. Does your screen look like the ones in Table 5?.

I guess we can sign the boot.img with our test-key but the error-message will persist (with a different color).

I need to dig into this a bit deeper but my time-schedule is pretty tight atm.

I wonder if this check is part of Android 6 or if this is new logic in the bootloader...
[Nexus 6 Android Development] marc.ientilucci:
Hey, I wiped the phone clean and installed from factory image with all factory files (nothing modofied) and I'm still getting that screen. I have the Red version from table 5.
[Nexus 6 Android Development] Pecata:
I was running stock 5.1.1 with root(unlocked bootloader) and I flashed 6.0 last night with NRT(kept user data) and it booted fine and I don't get any of the messages. I do have a pattern setup but my device doesn't even ask for it while booting up....I am stock, unlocked and encrypted with no root at the moment...
[Nexus 6 Android Development] gladiac:
Well that is weird! Interestingly though, it seems like the red version of the error is not displayed by the bootloader but by some logic in the ramdisk instead. Inside ramdisk, there are two image-files located under ./res/images/warning which look exactly like the red version of the error. So this problem could possibly be worked around by modifying boot.img once more.

However, I am not totally sure what's going on here right now so I could be totally wrong here. I would have to test on my own device to be more certain. On a clean setup there should be no errors.
[Nexus 6 Android Development] gladiac:
At least on flounder, ramdisk includes the following lines in init.flounder.rc and init.flounder64.rc:

on verity-logging
exec u:r:slideshow:s0 -- /sbin/slideshow warning/verity_red_1 warning/verity_red_2

Commenting out these lines would probably disable the display of the warning messages but only in case dm-verity is the actual problem.

Additionally, removing all dm-verity stuff would probably bring the old (Pre-marshmallow) behavior back.

I feel like staying on CM12.1 and not even touching stock Android 6 right now...

Hmm, I wonder... does anyone have the orange or yellow warning sign?
[Nexus 6 Android Development] andy o:
These messages themselves are not new though, but may be new for this specific boot.img modification. I found several references from before. The phone works OK otherwise, so I'm not too worried. It's interesting if it indeed doesn't go away with a full factory image reset though.

I just wanted to know if modifying the boot.img like people are doing in this thread was what triggered it, if so everyone here should be getting it. I don't remember seeing it when I first modified it and booted, but I might have just missed it. Then I did a factory reset from TWRP to test something else, then did a nandroid restore, and that's when I noticed it, so I'm not sure if TWRP did something or if it was just the modified boot.img.
[Nexus 6 Android Development] stas333:
anyone posted the decrypted version of 6.0?
[Nexus 6 Android Development] marc.ientilucci:
There are other kernels that have been modified but have other settings like color change. The closest to stock I can find is below, but it shows that we can get root with an unencrypted kernel/boot.img.

I believe everyone on this thread wants a "vanilla" unencrypted kernel, that we can have RW root access without getting the "Corrupt Device" error. If others can do it, its only a matter of time before someone in this thread figures it out, maybe with the help from other developers.

Here's the kernel I was referring to: http://xdaforums.com/showthread.php?t=3218958
[Nexus 6 Android Development] marc.ientilucci:
Chainfire back at it again... has anyone used this method? http://xdaforums.com/apps/supersu/wip-android-6-0-marshmellow-t3219344
[Nexus 6 Android Development] gladiac:
Hey there,

I just finished FED-Patcher v7. It disables dm-verity which gets rid of the red error message. You can grab it from here.

Enjoy!
[Nexus 6 Android Development] marc.ientilucci:
I asked on the quoted thread and he said flashing this along with SuperSU should give the ability to modify the system partition (build.prop modifications). Can you confirm? :)

---

EDIT: Derp, thought it was someome else - I'll have to give it a shot when I'm home in 5hrs! Thanks for the assistance again.
[Nexus 6 Android Development] gladiac:
No problem :)! I'm testing it right now. I will post my results here when I'm done.

//EDIT: Sadly it does not work. It keeps bootlooping after installing SuperSU with the following error:

avc: denied { execute_no_trans } for path="/system/xbin/daemonsu" dev="mmcblk0p29" ino=104419 scontext=u:r:init:s0 tcontext=u:object_r:system_file:s0 tclass=file permissive=0

Probably some selinux problem :/. I might dive into this later this week. Sorry.

//EDIT #2: However, on ROMs that have selinux configured to be "permissive" SuperSU should work fine.
[Nexus 6 Android Development] marc.ientilucci:
All good, thanks for testing everything out, keep up the phenomenal work!
[Nexus 6 Android Development] leondestiny:
i will hit you guys with a noobish question ! i have read the OP but i still dont seem to understand what "disabling this forced encryption" does , what is it good for if i disable it ?
[Nexus 6 Android Development] istperson:
In android there's a security option in Settings -> Security -> Encryption. On most phones you can select 'Encrypt phone' which will then encrypt your data and user-data with a generated key that is stored on a partition called MetaData. You can choose it you want to unlock the encrypted partition automatically during boot, or after providing a pattern or pin. So if they steal your phone then they can'r extract your data.

Unfortunately it's done in software, so every time an app reads its data or writes/reads user-data, the kernel is working on encrypting/decrypting all access to these. They have measured it, and while the actual read/write operation is 4-5 times slower than unencrypted, usually it's only 10-15% decrease in speed tops.

This is true for most Android phones, while with the N6, Google experimented what if it was switched on by default and all Nexuses were very secure. So when you boot you phone and the kernel reads the fstab.shamu it finds the 'forceencrypt=...' parameter for the /data partition and if it's not encrypted yet, it will do it.

If you change the 'forceencrypt=...' to "encryptable=..." as in other phones then the kernel will leave your /data partition as it finds it, and in Settings you see 'Encrypted' or 'Encrypt phone' according to its state.

So why disable forceencrypt? 1. The bigger the data an app reads and writes, it's more slower to encrypt/decrypt in software, so it's to make your phone faster. And 2. who is Google to tell me what to do!!! :D

And for the last question, disabling won't do anything in itself, if you want to have your /data not encrypted any more, the easiest way is to backup everything, format data, and restore.