Dysfunctional LOS SONY Xperia Z5 Compact suzuran after ENCRYPTION - LineageOS Questions & Answers

After heavy reading and trying to sort things out by myself and before giving up on the device, just to give it a chance:
after upgrading to the latest build of Lineage OS for MicroG (lineage-14.1-20190215-microG-suzuran) i encrypted the phone, simple-hearted.
result:
starts into TWRP 3.1.1 but can't decrypt data
No more cell service, which i couldn't solve
After repeated wipe - advanced wipe - Format data followed by reinstallation each i can boot into Lineage, with adb and cell service working but the install is unstable:
-larger uploads like my TWRP backup (~2GB) result in ads connection loss, 'system read only' which can be solved by restarting into recovery, but backup upload is not possible although more than 20GB free space seem to be available (can it be that memory space encrypted before is still not usable, despite formatting all partitions?).
-Trebuchet app crashes
-Phone won't reboot, hangs with startup animation
Last two issues can be solved by wiping the phone and reinstallation, until reoccurring.
Do i have to trash the device or is there something else i could try?
Update:
SOLVED: TWRP Wipe - Advanced Wipe - select Data - Repair Or Change File System - Repair File System (Mount Point /data) (Many thanks: https://android.stackexchange.com/a/176124)
As far as i understand (as stated here https://forum.xda-developers.com/z5-compact/development/twrp-twrp-3-2-1-z5-compact-t3748952) i need a different kernel and a different TWRP build for Encryption and OTA Updates working on the same system, but which ones and how to install is a different thread.

Related

[Q] Cm12 Phone Encryption Not Working

Hey all together,
I have an issue with the phone encryption of my GT-I9195.
I have a CWM Recovery v6.0.5.0 installed.
I downloaded the nightly 20150408 to upgrade vom CM11 to CM12.
My approach:
- I formatted the sd1 (external-card)
- I factory reset my phone
- I downloaded with the phone the nightly and moved it to sd1
- I downloaded gapps-ip-20141212 and moved it to sd1
- I deleted all folders on sd1 (android folder etc.)
In CWM Recovery
- I wiped the data / factory reset
- I wiped the cache partition
- under "mounts and storage" I formated all folders incl. the /data AND /data/media folders
- I wiped the dalvig cache
- installed the nightly zip
- installed the gapps zip (doesnt matter if I install the gapps or not, behavior of encryption is the same)
After booting into CM12, I configure some basics like Screen-lock, etc. and tried to enable the phone encryption.
After two screens, the message shows up, that the phone will reboot a couple times during encryption and it may take a couple hours.
If I confirm all screens, the green android robot shows up, and nothing happens. Not after a few seconds, not after an hour. The telephon shoutdown menu still works if I press the power button.
I wiped all caches in CMW a couple times, I reinstalled CM12 without gapps,.. everytime the same situation.
I couldnt find some information if the encryption should work or not by design. So I decided to go back to CM11 to encrpyt the phone and use it for business purposes.
I downloaded the cm11 20141112-snapshot and proceed the same way I did before with the CM12 clean install.
When I try to enable the encryption in CM11, it shows the same behavior like in CH12.
I know that I had some troubles to enable encryption when I installed CH11 the first time last year, but I dont know anymore what I did to make it works.
Do you have any advices for me how its possible to use the phone encryption?
Beside the fact, that its not possible to use business mails on a decrypted phone (exchange policy), I dont feel comfortable to have it not encrypted.
Thanks for you answers in advance.
Best regards,
Semo
Try with cwm 6.0.5.1
http://forum.xda-developers.com/showthread.php?t=2364980

Fix Galaxy Nexus bootloop after flashing CM nightly.

Hey guys!
I have flashed my Samsung Galaxy Nexus (i9350) with CM-12.1-20160117-NIGHTLY. I first installed the new CM recovery (with the same build date) via Fastboot, wiped Cache (but not Dalvik Cache, since the new Recovery had no option for this).
My device was then stuck in some sort of "bootloop". It gets to the "Android is updating ..." screen, where it says it compiles "app X of Y", then reboots and starts over again.
So I booted the device back into the bootloader, flashed back the old CM recovery (with build date 2016-11-17) via Fastboot, formatted System, Cache and wiped Dalvik Cache, then installed the old ROM only to find it being stuck in a bootloop too with the AMOLED display increasing and decreasing in brightness, but the ROM's not getting anywhere (not even to the point where it says "Android is updating ..." - it's just showing the boot animation and the screen "goes mad").
So I went back to the "old" CM recovery, formatted System, Cache, wiped Dalvik Cache, rebooted to bootloader, flashed the "new" CM recovery via Fastboot, flashed the "new" ROM again, wiped Cache again with the "new" Recovery ("new" recovery does not offer to format System or wipe Dalvik Cache, which is why I did it with the "old"), again "Android is updating ..." loops.
Now since System, Cache and Dalvik-Cache are basically "clean", I'm afraid that Data might be corrupt and thus my data on the phone might indeed be lost. (I have backups, but they are four months old.) Formatting Data might make the device bootable again, but I'd really like to do some sort of "data recovery". I mean "normally" flashing a ROM doesn't corrupt your data partition, right?
I don't know how to access the data partition though, since the device won't boot. The recoveries I have unfortunately don't allow ADB access either. Any chance? Or should I hit "wipe data / factory reset" and kiss the data goodbye? (Like I said, it's not "much" that will be lost, though I'd really like to keep it if it's "somehow" possible.)
Thanks a lot for your advice!
EDIT: I managed to gain MTP and ADB (root) access by booting into TWRP via Fastboot.
I now backed up the entire MTP storage, as well as the following:
- "/data/data/com.threema.app"
- "/data/data/com.android.providers.telephony"
- "/data/data/com.android.providers.contacts"
- "/data/data/com.android.providers.userdictionary"
Will this be sufficient to get my SMS, contacts (stored on phone), custom dictionary (for swipe recognition) and Threema messages back?
TWRP has a mount as MTP functionality that will allow you to access data.
You can also use adb while you're in fastboot adb pull allows you to pull anything as long as you have the path so adb pull /data should be able to pull those contents.
For me TWRP mount as MTP is a much easier and reliable option.
Thanks! I managed to pull off "/data" using TWRP, wipe "/data", restore files selectively. Works, even on the new nightly, which now runs like a charm.
Do you have an idea, why CWM does not support ADB access? I remember that it used to support it some years ago.

GS5 regular hang investigation?

Hi All,
I have LineageOS running on a GS5 (G900I) and while it runs beautifully, every 1-2 weeks I have a hang that I cannot recover from - Even after reboot the phone hangs immediately - I can swipe across screens in Trebuchet but no widgets will run and the phone will hang if I try to open any app.
The *only* way I have been able to recover is to perform a restore of my /data partition from a TWRP backup. I've tried wiping cache, dalvik-cache and restoring the /system partition, but this does not help. I've upgraded LineageOS a couple of times to the latest. Now I seem to have to make a backup of /data every day or two, as I never know when this problem will strike again.
My /data partition is encrypted. Filesystem is ext4.
So I have really 2 questions:
1. Can anyone suggest the cause? I can't find any mention of this as a common issue.
2. How can I troubleshoot this? I can use "adb" when booted into TWRP recovery but it seems I cannot use this when the phone is booted without enabling USB Debugging in settings first - but when the hang has happened I cannot launch Settings to enable USB Debugging, so there appears to be no way to see any logs.
Any help would be appreciated...!

TWRP 3.2.3 / WIPE / FORMAT DATA will break phone - must re-RSD-lite

It will cause the Data to not be able to be mounted.
-
I am working (7 hrs) on finding a way to format data to get rid of encryption.
It's here:
(TWRP WIPE/advanced/check DATA/tap repair/change to ext4, then back to f2fs)
Each time I start with a RSDlite since I lose DATA. it becomes (0).
-
if I RSDlite rafikowy'a 8.0.0, it will boot to "Let's Go" (I no longer bother to set it up).
I then press pwr-voldn and go back to bootloader
I flash TWRP twice nbd boot to twrp, choose wipe, advanced, check DATA, tap REPAIR, change to ext4 (it formats it), change back to f2fs (it formats it)
THEN I can go do:
adv wipe dalvikart,system,data,cache
install 12-28 of Alberto's aosp 9 64bit, install gapps for 12-29, reboot, set up.
I get an encrypted rom that I don't know the code to decrypt it.
Maybe this has been happening all along with 9 and I just didn't notice it. ???
Or formatting isn't getting rid of encryption.
Anyway, the above should format your DATA if you need to to install an 8 or maybe a 7 (not tested), though I noticed this time that when I rsdlite'ed 8.0.0, and set it up all the way, it, too, was encrypted. Maybe I just haven't noticed. Could be.

Installed the Begonia Recovery Project and all files in my main storage have random letters

I was attempting to install the Begonia Recovery Project for Miui 12.5 (android 11) using the fastboot method. But when I reboot into this new recovery and look inisde the "install" tab, all my folders from my main storage are made up of random letters and numbers.
I assume that this means that my files are still encrypted but I am not sure how to decrypt them.
I am running MIUI 12.5.3 Global edition on android 11 and the Begonia Recovery Project version I downloaded and installed was from this website : https://www.pling.com/p/1556862/
Furthermore, I have a unlock pattern on my phone but when I boot into the custom recovery, it doesn't ask me for my unlock pattern. Could this be the reason all my files are named with random letters and numbers?
It won't let me boot back into my operating system and when I try, I get an warning saying "No OS Installed! Are you sure you wish to reboot?". Rebooting leads me right back into the custom recovery, with all files still named with random characters.
I would prefer to be able to boot back into my system without having to lose any of my personal files on my phone (if that is possible).
Any help is greatly appreciated and I thank you in advance
Sqorpz said:
I was attempting to install the Begonia Recovery Project for Miui 12.5 (android 11) using the fastboot method. But when I reboot into this new recovery and look inisde the "install" tab, all my folders from my main storage are made up of random letters and numbers.
I assume that this means that my files are still encrypted but I am not sure how to decrypt them.
I am running MIUI 12.5.3 Global edition on android 11 and the Begonia Recovery Project version I downloaded and installed was from this website : https://www.pling.com/p/1556862/
Furthermore, I have a unlock pattern on my phone but when I boot into the custom recovery, it doesn't ask me for my unlock pattern. Could this be the reason all my files are named with random letters and numbers?
It won't let me boot back into my operating system and when I try, I get an warning saying "No OS Installed! Are you sure you wish to reboot?". Rebooting leads me right back into the custom recovery, with all files still named with random characters.
I would prefer to be able to boot back into my system without having to lose any of my personal files on my phone (if that is possible).
Any help is greatly appreciated and I thank you in advance
Click to expand...
Click to collapse
This is the reason why everyone recommends taking a backup of your files and resetting your device prior to such attempts. Unfortunately, most likely you will lose part, if not all of your files.
That No OS Installed error is normal since MIUI is a system on root OS and TWRP isn't able to detect them.
That random named folders is your internal storage but it's encrypted. You'll need to enter your passcode every time you boot to TWRP. If it doesn't ask you go to Mount and select Decrypt Data
To disable encryption you'll need to format data and install Disable ForceEncrypt. Doing this will erase EVERYTGHING. (except Find Device,IMEI's etc)
I would recommend you to install this TWRP to decrypt them.
If your device boots back to TWRP, it might be triggering Rescue Party. (click the 3rd button on the bottom of the screen to view the logs)
Fytdyh said:
This is the reason why everyone recommends taking a backup of your files and resetting your device prior to such attempts. Unfortunately, most likely you will lose part, if not all of your files.
Click to expand...
Click to collapse
I had installed twrp like this before and never had this type of error. But yes, the smart thing would definately be to always have backups. Lesson learned for next time!
Canny1913 said:
That No OS Installed error is normal since MIUI is a system on root OS and TWRP isn't able to detect them.
That random named folders is your internal storage but it's encrypted. You'll need to enter your passcode every time you boot to TWRP. If it doesn't ask you go to Mount and select Decrypt Data
To disable encryption you'll need to format data and install Disable ForceEncrypt. Doing this will erase EVERYTGHING. (except Find Device,IMEI's etc)
I would recommend you to install this TWRP to decrypt them.
Click to expand...
Click to collapse
Thank you for the fast reply.
I installed the twrp that you recommended. TWRP still isn't asking for my passcode and I can't find a "Decrypt Data" option in the Mount section. The only checked options in Mount are "Data", "Cache", and "Micro SD Card".
Is Disable ForceEncrypt needed in order to be able to boot back into my operating system? Is there any way to boot back into my OS without this?
Thanks again for the fast reply!
Sqorpz said:
Thank you for the fast reply.
I installed the twrp that you recommended. TWRP still isn't asking for my passcode and I can't find a "Decrypt Data" option in the Mount section. The only checked options in Mount are "Data", "Cache", and "Micro SD Card".
Is Disable ForceEncrypt needed in order to be able to boot back into my operating system? Is there any way to boot back into my OS without this?
Thanks again for the fast reply!
Click to expand...
Click to collapse
That zip can only be used if your data is formatted. If you flash it without formatting data you'll be making the situation even worse because it won't allow you to decrypt anymore. (it makes the phone think data isnt encrypted tho it clearly is encrypted)
Also did you check the logs as i suggested to determine the reason why the phone is not booting?
Canny1913 said:
That zip can only be used if your data is formatted. If you flash it without formatting data you'll be making the situation even worse because it won't allow you to decrypt anymore. (it makes the phone think data isnt encrypted tho it clearly is encrypted)
Also did you check the logs as i suggested to determine the reason why the phone is not booting?
Click to expand...
Click to collapse
Whoops, I used the twrp you recommended without formatting the data. Does this mean my data is forever undecryptable?
I checked the logs and indeed it is triggering the Android Rescue Party.
It suggests possible solutions that are
wipe caches, and/or
Format data, and/or
Clean-flash your ROM.
The reported problem is :
'--reason=enablefilecrypto_failed'
Sqorpz said:
Whoops, I used the twrp you recommended without formatting the data. Does this mean my data is forever undecryptable?
I checked the logs and indeed it is triggering the Android Rescue Party.
It suggests possible solutions that are
wipe caches, and/or
Format data, and/or
Clean-flash your ROM.
The reported problem is :
'--reason=enablefilecrypto_failed'
Click to expand...
Click to collapse
No i didnt meant that, i said the Disable ForceEncrypt zip needs data to be formatted.
The reported problem unfortunately means your phone cannot setup encryption. (thats why twrp won't decrypt it)
The only solution is to format data to make the phone usable again.
(you might as well flash the disable encryption zip after formatting the data since encryption on android is a pain in the ass and it makes the phone a bit faster)
By the way, do not wipe data, just click Format Data and format it since it doesn't get rid of the encryption properly.
T
Canny1913 said:
No i didnt meant that, i said the Disable ForceEncrypt zip needs data to be formatted.
The reported problem unfortunately means your phone cannot setup encryption. (thats why twrp won't decrypt it)
The only solution is to format data to make the phone usable again.
(you might as well flash the disable encryption zip after formatting the data since encryption on android is a pain in the ass and it makes the phone a bit faster)
By the way, do not wipe data, just click Format Data and format it since it doesn't get rid of the encryption properly.
Click to expand...
Click to collapse
Thank you so much for your informative responses.
Apologies, I thought you meant that flashing different twrp would lead to undecryptable files.
By formatting data do you mean the parition on my phone called "data"?. I forgot to add that files in my "data" folder have sensible names and don't look encrypted. Is it normal for it to just encrypt my internal storage?
By the sounds of it, I think I will proceed with your suggestion of formatting the data. Just to clarify, will this method also remove everything in my internal storage, eg pictures, music, videos?. Is there a way to continue with this method without having to lose those?
I appreciate your help greatly.
Sqorpz said:
Thank you so much for your informative responses.
Apologies, I thought you meant that flashing different twrp would lead to undecryptable files.
By formatting data do you mean the parition on my phone called "data"?. I forgot to add that files in my "data" folder have sensible names and don't look encrypted. Is it normal for it to just encrypt my internal storage?
By the sounds of it, I think I will proceed with your suggestion of formatting the data. Just to clarify, will this method also remove everything in my internal storage, eg pictures, music, videos?. Is there a way to continue with this method without having to lose those?
I appreciate your help greatly.
Click to expand...
Click to collapse
They actually encrypted the whole partition till Android 10. This required you to enter a password before the phone boots up but now they only encrypt the internal storage,apps and app data so you don't have to enter a password anymore before the phone boots-up.
Yes formatting the data will erase everything on your device including the internal storage.
Because they are encrypted just like the other part of data there's no way to save them.
Canny1913 said:
They actually encrypted the whole partition till Android 10. This required you to enter a password before the phone boots up but now they only encrypt the internal storage,apps and app data so you don't have to enter a password anymore before the phone boots-up.
Yes formatting the data will erase everything on your device including the internal storage.
Because they are encrypted just like the other part of data there's no way to save them.
Click to expand...
Click to collapse
I see. So could this have been avoided if I had flashed the twrp after disabling my password? Is it a smart practice to disable your password before doing stuff like flashing a custom recovery?
Obviously losing all my data and internal storage is definately a kick in the nuts. But it is also my fault for not backing up my data before experimenting like this.
Could you please send me an oultine of the steps I need to follow in order to proceed with your method of getting my phone working again. Frankly, I have little experience in this area and I'm afraid i'll make a mistake in the process. I also trust in your expertise and experience far greater than mine.
Thank you again!
Sqorpz said:
I see. So could this have been avoided if I had flashed the twrp after disabling my password? Is it a smart practice to disable your password before doing stuff like flashing a custom recovery?
Obviously losing all my data and internal storage is definately a kick in the nuts. But it is also my fault for not backing up my data before experimenting like this.
Could you please send me an oultine of the steps I need to follow in order to proceed with your method of getting my phone working again. Frankly, I have little experience in this area and I'm afraid i'll make a mistake in the process. I also trust in your expertise and experience far greater than mine.
Thank you again!
Click to expand...
Click to collapse
Simple, enter TWRP, go to Wipe, click Format Data, type yes then hit enter. Your data will be wiped. reboot the phone in Recovery mode (not to the normal OS or else the phone will encrypt again) again so the internal storage gets created.
Plug your phone into a PC, download this:https://zackptg5.com/downloads/archive/Disable_Dm-Verity_ForceEncrypt_11.02.2020.zip
copy it to your phone and install it. If you want to use Magisk, install Magisk first then this zip file. The encryption will be completely disabled.
To answer your first question, It wasn't your fault because i have no idea why your storage got corrupted in the first place but you should definitely disable the password (or disable the encryption if you want to use a password) before doing anything.
Canny1913 said:
Simple, enter TWRP, go to Wipe, click Format Data, type yes then hit enter. Your data will be wiped. reboot the phone in Recovery mode (not to the normal OS or else the phone will encrypt again) again so the internal storage gets created.
Plug your phone into a PC, download this:https://zackptg5.com/downloads/archive/Disable_Dm-Verity_ForceEncrypt_11.02.2020.zip
copy it to your phone and install it. If you want to use Magisk, install Magisk first then this zip file. The encryption will be completely disabled.
To answer your first question, It wasn't your fault because i have no idea why your storage got corrupted in the first place but you should definitely disable the password (or disable the encryption if you want to use a password) before doing anything.
Click to expand...
Click to collapse
Since I am reseting my phone to its factory settings, I researched into some ROMs that I may use instead of MIUI. I came across the Pixel Experience ROM and I'm considering installing it.
I read somewhere that flashing a ROM involves having to disable encryption every time you flash a new ROM or something along those lines. Will installing the Disable ForceEncrypt disable encryption permanently or will I have to considering installing it again if I want to flash the Pixel Experience ROM?
Sqorpz said:
Since I am reseting my phone to its factory settings, I researched into some ROMs that I may use instead of MIUI. I came across the Pixel Experience ROM and I'm considering installing it.
I read somewhere that flashing a ROM involves having to disable encryption every time you flash a new ROM or something along those lines. Will installing the Disable ForceEncrypt disable encryption permanently or will I have to considering installing it again if I want to flash the Pixel Experience ROM?
Click to expand...
Click to collapse
You will have to install it again if you install a new ROM or kernel since it modifies both of them (they both get wiped if you install or update the ROM.
I recommend you follow their install guide since a lot of people get confused when they see errors.
Flashing PE A12
1. Flash latest Firmware. 2. Flash latest Dynamic TWRP. 3. Reboot to Dynamic TWRP. 4. Flash latest PE rom zip and then format data. 5. Reboot and enjoy. Links Here: Dynamic TWRP: TWRP For A12 Note: If you see any red line errors on twrp just ignore them and continue flashing. Also before...
telegra.ph
Canny1913 said:
You will have to install it again if you install a new ROM or kernel since it modifies both of them (they both get wiped if you install or update the ROM.
I recommend you follow their install guide since a lot of people get confused when they see errors.
Flashing PE A12
1. Flash latest Firmware. 2. Flash latest Dynamic TWRP. 3. Reboot to Dynamic TWRP. 4. Flash latest PE rom zip and then format data. 5. Reboot and enjoy. Links Here: Dynamic TWRP: TWRP For A12 Note: If you see any red line errors on twrp just ignore them and continue flashing. Also before...
telegra.ph
Click to expand...
Click to collapse
Thank you for all your help. It was probably simple and easy for you but for me, I had no idea what I was doing and would never have done the steps that you suggested so thank you. I really appreciate all the help you've given me.
I just have one last request that is : do you know any good backup services for android? I know about services like google photos for backing up photos and videos, but I was wondering if there were any that backed up the android as a whole, including app data/progress, photos, videos, notes etc.
Thank you again for all your support and making this process very simple and easy and wish you all the best.
Sqorpz said:
Thank you for all your help. It was probably simple and easy for you but for me, I had no idea what I was doing and would never have done the steps that you suggested so thank you. I really appreciate all the help you've given me.
I just have one last request that is : do you know any good backup services for android? I know about services like google photos for backing up photos and videos, but I was wondering if there were any that backed up the android as a whole, including app data/progress, photos, videos, notes etc.
Thank you again for all your support and making this process very simple and easy and wish you all the best.
Click to expand...
Click to collapse
Google One app can backup photos,SMS, phone call history and redownloads all of the apps (except apps that were installed from an apk file)
Pixel Experience actually bypasses the Google Photos storage limit so you can backup your entire gallery without problems.
For notes just use Google Keep, it syncs the notes to your Google account.
App data can be backed up by Titanium Backup or Migrate. (i suggest you test them before backing up your entire app data as suggested by Migrate developer)
I don't exactly recommend backing up Data as a whole since your only option is TWRP and TWRP loves to complain when it comes to backing up and restoring.
Thanks for the best wishes and i wish you all the best too. Have a good one.

Categories

Resources