[Recovery] [ANE-LX] Recovery and Erecovery stuck and challanged flashing LOS - Huawei P20 Lite Questions & Answers

Hi there
I had some problems booting into Recovery and ERecovery. It would always stay endless in the Warning screen where it says that the Device is unlocked.
I run into it because of TWRP not Formating Data properly.
https://dl.twrp.me/anne/
twrp-3.5.1_9-0-anne.img14.6M 2021-03-13 15:27:54 ESTtwrp-3.5.0_9-0-anne.img13.2M 2020-12-27 21:03:29 EST
​This Versions get stuck at:​
Code:
Formatting Data using mkfs.f2fs...
Done
After it beeing stuck I could usually reach erecovery and wipe . But at one point it wouldn't work and I couldn't reacht the two and also couldn't stop the device from endless starting after shutting down.
I tried to flash several images from this one: https://androidhost.ru/1nfK
After flashing odm.img I could access the reflashed Stock Recovery and E-Recovery.
Update: Erasing Data with fastboot also works.
Note: It would show Google instead of Huawei at startup and in fastboot FRP:Unlocked doesn't show anymore after flashing odm.img
Else:​To reach erecovery or twrp recovery I retried often to hold power and volume up when the device is turned off. It then vibrates two times when it works. I hat sometimes to try for 10 Minutes to reach one of the to.
I unlocked with PotatoNV. The phone can be opened quite comfortable with a straight package plastic like from a cabel or electric device and a hairdrier.

Update: I can actually not format Data with any of these TWRPs. This was working before flashing the odm or maybe an other image.
twrp-3.5.1_9-0-anne.img14.6M 2021-03-13 15:27:54 ESTtwrp-3.5.0_9-0-anne.img13.2M 2020-12-27 21:03:29 ESTtwrp-3.4.0-1-anne.img13.2M 2020-09-26 14:58:13 EDTtwrp-3.4.0-0-anne.img13.2M 2020-08-21 17:03:57 EDT

I could format with adb shell:
anne:/etc # mkfs.f2fs /dev/block/mmcblk0pXX
F2FS-tools: mkfs.f2fs Ver: 1.10.0 (2018-01-30)
Info: Disable heap-based policy
Info: Debug level = 0
Info: Label =
Info: Trim is enabled
Info: No support kernel version!
Info: Segments per section = 1
Info: Sections per zone = 1
Info: sector size = 512
Info: total sectors = 106086400 (51800 MB)
Info: zone aligned segment0 blkaddr: 512
Info: [/dev/block/mmcblk0p57] Discarding device
Info: Secure Discarded 0 MB
Info: Overprovision ratio = 0.880%
Info: Overprovision segments = 459 (GC reserved = 235)
Info: format successful

