Samsung galaxy tab a 10.1 cant mount data - Samsung Galaxy Tab A series Questions & Answers

Had this fixed on my first one . Had to return it and I cant find how i fixed it. Rooted. TWRP gives error message cant mount data. I cant backup or restore. Can someone point me to the fix, please?

Please note any instructions contained within this post are to be followed AT YOUR OWN RISK. I am not responsible for data loss, device failure, or any other form of damages resultant from the below post.
Final Edit: Method below tested and working on my SM-T580. Please read entire post before making any device modifications.
The reason you cannot mount /data is because TWRP does not support Samsung encryption, and your /data partition is encrypted by default. To fix this, you must disable encryption and FORMAT (not just wipe) your /data partition. You will lose all data on your device by doing this.
To disable encryption you must flash this ZIP file by ashyx via TWRP. I will update this post momentarily with the link.
Edit: Procedure that worked for me is as follows: [YOU MUST HAVE A ROM FILE TO REINSTALL]
-oem unlock and flash twrp
-format data
-wipe cache, dalvik, system, and data
-back out to main menu and reboot recovery
-flash your rom of choice back onto the device, I personally am using Fenix v2 found on XDA
-flash ashyx zip *not sure if this is actually necessary but it couldnt hurt, I flashed this file at this time
-reboot system
-then reboot to recovery to flash xposed, sd patch, etc
-you will see that twrp successfully mounts /data
Good luck!

REtails said:
Please note any instructions contained within this post are to be followed AT YOUR OWN RISK. I am not responsible for data loss, device failure, or any other form of damages resultant from the below post.
The reason you cannot mount /data is because TWRP does not support Samsung encryption, and your /data partition is encrypted by default. To fix this, you must disable encryption and then FORMAT (not wipe) your /data partition. You will lose all data on your device by doing this.
To disable encryption you must flash this ZIP file by ashyx via TWRP. I will update this post momentarily with the link.
Edit: There you go, so to recap: backup important data, reboot to recovery, flash zip, reboot to recovery, format data, reboot to system.
Click to expand...
Click to collapse
NO joy. See my post in stock ROM above (below now I guess...)

tennessee_titan said:
NO joy. See my post in stock ROM above (below now I guess...)
Click to expand...
Click to collapse
What? Not sure what you meant but it seems there is more to it than this. For some reason my device is forcing encryption across all sorts of wipes and such so I am currently trying to figure this out as well, will update if/when I figure it out
Edit: got it, updating post and sending you a PM

Related

[Q] TWRP backup fails on data partition "E: Unable to stat /data/data/../cache/ .. "

