yashsingh1/xdaforums huggingface dataset:
[Nexus 6 Android Development] noraef:
Yeah, I already went looking in the fstab ;)

So "encryptable" means you can opt to encrypt the partition from somewhere in the settings, should you decide you finally want that, while "forceencrypt" means it's automatically done on first boot? Could be nice, if so: maybe Google would include cryptography acceleration in a kernel from a future release. I saw some custom kernels for the Nexus 6 seem to take advantage of NEON instructions, to allow for some better crypto, for instance.

Also, as to "/dev/block/platform/msm_sdcc.1/by-name/metadata": is it where the encryption key (probably itself encrypted) is stored?

Well, anyway, only encrypting the user data is quite weak: with an unlocked recovery, it seems rather easy to install a keyboard sniffer, and get the encryption key passphrase next time the owner uses the phone, if what you're after is the data. Same thing once you're rooted, if one uses the PIN of the SIM: change the SIM, log on, install a keyboard sniffer, and wait for next time the owner inputs his PIN. Not sure I would even bother to encrypt just that, even with HW crypto. It's a nice feature for people not tinkering much, but for us, usually tinkerers and performance abusers, well... it's just better not to store anything sensible on something as casual as a phone.

Also, any problem removing the fstab encryption option altogether, if one is not interested at all (could prevent some very stupid prank, where someone would activate some sort of phone unlocking pass, together with encryption, on a swipe to unlock phone)?
[Nexus 6 Android Development] doitright:
Correct. System Settings --> Security --> Encrypt Phone.

I suspect that they will be enabling *hardware accelerated encryption* on a future/soon build. Qualcomm appears to (AFTER the initial availability of Nexus 6) have made the necessary source available on Code Aurura. It is split between three locations; kernel, vold, and device/qcom-common.

I honestly haven't looked at those details yet. I won't even have my nexus6 until Sunday night. HOWEVER, I don't think that google's implementation would have it stored on a partition that not all hardware even *has*. My Samsung Relay, for example, does not have a "misc" partition at all, yet it is equally encryptable as nexus 6.

You make a good argument. HOWEVER, the one thing it does, is protect you from unreasonable search by law enforcement. The state of the law in the US is quite peculiar, in that it has been made illegal to do anything to bypass an encryption... which is pretty silly since the purpose of the encryption is to make it impossible. Either way, evidence obtained through such illegal measures is inadmissible.

Now one thing to note; if you did keep the phone oem locked, then in order to install a touchscreen logger, you would have to unlock it, which would wipe userdata.

The problem is that you can't really *do* an encrypted /system partition on a phone, since that (and related) partitions must still function after a data wipe. It also needs to be able to boot far enough to actually ask for the password.

I believe that it could be removed altogether.

Edit: a lot of this really does fall under the "physical access" problem. Any time you lose physical control of a device to a hostile adversary, it must be assumed to be compromised if and when they return it to you. This assumption solves the problem of installing a key logger... which frankly, can be implemented in HARDWARE as well, removing the security of having a FULLY encrypted storage device, or secureboot, or whatever other crazy solution you can possibly imagine.

If you have NOT ever lost physical control of the device to a hostile adversary, then you can be certain that the contents of the device are as you intended, therefore the security code is safe and your data is protected.
[Nexus 6 Android Development] shabuboy:
Does anyone have the steps to follow using TWRP? Searched this topic but could only see some bits and pieces here and there...

I have phone rooted with TWRP already:

Nexus 6

Android 5.0

Baseband: MDM9625_104335.118.02.55.03R

Kernek Version 3.10.40-g72dfced

andriod-build@vpbs1.mtv.corp.google.com #1

Wed Oct 29 15:06:28 UTC 2014

Build #LRX210
[Nexus 6 Android Development] noraef:
Thanks, doitright. I get the "unreasonable search" argument for US law, but in France, it works in a rather different way. Customs agents, for instance, are basically allowed to search where they want, when they want (particularly if they make you stop on the road, where you most often encounter them, even as far as possible from any border), and anyway, should you refuse to hand your encryption key, you'll by default be assumed guilty of what you may be suspected, on top of getting the penalty for having refused to hand your keys (potential prison and huge fine)... There's no really "unreasonable search", here.

