yashsingh1/xdaforums huggingface dataset:
[Nexus 6 Android Development] efrant:
No, not if you flash the full factory images (

without

flashing the userdata image) when they are posted here. You won't be able to flash just the OTA update, so you will need to flash the full images.
[Nexus 6 Android Development] Sultan of Speed:
So, after a couple of days of usage, I can proudly say that where my N6 use to be at close to 15% to 20% by the end of the day, it is now at roughly 50%.

The battery improvement is there. Still haven't had chance to check for any remenant sluggishness
[Nexus 6 Android Development] dodgebizkit:
Great info on unencrypting :)

-----------------------<SiG>-------------------

My house phone is better than your iPhone.
[Nexus 6 Android Development] duckingzebra:
i used wugs, but here's my results
[Nexus 6 Android Development] Chad_Petree:
Does this apply to the nexus 6? Maybe they will deactivate it in the next 5.1 update?

Google changes its stance on Android Lollipop disk encryption from mandatory to optional

Last year, when Google announced Android 5.0 Lollipop, one of the key features was full disk encryption that would make it impossible for someone to get data off your device even if they had the device. While this worked in a very specific scenario (it required having a passcode lock on the phone) it was still more secure than before.

Unfortunately, this came with a terrible performance penalty, as noted by AnandTech and Ars Technica in their reports, where the new Nexus 6 with disk encryption was slower than the older Nexus 5 in several tests due to its permanently enabled encryption feature.

Previously, Google had decided that encryption would be a permanent feature in Lollipop devices, and that it would be enabled the first time the phone was switched on. But other than Google’s own Nexus 6 and Nexus 9, none of the devices that launched with Lollipop since have had this feature enabled.

As it turns out, Google has relaxed the requirements for enabling encryption on Lollipop devices. Google still requires having the feature on OEM devices but it’s still up to the OEMs to choose whether or not they want to have it enabled, and clearly no one wants that so far.

The exact reason for this is unknown but it’s easy to guess. The current memory is not fast enough to handle read/write tasks with the added load of encrypting and decrypting the data every time. It’s too much work and that tends to slow down the performance of the memory unit, which in turn affects the entire device performance. Google will likely make it mandatory in future to have encryption enabled when the hardware is fast enough to handle it but for now OEMs can ship devices with the feature disabled.

http://blog.gsmarena.com/google-changes-stance-android-lollipop-disk-encryption-mandatory-optional/
[Nexus 6 Android Development] Novakingwai:
Doubt it. Only way to deactivate it would be to wipe the entire phone and start over. There's probably a bunch of people who would rather not do it
[Nexus 6 Android Development] dodgebizkit:
Id rather not do it but there's no reason why they shouldn't make it optional, even by enabling it through developer options.

-----------------------<SiG>-------------------

My house phone is better than your iPhone.
[Nexus 6 Android Development] occtec:
[DELETED] all good :)
[Nexus 6 Android Development] Imacellist:
So I followed directions, but it doesn't appear to have worked. Going into settings, it shows it is still encrypted. Guess I'll try again. Anyone else have this happen?
[Nexus 6 Android Development] wietse1988:
Which rom are you on? Maybe you can try wug's toolkit: http://xdaforums.com/nexus-6/development/toolkit-wugs-nexus-root-toolkit-v1-9-8-t2947452

If you go to advanced utilities --> fastboot flash boot [kernel] --> there you can flash a boot which doesn't force encryption.
[Nexus 6 Android Development] Imacellist:
Not on a rom, just on stock. Prior to this process, I was unlocked, but completely stock without root. I flashed the new boot.img, did a factory reset, then used wugfresh to root and custom recovery. Setup the phone and found it was still encrypted, but performing better than it was before haha. Benchmarks are not even close to those posted however.
[Nexus 6 Android Development] wietse1988:
I had some problems at first, this is what I did:

Flashed stock 5.0.1 factory image with wug's toolkit.

Booted it, enabled developers options and enabled adb

Then used wug's toolkit to flash a boot.img which doesn't force encryption.

Then booted it, and it wasn't forced encrypted annymore.

After that I restored my cm backup with franco kernel, and everything was setup again, only without encryption. Phone feels snappier now
[Nexus 6 Android Development] mardiie:
Hi!