benaep said:
I can actually not format Data with any of these TWRPs.
Click to expand...
Click to collapse
Yes, you have installed wrong TWRP (version 3.4.0.x and 3.5.0.x is not fully compatible with our device and it's strongly NOT recommended do 'wipe data' runnig stock ROM , it may brick the phone).
Use recommended TWRP:
Recommended and tested TWRP Recovery
EMUI 8 Stock ROMs: 3.2.1-0 by pretoriano80 (with data decryption on Android 8 ) https://mega.nz/#!Fgd0xa4R!1o5ejzDnkLJLG2tAZG-STtlJ4nnNCHfwwZdOlmOkrVw EMUI 8 Custom ROMs: 3.2.1.0 by Catuva21...
forum.xda-developers.com

-Alf- said:
Yes, you have installed wrong TWRP (version 3.4.0.x and 3.5.0.x is not fully compatible with our device and it's strongly NOT recommended do 'wipe data' runnig stock ROM , it may brick the phone).
Use recommended TWRP:
Recommended and tested TWRP Recovery
EMUI 8 Stock ROMs: 3.2.1-0 by pretoriano80 (with data decryption on Android 8 ) https://mega.nz/#!Fgd0xa4R!1o5ejzDnkLJLG2tAZG-STtlJ4nnNCHfwwZdOlmOkrVw EMUI 8 Custom ROMs: 3.2.1.0 by Catuva21...
forum.xda-developers.com
Click to expand...
Click to collapse
Thanks for the direction Alf. So for the Newest Linage OS build that would be:
Pie Custom ROMs:
3.4.0-0-emui9_eR
MEGA
MEGA provides free cloud storage with convenient and powerful always-on privacy. Claim your free 20GB now
mega.nz
right?

benaep said:
Thanks for the direction Alf. So for the Newest Linage OS build that would be:
Pie Custom ROMs:
3.4.0-0-emui9_eR
MEGA
MEGA provides free cloud storage with convenient and powerful always-on privacy. Claim your free 20GB now
mega.nz
right?
Click to expand...
Click to collapse
If you want to flash LOS from TWRP (idk why, but it's your choice), use 3.2.1 by pretoriano80 (wiping etc.) After installing custom ROM, you can replace 3.2.1. with 3.4.0.0-emui9_eR.

-Alf- said:
If you want to flash LOS from TWRP (idk why, but it's your choice), use 3.2.1 by pretoriano80 (wiping etc.) After installing custom ROM, you can replace 3.2.1. with 3.4.0.0-emui9_eR.
Click to expand...
Click to collapse
Hi Alf
Thanks for the reply. Very gratefull for this. I'm trying since Weeks to get this running.
I just want a phone with minimal Google. I had /e/ but I didn't find a build and back in the days linage would be fine.
You think there is something which makes more sense?

benaep said:
I just want a phone with minimal Google
Click to expand...
Click to collapse
Then install "v" variant , e.g.
LOS 17.1-unoff.
https://sourceforge.net/projects/treblerom/files/LOSQ/2020.10.17/losq-v224-201017-arm64-bvN.img.xz/download
LOS 18.1-unoff.
https://sourceforge.net/projects/treblerom/files/LiR/2021.03.18/lir-v302-210318-arm64-bvZ.img.xz/download
and install opengapps - pico, nano, micro... , what suits you.

-Alf- said:
Then install "v" variant , e.g.
LOS 17.1-unoff.
https://sourceforge.net/projects/treblerom/files/LOSQ/2020.10.17/losq-v224-201017-arm64-bvN.img.xz/download
LOS 18.1-unoff.
https://sourceforge.net/projects/treblerom/files/LiR/2021.03.18/lir-v302-210318-arm64-bvZ.img.xz/download
and install opengapps - pico, nano, micro... , what suits you.
Click to expand...
Click to collapse
Yo Alf
Thanks for the Links to the Image files. I would never have found them myself. I tried now a few hours to make them run.
Formating and Wiping works with 3.2.1 by pretoriano80
I tried both images, but am not shure. I get an invalid zip file error when I copy it on the device. Sideload doesn't work. No connection or Success or Success 00.00 X.
I make it a zip on linux with --> unxz --> img2simg --> Create Zip Directory wit xarchiver.
I tried different combinations of this. First I forgot about simg and just made a zip out of the img.
Code:
/tmp/recovery.log: 1 f...57322 bytes in 0.010s)
~ >>> adb sideload /home/bni/Downloads/losq17.zip
adb: failed to read command: Success
~ >>> adb sideload /home/bni/Downloads/losq17.zip
adb: sideload connection failed: closed
adb: trying pre-KitKat sideload method...
adb: pre-KitKat sideload connection failed: closed
~ >>> adb pull /tmp/recovery.log /home/bni/Downloads/recovery.log
/tmp/recovery.log: 1 f...59228 bytes in 0.007s)
Code:
~ # twrp install /image/LOS17_SIMG.zip
Installing zip file '/image/LOS17_SIMG.zip'
Checking for Digest file...
Skipping Digest check: no Digest file found
Invalid zip file format!
Error installing zip file '/image/LOS17_SIMG.zip'
Done processing script file

benaep said:
I get an invalid zip file error when I copy it on the device.
Click to expand...
Click to collapse
Of course, it is not a flashable .zip file.
You have to install it as image file, unpack .zip package, transfer exctracted .img file to the SD card. In TWRP go to Install , select Install image, choose lineage .img file , mark "system image" and flash.
If you need to do a factory reset , first replace TWRP with stock recovery and perform factory reset in recovery.
Or, flash Lineage.img in fastboot,without TWRP, wipes, errors etc. (make sure to have the stock recovery flash) - https://forum.xda-developers.com/t/losq-lineageos-17-1-18-1-unofficial-gsi.4219291/post-84305543

Related

[DEV] Custom MTD Partitions for the N1

With the advent of Blackrose custom HBOOT which gives us S-OFF, we can now resize the MTD partitions of our N1. This method is the one used by lbcoder in the Desire thread where you patch the recovery and boot in order to pass modified MTD partition information which supersedes the one provided by the SPL. Using this, I've managed to increase my userdata partition by ~50 MB by taking ~50 MB from the cache partition.
These instructions are for advanced users only. This will involve hex calculations and command line instructions that are not for the faint of heart. I don't believe it's dangerous though so anyone could still try since I will try to make these instructions as detailed as I possibly can.
What you need:
N1 with Blackrose HBOOT (I'm not sure this is needed though after I read more in-depth about the patch)
hex calculator (or a pencil & paper if you want to do it manually)
adb
fastboot
unpack-bootimg.pl
mkbootimg
recovery.img <- in my case I used ClockWorkMod 5.0.2 from here
boot.img <- taken from CM zip (in my case my KANG)
Partition Layout:
0x000003ee0000-0x000003fc0000 : "misc"
0x000004240000-0x000004640000 : "recovery"
0x000004640000-0x0000049c0000 : "boot"
0x0000049c0000-0x00000dac0000 : "system"
0x00000dac0000-0x0000139c0000 : "cache"
0x0000139c0000-0x00001fe00000 : "userdata"
Partition Sizes in Hex:
0x0000000e0000 : "misc"
0x000000400000 : "recovery"
0x000000380000 : "boot"
0x000009100000 : "system"
0x000005f00000 : "cache"
0x00000c440000 : "userdata"
Step-by-step Instructions:
A>Backup your current system: (OPTIONAL)
*I'm assuming you're using CWM 5.0.2 for the backup step since I tried using 3.X and the restore didn't work
1.) Boot your N1 into recovery using either adb reboot recovery or through the bootloader
2.) Backup your current system (I'm going to assume you know how to use your recovery for this)
B>Calculate new MTD parameter values:
*For this example I'm going to transfer ~50MB of cache space to my userdata partition:
1.) Since I know the cache partition is ~100MB in size, I'll just divide the hex size in 2:
0x5f00000 / 2 = 0x2f80000 <= this will be our new cache size
**Note that there is a minimum of 0x20000 (128k) for a partition and the size must be divisible by it which is why I'm playing safe and just dividing the original number in order to get an easier value for this example.
2.) Add the new cache partition size to the original cache partition starting address to get the new starting address of the userdata partition:
0xdac0000 + 0x2f80000 = 0x10a40000 <= this will be the new starting address for userdata
3.) Get the new userdata size by subtracting the new starting address of userdata with the ending address:
0x1fe00000 - 0x10a40000 = 0xf3c0000 <= this will be the new userdata size
C>Create a new recovery.img file which uses the new values:
1.) Breakdown the recovery.img file into it's kernel and ramdisk components using unpack-bootimg.pl:
.\unpack-bootimg.pl recovery.img
*This will yield 2 files and 1 directory. You can delete the directory since we only need the files.
2.) Rename the kernel from the recovery.img-kernel.gz made from unpack-bootimg.pl to recovery.img-kernel.
3.) Create the recovery-new.img file using mkbootimg with the new MTD command embedded:
mkbootimg --cmdline 'no_console_suspend=1 console=null mtdparts=msm_nand:[email protected](misc),[email protected](recovery),[email protected](boot),[email protected](system),[email protected](cache),[email protected](userdata)' --kernel recovery.img-kernel --ramdisk recovery.img-ramdisk.cpio.gz -o recovery-new.img --base 0x20000000
*Note that the values for cache starting address, userdata starting address and userdata size have been changed to the newly calculated values in the previous step.
**This will yield recovery-new.img which will be used in the next steps.
D>Create a new boot.img file which uses the new values:
1.) Breakdown the boot.img file into it's kernel and ramdisk components using unpack-bootimg.pl:
.\unpack-bootimg.pl boot.img
*This will yield 2 files and 1 directory. You can delete the directory since we only need the files.
2.) Rename the kernel from the boot.img-kernel.gz made from unpack-bootimg.pl to boot.img-kernel.
3.) Create the boot-new.img file using mkbootimg with the new MTD command embedded:
mkbootimg --cmdline 'no_console_suspend=1 wire.search_count=5 mtdparts=msm_nand:[email protected](misc),[email protected](recovery),[email protected](boot),[email protected](system),[email protected](cache),[email protected](userdata)' --kernel boot.img-kernel --ramdisk boot.img-ramdisk.cpio.gz -o boot-new.img --base 0x20000000
*Note that the values for cache starting address, userdata starting address and userdata size have been changed to the newly calculated values in the previous step.
**This will yield boot-new.img which will be used in the next steps.
E>Flash the recovery-new.img:
1.) Boot into bootloader and use fastboot command to flash the new recovery:
fastboot flash recovery recovery-new.img
F>Make system operational:
1.) Boot into recovery mode.
2.) Erase everything (factory reset)
3.) Either:
- Flash the ROM you took the original boot.img from OR
- Restore the backup you made previously (this only works (or has been tested) on CWM 5.0.2)
4.) DO NOT REBOOT YET!!!
G>Flash modified boot.img:
1.) Use adb to reboot to bootloader directly from recovery: (this is for safety since if you boot from an unmodified boot.img you'll have to start from F again.
adb reboot bootloader
2.) Use fastboot to flash the new boot image:
fastboot flash boot boot-new.img
3.) You may restart normally.
For those who've read this far, everything above has been rendered obsolete! Here's an editor for the SPL itself for the partition sizes:
http://intersectraven.euroskank.com/tools/SPLHexEditor.exe
*Instructions are in dla5244's thread 2nd post.
Try it at your own risk though!
Credits:
dla5244 - for bringing S-OFF to our N1 even after a looong time since its release
Firerat - for the original patch idea
Lbcoder - for coming up with the idea in the Desire thread
Reserved!
(I'm learning to reserve now... )
2 Questions:
Is the userdata space where downloaded apps go?
why didn't you choose any other partition to transfer empty space from?
drzplaya1121 said:
2 Questions:
Is the userdata space where downloaded apps go?
why didn't you choose any other partition to transfer empty space from?
Click to expand...
Click to collapse
1.) Yes.
2.) This is a sample. If you want to transfer from system or to system from cache, this example will show you how to do so.
thank U. Now I have no need to buy a new phone because of constantly running out of memory
Does it mean that every time I flash a new kernel, the whole effort will go waste?
Also, can I use the same procedure for Amon RA recovery??
rjmohit said:
Does it mean that every time I flash a new rom (which obviously has a different boot.img), the whole effort will go waste?
Also, can I use the same procedure for Amon RA recovery??
Click to expand...
Click to collapse
For that you need to do only steps D, F and G. If you flash only a kernel which uses koush's anykernel updater, you don't need to do anything.
intersectRaven said:
For that you need to do only steps D, F and G. If you flash only a kernel which uses koush's anykernel updater, you don't need to do anything.
Click to expand...
Click to collapse
Thanks.
One more silly question
Will the following procedure work.
1. Flash any ROM.
2. Then flash the modified boot.img (which may not belong to that ROM).
3. Then optionally flash the desired kernel.
rjmohit said:
Thanks.
One more silly question
Will the following procedure work.
1. Flash any ROM.
2. Then flash the modified boot.img (which may not belong to that ROM).
3. Then optionally flash the desired kernel.
Click to expand...
Click to collapse
Yeah. That would work since you're replacing the kernel anyways. What's important is that the kernel is compatible with the ROM.
Well done IR cannot wait to resize my data partition..
Okay, I extracted the recovery.img file, now when I try to extract recovery.img-kernel.gz, it gives the following error: not in gzip format. Exactly same happens for boot.img. I tried extracting it with different extractors on windows and ubuntu, nothing worked. Pls help.
I don't like using MTD because over time you will notice lag. If your already using sd-ext then your data is basically not being used. And I believe that cache never gets past 50% usage. Just putting in my two cents
rjmohit said:
Okay, I extracted the recovery.img file, now when I try to extract recovery.img-kernel.gz, it gives the following error: not in gzip format. Exactly same happens for boot.img. I tried extracting it with different extractors on windows and ubuntu, nothing worked. Pls help.
Click to expand...
Click to collapse
That's odd. In my installation, it worked flawlessly. Were there no errors during the run of unpack?
blahbl4hblah said:
I don't like using MTD because over time you will notice lag. If your already using sd-ext then your data is basically not being used. And I believe that cache never gets past 50% usage. Just putting in my two cents
Click to expand...
Click to collapse
intersectRaven said:
That's odd. In my installation, it worked flawlessly. Were there no errors during the run of unpack?
Click to expand...
Click to collapse
Nope. No errors. :-/
rjmohit said:
Nope. No errors. :-/
Click to expand...
Click to collapse
Found the problem. It seems it was never compressed in the first place. Ark sees this and just copies the file without the .gz extension.
*Instructions edited accordingly.
I may sound a bit noobish, but I'm facing one more hindrance:
How exactly do I run the mkbootimg file in the ubuntu terminal? I mean, can you give me the exact syntax?
I was facing a similar problem with the perl script, but then I found a solution on google, but didnt find anything for the mkbootimg. Can I run it under windows cmd?
rjmohit said:
I may sound a bit noobish, but I'm facing one more hindrance:
How exactly do I run the mkbootimg file in the ubuntu terminal? I mean, can you give me the exact syntax?
I was facing a similar problem with the perl script, but then I found a solution on google, but didnt find anything for the mkbootimg. Can I run it under windows cmd?
Click to expand...
Click to collapse
I already posted the syntax in the instructions. You just need to make sure the mkbootimg file has execute permissions in order for it to run.
Updated OP with SPL editor program.
intersectRaven said:
Updated OP with SPL editor program.
Click to expand...
Click to collapse
I tried your program. Everything worked fine. Just that my /cache now shows 290 MB free, while I had resized it to 20 MB!! Is that a bug? /system & /data show proper sizes though. thanks.
rjmohit said:
I tried your program. Everything worked fine. Just that my /cache now shows 290 MB free, while I had resized it to 20 MB!! Is that a bug? /system & /data show proper sizes though. thanks.
Click to expand...
Click to collapse
Is it the display on the program or display on the Android device when booted?
Wait, I found it. It's a bug. Thanks! I'll edit it when I get home. For now, please double check the values by reopening the made file before flashing. If the values are incorrect, please DON'T FLASH!!!

[REPARTITION] Nexus 7 (2013) Repartition [FLO/DEB] [16GB/32GB] [UA TWRP]

Nexus 7 (2013) Repartition​
No one is responsible for your actions except yourself. Everything written further may potentially brick your device, although risk is reduced to minimum.
This repartition package offers 1.5G /system; a /vendor partition and it is fully backward compatible with any ROM (including stock system.img).
Known-issues
HTML:
- If repartition pack says that device isn't correct,
than, if partition table wasn't modified before,
congrats! your device has different memory chip
that those I worked with. No worry, PM me and
I'll add support for it.
DO THE BACKUPs. Repartition will erase all your data
USB connection to PC is MANDATORY else you will not have opportunity to push ROM to your device
Backup
# Before processing further we highly recommend you backup persist and EFS using adb
# Or you might lose your IMEI/WIFI + BT mac addresses
Code:
adb root
adb shell
dd if=/dev/block/mmcblk0p2 of=/sdcard/modemst1.img
dd if=/dev/block/mmcblk0p3 of=/sdcard/modemst2.img
dd if=/dev/block/mmcblk0p4 of=/sdcard/persist.img
Now you can find 3 *.img files at path /sdcard. Copy them to your PC since internal memory will be erased.
Installation
HTML:
# This mod is backwards compatible with any ROM so we highly recommend NOT to reverse it if repartition went well.
# You should use ONLY recovery from this thread since other don't support all benefits of this mod.
# When installing ROM just after you flashed zip and before installing GAPPs you MUST make a resize in TWRP since all roms are build for ~800M system.
# Package is unified for flo and deb. To restore stock layout use same zip and steps as for repartition.
1. Boot into recovery (You need to allow system partition modification to be able resize /system in recovery).
2. Backup your data & Move your files from flash to your PC.
3. Flash repartition pack zip.
4. Do the actions asked by repartition pack (go to Terminal in ordinary recovery and input word that pack will tell you. Everything else will be done automatically).
5. Phone will reboot into recovery.
6. Install TWRP from below (it is build with support of new partitions layout and sizes. It can be differed from official TWRP by next format 3.x.x-1 UA).
7. Format everything. (mount errors will not affect formatting!)
- In TWRP: Wipe > Format data
- Type yes
- Once this completes go to: Wipe > Advanced Wipe
- Tick all the boxes and wipe. There should be no further mount errors. (Thanks [user=7694808]@mr_rubbish[/user] for corrections in formatting).
8. Install ROM which you like.
9. Enjoy better flash partition layout.
If something gone wrong - we recommend you NOT to do anything by yourself. Write here for help, else you may do only worse.
Downloads:
Repartitioning package: GitHub
Credits:
Special thanks to
- Unlegacy-Android team;
- Sudokamikaze;
- rlw6534 for Kingston MMC layout;
- surfrock66 for his gide for Nexus 5;
As usual, feedback is appreciated
XDA:DevDB Information
Nexus 7 (2013) Repartition, Tool/Utility for the Nexus 7 (2013)
Contributors
Clamor
Source Code: https://github.com/clamor95/android_device_unlegacy_recovery
Version Information
Status: Stable
Created 2018-09-19
Last Updated 2019-01-18
Common issues and F. A. Q.
Repartition pack should be safe for most devices. Common mistakes, issues and their solution will be published here.
1. You shouldn't flash any internal parts of repartition pack (*.sh files) only flash whole zip using TWRP. You may use my scripts for personal use or projects but authorship should to be kept.
2. If something isn't mounting after repartition try to format partitions that don't mount using Wipe -> Advanced Wipe in TWPR. Ideally you should format in that way all partitions in Advanced Wipe menu (see 5-th step of installation guide).
3. If you want to be sure that repartition went well I enclose loging zip. Flash it after repartition (when device reboots into TWRP). It won't modify anything only generates a partition.log in root of internal storage and outputs your current partition layout to screen. You should check if your layout is same as those fragments I provide under spoiler (file systems doesn't matter). If there are any differences you have to describe what you did and enclose partition.log to your post.
FLO/DEB STOCK
Code:
22 671088640B 1551892479B 880803840B system
23 1551892480B 2139095039B 587202560B cache
FLO/DEB MODIFIED
Code:
22 614429696B 2187293695B 1572864000B system
23 2187293696B 2270167039B 82873344B cache
...
30 2348843008B 2610987007B 262144000B vendor
4. After flashing most ROMs system size will reduce to stock, you need to resize /system in TWRP or use flashable resize zip for ROMs that support addon.d (automatic resize when dirty flashing updates).
5. After returning to stock partition table you won't be able to get into the Recovery from the bootloader anymore, but when you start the tablet normally it goes straight in the Recovery. It is normal state. New partition table proposes larger /recovery size (16MB) while stock gives only 10MB. During restoring stock process, it is impossible to restore larger recovery backup into new smaller partition. Whether not to leave user without recovery excess, recovery backup restores into /boot partition. Just flash ordinary TWRP and install ROMs from it.
6. Don't install the zip file from the USB OTG. Copy them into the /sdcard. Else you will get message after flashing repartition pack.
Code:
"Can not extract updater-script. Do you have it in package?
Updating partition details...
...done"
Link not working for the repartitioning package...
@rlw6534 should be fine now
Any chance you give details on backing up persist and EFS with dd command? I'm not really a noob but I also don't want to mess up my tab...
@rlw6534 You actually should't brake anything. Added an instruction how to backup EFS and persist.
OK. Tried to flash on a clean, freshly wiped system (Flo 32G), all stock, ext4 on cache and Data, TWRP 3.2.3-0. Got the following:
******Applying dark magic******
This is not a Nexus 7 (2013)
Updater process ended with ERROR: 1
How to restore files, that we copied from our tablet using dd command ? (I haven't done anything yet. Just asking)
Sent from my whyred using XDA Labs
@rlw6534 your partition table was modified.
@MikiGry same commands, just switch paths.
Clamor said:
@rlw6534 your partition table was modified.
@MikiGry same commands, just switch paths.
Click to expand...
Click to collapse
Do you mean that despite this error message:
******Applying dark magic******
This is not a Nexus 7 (2013)
Updater process ended with ERROR: 1
The partition table has been modified correctly?
@lollyjay No it wasnt. Package has 2 step security system. It checks if partition table was modified and in what way (by package itself, by user or it is stock). Second step is that package itself doesn't modify anything, it needs manual confirmation in terminal, else no changes will be applied.
Clamor said:
@lollyjay No it wasnt. Package has 2 step security system. It checks if partition table was modified and in what way (by package itself, by user or it is stock). Second step is that package itself doesn't modify anything, it needs manual confirmation in terminal, else no changes will be applied.
Click to expand...
Click to collapse
Thanks
So do I NOT flash the modded twrp first?
Your instructions said to flash it after reboot to recovery
@lollyjay actually it shouldn't metter, but after would be better
Clamor said:
@lollyjay actually it shouldn't metter, but after would be better
Click to expand...
Click to collapse
I'm going to do this when I get home. This might mean that flo/deb will get Android 9 Pie
@lollyjay look through UA ROM thread I wrote there about P on flo/deb
Clamor said:
@lollyjay look through UA ROM thread I wrote there about P on flo/deb
Click to expand...
Click to collapse
Sorry but can you give me a link?
Clamor said:
@rlw6534 your partition table was modified.
@MikiGry same commands, just switch paths.
Click to expand...
Click to collapse
I have previously used sysrepart.zip and sysrepartundo.zip from this thread, although not recently:
https://forum.xda-developers.com/showpost.php?p=76278047&postcount=19
I returned it to stock a while back (827MB). Perhaps I need to sgdisk a stock partition table?
@rlw6534 Every manual repartition or repartition made not by my pack needs an individual look and partition table restore.
@lollyjay here
Clamor said:
@rlw6534 Every manual repartition or repartition made not by my pack needs an individual look and partition table restore.
@lollyjay here
Click to expand...
Click to collapse
OK. Here is my partition layout. My userdata appears to be smaller than stock, but there isn't enough room on mmcblk0 to increase it to the size that your script is looking for. I have no idea how that could have been changed without bricking the tab. Everything else looks normal. Ideas?
Code:
Model: MMC MMC32G (sd/mmc)
Disk /dev/block/mmcblk0: 30937186304B
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 67108864B 156745727B 89636864B fat16 radio
2 201326592B 204472319B 3145728B modemst1
3 204472320B 207618047B 3145728B modemst2
4 268435456B 283795455B 15360000B ext4 persist
5 335544320B 336343039B 798720B m9kefs1
6 336343040B 337141759B 798720B m9kefs2
7 402653184B 403451903B 798720B m9kefs3
8 403451904B 406597631B 3145728B fsg
9 469762048B 471298047B 1536000B sbl1
10 471298048B 472834047B 1536000B sbl2
11 472834048B 474931199B 2097152B sbl3
12 474931200B 480174079B 5242880B aboot
13 480174080B 480698367B 524288B rpm
14 536870912B 553648127B 16777216B boot
15 603979776B 604504063B 524288B tz
16 604504064B 604505087B 1024B pad
17 604505088B 606041087B 1536000B sbl2b
18 606041088B 608138239B 2097152B sbl3b
19 608138240B 613381119B 5242880B abootb
20 613381120B 613905407B 524288B rpmb
21 613905408B 614429695B 524288B tzb
22 671088640B 1551892479B 880803840B ext4 system
23 1551892480B 2139095039B 587202560B ext4 cache
24 2147483648B 2148532223B 1048576B misc
25 2214592512B 2225078271B 10485760B recovery
26 2281701376B 2281709567B 8192B DDR
27 2281709568B 2281717759B 8192B ssd
28 2281717760B 2281718783B 1024B m9kefsc
29 2348810240B 2348843007B 32768B metadata
30 2415919104B 30937169407B 28521250304B ext4 userdata
@rlw6534 Thanks!

[RECOVERY][DUALBOOT][MAGISK][3.3.1-79][Unified]Unofficial TWRP for OnePlus 7/7 Pro/5G

If you want to make something like this for your device, check out this guide here
Since I no longer have an OP 7 series device, this mod is now deprecated and won't be receiving any more updates. @invernomut0 has made a continuation of this mod using orangefox recovery. Check it out here!
Team Win Recovery Project 3.x, or twrp3 for short, is a custom recovery built with ease of use and customization in mind. Its a fully touch driven user interface no more volume rocker or power buttons to mash. The GUI is also fully XML driven and completely theme-able. You can change just about every aspect of the look and feel.
Code:
#include <std_disclaimer.h>
/*
*
* We are not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at us for messing up your device, we will laugh at you.
*
*/
Compatibility
This has only been tested by me on Oxygen OS Stable - Android Q.
Disclaimer
This is a DANGEROUS mod. Anything involving repartitioning is. If you fail to read and bad things happen, that's on you. Although I thoroughly tested this (managed to brick my phone once), there's always the possibility that something could go wrong with the worst case scenario resulting in a brick.
YOU'VE BEEN WARNED - Use at your own risk
What is this?
This is @mauronofrio's TWRP (see official thread here) that's been modified for true dual booting by splitting userdata into a/b slots (also does the same for metadata for encryption support). The installer script repartitions userdata for dualboot or stock based on your input.
Limitations
See the section in the github readme. MAKE SURE YOU READ THIS!
Features:
Same as mauronofrio's TWRP
Can choose between stock layout, a/b userdata, or a/b/c userdata where 'c' is a common data partition that'll show up in both roms - it's quite handy
Option to choose between ext4 and f2fs
Disables verity - fstabs are modified for dual boot and so this is a must unless you choose stock layout in which case it's optional
Option to disable forced encryption
Option to install magisk
Common Data
I recommend the a/b/c layout which includes this common data partition
If you choose a/b/c layout - you'll have a/b userdata, but you'll also get a 3rd userdata partition I call 'Common Data'
The name 'Common Data' gives away its purpose - to store files that you'll access on both slots/roms. So stuff like zips, pictures, music, TWRP backups, etc.
In TWRP, this shows up as another storage option for backup/restore and on your pc as well - your phone will have 'Common Storage' and 'Internal Storage'
In order to be accessible when booted, some parts of the system are modified so that the it'll be accessible WITHOUT root by the following mechanisms:
- The common data partition is mounted to /sdcard/CommonData
- .nomedia file is placed in CommonData so files in it won't be picked up twice if you decide to mount over internal storage as outlined below
- Furthermore, if your use case is like mine where my music files are in common data, you can make 'mounts.txt' file in /datacommon containing a list of every FOLDER to mount directly over top of sdcard. So for example:
/datacommon/Music -> /sdcard/Music
+ This of course mounts over anything there (overwrites it for as long as it's mounted) so make sure that you don't have the same folder in both datacommon and regular data
+ Note that there are 3 exceptions to this folder mounting rule:
1) All - if this is the FIRST line, ALL folders in datacommon will be mounted
2 )Android
3) lost+found
+ The reasoning should be obvious - lost+found isn't something you should need to mess with and Android is for regular data partition only - that's OS specific and should be on separate slots
+ Note that you should have 1 folder listed on every line, for example:
Code:
DCIM
Music
Pictures
ViPER4AndroidFX
Flashing Instructions
You MUST be booted into TWRP already when flashing this zip. You can grab a bootable twrp img from here
Since this modifies data - the zip CANNOT be on sdcard or data at all UNLESS you do not want to repartition/format
- If you flash from data, the zip will copy itself to /tmp and instruct you to flash it from there OR you can just install twrp/magisk/disver-fec
- You could do the above or copy it to a place like /dev or /tmp and flash it from there
- Alternatively, you can adb sideload it
Read through ALL the prompts - there's lots of options
Note that if you change partition layout, THIS WILL WIPE ALL DATA INCLUDING INTERNAL STORAGE
How to Flash Roms - If you're NOT stock layout
Nothing changes here except ONLY FLASH IN TWRP
- Roms always flash to the opposite slot. Keep that in mind and you'll be fine
- So don't take an OTA while booted - boot into twrp, switch slots, reboot into twrp, flash rom
Normal flash procedure:
1) Boot into twrp
2) reboot into twrp selecting slot you do NOT want rom installed to
3) Flash rom
4) Flash this zip
5) Reboot into twrp
6) Flash everything else
Help! I Can't Boot!
Usually this is because you switched roms without formatting data first. This should be flashing 101 but we all forget sometimes. Plus this slot stuff can get confusing
If it only happens with a/b/c and not any other layout, there's a good chance it's selinux related. Try setting selinux to permissive at kernel level with this mod(source here). If this doesn't fix it, it could be because selinux can't be set to enforcing even with the mod depending on the rom
How to Manually Repartition Back to Stock
In the event any step in the repartioning fails, the entire installer aborts. The good news is that this prevents a potential brick. The bad is that you need to manually revert back. See the README on github for the procedure. Note that if the install went fine and you want to switch back to stock later, just flash the installer again and choose stock layout
Download
Source Code
Credits
Mauronofrio
Teamwin
CosmicDan
TopJohnWu
Very ****ing badass. ?
Wow, this is cool. Always wondered if something like this would be possible on AB partitioned devices.
Looking forward to testing it out
Does the dual boot mean I can boot two roms?
jaggillararla said:
Does the dual boot mean I can boot two roms?
Click to expand...
Click to collapse
Ya. You can have a different rom on each slot
Will it impact on my original data partition if I flashed this TWRP.( I means whether my original data being splitted into 2-individual-parition + 1-common-partition and I need to reinstall my data after entering system ?)
Kris Chen said:
Will it impact on my original data partition if I flashed this TWRP.( I means whether my original data being splitted into 2-individual-parition + 1-common-partition and I need to reinstall my data after entering system ?)
Click to expand...
Click to collapse
The installer will tell you if it'll wipe internal storage or not.
Basically, if you choose to change the partition layout, data will all be wiped since it'll be repartitioned. If you choose to keep your partition layout at the beginning of the install, your data will be fine.
You could just use this zip as twrp, magisk, verity/fec modifer/installer to save you the extra steps and keep with stock layout
This is super cool. Will be testing soon. Just to confirm, this means I can have a custom rom on one slot and oxygen os on the other? Also f2fs should work fine with common data right?
f41lbl0g said:
This is super cool. Will be testing soon. Just to confirm, this means I can have a custom rom on one slot and oxygen os on the other? Also f2fs should work fine with common data right?
Click to expand...
Click to collapse
Yup. You can do whatever you want with either slot. This mod formats all data partitions as ext4 since that's what oneplus does. You can always reformat userdata to f2fs in twrp gui later if you want though. Same goes for common data although I don't think there's a gui option for that
How does this zip to allocate the each size of userdata ? Can be customized by ourself or automated by zip itself ?
Kris Chen said:
How does this zip to allocate the each size of userdata ? Can be customized by ourself or automated by zip itself ?
Click to expand...
Click to collapse
From what I see it can not be customized through the flasher (may be possible by editing values in the zip). In case you were wondering the size of the partitions, they are 96.7gb for the common storage and 62.4gb each for the individual storages.
Kris Chen said:
How does this zip to allocate the each size of userdata ? Can be customized by ourself or automated by zip itself ?
Click to expand...
Click to collapse
f41lbl0g said:
From what I see it can not be customized through the flasher (may be possible by editing values in the zip). In case you were wondering the size of the partitions, they are 96.7gb for the common storage and 62.4gb each for the individual storages.
Click to expand...
Click to collapse
It's automated by installer. If you have a 128gb device:
32gb for each userdata slot, commondata gets what's left
256gb device:
Everything's doubled from above
Thank you for this work I have screwed up all of my partitions on my Oneplus and could use a pointer on how to restore all of the correct partitions... :-0
I must have screwed up one of the commands on restoring my original partitions here is what I have now
C:\Users\The Family>adb shell
OnePlus7Pro:/ # sgdisk /dev/block/sda --print
Creating new GPT entries.
Disk /dev/block/sda: 61409280 sectors, 234.3 GiB
Logical sector size: 4096 bytes
Disk identifier (GUID): B0281E2A-8376-4F4B-98C6-BF5221AD8A20
Partition table holds up to 128 entries
First usable sector is 6, last usable sector is 61409274
Partitions will be aligned on 256-sector boundaries
Total free space is 61409269 sectors (234.3 GiB)
Number Start (sector) End (sector) Size Code Name
OnePlus7Pro:/ #
What commands do I need to fix this. I can still get into adb shell
edit: msmtool cannot restore from this because the partitions are not correct from the way it looks when I try it. when in recovery touch does not work.
eyespunker said:
Thank you for this work I have screwed up all of my partitions on my Oneplus and could use a pointer on how to restore all of the correct partitions... :-0
I must have screwed up one of the commands on restoring my original partitions here is what I have now
C:\Users\The Family>adb shell
OnePlus7Pro:/ # sgdisk /dev/block/sda --print
Creating new GPT entries.
Disk /dev/block/sda: 61409280 sectors, 234.3 GiB
Logical sector size: 4096 bytes
Disk identifier (GUID): B0281E2A-8376-4F4B-98C6-BF5221AD8A20
Partition table holds up to 128 entries
First usable sector is 6, last usable sector is 61409274
Partitions will be aligned on 256-sector boundaries
Total free space is 61409269 sectors (234.3 GiB)
Number Start (sector) End (sector) Size Code Name
OnePlus7Pro:/ #
What commands do I need to fix this. I can still get into adb shell
edit: msmtool cannot restore from this because the partitions are not correct from the way it looks when I try it. when in recovery touch does not work.
Click to expand...
Click to collapse
I have the steps outlined here: https://github.com/Zackptg5/TWRP-DualBoot-Guac-Unified/#how-to-manually-repartition-back-to-stock
But what did you do? It looks like you formatted all of /dev/block/sda which is essentially a brick. You are able to restore that with msmtool btw but there will still be some device specific data that is lost and you'll likely need to file warranty claim
Zackptg5 said:
I have the steps outlined here: https://github.com/Zackptg5/TWRP-DualBoot-Guac-Unified/#how-to-manually-repartition-back-to-stock
But what did you do? It looks like you formatted all of /dev/block/sda which is essentially a brick. You are able to restore that with msmtool btw but there will still be some device specific data that is lost and you'll likely need to file warranty claim
Click to expand...
Click to collapse
It was this step that I really messed up
Final step is to format the new userdata partition: mke2fs -t ext4 -b 4096 /dev/block/sda$userdata_num $userdata_size - where userdata_size can be calculated with this shell command: sgdisk /dev/block/sda --print | grep "^ *$userdata_num" | awk '{print $3-$2+1}'
with this step I used the result from sgdisk /dev/block/sda --print | grep "^ *$userdata_num" | awk '{print $3-$2+1}' I do not remember the value into the spot where userdata_size was
It looks like have been able to flash partitions manually in fastboot but the two partitions that are no longer recognized are the system_a and system_b the reason I say that is because vendor and boot flash fine on both a and b partitions. and when I send the commands to flash system a or b the reply is partition not found?! I am not sure if it would fix my problem but if I could get help to restore system partitions maybe I can get this thing to boot up.
eyespunker said:
It was this step that I really messed up
Final step is to format the new userdata partition: mke2fs -t ext4 -b 4096 /dev/block/sda$userdata_num $userdata_size - where userdata_size can be calculated with this shell command: sgdisk /dev/block/sda --print | grep "^ *$userdata_num" | awk '{print $3-$2+1}'
with this step I used the result from sgdisk /dev/block/sda --print | grep "^ *$userdata_num" | awk '{print $3-$2+1}' I do not remember the value into the spot where userdata_size was
It looks like have been able to flash partitions manually in fastboot but the two partitions that are no longer recognized are the system_a and system_b the reason I say that is because vendor and boot flash fine on both a and b partitions. I am not sure if it would fix my problem but if I could get help to restore system partitions maybe I can get this thing to boot up.
Click to expand...
Click to collapse
The formatting steps is how I initially bricked my phone when I was figuring this stuff out - I since fixed that issue and made sure it'd never happen again in the zip :/
Why were you manually restoring? Did the zip cut off with partition error?
You'll need to use msmtool in this case. Even if your partition block is completely toast, it's able to bring it all back. You can grab the latest one from here: https://androidfilehost.com/?w=files&flid=296306
And here's the guide for it: https://forum.xda-developers.com/oneplus-7-pro/how-to/msm-tool-guac-t3934691
Zackptg5 said:
The formatting steps is how I initially bricked my phone when I was figuring this stuff out - I since fixed that issue and made sure it'd never happen again in the zip :/
Why were you manually restoring? Did the zip cut off with partition error?
You'll need to use msmtool in this case. Even if your partition block is completely toast, it's able to bring it all back. You can grab the latest one from here: https://androidfilehost.com/?w=files&flid=296306
And here's the guide for it: https://forum.xda-developers.com/oneplus-7-pro/how-to/msm-tool-guac-t3934691
Click to expand...
Click to collapse
When I run the latest 10.4 global I get "device does not match image" and then under status I loose connection. I have also tried the 10.31 file with no luck either.
eyespunker said:
When I run the latest 10.4 global I get "device does not match image" and then under status I loose connection. I have also tried the 10.31 file with no luck either.
Click to expand...
Click to collapse
In msmtool? Do you have the right variant?
Latest global: https://androidfilehost.com/?fid=4349826312261732245
Latest europe: https://androidfilehost.com/?fid=4349826312261732244
Download mode is really tricky too. It times out after several seconds so you pretty much have to keep holding down the key combo until msmtool picks it up and then you can release them
Zackptg5 said:
In msmtool? Do you have the right variant?
Latest global: https://androidfilehost.com/?fid=4349826312261732245
Latest europe: https://androidfilehost.com/?fid=4349826312261732244
Download mode is really tricky too. It times out after several seconds so you pretty much have to keep holding down the key combo until msmtool picks it up and then you can release them
Click to expand...
Click to collapse
I have now tried the latest two and have come up with the same results on the update when the device param load the result of the last communication is device does not match image.
eyespunker said:
I have now tried the latest two and have come up with the same results on the update when the device param load the result of the last communication is device does not match image.
Click to expand...
Click to collapse
Sounds like you may need to file a warranty claim then :/

[RECOVERY][DUALBOOT][Unified][A10][A11][OOS11]Orangefox-DualBoot-Unified-Reborn[21-03-2021]

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Orangefox-DualBoot-Guac-Unified - Android 10/11 version
THANKS TO:
- Zackptg5 - The father of this mod
- DrakePL (Orangefox Recovery)
- Ae3NerdGod, Neel P, Whismasterflo
- Muphetz, Varun Soma, Pranav - for testing
#include <std_disclaimer.h>
/*
*
* We are not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at us for messing up your device, we will laugh at you.
*
*/
Click to expand...
Click to collapse
Modified recovery and installer script for all OP7/Pro/5G variants that re-purposes userdata for true dual booting. You can still use this as a regular stock twrp zip - one stop shop for magisk, verity, and/or forced encryption modifications
Disclaimer
I am not responsible for anything bad that happens to your device. Only experienced users should be using this mod
This is no walk in the park mod. Although I have extensively tested it, there is always the possibility of a brick with anything that involves repartitioning. Make sure you have a backup and know how to reparititon your phone back to stock (there's a guide at the end of this readme with the basics)
YOU'VE BEEN WARNED - Use at your own risk
Click to expand...
Click to collapse
Limitations
If you set a password, regardless of encryption status, it'll corrupt the other slot if it's also password protected.
Note that some roms set one automatically Either don't use a password on one slot, or leave one slot (I'll use 'a' in this example) unencrypted and:
Setup rom, password, and everything on slot a
Boot back into twrp, choose common data as storage, and backup userdata (if not using a/b/c layout, backup TWRP folder to your computer)
Setup rom, password, and everything on the other slot (b)
Boot back into twrp, switch back to slot a (reboot back into twrp), and restore the twrp backup
If you messed this up and are unencrypted - delete these files in /data/system if present: locksettings.db gatekeeper.password.key password.key gatekeeper.pattern.key pattern.key gatekeeper.gesture.key gesture.key
If you messed this up and are encrypted - you lost the data on that slot:
Unmount metadata in twrp gui
Format metadata with this command:
Code:
mke2fs -t ext4 -b 4096 /dev/block/sda$metadata_partnum
where metadata_partnum is the partition number of the current metadata partition (you can find this with sgdisk /dev/block/sda --print). DO NOT FORGET THE PARTITION NUMBER. If you do, you'll format all of sda which results in a brick
Reboot into twrp and format data in gui
Storage settings only supports 128 and 256gb userdata partitions
Just a cosmetic issue as it'll say that system is taking up the difference
Some other features/notes
Can choose between stock layout, a/b userdata, or a/b/c userdata where 'c' is a common data partition that'll show up in both roms - it's quite handy
Option to choose between ext4 and f2fs
Disables verity - fstabs are modified for dual boot and so this is a must unless you choose stock layout in which case it's optional
Option to disable forced encryption
Option to install magisk
Quickmode for faster rom testing
Failsafe to keep from changing slots automatically when used in conjunction with rom install
Common Data
If you choose a/b/c layout - you'll have a/b userdata, but you'll also get a 3rd userdata partition I call 'Common Data'
The name 'Common Data' gives away its purpose - to store files that you'll access on both slots/roms. So stuff like zips, pictures, music, TWRP backups, etc.
In TWRP, this shows up as another storage option for backup/restore and on your pc as well - your phone will have 'Common Storage' and 'Internal Storage'
In order to be accessible when booted, some parts of the system are modified so that the it'll be accessible WITHOUT root by the following mechanisms:
​
The common data partition is mounted to /sdcard/CommonData
.nomedia file is placed in CommonData so files in it won't be picked up twice if you decide to mount over internal storage as outlined below
Furthermore, if your use case is like mine where my music files are in common data, you can make 'mounts.txt' file in /datacommon containing a list of every FOLDER to mount directly over top of sdcard. So for example:
/datacommon/Music -> /sdcard/Music
This of course mounts over anything there (overwrites it for as long as it's mounted) so make sure that you don't have the same folder in both datacommon and regular data
Note that there are 3 exceptions to this folder mounting rule:
All - if this is the FIRST line, ALL folders in datacommon will be mounted
Android
lost+found
The reasoning should be obvious - lost+found isn't something you should need to mess with and Android is for regular data partition only - that's OS specific and should be on separate slots
Note that you should have 1 folder listed on every line, for example:
PHP:
Music
Pictures
ViPER4AndroidFX
Flashing Instructions (if Android 11, see second post)
You MUST be booted into TWRP already when flashing this zip (you can grab a bootable twrp image from here)
Since this modifies data - the zip CANNOT be on sdcard or data at all UNLESS you do not want to repartition/format
If you flash from data, the zip will copy itself to /tmp and instruct you to flash it from there OR you can just install twrp/magisk/disver-fec
You could do the above or copy it to a place like /dev or /tmp and flash it from there
Alternatively, you can adb sideload it
Read through ALL the prompts - there's lots of options
How to Flash Roms
Nothing changes here except ONLY FLASH IN TWRP
Roms always flash to the opposite slot. Keep that in mind and you'll be fine
So don't take an OTA while booted - boot into twrp, switch slots, reboot into twrp, flash rom
Normal flash procedure:
Boot into twrp
reboot into twrp selecting slot you do NOT want rom installed to
Flash rom
Flash this zip
Reboot into twrp
When using failsafe mode,
TWRP will boot into the slot you were in BEFORE you flashed the rom.
TWRP will almost certainly show the incorrect "current slot" at the reboot menu.
The slot selection buttons still work. If youve kept track in youre head, and the zip didnt fail; pick the correct slot now
or reboot to recovery, then switch into the slot which contains the new rom youve just installed
Flash everything else
Quickmode usage NOT RESPONSIBLE FOR BUGS, BRICKS OR MISTAKES! USE AT OWN RISK!
Change the zip name to enable quickmode options (Case Sensitive!)
keeps current layout
add the words fast or quick in the zip file to enable quickmode with the following default options:
ForceEncryption disabled for both slot
s​
Magisk installed to both slots
add any of the following options to the name of the zipfile to custimize quickmode to your liking, capitilizing the letter of the slot youd like to enable that option for:
fec.ab will ENABLE force encrytion for the capitalized slot letter
su.ab or magisk.ab will ENABLE the installation of magisk for the capitalized slot letter
Example: if the file is named Orangefox-DualBoot-fast-fec.AB-su.aB.zip then:
ForceEncryption will be ENABLED on both slot _a and slot _b
Magisk will be installed on slot _b, but NOT installed on slot _a
ADVANCED USERS ONLY NOT RESPONSIBLE FOR BUGS, BRICKS OR MISTAKES! USE AT OWN RISK!
confirm.y will skip the final confirmation before any work is done, and run the options chosen or defaults if none specified
the word warp this can be used instead of fast or quick and confirm.y if you'd also like to use quickmode without confirmation
Failsafe usage / explaination
I've had a few instances where a rom doesnt agree with whats going on, and the dualboot zip gets stuck on a slot and never finishes. This results in forcing the phone off, and leaves the phone in a non bootable state, with an unprepared slot. Not to mention a stock, or worse, no recovery at all. Bootloop city.
Enter the failsafe option: just add ` nofail ` or ` failsafe ` (case sensitive) to the zip name like above, and the zip will revert the slot change caused by the rom install and keep you able to boot back into the current slot's TWRP so you can sort out the slot youre working on. Pair this with a usb drive or commondata, and youre (relatively) safe to flash on the go, or from your bed with the computer off.
Notes
After applying the failsafe, the reboot screen in TWRP will ALMOST CERTANLY show the incorrect slot until you either manually select a slot or reboot recovery.
This adds a step or two to the flashing process, make sure you've read that.
[/QUOTE]
Help! I Can't Boot!
Usually this is because you switched roms without formatting data first. This should be flashing 101 but we all forget sometimes. Plus this slot stuff can get confusing
If it only happens with a/b/c and not any other layout, there's a good chance it's selinux related. Try setting selinux to permissive at kernel level with this mod (source here).
Click to expand...
Click to collapse
How to Manually Repartition Back to Stock
In the event any step in the repartioning fails, the entire installer aborts. The good news is that this prevents a potential brick. The bad is that you need to manually revert back
Boot into twrp. If sgdisk is not present in sbin, grab it from this zip (in tools) and adb push it to /sbin and chmod +x it
sgdisk /dev/block/sda --print Note that /dev/block/sda is the block that userdata and metadata are stored on - no other block is touched by this mod. This will show up the current partition scheme. Stock looks something like this (on OP7 Pro):
PHP:
Number Start (sector) End (sector) Size Code Name
1 6 7 8.0 KiB FFFF ssd
2 8 8199 32.0 MiB FFFF persist
3 8200 8455 1024.0 KiB FFFF misc
4 8456 8711 1024.0 KiB FFFF param
5 8712 8839 512.0 KiB FFFF keystore
6 8840 8967 512.0 KiB FFFF frp
7 8968 74503 256.0 MiB FFFF op2
8 74504 77063 10.0 MiB FFFF oem_dycnvbk
9 77064 79623 10.0 MiB FFFF oem_stanvbk
10 79624 79879 1024.0 KiB FFFF mdm_oem_dycnvbk
11 79880 80135 1024.0 KiB FFFF mdm_oem_stanvbk
12 80136 80263 512.0 KiB FFFF config
13 80264 969095 3.4 GiB FFFF system_a
14 969096 1857927 3.4 GiB FFFF system_b
15 1857928 1883527 100.0 MiB FFFF odm_a
16 1883528 1909127 100.0 MiB FFFF odm_b
17 1909128 1913223 16.0 MiB FFFF metadata
18 1913224 1945991 128.0 MiB FFFF rawdump
19 1945992 61409274 226.8 GiB FFFF userdata
You may have different size userdata - mine is 256gb - depending on your device but that doesn't matter. You just need to see where they're located
Take note of the number (I'll call userdata_num for the sake of this tutorial) and start sector (userdata_start) for the first partition AFTER rawdump, and the end sector (userdata_end) of the last parititon on sda
sgdisk /dev/block/sda --change-name=17:metadata - renames metadata partition back to non-ab stock
sgdisk /dev/block/sda --delete=19 - this deletes the entire partition - use this command for each user/metadata partition after rawdump (ones generated by this zip)
sgdisk /dev/block/sda --new=$userdata_num:$userdata_start:$userdata_end --change-name=$userdata_num:userdata - this creates the new userdata partition
Final step is to format the new userdata partition: mke2fs -t ext4 -b 4096 /dev/block/sda$userdata_num $userdata_size - where userdata_size can be calculated with this shell command: sgdisk /dev/block/sda --print | grep "^ *$userdata_num" | awk '{print $3-$2+1}'
​
MAKE SURE YOU VERIFY ALL VARIABLES HERE ARE SET PROPERLY - if you mess this up, you could format all of sda resulting in a brick
Run sgdisk /dev/block/sda --print again to make sure everything is correct and then reboot back into twrp
Changelog
Click to expand...
Click to collapse
21/03/2021 - V1.8
Updated companion app to 2.8.7
05/03/2021 - V1.6
Updated init.mount_datacommon.sh to support the application sharing
Updated the dual boot companion app V2.6 BETA
Added mounting inactive system to sdcard/DualBoot/
Added mounting inactive SDcard to sdcard/DualBoot/
EXPERIMENTAL - Added application sharing between ROMs (Only A/B/C Layout)
Localizations update
Minor bugfix here and there.
13/02/2021- V1.5
Updated the dual boot companion app V1.7.2
Updated Orangefox recovery to latest git
06/02/2021- V1.3
Updated the dual boot companion app
Fixed the Orangefox full screen bug on OP7 pro
05/02/2021- V1.1
Added the dual boot companion app
Fixed the OOS11 flashing bug
20/01/2021- V1.0
It works with OxygenOS 11 ( WARNING: --- Stay unencrypted! --)
Magisk 21.4 updated
New version of Orangefox recovery (R11) - 20-01-2021 update
Know bug: Flashing from OOS11 slot can overwrite the same slot.
19/11/2020 - A11-0.4
Fixed root install for Android 11
Minor improvement
21/10/2020 - A11-0.4
Root not installed if Android 11 - Please do it manually.
CommonData mount fix in Android 11
Minor improvement
Android 11: please install Magisk 20422 and MagiskManager 297
16/10/2020 - A11-0.2
Changed to OrangeFox Recovery
Added check to get the right initrc (Android 11 compliant)
16/10/2020 - A11-0.1
Initial release
Click to expand...
Click to collapse
Download
Orangefox-DualBoot-Guac-Unified-A11-V1.8
GitHub
https://github.com/Invernomut0/OrangeFox-DualBoot-Guac-Unified
Telegram support chat: https://t.me/OrangeFoxDualBootRebornOnePlus7
XDA:DevDB Information
Orangefox-DualBoot-Unified, Tool/Utility for the OnePlus 7
Contributors
invernomut0
if you like my work, send me a beer
Click to expand...
Click to collapse
DUALBOOT COMPANION APP
FLASH PROCEDURE - Android 11
Related to Orangefox-DualBoot-Guac-Unified-A11.zip
WARNING: OOS11 --- Stay unencrypted! ---
Example (starting point)
Slot A A10 Rom
Slot B A10 Rom
1 - Flash from slot A A11/OOS11 rom
2 - Flash Orangefox-DualBoot-Guac-Unified-A11.zip
3 - Reboot to recovery (Now you are in slot B automatically)
4 - Format data
5 - Flash Orangefox-DualBoot-Guac-Unified-A11.zip
7 - Reboot to system
Install magisk manager attached
Ending point
Slot A A10 rom
Slot B A11/OOS11 rom
Now you should have a working A10 rom on slot A and a working A11/OOS11 rom on slot B.
Please report any problems.
Reserved
I am on oos a10, rooted, twrp and encrypted... Can i use this for dual boot oos a10 with some custom a11 without having to decrypt/data loss???
kpmohamedhussain said:
I am on oos a10, rooted, twrp and encrypted... Can i use this for dual boot oos a10 with some custom a11 without having to decrypt/data loss???
Click to expand...
Click to collapse
Hi. All your data will be wiped and you have to reinstall both slots OS since this is repartitioning your userdata into A and B so do a Backup of all your data before.
It works great with A10 and A11. I had a little issue because I had A10 on A and B slot and when flashed this, then A11 ROM, rebooted to other slot flashed this again A11 was working great, but when tried to switch back to the slot with A10, after boot my pin wouldn't work anymore, so needed to delete locksettings.* an *.key files from /data/system.
Thanks for the great job!
vladvlad12 said:
It works great with A10 and A11. I had a little issue because I had A10 on A and B slot and when flashed this, then A11 ROM, rebooted to other slot flashed this again A11 was working great, but when tried to switch back to the slot with A10, after boot my pin wouldn't work anymore, so needed to delete locksettings.* an *.key files from /data/system.
Thanks for the great job!
Click to expand...
Click to collapse
Only set a PIN on one of the slots. Otherwise you will have that issue that your PIN does not work anymore on the other slot if you set it on both!!
Does anyone have OOS Open Beta 17 or 18 working with this recovery?
ImamBukhari said:
Does anyone have OOS Open Beta 17 or 18 working with this recovery?
Click to expand...
Click to collapse
I will try it for you, be back in like 10 minutes with edit.
Back, is not working. It stuck at patching fstabs.
vladvlad12 said:
I will try it for you, be back in like 10 minutes with edit.
Back, is not working. It stuck at patching fstabs.
Click to expand...
Click to collapse
Take a look at the recovery.log in /tmp then to check while it is getting stuck.
Wishmasterflo said:
Take a look at the recovery.log in /tmp then to check while it is getting stuck.
Click to expand...
Click to collapse
Ok, just give me a minute, already installed another ROM, will try to give info u asked in a few minutes. Someone told me when i tried to do same with twrp dual boot that twrp can't yet decrypt OOS Beta 17 and 18
IDK what happened but now my touchscrren is not working...
After stuck at patching I rebooted into fastboot changed active slot to other slot, rebooted into recovery, it enter in OrangeFox Recovery but no touch...
Got a bit scared there... Rebooted to system then back to recovery and touch is working now...
But there is no /tmp folder...
vladvlad12 said:
I will try it for you, be back in like 10 minutes with edit.
Back, is not working. It stuck at patching fstabs.
Click to expand...
Click to collapse
Could you please also provide the postition of init.rc. look at /init.rc and check if the file exists.
invernomut0 said:
Could you please also provide the postition of init.rc. look at /init.rc and check if the file exists.
Click to expand...
Click to collapse
Dualboot still no work with oos beta 17 and 18,,its always stuck when patching fstab ( decrypt).
There's init process called High Assurance Boot (HAB) that verify your system's integrity. Check the script "/vendor/etc/init/hw/init.mmi.hab.rc".
This command show many values, which one to pick.
gdisk /dev/block/sda --print | grep "^ *$userdata_num" | awk '{print $3-$2+1}'
edit: typo, worked fine now...
Tried it with Beta 19 and doesn't work with that either
Download link not working - Magisk 20422 and MagiskManager 297
ImamBukhari said:
Tried it with Beta 19 and doesn't work with that either
Click to expand...
Click to collapse
Do you have OP7 or OP7 pro/T?
invernomut0 said:
Do you have OP7 or OP7 pro/T?
Click to expand...
Click to collapse
I'm using a 7 Pro
kpmohamedhussain said:
Download link not working - Magisk 20422 and MagiskManager 297
Click to expand...
Click to collapse
Files restored
Works great, tested with multiple ROMs...
Having below issues
1. Even if pin not setup in secondary ROM, need to delete files otherwise pin in primary is not accepted
2. After every flash of this recovery, all my magisk settings, modules are all lost
3. Images and videos in common data not visible in gallery

How to make Pre-Rooted GSIs for Samsung A21s

Easy to way to install a GSI on your Samsung A21s without installing a Virtual Linux.
NFC, Screen Cast, and USB MTP unfortunately is not working with AOSP 10 and 11. Backup all your data.
If don't want to make one, download my Pre-Rooted GSIs below and flash.
*Unlock your Bootloader and wipe your data using your stock recovery and quickly boot to Download Mode and flash the super.tar on Odin (AP):
Android 10 -> Download (MediaFire)Android 11 -> Download (MediaFire)Android 11 - AOSP 11.0 v306 -> Download (MEGA) - NEWAndroid 10 Screenshots
1. Requirements:​
1. Unlock your Bootloader2. Download and Install a Linux Subsystem -> Ubuntu Subsystem -> "Tutorial How to install Linux Subsystem on Windows 10 | or search how to"3. GSI Android 10 A/B Gapps -> Download only the "arm64, A/B". I recommend releases from Treble Experimentations AOSP like "system-roar-arm64-ab-gapps.img.xz". 4. Samsung.zip -> There's all needed tools and files - Odin, 7-Zip ZS etc...
- Download Samsung.zip and extract the folder "Samsung" to your desktop, and extract your chosen GSI using to this folder.
- Download your stock firmware and extract the super.img.lz4 file from AP_A217XXXXXXXXXX_XXX_XXXX_REV00_XXX.tar.md5 with 7-Zip ZS.
- Now extract super.img.lz4 using 7-Zip ZS (don't use 7-zip) to Samsung folder. Rename super.img to stock_super.img.
2. Convert stock_super.img to raw_super.img:​Open CMD ad use this codes:
cd C:\Users\%USERNAME%\Desktop\Samsungsimg2img.exe stock_super.img raw_super.img
Wait...
3. Extract raw_super.img:​On your Samsung folder, use SHIFT key of your keyboard + right click and click at "Open Linux Shell Here", wait a little, and use this code and wait the extraction:
./lpunpack --slot=0 raw_super.img
*If the extraction is completed, verify if there's this files odm.img, system.img, vendor.img and product.img. Delete or rename system.img and product.img, then extract your GSI to Samsung folder and rename the xxx.img file to system.img.
4. Pack all the files and Flash:​No math here! Just use this code on Terminal and wait (Ignore errors like "Partition system, vendor, odm will resize..." or "Invalid sparce file format at header magic...")
./lpmake --metadata-size 65536 --super-name super --metadata-slots 2 --device super:5557452800 --group main:3819597824 --partition system:readonly:3340271616:main --image system=./system.img --partition vendor:readonly:474976256:main --image vendor=./vendor.img --partition odm:readonly:4349952:main --image odm=./odm.img --sparse --output ./super.img
Wait....
Use 7-Zip to archive the super.img to .tar (super.tar) and flash it on Odin (AP) and wait the phone to boot.
Unlock your Bootloader and wipe your data using your stock recovery and quickly boot to Download Mode and flash the super.tar on Odin (AP):
Notes:​I not responsible for any damage on your phone. If anything occurs, just flash your stock regional firmware through Odin.
If this tutorial did not work, you did something wrong or your phone is not supported. Don't forget to wipe your data through Recovery, it's very important.
If you want Magisk working on your A21s I recommend you to report to an issue Topjohnwu at Github.
Dear Wer99,
I Successfully Made A Non-Rooted GSI By Following Your [Tutorial / Guide],
I'm Wondering How Could I Add SuperSU & Root Permission In It
GSI : [CherishOS, AOSP10, AOSP11]
Wer99 said:
Easy to way to install a GSI on your Samsung A21s without installing a Virtual Linux.
NFC, Screen Cast, and USB MTP unfortunately is not working with AOSP 10 and 11. Backup all your data.
If don't want to make one, download my Pre-Rooted GSIs below and flash.
*Unlock your Bootloader and wipe your data using your stock recovery and quickly boot to Download Mode and flash the super.tar on Odin (AP):
Android 10 -> Download (MediaFire)Android 11 -> Download (MediaFire)Android 11 - AOSP 11.0 v306 -> Download (MEGA) - NEWAndroid 10 Screenshots
1. Requirements:​
1. Unlock your Bootloader2. Download and Install a Linux Subsystem -> Ubuntu Subsystem -> "Tutorial How to install Linux Subsystem on Windows 10 | or search how to"3. GSI Android 10 A/B Gapps -> Download only the "arm64, A/B". I recommend releases from Treble Experimentations AOSP like "system-roar-arm64-ab-gapps.img.xz". 4. Samsung.zip -> There's all needed tools and files - Odin, 7-Zip ZS etc...
- Download Samsung.zip and extract the folder "Samsung" to your desktop, and extract your chosen GSI using to this folder.
- Download your stock firmware and extract the super.img.lz4 file from AP_A217XXXXXXXXXX_XXX_XXXX_REV00_XXX.tar.md5 with 7-Zip ZS.
- Now extract super.img.lz4 using 7-Zip ZS (don't use 7-zip) to Samsung folder. Rename super.img to stock_super.img.
2. Convert stock_super.img to raw_super.img:​Open CMD ad use this codes:
cd C:\Users\%USERNAME%\Desktop\Samsungsimg2img.exe stock_super.img raw_super.img
Wait...
3. Extract raw_super.img:​On your Samsung folder, use SHIFT key of your keyboard + right click and click at "Open Linux Shell Here", wait a little, and use this code and wait the extraction:
./lpunpack --slot=0 raw_super.img
*If the extraction is completed, verify if there's this files odm.img, system.img, vendor.img and product.img. Delete or rename system.img and product.img, then extract your GSI to Samsung folder and rename the xxx.img file to system.img.
4. Pack all the files and Flash:​No math here! Just use this code on Terminal and wait (Ignore errors like "Partition system, vendor, odm will resize..." or "Invalid sparce file format at header magic...")
./lpmake --metadata-size 65536 --super-name super --metadata-slots 2 --device super:5557452800 --group main:3819597824 --partition system:readonly:3340271616:main --image system=./system.img --partition vendor:readonly:474976256:main --image vendor=./vendor.img --partition odm:readonly:4349952:main --image odm=./odm.img --sparse --output ./super.img
Wait....
Use 7-Zip to archive the super.img to .tar (super.tar) and flash it on Odin (AP) and wait the phone to boot.
Unlock your Bootloader and wipe your data using your stock recovery and quickly boot to Download Mode and flash the super.tar on Odin (AP):
Notes:​I not responsible for any damage on your phone. If anything occurs, just flash your stock regional firmware through Odin.
If this tutorial did not work, you did something wrong or your phone is not supported. Don't forget to wipe your data through Recovery, it's very important.
If you want Magisk working on your A21s I recommend you to report to an issue Topjohnwu at Github.
Click to expand...
Click to collapse
I tried all of this and I even went as far as trying to literally change the filesystem UUID and the filesystem of system.img as well, I detected some issues when booting a GSI and it's that the filesystem and the filesystem UUID's had to match (filesystem had to be EXT2 for some reason), and after I did all of that, I flashed the super.img to my phone but after a few seconds of it trying to boot (10 seconds after it's past the unlocked bootloader screen) it just reboots and kicks me to fastboot mode, a friend of mine told me that if it booted to fastboot it meant that the bootloader was able to pass instructions to the OS but failed, hence why it kicked me to fastboot, and after that I tried with different GSIs and neither of them worked sadly.
Also in the attributes I'd recommend changing "readonly" to "none" so that the partitions are Read/Write from super.img, after flashing super.img, just edit the fstab file (located in "/etc/fstab" for recovery) and replace "ro" in the mount points with "rw" so that you can read and write data to them, the point of this is to make the partitions read and write so that you can edit them and install anything you'd like, and that's exactly the reason I did it.
After some time we got a modded magisk apk that does work and doesn't have the legacy device detection issue that it had before, due to the phone using dynamic partitions and using a ramdisk, Magisk would detect the device as legacy and it would use "SAR_init", something that the device doesn't needs and because the boot process fails, it reboots.
Also, before I realized that you could make the partitions inside super.img read/write, I would usually use readonly and it wouldn't work either, I'd appreciate if you could help me with this.
Wer99 said:
Easy to way to install a GSI on your Samsung A21s without installing a Virtual Linux.
NFC, Screen Cast, and USB MTP unfortunately is not working with AOSP 10 and 11. Backup all your data.
If don't want to make one, download my Pre-Rooted GSIs below and flash.
*Unlock your Bootloader and wipe your data using your stock recovery and quickly boot to Download Mode and flash the super.tar on Odin (AP):
Android 10 -> Download (MediaFire)Android 11 -> Download (MediaFire)Android 11 - AOSP 11.0 v306 -> Download (MEGA) - NEWAndroid 10 Screenshots
1. Requirements:​
1. Unlock your Bootloader2. Download and Install a Linux Subsystem -> Ubuntu Subsystem -> "Tutorial How to install Linux Subsystem on Windows 10 | or search how to"3. GSI Android 10 A/B Gapps -> Download only the "arm64, A/B". I recommend releases from Treble Experimentations AOSP like "system-roar-arm64-ab-gapps.img.xz". 4. Samsung.zip -> There's all needed tools and files - Odin, 7-Zip ZS etc...
- Download Samsung.zip and extract the folder "Samsung" to your desktop, and extract your chosen GSI using to this folder.
- Download your stock firmware and extract the super.img.lz4 file from AP_A217XXXXXXXXXX_XXX_XXXX_REV00_XXX.tar.md5 with 7-Zip ZS.
- Now extract super.img.lz4 using 7-Zip ZS (don't use 7-zip) to Samsung folder. Rename super.img to stock_super.img.
2. Convert stock_super.img to raw_super.img:​Open CMD ad use this codes:
cd C:\Users\%USERNAME%\Desktop\Samsungsimg2img.exe stock_super.img raw_super.img
Wait...
3. Extract raw_super.img:​On your Samsung folder, use SHIFT key of your keyboard + right click and click at "Open Linux Shell Here", wait a little, and use this code and wait the extraction:
./lpunpack --slot=0 raw_super.img
*If the extraction is completed, verify if there's this files odm.img, system.img, vendor.img and product.img. Delete or rename system.img and product.img, then extract your GSI to Samsung folder and rename the xxx.img file to system.img.
4. Pack all the files and Flash:​No math here! Just use this code on Terminal and wait (Ignore errors like "Partition system, vendor, odm will resize..." or "Invalid sparce file format at header magic...")
./lpmake --metadata-size 65536 --super-name super --metadata-slots 2 --device super:5557452800 --group main:3819597824 --partition system:readonly:3340271616:main --image system=./system.img --partition vendor:readonly:474976256:main --image vendor=./vendor.img --partition odm:readonly:4349952:main --image odm=./odm.img --sparse --output ./super.img
Wait....
Use 7-Zip to archive the super.img to .tar (super.tar) and flash it on Odin (AP) and wait the phone to boot.
Unlock your Bootloader and wipe your data using your stock recovery and quickly boot to Download Mode and flash the super.tar on Odin (AP):
Notes:​I not responsible for any damage on your phone. If anything occurs, just flash your stock regional firmware through Odin.
If this tutorial did not work, you did something wrong or your phone is not supported. Don't forget to wipe your data through Recovery, it's very important.
If you want Magisk working on your A21s I recommend you to report to an issue Topjohnwu at Github.
Click to expand...
Click to collapse
Also, Just so you know, the recovery that we have is OrangeFox R11 which is currently an alpha build, thanks to magisk I was able to use the tool "dd" in termux to flash the recovery.img to /dev/block/by-name/recovery (aka the recovery partition) and this helped me bypass DL mode which is even worse now that I upgraded to U5 (I regret it and I tried downgrading from recovery instead of DL mode but the linux kernel itself protects the mmcblk0boot0 partition which is supposed to be the partition where the "BL" is located, and I tried flashing the sboot.bin file to that partition and it didn't work due to it being protected
Anyways back to the original topic, I don't know how but after flashing OrangeFox R11 with dd in android (I used su with magisk of course because), OrangeFox managed to boot with stock vbmeta and this build was supposedly built with A10's firmware in mind, not A11's firmware, so I have some hopes that flashing super.img from recovery might work if given the right vendor and firmware, I even flashed a vbmeta that was made for U3 from OrangeFox and it booted without any issues, oddly enough OneUI booted with that U3 vbmeta.img
LonelyCracker said:
Dear Wer99,
I Successfully Made A Non-Rooted GSI By Following Your [Tutorial / Guide],
I'm Wondering How Could I Add SuperSU & Root Permission In It
GSI : [CherishOS, AOSP10, AOSP11]
Click to expand...
Click to collapse
You don't need SuperSU anymore, There's already a fixed magisk for it, Here's the links:
[SHARING] HOW TO ROOT A21S STOCK ROM WITH MAGISK
Hello friends I just want to share how to root A21S stock rom in case anybody needs it: 1. Unlock bootloader 2. (On PC) Extract boot.img.lz4 from AP...tar file, then copy it to phone 3. (On phone) Install ZArchiver to extract boot.img from...
forum.xda-developers.com
[ROOT] Modified Magisk for Galaxy A21S (R)
It seems that the A21S hasn't had any root since it was released (other than pre-rooted GSI ROMS) When flashing Magisk, the phone went into bootloop, and the only way to fix it was to flash stock rom via Odin. After some analysis, it seems that...
forum.xda-developers.com
David112+ said:
You don't need SuperSU anymore, There's already a fixed magisk for it, Here's the links:
[SHARING] HOW TO ROOT A21S STOCK ROM WITH MAGISK
Hello friends I just want to share how to root A21S stock rom in case anybody needs it: 1. Unlock bootloader 2. (On PC) Extract boot.img.lz4 from AP...tar file, then copy it to phone 3. (On phone) Install ZArchiver to extract boot.img from...
forum.xda-developers.com
[ROOT] Modified Magisk for Galaxy A21S (R)
It seems that the A21S hasn't had any root since it was released (other than pre-rooted GSI ROMS) When flashing Magisk, the phone went into bootloop, and the only way to fix it was to flash stock rom via Odin. After some analysis, it seems that...
forum.xda-developers.com
Click to expand...
Click to collapse
Yeah I Know But I'm Just Interested In Making A Prerooted GSI
LonelyCracker said:
Yeah I Know But I'm Just Interested In Making A Prerooted GSI
Click to expand...
Click to collapse
What's the point of making a prerooted GSI with an outdated root method?
You can't even install modules with SuperSU
To David112+ :
In My Opinion, Prerooted GSI Is Way Better.
You Could See The Comparison I Made Here.
Also Making One GSI Could Gain Me Lots Of Experience.
So I Couldn't Think Of The Reason Why Not
Magisk Patched Stock [Firmware / ROM] Also Have It Own Problem,
Which You Could Find Here.
LonelyCracker said:
To David112+ :
In My Opinion, Prerooted GSI Is Way Better.
You Could See The Comparison I Made Here.
Also Making One GSI Could Gain Me Lots Of Experience.
So I Couldn't Think Of The Reason Why Not
Magisk Patched Stock [Firmware / ROM] Also Have It Own Problem,
Which You Could Find Here.
Click to expand...
Click to collapse
I don't think you've realized or checked the group of the phone but a load of people have already rooted their ROMs with Magisk and so far they have no problems, and still, everyone agrees that installing modules somewhere from the internet is the responsibility of the end user.
And I'm pretty sure that everyone agrees that magisk is the best root method, and even if you wipe data, you can just reinstall the Magisk apk to get the root prompt and finish setting it up, or better yet. use the systemizer module to systemize the magisk apk so that it's installed in system instead of data.
Making a prerooted GSI is just a waste of time, I'd rather just make normal GSI that's flashable on the phone and just install Magisk or systemize the Magisk APK.
I do agree that making a GSI flashable for the phone makes you gain a lot of experience but you're wasting your time into something that barely anyone is going to use, due to the fact that it has SuperSU which is old and outdated and most people prefer Magisk anyways because it's updated and not only that but you can pretty much install anything you'd like with the modules.
To David112+ :
Sorry To Disagree With You, I Was Trying To Acheive A Goal There .
My Goal Was To Get ADB (Android Debug Bridge) With "adb root" Working On Magisk Patched Stock [Firmware / ROM]. After Many Research & Attempt To Acheive That, I Gave Up... I Gained Some Knowledge There Too. I Know That Stock Rom Are For Production Purpose & I Can't Gain Root Access Using ADB (Android Debug Bridge).
Hopefully I Could Get Help Somewhere.
But Fun Fact Is...
I Water-Damaged My Phone
Question :
1.) Is It Possible To Make A Non Rooted GSI & Patch It With Magisk ? How ?
LonelyCracker said:
To David112+ :
Sorry To Disagree With You, I Was Trying To Acheive A Goal There .
My Goal Was To Get ADB (Android Debug Bridge) With "adb root" Working On Magisk Patched Stock [Firmware / ROM]. After Many Research & Attempt To Acheive That, I Gave Up... I Gained Some Knowledge There Too. I Know That Stock Rom Are For Production Purpose & I Can't Gain Root Access Using ADB (Android Debug Bridge).
Hopefully I Could Get Help Somewhere.
But Fun Fact Is...
I Water-Damaged My Phone
Question :
1.) Is It Possible To Make A Non Rooted GSI & Patch It With Magisk ? How ?
Click to expand...
Click to collapse
Custom ROMs should work with ADB root normally
2. To install Magisk just use the links that I shared in this post (https://forum.xda-developers.com/t/...d-gsis-for-samsung-a21s.4269227/post-84975373)
After upgrading to U5, I can't install these GSIs anymore. It bootloop all the times
To David112+ :
But Is Not Possible To Use ADB (Android Debug Bridge) On Magisk Patched Stock [Firmware / ROM]. What I Was Saying Is To Use "adb root" On Magisk Patched Stock [Firmware / ROM]
I'm Only Able To Use The Command "adb root" In Custom GSI Built By Wer99.
Not Every Custom Build GSI Are Prerooted.
Maybe You're Right Magisk Is Better Than Old Little SuperSU. But I Need "adb root" To Work With It
thatha said:
After upgrading to U5, I can't install these GSIs anymore. It bootloop all the times
Click to expand...
Click to collapse
If you have magisk with stock ROM, good news for you, I'll be working a guide in how to get a GSI installed as a magisk module, I tested this with ShapeShiftOS and I got as far as the boot animation of ShapeShiftOS, Once I was booted I checked ADB and sdcard was encrpyted and that's why it wasn't able to start correctly, it was just stuck in the google logo with a loading bar, I'm gonna try decrypting data, formatting and then installing the module
If this does work then I'll be releasing a guide in how to get a GSI of your preference working as a magisk module
Explanation: Thanks to Magisk's Magic Mount feature, I'm able to systemlessly swap the assets of OneUI with a Custom ROM's of my choosing, such as ShapeShiftOS
Edit: This idea is discarded, Because of the userdata partition being encrypted I can't use ShapeShiftOS, and even after decrypting I can't use it because OneUI gets stuck in "Starting android" when using the boot image with patched fstab and magisk
And if I download gsi android 11 through mediafire, will I have to do all this procedure? or just flash on odin? A21S ANDROID 11.
To Oroki:
These GSI Is Ready To Be Flashed.
LonelyCracker said:
To Oroki:
These GSI Is Ready To Be Flashed.
Click to expand...
Click to collapse
but will i have to do topic 2 and 3?
To Oroki :
Please Explain What Do You Mean By Topic 2 & 3
LonelyCracker said:
To Oroki :
Please Explain What Do You Mean By Topic 2 & 3
Click to expand...
Click to collapse
2. Converta stock_super.img em raw_super.img: e​3. Extrato raw_super.img:​
To Oroki :
Those Step You Provide Aren't Necessary Anymore
It's Patched Which Mean You Don't Have To Do Anything To It
Sorry For Late Reply

Categories

Resources