Anyway, you're right: with physical access, one can pretty much lay any trap. As I said earlier, much easier not to store anything really sensible on something as casual as a phone. Which is why I don't care much about encrypting those to begin with. I'll probably try to remove encryption altogether when I have my Nexus 6 (will order very soon, as I received the case and screen protector I was waiting for).
[Nexus 6 Android Development] eatonjb:
I don't understand this. what does "one that matches...."

I am currently using a rom that has the LRX22G, and I do not know how to decrypt it.

thank you
[Nexus 6 Android Development] noraef:
From what I understand, the files linked in the first post are whole boot partition files, aimed at being flashed through something like "flashboot flash boot boot.img". And in that partition are noticeably the kernel, initrd, and fstab files.

So if you install a file not corresponding to your ROM, the risk is installing a mismatching kernel or partition file. By installing the correct boot image for your ROM version, you ensure you do not install an older kernel, or such thing.

Now, as to decrypting it, I think you'll have to format your data partition (which implies backing everything up, if you don't want to lose it), for it not to be encrypted on next boot, once you flash your boot partition. If it already is encrypted, I don't think it can be decrypted as is.
[Nexus 6 Android Development] sam008:
Error - Unknown partition

I just got my phone and I'm on stock using build LRX22C. I completed unlocking and rooting procedures from the beginner's guide

C:\Android\Nexus 6\android-sdk\platform-tools>fastboot flash boot_noforceencrypt_lrx22c.img

unknown partition 'boot_noforceencrypt_lrx22c.img'

error: cannot determine image filename for 'boot_noforceencrypt_lrx22c.img'

Am I doing anything wrong here? I followed instructions - went into bootloader and executed this command. All my unlocking and rooting procedures were successful. I also tried after changing file name to boot.img and boot_noforceencrypt.img. Should I be using LRX22C or LRX21O

Thx
[Nexus 6 Android Development] noraef:
You forgot one instruction.

is the fastboot binary

you tell it to flash

what's going to be flashed is the boot partition - it's the argument you forgot

what you're going to flash the boot partition with

So the correct command would be:

note the added "boot" argument between "flash" and "boot_noforceencrypt_lrx22c.img"

As you wrote it, you're asking to flash a partition named "boot_noforceencrypt_lrx22c.img" which doesn't exist to begin with, hence why the message:

... and anyway, the argument for the image file to flash it with would be lacking, hence why the message:
[Nexus 6 Android Development] sam008:
lol too early in the morning for me ;)

After using the right command, in settings, if I click on Encrypt phone, it takes me to another screen describing encryption and offers me to encrypt my phone (different behavior from before). Should I conclude the phone is in a decrypted state now?

Thx
[Nexus 6 Android Development] tatinek2:
Stupid question. Is my cellphone decrypted? Figure in the Annex. I managed to do it?
[Nexus 6 Android Development] digitheatre:
it is N6. someone from reddit http://www.reddit.com/r/nexus6/comments/2mufbm/huge_improvement_on_benchmark_scored_after/
[Nexus 6 Android Development] italia0101:
Holy crap, yea just read the entire post and comments, looking good! people are getting 270 MB/S and up!

---------- Post added at 10:00 AM ---------- Previous post was at 09:39 AM ----------

Heres another pretty damn high result : http://imgur.com/kce0rHO
[Nexus 6 Android Development] izx:
Yes. Encryption is at the device level and not file(system) level. Pull the entire TiBu folder off, "un"-encrypt the phone, copy it back and restore.
[Nexus 6 Android Development] ejkeebler:
I know OP doesnt have a device (which is a shame) but is there any chance any way that this might even in the slightest improve battery life? My dumba$$ thought process being faster write speeds = less cpu time = more battery life? Battery life truly is my only concern leaving the OnePlus....
[Nexus 6 Android Development] Evo_Shift:
Awesome. So, I am assuming come OTA time we'll have to wait for the new factory images to be released, the boot.img to be patch and we will swap that out for the patched one before updating. Doesn't seem too bad for what you gain especially if encryption isn't important to you.
[Nexus 6 Android Development] hsj1906:
How can I tell if this worked?
[Nexus 6 Android Development] dwang:
Run androbench from the play store.

If your sequential reads are in the 200-300mb range then the phone is unencrypted.
[Nexus 6 Android Development] robikonobi:
Androbench results are not reliable (yet) in lollipop. See anandtech's latest analysis which shows that nexus 6 sequential read without encryption is 131mb/sec.

http://anandtech.com/show/8725/encryption-and-storage-performance-in-android-50-lollipop
[Nexus 6 Android Development] dwang:
So what. The guy was asking how to verify that the phone is unencrypted.

