[DISCUSSION] Is unencrypted really faster in real-world usage? - Nexus 5X General

UPDATE:
I was able to get 2 units side-by-side again. This time both of them were encrypted. The difference was one was running the original MDA89E OS and the other was running the latest MTC19V OS.
I just did 1 simple test, I created a 238.5MB zip file of my Titanium backup directory.
On MDA89E (user partition encrypted) it took 6:39
On MTC19V (user partition encrypted) it took 1:01
This result along with the previous results that found virtually no difference between decrypted and encrypted on MHC19Q leads me to the conclusion that decrypting probably did see a performance boost on the original MDA89E software all the way up to probably MMB29V but from MHC19J onwards, up to at least MTC19V, there is virtually no real-world (rather than benchmark) difference between decrypted and encrypted.
I didn't have time to do more detailed testing on this phone as it needed to be returned.
----
So I have 2 5x's side-by-side running MHC19Q. Exact same software loaded, exact same system settings.
One has encrypted userdata. The other has decrypted userdata. Both have dm-verity (integrity checking for /system and /vendor) disabled.
I compare boot times and they are the same.
Then I compare taking 3 HDR+ camera shots and the speed is the same and the processing of HDR completes at the same time.
I start browsers on both and they come back the same time.
I tried starting Riptide GP2, Cut The Rope, and a offline GPS program I use. The games started maybe 0.25 seconds faster on the unencrypted phone. The GPS started the same.
I was surprised at how little difference, so I rebooted to make sure nothing was cached, and retried. Same results.
As an aside, I also compared boot times with bootloader locked stock encrypted with dm-verity enabled to decrypted with dm-verity disabled. Decrypted with dm-verity disabled might be 1 or 2 seconds faster for start up, but you get a 5 second delay with the Orange bootloader warning screen.
So I'm wondering what else to test to show off how fast decrypted userdata is? If there is a noticeable benefit on something I use often I'd probably end up keeping the userdata unencrypted.
I'm not interested in artificial benchmarks showing throughput.
For the record, I haven't experienced any lagginess on any of the configurations, encrypted or not, for my own usage patterns, even on the original MDA89E.
The camera is definitely faster to start up on MHC19Q over the one in MDA89E but only by about 0.5 second.
Standby battery time is the same whether encrypted or not. That is really dominated by whether you have wifi turned on all time (either on purpose or through android bug) or going to sleep and whether you have strong or weak cell signal.

From my personal experience.
I ran my N5X unencrypted for couple of months and then decided to encrypt to see if I experience a noticeable difference.
I didn't experience any noticeable difference so I decided to keep it encrypted and still have it this way. I think it's not worth it to bother with disabling forced encryption during every firmware update, especially when running stock kernel.

Pretty much same as everyone else i have talked to and my personal experience isn't any different.
One other test I am interested in, restoring a back up of stock rom. My 5X seems way slower restoring a back up in twrp latest than my n6 or 6P, anyone else have the same experience resorting back ups.
Or do sfhub can you run the test?
Thanks for the post!
Sent from my Nexus 5X using XDA-Developers mobile app

razrlover said:
One other test I am interested in, restoring a back up of stock rom. My 5X seems way slower restoring a back up in twrp latest than my n6 or 6P, anyone else have the same experience resorting back ups.
Or do sfhub can you run the test?
Click to expand...
Click to collapse
I don't have the side-by-side units anymore, but I'm guessing at the linux level if I did copied the system partition image to the data partition using dd I would notice a difference.
At the Android level I'm thinking the "extra" stuff Android is doing causes it to not be able to reach the full potential of the storage (even at the half speed the encryption has supposedly limited the storage to)
Kind of like putting a 550MB/sec SSD on an old computer with SATA2. It can probably only do 150MB/sec over the SATA2 (vs SATA3) interface, so even if you drop the SSD rate in half to 225MB/sec, while that looks bad on benchmarks, your old PC doesn't care because it can barely handle 150MB/sec.
I didn't do tests to prove this, so it is just a theory, but I did do some side-by-side comparisons listed above and I really can't effectively tell any difference between encrypted and decrypted userdata (for my usage)
I'm guessing the nandroid backups from TWRP would see some difference, but I don't do those often as the images are just getting larger and larger these days.

As an update, I left the unit unencrypted for about a month, but recently I discovered 2 downsides, which while minor, pushed me over the edge to re-encrypt the user partition.
With user partition un-encrypted (only tested MHC19J through MTC19T)
1) visual voice mail tab disappears from phone application if you reboot in airplane mode (this is on Project Fi)
2) USB OTG flash drive reader takes 2 inserts to recognize micro-sd card
These both have to do with delayed recognition of attached devices when user partition is decrypted. In the first case, upon reboot while in Airplane mode the SIM card is not detected, instead it says "No SIM card". When you have encrypted user, it detects the SIM card and says "No service"
For the second case, it detects the USB flash card reader, but not the microsd card in the reader. Upon second insert, it detects both. When user partition is encrypted, it detects both immediately.
These are detailed here:
http://forum.xda-developers.com/nexus-5x/general/resolved-visual-voice-mail-disappearing-t3391434
Also in re-encrypting the user partition I found it didn't work through Android "Settings" for my setup.
I have systemless root and TWRP 3.0.2-0. When you choose to Encrypt phone using Settings, it proceeds to reboot, but then gets stuck at the animation forever. I left it like that overnight.
I then held the Power button to reboot, expecting everything to be corrupted with a half way encryption, but to my surprise, the phone booted with no issues and the Settings still said it was un-encrypted.
I then went back and flashed stock boot and recovery, and rebooted the phone, allowing the standard "first boot" encryption to run. It took around 10 minutes, but everything encrypted fine with no data loss (I had around 15GB on the phone at the time, all backed up of course)

sfhub said:
I'm not interested in artificial benchmarks showing throughput.
Click to expand...
Click to collapse
When the difference is small you won't notice in daily activities, unless in a particular condition, one day, on one app that requires to process lot of data (reading/writing from disk) you will notice that it take some time if you have encryption. That's why the use of benchamark, they give you an indication of who is definetely faster (in many conditions faster just for 1 millisecond, sometimes faster than some seconds/minutes)!
You should test apps that write read / write lot of data, maybe like measure a heavy game start up, or measure an app that write for example mp3 tags in bulk mode to all mp3 of a huge album, etc.

