Extract recovery from boot.img - OnePlus 7 Pro Questions & Answers

If I run
Code:
fastboot boot twrp.img
Spoiler
TWRP
my 7Pro boots into TWRP
But if I run
Code:
fastboot boot lineagerecovery.img
Spoiler
Lineage Recovery
it boots the ROM; I think because this image file include a Kernel but the TWRP img file not.
I would like to get the same behavior of TWRP img file with Lineage Recovery img file.
So, presuming I'm right, there is any way to make a recovery.img file, extracting it from a boot.img file?

Related

Boot boot.img and recovery.img from U-boot?

I don't know if I can get an answer here, but is there any source files for U-boot to let me able to boot boot.img and recovery.img directly? Currently I can only manually pack uImages for kernel and ramdisk and boot them using bootm command.
P.S. I am the project leader of ipaq214android

Guide to Install GApps and Magisk on Custom ROMs for Nokia 7.2

While I was trying to install GApps for Lineage OS 18.1 on my Nokia 7.2, I always lost my wi-fi. This is apparently due to flashing TWRP as boot image, which replaces the stock boot messing with wi-fi as the boot image has thee kernel.
Although, I did figure it out, it took me three days to get a proper solution from multiple sources. Here, I will explain how to install Lineage OS 18.1 on Nokia 7.2 with Gapps and Magisk. This can be applied to other ROMs as well. I am assuming you are on stock firmware.
Requirements:
Any custom ROM without GApps
vbmeta file
vendor image
Gapps zip file of your choice
platform-tools
twrp image
magisk file
payload dumper tool
Preperation:
The wifi stops working because we change the boot image. To prevent this, we must flash the boot image of the rom after we are done with our work with TWRP
For this, we ,ust get the boot image for the ROM. As this is not available readily, we must extract it from the ROM zip
Install latest python on your pc
Get the payload dumper tool from the link given below. Extract the contents into the root directory of python. It should be in C:\Users\USER-NAME\AppData\Local\Programs\Python\Python <version number>
Extract the ROM zip into any folder. Copy the payload.bin file and paste it in the folder where you put the payload dumper tool
Open a command prompt in the python root folder and type
Code:
python -m pip install -r requirements.txt
Then type
Code:
python payload_dumper.py payload.bin
After it finishes, go to the folder named Output inside the python folder. Here there will be a file named boot.bin. Rename this as lineage_boot.bin and paste it into the platform tools folder
Installation:
Download the twrp image, rename it to twrp.img and place it in the platform-tools folder. Connect your phone to the computer, switch on usb debugging on your phone.
Open command shell in the platform-tools folder and type
Code:
adb reboot bootloader
. In the bootloader, type
Code:
fastboot flash boot_b twrp.img
.
Next, type
Code:
fastboot --set-active=b
and then reboot to recovery using volume buttons and selecting using power button
In TWRP swipe to allow modifications. Copy your ROM and vendor image files to your SD Card. Now, click wipe, format data and type yes. Go back to home screen and the press install. Select your ROM file and install it. Sometimes it is required to flash vendor image. In that case flash that too. This step is required for Lineage OS 18.1
Now on the twrp home screen, tap on reboot. At the bottom, the current slot should be B. Tap slot A. THis changes the active slot to A. Now go back and tap on bootloader, this should boot you to the bootloader.
Take your vbmeta.img file and place it in the platform tools folder. Now, while in the bootloader mode, type,
Code:
fastboot flash vbmeta_a --disable-verity --disable-verification vbmeta.img
Next type
Code:
fastboot flash boot_a twrp.img
and boot to recovery using volume buttons
Now, press install in TWRP and select install and install the GApps file and reboot to bootloader
Next, in the bootloader type
Code:
fastboot flash boot_a lineage_boot.img
. Now start your phone. You should have lineage os with GApps
Installing Magisk:
Copy the lineage_boot.img into your phone. Download magisk.apk file from the link given below
Install the magisk app and open it. If it asks for additional setup select no. Beside the magisk option select install. Under options, if Recovery Mode is selected, deselect it and click next.
Now click on Select and patch a file under method. Select the lineage_boot.img
The patched image will be saved in downloads folder. Rename this file to lineage_magisk.img and copy it to the platform tools folder on your computer. Reboot your phone to bootloader mode
On your computer in the command window opened in the platform tools folder, type,
Code:
fastboot flash boot lineage_magisk.img
Reboot and you will have a rooted lineage os with GApps
Files:
Lineage OS 18.1 and vbmeta.img
TWRP
vendor
NikGApps
Payload Dumper tool
platform tools
Magisk
Guides that I Followed:
Extracting boot.img from ROM zip
Installing magisk using patched boot image
Credits:
Raghu varma for Lineage OS 18.1 port and twrp
Providers of the guides mentioned above
Hi @Ujwal2000 thanks for the guide.
I am using the stock android 10 rom and magisk patch method.
This also leads to non working wifi and magisk does not recognize that its installed.
Which steps of your guide apply to the stock rom?
i do not need gapps nor twrp I guess I only wanted to root the stock rom with magisk.
For stock, use this guide. They maintain a repository if patched boot images
Guide - How to root the Nokia 7.2 and Nokia 6.2 using Magisk
Nokia 7.2 and Nokia 6.2 come with an unlockable bootloader. The thing that compliments unlocked bootloader best is root access. So, this guide will help you in rooting the Nokia 7.2 or Nokia 6.2. You have a choice between Magisk patched boot images and TWRP recovery. I’d recommend going the...
www.techmesto.com
@Ujwal2000 , can you please look at my posting here? Thank you.
after fallowing the steps(except installing lineageOS with twrp flash everything was encrypted even tough i have the bootloader unlocked, managed to install it via adb sideload) the wifi doesnt work at all. When i try to turn it on is switches off on its own. Do anyone know a fix?
i had problem with latest version of python (3.10), version 3.7 was working for me