The androbench results between encrypted and unencrypted are dramatic regardless of whether its reliable or not.
[Nexus 6 Android Development] robikonobi:
Fair point to know if encryption has been turned off. I was merely pointing it out so people are not getting the impression that they are getting 300 mb/sec read speed when the reality is actually half of that. Nonetheless, performance is exponentially improved without encryption.
[Nexus 6 Android Development] ejkeebler:
so the androbench results show roughly 3x faster after unencryption from about 60 - 180mb/s and the andebench software showed roughly 3x faster as well? so it's roughly 3x faster but it's likely not fast as what androbench shows?

And also Anandtech claims it had no performance increase in the UI and the lags still remain which is contradictory to what users are saying after doing this. So I guess for me this comes down to the post battery test, if disabling FDE really does increase battery life, then I'll probably do it, if not, I guess I skip it. I imagine the lag is really not noticeable to me, played with one at the store and didn't notice anything opening and closing apps even for the first time, i think the lag is a bit over analyzed.
[Nexus 6 Android Development] dwang:
There are likely variations in the nand as well. I was only able to get 200mb read speeds on my n6.

I also notice much less lag on my phone.

But lag is very subjective, I'm pretty sensitive to it, but others may not notice any improvement.
[Nexus 6 Android Development] ejkeebler:
Apparently its very noticeable in google calendar and the google messaging app, scrolling through them should reveal frame drops, etc.?
[Nexus 6 Android Development] dwang:
I haven't noticed any lag w the calendar app encrytped or unencrypted. I use hangouts for messaging.

The calendar app has always been super smooth and I have a ton of appointments every day in my calendar.

Edit: I primarily use the day view and its super smooth. I tried the schedule view and I do notice some stutter there.

I have noticed improvements in lag in the browser, Google plus, bleacher report, and Tapatalk.
[Nexus 6 Android Development] tmhiott:
Followed the instructions in OP, flashed recovery and now i'm on a bootloop where the teamwin splashpage just keeps coming up. I guess i need to reflash factory images?
[Nexus 6 Android Development] slh7d:
So, there is a new factory image coming down the road soon, I am assuming this will have to be re-done?
[Nexus 6 Android Development] jeffreii:
Thanks for pointing this out. I knew those numbers in Androbench looked incredibly high...turns out they are not accurate, even if they do give a fair comparison between speeds, assuming all results are on Android 5.0.

Anandtech chose to use AndEBench for their results, and said they were more accurate.

Fact is, encryption disabled = faster performance. Battery life to be determined. Real world performance still questionable. Anandtech also pointed out that the performance issues they saw in their review were not eliminated by disabling encryption.
[Nexus 6 Android Development] chancy319:
Is there any chance that Google will disable this automatic encryption?
[Nexus 6 Android Development] akellar:
Real world performance is perfectly fine. Even encrypted.
[Nexus 6 Android Development] jeffreii:
Seems pretty good to me too but every review has pointed out performance issues and I've only had mine for about 18 hours now...no full week of testing yet. It would seem that those significant increases in performance must have some effect....it's not like a 15% increase that you would likely rarely notice in the real world.
[Nexus 6 Android Development] noraef:
sam008 & tatinek2: it seems you're decrypted, as people in the thread have said encrypted phones should have "encrypted" displayed under "settings>security>encryption", but I actually don't even have the phone yet (will only order it this evening), so I can't tell you more than this.
[Nexus 6 Android Development] PunishedSnake:
Will disabling encryption prevent OTA updates?
[Nexus 6 Android Development] drawde40599:
Anything that modifies the ROM will make OTA fail with lollypop, so since this is a different Boot.IMG most likely it will fail , but it takes 2 min to Fastboot the stock boot.IMG so no big deal
[Nexus 6 Android Development] davanw:
I'm getting a Permission Denied error. Can anyone make a suggestion? Thanks!

Phone is unlocked, rooted, running TWRP and Chroma ROM with Franco kernel.

Thanks in Advance!
[Nexus 6 Android Development] xdatastic:
Typo

fastboot flash foot boot.img
[Nexus 6 Android Development] davanw:
Oh geez. How did I not see that.

Thanks!
[Nexus 6 Android Development] xdatastic:
I thought it might have been a joke :)
[Nexus 6 Android Development] Sultan of Speed:
So, you tried to flash your own foot and you didn't get permission for it? :D

