Magisk Patched boot.img doesn't work - General Questions and Answers

Hello there, i have a question about flashing the patched boot image on my phone
On my phone i can only flash the system partition which i am right now using the /e/ GSI image
using bkerler's mktclient to flash the batched boot.img everything goes well, as far as i know
but the phone just does not boot to system, it goes directly to BROM again
flashing the stock boot.img the phone boots normally
the original boot.img is 24 mb, the patched boot.img is 7 mb
bkerler instructed me to add zeroes to the end of the file so make it the same size as the stock boot image
i did it using a hex editor, but i did not flash it, as i'm still not sure if i did it correctly
i also tried to patch the lk.bin, but got no changes after flashing it
my theory is, i have 2 boot partitions, boot and boot2, and 2 lk binnaries, lk.bin and lk2.bin
flashing both boot partitions got me nothing, flashing one lk.bin didn't work, because it boots into the second lk.bin
so there might be some verification happening to not allow me to do it
i don't have enough knowledge about it, so i ask for help to understand and be abble to flash the patched boot.img

Related

[Q] How do I get the standard default.prop file back on the root file system?

At the root file system on my Android phone, there's a file called default.prop. Right now that's a non-standard file because of CF-Auto-Root, but I want that file to be the stock version (1).
After what I have understood, /default.prop file is overwritten on every boot from a default.prop file within the boot partition.
My phone is rooted with CF-Auto-Root, but I've replaced the boot and bootloader partitions with factory image versions:
$ fastboot flash bootloader bootloader.img
$ fastboot flash boot boot.img
But still I get the non-stock default.prop file. What am I doing wrong?
(1) This is because I'm trying to upgrade to Android 5.1, and right now I'm getting an error because "this device has google/omni_hammerhead/hammerhead:4.4.4/KTU84P/eng.dees_troy.20150214.172938:eng/test-keys".
neu242 said:
(1) This is because I'm trying to upgrade to Android 5.1, and right now I'm getting an error because "this device has google/omni_hammerhead/hammerhead:4.4.4/KTU84P/eng.dees_troy.20150214.172938:eng/test-keys".
Click to expand...
Click to collapse
Don't bother messing with reverting everything just to update, it is extremely unlikely to work since as of Lollipop Google has changed the OTA method to check the sum of the entire partition rather than only what it cares about.
Download the 5.1 factory images, and flash system.img, boot.img, cache.img, radio.img and bootloader.img (don't flash userdata.img unless you want to wipe all your data), then boot into a custom recovery and flash the latest SuperSU (http://download.chainfire.eu/supersu).
Elluel said:
Download the 5.1 factory images, and flash system.img, boot.img, cache.img, radio.img and bootloader.img (don't flash userdata.img unless you want to wipe all your data), then boot into a custom recovery and flash the latest SuperSU (http://download.chainfire.eu/supersu).
Click to expand...
Click to collapse
Perfect, just what the doctor ordered. Thanks Elluel!

I want to flash stock rom in fastboot for my Oneplus 7 pro but I don't want to erase

so as the title suggests, my oneplus 7 pro is now stuck at fastboot and my only hope is on the img files from the unpacked payload.bin. but now after I extract it, i heard some of the img files are used to clear the user, data etc, can someone tell me which one is which?
The guide I followed:
https://android.gadgethacks.com/how...actory-images-android-using-fastboot-0175277/
https://forum.xda-developers.com/nokia-7-plus/how-to/guide-how-to-extract-payload-bin-ota-t3830962
https://forum.xda-developers.com/oneplus-7-pro/how-to/rom-stock-fastboot-roms-oneplus-7-pro-t3931424
the first link seem to be outdated since most of the img files it talked about don't exist but although the third link isn't, it told me how to flash each file, but my problem is that I don't want to lose my data, can someone tell me which img file is used to erase data? thanks a lot
shuaiouke said:
so as the title suggests, my oneplus 7 pro is now stuck at fastboot and my only hope is on the img files from the unpacked payload.bin. but now after I extract it, i heard some of the img files are used to clear the user, data etc, can someone tell me which one is which?
The guide I followed:
https://android.gadgethacks.com/how...actory-images-android-using-fastboot-0175277/
https://forum.xda-developers.com/nokia-7-plus/how-to/guide-how-to-extract-payload-bin-ota-t3830962
https://forum.xda-developers.com/oneplus-7-pro/how-to/rom-stock-fastboot-roms-oneplus-7-pro-t3931424
the first link seem to be outdated since most of the img files it talked about don't exist but although the third link isn't, it told me how to flash each file, but my problem is that I don't want to lose my data, can someone tell me which img file is used to erase data? thanks a lot
Click to expand...
Click to collapse
userdata.img will override your internal storage with zero bytes.
matze19999 said:
userdata.img will override your internal storage with zero bytes.
Click to expand...
Click to collapse
is that the only file? thanks
Edit:There don't seem to be a file called userdata.img it's a ONEPLUS 7 PRO rom
Right click and edit flash all.bat and remove the -w and save then u can run flash all.bat using the fastboot Rom, ur 3rd link
thank you and it lets me get into recovery in a boot loop but recovery only, I can't flash TWRP, what should I do next?
Bradl79 said:
Right click and edit flash all.bat and remove the -w and save then u can run flash all.bat using the fastboot Rom, ur 3rd link
Click to expand...
Click to collapse
thank you and it lets me get into recovery in a boot loop but recovery only, I can't flash TWRP, what should I do next?
shuaiouke said:
thank you and it lets me get into recovery in a boot loop but recovery only, I can't flash TWRP, what should I do next?
Click to expand...
Click to collapse
is your bootloader locked?
shuaiouke said:
thank you and it lets me get into recovery in a boot loop but recovery only, I can't flash TWRP, what should I do next?
Click to expand...
Click to collapse
We're you coming from a custom Rom, or stock. You might have to format data.
Bradl79 said:
is your bootloader locked?
Click to expand...
Click to collapse
it's kinda obvious, flash-all is flashing after all if ur bootloader is locked, how do u flash?
Note: This is for soft bricks only.
soft brick = can access fastboot or recovery
hard brick = no boot, black screen boot. etc.............
I found myself on OB4, tried to sideload another build and got stuck. Tried to boot into TWRP, no bueno, now what? I didn't want to use MSM tools and go though that whole process again. I've saved many of my devices with Linux, by just flashing the img files through fastboot commands. So if your comfortable with the command line this is easier then using the flash tools that relock your bootloader. This also works with Widows, so I remembered the files the fastboot flasher flashed, and just flashed them manually, you just need flash to the correct partition. So, if it's a boot img, then flash boot, and system flash system, and so on. List of files that I flashed.
First you'll need payload dumper, to extract files from payload.bin file inside whatever OTA, you want to flash. It will extract to a folder called payload_output, from there you can click and drag to command line.
https://androidfilehost.com/?fid=818070582850510260
I also provided a copy of my script, you'll need to edit to your files path. And save as .bat, .cab, or .exe...........
Commands I run before flash
fastboot format system
fastboot format userdata
1. boot.img
2. dtbo
3. modem
4. odm
5. qupfw
6. storsec
7. system
8. vbmeta
9. vendor
10. fastboot reboot
If device boots to recovery which should be stock, just wipe everything and you should boot into system without a problem.

Fixing broken boot (RMX2030)

I accidentally did "fastboot flash boot recovery.img" when trying to flash the stock recovery and now it just boots into recovery all the time. I was able to reflash TWRP so I can boot into that and I've restored the Boot partition from the backup I made but that didn't help, so I tried restoring the vendor image and system image, which didn't help either. Then I tried restoring the individual backups I made of the dtbo, EFS, modem, persists and recovery+vbmeta but it still boots into TWRP when I try to boot into system.
I hope someone can help me fix this, as I bought it to give to my brother for his birthday in a couple of weeks!
I note that the recovery.img is 65,536KB, which is the same size as my backed up boot.emmc.win but obviously they're not the same thing.
EDIT: OK, panic over! I wiped System and installed the A20 ROM from the ozip and it's working again now. Phew!
May I ask if how did you do that?
I think we almost have the same situation but rather different reason..Please help
doveman said:
I accidentally did "fastboot flash boot recovery.img" when trying to flash the stock recovery and now it just boots into recovery all the time. I was able to reflash TWRP so I can boot into that and I've restored the Boot partition from the backup I made but that didn't help, so I tried restoring the vendor image and system image, which didn't help either. Then I tried restoring the individual backups I made of the dtbo, EFS, modem, persists and recovery+vbmeta but it still boots into TWRP when I try to boot into system.
I hope someone can help me fix this, as I bought it to give to my brother for his birthday in a couple of weeks!
I note that the recovery.img is 65,536KB, which is the same size as my backed up boot.emmc.win but obviously they're not the same thing.
EDIT: OK, panic over! I wiped System and installed the A20 ROM from the ozip and it's working again now. Phew!
Click to expand...
Click to collapse
can you teach us how you fixed it?
Download the last Firmware, this is one for QPST also extracted
"Realme_5i_RMX2030_EX_11_C.79_220121_QPST.zip"
than extract it and open the Terminal and change to Firmware dir with cd "PATH" now you flash the follow Images
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot erase cache
fastboot flash metadata metadata.img
fastboot flash dtbo dtbo.img
fastboot flash splash splash.img
fastboot flash persist persist.img
fastboot flash userdata userdata.img
fastboot flash system system.img
fastboot flash vbmeta vbmeta.img
fastboot reboot
now device starts normaly and is up to date, your back on StockROM

Question Pixel 7 pro root failure

Flashes unpatched int.boot.img file, then got attached message cannot start device. Can anybody help? Thanks!
Did you flash it to the init_boot partition or the boot partition?
Annie the Eagle said:
Did you flash it to the init_boot partition or the boot partition?
Click to expand...
Click to collapse
Thank you for your reply. I flashed by below command: flash boot unpachedname
Did i do things wrong? Sorry im realy a newbie
Yeah you can't flash init_boot.img to boot partition.
init_boot.img must go to the "init_boot" partition.
Thankfully, there is extracted IMGs here: https://forum.xda-developers.com/t/...xtracted-images-how-to.4505061/#post-87566815
Click the SourceForge link to the FASTBOOT IMAGES.
Then make sure you repair your boot partition by flashing over the boot.img to boot partition and the init_boot.img to init_boot partition.
Usual disclaimer: No warranty, I haven't tested any of these images but give it a try.
Annie the Eagle said:
Yeah you can't flash init_boot.img to boot partition.
init_boot.img must go to the "init_boot" partition.
Thankfully, there is extracted IMGs here: https://forum.xda-developers.com/t/...xtracted-images-how-to.4505061/#post-87566815
Click the SourceForge link to the FASTBOOT IMAGES.
Then make sure you repair your boot partition by flashing over the boot.img to boot partition and the init_boot.img to init_boot partition.
Usual disclaimer: No warranty, I haven't tested any of these images but give it a try.
Click to expand...
Click to collapse
Really apprexiate your reply let me try rhen cime back witj my result
I dlowlaoded and flashed. Now got a new ereor as attached. Any way to conletely reflash all things ?
Thanks!
Did you flash the both init_boot.img to init_boot and boot.img to boot? Make sure you do both.
flashboot flash boot boot.img
flashboot flash init_boot init_boot.img
bosox284 said:
Did you flash the both init_boot.img to init_boot and boot.img to boot? Make sure you do both.
flashboot flash boot boot.img
flashboot flash init_boot init_boot.img
Click to expand...
Click to collapse
Really appreciate ur support. Looks im in big trouble: did one again then it is keeping show this screen
Now rhe device is keeping rebooting l. Then this screen showed
Cannot even turn on. Stuck on the screen now ...
No offense, but if you are a "newbie" as you say, then why in the world would you want to risk a $900.00+ device that is so new to the modding world? What possible benefit could there really be even if you were successful? Remember, it IS possible to completely brick your phone and no warranty in the world will help. SMH
Are you using the stock images? I recommend doing a --slot=all to be safe. Reboot bootloader manually (Vol Down + Power), then run the same commands as before with --slot=all.
flashboot flash boot --slot=all boot.img
flashboot flash init_boot --slot=all init_boot.img
If that still fails, wait another 40 minutes or so until Google hopefully drops the factory images and just flash those. I don't think you're hard bricked just yet.
bosox284 said:
Are you using the stock images? I recommend doing a --slot=all to be safe. Reboot bootloader manually (Vol Down + Power), then run the same commands as before with --slot=all.
flashboot flash boot --slot=all boot.img
flashboot flash init_boot --slot=all init_boot.img
If that still fails, wait another 40 minutes or so until Google hopefully drops the factory images and just flash those. I don't think you're hard bricked just yet.
Click to expand...
Click to collapse
Thank you for your patience. I will try this tomorrow it is really late in japan. Appreciate your kind help. Wish you a nice day.
Keep you informed.
bosox284 said:
Are you using the stock images? I recommend doing a --slot=all to be safe. Reboot bootloader manually (Vol Down + Power), then run the same commands as before with --slot=all.
flashboot flash boot --slot=all boot.img
flashboot flash init_boot --slot=all init_boot.img
If that still fails, wait another 40 minutes or so until Google hopefully drops the factory images and just flash those. I don't think you're hard bricked just yet.
Click to expand...
Click to collapse
Tried only boot.img i can do. Ini_boot showed no sucj file
Flashed as you instructed but still saying corrupt. Btw i downloaded this file,is it correct ? Thanks!
That just means you don't have an init_boot file with that exact name in the folder. At this point I'd suggest waiting until Google drops the factory images so you can start fresh. Without knowing your version number you're basically going in blind flashing files that may or may not be relevant to your build.
When you run flashboot flash init_boot init_boot.img, the 'init_boot.img' needs to be the exact file name in your folder. So if your patched file is magisk_init_patched-25205_EfWOu.img, you're going to run fastboot flash init_boot magisk_init_patched-25205_EfWOu.img
In the future, I suggest downloading the stock boot/init_boot files for your build number so that if something goes haywire then you can recover. I also would suggest holding off until factory images are available, especially if you're not sure what you're doing. That'll also give you a way to recover in a worst case scenario where nothing seems to work.
bosox284 said:
That just means you don't have an init_boot file with that exact name in the folder. At this point I'd suggest waiting until Google drops the factory images so you can start fresh. Without knowing your version number you're basically going in blind flashing files that may or may not be relevant to your build.
When you run flashboot flash init_boot init_boot.img, the 'init_boot.img' needs to be the exact file name in your folder. So if your patched file is magisk_init_patched-25205_EfWOu.img, you're going to run fastboot flash init_boot magisk_init_patched-25205_EfWOu.img
In the future, I suggest downloading the stock boot/init_boot files for your build number so that if something goes haywire then you can recover. I also would suggest holding off until factory images are available, especially if you're not sure what you're doing. That'll also give you a way to recover in a worst case scenario where nothing seems to work.
Click to expand...
Click to collapse
Thank you very much. I will wait for the dactory images. Appreciate your support massively.
The factory images are now live: https://developers.google.com/android/images#cheetah
Download the file, extract the zip, and run flash-all at a command prompt. It should give you a fresh start.
bosox284 said:
The factory images are now live: https://developers.google.com/android/images#cheetah
Download the file, extract the zip, and run flash-all at a command prompt. It should give you a fresh start.
Click to expand...
Click to collapse
thank you. I flashed the fiemware and now it is back!
I was having the same issues; "fastboot flash init_boot_a <patched magisk.img>" worked for me.

🚨‼️HELP‼️🚨 Schok Volt Sv55 Stock Rom needed

I desperately need the stock rom for SV55216_01.02.04.230415
I lost mine and my system. Img has become corrupted and I can only boot into fastboot and recovery. I have the boot recovery vbmeta boot abootbak and oem image files but hasn't helped me

Categories

Resources