TWRP 3.7 Locked data partition (f2fs) and bricked Lineage OS 18.1 - Google Pixel 3 Questions & Answers

IMPORTANT: /data CANNOT be wiped. Pictures are irreplaceable (I know should have backed up first, but you'll see why I couldn't)
Here's what happened:
Phone had Lineage OS recovery and OS 18.1
Forgot pattern unlock.
Tried to dirty flash Lineage 19.
Reboot
Recovery error: /data is inaccessible
Loaded TWRP to use file manager to delete pattern files.
Reboot
TWRP asking for pattern to decrypt /data/media, unknown
Looked for pattern files, pattern files didn't exist
Deleted lockscreen.db file.
Reboot
TWRP Pattern unlock is gone. now asking for password.
No passwords work, including default_password.
Can't decrypt /data/media/0 by any means.
Cannot pull using ADB without key which is unkown.
Discovered f2fs isn't supported in new TWRP (WTH!?)
Tried downgrading to TWRP 3.1, won't load.
Tried dirty flashing stock ROM, fails
I have tried many variations of recovery, bootloaders and ROMs
The best I can get is TWRP 3.7 with lineage 19 that just hangs on the Loading animation. Let it go for 2 hours, nothing.
Please please help me. My end goal was to get the pictures so I could upgrade to Lineage OS 19.

Related

decrypt /data

