Hi,
are there any Infos bout device encryption and Performance? Or does it no matter with the newer CPUs?
Thanks
Gesendet von meinem XT1635-02 mit Tapatalk
On stock rom encryption is on by default and will force you to format your data partition if you disable encryption (by erasing data partition in bootloader and formating it as ext4/f2fs in recovery). To get past that all you have to do is set it up while encrypted, unencrypt it, install TWRP and it wont nag or force encrypt on you. Performance and battery life will always be better with encryption disabled, even if the cpu has an extension or a seperate core to aid in decryption and encryption it still takes cpu cycles. Newer cpus just make the process more efficient and so diminish the draw backs to encryption.
Related
Stock LRX22C kernel image with some mods i've been using that seem to help performance/memory management.
Swap is turned off and zram/swap dedicated space removed. By default the when ram gets below 533mb pages would be compressed into ram/swapped. With memory cgroups broken(and turned off), swap cant swap efficiently so its better to leave it off and and not allocate any memory for zram.
Cache is mounted as writeback, which turns off all filesystem journaling and ordering. Its faster, and not recommended on /data due to the SLIGHT risk of data loss on a hard reboot- but this is /cache so we dont care. Losing cache would not be risky like data, so speed is worth the slight risk.
Init.d is supported, but this depends on the rom- or if you want to use scripts with stock rom, add init.d folder in /system/etc
To get init.d working on stock rom- you need busybox(install from market), terminal emulator(market), and root(flash attached zip in recovery)
Do this on a terminal on your tablet
Code:
su
mount -o remount,rw /system
mkdir /system/etc/init.d
chown root.shell /system/etc/init.d
chmod 755 /system/etc/init.d
mount -o remount,ro /system
scripts in init.d also need to be 755
To unencrypt data if you are currently encrypted you must factory reset. if you are not encrypted, just flash in fastboot, WIPE CACHE, and youre done.
I will probably eventually do an entire kernel as well, but that may be a while and i will not release it until i can implement a few new things i want to try, so it will take a while.
boot.img md5= f3eff60b6e7673e203b87a968bbfe595
Flashable zip coming soon
Reserved
Than you! Could we just use flashify for flashing boot.img. I am already unencrypted so just need to wipe cache in recovery and job should be done ?
I haven't used it, but there should be no reason it wouldn't work if it has worked with other boot.img's for the n9.
Do i need to factory reset after flashing this Boot.IMG or just fastboot it and going fine.
Im encrypted to far.
thebrainkafka said:
Do i need to factory reset after flashing this Boot.IMG or just fastboot it and going fine.
Im encrypted to far.
Click to expand...
Click to collapse
If you wanna lose encryption, you have to factory reset. If you are currently encrypted and want to stay like that, just fastboot flash and you're done
Unable to disable encryption
I tried a millions times
I flash the AOSP new rom
flash fire ice kernel
flash SU
reboot
turn off reboot into TWRP 2.8.2.1 recovery
factory reset
reboot
still encrypted???
Anything's wrong with my steps?
You have to format data. Not a simple factory reset. In TWRP it's the option to the right of Advanced Wipe. Type yes to wipe all userdata. Back up everything on your local storage before doing it. Dilligaf's instruction to factory reset only applies you are using stock recovery.
Benefit of no zram and swap? Wouldn't more apps get refreshed?
MrPhilo said:
Benefit of no zram and swap? Wouldn't more apps get refreshed?
Click to expand...
Click to collapse
When ram gets below the set threshold, (533mb), swapping takes place. This is fine and dandy when mem cgroups are working so kernel knows to swap NON-important pages. Swap is slow. Much slower than ram. The things that swap should not be things that are gonna cause lag or slowdowns. With mem cgroups off, more important pages could also be swapped, which may be something that causes massive lag when its read from swap(which is what happened a lot on this device) I'd rather oom killer kill old stuff than important stuff be swapped and cause lag.
FOR ME, I haven't had the massive lag and stutters I did when zram was on. Memory is still an issue, and will be until some memory leaks are fixed. IMO, zram was just making it worse. Its something I am still messing with and looking into as I have time.
Read & read
Specifically this:
The memory cgroups are automatically configured at boot time if the feature is enabled in kernel.
If memory cgroups are available, the ActivityManager will mark lower priority threads as being more swappable than other threads. If memory is needed, the Android kernel will start migrating memory pages to zRAM swap, giving a higher priority to those memory pages that have been marked by ActivityManager.
Click to expand...
Click to collapse
i've flashed clean google image, then performed a factory reset, then flashed this kernel and performed one more factory reset, but i'm still encrypted, what's wrong?
GlebVoronin said:
i've flashed clean google image, then performed a factory reset, then flashed this kernel and performed one more factory reset, but i'm still encrypted, what's wrong?
Click to expand...
Click to collapse
For some reason, a factory reset in TWRP won't always get it done for unencrypting.
Try this > fastboot format userdata
And note that it will wipe your SDcard.
@di11igaf,
Now that 5.0.2 is out, can you confirm that the kernel for LRX22Y is the same as C?
cam30era said:
@di11igaf,
Now that 5.0.2 is out, can you confirm that the kernel for LRX22Y is the same as C?
Click to expand...
Click to collapse
The kernel for LRX22L is not the same as LRX22C, but I don't know which are the differences. Only the 'bootloader.img' and 'vendor.img' are exactly the same.
Good evening, I install CM13 today but how did it to decrypt the phone?
Envoyé de mon Nexus 5X en utilisant Tapatalk
I understand that English may not be your native language, but please try to express yourself a little clearer. What is it about CM13 and encryption that you wanted to know?
I assume you want to decrypt your phone. CM13 will encrypt your phone by default on the first boot. You need to backup everything to your PC as you will need to format the data partition to get rid of the encryption. Then flash this: fed-patcher. You need to flash this every time you flash CM (or any ROM or kernel that encrypts by default) to prevent it from encrypting on the first boot.
You should be able to just format data, but I would just wipe everything, including data (just this time to get rid of the encryption). Then while in TWRP reboot back into recovery ignore the warning you have no OS and copy CM, GAPPS, and FED-Patcher. Install CM, Install Gapps, Install Fed-Patcher. Boot. Now in security it should now have the option to encrypt as you should NOT be encrypted.
Is it possible combo? I have f2fs and it says "Encrypted" in setting, but for example, twrp doesnt asks pasword and lets me do whatever i want with my filesystem. I heard in OP1 threads that f2fs cant be encrypted after all.
It can, you need to set password in lock screen settings. If you don't do it, TWRP will decrypt your storage using the default password.
Hi
I'm a bit lost reading posts about flashing twrp, installing magisk or cf auto root, disabling encryption on /data. So:
- is it possible to install twrp and magisk without having to format /data (as smart switch unfortunately does not backup apps datas... it's a long story to reconfigure every app...) ?
- we loose /data only when we want to disable encryption ?
thanks
sambastrakan said:
Hi
I'm a bit lost reading posts about flashing twrp, installing magisk or cf auto root, disabling encryption on /data. So:
- is it possible to install twrp and magisk without having to format /data (as smart switch unfortunately does not backup apps datas... it's a long story to reconfigure every app...) ?
- we loose /data only when we want to disable encryption ?
thanks
Click to expand...
Click to collapse
I really don't think so
Envoyé de mon SM-A520F en utilisant Tapatalk
A question about decrypting your device, in this case Luisrom Android 10, but would most probably count for other roms too.
Did not try it already but would like to decrypt my device and would like a confirmation if the following is the right procedure without doing a new install:
Boot in recovery
Make a backup of /data to internal storage with TWRP
Make a backup of internal storage to my pc
Format data in TWRP
Copy internal storage back from pc to OP3(T)
Restore backup from /data with TWRP
Reboot with decrypted phone
I could do a dirty flash afterwards ofcourse, but because /system is not touched I think the steps above should be enough.
Could someone confirm if this is right?
Just tried what I described above but seems not to work.
After reboot, phone is starting again with encrypting and after next reboot everything is encrypted again.
It also seems as if Android 10 (read it somewhere) is using file based encryption, so not only on a higher level...
So for now, I only see a fresh install as the solution.
Would someone know another solution to keep your data without doing a fresh install it would be nice to know.
Any input is welcome!
Johan2020 said:
Just tried what I described above but seems not to work.
After reboot, phone is starting again with encrypting and after next reboot everything is encrypted again.
It also seems as if Android 10 (read it somewhere) is using file based encryption, so not only on a higher level...
So for now, I only see a fresh install as the solution.
Would someone know another solution to keep your data without doing a fresh install it would be nice to know.
Any input is welcome!
Click to expand...
Click to collapse
First of all: decrypting is what happens on each reboot if data is encrypted. Decrypting is making something encrypted readable again. Removing encryption is something completely different.
For your question: which rom are you booting? This sounds like you are using a rom with forced encryption enabled. Dosable forced encyption in fstab before first system boot.
You can't use fbe with op3/t. No blobs, no twrp... Either you havn't read closly enough or you belived some ignorant not reading closely enough: g requires new devices shipped the first time with q to use fbe. All devices shipped originaly with fde can still use fde with q.
Reference: https://source.android.com/security/encryption/file-based
nvertigo67 said:
First of all: decrypting is what happens on each reboot if data is encrypted. Decrypting is making something encrypted readable again. Removing encryption is something completely different.
For your question: which rom are you booting? This sounds like you are using a rom with forced encryption enabled. Dosable forced encyption in fstab before first system boot.
You can't use fbe with op3/t. No blobs, no twrp... Either you havn't read closly enough or you belived some ignorant not reading closely enough: g requires new devices shipped the first time with q to use fbe. All devices shipped originaly with fde can still use fde with q.
Reference: https://source.android.com/security/encryption/file-based
Click to expand...
Click to collapse
I am using CrDroid 6.4 Luisrom which is not enforcing encryption, just as most other custom roms.
I had enabled encryption though after installation to see if encryption was working already for installing CrD Luis on my work phone (where I want encryption).
After that I decided to go back to unencrypted, following the procedure above, which did not work.
Did not make the link between fbe and file based encryption, but ofcourse this is the same and not available on op3/t.
Must have been sleeping when I wrote that.
Based on what you wrote and my missing knowledge;
After encrypting, is fstab changed also and would the solution have been to change fstab back also before rebooting after restore?
Johan2020 said:
After encrypting, is fstab changed also and would the solution have been to change fstab back also before rebooting after restore?
Click to expand...
Click to collapse
No. fstab isn't changed during encryption, neither for forced encryption nor for "voluntary" ( ) encryption.
Maybe the problem is the restored data itself: the rom setting for encryption is restored as well if you restore the data unconditionaly... Perhaps this way the reencryption is triggered. Did you try to boot the rom without restoring data? If it's unencrypted on a clean boot, but is (re)encrypted after first boot after restoring the backup, you have the answer. If it's encrypzed on a clean boot, formating to remove the enctyption has failed.
nvertigo67 said:
No. fstab isn't changed during encryption, neither for forced encryption nor for "voluntary" ( ) encryption.
Maybe the problem is the restored data itself: the rom setting for encryption is restored as well if you restore the data unconditionaly... Perhaps this way the reencryption is triggered. Did you try to boot the rom without restoring data? If it's unencrypted on a clean boot, but is (re)encrypted after first boot after restoring the backup, you have the answer. If it's encrypzed on a clean boot, formating to remove the enctyption has failed.
Click to expand...
Click to collapse
Good point, did not try that unfortunately and just did a fresh install so.... not really eager to try it now
But I think indeed reencryption was triggered because of also restoring the encryption settings.
Will try it when I have some spare time and want to take the risc of a fresh install again