Sent from my Nexus 6
[Nexus 6 Android Development] doitright:
Sortof.

Your phone is not in a "decrypted" state... it is in a "non-encrypted" state.

You didn't go through a decryption process -- you just plainly wiped it, hence it is not "decrypted", it is just not encrypted.

But to answer your question, yes. That it is OFFERING TO encrypt it means that it is not currently encrypted.
[Nexus 6 Android Development] tatinek2:
Can I flash Franco kernel?
[Nexus 6 Android Development] drawde40599:
I'm assuming you mean after your decrypted ? Yes , yes you can
[Nexus 6 Android Development] LuffyPSP:
If i already have Franco kernel installed, will this affect anything? I want to decrypt this device. :D
[Nexus 6 Android Development] suku_patel_22:
Try a factory reset. It should do it
[Nexus 6 Android Development] Ryjabo:
I am upgrading to the Nexus 6 in a couple weeks.... will the performance difference be noticeable outside of benchmarks? The Nexus 5 isn't encrypted by default, I assume... so I am not worried about that. But I am curious if it's worth the hassle.
[Nexus 6 Android Development] wooddale:
Im thinking if your a gammer ya but every day life I font think so I'm just guessing haven't tried it yet.
[Nexus 6 Android Development] Ryjabo:
I am not a "gamer" on the phone. Lots of Redditing, watching videos (Youtube), and maybe a game occasionally sometimes if something really looks interesting, but I usually lose interest in the games really quick.
[Nexus 6 Android Development] wooddale:
I may try it I'm unlocked and on Chroma ROM and phone is really running sweat better than stock. He includes Franco's kernel and what I really like is you can get rid of regents which bugged the hell out of me.
[Nexus 6 Android Development] razorloves:
that will only work if he has stock recovery.

http://xdaforums.com/showpost.php?p=58231268&postcount=553
[Nexus 6 Android Development] mwebb34:
Can I disable the encryption using terminal Emu?
[Nexus 6 Android Development] Keep Walking Greece:
Keep Walking Greece rolled 5d5 and got: 13.

Sent from my GT-I9500 using Forum Fiend v1.3.1.
[Nexus 6 Android Development] wooddale:
Once you fastboot flash decrypt file in add is fastboot user data the next command you use to reset? Thanks.
[Nexus 6 Android Development] EternalAndroid:
Delete.
[Nexus 6 Android Development] mwebb34:
By keeping encryption enabled, that means all of my stuff is safe right?

I had to trim a micro vzw sim card from my G3 in order to activate my N6. Am I right on this, Verizon will only know I'm using a nexus 6 device if I call them on the nexus correct? If I need to call Verizon I can take out the sim and place it back into my G3. Iv already tested the sim,just to see if it works in my g3 and it does. Had my doubts.
[Nexus 6 Android Development] wooddale:
Lol Verizon knows your using Nexus as soon as you turn it on go into my Verizon it will either say Nexus or not a Verizon phone either way they know they don't really give a rats ass as long as they don't have to support it.There not God as much as they would like you to believe they are.
[Nexus 6 Android Development] mwebb34:
Oh,well....
[Nexus 6 Android Development] wooddale:
Don't give it a second thought you are paying them every month it is really none of there business what phone you are using if there bands are in the phone they had to approve it. Also if you go to a corporate dealer they will give you a sim card they can activate a sim on a display or any phone they got laying around like I said they are not God.
[Nexus 6 Android Development] mwebb34:
You're right its none of there business. I had a insurance clam on a HTC onemax so I sent it into assurion and they sent me a new onemax. I sent the damaged device back within a few days well within the 14 day limit. I keep the replacement for about a week then decided that I wanted to edge up. I went to Verizon retail store and picked up the G3. After about 2 weeks I started getting emails saying that I need to return the damaged device, I kept on getting emails from Verizon 1 about every 2 weeks for the last 3 months. There trying to charge me full price for the damaged phone. They admitted receiving the device in the aloted time frame. Every time I call them they assure me that I'm being credited back the amount there charging me,but there saying that its gonna take another 2 or 3 billing cycles, 'months'. I can't get any answer as to why there charging me for the device. Someone at Verizon is trying there best to screw me out a some money. I can't even pay my bill online anymore it won't let me because it says that I have a past due balance, so I have to call Verizon and pay over the phone. I'm soooo ticked off. I just wish they would fix what ever problem they created.
[Nexus 6 Android Development] lilbeast:
help! :) um im stuck in flash img file its says unknown partition ?
[Nexus 6 Android Development] Audaces:
Excuse me if I'm wrong, I generally flash rom > gapps >reboot > kernal > boot. But don't boot images (in general) include the kernal? So should I reflash my kernal after flashing the boot image?