[Q] TWRP backup fails on data partition "E: Unable to stat /data/data/../cache/ .. "
Whenever I try a full nandroid backup in TWRP it always fails once it gets a few hundred files into the data partition. However, it does complete the backup when the data partition isn't selected.
When I first start the backup a bunch of different red error messages come up for various cache files in the data partition.
"E: Unable to stat '/data/data/[variousapp]/cache/[stuff]/[hashvalue?]' "
I've got a rooted T-Mobile Note 3 with Jedi Elite ROM and TWRP 2.8.1.0, however I'm not completely sure that my phone is legitimately rooted. If I try to open the SuperSU app it says "There is no SuperSU binary installed,...", and applications constantly achieve root access then get denied it moments later. Or sometimes the applications achieve root access with no further issues, it's quite random.
Does anyone have any idea what could be going on?
EDIT: It also should be noted that the files in the error messages can be found when using the TWRP file manager, but when using any file manager application with the OS booted the "/data" folder appears empty.
Anyone have any idea?
Thanks
Well.... from the top of my head I would try to do these things:
1) install one of those "check to see if I am rooted" apps and run it.
2) flash a kernel that has been prerooted, i.e.:that it installs the SU binary to the appropriate location.
3) flash one of those .zip packages in twrp that root your phone.
4) check to see if you can make twrp install root for you ( i think when it doesn't detect root binary it offers to do that).
5) reinstall rom only part as a last resort?
Once you restore proper root access you might need to restore proper SELinux labels to /cache /system /data.
Let me know if you get to this part and need specific instructions.
Best of luck
CekMTL said:
Well.... from the top of my head I would try to do these things:
1) install one of those "check to see if I am rooted" apps and run it.
2) flash a kernel that has been prerooted, i.e.:that it installs the SU binary to the appropriate location.
3) flash one of those .zip packages in twrp that root your phone.
4) check to see if you can make twrp install root for you ( i think when it doesn't detect root binary it offers to do that).
5) reinstall rom only part as a last resort?
Once you restore proper root access you might need to restore proper SELinux labels to /cache /system /data.
Let me know if you get to this part and need specific instructions.
Best of luck
Click to expand...
Click to collapse
I flashed the latest SuperSU.zip and that ended up fixing root access. The Root Checker app verifies it as well as other applications being granted root access.
I tried flashing CF-Auto-Root in TWRP and it fails.
How do I restore the SELinux labels for those directories?
You caught me on my way to bed but here are the instructions:
From terminal or adb shell
su
ll -Z
(check for any "unlabeled" text for /data /cache /system)
restorecon -Rv /cache
restorecon -Rv /data
mount -o remount,rw /system
restorecon -Rv /system
mount -o remount,ro /system
ll -Z (you should not find any "unlabeled" /cache /data /system)
Let me know how it goes
I tried all those commands from the terminal and it still shows all of the same "Unable to stat" error messages when backing up
The "ll -Z" command, is that supposed to be double pipe or double L? I'd never seen a double L command before so I couldn't get it to work if that's what it is.
Sorry to budge in but I have the same problem too on my oneplus one. Everytime I do something in twrp it saids unable to stat /data/data/com.android.chrome/something I wiped /data and it still does that. I tried to install custom rom and when it starts it saids something is wrong with my system udi and com.android.phone keeps on crashing. So I don't know how I am suppose to fix this. If I format /data I will lose all my pictures,music,apps,etc. since it will wipe /data/media? Any help?
Edit: Upon reading the first post again, I also can't perform nandroid backup because it fails at /data. Which was why I wanted to try different rom and wipe /data to see if it would be fixed.
patstar5 said:
Sorry to budge in but I have the same problem too on my oneplus one. Everytime I do something in twrp it saids unable to stat /data/data/com.android.chrome/something I wiped /data and it still does that. I tried to install custom rom and when it starts it saids something is wrong with my system udi and com.android.phone keeps on crashing. So I don't know how I am suppose to fix this. If I format /data I will lose all my pictures,music,apps,etc. since it will wipe /data/media? Any help?
Edit: Upon reading the first post again, I also can't perform nandroid backup because it fails at /data. Which was why I wanted to try different rom and wipe /data to see if it would be fixed.
Click to expand...
Click to collapse
pat, did you have any luck fixing this? i'm having the exact same issue with my oneplus
---------- Post added at 03:13 PM ---------- Previous post was at 03:05 PM ----------
utjock12 said:
pat, did you have any luck fixing this? i'm having the exact same issue with my oneplus
Click to expand...
Click to collapse
alright i said screw it and wiped internal storage and it fixed the issue. i had to push ROM onto the new storage through ADB but it seemed to fix the issue.
For anyone who is wondering you need to do a FULL wipe (ie in recovery wipe EVERYTHING including internal storage), then push or mount devices through recovery and put ROM back onto SD card.
bu_plus said:
Hi friend,
I have tried my best to locate the download link for the new ver. 5.00 ROM but with no success.
Kindly could you please provide me with the link. BTW, I'm using firefox browser.
Best regards,
bu_plus
Click to expand...
Click to collapse
Well you fixed it the easy way, I went to the thread on how to turn oneplus one back to stock.
http://forum.xda-developers.com/oneplus-one/general/guide-return-opo-to-100-stock-t2826541
I unzipped the 44s Stock ROM and manually flashed each file via adb to it, that cleared up all my problems. I did lose some data, at least at had my apps, messages, and pictures backed up.
Sent from my Oneplus One using XDA Free mobile app.
utjock12 said:
pat, did you have any luck fixing this? i'm having the exact same issue with my oneplus
---------- Post added at 03:13 PM ---------- Previous post was at 03:05 PM ----------
alright i said screw it and wiped internal storage and it fixed the issue. i had to push ROM onto the new storage through ADB but it seemed to fix the issue.
For anyone who is wondering you need to do a FULL wipe (ie in recovery wipe EVERYTHING including internal storage), then push or mount devices through recovery and put ROM back onto SD card.
Click to expand...
Click to collapse
I have this same problem with my OPO and I tried a full wipe including internal storage, but the "unable to stat..." problem still persists. Should I try using the "Format Data" option on TWRP instead of just the "Advanced Wipe"? I tried searching online for the difference but I can't really find any information.
monkey29992 said:
I have this same problem with my OPO and I tried a full wipe including internal storage, but the "unable to stat..." problem still persists. Should I try using the "Format Data" option on TWRP instead of just the "Advanced Wipe"? I tried searching online for the difference but I can't really find any information.
Click to expand...
Click to collapse
So I had my issue on my OPO also, still never confirmed what the actual issue was but after some googling I saw this thread and maybe one more with the same error description.
From TWRP I went Wipe->Advanced Wipe->Clicked ALL boxes.
From what I could tell the issue is actually on the "internal storage" partition which is your emulated SD Card.
I'm not actually sure what the "Format Data" option does tbh I never had to go that far.
Word of warning, make sure you have ADB working and you know how to push files to your phone. You can in theory use the "mount" option from TWRP and connect to a PC as an extendable drive but this functionality is super flaky and is known to not work on occasion.
you don't have to!!!!!!!!!!!
actually i formated it and i was looking for a way to transfer my zip file to internal storage ........... but when i clicked on backup/restore it started to install and booted normally !!!!!!!!!!!!! (by temp boot file)
Sad I am also facing this problem too. At last I have to format everything to get my phone working again, wiping /data does not work, must wipe /data including media.
Internal Storage failure?
This happens to me all the time all of a sudden. I did not change anything at all, except for flashing a new CM version.
I also get a strange stat error, something with google.photo cache.
Yesterday, I have then flashed the new 2.8.6(7) and that gave my phone the rest. It might be because I flashed through TWRP itself into the recovery partition, but now additional to the backup error above when I want to erase dalvik cache, the recovery just hangs. I also can't restore a backup atm.
Now I have reflashed the real 2.8.6.0 recovery and it still hangs when I want to wipe dalvik... wtf is going on here?
And oh yea, my phone does not boot anymore either, it just loops at the flash screen...
UPDATE:
After I found some info on this thread about similar issues, I factory reset my phone with stock recovery (TWRP was not reliable anymore, even the 2.8.6.0 version that was running perfectly before) and then reflashed the latest CM on a wiped internal storage. Now I am up and running again with minimal loss of data due to my TB backups that are scheduled and save to the SD.
But this leaves a very weird feeling back, basically my phone was rendered useless out of nowhere (I was running the previous CM for 2 weeks already), making TWRP backups impossible and forcing me to wipe the internal storage with all media on it without giving me the chance to back it up (MTP in TWPR was also very flaky and died several times half in copy operations). Something is going very wrong with this phone, never ever had that on any of my 5 previous htc devices and the fact that the OnePlusOne users are among the main ones that reported similar issues, I have a feeling it is linked to cheap storage quality. Motorola is a Chinese company now after all... :-/
Hello,
I had the same issue with my Galaxy s4 GT-I9500, it said "E: Unable to stat /data/...", wiping didn't fix, but after I run "format data", it fixed the issue for me.
I have been going through the same issue. I can fix it for 'a while' (by wiping and formatting data) before it comes back again. Anyone knows how to get rid of this once and for all?