move fstab using official recovery ( adbpull /vendor/etc/fstab.kirin970 and fstab.kirin970.data - remove "avb" and encryption from userdata, replace the encryption line on data with 'encryptable')
format /data in unofficial recovery
install magisk in official recovery
for some reason it only works in that order, if you try and do it all in official or unofficial recovery it doesnt work and magisk recognizes encryption on data.
after each step reboot bootloader and flash respective recovery, then fastboot reboot unplug and hold power and vol up to go straight into recovery and continue, if you boot you have to start over)
when installing magisk zip you should see that it doesnt say keep force encrypt.
and if you go in settings you have the option to encrypt.
virtyx said:
move fstab using official recovery ( adbpull /vendor/etc/fstab.kirin970 and fstab.kirin970.data - remove "avb" and encryption from userdata, replace the encryption line on data with 'encryptable')
format /data in unofficial recovery
install magisk in official recovery
for some reason it only works in that order, if you try and do it all in official or unofficial recovery it doesnt work and magisk recognizes encryption on data.
after each step reboot bootloader and flash respective recovery, then fastboot reboot unplug and hold power and vol up to go straight into recovery and continue, if you boot you have to start over)
when installing magisk zip you should see that it doesnt say keep force encrypt.
and if you go in settings you have the option to encrypt.
Click to expand...
Click to collapse
Hi there
I´m struggling to get lineage 15.1 to install without google framework errors
You mention offical and unofficial recovery. I guess you are talking about twrp
when you say move fstab do you mean remove?
Could this encryption be my problem with lineage and gapps not installing as it should?
buenso80 said:
Hi there
I´m struggling to get lineage 15.1 to install without google framework errors
You mention offical and unofficial recovery. I guess you are talking about twrp
when you say move fstab do you mean remove?
Could this encryption be my problem with lineage and gapps not installing as it should?
Click to expand...
Click to collapse
After you install lineage format /data that should work
Totally irrelevant to OP
If i hadn't tried that i wouldn't ask here.
Not TOTALLY irrelevant, as my question is about the official and unofficial twrp having trouble mounting and wiping before flashing rom..
Please stop trolling
virtyx said:
move fstab using official recovery ( adbpull /vendor/etc/fstab.kirin970 and fstab.kirin970.data - remove "avb" and encryption from userdata, replace the encryption line on data with 'encryptable')
format /data in unofficial recovery
install magisk in official recovery
for some reason it only works in that order, if you try and do it all in official or unofficial recovery it doesnt work and magisk recognizes encryption on data.
after each step reboot bootloader and flash respective recovery, then fastboot reboot unplug and hold power and vol up to go straight into recovery and continue, if you boot you have to start over)
when installing magisk zip you should see that it doesnt say keep force encrypt.
and if you go in settings you have the option to encrypt.
Click to expand...
Click to collapse
If you format data, isn't the device going to be empty?
Only time I've done this before I had to copy a ROM via MTP in recovery and then flash with no Verity.
So forgive me if I'm wrong but if I format data, won't I end up with no operating system?
dladz said:
If you format data, isn't the device going to be empty? J
Only time I've done this before I had to copy a ROM via MTP in recovery and then flash with no Verity.
So forgive me if I'm wrong but if I format data, won't I end up with no operating system?
Click to expand...
Click to collapse
/system is where the system lives
/data is userdata and applications
Noting wrong with formatting, you will lose all apps and data though
virtyx said:
/system is where the system lives
/data is userdata and applications
Noting wrong with formatting, you will lose all apps and data though
Click to expand...
Click to collapse
Legend, thanks for clearing that up.
:good:
I know off topic, but out of interest with the p20 pro, if you did find yourself with no OS how would you get back to a functional phone?
There's no custom ROMs to flash, just never been in this situation before.
Hypothetically
dladz said:
Legend, thanks for clearing that up.
:good:
I know off topic, but out of interest with the p20 pro, if you did find yourself with no OS how would you get back to a functional phone?
There's no custom ROMs to flash, just never been in this situation before.
Hypothetically
Click to expand...
Click to collapse
You can use hurupdater and download the firmware from firmwarefinder on your of
Happened a lot of times for me
Just as a headsup, you dont need to decrypt anything when you just wanna do some changes once and are proper admin level on your desktop machine, ive moved a whatsapp message history from previous phone (also taken from protected space there) to P20P just by attaching it to pc in file transfer mode and then adding myself as full control user in the security tabs of the several system folder properties i went in to, worked like a charm.
The point im trying to make: Android and Windows finally understand each others permission systems (not sure since how long as ive been away from android for a few years) so you can just attach it and use Windows perm system to give yourself access where needed, lots easier & faster then making a bunch of changes to your phone in effect disabling encryption, something you in most cases dont really want to do permanently anyway, so this is a nice workaround that doesn't touch your phone's encryption settings but still lets you mess about with system files.
Just my 2 cents.
virtyx said:
move fstab using official recovery ( adbpull /vendor/etc/fstab.kirin970 and fstab.kirin970.data - remove "avb" and encryption from userdata, replace the encryption line on data with 'encryptable')
format /data in unofficial recovery
install magisk in official recovery
for some reason it only works in that order, if you try and do it all in official or unofficial recovery it doesnt work and magisk recognizes encryption on data.
after each step reboot bootloader and flash respective recovery, then fastboot reboot unplug and hold power and vol up to go straight into recovery and continue, if you boot you have to start over)
when installing magisk zip you should see that it doesnt say keep force encrypt.
and if you go in settings you have the option to encrypt.
Click to expand...
Click to collapse
I did everything step by step, the encryption is gone and yet I still get that stupid permission denied error when I try to do a backup in TWRP. So. F*cking. Annoying.
Update: when I press the "Install" button in TWRP, it shows giberish, but if I go to Advanced>File Manager everything has it's proper name. WTF?!
Hmmm, If I don't tick "Vendor" in the backup, I get this error:
Can not create 'data/media/0/2021-01-20--07-26-51' folder (No such file or directory).
Failed to make backup folder.
Update on update: oof, now everything that's in the internal storage is gibberish, even in the OS.

TWRP ADB Sideload and File Install Problems on Nexus 5