sfhub said:
So I have 2 5x's side-by-side running MHC19Q. Exact same software loaded, exact same system settings.
One has encrypted userdata. The other has decrypted userdata. Both have dm-verity (integrity checking for /system and /vendor) disabled.
I compare boot times and they are the same.
Then I compare taking 3 HDR+ camera shots and the speed is the same and the processing of HDR completes at the same time.
I start browsers on both and they come back the same time.
I tried starting Riptide GP2, Cut The Rope, and a offline GPS program I use. The games started maybe 0.25 seconds faster on the unencrypted phone. The GPS started the same.
I was surprised at how little difference, so I rebooted to make sure nothing was cached, and retried. Same results.
As an aside, I also compared boot times with bootloader locked stock encrypted with dm-verity enabled to decrypted with dm-verity disabled. Decrypted with dm-verity disabled might be 1 or 2 seconds faster for start up, but you get a 5 second delay with the Orange bootloader warning screen.
So I'm wondering what else to test to show off how fast decrypted userdata is? If there is a noticeable benefit on something I use often I'd probably end up keeping the userdata unencrypted.
I'm not interested in artificial benchmarks showing throughput.
For the record, I haven't experienced any lagginess on any of the configurations, encrypted or not, for my own usage patterns, even on the original MDA89E.
The camera is definitely faster to start up on MHC19Q over the one in MDA89E but only by about 0.5 second.
Standby battery time is the same whether encrypted or not. That is really dominated by whether you have wifi turned on all time (either on purpose or through android bug) or going to sleep and whether you have strong or weak cell signal.
Click to expand...
Click to collapse
Right on, it has no real-world difference similar to modifying the kernel, just a PITA to go back and forth every time there is a new release.

this discussion is making me consider encrypting my data partition again via the security->encrypt phone menu.
if i backed up my current system via TWRP to external storage prior to encryption, would i be able to restore it on top of the encryption?

Damn it! I decrypted but today I flashed PA rom and it got encrypted again
Do I need to format data always when flashing??
When I had decrypted, I didn't notice better battery. But maybe a slightly fastness improvement. Or maybe placebo. But I don't mind losing encryption
Sent from my Nexus 5X using Tapatalk

andQlimax said:
When the difference is small you won't notice in daily activities, unless in a particular condition, one day, on one app that requires to process lot of data (reading/writing from disk) you will notice that it take some time if you have encryption. That's why the use of benchamark, they give you an indication of who is definetely faster (in many conditions faster just for 1 millisecond, sometimes faster than some seconds/minutes)!
You should test apps that write read / write lot of data, maybe like measure a heavy game start up, or measure an app that write for example mp3 tags in bulk mode to all mp3 of a huge album, etc.
Click to expand...
Click to collapse
As I mentioned, I understand benchmark differences. I only care about differences I will notice in everyday use. I don't really care about running un-encrypted so that a benchmark runs fast or something somebody else uses, but I never, or almost never, use will run slightly faster.
For what I do use, I tested offline GPS apps which load lots of data. I tested Riptide GP2 which loads a decent amount of data. Basically everything I tested from within Android had so little difference (if any) that it wasn't noticeable. I am talking .25 second at most.
You probably will notice if you write to a file directly using dd, for example if you are doing image backup of system, but I really don't do this stuff daily. I might do it only once when I first get the phone to preserve the factory images.
Anyway, since the difference was so tiny and I noticed a separate problem of my visual voicemail tab disappearing on reboot related to encrypted user partition, I re-encrypted. The test I care about is if I am grumbling everyday about how slow things are and really I noticed zero difference.
I don't have anything against un-encrypted user as I ran that way for a month. I just really saw no benefit.
As a bonus my USB OTG flash reader gets recognized right away instead of requiring 2 inserts.
There is no way this encrypted vs un-encrypted setup is causing the huge slowdowns some people are experiencing. That is caused by something different, probably EMMC getting close to full or some Android bug.

2x4 said:
this discussion is making me consider encrypting my data partition again via the security->encrypt phone menu.
if i backed up my current system via TWRP to external storage prior to encryption, would i be able to restore it on top of the encryption?
Click to expand...
Click to collapse
Encrypt from Settings->Security won't work with TWRP and rooted boot.img. At least it didn't with MTC19T. I don't know if the problem is TWRP or boot.img but on the reboot after the Encryption plugin your phone warning/prompt the thing just hangs on the boot animation forever (I left it all night).
I ended up flashing stock boot.img and recovery.img, then letting the encrypt on first use routine go through. It took around 10-15 minutes. Then I flashed TWRP and supersu again. This is the only way I was able to re-encrypt and preserve my data.

sfhub said:
Encrypt from Settings->Security won't work with TWRP and rooted boot.img. At least it didn't with MTC19T. I don't know if the problem is TWRP or boot.img but on the reboot after the Encryption plugin your phone warning/prompt the thing just hangs on the boot animation forever (I left it all night).
I ended up flashing stock boot.img and recovery.img, then letting the encrypt on first use routine go through. It took around 10-15 minutes. Then I flashed TWRP and supersu again. This is the only way I was able to re-encrypt and preserve my data.
Click to expand...
Click to collapse
hmm wait, so there's no way to re-encrypt if you've already decrypted and you're using a custom rom?

Javi22 said:
Damn it! I decrypted but today I flashed PA rom and it got encrypted again
Do I need to format data always when flashing??
When I had decrypted, I didn't notice better battery. But maybe a slightly fastness improvement. Or maybe placebo. But I don't mind losing encryption
Click to expand...
Click to collapse
If the kernel you flashed has forceencrypt in the mount tables, it will encrypt upon first boot.
I was able to preserve unencrypted through various flashes by following this routine.
fastboot erase boot
fastboot flash boot boot.img
fastboot erase recovery
fastboot flash recovery twrp.img
[(re)boot into recovery from bootloader]
install SuperSU.zip
The key is never let an unknown status boot.img, where you aren't sure of the encryption status, boot on your phone.
If you always install SuperSU (even if not necessary) after flashing unknown status boot.img, then it will always patch the boot.img to remove forceencrypt and you'll never get re-encrypted.
You could replace any of the steps above with equivalent pre-patched kernels, etc.

sfhub said:
If the kernel you flashed has forceencrypt in the mount tables, it will encrypt upon first boot.
I was able to preserve unencrypted through various flashes by following this routine.
fastboot erase boot
fastboot flash boot boot.img
fastboot erase recovery
fastboot flash recovery twrp.img
[(re)boot into recovery from bootloader]
install SuperSU.zip
The key is never let an unknown status boot.img, where you aren't sure of the encryption status, boot on your phone.
If you always install SuperSU (even if not necessary) after flashing unknown status boot.img, then it will always patch the boot.img to remove forceencrypt and you'll never get re-encrypted.
You could replace any of the steps above with equivalent pre-patched kernels, etc.
Click to expand...
Click to collapse
Thank you! I will consider this next time

2x4 said:
hmm wait, so there's no way to re-encrypt if you've already decrypted and you're using a custom rom?
Click to expand...
Click to collapse
I don't know if it works with custom roms, I can only tell you what I experienced with the setup I described, originally stock MTC19T boot.img that went through systemless root setup via SuperSU and TWRP recovery.
I didn't experiment further to see if the problem was with TWRP recovery or with the systemless root boot.img so I can't tell you which one (or both) was causing the issue.
I imagine if your custom ROM is based on a stock kernel, you could LEAVE the custom rom system image in place, JUST flash stock boot.img and stock recovery.img, let the first boot encryption do its thing, then reflash your custom boot.img and twrp recovery.
That is what I did to get things re-encrypted and it was relatively painless after I figured out what to do.
Even if your custom ROM is not based on stock kernel, the same technique might work, because the encryption is done by the kernel prior to Android booting. Your custom ROM in this case, depending on why it is using a modified kernel, might not boot properly until after you replace the kernel it expects.
So in short, I think you should be able the encrypt, but probably not with Settings->Security

UPDATE:
I was able to get 2 units side-by-side again. This time both of them were encrypted. The difference was one was running the original MDA89E OS and the other was running the latest MTC19V OS.
I just did 1 simple test, I created a 238.5MB zip file of my Titanium backup directory.
On MDA89E (user partition encrypted) it took 6:39
On MTC19V (user partition encrypted) it took 1:01
This result along with the previous results that found virtually no difference between decrypted and encrypted on MHC19Q leads me to the conclusion that decrypting probably did see a performance boost on the original MDA89E software all the way up to probably MMB29V but from MHC19J onwards, up to at least MTC19V, there is virtually no real-world (rather than benchmark) difference between decrypted and encrypted.
I didn't have time to do more detailed testing on this phone as it needed to be returned.

For me, unencrypted is the way to go. I use my phone as my main music player, and audio tends to skip when I'm using my phone while listening to music on an encrypted setup. It's kind of a deal breaker for me tbh.

hmghmg said:
For me, unencrypted is the way to go. I use my phone as my main music player, and audio tends to skip when I'm using my phone while listening to music on an encrypted setup. It's kind of a deal breaker for me tbh.
Click to expand...
Click to collapse
Did you try that only on early OS releases?
I record and playback 1080p video with no skipping. 1080p video is much higher bitrate than audio so it would be surprising if encryption on the latest releases would cause skipping for audio.

sfhub said:
Did you try that only on early OS releases?
I record and playback 1080p video with no skipping. 1080p video is much higher bitrate than audio so it would be surprising if encryption on the latest releases would cause skipping for audio.
Click to expand...
Click to collapse
Yes, I have! I tried it on the latest marshmallow build. (Sorry, I forgot the build number)
If it works for you, I wonder what's wrong with mine...

hmghmg said:
Yes, I have! I tried it on the latest marshmallow build. (Sorry, I forgot the build number)
If it works for you, I wonder what's wrong with mine...
Click to expand...
Click to collapse
1) When you say "using your phone" what else are you doing when it starts skipping?
2) Which music app are you using
I'm pretty sure decryption of an encrypted user partition can easily handle the bit rate needed for audio playback if everything is being done in isolation, so there must be some interaction going on that causes what you are seeing.

Related

Nexus 6p not booting (running custom ROM)