Also which version of the boot image should I be using on a nexus 6?
[Nexus 6 Android Development] drawde40599:
A Boot.IMG is the kernel . These images are ONLY for thr N6 and you should use the latest from the OP, LRX22C =5.01
[Nexus 6 Android Development] clorbag:
I'm already rooted and unlocked and on a custom rom. How do I go about this install?

Do I need to wipe the entire phone and flash boot.IMG?
[Nexus 6 Android Development] purian23:
The OP describes the exact steps 1-9 on what's needed to achieve your question. Good luck.
[Nexus 6 Android Development] Novakingwai:
Can I do this after I flashed a custom ROM?

Do I just reflash the ROM after the procedure? My current build version is 220 test keys. Will that affect anything?
[Nexus 6 Android Development] shizkoff777:
I did but I used flashify after I booted my ROM then went into recovery and wiped user data then restored my SD card content from my compiter
[Nexus 6 Android Development] Novakingwai:
I did that now. Flashed via Flashify, went into TWRP and wiped "data", now rebooting. Is that correct?

I did this and a pop up keeps coming up "Unfortunately System UI has stopped"
[Nexus 6 Android Development] shizkoff777:
OK sorry you need to wipe factory reset and reflash the ROM your on and you'll be all good.sorry I did not remember that happened to me too
[Nexus 6 Android Development] Novakingwai:
Ok I went into recovery, factory reset then wiped system memory. Reflashed the ROM, Gapps, and SuperSU. Gonna see if it works now.

It's not working. Still showing as Encrypted.

Ok finally got it to work. Installed the unencrypted boot.img, then did a format. Everything was gone, had to put the ROM, Gapps, and SuperSU back on the phone. Then I flashed it all and I'm unecrypted.
[Nexus 6 Android Development] frescoraja:
I just want to thank OP for this. I was so disappointed with my nexus 6 coming from a nexus 5.. Performance was deplorable, so much lag and delay. Night and day difference for me on stock, rooted rom. Didn't do any benchmarks but it was kind of like going from a mechanical hard drive to an SSD. Boot times are way faster, everything is snappier and smoother.
[Nexus 6 Android Development] Novakingwai:
Am I missing something here? I used an encrypted Nexus 6 for about 2 days. I just unencrypted today, did some playing around with it, and I don't see a "night and day" difference.
[Nexus 6 Android Development] frescoraja:
Can only speak to my experience. I was appalled by the nexus 6 after bringing it home and installing my apps (around 200). Was going to return it and buy another nexus 5 before I found about the encryption and wanted to test out the results of decrypting. No more stuttering, apps open quickly, no more staticky rings/notification sounds, and recents menu loads up way faster. Battery life has improved subsrantially too. For me turning off encryption and factory resetting the devicd made a huge difference.
[Nexus 6 Android Development] Sultan of Speed:
Took the plunge, unlocked bootloader.

Before I went ahead & flashed the boot image, first checked the locking of bootloader. Found that on locking it back, it doesn't say "re-locked" like the earlier Nexus devices. It simply says Locked. Also observed that when you go from unlocked to locked, the device seems to wipe all your data.

Then went back to unlocked state. Flashed the LRX22c.img file. After flashing boot, I simply formatted userdata. Then let it boot up once. Went back to bootloader and locked the bootloader. This wiped all my data once again. Then I booted back and setup the whole thing. And could verify that the system is now in an un-encrypted state. I could see the "Encrypt phone" enabled.

So, just hoping that me locking the bootloader will now ensure that I get the OTA. I suppose time will tell. Also now need to see how well it performs....if there are any improvements or not.

But BIG thanks to the OP for this. Thank you!!
[Nexus 6 Android Development] efrant:
Whether the bootloader is locked or not has no bearing whatsoever on OTA updates. That being said, now that you have flashed a non-stock boot image, you will not be able to apply the next OTA update -- you will need to flash the factory images using fastboot.
[Nexus 6 Android Development] Chad_Petree:
So that means we will lose all of our data when we flash an update? :confused: