[Q] How to backup Nubia Red Magic 3's boot, system and etc from phone? - Nubia Red Magic 3 Questions & Answers

Hello,
I purchased my Nubia Red Magic 3 CN ROM today. Before doing root, I'd like to backup boot, system from the phone unit itself using
Code:
adb pull
During on fastboot, connected on PC, I tried the command
Code:
adb shell ls /dev/block/bootdevice/by-name/*
but it says
Code:
error: no devices/emulators found
I just tried the command thinking it will work on most android phones.
what
Code:
adb shell ls
should I use?

I would just unpack the CN Rom boot, recovery, and system.img all there. Global ROM you have to for we have no Twrp or other custom recovery, for which one has to patch boot.img with Magisk then flash over in fastboot to root.

SuperDroidMe said:
I would just unpack the CN Rom boot, recovery, and system.img all there. Global ROM you have to for we have no Twrp or other custom recovery, for which one has to patch boot.img with Magisk then flash over in fastboot to root.
Click to expand...
Click to collapse
True I read that also somewhere. But for system, you need to unpack the system.new.dat.br
Found some helpful threads here on xda on how to unpack it.
The first one is brotli by trzpro
https://forum.xda-developers.com/android/help/tut-how-to-convert-dat-br-to-dat-t3723926
after unpacking it, you need to convert it to img
https://forum.xda-developers.com/an.../how-to-conver-lollipop-dat-files-to-t2978952
replying here for easy future reference

Related

How to flash twrp recovery in Xiaomi Redmi 4a with MIUI 9? Lets see...

I have was trying to flash the TWRP recovery in my phone (Redmi 4a), but the recovery always got replaced after every reboot with the STOCK recovery.
I am now going to show how to flash this, beside the command line technique......(Although, some command line is necessary).....
1. Set adb and fastboot files in your Windows pc, fine
2. Now download the required twrp on to your pc and place it in adb-fastboot's folder.... or techies could path to that ****....
3. Enter bootloader with.....
adb reboot bootloader​4. Now boot to twrp using......
fastboot boot recovery.img​(I have named that twrp file as recovery)
5. Download super su zip, move it in phone, root your device....... reboot your device.......Now the second phase of process comes
6. Install twrp app in your phone, open it, copy the twrp image file to phone, tap on flash recovery
7. Select your twrp recovery in the phone and boom....... you have done it...... reboot to recovery by adb reboot recovery
I FORGOT TO MENTION, you should have your device unlocked, and I AM NOT RESPONSIBLE FOR ANY MISHAP and FOR THE STATE TO PLAY CRICKET WITH YOUR PHONE...... I am honest ....... IT WORKED FOR ME......
any tester n confirmed worked ?
No reason to do all those, you can flash recovery directly from fastboot with one command. The command:
Code:
fastboot boot recovery.img
just boot to that recovery one time. This is good for testing a recovery or use it for one time without install it.
If you want to flash a recovery you just need to use:
Code:
fastboot flash recovery recovery.img
Also for both commands isn't necessary to rename the recovery file or to put it adb folder, or root the device. Just need to specify the path and filename in place of "recovery.img". For e.g:
Code:
fastboot flash recovery C:\Phone\Recoveries\twrp_3.2.1.img

[ROM][STOCK][FASTBOOT][OP6T] Stock Fastboot ROMs for OnePlus 6T

Things are changing with the advent of project treble and seamless updates. OnePlus will no longer release ROMs flashable via recovery (either stock or twrp) because is no more needed. The updates will be done on the slot not used for example if you are using slot a the update will be installed on slot b and the slot b will be set as default. If you brick and you are in bootloop how you can restore the rom? You can't with Stock ROM you have, because the zip can be only installed via Update Engine, so what can you do? Flash a stock rom via fastboot. I have extracted all images from the stock zip and i have made a new zip with the Fastboot ROM with a flash-all.bat included. This will work only if your bootloader is unlocked. This will erase all your data and will wipe your internal storage.
HOW TO FLASH
This version is only for not branded devices
Download the zip;
Unpack the zip in a folder;
Reboot the OnePlus 6T in fastboot mode (Power and volume-);
Connect the OnePlus 6T to PC;
Run flash-all.bat flasher you need;
Wait until the process end;
The phone will automatically reboot.
FLASHER ADVANCED GUIDE
flash-all-partitions-fastboot.bat : this .bat will flash all possible partitions through fastboot (Except persist) , there are some criticals partitions that can't be flashed through fastboot;
flash-only-persist.bat : this .bat will flash only persist partition in fastboot mode (This is good for people that have problems with sensor);
flash-all-partitions-recovery-criticals.bat : this .bat will boot the twrp and will flash criticals partitions, use this carefully;
flash-system-boot-vendor.bat : this .bat is the same of older flash-all.bat and so it will flash only vendor, system and boot;
flash-all-partitions.bat : this .bat will run flash-all-partitions-fastboot.bat , then flash-only-persist.bat and then flash-all-partitions-recovery-criticals.bat .
Now usually the one needed is only the first "flash-all-partitions-fastboot.bat" but if you are badly bricked i recommend to use flash-all-partitions.bat .
DOWNLOAD
All roms on AFH: https://www.androidfilehost.com/?w=files&flid=284914
All roms on Sourceforge: https://sourceforge.net/projects/fastbootroms/files/OnePlus 6T
BRANDED PHONE
GUIDE: https://forum.xda-developers.com/on...-t-mobile-oneplus-6t-to-t3865966/post78131430
T-Mobile OnePlus 6T Internationa ROM: https://www.androidfilehost.com/?fid=11410963190603845445
MANUAL FLASH: Windows - OSX - Linux
If you want to manual flash these roms these are the commands (you need to extract images.zip before proceed)
Fastboot Partitions:
Code:
fastboot flash aop_a aop.img
fastboot flash aop_b aop.img
fastboot flash bluetooth_a bluetooth.img
fastboot flash bluetooth_b bluetooth.img
fastboot flash boot_a boot.img
fastboot flash boot_b boot.img
fastboot flash dsp_a dsp.img
fastboot flash dsp_b dsp.img
fastboot flash dtbo_a dtbo.img
fastboot flash dtbo_b dtbo.img
fastboot flash fw_4j1ed_a fw_4j1ed.img
fastboot flash fw_4j1ed_b fw_4j1ed.img
fastboot flash fw_4u1ea_a fw_4u1ea.img
fastboot flash fw_4u1ea_b fw_4u1ea.img
fastboot flash modem_a modem.img
fastboot flash modem_b modem.img
fastboot flash oem_stanvbk oem_stanvbk.img
fastboot flash qupfw_a qupfw.img
fastboot flash qupfw_b qupfw.img
fastboot flash storsec_a storsec.img
fastboot flash storsec_b storsec.img
fastboot flash system_a system.img
fastboot flash system_b system.img
fastboot flash vbmeta_a vbmeta.img
fastboot flash vbmeta_b vbmeta.img
fastboot flash vendor_a vendor.img
fastboot flash vendor_b vendor.img
fastboot flash LOGO_a LOGO.img
fastboot flash LOGO_b LOGO.img
If you need also persist partition, this is the command:
Code:
fastboot flash persist persist.img
Criticals Partitions, for these you need to boot the TWRP:
Code:
fastboot boot TWRP.img
When you are in TWRP you need to run these commands to push and flash all criticals partitions:
Code:
adb push abl.img /sdcard/abl.img
adb shell dd if=/sdcard/abl.img of=/dev/block/bootdevice/by-name/abl_a
adb shell dd if=/sdcard/abl.img of=/dev/block/bootdevice/by-name/abl_b
adb push cmnlib.img /sdcard/cmnlib.img
adb shell dd if=/sdcard/cmnlib.img of=/dev/block/bootdevice/by-name/cmnlib_a
adb shell dd if=/sdcard/cmnlib.img of=/dev/block/bootdevice/by-name/cmnlib_b
adb push cmnlib64.img /sdcard/cmnlib64.img
adb shell dd if=/sdcard/cmnlib64.img of=/dev/block/bootdevice/by-name/cmnlib64_a
adb shell dd if=/sdcard/cmnlib64.img of=/dev/block/bootdevice/by-name/cmnlib64_b
adb push devcfg.img /sdcard/devcfg.img
adb shell dd if=/sdcard/devcfg.img of=/dev/block/bootdevice/by-name/devcfg_a
adb shell dd if=/sdcard/devcfg.img of=/dev/block/bootdevice/by-name/devcfg_b
adb push hyp.img /sdcard/hyp.img
adb shell dd if=/sdcard/hyp.img of=/dev/block/bootdevice/by-name/hyp_a
adb shell dd if=/sdcard/hyp.img of=/dev/block/bootdevice/by-name/hyp_b
adb push keymaster.img /sdcard/keymaster.img
adb shell dd if=/sdcard/keymaster.img of=/dev/block/bootdevice/by-name/keymaster_a
adb shell dd if=/sdcard/keymaster.img of=/dev/block/bootdevice/by-name/keymaster_b
adb push xbl.img /sdcard/xbl.img
adb shell dd if=/sdcard/xbl.img of=/dev/block/bootdevice/by-name/xbl_a
adb shell dd if=/sdcard/xbl.img of=/dev/block/bootdevice/by-name/xbl_b
adb push xbl_config.img /sdcard/xbl_config.img
adb shell dd if=/sdcard/xbl_config.img of=/dev/block/bootdevice/by-name/xbl_config_a
adb shell dd if=/sdcard/xbl_config.img of=/dev/block/bootdevice/by-name/xbl_config_b
REMEMBER
"Invalid sparce file format at header magic" is not an error, you need to wait a bit when you see that string, just wait.
These ROMs can't be used to update or downgrade your phone but just to restore your phone, so don't use them to come back to oreo or to update from oreo to pie.
If you want to rebrand your phone from HydrogenOS to OxygenOS you can follow this guide: Rebrand Guide
If you want you can use also my tool to flash Factory Images, unlock bootloader, flash twrp or to understand if the device is recognized: https://toolaio.tk/
Thanks to @SaiBork for first time tested
If you got some problems like write error or no partition, check this: https://forum.xda-developers.com/showpost.php?p=76658555&postcount=34
Thanks to @Dark Nightmare for T-Mobile Rom Version
DONATE LINK
If you want to support this and others my projects please consider making a donation, thanks.
If you are unable to use pools or moneybox, you can also make a normal donation, all private donations will be added in the moneybox:
​
Thanks Mister :good:
Great work, thx
This is great work. Thanks!
If anyone has the T-Mobile firmware or OTA captured, please post it.
Would it be wise to extract the zip to the 6T prior to rooting just in case something goes wrong?
shizat63 said:
Would it be wise to extract the zip to the 6T prior to rooting just in case something goes wrong?
Click to expand...
Click to collapse
This fastboot rom are completely stock rom, not modified
mauronofrio said:
This fastboot rom are completely stock rom, not modified
Click to expand...
Click to collapse
Right.
So before rooting the device, would it be good to copy the images from this zip to a dir on the 6T in case something goes wrong with the rooting process? For example if Magisk or TWRP mess something up, and the 6T is in a bootloop.
Or are the images in the zip only for flashing from your PC to the 6T? So it would be of no use to have the images sitting on the 6T as a backup.
Hello. after flashing with flash-all.bat, my 6T just boots to the bootloader unlocked warning and stays there. I don't know what to do next.
EDIT: Nevermind, after trying again it worked.
shizat63 said:
Right.
So before rooting the device, would it be good to copy the images from this zip to a dir on the 6T in case something goes wrong with the rooting process? For example if Magisk or TWRP mess something up, and the 6T is in a bootloop.
Or are the images in the zip only for flashing from your PC to the 6T? So it would be of no use to have the images sitting on the 6T as a backup.
Click to expand...
Click to collapse
Actually there is not a twrp that support decryption so if you also have the images on the phone you can't flash it in twrp mode. At this moment these roms can be only flashed through fastboot with a pc
Seoyoon said:
Hello. after flashing with flash-all.bat, my 6T just boots to the bootloader unlocked warning and stays there. I don't know what to do next.
EDIT: Nevermind, after trying again it worked.
Click to expand...
Click to collapse
Perfect:good:
thank you thank you thank you OP! Nearly bricked my phone while trying to install root (something got messed up with TWRP) and I couldn't even get out of bootloader into recovery. I just got my phone a few hours ago, that would have been sad
nhshah7 said:
thank you thank you thank you OP! Nearly bricked my phone while trying to install root (something got messed up with TWRP) and I couldn't even get out of bootloader into recovery. I just got my phone a few hours ago, that would have been sad
Click to expand...
Click to collapse
Perfect:good:
If you want to support this and others my projects please consider making a donation, thanks.
After using flash-all.bat I'm getting the "Your device is corrupt" red error message on boot. I can skip by pressing power twice and phone boots normally.
I see people with 6 had to use MSM download tool to get rid of the error.
Is there any solution for 6T?
nhshah7 said:
thank you thank you thank you OP! Nearly bricked my phone while trying to install root (something got messed up with TWRP) and I couldn't even get out of bootloader into recovery. I just got my phone a few hours ago, that would have been sad
Click to expand...
Click to collapse
Just for the sake of your sanity in the future, if you can get to bootloader and device files are available, you can always get it up and running. I learned that very quickly way back in the day
iaTa said:
After using flash-all.bat I'm getting the "Your device is corrupt" red error message on boot. I can skip by pressing power twice and phone boots normally.
I see people with 6 had to use MSM download tool to get rid of the error.
Is there any solution for 6T?
Click to expand...
Click to collapse
Only msm tool i think
Well same situation here got boot loop trying to root then after install using flashall.bat now I can't get a VOLTE and now I complete lost signal but when I swap my sim card to sim slot 2 everything work...kinda weir but does anyone know how to fix it?
_BГ@ckθut said:
Well same situation here got boot loop trying to root then after install using flashall.bat now I can't get a VOLTE and now I complete lost signal but when I swap my sim card to sim slot 2 everything work...kinda weir but does anyone know how to fix it?
Click to expand...
Click to collapse
Did you have a branded version?
mauronofrio said:
Did you have a branded version?
Click to expand...
Click to collapse
Oh I has unlock one from on plus website and use it on Verizon...is that what u mean...sorry I'm new to OP device
Edit: I try to do fastboot flash modem A and B also factory reset but seem not work...
_BГ@ckθut said:
Oh I has unlock one from on plus website and use it on Verizon...is that what u mean...sorry I'm new to OP device
Click to expand...
Click to collapse
Branded version are different, they have a particoular partitions for volte, i think the only.method to solve your problem is to find another person with the same branded device and make a partitions backup that you can restore
mauronofrio said:
Branded version are different, they have a particoular partitions for volte, i think the only.method to solve your problem is to find another person with the same branded device and make a partitions backup that you can restore
Click to expand...
Click to collapse
So how do I make that? Do I need provide any information or anything?

[ROOT] EU LMV405EBW - Magisk

I couldn't find any guide for rooting the V40, so I thought I'd write down the steps I took to root my new EUR V40 - LMV405EBW. Maybe it will help others. Sorry if this is somewhat confusing, I didn't have time to make a polished version. It's basically made from my notes during the process with the commands copied from bash history.
-First, unlock the bootloader following LG's instructions here: https://developer.lge.com/resource/mobile/RetrieveBootloader.dev
There's no TWRP for the V40 and the one made for G7 doesn't work. I don't have the time and knowledge to even attempt to compile TWRP for the V40, so I proceeded with just patching an original boot image with Magisk.
You can get the patched boot images that I used from here:
Oreo 10e: boot_a_magisk_patched_10e.img
Oreo 20f: boot_a_magisk_patched_10f.img
Pie 20a: boot_a_magisk_patched_20a.img
Pie 20b: boot_a_magisk_patched_20b.img
Pie 20f: boot_a_magisk_patched_20f.img
Pie 20g: boot_a_magisk_patched_20g.img
Q 30b: boot_a_magisk_patched_30b.img (this requires flashing to the active boot partition).
Q 30c: boot_a_magisk_patched_30c.img (this requires flashing to the active boot partition)
Q 30d: boot_a_magisk_patched_30d.image (this may or may not work with "fastboot boot" and could require flashing to the active boot partition. I haven't tested if live boot still works. I just did fastboot flash boot_x img_file).
You can try to boot it with with fastboot if you have a LNV405EBW and skip the KDZ extraction part.
Installing Magisk:
Flashing this image isn't necessary, just straight boot should be sufficient and safe.
First install Magisk Manager 7 on the phone then connect the phone to the PC and run:
Code:
adb reboot bootloader
fastboot boot boot_a_magisk_patched_10e.img
After the phone boots the OS with the external boot image, open Magisk Manager and tap on Install. Select the option to Direct install to the active slot. I played it safe and decided to NOT flash also on the inactive slot. I've left it alone so I can use it in case of need of recovery.
You'll probably notice that you don't have a connection to the carrier. Just ignore it, it will back once the phone is booted normally.
Reboot and you will have permanent root until you switch the A/B slots.
In case my patched boot image doesn't work, you can just make your own.
Tools needed:
Magisk Manager 7.0.0 installed on the phone
LG Bridge installed on a Windows machine.
a Linux machine or VM (I used the latest ubuntu desktop), python3 with the zstandard module installed and kdztools from steadfasterX's repo. Maybe kdztools would work on Windows too, I haven't tried it.
adb, fastboot
You need to procure an original ROM file for your phone model. It can be downloaded easily with LG Bridge. Just connect the phone to a Windows PC, start LG bridge, go to the Software update tab and click on Update error recovery. Wait for the download to start and disconnect the phone. Ignore LG Bridge complains about not being able to flash after the downloading stage is completed. Don't click anything in Bridge and before closing it go to C:\Users\<your_username>\AppData\Local\LG Electronics\LG Bridge\SWUpgrade and copy your KDZ somewhere else. Preferably send it to the Linux VM to the LG work folder, it'll be needed there.
On Linux open a terminal:
Code:
cd ~/Documents
mkdir LG
cd LG
git clone https://github.com/steadfasterX/kdztools.git
cd kdztools
nano undz.py -c
For kdztools to be able to extract the V40 images, I needed to edit undz.py and comment the lines 88-90. So, this block should all be commented or undz will fail to extract the boot partitions.
Code:
#if len(dz_item['pad']) != 0:
# print("[!] Error: pad is not empty", file=sys.stderr)
# sys.exit(1)
To extract, with the KDZ copied to ~/Documents/LG/
Code:
cd ~/Documents/LG/kdztools
./unkdz.py -f ../V405EBW10e_00_OPEN_EU_DS_OP_0109.kdz -x
cd kdzextracted/
List the partitions contents and look for the IDs of boot_a and/or boot_b. In my case they were 44 for boot_a and 63 for boot_b
Code:
../undz.py -f V40510e_00.dz -l
Extract boot_a or boot_b or both, they're identical:
Code:
../undz.py -f V40510e_00.dz -s 44
../undz.py -f V40510e_00.dz -s 63
You can find the extracted boot images in the dzextracted subfolder. Get boot_a.image or boot_b.image or both from there and send them to the phone in a location accessible by Magisk Manager. The Download folder should do fine.
Open Magisk Manager and tap Install, select Patch Boot Image file and patch the image file(s) you extracted. Get the patched_boot.img that Magisk Manager saves in the Download folder and send it to a PC where you have adb and fastboot.
Go to the beginning of the post to the Installing Magisk section.
Damned tempting, but I'll wait until after Pie drops.
Sent from my LM-V405 using Tapatalk
Glad to see this, hopefully it's a start for all of us.
If anything, at least a way to unlock the bootloader via legitimate channels! Gonna be generating that string, next chance I get, to be ready.
Sent from my LM-V405 using Tapatalk
Once runningnak3d gets a hold of this, we should be good with the v40. Cool beans.
Hey do the unlock codes online work for $ 12-15 on sprint? I used to flash phones back in the day and got a great deal on a bad IMEI sprint lg v40, but so far I can see there isn’t a way yet. On top off all that I m in Europe and don’t want to get the error message that I m out of the Region. I would have to go to USA just to unlock the phone.
@runningnak3d
Can't I install the firmware on a different device?
V version can not unlock BL, so envious
Getting a boot image like that works but I find it stupid to not upload it so that the others don't have to do it. Besides only one model can be bl unlocked so there won't be any model mismatch (except firmware versions but keeping up with them is not that hard)
LameMonster82 said:
Getting a boot image like that works but I find it stupid to not upload it so that the others don't have to do it. Besides only one model can be bl unlocked so there won't be any model mismatch (except firmware versions but keeping up with them is not that hard)
Click to expand...
Click to collapse
Or I could find you stupid for not noticing the patched image is in my first post.
DLS123 said:
I find you stupid for not noticing the patched images are in my first post.
Click to expand...
Click to collapse
I recommend labeling the boot images with their firmware since future firmwares won't be able to run the same boot image but other than that I'm really sorry.
LameMonster82 said:
I recommend labeling the boot images with their firmware since future firmwares won't be able to run the same boot image but other than that I'm really sorry.
Click to expand...
Click to collapse
I mentioned in the description 1 line below the link that it's for 10e. There was no other update in a long time. I don't think there can be any confusion for now. I can edit and label the file when there's will be another fw update.
It looks like unlocking the bootloader breaks Widevine L1 on the V40 and downgrades is to L3. No more HD or UHD Netflix.
I couldn't find any other solution than to re-lock the bootloader to restore L1.
This doesn't happen on the V30.
@DLS123
Thank you for all!
I ask you for more details; i'm stuck at flashing first image in adb; it returns an error; have LMV405EBW with 10f. unlocked bootloader of course
Thx again for your support!
@daphix what do you mean by flashing the first image? You're not supposed to flash my patched boot image. Just boot it without flashing and Direct install Magisk from it with Magisk Manager.
DLS123 said:
@daphix what do you mean by flashing the first image? You're not supposed to flash my patched boot image. Just boot it without flashing and Direct install Magisk from it with Magisk Manager.
Click to expand...
Click to collapse
Thx for answer; i not have too much experience in working with Magisk;
i just folowed your steps:
First install Magisk Manager 7 on the phone then connect the phone to the PC and run:
adb reboot bootloader
fastboot boot patched_boot_a.img
when i run fastboot comand for flash, is runing, but is returning "an error at line x"
i suppose is something wrong in this instructions.
daphix said:
Thx for answer; i not have too much experience in working with Magisk;
i just folowed your steps:
First install Magisk Manager 7 on the phone then connect the phone to the PC and run:
adb reboot bootloader
fastboot boot patched_boot_a.img
when i run fastboot comand for flash, is runing, but is returning "an error at line x"
Anyway; understand now what to do;
Steps are below:
- first install magisk manager
- download magisk zip from magisk site or from magisk manager himself on phone
- download patched_boot_a.img to phone from our good contributor
- use magisk manager and select inslall image of patched_boot_a.img from phone
- magisk manager will generate a magisk patched image
- transfer this magisk patched image (not patched_boot_a.img) to pc in ADB folder
- flash with Adb this magisk patched image from pc to phone.
Thx to our friend!
---------- Post added at 09:53 AM ---------- Previous post was at 09:21 AM ----------
DLS123 said:
@daphix what do you mean by flashing the first image? You're not supposed to flash my patched boot image. Just boot it without flashing and Direct install Magisk from it with Magisk Manager.
Click to expand...
Click to collapse
Hi;
using Magisk mamanger and your file was generated a file: magisk_patched.img
pls support; trying to flash that image from PC with adb not work:
fastboot flash partition_a magisk_patched.img
Click to expand...
Click to collapse
@daphix
Whatver you're trying to do, is nowhere in the procedure I used. If you already booted with my boot image why are you making another boot image with Magisk and why are you trying to flash that? I never wrote anything of the sort.
if you booted with my patched image you already have temporary root and can use Magisk Manager to Direct install Magisk itself.
DLS123 said:
@daphix
Whatver you're trying to do, is nowhere in the procedure I used. If you already booted with my boot image why are you making another boot image with Magisk and why are you trying to flash that? I never wrote anything of the sort.
if you booted with my patched image you already have temporary root and can use Magisk Manager to Direct install Magisk itself.
Click to expand...
Click to collapse
Hi , thank you for reply;
I tried many combinations of your commands;
maybe due that am noob, but succesion below simply is not working:
First install Magisk Manager 7 on the phone then connect the phone to the PC and run:
adb reboot bootloader
fastboot boot patched_boot_a.img

Magisk and TWRP not working as aspected

H there,
TWRP and Magisk are not wot working as aspected.
First I tried to flash TWRP by
Code:
fastboot flash recovery recovery.img
but received
Code:
(bootloader) Invalid partition name recovery
So I had to just boot it
Code:
fastboot boot recovery.img
After that I "installed recory image" in TWRP itself. But when I try to boot into recovery it get stuck. So i had to do
Code:
fastboot boot recovery.img
again.
Any ideas what i did wrong or how to solve this?
Then I installed Magisk. To do that I had to drop an boot.img file, let the Magisk-App creates an pahteched version of it and than, back in bootloader
Code:
fastboot boot magisk_patched...img
Now i have root access. But when rebooting regularly the Magisk-App has no root and so all the other apps also not. So i had to boot that img again.
That CAN'T be the right way.
Thx in advance!
It's probably because you have A/B partitions on your device. To flash it successfully you'll need TWRP 3.5.0+. You can learn more about why is it so different from this XDA article.
You can check if your device supports A/B partitions through this app.
Follow this guide on how to flash it on A/B partitions, you can get TWRP from here (Beckham) or here (Addison).
Goodluck.

Is there a way to save a modified boot image from within the booted ROM which is rooted with magisk

I don't have the original boot.img. I want to unroot temporarily. But want to re-root afterward.
I was wondering if I can save a modified_boot.img somehow and flash that later once I am done. Is it possible?
devsk said:
I don't have the original boot.img. I want to unroot temporarily. But want to re-root afterward.
I was wondering if I can save a modified_boot.img somehow and flash that later once I am done. Is it possible?
Click to expand...
Click to collapse
What ROM and device are you using?
How did you root it in the first place?
What OS are you running?
Heres my 30 second version of how id do it on my Pixel 2 XL an a/b device....ymmv, depending on device
Download latest platform tools from Google for your OS, if necessary: https://developer.android.com/studio/releases/platform-tools
Next you'll need dd, if you're on Linux, you can skip ahead
For Windows....go to http://gnuwin32.sourceforge.net/packages/coreutils.htm
Download Binaries & Dependencies zips
Extract dd.exe from coreutils-5.3.0-bin.zip /bin to platform tools path
Extract all .dll's from coreutils-5.3.0-dep.zip /bin to platform tools path
Enable USB Debugging & ABD access on device
Boot device to recovery (usually TWRP)
on PC and prompt in platform tools folder:
if you have recovery (usually TWRP) installed:
adb reboot recovery
if you DONT have recovery (usually TWRP) installed, but instead fastboot it via bootloader (as i do on my Pixel 2XL):
adb reboot bootloader
fastboot boot twrp-xxx.img
swipe into twrp
back to PC prompt:
adb shell
dd if=/dev/block/bootdevice/by-name/boot of=/sdcard/boot.img
adb pull /sdcard/boot.img magisk_boot.img
Uninstall magisk
When you need to flash magisk boot image back:
Boot to bootloader..
on PC and prompt in platform tools folder:
adb reboot bootloader
fastboot flash boot magisk_boot.img
fastboot reboot
Note: You can of course use the same first process to backup (and extract) the stock boot.img before rooting ....and the latter to reflash it if needed if rooting goes wrong
Sorry, I should update my profile. My device is OnePlus 8 Pro.
> dd if=/dev/block/bootdevice/by-name/boot of=/sdcard/magisk_boot.img
@73sydney why would this not work from within a rooted device? Its not like some process is holding a read lock on that partition or something else is also writing to it. Its a partition persisted in the NAND, which is not being touched by anything.
The only thing is that there are 2 partitions on the NAND: boot_a and boot_b. I need to know which one is the current one.
And this tells me slot B:
cat /proc/cmdline | tr ' ' '\n' | grep --color slot
androidboot.slot_suffix=_b
For flashing back, I obviously need to be in bootloader because I won't have the root to write to the partition.

Categories

Resources