A little bit of background.
Prior to this problem I was running dirty unicorns and elementalx kernel. Given that lately I had some freezing issues I decided that iro was time to update my ROM. Being the first time that I manually update a ROM and not having found anything online I thought (dumb decision) that all I had to do was to flash the most recent version. After I did that the phone did an app optimization (idk if that's how it's called, basically it optimised all the apps for the new version of the ROM) . After that the phone wasn't booting up, the dirty unicorns loading screen was running for half an hour and nothing happened so I restated the phone. When it asked for my sequence a message popped up "it looks like your vendor image is obsolete". The phone still wasn't booting up so I decided to restart once again and install the latest vendor image. After that the phone wasn't booting up so I decided to do a backup with twrp (version 3.0.0.0) and do a factory reset.
Plot twist the twrp decryption sequence (that worked 10 minutes before) now wasn't working so I had no way to access any of the phone's files.
Basically the phone won't turn on and I have no way of accessing it's files
I'd try a factory reset but there are some photos and whatsapp messages that are important to me and I'd rather not lose them.
Any tips?
Apologies for my terrible English
JustJohnItalia said:
A little bit of background.
Prior to this problem I was running dirty unicorns and elementalx kernel. Given that lately I had some freezing issues I decided that iro was time to update my ROM. Being the first time that I manually update a ROM and not having found anything online I thought (dumb decision) that all I had to do was to flash the most recent version. After I did that the phone did an app optimization (idk if that's how it's called, basically it optimised all the apps for the new version of the ROM) . After that the phone wasn't booting up, the dirty unicorns loading screen was running for half an hour and nothing happened so I restated the phone. When it asked for my sequence a message popped up "it looks like your vendor image is obsolete". The phone still wasn't booting up so I decided to restart once again and install the latest vendor image. After that the phone wasn't booting up so I decided to do a backup with twrp (version 3.0.0.0) and do a factory reset.
Plot twist the twrp decryption sequence (that worked 10 minutes before) now wasn't working so I had no way to access any of the phone's files.
Basically the phone won't turn on and I have no way of accessing it's files
I'd try a factory reset but there are some photos and whatsapp messages that are important to me and I'd rather not lose them.
Any tips?
Apologies for my terrible English
Click to expand...
Click to collapse
The best thing to do is this guide. http://forum.xda-developers.com/nexus-6p/general/guides-how-to-guides-beginners-t3206928/page384. Just go full stock without formating the internal. Flash twrp and see if you can get your photos. Next time back your photos up with Google photos if available in your area. Good luck
JustJohnItalia said:
A little bit of background.
Prior to this problem I was running dirty unicorns and elementalx kernel. Given that lately I had some freezing issues I decided that iro was time to update my ROM. Being the first time that I manually update a ROM and not having found anything online I thought (dumb decision) that all I had to do was to flash the most recent version. After I did that the phone did an app optimization (idk if that's how it's called, basically it optimised all the apps for the new version of the ROM) . After that the phone wasn't booting up, the dirty unicorns loading screen was running for half an hour and nothing happened so I restated the phone. When it asked for my sequence a message popped up "it looks like your vendor image is obsolete". The phone still wasn't booting up so I decided to restart once again and install the latest vendor image. After that the phone wasn't booting up so I decided to do a backup with twrp (version 3.0.0.0) and do a factory reset.
Plot twist the twrp decryption sequence (that worked 10 minutes before) now wasn't working so I had no way to access any of the phone's files.
Basically the phone won't turn on and I have no way of accessing it's files
I'd try a factory reset but there are some photos and whatsapp messages that are important to me and I'd rather not lose them.
Any tips?
Apologies for my terrible English
Click to expand...
Click to collapse
To update a ROM all you usually need to do is flash the newer version, but you also need to flash the newer vendor.img of the updated ROM is based on a newer Google build. Failure to do this is what caused the "it looks like your vendor image is obsolete" message to appear. I'm guessing you know this though as you went on to flash it later.
Not sure what happened with TWRP but you've done something else wrong at some point. Best idea (as pointed out above) is to flash the factory images. You can try it without formatting userdata in order to retrieve whatever it is that's important on your storage, but once you've retrieved whatever you need (if you even can) you'll need to format it because you really need to start fresh.

Normal (rooted) phone, went full retard all of a sudden. Need help extracting data

Hello all,
I have a Nexus 6P, stock, rooted, with Xposed installed. The phone is completely functional for the better part of its life time since I bought it at release -probably first or second batch- (except for random reboots once daily on average, deemed by my investigation and exhausting all options to be a hardware issue or Xposed related).
Today, out of nowhere, the phone randomly rebooted itself and surprisingly it launched the "Android is starting..." dialogue which, if I'm not mistaken, optimize apps for ART. The battery was at 19% before it randomly rebooted, so when it started that optimize apps it went down to 0 (I assume) and it turned off. The charger wasn't connected correctly so that happened. Now the phone keeps restarting itself up to before it gives me the boot up decryption phase of the Data partition and reboots again. I assumed it can't decrypt Data for some reason, so I launched TWRP recovery to try and decrypt data and take a backup copy of my Titanium Backup folder on storage... Unfortunately, TWRP reports "failed to decrypt data" even though I'm 100% positive that the pattern is correct because I'm literally inputting it almost 10-20 times a day for the past two years...
Note: there seems to be a red blinking LED in the top left corner of the the phone. I never even knew this existed.
WHAT I WILL DO
I'll reflash everything system-wise.. I'm ok with that. I'll reflash the factory images, root it, install Xposed, no problem.
WHAT I NEED HELP WITH
I need to extract some folders from my phone storage, namely the Titanium Backup folder. I know the pattern protection of the encryption.
How do I go about doing this?
UPDATE:
Help is urgently needed now indeed: The phone doesn't even turn on to bootloader mode anymore now. It was able to, just half an hour ago. Now all I see it the red blinking LED.
UPDATE2: https://support.google.com/nexus/troubleshooter/3337561?hl=en-GB#ts=3337942
I'll try in 30 minutes.
Meanwhile, please help me with my original problem; extracting data.
I was thinking, if I boot into bootloader mode, can I use adb to pull any folder? If so, will that work in my case with decryption fails or Data partition doesn't seem to mount correctly?
Relevent:
Reviewing some other threads:
TWRP: 3.0.2-2
Bootloader: UNLOCKED
I did NOT upgrade to Android 7.0 nor was I planning to, until Xposed is available.
I did NOT flash anything **new** recently. However, Installed an Xposed module yesterday which caused a bootloop. I rebooted into TWRP, uninstalled Xposed, rebooted into system (which looped once, out of the ordinary) and I uninstalled that module, back to TWRP installed Xposed, and rebooted back into system. It worked for 12 hours and then what I wrote this post for happened as stated above.
UPDATE3:
15 minutes into charging... NOT EVEN A RED BLINKING LED ANYMORE.
Last? UPDATE:
Almost 1 and a half hour into charging and there is no longer ANYTHING. Is it hard-bricked now?
How the **** is this possible? I'm very much capable of solving any sof-brick but not a hard-brick...
Thats a really crappy scenario. Im a little busy right now (not that I can get you out of this regardless) but I sort of skimmed through your post. Are you able to connect adb? If so you might be able to use "adb pull" to get that data.
On my 6p TB is located at:
/storage/emulated/0/TitaniumBackup/
Itll probably be the same location on your phone. Good Luck
KLit75 said:
Thats a really crappy scenario. Im a little busy right now (not that I can get you out of this regardless) but I sort of skimmed through your post. Are you able to connect adb? If so you might be able to use "adb pull" to get that data.
On my 6p TB is located at:
/storage/emulated/0/TitaniumBackup/
Itll probably be the same location on your phone. Good Luck
Click to expand...
Click to collapse
I was indeed able to connect to a PC after I saw the problem (the bootloop essentially)... But I didn't at the time as I didn't have a plan of action as to how to get my data, so I turned it off. After sometime, I couldn't do anything with the phone... Not able to boot into bootloader, not recovery, the phone is essentially not turning on to anything, not even the splash screen; like a hard-brick. I'm not sure if this indeed is a hard brick as I've never seen any.. and don't currently know what to try next.
Is the LED still showing? if so, do the bootloader boot combo, and see if fastboot devices gets a response in a command prompt - or terminal if you're a linux guy.
if so, you can boot to twrp, decrypt data - try default_password -, and browse the phone's files from your computer's file browser, the phone will show up as Nexus 6P. That's my suggestion, wish you luck.
TnT_ said:
Is the LED still showing? if so, do the bootloader boot combo, and see if fastboot devices gets a response in a command prompt - or terminal if you're a linux guy.
if so, you can boot to twrp, decrypt data - try default_password -, and browse the phone's files from your computer's file browser, the phone will show up as Nexus 6P. That's my suggestion, wish you luck.
Click to expand...
Click to collapse
I honestly declared it hard-bricked.
Will Fastboot show any devices if the phone didn't show bootloader screen?
I'll try again today.
Update:
Didn't work.
check out my post
[Guide] Fool/Noob proof way to do clean installs on Nexus Devices
http://forum.xda-developers.com/nexus-6p/general/guide-fool-noob-proof-to-clean-installs-t3518311

Increasing system storage with every update?

I tried searching for awhile and couldn't find anything too related to the exact question. Seems like with every update coming out storage shows the system taking up 1gb more than previous. Its as if it doesn't delete previous android versions. Its gone from 2.5gb few updates ago to now 5.6gb but the android updates are no more than 1gb. Its about when I started to notice this, 3 big updates ago all being around 1gb each.
My phone is completely stock, would a full stock flash delete everything and start the phone over? Also reading the general topic a few different methods mostly for unlocked bootloader., which one is the best for a locked bootloader? I was wanting to do this anyway because I have other unrelated issues with the phone such as gboard constantly crashing and photos not storing properly/overlapping eachother in memory that seems to happen with every update no matter what.
MadBullBunny said:
I tried searching for awhile and couldn't find anything too related to the exact question. Seems like with every update coming out storage shows the system taking up 1gb more than previous. Its as if it doesn't delete previous android versions. Its gone from 2.5gb few updates ago to now 5.6gb but the android updates are no more than 1gb. Its about when I started to notice this, 3 big updates ago all being around 1gb each.
My phone is completely stock, would a full stock flash delete everything and start the phone over? Also reading the general topic a few different methods mostly for unlocked bootloader., which one is the best for a locked bootloader? I was wanting to do this anyway because I have other unrelated issues with the phone such as gboard constantly crashing and photos not storing properly/overlapping eachother in memory that seems to happen with every update no matter what.
Click to expand...
Click to collapse
Before doing anything rash, you should probably start by clearing cached data @ Settings.>>Storage>>Cached Data. Also booting the phone to stock recovery and wiping the cache partition may help with any apps that are wigging out. Lastly, you really cannot "flash" anything with a locked bootloader. You can, and may later decide to wipe/factory reset from stock recovery. That would wipe your data and return your phone to the blank Android version you had installed last (7.1.2?) and yes, it would wipe/reclaim space, but you can do that manually without a factory reset. Before you go down that road make sure you enable the Google backup of your account so all your app/app data is saved. If you have photos, let Photos sync fully before the reset so your photos will be backed up to the Cloud. Also note that if you decide to unlock the bootloader (good choice) it will automatically perform a full wipe/factory reset. There is a sticky in General on how to do this.
v12xke said:
Before doing anything rash, you should probably start by clearing cached data @ Settings.>>Storage>>Cached Data. Also booting the phone to stock recovery and wiping the cache partition may help with any apps that are wigging out. Lastly, you really cannot "flash" anything with a locked bootloader. You can, and may later decide to wipe/factory reset from stock recovery. That would wipe your data and return your phone to the blank Android version you had installed last (7.1.2?) and yes, it would wipe/reclaim space, but you can do that manually without a factory reset. Before you go down that road make sure you enable the Google backup of your account so all your app/app data is saved. If you have photos, let Photos sync fully before the reset so your photos will be backed up to the Cloud. Also note that if you decide to unlock the bootloader (good choice) it will automatically perform a full wipe/factory reset. There is a sticky in General on how to do this.
Click to expand...
Click to collapse
Thanks for the input, but thats something I've been trying after every update already.
I found another site with clearer setup and instructions to do a stock flash with a factory rom and not OTA. Only reason why I had an issue with not wanting to unlock the bootloader was because im on windows 10 creators and it uses powershell now. So I had to figure out how to use fastboot/adb with powershell since cmdprompt wasn't the same. Doing a flash of a factory rom indeed fixed my gboard/photo storing overlapping issue that every ota update and factory reset through bootloader wouldn't solve.
Although my original question still remains, the system data in my storage is still 4.5gb with 7.1.2, better than the 5.5gb it was but I'm pretty sure its not supposed to be that big, any ideas why every update keeps taking up more space on the phone? The rom was even 1gb being flashed on the phone and I swear I remember the amount of space it took up when I first got the phone was around 2gb.
MadBullBunny said:
Thanks for the input, but thats something I've been trying after every update already.
I found another site with clearer setup and instructions to do a stock flash with a factory rom and not OTA. Only reason why I had an issue with not wanting to unlock the bootloader was because im on windows 10 creators and it uses powershell now. So I had to figure out how to use fastboot/adb with powershell since cmdprompt wasn't the same. Doing a flash of a factory rom indeed fixed my gboard/photo storing overlapping issue that every ota update and factory reset through bootloader wouldn't solve.
Although my original question still remains, the system data in my storage is still 4.5gb with 7.1.2, better than the 5.5gb it was but I'm pretty sure its not supposed to be that big, any ideas why every update keeps taking up more space on the phone? The rom was even 1gb being flashed on the phone and I swear I remember the amount of space it took up when I first got the phone was around 2gb.
Click to expand...
Click to collapse
I always flash a full images- not OTA... but I've always been unlocked on all my Nexus devices going back to the Galaxy. You cannot flash a full image without unlocking the bootloader but yet you say your bootloader is locked? For comparison, my untouched System is using 4.57 GB. I am running stock 7.1.2 ROM, rooted and EX Kernel.
PS...there is a toggle switch in Windows 10 settings to select command shell or powershell. It's as easy as a toggle to restore the command shell (or switch back).