I've been using your awesome fix since day one and it's just great. So thank you very much! With the new 5.1 update approaching I'm scared to be stuck on a encrypted phone again since I've seen there is also a boot.img attached to the update (at least on the other devices ) will you be releasing a updated version of your fix or would it be possible to just keep this boot.img flashed and only flash system? ( I doubt it )

Thanks in advance!
[Nexus 6 Android Development] charesa39:
I wouldn't worry about it. I'm sure there will be an updated boot.img uploaded here as soon as the factory image becomes available on Google's webpage. When I updated from 5.0 to 5.0.1, I just manually flashed all the image files (EXCEPT USERDATA), and replaced the stock boot.img with the modified "boot-501-noforceencrypt.img" provided here. Worked like a charm. :good:
[Nexus 6 Android Development] cam30era:
[MENTION=2632235]bbedward[/MENTION],

It would be very much appreciated is you could post an unencryption kernel for Android 5.1.
[Nexus 6 Android Development] bbedward:
Hi, I will but I don't see the 5.1 factory image up yet. I usually pull it from that.
[Nexus 6 Android Development] cam30era:
Can't pull it from the 5.1 OTA file?

http://xdaforums.com/nexus-6/general/ref-nexus-6-stock-ota-urls-t2906493
[Nexus 6 Android Development] purian23:
Images on android developers will be live less than 12hrs most likely. It's on it's way!
[Nexus 6 Android Development] cam30era:
This is a great service that you do for the community.
[Nexus 6 Android Development] vivithemage:
please do this good sir!

shamu LMY47D from LRX22C

http://android.clients.google.com/p...ed-shamu-ota-LMY47D-from-LRX22C-fullradio.zip
[Nexus 6 Android Development] @home:
What is the zip file? 5.1? If so in what form?
[Nexus 6 Android Development] purian23:
LOL ... I don't work well with pushy demanding a service for FREE people. My bad :)

The 5.1 OTA file update. You could manually flash recovery/bootloader stuff with this OTA in Fasboot to get the update on your device.
[Nexus 6 Android Development] vivithemage:
Look at the URL, it is from google.

Found the link from android police:

http://www.androidpolice.com/2015/0...gs-android-5-1-ota-roundup-for-nexus-devices/

If someone was to sideload the OTA via: adb sideload [OTA file].zip

would we lose all of our data when it boots and re-encrypts it?
[Nexus 6 Android Development] @home:
I'm rooted with stock recovery & bootloader. How do I flash the zip file you have provided?
[Nexus 6 Android Development] cam30era:
Thank you very much!
[Nexus 6 Android Development] purian23:
Check out the guided here from the Android Police, it's dated but should still be okay for the current application. You should be able to retain your data as well, but I can't guarantee it 100%. The OP will update this thread when he can with the updated mods and explanation.

Edit: You can also check out this YouTube video created for 5.1 too.

https://youtu.be/Ir-V1ONC6HI
[Nexus 6 Android Development] vivithemage:
I think i'll wait for that, thanks :)
[Nexus 6 Android Development] efrant:
[MENTION=2632235]bbedward[/MENTION] LMY47D factory image is now available: https://developers.google.com/android/nexus/images
[Nexus 6 Android Development] vivithemage:
If you could help us noobers out who unlock, rooted, and disabled encryption with your generous knowledge, could you post a quick write up on what we need to do to upgrade?

She is live! https://dl.google.com/dl/android/aosp/shamu-lmy47d-factory-6c44d402.tgz
[Nexus 6 Android Development] @home:
There is only one tar file in that zip file,so how to flash?
[Nexus 6 Android Development] ohhdavid:
The flashable images are in the tar file. You need to use fastboot, you can't flash in recovery. If you don't know how to use fastboot you should read up before doing it because you can seriously mess stuff up.
[Nexus 6 Android Development] XorZone:
5.1 boot image force encrypt disabled

And as before:

Disabled force encrypt in 5.1 (lmy47d)

only change is forceencrypt->encryptable in fstab.shamu
[Nexus 6 Android Development] Evo_Shift:
Is the boot.img easy to modify yourself? I kind of forgot about the modified boot.img but now I have flashed everything up to that point. I'd rather not have to do this all later if it is something I can modify myself before flashing. Otherwise I guess I'll be doing this all again later...

Anyone have a link to instructions for modifying it?

Edit - Damn XorZone did it already right above this post, LOL. Awesome.
[Nexus 6 Android Development] bbedward:
Posted updated image in OP :good:
[Nexus 6 Android Development] vivithemage:
Thanks! What do we do to upgrade from 5.0.1 to 5.1 exactly and keep the unencrypt?
[Nexus 6 Android Development] beelow319:
so when we upgraded from 5 to 5.01 I did the following and kept data\no encrypt....i think it should be the same now...somebody please correct me if im wrong. Just use current files.

1) type fastboot flash bootloader bootloader-shamu-moto-apq8084-71.05.img

2) type fastboot flash radio radio-shamu-d4.0-9625-02.55.04.img

3) type fastboot reboot-bootloader

4) type fastboot flash recovery recovery.img

5) type fastboot flash boot boot-501-noforceencrypt.img

6) type fastboot flash system system.img

7) rebooted and am now on 501
[Nexus 6 Android Development] scandalousk:
So can someone bench the flash mem again before they remove the encryption and see if there is a noticeable difference in performance compared to the previous 5.x.x builds. Someone benched it here http://xdaforums.com/showpost.php?p=59382428&postcount=243 and the improvement seems to massive compared to what it was before.

Is removing encryption even necessary now?
[Nexus 6 Android Development] bbedward:
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.
[Nexus 6 Android Development] vivithemage:
I was with option 3 before, so thanks!

exactly what I did last time, i'll make note of this so I do not have to ask again. on new builds.
[Nexus 6 Android Development] ipfreelytech:
encryption is a nightmare for trying to use a custom recovery.
[Nexus 6 Android Development] scandalousk:
How's that, TWRP ran just fine even when I had my phone encrypted, did I overlook something?

I thought the foremost reason people removed encryption was for the possible performance gain.
[Nexus 6 Android Development] ipfreelytech:
Maybe I didn't put enough effort into caring; but when I first got my N6 and tried my usual process of unlocking the bootloader, flashing TWRP and then attempting to flash SuperSU.zip it did not work. TWRP was unable to mount the data partition because it was encrypted. Even stuck the phone in a bootloop. Had to flash the modified boot.img featured here and format data using fastboot.

Between that and the performance hit you take with encryption I just decided it was easier to roll without encryption.

Encryption is a hassle. It always has been and always will be. Your'e taking your data and ciphering it into garbage, that means that to work with the data you have to decipher it using a key. There are various ways of attempting to make that process transparent to the user, but it's still there and a thing. My policy is to not encrypt data on any device that I don't have an absolute need to. Otherwise I'm just making data recovery/migration that much harder for myself.
[Nexus 6 Android Development] bbedward:
In the early days I think there were some hiccups.

No issues with it now as far as I know. But hey for the little performance gain it's all worth it. Why not take all the extra you can get if you don't care about encryption.
[Nexus 6 Android Development] @home:
I've flashed the latest file but my device still says encrypt phone - Encrypted.

Where did I go wrong?
[Nexus 6 Android Development] xdatastic:
Factory reset to remove encryption (it will obviously wipe the device)
[Nexus 6 Android Development] @home:
I have just flashed 5.1 in a way so i didn't have to rest & start from scratch.

Is there no other way?
[Nexus 6 Android Development] xdatastic:
If its encrypted, the only way to remove the encryption is to wipe.
[Nexus 6 Android Development] maxamus007:
Im on stock 5.1 and just flashed the 5.1 no-force kernal but phone is still saying encypted.

Also did a factory reset after flashing the new kernal and still says the same...

Any help?
[Nexus 6 Android Development] @home:
Phew that saved me disappointment.

So how do we get decrypted?
[Nexus 6 Android Development] sgloki77:
if you were encrypted before the flash you need to format user data, were you encrypted or non-encrypted before the flash?
[Nexus 6 Android Development] maxamus007:
I was non-encrypted before the flash
[Nexus 6 Android Development] sgloki77:
wow man that sucks, try do it again but format user data , maybe you can disable the encryption, you will lose your data though so back it up first

