To encrypt or not to encrypt?

Search This thread

u42671

Senior Member
Sep 30, 2015
69
27
In case you are also wondering if you should enable the Android device encryption for your Moto G 2015 and are unsure about the performance impact here are some benchmark results with device encryption disabled/enabled.

While all modern Snapdragon CPUs - including the Snapdragon 410 in our Moto G 2015 - have quite good hardware encryption support, there is unfortunately not much and also conflicting information available on the internet, to what extent the Android device encryption is actually making use of this dedicated encryption hardware.

Device used for benchmarking is the european 2GB RAM version of the Moto G with stock Lollipop ROM.

AnTuTu benchmark results are pretty much the same, no matter if device encryption is enabled or not.

Over several consecutive AnTuTu runs I'm getting overall scores between 24800 and 25000. Storage I/O result is between 2100 and 2200. Database I/O around 700.

With the storage specific AndroBench things look a bit different.

Without encryption:
SEQ RD: ~142 MB/s
SEQ WR: ~75 MB/s
RND RD: ~5200 IOPS
RND WR: ~8600 IOPS

With encryption enabled:
SEQ RD: ~73 MB/s
SEQ WR: ~73 MB/s
RND RD: ~5000 IOPS
RND WR: ~6500 IOPS

While according to AndroBench device encryption comes with a measurable performance penalty on our Moto G, mainly regarding sequential reads, I didn't notice a difference in day to day usage. At least with my usage pattern: web surfing, email, other office related stuff, playing videos and music, light gaming. Bootup time is a bit longer but as I rarely reboot the device this doesn't matter for me.
Regarding overall smoothness of the UI, app loading times, performance in games (e.g. Asphalt 8) or other apps like Google Chrome I didn't notice any difference whether encryption is active or not.
So I decided to keep the device encryption enabled (please note that on our Moto G, contrary to e.g. Samsung devices there seems to be no way to disable the encryption again except resetting the device to factory defaults!).
 

whitedragonz83

Senior Member
Aug 9, 2012
618
190
Awesome numbers. I have had encryption enabled since owning my Moto G3 due to Android for Work requirements. The only time I would even imagine I notice a delay, due to encryption, is with installing or updating apps. Otherwise, feels pretty smooth after 60 days uptime.
 

sensi277

Senior Member
Jun 25, 2013
221
88
127.0.0.1
Thank you so much for this. I've been looking everywhere for numbers like these. Glad to know that there's minimal real-world difference when using encryption.
 

mouse256

Member
Aug 8, 2010
42
12
Antwerp
Thank you so much for this. I've been looking everywhere for numbers like these. Glad to know that there's minimal real-world difference when using encryption.
Sorry to disappoint you, but that's not true.
I've used encryption on my phone for a couple of months, and it actually worked rather well in the beginning. But it became steadily slower and slower so I eventually went back to an unencrypted phone. What a difference!
 
Nov 6, 2014
37
7
Sorry to disappoint you, but that's not true.
I've used encryption on my phone for a couple of months, and it actually worked rather well in the beginning. But it became steadily slower and slower so I eventually went back to an unencrypted phone. What a difference!

Did you have to factory reset the phone or could you simply disable encryption without losing data?
 

cannondale0815

Senior Member
Apr 21, 2009
588
217
Factory reset. Afaik that's the only way to go from encrypted to non-encrypted.
It's more likely that the factory reset itself made your phone faster. Any Android phone I've had got slower over time due to apps and other remnants accumulating. I doubt your increasing performance issues were related to the encryption itself. Then again, we'll never know.

Sent from my Nexus 6P using Tapatalk
 

mouse256

Member
Aug 8, 2010
42
12
Antwerp
It's more likely that the factory reset itself made your phone faster. Any Android phone I've had got slower over time due to apps and other remnants accumulating. I doubt your increasing performance issues were related to the encryption itself. Then again, we'll never know.

Sent from my Nexus 6P using Tapatalk
True, the benchmark is not very fair.
The performance decrease after using encryption for a while was very drastic (it got very annoying), and I more or less reinstalled all the app I got as before the factory reset. Now I'm using it already for quite a longer time as I had it encrypted and it's still way faster.
Indeed it might have been a rogue app I had at the time, but I still suspect the encryption had a lot to do with it :cowboy:
 

gene.pavlovsky

Senior Member
Nov 29, 2012
52
21
It's possible to go back from encrypted to decrypted while keeping all your data intact.
Using TWRP recovery, boot into recovery, enter your encryption password, then make a backup.
After that do a factory data reset (somewhere in Settings).
Your userdata partition is now not encrypted.
Boot into TWRP again, and restore the backup. Done.