h910 crashing, even after factory reset

UPDATE: Please read the next post.
A while back, I rooted my v20 with magisk using this method and everything worked fine for a few months, except for a few issues that reflashing the system would fix. Last night, SystemUI kept crashing (the status bar and the buttons would disappear). After a while, the phone crashed, and then it completely refused to boot. It would very rarely get to the lock screen, but it usually crashes soon after I unlock it. I tried everything I know of that could fix it, such as restoring the boot partition and reflashing magisk, reflashing the system partition, and wiping the cache and dalvik/ART cache. I eventually gave up with this and just reset it through the wipe menu in TWRP. I was able to get the phone to work for about a day without any issues, and then the same thing started happening again. It would take a really long time to boot and the system would crash. I tried using that ~1 minute it gives me before crashing to enable core mode in magisk to prevent any modules from loading, but that didn't do anything. I am really confused as to why this would happen considering that I reset the boot and system partitions multiple times in this process, and eventually did a full reset. It should be like a brand new phone. I really don't know what could possibly be the issue. Any help would be greatly appreciated.
Update: It turns out that Magisk Core Only Mode did not properly apply because of yet another crash. I cleared my cache once more, which gave me enough time to properly apply it, and now my phone is staying on and not crashing. But this still is concerning to me. I was able to run Magisk modules perfectly fine in the past, including after the most recent Magisk zip update, so why is it that I can no longer run modules, and that this issue persists after a factory reset? It can't be an update, because, as I stated, I was able to run modules just fine for at least a week before these issues occurred. Please correct me if I'm wrong, but this makes absolutely no sense and I want to be able to run modules again. I even deleted the modules through TWRP but the only thing that seems to fix this issue is completely disabling all other features via Magisk Core Only Mode.
Update 2: A Magisk update came out recently and I tried updating to that to see if it would fix the issue. This only brought back the original crashes. I tried using the Magisk uninstaller zip (because I found that simply reflashing Magisk isn't enough, there are other files which magisk uses to store data.) After doing this and reflashing Magisk, it worked for a little bit, but, me being me and wanting busybox installed, I managed to bring back the crashes. After that, uninstalling and flashing magisk would work, but only until a reboot. I am at a complete loss. I am currently backing up my internal storage (manually since TWRP doesn't) and I will try a full /data format.
Ok, it has been a few days since I wrote the previous section but I decided not to post it because if the /data format worked, I didn't want to have bumped it for no reason. At first, it worked, and I decided to leave it like that without rebooting it for a few days or messing with Magisk, and my phone worked perfectly. I had to restart my phone because Google photos was acting up, and it started crashing again. I am genuinely confused. I completely formatted my phone and reflashed Magisk several times, and it is still crashing. I just reset my phone again because I attempted to just restore a stock boot backup from before I installed Magisk, which made my phone completely unbootable. I pulled the battery and found that it tried re-encrypting the phone (AFAIK, TWRP doesn't support encrypted data on the v20, which really sucks) so I had to wipe it and flash Magisk so it wouldn't re-encrypt it. I will try to do this again, but I don't want to not be able to restart my phone (which is so far the only thing that's working for me). This time, not even uninstalling and re-flashing Magisk worked this time, as it has all of my previous attempts. I had to completely reset it. Again. I really need this issue fixed. I probably already said this, but I would greatly appriciate any possible help I could get. I really want my phone back.
Ok I forgot to include some basic information about my phone.
Model number: LG-H910
Android version: 7.0
Android security patch level: April 1, 2017
Kernel version: 3.18.55
Build number: NRD90M
Software version: H91010m
According to Kernel Auditor:
Kernel: Linux version 3.18.55-Werewolf-2.0-Basilisk ([email protected]) (gcc version 6.3.1 20170430 (GCC) ) #1 SMP PREEMPT Sat Jun 24 00:56:07 CDT 2017
Bump/Update: This is a small one, but, despite not restarting my phone, Magisk is showing an error "Magisk is not installed". Root access also disappeared. I don't know how much longer I can keep it on without having to restart it due to random issues like these that usually fix themselves with a reboot. I would appreciate any help.
Seems like your phone is all sorts of wacked out. I noticed from the specs your using the werewolf kernel. I had all sorts of performance issues as well as random reboots using that kernel. Since you're losing root and the system is overall unstable I recommend wiping clean and starting over. Wipe system, data, cache, and dalvik in twrp and flash the full stock 10r zip by runningnak3d. It will put you on the latest security patch with the newest firmware available. I recommend installing askerm2000 1.4 kernel as it is very stable and works well on the h910. Flash magisk last (latest 15.3 works great for me) and reboot. Hopefully will solve your problems. The 10r zip for the h910 plus askermk2000 kernel and magisk has served me well for a while now.
toastyp said:
Seems like your phone is all sorts of wacked out. I noticed from the specs your using the werewolf kernel. I had all sorts of performance issues as well as random reboots using that kernel. Since you're losing root and the system is overall unstable I recommend wiping clean and starting over. Wipe system, data, cache, and dalvik in twrp and flash the full stock 10r zip by runningnak3d. It will put you on the latest security patch with the newest firmware available. I recommend installing askerm2000 1.4 kernel as it is very stable and works well on the h910. Flash magisk last (latest 15.3 works great for me) and reboot. Hopefully will solve your problems. The 10r zip for the h910 plus askermk2000 kernel and magisk has served me well for a while now.
Click to expand...
Click to collapse
Thank you. Before I do this, I have a few questions.
1. How do I disable force encrypt with Magisk? I remember when I flashed Magisk 14.0, that managed to disable force encrypt, but any other version of Magisk wouldn't do that when installing fresh (updates kept this setting). AFAIK TWRP is unusable on the v20 for things such as backups, file browser, etc because it isn't compatible with the encryption algorithm used by the v20. How would I turn off force encrypt with the latest Magisk zip
2. Should I do a full format data (where you have to actually type "yes" to confirm it) or just wipe those partitions using advanced wipe?
3. Will the askerm2000 kernel hide modified boot, unlocked bootloader, etc from safetynet just as Werewolf kernel did, and will it get rid of the static boot issue?
4. Will this increment ARB? If anything goes wrong, I want to be able to roll back.
5. If it was working perfectly fine before, what suddenly made everything come crashing down, even after multiple wipes? This is not as important as the other ones, I am just curious.
Sorry if these questions seem over excessive and/or obvious. Doing stuff like this tends to make me a bit nervous and I want to think of everything I can that might affect the outcome.
NullBite said:
Thank you. Before I do this, I have a few questions.
1. How do I disable force encrypt with Magisk? I remember when I flashed Magisk 14.0, that managed to disable force encrypt, but any other version of Magisk wouldn't do that when installing fresh (updates kept this setting). AFAIK TWRP is unusable on the v20 for things such as backups, file browser, etc because it isn't compatible with the encryption algorithm used by the v20. How would I turn off force encrypt with the latest Magisk zip
2. Should I do a full format data (where you have to actually type "yes" to confirm it) or just wipe those partitions using advanced wipe?
3. Will the askerm2000 kernel hide modified boot, unlocked bootloader, etc from safetynet just as Werewolf kernel did, and will it get rid of the static boot issue?
4. Will this increment ARB? If anything goes wrong, I want to be able to roll back.
5. If it was working perfectly fine before, what suddenly made everything come crashing down, even after multiple wipes? This is not as important as the other ones, I am just curious.
Sorry if these questions seem over excessive and/or obvious. Doing stuff like this tends to make me a bit nervous and I want to think of everything I can that might affect the outcome.
Click to expand...
Click to collapse
Twrp can properly decrypt the v20. Twrp backup and restore works just fine for me. Never had an issue with this. You format data and then type yes. Wipes the data partition but this is only needed once. Decrypts the device and twrp can then do it's thing. Encryption problems stem from booting into system with a stock boot image that has force encryption enabled without flashing magisk or supersu. They modify the kernel to prevent the device from rencrypting. Latest magisk 15.3 has zero issues keeping the phone decrypted. The modified boot warning has nothing to do with the kernel. This is caused by the debug bootloader used to achieve root on the US carrier v20's. Nothing can be done to change that. ARB has not been incremented on the h910 so that isn't an issue currently. Potentially in the future, but not right now. The problems you're having could stem from a multitude of issues. Could be modifications you made, bad flashes, etc. If you're having issues with encryption and stuff sounds like magisk wasn't functioning properly at the end. I've been rooted since last January and haven't experienced anything like that before so I'm not sure
toastyp said:
Twrp can properly decrypt the v20. Twrp backup and restore works just fine for me. Never had an issue with this. You format data and then type yes. Wipes the data partition but this is only needed once. Decrypts the device and twrp can then do it's thing. Encryption problems stem from booting into system with a stock boot image that has force encryption enabled without flashing magisk or supersu. They modify the kernel to prevent the device from rencrypting. Latest magisk 15.3 has zero issues keeping the phone decrypted. The modified boot warning has nothing to do with the kernel. This is caused by the debug bootloader used to achieve root on the US carrier v20's. Nothing can be done to change that. ARB has not been incremented on the h910 so that isn't an issue currently. Potentially in the future, but not right now. The problems you're having could stem from a multitude of issues. Could be modifications you made, bad flashes, etc. If you're having issues with encryption and stuff sounds like magisk wasn't functioning properly at the end. I've been rooted since last January and haven't experienced anything like that before so I'm not sure
Click to expand...
Click to collapse
Ok, I cannot possibly thank you enough for this. After this started happening, I seriously thought my phone was at the end of its life. If this were to happen, I wouldn't be able to get a new phone anytime soon. Not only did it fix the crashes (I only restarted it once, I'm not going to try to intentionally make it crash), It ALSO managed to fix my FM radio and (I think) the Google Assistant Voice Match unlock thing, both of which I never even thought I would be able to get back. Let's just hope that it stays this way. I have one last question. Would you say it's safe to download and install Magisk modules now?
NullBite said:
Ok, I cannot possibly thank you enough for this. After this started happening, I seriously thought my phone was at the end of its life. If this were to happen, I wouldn't be able to get a new phone anytime soon. Not only did it fix the crashes (I only restarted it once, I'm not going to try to intentionally make it crash), It ALSO managed to fix my FM radio and (I think) the Google Assistant Voice Match unlock thing, both of which I never even thought I would be able to get back. Let's just hope that it stays this way. I have one last question. Would you say it's safe to download and install Magisk modules now?
Click to expand...
Click to collapse
Yes. I use a few modules myself without an issue. If you're unsure of the stability of a module, you can always take a nandroid backup in twrp prior to installation. If things are stable, and then you flash something and the phone freaks out, it's most definitely the mod you have flashed causing problems. Some modules make changes to the system partition that have the potential to problems. But I haven't had a module cause my device to bootloop or reencrypt. So I think you're good to go. Glad you're phone is up and running as it should. Very strange that it was in such a bad way, but crap happens. I have had zero issues with this setup (10r + 1.4 askermk kernel + magisk 15.3).
I have the stock firmware on the H990 version, I end up on the Crash LK screen error. I can access TWRP, how can I restore access to my device without losing data? Thanks.

