yashsingh1/xdaforums huggingface dataset:
[Red Magic 8 pro] Admiral_Face:
Yeah, that seems to be the trend, my fault was in setting up a lockscreen before unlocking the bootloader and flashing. Very unfortunate. Maybe it will work if I reflashed original unmagisked init_boot, locked the bootloader, then tried setting up again after a factory reset. I guess the best procedure would be to first factory reset, go through setup without pin, then unlock bootloader, flash magisk, etc.

My settings is showing 1425510 GB + 10 GB, never noticed, nice find, haha.

Magisk installs modules through the gui fine though, and lsposed showed it's nice little notification straight off the bat.
[Red Magic 8 pro] aaa.bbb111222:
This seems to be directly caused by not removing any passwords before unlocking bootloader.

Issue looks to be tightly coupled with TEE and Gatekeeper, at least base on exception: `java.lang.IllegalStateException: Fail to enroll user password when creating SP for user 0` (and few others). Probably TEE has some internal state, which differs between locked/unlocked state (chain of trust? or something else).

Similar issues were fixed by relocking.
[Red Magic 8 pro] ce_francky:
yes, I certify that the official roms OS9.0.4 and 9.0.12 and 9.0.16, I have unlocked them and updated them only to EDL 9008, and I added 5 or 6 *.IMG files but it is only on stable Chinese OS9 Roms, and it is not with boot.img or abl.img but ini_boot_a and b that I patched the image with Magisk 26.403 Alpha and then integrated it into the installable Rom in EDL 9008, impossible in fastboot, but I kept everything to myself for the moment because I don't have time to write miles on the forum, I will give you the link of the EDL OS9 CN roms, I integrate after all what is from Google and I change the complete language of the Rom using hiddenMIUI, I tried this evening to unlock OS9.0.11 NEEA Global and I did not succeed, but I am waiting if the person contacts me again to save their entire OS9 Rom .0.11 NEEA Overall in EDL 9008 mode, otherwise, my new Redmagic 9 Pro EU NEA will be delivered to me on Monday, I even installed the Xiaomi 13 Fuxi hybrid roms rooted in version 8.016, except that it seriously rams the Xiaomi Rom, I prefer the Rom GSI RedmagicOS9... there is also the GKM and other images GKI with KernelSU version 0.75, in China, they only install KernelSU with anyKernel 3 Android 13-5.15.104 except that Redmagic OS 8 is in version Android 13- 8.15.104. the current CN Rom is GEN_CN_NX769JV1.0.0B16MR_SD_WO_ERA.zip, I extract all the images and install everything in EDL, no other choice. And Magisk 26.4 Kitsune with Magisk.
[Red Magic 8 pro] BotchedRPR:
Yep. Weird that they didn't change much between abl. Always seen major stuff. Lol. OS9 isn't that bad anyway.
[Red Magic 8 pro] ce_francky:
For those who want it, I will put the RedmagicOS9.16 stable link from the end of December in CN version, patched with Magisk and it will be necessary to make a patch for the repair of the fingerprint, Otherwise, the patches already exist with Kitsune and under Xiaomi Mi5 hybrid RedmagicOS9, you have to search on bidu which replaces Google Chrome in China, I am attaching the link from Nubia in China of the official Rom in the meantime, it is in CN and EN. https://ui.nubia.cn/rom/detail/85
[Red Magic 8 pro] BotchedRPR:
No use for Redmagic 9.
[Red Magic 8 pro] BotchedRPR:
abl swap does NOT work

device goes into crashdump mode

guess i was right, :(
[Red Magic 8 pro] aaa.bbb111222:
That's unfortunate. Well, there was a video of a rooted 9 Pro, so it must be possible somehow.
[Red Magic 8 pro] BotchedRPR:
It is possible.

Swap out your SoC with a zerofuse. Bam, secureboot off, flash generic abl, root
[Red Magic 8 pro] Joserubenb:
Is there a way to update the software after rooting Red Magic 8S Pro?
[Red Magic 8 pro] aaa.bbb111222:
There should be. Local update will probably just work if you install full OTA. If only incremental is available then it's harder, the easiest way is to first need to extract it and flash in fastboot. Theoretically, flashing stock images using `dd` just before trying to update should work, but I'd rather use fastboot.
[Red Magic 8 pro] Joserubenb:
Could you help me in the update process via fastboot? I'm a little new to this
[Red Magic 8 pro] aaa.bbb111222:
You'll need to flash all partitions except abl, use fastboot command from here as a reference: https://xdaforums.com/t/guide-to-up...and-reflashing-of-stock-rom-method-3.4609249/
[Red Magic 8 pro] borygo77:
You need to flash init_boot.img, update OTA and then flash your patched boot ini again.

I'm using old boot ini for all firmware I had. 4x, 8x and 9x. These are all the same.. 😉
[Red Magic 8 pro] aaa.bbb111222:
It's not possible on OS8 anymore because the necessary fastboot commands were removed. And no, just init_boot is not enough because there is also abl.

Incremental OTA checks hashes for all partitions, so they must be restored to stock ones.
[Red Magic 8 pro] borygo77:
Have you tried firehose from 8.0.9 package with 8sPro? I think I've flashed init_boot.img straight from edl mode in both 8.09 and 9.0.8 when trying them. But, it was 8Pro only... Which I'm considering exactly the same

..
[Red Magic 8 pro] aaa.bbb111222:
Nope, I'm on 8.0.16 right now.

I'm not entirely sure, but it'll probably work this way only if you have unlocked your bootloader before (that is, on OS6, where it was possible) due to AVB.

The reason why this thread even exists is that 8 Pro and 8S Pro are basically the same device.
[Red Magic 8 pro] borygo77:
You should try 9.0.8 firehose. 99.9% sure you'll be able to flash any img you want 😉
[Red Magic 8 pro] Meminsim:
Francky, do they have any solution on Z series ? z50 ultra, z50s pro or even z60 ultra. Thanks for your effort.
[Red Magic 8 pro] BotchedRPR:
z series have a different signing key, you can't boot rm abls on z series
[Red Magic 8 pro] batargin:
Hello everyone Share the files ini_boot_a and b, fixed from Magisk to OS 8.0.13 firmware. Thank you.
[Red Magic 8 pro] borygo77:
You can use any init_boot.img patched. It will work.

But if you want to update ota you need to flash original init…from firmware you’re with as any won’t suit…
[Red Magic 8 pro] batargin:
"from firmware you’re with as any won’t suit…" So you need to flash your phone?
[Red Magic 8 pro] borygo77:
To gain root you need patched init_boot.img and it can be any. I was flashing boot ini from os6 to os8 and other way around no problem and it worked.

But to be able to update OTA once you're rooted you need boot ini from firmware you're actually on. So my firmware is 4.48 and I got 4.48 init_boot.img clean saved for future updates coming.
[Red Magic 8 pro] batargin:
Something is going wrong,an error occurred when flashing fastboot flash init_boot_a init_boot.img. I flashed my phone from 8 pro to 8S, maybe that's the problem?
[Red Magic 8 pro] aaa.bbb111222:
If you flashed OS8 via local update or all images via fastboot then yes. You'll need to flash old abl back, refer to the first post in this topic.
[Red Magic 8 pro] batargin:
I don't understand what's going on, but I still didn't figure out how to flash abl in abl_a and abl_b, I killed the whole day.
[Red Magic 8 pro] borygo77:
So you got 8Pro with 8sPro firmware don't you?

And you want to root it ?
[Red Magic 8 pro] batargin:
Yes, I have 8 trying it passed on 8S, already through ATC.It remains only to get root rights, but I can't flash init_boot through fectboot in any way, an error appears.
[Red Magic 8 pro] borygo77:
Did you unlocked your bootloader before you flashed os8? 🙄

If you can't flash using fastboot you can always use qfil to flash/save any partition you wish.

Use this

https://www.mediafire.com/file/okjnv9gh4uaiv0w/NX729SV1BV1.0.0B09.rar/file

Pick a firehose and flash patched init_boot.img to both partitions ini...
[Red Magic 8 pro] batargin:
My bootloader was unlocked on 8 pro and I had root rights.
[Red Magic 8 pro] batargin:
<Mod Translation>

English:

I tried all the methods, but to no avail. I'll wait for the 8 PRO firmware update

********************

Russian:

использовал все методы,но все безрезультатно. Буду ждать обновление прошивки 8 PRO
[Red Magic 8 pro] khusika:
Moderator Announcement​

Greetings @batargin. As a courtesy, I have translated your recent post. As a friendly reminder, we ask all members to please post in English or add at least an English translation to your Russian post, as part of XDA Rules No 4.

Spoiler content hidden.

Regards,

Khusika - Moderator.
[Red Magic 8 pro] borygo77:
Was but is it still unlocked?

How do you want to update now if you have firmware from 8s? 😜

Qfil is waiting for you! You want it or hate it but if you want official update you need to come back to os6 from 8Pro and only qfil is able to help you...
[Red Magic 8 pro] batargin:
Yes, I know. I'll be at 8 s for now. Let's see how the 8 PRO will be.
[Red Magic 8 pro] batargin:
As soon as inspiration comes, I will torture the phone again.
[Red Magic 8 pro] Babu1999:
all done, now i need solution about finterprint,

can anyone fix already, please reply,
[Red Magic 8 pro] dmneodu:
Hello. Do you have redmagic 8s pro fingerprint recovery patch?
[Red Magic 8 pro] ce_francky:
Non, j'ai un notaire pour le réparer.

Contact Xiaomi EU, développeur if he Can make it, he has very good développeur for custom Rom and repaire fingerptint bloced by Soc Snapdragon 8 Gen3 in kernel.
[Red Magic 8 pro] ce_francky:
No, Contact Xiaomi EU développeur for make a patch because i have notaire à time for kernel or download in text search on telegram with GSI Rom
[Red Magic 8 pro] alucke:
can we backup the persist file from from an unrooted 8s pro and flash the stock persist.img after the phone is rooted?
[Red Magic 8 pro] Azizgoldfire:
I have z50 ultra can flash this abl img on it, possible on same cpu device??
[Red Magic 8 pro] mvikrant97:
Yes you can try it with caution.

Make sure to backup your device firmware first.
[Red Magic 8 pro] mvikrant97:
As the author says. Don't try it then because he says it will brick your device if you use Redmagice 8S Pro abl files.
[Red Magic 8 pro] Azizgoldfire:
Can i try abl files if it brick then i reflash to stock abl files
[Red Magic 8 pro] mvikrant97:
Your device may brick permanently and would require hardware repair.
[Red Magic 8 pro] Azizgoldfire:
Oh thank you brother
[Red Magic 8 pro] Azizgoldfire:
It has same product name in bootloader mode so can i try 8s abl file ?
[Red Magic 8 pro] sleeping3119:
Thanks for your guide should i use all the files provided by Timy Tuner for this tool too.

And should i have to flash abl files too.

Also have a confusion if i can dump init_boot by this method then why should i need to flash patched boot by fastboot why can't i flash it in edl mood using same tool without unlocking bootloader
[Red Magic 8 pro] Anegorami:
The guide you've quoted only provides an alternative way (and the corresponding software) to use EDL mode, it doesn't cover the rooting process which stays the same, nor it is supposed to. So, to answer your particular questions. (And, please, mark them with some actual question marks next time, OK?)

Of course, as the files used by me were the same files posted above. Do not be confused with the slightly different file names, those were changed to match the rest of my collection.

Of course you should. ABL partition replace is used to unlock the bootloader, and without it unlocked it will refuse to load the modified boot partition code. If you want some insight on the topic, read about Verified Boot and Chain of Trust.

You very much can flash the modified init_boot, but, as stated above, it simply would not load. The main goal of the guide is to unlock the bootloader, after that you're free to use any way in your possession to replace the partition. Flashing it through fastboot will simply save you from going into EDL mode again, thus is considered to be a little bit more convenient.

Append: In case you'll be left wondering about why ABL replacement is working regardless of Verified Boot still being in place, it is because we're replacing one genuine ABL with the other genuine ABL, although made for the different phone. Those are not modified in any way, thus the signature stays the same and the chain of trust is not compromised.
[Red Magic 8 pro] sleeping3119:
Thankyou for your reply, you made me crystal clear and yes i will start using "?"s.

I rooted my mobile successfully but now i want to update it and software update is showing your software is up to date i.e 8.0.9_NX729J_GB.

Should i download v812 software from redmagic site and flash it by local update?

I am afraid of it because i am rooted and BL is unlocked it may brick my device.

Also when i local flash updated software would it be unrooted or rooted?

In case of unroot, can i use extracted init_boot from downloaded software and should i need to flash that provided abl again?
[Red Magic 8 pro] ce_francky:
Hello, yes, you can update in 8.0.12 but fingerptint not possible to be ok.
[Red Magic 8 pro] sleeping3119:
tell about it too
[Red Magic 8 pro] Anegorami:
The ONLY PROPER way to update after unlocking bootloader is to apply the said update manually, into an inactive slot. On that topic, you better read the manuals on the modern Android partition table yourself, but I'll still provide a brief explanation. First, you should obtain some environment information, namely - your currently active slot from which the system is booting, either A or B. Then, you should download the update payload, unpack it and flash the corresponding partitions into the INACTIVE slot (meaning B if your active slot is A and vice versa). After that you should run Magisk to install it onto inactive slot (since you have the full access now, it will perform the patching and flashing on its own), then go into bootloader, swap the active slot and reboot. In case of success you'll boot into the new system, in case of failure - back into bootloader, from which you can swap the slots again to be able to boot into your current system.

There are two main pitfalls here. First, you should CLEARLY understand active-inactive slot position, else you may accidentally overwrite your CURRENT system and find yourself in a bootloop or even a softbrick. Second, the payload should match the phone, so make sure you're downloading the correct version, region, etc.

Now, answering your next question. Your phone is Magisk-"rooted" as long as the Magisk daemon binaries that reside in the boot partition (init_boot, in our case) are intact. This simple knowledge will answer any and all questions, including, but not limited to, why the root access can be easily restored even after a factory reset. In any case, after an explicit Magisk installation the new system, shall it boot normally, will have the said daemon.

Now, onto unrooting. First of all, this process is not recommended due to a number of reasons, one being additional checks that may or may not be hidden in the depth of the firmware. In other words, even if you restore everything from the backup you surely had made (RIGHT?!) and lock the bootloader there is no guarantee that the phone will magically return into the out-of-box state. But if you still insist on that, then, yes, restoring the original partitions and locking the bootloader "should" be enough.

And finally, onto the fingerprint issue. Rule of thumb is SKIP as much of the initial setup as possible until you get your phone into the stable state. In my case, SOLE setup of face ID and fingerprint was enough to make it work just fine (using the fingerprint only due to face ID wasting an unholy amount of battery in idle state... ok, ok, maybe not that much but I'm still concerned due to my general OCD). However, if you've crossed that bridge, there are some threads about reseting it, so check those.
[Red Magic 8 pro] MARO_102:
What abl_a.bin and abl_b.bin is responsible for?

Is fingerprint will work ?
[Red Magic 8 pro] uberzer0:
Hi.

Can I do this with the latest OS version? Can I just extract init_boot.img from lower firmware data and use it safely?

edit: bricked my phone lmao
[Red Magic 8 pro] Admiral_Face:
More working root/xposed things and non-working root/xposed things:

Substratum Lite with Swift Black theme works fine (despite the device ui not being AOSP-based) for many apps, toast, magisk prompts, ect just not for settings app or pulldown statusbar menu. Statusbar icons work from Iris Monet Free. Looking for a way to disable the annoying burn-in hazard 120hz constantly on the corner.

SELinux can easely be set to permissive or enforcing without much struggle.

Core Patch signature spoofing works great, no issues modifying apps and repacking them unsigned.

AOSP Mods 100% does not work, nothing is changed, no settings function. So clearly MagicOS is some strange beast not derived from AOSP, MIUI, One, or any other kind of interface used anywhere else.(not surprised)

Overlayfs System partition remounting with rw for build.prop editing causes a terrible system-wide slowdown, videos no longer playable, animation when switching on "game mode" stutters, games unplayable, even in diablo 3.36ghz mode. So I don't suggest using overlayfs magisk modules; upon simple disable performance was completely restored.

Still haven't tried fixing the lockscreen, though I know how to should I ever choose. I can dump anything by request if needed though. After I fix my lockscreen eventually, I'll go ahead and port TWRP for the 8s pro (shouldn't be much different from the 8 pro's TWRP) and post it in another thread.

PS. Can we please edit this first post to include a disclaimer for the lockscreen, along the lines of disable all pins/patterns/passwords and biometrics before attempting root, or factory reset and go through the setup process without setting lockscreen stuff before attempting this procedure?
[Red Magic 8 pro] noppe5:
This phenomenon is caused by the rewritten abl image for BootLoaderUnlock.

After BootLoaderUnlock is finished, write the backed up abl image and it will be restored.
[Red Magic 8 pro] Anegorami:
Noted, thanks for the info. For now I see no major side-effects of this beside constant OCD buzzing but it's good to know that there is a way to get rid of it should it trigger more irregular behavior.

Also, a fair warning. DO NOT attempt to install MicroG without RTFM and diving into the system partition first - got a bootloop after attempting a "common" installation route. Factory wiped again, much more painfully this time (almost got the phone ticking just as it should by my personal tastes and quirks).
[Red Magic 8 pro] Timmy Turner10:
One issue I found, is with this bootloader, it says device is corrupt, and upon power key press to continue it boots successfully. Unfortunately these companies aren't very easy on us to let us root our own devices. In a perfect world it'd be much more straightforward. Now something I want to do is make the root partitions read write instead of read only, and possibly get that lockscreen back without the bootloader lock/unlock cycle? That'd be nice.

Another thing, are you saying it's safe to flash the oem abl back after the bootloader is unlocked?
[Red Magic 8 pro] aaa.bbb111222:
https://xdaforums.com/t/fix-your-device-is-corrupt-red-warning.4615319/
[Red Magic 8 pro] Jwilliams85:
oh man do i feel stupid, for some reason i flashed your abl file to my init_boot a and b partitions. does anyone by chance have those partitions saved and if so can you share them or guide me through the process please. I have a RM 8s pro i used QFIL with your firehose file to open the partition table. I then dumped the init_boot a and b partitions and flashed them with the abl file that was provided here, then i dumped and flashed the abl_a abl b like i was originally supposed to. i then exited out of everything waited for QFIL to shut down and restart EDL mode properly and now my phone is stuck. please help me out im kinda a noob so if need be i will gladly pay someone to get my phone working again
[Red Magic 8 pro] noppe5:
I have an init_boot_a that I backed up.

However, mine is the Japanese version.

it may not work.
[Red Magic 8 pro] Jwilliams85:
thank you
[Red Magic 8 pro] Anegorami:
OK, let's go.

>I then dumped the init_boot a and b

If you have the dumps, why are you asking for a copy? Just flash your own dumps back.

>now my phone is stuck

Stuck where? EDL? Bootloader? Recovery? Please, provide more data.

Update: init_boot dump provided by noppe5 is identical (precise byte-copy) to mine, so those are universal despite the region and the hardware variation being different (mine is 16/512). Good to know.
[Red Magic 8 pro] Jwilliams85:
i cant find the init_boot dumps what file extension am i looking for? i think theyre located under C:\Users\onesi\AppData\Roaming\Qualcomm\QFIL\COMPORT_12 but ive never messed with EDL before so im kinda gun shy. the device boots into recovery, bootloader and EDL. i tried to update via adb sideload but the file nubia provided was outdated so it failed
[Red Magic 8 pro] Timmy Turner10:
English/ North America boot images. Rename .bin to .img. Go to fastboot and fastboot flash init_boot_b <this image location>. Pretty sure you can use this for flash init_boot_a too.
[Red Magic 8 pro] Anegorami:
>i cant find the init_boot dumps what file extension am i looking for?

QFIL saves the dumps under *.bin extenstion (with the filename being the partition position and size, in LBA).

>the device boots into recovery, bootloader and EDL.

Then you have pretty high chances to boot into the system. After flashing init_boot back do a factory reset from Recovery - that will make sure that no cached data would prevent you from booting all the way should the init_boot tick right. If you continue to stuck in a bootloop even after the reset then the sole solution would be to try different init_boot dumps until you get through.

Also, check the active slot in bootloader and make sure you're on the right page (i.e. you're flashing the same slot you're currently on) and set it explicitly after the flashing is done. Pay attention when setting the slot - if you set it to inactive one and reboot you might end up in EDL abyss like I did.
[Red Magic 8 pro] Jwilliams85:
Sorry for not replying sooner guys, i was able to get my phone out of edl and booting up normally once i received the init_boot a file from the user with the Japanese variant (sorry i started writing this before I copied the name from the thread) once I saw the file type i went to the location where qfil was saving everything and found my original files, even though I deleted my screen lock its still unavailable and i have to reapply Microsoft launcher after every boot but i managed to root my phone thanks a million to all of you!!!!!
[Red Magic 8 pro] niveZz:
a little off-topic but

please tell me this isn't gonna be as hard with the upcoming redmagic 9 series

because if it's as complicated as explained i might consider not buying it
[Red Magic 8 pro] aaa.bbb111222:
You can start searching for alternatives already. It will be at least as hard as 8s (8 with latest global ROM is fine, actually) and impossible to unlock at all in worst case. I guess we're stuck with 8/s pro as a "best phone" (by the following criteria: unlockable bootloader, no punch hole, flagship CPU, huge battery and 3.5 mm headphone jack) for quite some time. Maybe ROG Phone 8? Who knows, but right now all Asus phones are not unlockable (hopefully this will change by the time of rog 8 release) and imho rm8p looks better than rog 7.

The only reason why it worked here is that abl and firehose from 8 pro are compatible with 8s pro. Both abl and firehose files are signed, so phone will simply reject incorrect ones.

Well, if there's a working firehose, one might try flashing abl from unlockable device with same SoC (like any other 8g3, or 8g2 abl used here) and maybe it will work. But it can equally likely brick the device until stock abl is flashed back. And if there's no firehose or abl didn't work then that's it. Say thanks goodbye to Nubia and try convincing them to change this policy of restricting users buy another phone.