fastboot flash boot boot_noforceencrypt.img
fastboot format userdata
fastboot reboot
[Nexus 6 Android Development] maxamus007:
Im using Wugs toolkit to flash it using the Fastboot Flash "Boot Kernal" and then choosing the image and then it does it thing.....
[Nexus 6 Android Development] sgloki77:
I'd suggest to never use tool kits, you don't know wtf its doing, run the commands on a terminal with fastboot/adb, I was going to flash the 5.1 factory image manually with fastboot but now I'm having second thoughts, I guess I'll wait a little for someone who used the SDK to report first
[Nexus 6 Android Development] beelow319:
I just finished up flashing everything with fastboot with Zero issues. Kept data and no forced encrypt.
[Nexus 6 Android Development] efrant:
It works fine. Flash the bootloader, radio, and system img files from the factory image, and the boot image from this thread, and "fastboot format cache" and "fastboot reboot". Done.
[Nexus 6 Android Development] xdatastic:
[MENTION=2632235]bbedward[/MENTION] what method\tools do you use to modify the boot.img?
[Nexus 6 Android Development] maxamus007:
Tried again using fastboot and it worked :good:
[Nexus 6 Android Development] pc747:
that worked for me.
[Nexus 6 Android Development] bbedward:
If you are already un-encrypted and update using this boot.img and notice you are encrypted afterwards then you did something wrong, it is not the fault of what is posted in the original post :good:

I posted how to update from 5.0/5.0.1 to 5.1.0 a few posts back, for anybody who isn't sure. You can retain all data and not become re-encrypted.

I use these tools here:

http://xdaforums.com/showthread.php?t=2319018
[Nexus 6 Android Development] bahnburner:
Thank you for this. This is the method I've always used in terminal, but I started getting a little concerned with everyone having issues using tool kits. I'm glad you confirmed that flashing without formatting *the proper way* still works as expected.
[Nexus 6 Android Development] bikeryder007:
Thanks bbedward! It works great. Earlier today I flashed the stock images for a full wipe and of course was encrypted afterwards. So, I flashed twrp and then used twrp to flash your IMG file. Then I formatted data inside twrp, and now I am not encrypted. Just wanted to post this in case anyone can use it.
[Nexus 6 Android Development] bbedward:
Disabling encryption still increases SQL inserts/delete and sequential I/O reads - as it did in 5.0

That being said personally I can't tell the difference in using the device with and without encryption, maybe if they were side-by-side - but going from encryption to no encryption I didn't "feel" like my N6 was faster.

Logically speaking - we know for a fact that the I/O is faster without encryption - as you would expect on a sw-layer encryption there's additional processing when retrieving blocks of memory whatever.

So to me or anybody who doesn't care about using the encryption feature of android - why not disable it for some speed gain. It's slightly more than negligible so i'll take all I can get.

Btw, I did these for anybody curious:

Androbench on 5.1 w/ encryption:

https://www.dropbox.com/s/h84vqzpuah373rl/download_20150312_233451.png?dl=0

Androbench on 5.1 w/o encryption:

https://www.dropbox.com/s/3uodk7oa7piidn1/Screenshot_2015-03-12-18-26-03.png?dl=0