Flashed TWRP and a custom rom; cannot access internal storage... please help

Guys I am in need of help. I did not fully understand step 10 in TWRP installation guide and just skipped originally. I did notice I could not wipe anything but thought I would be fine so I just dirty flashed custom ROM assuming wipe would work afterwards and I can clean install after.
I am obviously stuck now with 0MB internal storage shown along with no access to phone since it says upon boot that verification has failed and that I need to reset my phone.
Now, I do have important photos/datas which are invaluable and thus do not want to lose... I did hear other guys restored their nandroid backup and were fine.
My question is, is there any way for me to access and back up my internal data somehow? I did hear something like flashing a stock firmware via Odin without the cache inside. Could someone confirm that this would work please? Would really appreciate a response. Thanks guys.
I did try this:
If you only want a bootable system partition or writable data in TWRP:
Download dm-verity and force encryption disabler.
Without exiting TWRP, transfer no-verity-opt-encrypt.zip to your device over MTP* and flash it using [Install] in TWRP.
But TWRP would not allow me to flash because it said it could not mount storage. I presume this is because I exited TWRP...
Please, any guidance would be much appreciated.
Do a wipe, system, data/ dalvic , and cache . Do NOT check internal storage and SD card...reflash your rom
Player04 said:
Do a wipe, system, data/ dalvic , and cache . Do NOT check internal storage and SD card...reflash your rom
Click to expand...
Click to collapse
Thanks for the reply but I cannot do that since the phone does not let me wipe from TWRP due to the encryption issues I believe.
jay_993 said:
Thanks for the reply but I cannot do that since the phone does not let me wipe from TWRP due to the encryption issues I believe.
Click to expand...
Click to collapse
Could this help:
"Only if you want internal storage or data to work in TWRP:
Go to [Wipe] -> [Format Data] (not advanced wipe) -> type "yes".
WARNING: This will wipe your internal storage, disable encryption, and factory reset your phone!
Go to [Reboot] -> [Recovery]."
or
"If you only want a bootable system partition or writable data in TWRP:
Download the latest dm-verity and force encryption disabler zip.
Without exiting TWRP, transfer the no-verity-opt-encrypt zip to your device over MTP* and flash it using [Install] in TWRP."
Source: http://forum.xda-developers.com/s7-edge/development/recovery-official-twrp-hero2lte-3-0-0-0-t3334084
FinKing said:
Could this help:
"Only if you want internal storage or data to work in TWRP:
Go to [Wipe] -> [Format Data] (not advanced wipe) -> type "yes".
WARNING: This will wipe your internal storage, disable encryption, and factory reset your phone!
Go to [Reboot] -> [Recovery]."
or
"If you only want a bootable system partition or writable data in TWRP:
Download the latest dm-verity and force encryption disabler zip.
Without exiting TWRP, transfer the no-verity-opt-encrypt zip to your device over MTP* and flash it using [Install] in TWRP."
Source: http://forum.xda-developers.com/s7-edge/development/recovery-official-twrp-hero2lte-3-0-0-0-t3334084
Click to expand...
Click to collapse
Thanks man. I am aware of this but have not done so which is my problem haha. Does anyone know of this set PIN before flashing stock rom on ODIN please? I obviously cannot since I cannot boot to system but I do not want to make assumptions like before, go ahead and cause myself more stress...
Hold up, have you flashed SuperSU? That should be the only thing stopping you from being able to boot up. After flashing TWRP and a custom rom you need to install SuperSU to be able to boot.
Either try to flash SuperSU using TWRP built in ADB or buy an external sd card and flash from there. You don't need to disable encryption and in fact, that zip you tried to use actually wipes your internal storage anyway so don't try it again.