I found this out the hard way. On a CM13-based ROM, I set an encryption password separate from phone's PIN (using CM's `vdc cryptfs changepw password` command). So every time I booted my phone, it asked me this encryption password. TWRP worked fine with it, too.
I did a backup of my ROM, then wiped it to check some features in a couple of other ROMs.
While setting up another ROM, I've set up a PIN and stupidly checked "Require PIN to start device". After I was done checking this ROM, I wiped it and installed yet another ROM. When I booted it, it asked me for a PIN. But the PIN I've set up in the last ROM didn't work. I couldn't try with my old encryption password since the keyboard was in NumPad-only mode. I could still boot into recovery and my original encryption password worked there. Some articles I've found mentioned I should delete locksettings.db* and gatekeeper.*.key files from /data/system and all will be golden - did that with no effect. Wiping the phone from TWRP didn't do anything to fix things.
What I did next was: rebooted into bootloader, connected phone to my laptop, executed `fastboot erase userdata` from my laptop, after that rebooted into recovery and the encryption was gone. Restored my original ROM's backup and everything worked fine. Re-encrypted the phone later. Should be more careful with PINs next time...
 

Top Liked Posts

  • There are no posts matching your filters.
  • 6
    In case you are also wondering if you should enable the Android device encryption for your Moto G 2015 and are unsure about the performance impact here are some benchmark results with device encryption disabled/enabled.

    While all modern Snapdragon CPUs - including the Snapdragon 410 in our Moto G 2015 - have quite good hardware encryption support, there is unfortunately not much and also conflicting information available on the internet, to what extent the Android device encryption is actually making use of this dedicated encryption hardware.

    Device used for benchmarking is the european 2GB RAM version of the Moto G with stock Lollipop ROM.

    AnTuTu benchmark results are pretty much the same, no matter if device encryption is enabled or not.

    Over several consecutive AnTuTu runs I'm getting overall scores between 24800 and 25000. Storage I/O result is between 2100 and 2200. Database I/O around 700.

    With the storage specific AndroBench things look a bit different.

    Without encryption:
    SEQ RD: ~142 MB/s
    SEQ WR: ~75 MB/s
    RND RD: ~5200 IOPS
    RND WR: ~8600 IOPS

    With encryption enabled:
    SEQ RD: ~73 MB/s
    SEQ WR: ~73 MB/s
    RND RD: ~5000 IOPS
    RND WR: ~6500 IOPS

    While according to AndroBench device encryption comes with a measurable performance penalty on our Moto G, mainly regarding sequential reads, I didn't notice a difference in day to day usage. At least with my usage pattern: web surfing, email, other office related stuff, playing videos and music, light gaming. Bootup time is a bit longer but as I rarely reboot the device this doesn't matter for me.
    Regarding overall smoothness of the UI, app loading times, performance in games (e.g. Asphalt 8) or other apps like Google Chrome I didn't notice any difference whether encryption is active or not.
    So I decided to keep the device encryption enabled (please note that on our Moto G, contrary to e.g. Samsung devices there seems to be no way to disable the encryption again except resetting the device to factory defaults!).
    2
    It's possible to go back from encrypted to decrypted while keeping all your data intact.
    Using TWRP recovery, boot into recovery, enter your encryption password, then make a backup.
    After that do a factory data reset (somewhere in Settings).
    Your userdata partition is now not encrypted.
    Boot into TWRP again, and restore the backup. Done.

    I found this out the hard way. On a CM13-based ROM, I set an encryption password separate from phone's PIN (using CM's `vdc cryptfs changepw password` command). So every time I booted my phone, it asked me this encryption password. TWRP worked fine with it, too.
    I did a backup of my ROM, then wiped it to check some features in a couple of other ROMs.
    While setting up another ROM, I've set up a PIN and stupidly checked "Require PIN to start device". After I was done checking this ROM, I wiped it and installed yet another ROM. When I booted it, it asked me for a PIN. But the PIN I've set up in the last ROM didn't work. I couldn't try with my old encryption password since the keyboard was in NumPad-only mode. I could still boot into recovery and my original encryption password worked there. Some articles I've found mentioned I should delete locksettings.db* and gatekeeper.*.key files from /data/system and all will be golden - did that with no effect. Wiping the phone from TWRP didn't do anything to fix things.
    What I did next was: rebooted into bootloader, connected phone to my laptop, executed `fastboot erase userdata` from my laptop, after that rebooted into recovery and the encryption was gone. Restored my original ROM's backup and everything worked fine. Re-encrypted the phone later. Should be more careful with PINs next time...