Hello everyone,
I have a LG Nexus 5 and I want to install Lineage OS.
I was successfully (official) TWRP and (official) Lineage OS with GAPPs installed and used and many times OTA updated in past.
Few days ago I want wipe all old datas and fresh install Lineage OS and first download latest versions of (official) TWRP and (official) Lineage OS 14.1.
I downloaded TWRP via https://eu.dl.twrp.me/hammerhead/ and Lineage OS via https://web.archive.org/web/20190223223750/https://download.lineageos.org/hammerhead
I verified hashes before use this files.
Second I pressed "Volume Down + Power" buttons but old (version) TWRP not started. Nexus 5's screen look like factory image. After this "adb reboot bootloader", "fastboot devices", "fastboot flash recovery twrp-3.3.1-0-hammerhead.img".
I powered off Nexus 5 and press "Volume Down + Power" buttons but Nexus 5's screen look like factory image even move down by using Volume Down button and selected "Recovery mode" after press power button latest TWRP started. (I don't know is this normal? Old time I pressed "Volume Down + Power" buttons, directly TWRP started.)
Third I selected "Wipe", "Format Data", "Advanced Wipe", choosed "Cache and System" and they are wiped.
Fourth I backed to main page and selected “Advanced”, “ADB Sideload” and swiped. On my computer "adb sideload lineage-14.1-20190126-nightly-hammerhead-signed.zip". Process succesfully completed. But I navigated to "Install" via main page I didn't see "lineage-14.1-20190126-nightly-hammerhead-signed.zip". My "sdcard" directory look like only within TWRP directory. Even so I turned main page and selected "Reboot", "System" swiped and after reboot Lineage OS 14.1 normally started and I was succesfully set up it.
Fifth I just wondered Lineage OS 16 on Nexus 5 and I downloaded in here (unofficial) LineageOS 16 for Nexus 5.
https://forum.xda-developers.com/google-nexus-5/orig-development/rom-lineageos-16-0-nexus-5-t3921162
And verified hash for 20190719. (It was latest version in time I downloaded.)
Sixth start TWRP and wipe necessary locations. (Format Data, System, Cache)
Go to ADB Sideload and (on computer) "adb sideload lineage-16.0-20190719-UNOFFİCİAL-hammerhead.zip"
Terminal printed (only): "Total xfer: 0.01x"
---------------------------TWRP Screen Start--------------------------
Updating partition details...
...done
Full SELinux support is present.
MTP Enabled
Formatting Data using make_ext4fs...
You may need to reboot recovery to be able to use /
data again.
Updating partition details...
...done
Formatting System using make_ext4fs...
Formatting Cache using make_ext4fs...
Updating partition details...
...done
Starting ADB sideload feature...
Installing zip file '/sideload/package.zip'
Warning: No file_contexts
Target: google/hammerhead/hammerhead:6.0.1/M4B30Z/
3437181:user/release-keys
detected filesystem ext4 for /dev/block/bootdevice/
by-name/system
Patching system image unconditionally...
E1001: Failed to update system image.
Updater process ended with ERROR: 7
---------------------------TWRP Screen End---------------------------
Seventh I want reflash (official) Lineage OS 14.1 because of Lineage OS 16 flash failed and I wiped old installed Lineage OS 14.1 but ADB Sideload again same error. (This file before successfully transferred and installed.)
Eight I downloaded factory image (6.0.1 (M4B30Z, Dec 2016)) for Nexus 5. in here https://developers.google.com/android/images#hammerhead
It was completely installed without any error and started. I set up it. (I don't lock bootloader.)
I used "flash-all.sh".
Nineth I re-installed TWRP and retry same installation. Again fail with same error.
I tried some solutions for solve this problem but they aren't solve my problem.
1) Install different versions of TWRP. (3.3.1-0, 3.3.0-0, 3.2.1-1)
2) Delete "assert line" in "updater-script" explained this video https://www.youtube.com/watch?v=VCqROwIGLLE
3) Lineage OS file transfere to external USB drive and connect the Nexus 5 via USB OTG cable. (Error or not detect USB drive for different results depend versions of TWRP.)
4) Repair "data" partition. (Ext4 file system.)
How to solve this problem and install Lineage OS?
Note: I am using Manjaro. https://manjaro.org/
I am not a native english speaker. Sorry for my wrongs.
The official Lineage 14.1 with the unofficial Lineage 14.1, 16.0 have differences with their keys, the unofficial is not signed with lineage private key.
You may see the razoloves' post #2994
and cvxda post #2
sant514 said:
The official Lineage 14.1 with the unofficial Lineage 14.1, 16.0 have differences with their keys, the unofficial is not signed with lineage private key.
You may see the razoloves' post #2994
and cvxda post #2
Click to expand...
Click to collapse
Hello,
I know their keys different but I try clean install. I wiped System, Cache, Dalvik / ART Cache and Format Data.
I can't transfer any zip file via ADB Sideload. I always face same problem on TWRP.
"E1001: Failed to update system image.
Updater process ended with ERROR: 7"
I installed succesfully official Lineage OS with same method in past but now I can't transfer/install same old official or different unofficial any zip file.
What I don't understand is Google's factory image transferring and installing without any problem.
I am not a native english speaker. Sorry for my wrongs.
earthling2019 said:
Hello,
I know their keys different but I try clean install. I wiped System, Cache, Dalvik / ART Cache and Format Data.
I can't transfer any zip file via ADB Sideload. I always face same problem on TWRP.
"E1001: Failed to update system image.
Updater process ended with ERROR: 7"
I installed succesfully official Lineage OS with same method in past but now I can't transfer/install same old official or different unofficial any zip file.
What I don't understand is Google's factory image transferring and installing without any problem.
I am not a native english speaker. Sorry for my wrongs.
Click to expand...
Click to collapse
You get this error in TWRP during installation of unofficial LOS16 because from 20190719 build and beyond you have to do repartition procedure in order to increase system partition.
Just look here https://forum.xda-developers.com/showpost.php?p=79928889&postcount=190
If you've never done repartition before you're good to go with post i've provided.
Otherwise you have to return stock partition layout.You have to look at the following post in order to do this procedure https://forum.xda-developers.com/go...ment/repartition-nexus-5-repartition-t3844395
Actually i don't know your current O.S. Manjaro,but if you follow carefully these posts you'll be able to flash and enjoy LOS16 perfectly.
srepole said:
You get this error in TWRP during installation of unofficial LOS16 because from 20190719 build and beyond you have to do repartition procedure in order to increase system partition.
Just look here https://forum.xda-developers.com/showpost.php?p=79928889&postcount=190
If you've never done repartition before you're good to go with post i've provided.
Otherwise you have to return stock partition layout.You have to look at the following post in order to do this procedure https://forum.xda-developers.com/go...ment/repartition-nexus-5-repartition-t3844395
Actually i don't know your current O.S. Manjaro,but if you follow carefully these posts you'll be able to flash and enjoy LOS16 perfectly.
Click to expand...
Click to collapse
Hello,
When I started this topic, can't transfer any official or unofficial Lineage OS zip file. (Include official/unofficial 14.1)
I found a solution for this problem few days ago and succesfully installed unofficial Lineage OS 16 and then 14.1. (I used before July 19 Lineage OS 16 build for not to require repartitioning.)
DISCLAIMER:
I am NOT responsible for any damage. This solution at your own risk.
I found this solution:
DISCLAIMER:
I am NOT responsible for any damage. This solution at your own risk.
You make sure battery charged.
1st start TWRP and go to "Wipe", "Format Data", "yes"
2nd go to "Advanced Wipe", select "Dalvik /ART Cache, System, Data, Internal Storage, Cache" and "Swipe to Wipe"
3rd go to TWRP home screen "Reboot", "Power Off"
Wait for 10 minutes.
4th start TWRP and go to "Advanced", "ADB Sideload", "Swipe to Start Sideload", transfer Lineage OS zip to smart phone from computer.
DISCLAIMER:
I am NOT responsible for any damage. This solution at your own risk.
I am not a native english speaker. Sorry for my wrongs.

Fail to permanent install and access TWRP due to encryption

Recently I just downgraded my Mi Mix 2s to MIUI V9.6.4.0.ODGMIFD via Miflash and planning to stay on this (global) rom. However, after flashing the latest twrp from the official link (v3.1.1-1) it did not ask for the lockscreen password upon entering the interface and my files just showed up with random filenames.
After some reading, I suppose my device is encrypted and twrp did not let me to decrypt it (without asking for lockscreen password). The random filenames still happens even I remove the lockscreen password before flashing twrp meaning the device is still encrypted. Before I could do anything else (flashing zip files, making backups, etc) I must format data to remove the encryption, but twrp will disappear after I booted into system and did the initial phone configuration. Tried different versions (from 3.2.3-0 to 3.3.1-1) but to no avail. The only way I can retain twrp after booting into system is to flash Magisk zip right after formatting data, but if I enter twrp again the filenames are still in random characters as before and I couldn't do anything in it.
So my question is how can I properly install twrp into my device without having the encryption issues? Could it be the rom that caused the problem or did I missed out any steps that fails to disable the encryption? Thanks for your attention.
WannaFly3721 said:
Recently I just downgraded my Mi Mix 2s to MIUI V9.6.4.0.ODGMIFD via Miflash and planning to stay on this (global) rom. However, after flashing the latest twrp from the official link (v3.1.1-1) it did not ask for the lockscreen password upon entering the interface and my files just showed up with random filenames.
After some reading, I suppose my device is encrypted and twrp did not let me to decrypt it (without asking for lockscreen password). The random filenames still happens even I remove the lockscreen password before flashing twrp meaning the device is still encrypted. Before I could do anything else (flashing zip files, making backups, etc) I must format data to remove the encryption, but twrp will disappear after I booted into system and did the initial phone configuration. Tried different versions (from 3.2.3-0 to 3.3.1-1) but to no avail. The only way I can retain twrp after booting into system is to flash Magisk zip right after formatting data, but if I enter twrp again the filenames are still in random characters as before and I couldn't do anything in it.
So my question is how can I properly install twrp into my device without having the encryption issues? Could it be the rom that caused the problem or did I missed out any steps that fails to disable the encryption? Thanks for your attention.
Click to expand...
Click to collapse
Guess I've found a workaround for this by installing the OrangeFox recovery project (ofrp). For those who stuck at the same issue as mine this is what I did:
1. Flash twrp img through adb fastboot.
2. Format data to remove encryption.
3. Paste ofrp zip file into the device and flash it via twrp, which boots the phone into ofrp interface.
4. Paste the recovery zip file into the device and flash it via ofrp. Under setting - MIUI OTA it should show 'enabled' (for android 9 and above might need to uncheck disable dm-verity first according to ofrp page, but my rom is at android 8 so I left it checked as default before flashing).
5. Reboot to system and complete the initial configuration.
6. Reboot to recovery again and ofrp should remain installed. From there I was then able to perform a backup.
Btw, under phone settings it says my device is still encrypted although I can access to ofrp without having the encryption issue as in twrp (random filenames, cannot transfer files or create backups, etc). Anyhow I now have a working custom recovery on the stock rom, cheers.

How to reinstall Magisk/root after updating to MIUI 12.5.2?

I should have expected this but after updating to MIUI 12.5.2, Magisk/root is no longer installed and the Magisk App only offers the option to "Select and Patch a File" , which I understand requires a full wipe and I don't want to do that.
Orangefox is also corrupted. I can still boot to it but it doesn't prompt me for my encryption code, so it can't access the data partition. Maybe I can just reflash that but can I flash Magisk from there after that to restore root without having to wipe the phone?
So it appears that the problem is MIUI 12.5 (or any MIUI ROMS based on Android 11), prevent decryption working in recovery mode. https://wiki.orangefox.tech/en/guides/encryption
I tried flashing TWRP and that doesn't decrypt the storage and just shows gibberish filenames too.
So, if we can't decrypt in recovery mode, we can't make backups and we can't install Magisk to restore root to make backups with apps like Titanium, what are we supposed to do?

Samsung devices (2) stuck in system boot splash

HI,
I have 2 Samsung devices with TWRP installed, and I can access the TWRP recovery menu. When I install the flash ROM and try to boot, devices are stuck in system boot forever.
Device 1: SM-T800, with LineageOS 14.1 previously. I opened an email and the device got hacked, so I did a factory reset (which failed), then re-flashed the latest TWRP and recovered rescue mode. Now when I flash the Lineage ROM (from TWRP) the device does not boot to system but keeps showing the splash screen. I think the hack might have placed immutable files under system. could I format this partition to zero it out via ADB? What other choices are there?
<EDITED>
Device 2: Galaxy S3 GT-I9300 - I solved this so i removed this section.
Thank you for any help.
Beeblebrox-BSD said:
HI,
I have 2 Samsung devices with TWRP installed, and I can access the TWRP recovery menu. When I install the flash ROM and try to boot, devices are stuck in system boot forever.
Device 1: SM-T800, with LineageOS 14.1 previously. I opened an email and the device got hacked, so I did a factory reset (which failed), then re-flashed the latest TWRP and recovered rescue mode. Now when I flash the Lineage ROM (from TWRP) the device does not boot to system but keeps showing the splash screen. I think the hack might have placed immutable files under system. could I format this partition to zero it out via ADB? What other choices are there?
Device 2: Galaxy S3 GT-I9300, with working TWRP. This device is giving a "Failed to mount /efs (Invalid argument)" error. The previous setup was shared storage with sdcard and encryption on both internal and sdcard. The sdcard got corrupted, hence the error. This post suggests running
Code:
dd if=/dev/zero of=/dev/block/bootdevice/by-name/modemst1
but the device does not have identifiable boot device under /dev/block. I think this might work if I can identify the boot partition name?
Thank you for any help.
Click to expand...
Click to collapse
Flash a custom ROM for i9300 via TWRP. Download a custom ROM for i9300 and the appropriate Gapps to go with the ROM, store them on external sdcard. When you are in TWRP, before you flash your ROM, select the "Wipe" option, then select "advanced wipes", on the next menu, choose the system partition, data partition, cache partition and dalvik cache partition then swipe the slider to wipe. Then go back to home screen in TWRP and choose the "Install" option, then choose your ROM file and your Gapps file then swipe to flash. When the flash is finished, select the "Reboot system" option and see if it boots into system.
If that doesn't work, we will take some steps further back and try starting from the beginning.
Keep in mind that some of the custom ROMs for i9300 may have a different partition structure and partition sizes than the stock firmware for i9300 has and may require resizing certain partitions such as the system partition by flashing a custom PIT file like the Galaxy S2 had to do before it flashed certain custom ROMs.
Hi, thanks for the input.
* I had already solved the GT-I9300 issue before your post (I should have added to thread rather than edit the original post). I solved issue with that device by including system partition in the wipe.
* For the SM-T800, I used a LineageOS-14.1 that I had stored somewhere. That also did not work, until I only flashed Lineage and did not include any GApps. If I really need it, I can always flash later. I assume the latest GApps 7.1 build conflicts with older ROMs.
An unexpected problem was the lack of current ROMs for the 2 devices. SM-T800 has nothing other than last build Lineage-14-1-20190205. The I9300 has several unofficial ROMs floating around for newer Android versions, but they are all debug/dev builds with enabled options that drain the battery very quickly.
If anyone comes across a decent ROM for either of these devices please LMK. Thanks.

Categories

Resources