TWRP unable to mount data partition

Just tried taking a full backup in twrp but I got a message telling me that it failed as it was unable to mount data.
I get that this is due to the internal storage being encrypted.
During root, I didn't install dm-verity and force encryption disabler. If I flash the encryption disabler now, would that overcome the problem?
I've read advice that suggests wiping internal storage in twrp is the only way around it..
Thanks for any help.
Nope you need to format the data partition to make it accessible in twrp. NOTE: WIPING DATA WILL ERASE ALL YOUR APPS. Make a backup using titanium. Also copy all your files from internal storage. There is no other way around this :/ You will still have to flash the dm verity decrypter
BD_Man said:
Nope you need to format the data partition to make it accessible in twrp. NOTE: WIPING DATA WILL ERASE ALL YOUR APPS. Make a backup using titanium. Also copy all your files from internal storage. There is no other way around this :/ You will still have to flash the dm verity decrypter
Click to expand...
Click to collapse
Thank you for the reply.
I've just taken a full backup of apps and data with TiBu so that is sorted.
How should I proceed now? Twrp, wipe -> factory reset/advanced wipe/format and which options should I select in sub-menus please?
And then flash the dm verity decrypter after that.
Make sure to make a flashable zip file from the TiBu so you can restore those from recovery. First step is to go to the wipe menu and format data. Next swipe to factory reset. Then you can reboot to system to set everything up or install a custom rom if you wish (Make a backup of everything just to be on the safe side). Root if you want to and thats all
---------- Post added at 01:24 PM ---------- Previous post was at 01:21 PM ----------
And I forgot this: Welcome the the S7 Edge community ?

Can't create a backup through TWRP.

I tried creating a system backup through TWRP just now for the first time ever. Throughout the process, it gave me multiple messages saying "unable to mount data" and the same for some other folders, and when the backup supposedly finished, it just said failed.
Is there anything I can try without actually wiping either of the partitions? This obviously because I'm trying to create a backup so I can wipe afterwards.
cyborgium said:
I tried creating a system backup through TWRP just now for the first time ever. Throughout the process, it gave me multiple messages saying "unable to mount data" and the same for some other folders, and when the backup supposedly finished, it just said failed.
Is there anything I can try without actually wiping either of the partitions? This obviously because I'm trying to create a backup so I can wipe afterwards.
Click to expand...
Click to collapse
In twrp main menu screen select ' Mount ' menu and make sure mount data is ticked then go back and try backing up again.
spawnlives said:
In twrp main menu screen select ' Mount ' menu and make sure mount data is ticked then go back and try backing up again.
Click to expand...
Click to collapse
Thanks for your reply, it doesn't actually let me tick that box. Nothing happens when I tick it. It also says that the data partition is 0mb. Any idea what that might mean?
cyborgium said:
Thanks for your reply, it doesn't actually let me tick that box. Nothing happens when I tick it. It also says that the data partition is 0mb. Any idea what that might mean?
Click to expand...
Click to collapse
Which version of twrp are you using
Latest is 3.2.3.0 which should fix the data issue ( it"s a known issue).
spawnlives said:
Which version of twrp are you using
Latest is 3.2.3.0 which should fix the data issue ( it"s a known issue).
Click to expand...
Click to collapse
That's the TWRP version that I've got installed.
I just reinstalled both stock firmware and reflashed TWRP but the exact same issue persists. At first I was able to mount data though, I could flash zips such as Magisk etc. But after having set everything up again on my phone, I couldn't mount data anymore.
cyborgium said:
That's the TWRP version that I've got installed.
I just reinstalled both stock firmware and reflashed TWRP but the exact same issue persists. At first I was able to mount data though, I could flash zips such as Magisk etc. But after having set everything up again on my phone, I couldn't mount data anymore.
Click to expand...
Click to collapse
Not sure on your steps to install twrp
Have you tried going into twrp in wipe menu and format data
spawnlives said:
Not sure on your steps to install twrp
Have you tried going into twrp in wipe menu and format data
Click to expand...
Click to collapse
Maybe I wasn't very clear.
I flash the stock firmware, set that up to enable OEM unlock. Then flash TWRP, wipe /data, flash magisk and other required zips (at this point, data is mounted). I then set that all up however I want, install apps etc.
If I want to create a backup after all that, it doesn't work cause of the unable to mount /data and /storage.
cyborgium said:
Maybe I wasn't very clear.
I flash the stock firmware, set that up to enable OEM unlock. Then flash TWRP, wipe /data, flash magisk and other required zips (at this point, data is mounted). I then set that all up however I want, install apps etc.
If I want to create a backup after all that, it doesn't work cause of the unable to mount /data and /storage.
Click to expand...
Click to collapse
Sounds like your device is still encrypted
Did you flash the no Verity encrypt zip file
Also I said to format data not wipe.
In the mount menu these are the options I have enabled.
spawnlives said:
Sounds like your device is still encrypted
Did you flash the no Verity encrypt zip file
Also I said to format data not wipe.
In the mount menu these are the options I have enabled.
Click to expand...
Click to collapse
You're right, I formatted data, not wipe.
I did flash the no verity zip, does the order in which I flash Magisk, no-verity and RMM state unlock matter?
cyborgium said:
You're right, I formatted data, not wipe.
I did flash the no verity zip, does the order in which I flash Magisk, no-verity and RMM state unlock matter?
Click to expand...
Click to collapse
The instructions I followed to install twrp
Flash twrp (which you have done)
Format data
When finished reboot back into twrp(use twrp reboot menu option)
Flash no-verity zip via twrp ( have to make sure you have it on internal storage or SD card)
Then flash everything else
Not sure if you need RMM state unlock if your bootloader(OEM) is already unlocked in developer options though.
spawnlives said:
The instructions I followed to install twrp
Flash twrp (which you have done)
Format data
When finished reboot back into twrp(use twrp reboot menu option)
Flash no-verity zip via twrp ( have to make sure you have it on internal storage or SD card)
Then flash everything else
Not sure if you need RMM state unlock if your bootloader(OEM) is already unlocked in developer options though.
Click to expand...
Click to collapse
I've just done everything you stated above, still the same issue, can't mount /data.
Really don't understand what it is that im doing wrong or if I'm even doing anything wrong..
Thanks for your help anyway though, appreciate it.
cyborgium said:
I've just done everything you stated above, still the same issue, can't mount /data.
Really don't understand what it is that im doing wrong or if I'm even doing anything wrong..
Thanks for your help anyway though, appreciate it.
Click to expand...
Click to collapse
Just as matter of curiosity I use FX file explorer (root) in the menu filesystem it should tell you what format your data partition is mine or ext4. I have read that some people through twrp have changed it to something like ext3 and then back to ext4
Also this is the thread I used to install my twrp
https://forum.xda-developers.com/ga...pment/recovery-twrp-galaxy-s8-exynos-t3595102
This thread may also help you out
https://forum.xda-developers.com/ga...ment/fix-data-mount-fix-s8-twrp-oreo-t3769254
spawnlives said:
Just as matter of curiosity I use FX file explorer (root) in the menu filesystem it should tell you what format your data partition is mine or ext4. I have read that some people through twrp have changed it to something like ext3 and then back to ext4
Also this is the thread I used to install my twrp
https://forum.xda-developers.com/ga...pment/recovery-twrp-galaxy-s8-exynos-t3595102
This thread may also help you out
https://forum.xda-developers.com/ga...ment/fix-data-mount-fix-s8-twrp-oreo-t3769254
Click to expand...
Click to collapse
I think that second thread you linked may have done the trick.
At first it didn't seem to help, but when I tried it again after reflashing everything, I am now able to mount /data.
I'm still in the dark as to why this happened and hasn't happened to anyone else other than the person who created that file, but either way, thank you very much for your help.
cyborgium said:
Maybe I wasn't very clear.
I flash the stock firmware, set that up to enable OEM unlock. Then flash TWRP, wipe /data, flash magisk and other required zips (at this point, data is mounted). I then set that all up however I want, install apps etc.
If I want to create a backup after all that, it doesn't work cause of the unable to mount /data and /storage.
Click to expand...
Click to collapse
Try the modded twrp from nx thread

[KERNEL][RECOVERY][LOS15.1] F2FS upstreamed Kernel + TWRP for Lineage 15.1

WARNING: I am not responsible if you brick your device or lose any data. I personally heavely tested these releases myself and have not encountered any problems.
These are built on official sources and nothing more should be broken but remember to always make backups before installing any mods, kernels etc.!
You should read everything I wrote in this thread before taking any steps unless you know exactly what are doing.
About:
Okay, so I was tired of almost not usable Magisk on official builds because of outdated Moto F2FS implementation, so I built new LOS15.1 kernel and Treble-compatible TWRP with newer version of it for myself and I want to share this with you.
You may ask why I did it and what does it change, so here's the list of features:
This combo may be solution for smooth transition from 15.1 --> 16 without losing data (Without this you will need to reformat your /data partition before flashing when the day of 16 comes - confirmed by Mike). I cannot say 100% that it give you this ability but I'm pretty sure it will!
This Kernel and TWRP applies to LineageOS 15.1, all LOS15.1-based ROMs (like RRemix) and all Treble GSI's.
F2FS loopback fix module is not needed anymore, you can directly install modules from Magisk Manager app.
Magisk modules are persistent now. They will never disappear, even when cache is cleared.
Magisk hide settings are persistent now. They will not reset after reboot.
You can now use systemless hosts properly (No ads and SafetyNet is still passing!).
Filesystem R/W speeds may and should be slightly better (I haven't tested this myself so feel free to do before-after benchmark comparisions).
Don't need to start from zero. You can restore your /data backup after formatting device and it will work just fine.
TWRP is updated to version 3.2.3-0 so it may fix OTA's on "enter pin to boot" encrypted devices.
In TWRP there's written "Lineage" next to it's version to avoid confusion, especially for newbs (Lineage because everyone's talking about LOS TWRP and it's also built on Lineage source)
"Format Data" button in "Wipe" screen is temporarily removed until I/we find fix to make it work. This feature is still broken and causing bootloops (Like on TWRP from LOS Wiki). You still need to use official one for decryption.
That's all I think. I will edit this thread If missed something.
Instructions:
* This instruction applies to new and existing LOS-based ROMs users *
* This tutorial I wrote for someone may be useful if you need help with bootloader mode(fastboot) *
Important: If you don't care about porting your /data to newer F2FS (not talking about Internal data) and willing to start from "zero" then you just should typical LOS installation steps + changing kernel (Steps 1 - 8 and 14 eventually if you're going to restore some pictures or something)
1. Do /data partition and/or Internal Storage backups if you didn't already. Pull them to your computer or SD card.
2. Flash TWRP 3.2.3-0 Lineage build (lineagetwrp.img) from the download section using method you want (fastboot one is recommended).
3. Flash latest official build of LOS15.1 (If you have it already then you can skip this step).
4. Flash bootimage (f2fs_boot.img): Install > Install Image > f2fs_boot.img and check "Boot"
5. Download latest official TWRP from HERE
6. Boot to bootloader mode (fastboot) and use this command "fastboot boot [OFFICIAL_TWRP_IMAGE.img]" to boot into official TWRP without flashing it.
7. When in official TWRP: Wipe > Format Data > type "yes". If it fails then reboot to bootloader mode (Main menu > Reboot > Bootloader) and boot it once again as in point 3 (It happens very often).
8. If formatting went fine then go to: Reboot > Recovery to boot to recovery flashed before. After it boots just make sure that it says "3.2.3-0 Lineage" on top bar like in attachment screnshot
9. Wipe > Advanced Wipe > check "Data" > Repair or Change File System > Change File System > F2FS (This step is not really necessary but it confirms that everything is set up if no errors was throwed here).
10. Reboot to recovery and put your TWRP /data backup on your Internal Storage via PC - Skip if on SD card.
11. Restore your TWRP backup.
12. Don't exit yet if you haven't restored from SD card. There's a little bug(?) where your data from Internal Storage will stay in /data/media directory but MTP will switch to /data/media/0/ after first boot so you will be not able to see that data via PC. Make sure you've deleted these files before rebooting to system. You can do this after first start too but these files will extend encypting time at least twice.
13. Finally you can reboot. In case you were using any lockscreen when doing a backup you should check THIS
14. You can put back your internal storage data right when ROM successfully booted.
Download:
DOWNLOAD - 12.01.2019
Troubleshooting:
If you encounter any problems in any of these steps you will probably need to start from step 6.
Still not able to do this or messed something up very badly so u can't enter TWRP? Try entering bootloader mode and type "fastboot erase userdata", then proceed to step 6.
Remember: After doing an OTA you will need to flash "f2fs_boot.img" once again before booting into system. Else you will end in constant reboots until you do this. Kernel will be updated when some changes will be pushed into it (not often)
Any support for this will be probably instantly dropped after first stable enough release of LineageOS 16.
Have Fun!​
All thanks goes to @mikeioannina for commiting to kuntao sources which I used here.
Kernel source
Recovery source​
Thx, I was looking for this.
---------- Post added at 10:11 AM ---------- Previous post was at 09:20 AM ----------
I reread the whole article again and better to wait for lineage os 16 and fixes. I am fine with ext4 now. No need to mess with twrp and bootloops
Well, the most complicated flashing orgy so far...
Why making another kernel for putting just 1 commit that fixes f2fs? Recovery was needed because for treble we are still using 3.2.2-0, but kernel is useless, @mikeioannina could merge that commit in official lineage kernel.
mahmutpekkara said:
Thx, I was looking for this.
---------- Post added at 10:11 AM ---------- Previous post was at 09:20 AM ----------
I reread the whole article again and better to wait for lineage os 16 and fixes. I am fine with ext4 now. No need to mess with twrp and bootloops
Click to expand...
Click to collapse
There's almost no changes in that kernel compared to stock. The same for TWRP. The real difference between this procedure and re-installing LOS15.1 is installing the kernel file. Resetting lockscreen settings (because your pins will not work) was always the case when restorong nandroid backup.
If you're on ext4 then just stay on it. Not worth doing it in your case
RayDeemer said:
Well, the most complicated flashing orgy so far...
Click to expand...
Click to collapse
It's not that complicated even if it looks like that. It's very detailed, step by step comparing to typical flashing instructions. I did this because I know that a lot of users from this forum have problems even with simple things. Like I said before: the only difference between this and reinstalling ROM with restoring /data partition is flashing boot.img. Not my fault that this treble TWRP formatting feature is broken and nandroid backups are breaking login when PIN is set.
matteo0026 said:
Why making another kernel for putting just 1 commit that fixes f2fs? Recovery was needed because for treble we are still using 3.2.2-0, but kernel is useless, @mikeioannina could merge that commit in official lineage kernel.
Click to expand...
Click to collapse
This will not gonna happen and that's why I compiled it myself. He reverted this change before it came live and I just readded it (https://github.com/LineageOS/androi...it/48c639c3581eb04693ae0771d8e85ce1151550b4).
You will probably find his post around page 50 of LOS thread about that.
He said that he will be not push this change to build since it will break LOS14 -> LOS15.1 transition when doing an OTA (user data will be corrupted if I remember correctly).
If you wondered why this tutorial is long and "complicated" like people said before then as you can see it turns out that data transition could be done with simply doing nandroid backup and then restoring it. These step are 90% of this tutorial due to bugs which are in lineage TWRP and "bugs" because that TWRP is backing up ROM with lockscreen settings which are breaking every time when restoring from backup. Also removing backup data step is necessary because these files will slow down encryption and will be not placed in /sdcard so people will forget about it probably and wonder what is eating so much space.
EDIT: I forgot to add that Mike refused my opinion about this but at the end you will still need to format your data anyway when going from 15.1 to 16. This kernel with TWRP may be solution for smooth transition to 16.
Kielbek said:
This will not gonna happen and that's why I compiled it myself. He reverted this change before it came live and I just readded it (https://github.com/LineageOS/androi...it/48c639c3581eb04693ae0771d8e85ce1151550b4).
You will probably find his post around page 50 of LOS thread about that.
He said that he will be not push this change to build since it will break LOS14 -> LOS15.1 transition when doing an OTA (user data will be corrupted if I remember correctly).
If you wondered why this tutorial is long and "complicated" like people said before then as you can see it turns out that data transition could be done with simply doing nandroid backup and then restoring it. These step are 90% of this tutorial due to bugs which are in lineage TWRP and "bugs" because that TWRP is backing up ROM with lockscreen settings which are breaking every time when restoring from backup. Also removing backup data step is necessary because these files will slow down encryption and will be not placed in /sdcard so people will forget about it probably and wonder what is eating so much space.
Click to expand...
Click to collapse
Ok, I understand. I think that some things in lineage wiki for p2 must be more clear. Starting from the guide for going from stock ROM to lineage 15.1...
matteo0026 said:
Ok, I understand. I think that some things in lineage wiki for p2 must be more clear. Starting from the guide for going from stock ROM to lineage 15.1...
Click to expand...
Click to collapse
Yeah, wiki instructions are a big mess. You actually need to perform most of steps I've written and described here if coming from another ROM (Steps 1 - 8) and you can do this few different ways
Maybe I will shorten this tutorial by fixing some aspects of TWRP and then request it to be included in the wiki so it will be easier for everyone.
Kielbek said:
Yeah, wiki instructions are a big mess. You actually need to perform most of steps I've written and described here if coming from another ROM (Steps 1 - 8) and you can do this few different ways
Maybe I will shorten this tutorial by fixing some aspects of TWRP and then request it to be included in the wiki so it will be easier for everyone.
Click to expand...
Click to collapse
Yes, for example for going from stock to los15.1 the right steps are:
- unlock bootloader and install official twrp 3.2.3-0
- (in case, do a backup)
- wipe system, data, cache and dalvik
- format data in ext4 (with official kernel, with yours I think it's not needed)
- install treble twrp
- wipe system, data, cache and dalvik another time
- install los15.1 (+ in case your kernel) + gapps and eventually addonsu or magisk
- reboot system
matteo0026 said:
Yes, for example for going from stock to los15.1 the right steps are:
- unlock bootloader and install official twrp 3.2.3-0
- (in case, do a backup)
- wipe system, data, cache and dalvik
- format data in ext4 (with official kernel, with yours I think it's not needed)
- install treble twrp
- wipe system, data, cache and dalvik another time
- install los15.1 (+ in case your kernel) + gapps and eventually addonsu or magisk
- reboot system
Click to expand...
Click to collapse
Yep, the only difference is that I suggest to use "fastboot boot recovery.img" with official twrp instead of flashing it directly to /recovery partition to prevent meaningless excessive data writing here. NAND will last for longer.
Kielbek said:
Yep, the only difference is that I suggest to use "fastboot boot recovery.img" with official twrp instead of flashing it directly to /recovery partition to prevent meaningless excessive data writing here. NAND will last for longer.
Click to expand...
Click to collapse
You are right, but I think NAND is not a problem, we are going to flash recovery maybe 10-20 times in all the device's life, no more
I am now on los15.1 with ext4 data partition which is encrypted. So can I direclty update recovery to this one or I need to do something else ?
Mrinmay Medhi said:
I am now on los15.1 with ext4 data partition which is encrypted. So can I direclty update recovery to this one or I need to do something else ?
Click to expand...
Click to collapse
Yes, of course you can directly update it. If you're on EXT4 it will work for you just fine like version from LOS wiki and maybe even better. Assuming to changelog this version fixes OTAs on encrypted devices. Only F2FS users need to reformat their data.
Hopefully when lineage os 16 released, treble twrp can format data properly, and decrypt/format/use right f2fs system...
mahmutpekkara said:
Hopefully when lineage os 16 released, treble twrp can format data properly, and decrypt/format/use right f2fs system...
Click to expand...
Click to collapse
There's no doubt that it will use newer F2FS version. Not sure about TWRP tho. Maybe I will look into it.
Kielbek said:
There's no doubt that it will use newer F2FS version. Not sure about TWRP tho. Maybe I will look into it.
Click to expand...
Click to collapse
Please do, we need one dedicated TWRP. Also thx again.:angel:
@Kielbek hi does it fix 1689mhz stuck speed bug?
Cuvillier said:
@Kielbek hi does it fix 1689mhz stuck speed bug?
Click to expand...
Click to collapse
What do you mean by this? I don't have such problems.
@Kielbek
How can we disable force encrypt from the kernel?

Categories

Resources