HELP! Can't get past lockscreen or decrypt in TWRP

I'm currently running a custom ROM (AOSiP), but this started happening on a different rom (Syberia). With a recent update, I noticed that suddenly I couldn't use fingerprint authentication for apps anymore. Eventually, I wound up having to format data (and sadly lost quite a few recent photos that had not yet been backed up) and start all over because neither the lockscreen nor TWRP would accept my correct pattern to decrypt.
Several wipe and resets later I decided to switch to a different ROM (AOSiP). And now I'm having the same issues with a completely clean flash (I started off with MSMDownloadTool to bring the phone back to factory). The ROM was working fine, as well as fingerprint and pattern unlocks, until I restarted. Now, I can't get past the lockscreen OR TWRP pattern unlocks. Here is what I found in logcat:
Code:
java.lang.RuntimeException: Failed to decrypt blob
at com.android.server.locksettings.SyntheticPasswordCrypto.decryptBlob(SyntheticPasswordCrypto.java:143)
at com.android.server.locksettings.SyntheticPasswordManager.decryptSPBlob(SyntheticPasswordManager.java:1117)
at com.android.server.locksettings.SyntheticPasswordManager.unwrapSyntheticPasswordBlob(SyntheticPasswordManager.java:978)
at com.android.server.locksettings.SyntheticPasswordManager.unwrapPasswordBasedSyntheticPassword(SyntheticPasswordManager.java:907)
at com.android.server.locksettings.LockSettingsService.spBasedDoVerifyCredential(LockSettingsService.java:2426)
at com.android.server.locksettings.LockSettingsService.doVerifyCredential(LockSettingsService.java:1700)
at com.android.server.locksettings.LockSettingsService.checkCredential(LockSettingsService.java:1667)
at com.android.internal.widget.LockPatternUtils.checkCredential(LockPatternUtils.java:374)
at com.android.internal.widget.LockPatternUtils.checkPattern(LockPatternUtils.java:426)
at com.android.internal.widget.LockPatternUtils.checkPattern(LockPatternUtils.java:413)
at com.android.server.locksettings.LockSettingsShellCommand.checkCredential(LockSettingsShellCommand.java:182)
at com.android.server.locksettings.LockSettingsShellCommand.onCommand(LockSettingsShellCommand.java:59)
at android.os.ShellCommand.exec(ShellCommand.java:103)
at com.android.server.locksettings.LockSettingsService.onShellCommand(LockSettingsService.java:2074)
at android.os.Binder.shellCommand(Binder.java:634)
at android.os.Binder.onTransact(Binder.java:532)
at com.android.internal.widget.ILockSettings$Stub.onTransact(ILockSettings.java:532)
at android.os.Binder.execTransact(Binder.java:731)
Caused by: java.security.InvalidKeyException: Only SecretKey is supported
at com.android.org.conscrypt.OpenSSLCipher.checkAndSetEncodedKey(OpenSSLCipher.java:462)
at com.android.org.conscrypt.OpenSSLCipher.engineInit(OpenSSLCipher.java:296)
at javax.crypto.Cipher.tryTransformWithProvider(Cipher.java:2980)
at javax.crypto.Cipher.tryCombinations(Cipher.java:2891)
at javax.crypto.Cipher$SpiAndProviderUpdater.updateAndGetSpiAndProvider(Cipher.java:2796)
at javax.crypto.Cipher.chooseProvider(Cipher.java:773)
at javax.crypto.Cipher.init(Cipher.java:1288)
at javax.crypto.Cipher.init(Cipher.java:1223)
at com.android.server.locksettings.SyntheticPasswordCrypto.decrypt(SyntheticPasswordCrypto.java:63)
at com.android.server.locksettings.SyntheticPasswordCrypto.decryptBlob(SyntheticPasswordCrypto.java:135)
... 17 more
Obviously my device is encrypted so I my only option is to format again and start over for the 4th time in the past 2 days, only to worry that this might happen again. Can anyone help? Thanks in advance.
NOTE: Sig is outdated.
EDIT: Not sure if it is relevant, but the phone was initially encrypted via OOS, then wiped and set up via AOSiP with encryption already in place.
You didn't say what version of TWRP? Generally when going between AOSP and OOS formatting data is necessary otherwise you will have encryption problems. MSMTool is sort of a drastic measure though.
OhioYJ said:
You didn't say what version of TWRP?
Click to expand...
Click to collapse
Initially twrp-3.3.1-1 but now twrp-3.3.1-7 unofficial
MSMTool is sort of a drastic measure though.
Click to expand...
Click to collapse
I was fed up and figured a bone stock base couldn't hurt at that point since I had lost everything already anyway.
Generally when going between AOSP and OOS formatting data is necessary otherwise you will have encryption problems.
Click to expand...
Click to collapse
I may have just come to the same conclusion. I formatted and left forceencrypt enabled, then set up using AOSiP and now fingerprint auth works in apps again. Initially I never did it this way because forceencrypt would be disabled with fresh formatting, and the in-rom encryption option resulted in FDE rather than FBE for some reason.
Was this a recent development that formatting was required? I had no issues for 7 months with my OOS encrypted data until now.
Any ROM that has the May security patches will require a newer version of TWRP, so 3.3.1-7 may have originally decrypted your data, hard to say. I don't remember which version originally included that fix. It's been in there for a few versions though.
Formatting data has been a thing for a while, essentially the entire time as far as I'm aware (I've always done it that way). Even though it's a pain. It's the only way to avoid problems. This is how to do it. Some ROMs may handle not formatting this better than others, but it seems like skipping that step is when problems happen.
I don't think there is a way to get to FDE on these devices, otherwise your phone would ask for a password on boot.
OhioYJ said:
Any ROM that has the May security patches will require a newer version of TWRP, so 3.3.1-7 may have originally decrypted your data, hard to say. I don't remember which version originally included that fix. It's been in there for a few versions though.
Formatting data has been a thing for a while, essentially the entire time as far as I'm aware (I've always done it that way). Even though it's a pain. It's the only way to avoid problems. This is how to do it. Some ROMs may handle not formatting this better than others, but it seems like skipping that step is when problems happen.
I don't think there is a way to get to FDE on these devices, otherwise your phone would ask for a password on boot.
Click to expand...
Click to collapse
Actually, FDE is what I would initially get with formatted data and a clean install with forceencrypt disabled. If I tried to encrypt via settings, I would get FDE and password before boot. At least initially it was that way (circa when FP first became possible on custom roms 8.1). I had never bothered messing with it after that, as I had no issues with the OOS encrypted volume. Oh well. At least now I can be sure it has been done correctly. Thank you for the insight!
Mods please mark as solved

Categories

Resources