REQ: Unshrink data partition - Magisk

Hello!
Not sure if this has happened, but I think my data partition has shrunk. My device (s10e) used to show 107 GB, now it shows ~ 15.7 GB. Is there a way to un-shrink data partition and restore it? I have TWRP at the moment. Was about to install LOS17.1 but stopped.
Reason: I did the stupid thing even though you (topjohn)asked not to, "Never flash only an AP file, as Odin can shrink your /data file-system if you do." Someone in the forums had a thorough, detailed post, saying to flash tarred files to AP slot (did not mention by themselves or with other files as well).
Thanks!

goodflood said:
Hello!
Not sure if this has happened, but I think my data partition has shrunk. My device (s10e) used to show 107 GB, now it shows ~ 15.7 GB. Is there a way to un-shrink data partition and restore it? I have TWRP at the moment. Was about to install LOS17.1 but stopped.
Reason: I did the stupid thing even though you (topjohn)asked not to, "Never flash only an AP file, as Odin can shrink your /data file-system if you do." Someone in the forums had a thorough, detailed post, saying to flash tarred files to AP slot (did not mention by themselves or with other files as well).
Thanks!
Click to expand...
Click to collapse
Flashing Stock rom should fix it...
Sent from my moto g(7) play using Tapatalk

@PoochyX That did it; thank you so much!

I have a Samsung SM-T290, running Android 9. Whatever I do, Magisk seems to shrink my data partition from 32G to 8G. I think I scrupulously followed topjohnwu's directions (except that I put the stock AR module on the SD card and moved it between the device and my laptop via sneakernet rather than adb pull). I used Odin to flash BL, the patched AP, CP and CSC (not Home-CSC). Magisk was installed alright, and I achieved root, but my storage was reduced to 8GB.
The only way I've found so far to bring my storage up to 32GB was to factory reset, which removes Magisk and root. I tried extracting the PIT file from CSC in the stock ROM and doing a NAND erase and reformat, but as long as I'm using the patched AR with Magisk, I end up with 8GB.
What am I doing wrong?

Further to the above: Just to dot all the i's and cross all the t's, I repeated the process, using adb pull to transfer the patched AP file, as topjohnwu recommended. The same thing happened: my data partition was reduced to 8GB.
Also, I've noticed, that whenever I insert the patched AP into Odin, it accepts it almost immediately, while it takes quite a while reading the original AP tar. Could this indicate that Magisk is corrupting the AP tar file when it patches it?

pgurwitz said:
Further to the above: Just to dot all the i's and cross all the t's, I repeated the process, using adb pull to transfer the patched AP file, as topjohnwu recommended. The same thing happened: my data partition was reduced to 8GB.
Also, I've noticed, that whenever I insert the patched AP into Odin, it accepts it almost immediately, while it takes quite a while reading the original AP tar. Could this indicate that Magisk is corrupting the AP tar file when it patches it?
Click to expand...
Click to collapse
I think the speed difference is due to whether it's ending with n.n.tar.md5 or just n.n.tar. The time probably has to do with the unpacking of md5.
By the way: My capacity also shrunk from 32 to 16 GB on my Xcover 4s

Related

[ROM] STOCK - FULL ICS IMM76D.LP10 for Verizon i815 LTE Tab (only!) *UPDATE 10/16*

UPDATE: My hosting I had for XDA related work expired, so I re-uploaded everything here: http://www.mods4cars.com/pub/xda
Hi everyone. As pretty much everyone of us who got suckered into buying this excellent (hardware) tab from Verizon knows, their update strategy has been very slow and on top of that, glitchy. Finally, 4 months after the other editions of this tab, we're getting ICS... BUT the update is an incremental OTA update that fails on 99% of the tabs, because it expects a version FD01b instead of the FD01 most of us have. The update seems to have gone through for only 2 or 3 lucky users who must somehow have had FD01b on their tab when they got it.
So after one of the best collaboration efforts on the "Tab 7.7 General" forums, I am happy to present to you
The CWM flashable "full stock" ROM for the SCH-i815 - ICS IMM76D.LP10
First up, let me stress again that this is a HACK and that this is RISKY and that if something goes wrong you MAY end up with a BRICK that will require complicated revival ceremonies! Unfortunately I *have* to say here, that whatever you do here, you do AT YOUR OWN risk, I can not be held liable for anything!
Prerequisites:
Verizon SCH-i815 LTE Tablet (ONLY this version!) with Honeycomb (everyone should have FD01 at this point)
Windows PC with Samsung USB drivers installed, meaning when you connect the tab, you should be able to copy files to it.
A micro-SD Card 2GB or bigger, preferable BLANK, FAT32 formatted.
Step 1: Prepare the SD card
Connect the SD card to your PC and copy the ROM files to it.
ROM Choices:
Original Cloned ROM (First version with direct partition image copy, requires >1GB space on SD card which has caused issues for some)
http://electron73.org/XDA/i815/electron_ICS-LP10_i815.zip
Update 10/12:
NEW ROM with full ext4 optimizations. System, Cache and Data (only in wipe version) will be cleared, formatted and "fsck -Dfy" checked!
DO NOT WIPE ANYTHING IN CWM!!! Just choose the ROM file appropriately.
Non-Wipe Version (This one leaves existing data partition alone, only checks it for errors)
http://electron73.org/XDA/i815/electron_ICS-LP10_i815_nowipe.zip
Wipe Version (THIS ONE WILL FORMAT DATA PARTITION, ALL USER DATA WILL BE LOST!)
http://electron73.org/XDA/i815/electron_ICS-LP10_i815_wipe.zip
Step 2: Download the Odin CWM Recovery pack and get ready to flash
Odin Pack: http://electron73.org/XDA/i815/electron_i815_odin_pack.zip
This ZIP contains everything you need now and later during this process. Extract it in any folder you like (Desktop/Odin or C:\Odin).
Run Odin3 v1.85.exe
Step 3: Bring the tab into Odin mode
Hold down the power and volume down buttons on your tab continuously until you see the big warning. Press volume UP to enter flash (odin) mode. Connect USB. In Odin the leftmost ID:COM field should now be yellow. Click the PDA button and select the cwm-6.0.1.1-i815.tar file. Leave everything else as-is. Click start to flash and when it says rebooting immediately grab the tab and hold down power and volume UP until you see the blue CWM screen! If you don't do this and let the tab boot, then it will automatically kill CWM (yes, bastards!), so don't let it boot the regular ROM!
Step 4: Flash the ICS ROM
Insert the card into the tablet, then in CWM go to install zip from sdcard, then choose zip from external sdcard. Select the electron_ICS-LP10_i815_v2.zip.
It will flash the kernel, the radio (LTE modem), the factory fs (/system) and preload partitions. The whole flash will take about 5 min. Especially on the last two steps be patient, it takes a while to extract 800mb and then flash the full filesystem image. Turning off power here (or running out of battery juice!) will make the rom unbootable and will require a full re-do. IMPORTANT: This requires the use of an external SD card! Using internal storage will not work!
WARNING: DO NOT wipe or factory reset in CWM! You can simply install ICS over an existing Honeycomb setup! Choose the correct ROM version: One erases everything and the other one preserves user data. Since this was originally an OTA, it knows how to convert your saved data. So all your emails, save games etc. will still be there! We had too many reports of problems when wiping/factory resetting with CWM. So for now the best advice for anyone looking into installing the ROM is DO NOT WIPE!
UPDATED PROCEDURE as of 10/16 - NO NEED to flash the old 3e recovery any more! Much easier and quicker baseband update below...
Step 5: Download and flash the baseband modem.bin with ODIN
Download the baseband update: http://electron73.org/XDA/i815/electron_ICS-LP10_i815_modem.zip
Bring the tab back into ODIN mode the same as before. Extract the modem.bin file from the modem.zip and drop it in the PHONE section (not PDA!) in ODIN this time. Click start and let it flash and reboot. Done. Under settings/about device you should now have Baseband Version i815.04 V.LP10 / I815LP10
B]Step 6: Optional: Keep CWM or go all stock[/B]
If you would rather like to be full stock than keeping CWM as the recovery program, then bring the tab back into ODIN mode one last time (pwr + vol down) and Connect USB, then flash LP10_recovery.
The ROM is pre-rooted. SuperSU is pre-installed as part of the ROM.
Trouble?
If the tab for some reason gets stuck in a boot loop with the Verizon animation playing over and over, don't fret! Give it AT LEAST 10 full minutes to start with and if it still doesn't show the home screen after that, hold down power and vol up until you're in CWM and wipe data/factory reset (yes, that will completely kill all user data and the tab will be "like new").
Trickier: If you see any warnings in CWM or 3e stock recovery, that there was an error mounting /data, then you lost the data partition and need to do extensive hacking before the tab will ever boot again. We fixed exactly this problem beginning on the very bottom of the page here http://forum.xda-developers.com/showthread.php?t=1927392&page=16 so don't panic! This repair surgery thanks to the excellent guide by Androguide.fr here: http://forum.xda-developers.com/showthread.php?t=1862294
Thanks
Thanks to everyone involved in making this happen! Especially asenduk for dumping the image backups from his tab, rayjr13 for bringing this whole thing to my attention and sending me the first OTA bin file.
Every use of the thanks button is greatly appreciated
Hi, thank you so much for these instructions and all the help. I was wondering does that 6.0.1.1 protect you from the brick bug and I saw that you hosted the V2 file in the original thread but here you have the regular file hosted. Is the V2 better?
johnny13oi said:
Hi, thank you so much for these instructions and all the help. I was wondering does that 6.0.1.1 protect you from the brick bug and I saw that you hosted the V2 file in the original thread but here you have the regular file hosted. Is the V2 better?
Click to expand...
Click to collapse
What is this brick bug people speak of? Bricking during a flash or bricking when you're sleeping at night and doing nothing to the tab?
Thanks again for this Rom electronic73! Hopefully some devs will take this as a base and run with it!
Sent from my SCH-I815 using xda premium
johnny13oi said:
Hi, thank you so much for these instructions and all the help. I was wondering does that 6.0.1.1 protect you from the brick bug and I saw that you hosted the V2 file in the original thread but here you have the regular file hosted. Is the V2 better?
Click to expand...
Click to collapse
Yes the 6.0.1.1 (as far as I know!) is safe. No need to wipe anyway. The v2 included more files that turned out to be not necessary. The files posted here along with the updated, safer method of flashing, should be the best and quickest way to get to full stock ICS.
The v2 was mainly an attempt to bring user ice's tab back to life after his data partition got killed.
Newbie question of the day - where is the IMEI stored on the 7.7? If it's in /system, won't this result in *everyone* flashing this image ending up with the same IMEI (which causes a whole set of problems of its own)?
Rodney
Thank you so much, and I do plan on doing a wipe to clear out my Tab to bring it to a clean slate. Just didn't want it to be a broken state lol.
rhester72 said:
Newbie question of the day - where is the IMEI stored on the 7.7? If it's in /system, won't this result in *everyone* flashing this image ending up with the same IMEI (which causes a whole set of problems of its own)?
Rodney
Click to expand...
Click to collapse
IMEI and such is stored in the mmcblk0p1 partition which (along with 2 and 3 which are the bootloader) we don't touch. So no, we only flash the factory fs, lte modem and kernel. CDMA modem.bin via the new method.
electron73 said:
Hi everyone. As pretty much everyone of us who got suckered into buying this excellent (hardware) tab from Verizon knows, their update strategy has been very slow and on top of that, glitchy. Finally, 4 months after the other editions of this tab, we're getting ICS... BUT the update is an incremental OTA update that fails on 99% of the tabs, because it expects a version FD01b instead of the FD01 most of us have. The update seems to have gone through for only 2 or 3 lucky users who must somehow have had FD01b on their tab when they got it.
So after one of the best collaboration efforts on the "Tab 7.7 General" forums, I am happy to present to you
The CWM flashable "full stock" ROM for the SCH-i815 - ICS IMM76D.LP10
First up, let me stress again that this is a HACK and that this is RISKY and that if something goes wrong you MAY end up with a BRICK that will require complicated revival ceremonies! Unfortunately I *have* to say here, that whatever you do here, you do AT YOUR OWN risk, I can not be held liable for anything!
Prerequisites:
Verizon SCH-i815 LTE Tablet (ONLY this version!) with Honeycomb (everyone should have FD01 at this point)
Windows PC with Samsung USB drivers installed, meaning when you connect the tab, you should be able to copy files to it.
A micro-SD Card 2GB or bigger, preferable BLANK, FAT32 formatted.
Step 1: Prepare the SD card
Connect the SD card to your PC and copy the ROM files to it.
ICS ROM: http://electron73.org/XDA/i815/electron_ICS-LP10_i815.zip
Modem Upgrade: http://electron73.org/XDA/i815/electron_ICS-LP10_i815_modem.zip
Make sure you have MORE than 1GB of free space left on the SD card when done.
Step 2: Download the Odin CWM Recovery pack and get ready to flash
Odin Pack: http://electron73.org/XDA/i815/electron_i815_odin_pack.zip
This ZIP contains everything you need now and later during this process. Extract it in any folder you like (Desktop/Odin or C:\Odin).
Run Odin3 v1.85.exe
Step 3: Bring the tab into Odin mode
Hold down the power and volume down buttons on your tab continuously until you see the big warning. Press volume UP to enter flash (odin) mode. Connect USB. In Odin the leftmost ID:COM field should now be yellow. Click the PDA button and select the cwm-6.0.1.1-i815.tar file. Leave everything else as-is. Click start to flash and when it says rebooting immediately grab the tab and hold down power and volume UP until you see the blue CWM screen! If you don't do this and let the tab boot, then it will automatically kill CWM (yes, bastards!), so don't let it boot the regular ROM!
Step 4: Flash the ICS ROM
Insert the card into the tablet, then in CWM go to install zip from sdcard, then choose zip from external sdcard. Select the electron_ICS-LP10_i815_v2.zip.
It will flash the kernel, the radio (LTE modem), the factory fs (/system) and preload partitions. The whole flash will take about 5 min. Especially on the last two steps be patient, it takes a while to extract 800mb and then flash the full filesystem image. Turning off power here (or running out of battery juice!) will make the rom unbootable and will require a full re-do. IMPORTANT: This requires the use of an external SD card! Using internal storage will not work!
BTW there is NO NEED to wipe! You can simply install ICS over an existing Honeycomb setup! Since this was originally an OTA, it knows how to convert your saved data. So all your emails, save games etc. will still be there!
Step 5: Flash the old Honeycomb recovery in order to do the modem upgrade
Since CWM does not understand the proprietary command used to flash the "firmware" which is the base modem file, we need to use STOCK recovery for this. The downside is that, of course, the new recovery is now locked down and won't accept unsigned files. So we need to flash the OLD Honeycomb FD01 recovery and feed it the modem update!
When the CWM flash above is finished and tells you to reboot, simple press and hold power and vol down again to get back into ODIN mode. Connect the USB again and this time use Odin the same way as above, but to flash the FD10_recovery.tar. This time uncheck the "reboot" tick mark.
Step 6: Flash the modem upgrade with the old stock 3e recovery
When Odin is done above, hold down pwr and vol up until you see the old school recovery pop up saying *manual mode*. Select flash update zip from sdcard and select the electron_ICS-LP10_i815_modem.zip this time. It will go on for a while in total bling flight. No output apart from rotating gears! This one is tricky. Just wait until it either ends saying that it is done or a yellow exclamation point shows up in the middle of the screen. The flash is done.
Step 7: Choose between Stock and CWM
Now bring the tab back into ODIN mode one last time (pwr + vol down) and Connect USB, then flash either CWM or LP10_recovery if you rather like to be full stock. If you chose CWM then be aware that the ROM will try to overwrite that immediately on first boot!! In order to avoid that, flash it with "reboot" box unticked and manually reset into CWM mode (pwr + vol up) and inside CWM select reboot system. It will then give you a big warning that the ROM has a CWM killer and offers you to disable that, so CWM will stay in place (good for Nandroids etd).
Step 8: Boot the ICS ROM and enjoy!
Once you see ICS, go to the play store and install SuperSU. The rom is pre-rooted and just needs the SuperSU app for full root access control.
Trouble?
If the tab for some reason gets stuck in a boot loop with the Verizon animation playing over and over, don't fret! Give it AT LEAST 10 full minutes to start with and if it still doesn't show the home screen after that, hold down power and vol up until you're in CWM and wipe data/factory reset (yes, that will completely kill all user data and the tab will be "like new").
Trickier: If you see any warnings in CWM or 3e stock recovery, that there was an error mounting /data, then you lost the data partition and need to do extensive hacking before the tab will ever boot again. We fixed exactly this problem beginning on the very bottom of the page here http://forum.xda-developers.com/showthread.php?t=1927392&page=16 so don't panic! This repair surgery thanks to the excellent guide by Androguide.fr here: http://forum.xda-developers.com/showthread.php?t=1862294
Thanks
Thanks to everyone involved in making this happen! Especially asenduk for dumping the image backups from his tab, rayjr13 for bringing this whole thing to my attention and sending me the first OTA bin file.
Every use of the thanks button is greatly appreciated
Click to expand...
Click to collapse
Hey Electron, thanks again for your outstanding work as well as all involved to make this happen. Since I installed your V2 this morning, I can skip the ICS ROM installation and go straight to step 5 right? Or is it better to start over from scratch?
Sent from my Nexus 7 using xda premium
bathanr said:
Hey Electron, thanks again for your outstanding work as well as all involved to make this happen. Since I installed your V2 this morning, I can skip the ICS ROM installation and go straight to step 5 right? Or is it better to start over from scratch?
Sent from my Nexus 7 using xda premium
Click to expand...
Click to collapse
Same here, what steps do I take to flash the updated modem
Awesome!
ice0901 said:
Same here, what steps do I take to flash the updated modem
Click to expand...
Click to collapse
from step 5 on forward. no need to reflash the whole rom if you already have ICS running.
Just odin the old recovery on, flash the modem update zip, then odin the new recovery or CWM back.
boot loop
Not sure whats up. Ive had your rom on all day. No problems. When i went to install the modem update, i entered odin and installed stock recovery, and boom, went into a verizon logo boot loop. i continued any way with the modem install, then put cwm back on, then wiped and data factory reset. waited 10 minutes during bootloop. Gave up, totally reflashed entire V2 Rom, again, stuck on a bootloop...so nwiped and data factory reset again,,,,still a bootloop....
bummer...does it just run until battery dies?
rspong said:
Not sure whats up. Ive had your rom on all day. No problems. When i went to install the modem update, i entered odin and installed stock recovery, and boom, went into a verizon logo boot loop. i continued any way with the modem install, then put cwm back on, then wiped and data factory reset. waited 10 minutes during bootloop. Gave up, totally reflashed entire V2 Rom, again, stuck on a bootloop...so nwiped and data factory reset again,,,,still a bootloop....
bummer...does it just run until battery dies?
Click to expand...
Click to collapse
Weird. OK did the v2 flash go all the way through? Did it finish at some point and say "please reboot" ? Or did it get stuck half way though?
Can you in CWM mount your internal storage? Did you get any errors when you did the full wipe/factory reset? anything saying "error mounting /data" maybe ?
electron73, did you create the .pit file in the cwm zip? It does not seem to match my i815 (which may be my problem, that mine is wrong)
I noticed the latest stock rom is like 550mb opposed to the one you uploaded this morning which was 990mb.. Is there a difference?
almus said:
electron73, did you create the .pit file in the cwm zip? It does not seem to match my i815 (which may be my problem, that mine is wrong)
Click to expand...
Click to collapse
No I didn't create it but it is guaranteed the right one for i815. I know because I messed up my partition table last night and had to use that pit to repartition Lucky I found that. What you would do in order to re-do your pit is open odin, put the CWM in the PDA section as usual and then click PIT and select that pit. That should activate a checkbox "repartition device". Leave that on for this one run and click start.
As a result it should partition, then flash the CWM and you should immediately be able to enter CWM. With CWM running connect USB
and use adb shell to get onto your tab.
IN the root prompt enter parted /dev/block/mmcblk0
and in the parted prompt enter print. If you see the result as in the attached pic (note: no file system in the DATAFS line) then you need to fix that the same way ice got it fixed last night. I think the link to the thread is in the OP
bathanr said:
I noticed the latest stock rom is like 550mb opposed to the one you uploaded this morning which was 990mb.. Is there a difference?
Click to expand...
Click to collapse
Yes the difference is that the preload partition (550mb decompressed) is not included any longer. Not needed. It was never altered in the first place. It only contains a game and useless verizon demonstration videos. I found out later that it had been untouched since Honeycomb FA02c
Yes. V2 went through with no problems.in CWM I can mount efs,cache,system but not data. Then in cwm... OK..wiping data then I get a error mounting data. Skipping format
Sent from my DROID RAZR using xda premium
chefdave12118 said:
What is this brick bug people speak of? Bricking during a flash or bricking when you're sleeping at night and doing nothing to the tab?
Thanks again for this Rom electronic73! Hopefully some devs will take this as a base and run with it!
Sent from my SCH-I815 using xda premium
Click to expand...
Click to collapse
The flash controller in our tablets is buggy. See here http://forum.xda-developers.com/showthread.php?t=1862294
electron73 said:
Yes the difference is that the preload partition (550mb decompressed) is not included any longer. Not needed. It was never altered in the first place. It only contains a game and useless verizon demonstration videos. I found out later that it had been untouched since Honeycomb FA02c
Click to expand...
Click to collapse
Thanks again man.. You have put forth an awesome effort in this work.. Sent you a little something as an appreciation:good:
---------- Post added at 09:43 PM ---------- Previous post was at 08:46 PM ----------
bathanr said:
Thanks again man.. You have put forth an awesome effort in this work.. Sent you a little something as an appreciation:good:
Click to expand...
Click to collapse
I ran into the splash screen just hanging and followed the data retore steps. I keep getting this error when trying to print the print command from the parted prompt.
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Flatlinz>f:
F:\>cd 7.7
F:\7.7>cd adb
F:\7.7\adb>adb shell
adb server is out of date. killing...
* daemon started successfully *
~ # ls
ls
boot init sys
cache init.rc system
charger lpm.rc tmp
data preload ueventd.goldfish.rc
default.prop proc ueventd.rc
dev recovery ueventd.smdk4210.rc
efs res vendor
etc sbin
external_sd sdcard
~ # parted /dev/block/mmcblk0
parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
print
print
Error: Can't have the end before the start!
(parted)
Any ideas?

[Q] Think I deleted the file system from my phone

Before flashing a new rom, I tried formatting /data and /system manually, via recovery. I also tried (because I'm smart that way) to format the file system drive via a nice little tool called diskwipe, which succeeded. Ever since then, i think I don't have a hard drive anymore on my phone, because it seems the roms I've tried to install are being placed on the sdcard. Windows won't recognize it either (it sees the sdcard).
In linux, it shows me that the filesystem is active, just separate from the phone's memory, which can't be accessed. Also, the /mnt folder is empty.
Roms install fine, just without any access to google play or the beginning step-by-step google registration process and so on. I don't have anything on the phone I can't do without, so any help would be vastly appreciated, because it seems I turned a smartphone into an old Nokia :good:
Thanks!
m
Could you connect your phone still to your pc and does Odin detect it in download mode?
Think then you can try to Restock with repartition selected and do so a clean new flash of the rom of your choice....
rodman01 said:
Could you connect your phone still to your pc and does Odin detect it in download mode?
Think then you can try to Restock with repartition selected and do so a clean new flash of the rom of your choice....
Click to expand...
Click to collapse
yep, works, thanks! my question is how to use it with only one zip file, when odin requests all those separate files. i have the ops file, but where do i put the rom zip? I know there's the one package option, but they're zips, not md5's or whatever. I can just ignore that and load the zip?
No via odin you have to take a tar file...and to restock propperly, take a three parted firmware and partition ticked with 512 pit.
Here is a thread with different tools and especially the first row, with rescue and recovery kits is what you need and can take.
http://forum.xda-developers.com/showthread.php?t=1796807&highlight=adb+download
or take slappys rescue kit, link is indcluded in an other of m post:
http://forum.xda-developers.com/showpost.php?p=36168807&postcount=5
managed to get back to stock via odin and one of the samfirmware packages. many thanks to all! :laugh:

(Guide) Get TWRP Working with Data Access on Stock [UPDATED]

Thanks to @seadersn and @SGCMarkus, Markus's new TWRP makes things extremely simple now.
What you need:​SGCMarkus's TWRP
fstab.judypn with forceencrypt set to encryptable.
magisk
and the .magisk file​
Instructions:​
1. Follow the instructions to boot and install TWRP on SGCMarkus's TWRP thread
2. While you're still in TWRP, mount vendor and push the fstab.judypn with:
Code:
adb push path/to/fstab.judypn /vendor/etc
3. Format data via TWRP.
4. Push the .magisk to /data (For dm-verity reasons. It will restore the fstab.judypn with forceencrypt enabled) with:
Code:
adb push path/to/.magisk /data
5. Flash Magisk.
You're done! No bootloops this time. XD
i want to try this at some point. When i did before, the screen was black. Thanks for the guide!
I need to get US pie on my device but will be doing this
i got some issues..
i cant mount system_root and i saw there is no /system_root/system/priv-app folder... so i took modified LGSettings.apk to sd card and i put it to /system/system/priv-app/LGSettings... then i format userdata in fastboot,i got twrp loop.....
dreamss29 said:
i got some issues..
i cant mount system_root and i saw there is no /system_root/system/priv-app folder... so i took modified LGSettings.apk to sd card and i put it to /system/system/priv-app/LGSettings... then i format userdata in fastboot,i got twrp loop.....
Click to expand...
Click to collapse
Flash the magiskpatched boot img included in the files
I just had my bootloader unlocked. I am trying to install TWRP, but if I flash stockpiemagisk.img or TWRP-judypn-2019-07-01.img then use the buttons to choose a factory reset I just get bootloops. I select yes both times, just like normal and it loops until going to a fastboot screen. I can then flash the original magisk_patched.img I got from the guy who unlocked my bl, but no TWRP. Even he wasn't sure why this is happening. Any ideas anyone?
Also, in case its related, I lost download mode and can't get that back even by flashing an original backup of laf_b or the lgup compatible laf. I had download mode and flashed Pie before the bl unlock...
Edit: I got download mode back. Turns out when he was unlocking the bootloader he flashed abl_b incorrectly. Once I flashed it correctly DL mode works... Now for TWRP...
NVM.... found the problem...
I have an issue. After clearing the userdata procedure, this attached images is what I get. It's a reddish boot-up screen. The Active Slot also defaulted to B (as opposed to A). I have a fastboot-loop. I am wondering where I went wrong. I completed a successful procedure on another device hours ago. LGUP does not function as well. The phone defaults to Fastboot.
I am able to get to TWRP but the fastboot-loop has changed. The image attached is what I get. I suppose in my attempt to remedy, the wrong Laf files have been flashed. It's V405UA20a
Hello mister
Actually is it possible to flash this stockpie.img on a V406EBW ?
Regards
Fred
avaie said:
I have an issue. After clearing the userdata procedure, this attached images is what I get. It's a reddish boot-up screen. The Active Slot also defaulted to B (as opposed to A). I have a fastboot-loop. I am wondering where I went wrong. I completed a successful procedure on another device hours ago. LGUP does not function as well. The phone defaults to Fastboot.
Click to expand...
Click to collapse
I have exactly the situation you described (fastboot loop + pink letters screen when I try to get into DL mode). If you've managed to rectify this, can you please give me directions. Thanks.
crubbish said:
I have exactly the situation you described (fastboot loop + pink letters screen when I try to get into DL mode). If you've managed to rectify this, can you please give me directions. Thanks.
Click to expand...
Click to collapse
Hi - I eventually lost root and the system factory-reset after an attempt to boot into TWRP. I have scheduled to have VLAD reflash the entire phone. My bootloader is unlocked though but don't think much can be done. There might be other variables that might be affected.
If there is a guide to using Octoplus, it will be appreciated. It also seems telegram is the new medium for development.
avaie said:
I have scheduled to have VLAD reflash the entire phone. .
Click to expand...
Click to collapse
That's what I plan to do as well. Thanks for responding!
crubbish said:
That's what I plan to do as well. Thanks for responding!
Click to expand...
Click to collapse
All the best.
will try out to follow up this info
When I follow step 3 "Format data via TWRP", at the end of the format it says:
"Updating partition details...
...done
Full SELinux support is present.
WTP Enabled
Formatting Data using mke2fs...
Done.
You may need to reboot recovery to be able to use /
data again.
Updating partition details...
...done
UNABLE TO MOUNT STORAGE, DECRYPTION NEEDED FIRST"
I don't think that's good... Or is it?
Please Clarify/Help
I have managed to get TWRP installed and working but did not notice to do this. I went ahead and used Android already only to find that I need to do this.
I have booted into TWRP but cannot select vendor to mount it. Everything except system and vendor (and USB-OTG because there is not attached) will let me check them. But not vendor.
Do I have to go all the way back and re-install TWRP and to this before I do ANYTHING else? Do I have to do this while I am still in TWRP loaded from the image on my PC?
I realize this will loose all I have done within Android and that is the price I pay for not reading in detail. But I want to make sure this is the last time.
Thanks!
Not What I Expected - Decryption Failed!
I went ahead and re-installed TWRP from fastboot per the Markus thread After rebooting back into TWRP I then followed instructions in the 1st post here.
I could not mount vendor but I saw messages saying it was busy. So I assumed it was not unmounted and went ahead with the push to /vendor/etc. It reported successful from adb. And in TWRP file manager I can see a file named /vendor/etc and in the terminal I can cat its contents which look like what I see on my PC.
I then wiped the /data only using advanced wipe and it used makefs, not format.
I then pushed .magisk to /data and it too reported successful from adb.
I then flashed magisk and that seemed successful as well. Inside to TWRP's file manager, I was able to see the .magisk and various folders under /data. This seemed promising enough.
I finally rebooted to system and got shown what is in the attached screenshot. At that point, I had no option but to agree to the reset. When I touched that button, I was returned to TWRP. So I powered off from TWRP and tried to restart the phone. Once again I get the same decryption unsuccessful.
So I seem to be in a TWRP loop. How to proceed? Thanks
whitedavidp said:
I went ahead and re-installed TWRP from fastboot per the Markus thread After rebooting back into TWRP I then followed instructions in the 1st post here.
I could not mount vendor but I saw messages saying it was busy. So I assumed it was not unmounted and went ahead with the push to /vendor/etc. It reported successful from adb. And in TWRP file manager I can see a file named /vendor/etc and in the terminal I can cat its contents which look like what I see on my PC.
I then wiped the /data only using advanced wipe and it used makefs, not format.
I then pushed .magisk to /data and it too reported successful from adb.
I then flashed magisk and that seemed successful as well. Inside to TWRP's file manager, I was able to see the .magisk and various folders under /data. This seemed promising enough.
I finally rebooted to system and got shown what is in the attached screenshot. At that point, I had no option but to agree to the reset. When I touched that button, I was returned to TWRP. So I powered off from TWRP and tried to restart the phone. Once again I get the same decryption unsuccessful.
So I seem to be in a TWRP loop. How to proceed? Thanks
Click to expand...
Click to collapse
Well, as they say, if at first... I went through the steps here again. I made sure I hit the format button instead of wipe. And I made triple sure that everything was where it seemed to need to be and looked right. When I finally rebooted to system, I am now in Android setup as expected. To see if there is still encryption (ie, TWRP can see and backup /data) remains to be seen. Cheers
whitedavidp said:
Well, as they say, if at first... I went through the steps here again. I made sure I hit the format button instead of wipe. And I made triple sure that everything was where it seemed to need to be and looked right. When I finally rebooted to system, I am now in Android setup as expected. To see if there is still encryption (ie, TWRP can see and backup /data) remains to be seen. Cheers
Click to expand...
Click to collapse
Sadly, once finished with a minimal Android setup I went back into TWRP and /data shows nothing. In backing up, it shows /data as 0 bytes. So I presume this means I am still encrypted. Is there no way out of this hell? Thanks
whitedavidp said:
Sadly, once finished with a minimal Android setup I went back into TWRP and /data shows nothing. In backing up, it shows /data as 0 bytes. So I presume this means I am still encrypted. Is there no way out of this hell? Thanks
Click to expand...
Click to collapse
Here's the thing I would try. Load up LGUP and reload a stock kdz. Make sure that before you begin futzing with the phone, you are booting from Slot A.
Then retrace all the steps carefully. And don't set up anything on the phone until you have reached nirvana (bootloader unlocked, unencrypted, Magisk installed).
You'll get there.
[NG]Owner

Advanced advice for internal storage recovery after attempted flash to LineageOS 17

Hi everyone. Got a puzzle for you forensic data recovery guys out there. I am a fool having a bad day today. For the first time in 10 years of screwing with Android, I backed up my ROM with twrp and also backed up my sms and calls, but then managed to somehow forget to copy those files off the internal storage before trying to flash my phone to LineageOS and botching the internal storage. Here is what happened.
0) Before state: Rooted (I think) and for sure running OxygenOS 5.0.3, flashed via TWRP. TWRP version 3.2.1-0. 128 GB OnePlus 3T
1) Backed up System, data, etc to backup on internal storage via TWRP. Booted into OS and backed up SMS and calls to .xml file.
2) Wiped data, system, cache and dalvik/art cache.
3) Downloaded LineageOS w/ microG via zip in TWRP and attempted to install. Received error that I needed to update the modem to at least 9.0.3.
4) Mounted storage from TWRP and copied in Stable9.0.3+Firmware+Modem_OnePlus+3T.zip. Ran the install and was successful.
5) Installed lineage-17.1-20200826-microG-oneplus3.zip via TWRP. Left prompt to install TWRP checked and booted into OS.
6) Upon boot, saw the message: "Decryption unsuccessful" The password that you entered is correct but unfortunately your data is corrupt.
7) Rebooted back into TWRP to mount storage. Could not get anything to mount because it would not accept my decrypt passcode.
8) Figured TWRP bug, flashed twrp-3.4.0-0-oneplus3.img via fastboot. Could decrypt now with passcode but all storage read 0MB
9) Flashed modem back to OnePlus3T_5.0.3-25-05-18-FIRMWARE-flashable.zip via adb sideload method which is what I assume I was running before since that was the OS version. Rebooted
10) Booted back into TWRP, discovered I still couldn't see files. Downgraded TWRP back to 3.2.1-0 via fastboot.
11) Unable to decrypt from TWRP or even install zips. No change at any point in the OS. Flashed TWRP back to 3.4.0.0.
12) Ran adb shell twrp decrypt XXXXXX (where XXXXXX is my pin) which gave me this message:
Attempting to decrypt data partition or user data via command line.
(then it returned to shell so I assume it worked)
13) Ran an ADB pull command (adb pull /dev/block/dm-0 backup.img). There is obviously something there because it downloaded 111 GB worth of .img file (which I'm 99% certain was the amount of space I had used on the phone). Tried to open the .img file with multiple EXT4 programs and they all said the file/partition was corrupt.
14) Tried to wipe data via TWRP. Failed to wipe because it couldn't be mounted. Followed this:
https://************/how-to-fix-twrp-unable-to-mount-storage-internal-storage-0mb/
15) Ended up with MTP mount of 101 GB free space. Everything seems to be lost on the phone at present. No programs I use to recover the data off the MTP mount (just doing a raw file scrape) can see it as a OnePlus in Windows.
After finding a better guide on XDA, it sounds like this is a known issue that happens when you go from 5.0.x to 9.x on this phone where your encryption breaks and you lose all files. Unfortunately I saw that about 15 minutes after step 14...
My next thoughts would be to:
a) downgrade everything (ROM, firmware, etc) and then try to push the 111 GB .img file back to the phone via ADB, then flash a stock OnePlus 5.0.3 ROM over it to see if I could get the internal storage to mount again. Don't even need to boot into the OS--just to get the internal storage mounted again through TWRP.
--OR--
b) convert the .img file to a .raw and then possibly a .vhd and use Recuva or something to scan the image of the phone and see if I can find those .xml files and maybe a twrp backup if I'm lucky. Although if the entire .img contents is still encrypted and not actually just a corrupt android filesystem, I think I am hosed on this option.
I would prefer option a) but I didn't know if anyone had any insight on this. I thought maybe there would be a way for me to get into the filesystem via ADB maybe and clear out some botched encryption cache or keystore/etc in order to get it to mount again. I'm also not sure if you're able to downgrade the firmware or modem either from 9 to 5 (even though I never got errors on downgrade). Thoughts? Am I just royally hosed?
Tried option b. Nothing but garbage. I made a backup of the .img file this time... so still would be willing to try option a) unless anyone thinks that this is impossible.
Edit: yep... may be too late... https://forum.xda-developers.com/on...-9-0-3-5-0-8-firmware-barrier-t3941164/page18
To my knowledge the data partitions content is unrecoverable lost after the reboot from 5) to 6). The img contains the messed up (and still encrypted) dm0 container but without the enctyption footer which is "outside" the dm0 container in sda15 (aka userdata) partition. To decrypt the img you are missing the device dependent key (an encrypzed partition can be decrypted only on the device the enctyption has been done on) as well as the encryption footer (which is messed up after the reboot).
Format data (not only wipe!) and start over.
Thanks for the reply. That makes sense and is what I was afraid of.
I wonder if it would be possible to regenerate the crypto footer by doing something like this to get the HMAC keys and then flashing a rom to recreate the cryptofooter and then editing the key values to reflect the old cryptofooter values based on the KeyMaster extraction via this exploit.
http://bits-please.blogspot.com/2016/06/extracting-qualcomms-keymaster-keys.html?m=1
It might depend on how much of the cryptofooter is left and whether or not 5.0.3 is vulnerable to these CVEs...
I’m not sure if I know enough about the KeyMaster structure to know how to rebuild it even if I were able to retrieve the HMAC keys.
I also know TWRP now supports EDL so perhaps there is something with a Qualcomm tool I could yse to assist.
Obviously this would mean security issues for everyone on these older builds if I am able to regenerate the crypto footer.
Are you aware of adb commands or likewise that I could run to survey the KeyMaster damage?
As stated: to my knowledge the data is lost after the first reboot with the 9.0.x bootloader.
If you search the official los thread (don't remember if 17 or 16) you'll find some detaled postings on restoring the keys after updating the bl from 5.0.x to 9.0.x. The user, who has examined that has failed, but perhaps it helps to shine some light on your questions.

How To Guide Fast Method to Patch AP File.

This method might be known. But just wanted to share it with you since it saves a lot of time.
Patched an AP file and updated my tablet in less than 5 minutes.
Requirements:
1.CPU with virtualization support.
1.Download ldplayer from ldplayer.net
2.Run Emulator and drag and drop the AP file into the file manager. # AP file will be located in pictures folder on Emulator device.
3. Run the browser on emulator and download and install latest Magisk apk.
4.Patch AP file with magisk. # Patched AP file will be located in Downloads folder on emulated device.
5.Copy or move magisk patched AP file back to pictures folder on emulator device.
6.On your pc go to 'C:\Users\PCNAME\Documents\XuanZhi9\Pictures' The patched AP file will be there.
7.Run Odin and update firmware.
Thx.
I do it with NoxPlayer emulator.
I mean, you could just download and patch the AP file on the device you're planning on flashing in Odin. Just move the patched file on the sd card, put that into the computer, and flash (if you have an sd card in your tablet, that is), or just connect the device to your pc, copy the patched file over, and flash. That cuts out the steps involving making an android vm, downloading and patching something in that instead of on the actual android device, and needing to move things to and search for directories to import things in and out of a vm.
SavXL said:
I mean, you could just download and patch the AP file on the device you're planning on flashing in Odin. Just move the patched file on the sd card, put that into the computer, and flash (if you have an sd card in your tablet, that is), or just connect the device to your pc, copy the patched file over, and flash. That cuts out the steps involving making an android vm, downloading and patching something in that instead of on the actual android device, and needing to move things to and search for directories to import things in and out of a vm.
Click to expand...
Click to collapse
What's weird is that Copying the AP file which is 8GB+ in size for the Tab S8 Ultra to a generic sd card or directly to the device via usb is actually slower than doing it over wifi6 via a file manager.
And then you will have to copy again the patched magisk ap file to your pc this takes time.
vangry2020 said:
What's weird is that Copying the AP file which is 8GB+ in size for the Tab S8 Ultra to a generic sd card or directly to the device via usb is actually slower than doing it over wifi6 via a file manager.
And then you will have to copy again the patched magisk ap file to your pc this takes time.
Click to expand...
Click to collapse
Agreed, it's slow as molasses, and it shouldn't be - and one time I accidentally wound up with a corrupted AP file which I flashed and had to flash all stock and factory reset to get working again. Now I check MD5 hashes on source and destination in both directions. I'm undecided if I'll go the emulator route at sometime in the future, but I'm considering it.
roirraW edor ehT said:
Agreed, it's slow as molasses, and it shouldn't be - and one time I accidentally wound up with a corrupted AP file which I flashed and had to flash all stock and factory reset to get working again. Now I check MD5 hashes on source and destination in both directions. I'm undecided if I'll go the emulator route at sometime in the future, but I'm considering it.
Click to expand...
Click to collapse
Tbh even emulator route sometimes end up not applying root maybe due to differences in architecture. But what i found reliable is transfering ap files over wifi using a file manager using smb.
I wish Samsung would add a/b partitions in future devices so we can update ota and apply root directly.

Categories

Resources