CrashDump mode after flashing blue_spark kernel r112

Hey folks,
I have rooted (magisk) OnePlus 8 phone with Android 11, w/o TWRP recovery. I'm trying to replace kernel with one of blue_spark, here's what I'm doing
1. Download zip file from https://github.com/engstk/op8/releases/tag/r112
2. Extract and unpack Image.gz
3. Unpack Magisk patched boot.img to /tmp (magiskboot unpack boot.img)
4. Replace kernel with unpacked Image (cp Image /tmp/kernel)
5. Repack boot.img (magiskboot repack boot.img boot-new.img)
6. Boot with boot-new.img (fastboot boot boot-new.img)
And here is when I'm getting into "QUALCOMM CrashDump Mode"
The same result if I build kernel from sources. Repacking boot.img with original kernel works, so problem is unlikely in magiskboot.
I'm trying to figure out the problem, but without kernel logs it's troublesome. Any ideas?
Thanks.
Hm... It looks like, I also have to update DTB. After that device boots successfully. Seems a bit strange to me. What's the difference in supported devices between blu_spark and stock kernel?
Ok, turned out AVB was enabled in the original device tree:
fsmgr_flags = "wait,slotselect,avb";
Switching it off fixes boot process.

Question How to root derkpest os in op9?

Bro can I root op9 running derkpest rom it is safe to root and if safe then how to root tell the possible best way guys?
Patched boot.img with magisk, PS when you find derkpest Rom for op9?
iaio72 said:
Patched boot.img with magisk, PS when you find derkpest Rom for op9?
Click to expand...
Click to collapse
Hoo bro from a12 patched img doesn't work I've saw posts so does it work or flashing magisk zip in recovery which is best way to avoid bootloop
Venkata Prathap said:
Hoo bro from a12 patched img doesn't work I've saw posts so does it work or flashing magisk zip in recovery which is best way to avoid bootloop
Click to expand...
Click to collapse
For OOS:
1) Have Magisk Manager v23016 or above installed
2) Download the boot.img from here and put in phone’s Download folder
3) Open Magisk Manager and click top Install and patch boot.img
4) Move patched image to PC’s adb directory
5) Boot phone into fastboot mode and run the command:
fastboot boot magisk_patched_boot.img
6) Phone will boot into temporary root. Click top Install again but choose Direct Install (recommended) this time
7) Reboot when done and profit
For COS:
1) Have Magisk Manager v23016 or above installed
2) Download rooting files and extract on PC
3) Copy boot.img and vendor_boot.img to phone’s Download folder
4) Open Magisk Manager and click top Install and patch boot.img. When done, go back and repeat the process for vendor_boot.img
5) Move both patched images to adb directory on your pc along with vbmeta.img
6) Run this command:
fastboot –-disable-verity —disable-verification flash vbmeta vbmeta.img
********************Make sure it completes without errors before proceeding. If errors, update your ADB: https://developer.android.com/studio/releases/platform–tools
7) If no errors, run these commands:
fastboot flash vendor_boot vendor_boot_magisk.img
fastboot flash boot boot_magisk.img
8) If no errors, run
fastboot reboot
incesu said:
For OOS:
1) Have Magisk Manager v23016 or above installed
2) Download the boot.img from here and put in phone’s Download folder
3) Open Magisk Manager and click top Install and patch boot.img
4) Move patched image to PC’s adb directory
5) Boot phone into fastboot mode and run the command:
fastboot boot magisk_patched_boot.img
6) Phone will boot into temporary root. Click top Install again but choose Direct Install (recommended) this time
7) Reboot when done and profit
For COS:
1) Have Magisk Manager v23016 or above installed
2) Download rooting files and extract on PC
3) Copy boot.img and vendor_boot.img to phone’s Download folder
4) Open Magisk Manager and click top Install and patch boot.img. When done, go back and repeat the process for vendor_boot.img
5) Move both patched images to adb directory on your pc along with vbmeta.img
6) Run this command:
fastboot –-disable-verity —disable-verification flash vbmeta vbmeta.img
********************Make sure it completes without errors before proceeding. If errors, update your ADB: https://developer.android.com/studio/releases/platform–tools
7) If no errors, run these commands:
fastboot flash vendor_boot vendor_boot_magisk.img
fastboot flash boot boot_magisk.img
8) If no errors, run
fastboot reboot
Click to expand...
Click to collapse
for COS: you still only need boot.img and magisk. install magisk patch boot.img temporarily boot on magisk-patchedboot.img and direct install in magisk manager

Question can't install magisk

after the latest apdate 13.0.3 i lose my magisk
and when i want to install it using adb it gives me a boot loop and i shoold to flash the original boot.img
Nb : ramdisk yes
Uninstall it thn flash it using Twrp
twrp can't read internal storage
but when i use the memory card then i click install the recovery restart directly
also by using adb the installation fail in 3%
souhail39 said:
twrp can't read internal storage
but when i use the memory card then i click install the recovery restart directly
also by using adb the installation fail in 3%
Click to expand...
Click to collapse
First flash the original boot image into your phone and make sure your phone can boot after you flash the original boot image.
fastboot flash Magisk-patched-boot.img
Patched boot image can be made on another phone.
https://forum.xda-developers.com/t/4288121/post-85137963
pl1992aw said:
First flash the original boot image into your phone and make sure your phone can boot after you flash the original boot image.
fastboot flash Magisk-patched-boot.img
Patched boot image can be made on another phone.
https://forum.xda-developers.com/t/4288121/post-85137963
Click to expand...
Click to collapse
This is what i did
The original boot run finely but the patched one give me a boot loop
Miui 13 doesn't support yet unless you patch the boot img. Just revert to 12.5.9
souhail39 said:
This is what i did
The original boot run finely but the patched one give me a boot loop
Click to expand...
Click to collapse
The safe way is to not flash boot image with TWRP or Orangefox custom recoveries. Flash with fastboot mode with PC is better to prevent issue.
What version of Magisk?
If you are using the latest Magisk v24.X but it bootloop, you may report issue to Magisk author in his github.
If you used Magisk v23, it is said not working on Android 12, so will not work on MIUI 13.
1. Download stock MIUI rom.
2. Extract two files: boot.img and vbmeta.img.
3. Compress the two files to a TAR file, like: boot_and_vbmeta.tar
4. Copy the TAR file to the device.
5. Open magisk app.
6. Choose "Install magisk to file" and select the TAR file. It will create the file magisk_patched.tar
7. Copy the magisk_patched.tar file to the PC.
8. Extract magisk_patched.tar to get boot_patched.img and vbmeta_patched.img
9. Enter in fastboot in device.
10. Flash boot_patched.img and vbmeta_patched.img to the device:
Code:
fastboot flash boot boot_patched.img
fastboot flash vbmeta vbmeta_patched.img
VD171 said:
1. Download stock MIUI rom.
2. Extract two files: boot.img and vbmeta.img.
3. Compress the two files to a TAR file, like: boot_and_vbmeta.tar
4. Copy the TAR file to the device.
5. Open magisk app.
6. Choose "Install magisk to file" and select the TAR file. It will create the file magisk_patched.tar
7. Copy the magisk_patched.tar file to the PC.
8. Extract magisk_patched.tar to get boot_patched.img and vbmeta_patched.img
9. Enter in fastboot in device.
10. Flash boot_patched.img and vbmeta_patched.img to the device:
Code:
fastboot flash boot boot_patched.img
fastboot flash vbmeta vbmeta_patched.img
Click to expand...
Click to collapse
thx for your answer but always the same problem with patched img files

Categories

Resources