Assuming AndroBench is correct (seems pretty consistent on both cases, i didn't do extensive testing in any other fashion though)

Reading adjacent blocks of memory is at least 35% faster without encryption

Reading random blocks of memory is at least 15% faster without encryption

Assuming lots of apps are reading pretty small amounts of data at a time - as small as in a few hundred kb or even a few Mb it's pretty obvious why you wouldn't be able to tell one way or another. But I remain that 35/15% is not an insignificant speed up.
[Nexus 6 Android Development] droidrev71:
what chipset does yours have?
[Nexus 6 Android Development] bbedward:
SanDisk, but I would imagine the positive trend holds true for all the emmc chips. It is a software process that we are eliminating to speed it up.
[Nexus 6 Android Development] efrant:
Here's another analysis from the guys over at AnandTech: http://www.anandtech.com/show/8725/encryption-and-storage-performance-in-android-50-lollipop (was done with 5.0 when the N6 just came out).
[Nexus 6 Android Development] sgloki77:
hey guys I'm stuck in a bootloop flashing the non-ecrypted image...

here is what I did

[B]fastboot flash bootloader[/B] bootloader-shamu-moto-apq8084-71.08.img
[B]fastboot flash radio[/B] radio-shamu-d4.0-9625-02.95.img
[B]fastboot reboot-bootloader[/B]
[B]fastboot flash boot[/B] boot_noforceencrypt.img
[B]fastboot flash system[/B] system.img
[B]fastboot format cache[/B]
[B]fastboot reboot[/B]

device boots after the swirling dots and the android logo

then it says

when it gets to the last app it juts reboots again

I CAN access both TWRP and bootloader mode, but I dont like this :(

any ideas hot to fix it, I'd appreciate any help
[Nexus 6 Android Development] bbedward:
What rom are you coming from? You may have to do a full wipe (fastboot format userdata)
[Nexus 6 Android Development] sgloki77:
ROM is chroma/franco kernel do you mean fasboot flash userdata userdata.img the whole thing or just add format user data?

do I need to format cache also, or flash cache?
[Nexus 6 Android Development] bbedward:
format userdata will wipe all your data, since you can get to twrp you can back it up if needed.

Don't need to flash cache or userdata., but you could try formating cache and dalvik cache before wiping userdata
[Nexus 6 Android Development] sgloki77:
I'm gonna go ahead and flash the whole image except the recovery partition, and I'll use you non-encrypted boot.img to stay non-encryped

let me know if this template looks good to you

fastboot flash bootloader bootloader.img
fastboot flash radio radio.img

fastboot reboot-bootloader

fastboot flash system system.img
fastboot flash userdata userdata.img
fastboot flash boot non-encryptedboot.img
fastboot flash cache cache.img
fastboot reboot
[Nexus 6 Android Development] Sultan of Speed:
Just wondering - If I have flashed the unencrypted boot image, I suppose I will still receive the OTA.

Assuming I receive the OTA (can someone confirm that if we will receive the OTA), if I go ahead with the OTA installation, will it corrupt the file-sys & screw up the phone leading me to do a complete stock installation? Or will the OTA installation go on just fine? Or will the OTA installation abort due to user modified current boot image?

Has anyone come across this? I'm talking with reference to the 5.1 OTA's that is in the air right now.
[Nexus 6 Android Development] Chad_Petree:
I still don't really get it , where would this affect the performance of the phone ? Reading speeds affect the phone on apps and writing speeds only when we save big chunks of data like saving music files to the phone or when were downloading apps ? I don't imagine encryption is gonna make the phone slow when we save our progress in a game for example
[Nexus 6 Android Development] bbedward:
It only really has an impact on reads not writes, at least a bigger impact because sql modifications are faster too, almost twice as much.

I can't tell you how it affects app performance or anything, all I can tell you is it is faster there's no debate about it. The margin is sometimes significantly faster.

Probably encrypted version is fast enough for nobody to notice, maybe if you had two side by side you could tell on real performance.
[Nexus 6 Android Development] Chad_Petree:
I (foolishly?) kinda expected google to back track on software encryption and find a solution without having to wipe people's phones to make the phones switch to an optional hardware encryption but probably they didn't want their customers to lose their data , or thought it was to inconvenient to ask them to backup their files , still I'm disappointed but like you say with a device side by side it would be easier to notice and that's not something a lot of people have
[Nexus 6 Android Development] bbedward:
If nothing else it's a "why not" thing. The device is faster without it, where or when you notice it I real usage is up to debate (there used to be some guys showing nexus 5 loaded apps faster etc)

But for someone like me, I don't care about encryption features so why not disable it. Get all the boost I can out of my device.
[Nexus 6 Android Development] Chad_Petree:
I do care about encryption but not at the cost of performance so until we get a more polished hardware solution I'm gonna disable it [emoji2]
[Nexus 6 Android Development] sgloki77:
this is embarrassing, downloaded the wrong boot image, should be bootimg_noforceencrypt_lmy47d.img peace has been restored to the galaxy

[B]fastboot flash bootloader[/B] bootloader-shamu-moto-apq8084-71.08.img
[B]fastboot flash radio[/B] radio-shamu-d4.0-9625-02.95.img
[B]fastboot reboot-bootloader[/B]
[B]fastboot flash boot[/B] [B][COLOR="Red"][B]boot_noforceencrypt.img[/B][/COLOR][/B]
[B]fastboot flash system[/B] system.img
[B]fastboot format cache[/B]
[B]fastboot reboot[/B]

again
[Nexus 6 Android Development] mardiie:
Lol im so sure i clicked the correct link..

So i had the wrong version aswel, completely formatted my phone just now, but this explains.

I have no idea how this happened since i'm sure i pressed 5.1.0 :eek: