Boot image patched by other programs! - Samsung Galaxy S7 Questions and Answers

Dear XDA members,
I am trying to migrate from SuperSU to Magisk.
I already have uninstalled Xposed framework and unroot SuperSU.
But when i try to flash Magisk 16 on TWRP the following error is constantly displayed:
Boot image patched by other programs!
Please restore stock boot image
updater process ede with ERROR: 1
Error installing zip file
I restored the boot partition of my latest TWRP backup.
But even after that i still can't succeed.
Do someone know the solution for this problem?
With kind regards,
Arvid

ArvidBerends said:
Dear XDA members,
I am trying to migrate from SuperSU to Magisk.
I already have uninstalled Xposed framework and unroot SuperSU.
But when i try to flash Magisk 16 on TWRP the following error is constantly displayed:
Boot image patched by other programs!
Please restore stock boot image
updater process ede with ERROR: 1
Error installing zip file
I restored the boot partition of my latest TWRP backup.
But even after that i still can't succeed.
Do someone know the solution for this problem?
With kind regards,
Arvid
Click to expand...
Click to collapse
You did something that modified the boot image before your backup. Download the stock firmware and extract it or reflash your phone to stock then reflash twrp and fix data folder and then restore data backup, install magisk. Or you can extract the stock boot image and flash it. If you reflash firmware remember to move twrp backup to sd or pc.

I did download a stock rom. But when i extracted the file i could not find the boot.img. Could you provide me a link from which I can extract the boot.img please? Galaxy S7 SM-G930F NL
godkingofcanada said:
You did something that modified the boot image before your backup. Download the stock firmware and extract it or reflash your phone to stock then reflash twrp and fix data folder and then restore data backup, install magisk. Or you can extract the stock boot image and flash it. If you reflash firmware remember to move twrp backup to sd or pc.
Click to expand...
Click to collapse

ArvidBerends said:
I did download a stock rom. But when i extracted the file i could not find the boot.img. Could you provide me a link from which I can extract the boot.img please? Galaxy S7 SM-G930F NL
Click to expand...
Click to collapse
where are you looking? Do you see the recovery.img? Its usually in the same place. Use linux and get superrs kitchen and extract the md5 or zip into folders and try that way. On Windows its giving me issues even extracting the md5. Linux is your friend.
http://howto.highonandroid.com/sams...extract-stock-recovery-from-samsung-firmware/
In this tutorial the boot and recovery are in the same place. Hopefully this helps
You can also just back up your data copy to pc or sd then reflash stock instead of the boot.img. if you do that make a backup of boot right after booting to twrp and fixing data

Related

Installed twrp phone reboots to twrp

I installed twrp on my pixel on 7.1.1 it reboots to tarp again I got it to boot to the p.s. by clicking reboot / a on bottom left option but get error codes and can't open a lot of apps. I tried to install a tom and clear device cache and cause fails. Anyone know how I can fix this. I thought I used all the latest files
cgrimm9 said:
I installed twrp on my pixel on 7.1.1 it reboots to tarp again I got it to boot to the p.s. by clicking reboot / a on bottom left option but get error codes and can't open a lot of apps. I tried to install a tom and clear device cache and cause fails. Anyone know how I can fix this. I thought I used all the latest files
Click to expand...
Click to collapse
Did you fastboot boot into TWRP, then flash twrp-pixel-installer-sailfish-3.0.2-0-RC1.zip? Were you stock prior?
Installed img through pc then installed the zip file with twrp. I found a article here stating I need to flash stock ing to get back to normal
cgrimm9 said:
Installed img through pc then installed the zip file with twrp. I found a article here stating I need to flash stock ing to get back to normal
Click to expand...
Click to collapse
Yes, you are not supposed to install twrp, just boot into it. If you install it by mistake, you go back, flash stock boot.img, and do it again.
This is from Dees_Troy's post located here
https://forum.xda-developers.com/pixel/development/twrp-alpha1-pixel-devices-t3500314
Installation:
If you already have TWRP installed: Download the latest zip and install the zip using TWRP.
If you do not already have TWRP installed: Download both the img and the zip. Copy the zip to your device. You will need to have fastboot binaries and the correct drivers installed. Power off your device completely. Hold volume down and turn on the device. Your device should now be in the bootloader. Connect the device to your PC. Open a command window and run the following command from the proper location:
fastboot boot path/to/twrp.img
This will temporarily boot TWRP on your device. If you are using a lockscreen pin/pattern/password and do not get prompted to enter your passord, reboot to the bootloader and try again. Go to install and browse to the zip and install the zip. If you are currently rooted with SuperSU, you will need to reflash the stock boot image before installing TWRP. After installing the stock boot image, follow the instructions for installing TWRP. Once TWRP is installed, grab the very latest SuperSU released on 2015-11-15 or later and install SuperSU.
If you accidently flash TWRP to your device using fastboot instead of temporarily booting the image, you will need to download the latest factory image for your device and reflash the boot image.
@Tulsadiver First off, thanks for the post on this. I installed TWRP to slot A by accident and am finding myself in this same predicament (though I found that I can boot by switching to slot B). I found another post online that mentioned what you commented on, specifically:
Tulsadiver said:
Go to install and browse to the zip and install the zip. If you are currently rooted with SuperSU, you will need to reflash the stock boot image before installing TWRP. After installing the stock boot image, follow the instructions for installing TWRP. Once TWRP is installed, grab the very latest SuperSU released on 2015-11-15 or later and install SuperSU.
Click to expand...
Click to collapse
Having previously downloaded Oreo 8.1 and setup root, I had loaded into TWRP, went to install, selected the TWRP zip, and installed (as per what you had suggested and what I read earlier). This is what led me to the current problem, making me realize that I'm missing something in the description. Now, I likely don't need to flash TWRP (I don't develop and used flashfire to do upgrades) but my last upgrade left me rootless and I felt having it installed would make life a little easier. I was hoping to ask for a clarification on the TWRP install.
Also, you mentioned flashing the stock img. Do you mean from the android OTA downloads? I was getting a corrupt file error when I tried flashing that to slot a...
alienjon said:
@Tulsadiver First off, thanks for the post on this. I installed TWRP to slot A by accident and am finding myself in this same predicament (though I found that I can boot by switching to slot B). I found another post online that mentioned what you commented on, specifically:
Having previously downloaded Oreo 8.1 and setup root, I had loaded into TWRP, went to install, selected the TWRP zip, and installed (as per what you had suggested and what I read earlier). This is what led me to the current problem, making me realize that I'm missing something in the description. Now, I likely don't need to flash TWRP (I don't develop and used flashfire to do upgrades) but my last upgrade left me rootless and I felt having it installed would make life a little easier. I was hoping to ask for a clarification on the TWRP install.
Also, you mentioned flashing the stock img. Do you mean from the android OTA downloads? I was getting a corrupt file error when I tried flashing that to slot a...
Click to expand...
Click to collapse
Things have changed with 8.1. you have to root with magisk. From slot b you cannot fastboot flash boot_a boot.img?
I believe the instructions now are to boot to TWRP, install TWRP pixel installer zip, then flash Magisk zip
Here is where TWRP files are here
https://dl.twrp.me/sailfish/
Tulsadiver said:
From slot b you cannot fastboot flash boot_a boot.img?
Click to expand...
Click to collapse
I hadn't tried yet. I was worried about messing things up further without asking for help online first. I'll give this a shot later. Does boot.img refer to the android image file? (ie: what I'd download from the OTA site?)
alienjon said:
I hadn't tried yet. I was worried about messing things up further without asking for help online first. I'll give this a shot later. Does boot.img refer to the android image file? (ie: what I'd download from the OTA site?)
Click to expand...
Click to collapse
Yes, the zip file that is located where the flash-all.bat is. Unzip it and flash the boot.img.
I bought a Pixel 2 on swappa. It had different bootloader's on slot a and slot b. I couldn't flash updates when on slot a. I thought I was hosed but from slot b I could flash to slot a so now I'm fine. Slot a had a preview bootloader.

Stuck on Sony's logo after trying to root and install LineageOS

Hey,
I have used Sony Developer's documentations in order to unlock my bootloader, then upgraded it with Emma.
Also, I have installed TWRP using fastboot and also tried to install LineageOS.
But, every time I try to turn on the device, it is stuck on Sony's logo and gets warmer with time.
TWRP, fastboot mode and flash mode are accessible.
What can I do?
Thanks!
(D6603)
iTayGNR said:
Hey,
I have used Sony Developer's documentations in order to unlock my bootloader, then upgraded it with Emma.
Also, I have installed TWRP using fastboot and also tried to install LineageOS.
But, every time I try to turn on the device, it is stuck on Sony's logo and gets warmer with time.
TWRP, fastboot mode and flash mode are accessible.
What can I do?
Thanks!
(D6603)
Click to expand...
Click to collapse
How did you tried to install LineageOS? If you want to go back to stock rom use Emma to flash stock.291
Remember that after flashing TWRP you need to enter recovery by pressing power+volume up and then wipe system/data/cache partitions before flashing LineageOS zip
xkeita said:
How did you tried to install LineageOS? If you want to go back to stock rom use Emma to flash stock.291
Remember that after flashing TWRP you need to enter recovery by pressing power+volume up and then wipe system/data/cache partitions before flashing LineageOS zip
Click to expand...
Click to collapse
I have just flashed the stock rom with Emma.
What do you now? What to install in what order?
what I did previously was to use fastboot to flash TWRP and then flash lineageOS through the device itself (using TWRP). But it says the file is corrupted, although i tried 2 different zip files (both for the z3 of course) but both are corrupted.
thanks!
iTayGNR said:
I have just flashed the stock rom with Emma.
What do you now? What to install in what order?
what I did previously was to use fastboot to flash TWRP and then flash lineageOS through the device itself (using TWRP). But it says the file is corrupted, although i tried 2 different zip files (both for the z3 of course) but both are corrupted.
thanks!
Click to expand...
Click to collapse
Nice! Now you can follow Instructions from the How to install section in https://forum.xda-developers.com/z3/orig-development/7-1-cyanogenmod-t3508140 you can skip point 1 and start from 2.
Be sure that your bootloader is still in unlocked status before, otherwise you can unlock it again with flashtool. Otherwise rom won't boot. That's all, good luck
xkeita said:
Nice! Now you can follow Instructions from the How to install section in https://forum.xda-developers.com/z3/orig-development/7-1-cyanogenmod-t3508140 you can skip point 1 and start from 2.
Be sure that your bootloader is still in unlocked status before, otherwise you can unlock it again with flashtool. Otherwise rom won't boot. That's all, good luck
Click to expand...
Click to collapse
Should I use fastboot in order to flash TWRP?
and, why do I need flashtool? do you have a tutorial?
thank you so much!
This is the TWRP log when trying to install LineageOS:
Installing zip file '/external_sd/lineage-14.1-20170523-xkeita-z3.zip'
Check for MD5 file...
Skipping MD5 check: no MD5 file found
Zip file is corrupt!
Error installing zip file /external_sd/lineage-14.1-20170523-xkeita-z3.zip'
Updating partition details...
...done
(bold = red letters_
What have I done wrong?
iTayGNR said:
This is the TWRP log when trying to install LineageOS:
Installing zip file '/external_sd/lineage-14.1-20170523-xkeita-z3.zip'
Check for MD5 file...
Skipping MD5 check: no MD5 file found
Zip file is corrupt!
Error installing zip file /external_sd/lineage-14.1-20170523-xkeita-z3.zip'
Updating partition details...
...done
(bold = red letters_
What have I done wrong?
Click to expand...
Click to collapse
It is probably the zip file itself which is (like TWRP states) corrupted.
Try to redownload the zip from the LOS thread and flash it, guess something went wrong with your first download and/or transfer of the zip to your SD.

Accidentally wiped system partition of huawei mate 9 dualsim

Hi im new here and i need help :^;
Have a huawei mate 9 (dual sim, unlocked bootloader) and accidentally wiped the system partition through twrp (custom for huawei mate 9 through xda so not all functions work)
tried:
- fastboot flashing system.img, boot.img and revovery.img from update.zip (MHA-L29C432B176) from "techora"
--- this ended up as a boot loop
- flashing the update.zip through twrp but i got an error message for unknown command (probably because update.zip is not made for twrp)
- using dload/UPDATE.APP using ext sd card after flashing recovery.img but nothing happened, cant access internal storage so cant move the dload folder there
- hisuite system recovery but rejected my phone because it is unlocked ... tried to relock phone but still got rejected
please help ;^;
Thanks
Got it working but not optimal
how i got it working with fastboot and twrp:
flashed romaur1.5 along with system.img from a MHA-L29C636XXX full update zip
the boot img from that was a bit messed so flashed KangVIP custom rom boot.img (dont flash the whole rom there tons of chinese bloat) ---- i probably didnt need to flash the romaur, just system.img and boot.img
that fixed everthing kinda. the os booted fine but there was a messed keyboard (google voice keyboard that didnt work) so i skipped everthing and installed a google keyboard apk, then went into Settings to redo the startup things i didnt do. The other problem is that my phone is permenantly rooted with SuperSU, cant uninstall or update through the app :/ factory resetting didnt remove the root (after flashing the stock recovery.img from update.app)
Thats all..
henry931 said:
how i got it working with fastboot and twrp:
flashed romaur1.5 along with system.img from a MHA-L29C636XXX full update zip
the boot img from that was a bit messed so flashed KangVIP custom rom boot.img (dont flash the whole rom there tons of chinese bloat) ---- i probably didnt need to flash the romaur, just system.img and boot.img
that fixed everthing kinda. the os booted fine but there was a messed keyboard (google voice keyboard that didnt work) so i skipped everthing and installed a google keyboard apk, then went into Settings to redo the startup things i didnt do. The other problem is that my phone is permenantly rooted with SuperSU, cant uninstall or update through the app :/ factory resetting didnt remove the root (after flashing the stock recovery.img from update.app)
Thats all..
Click to expand...
Click to collapse
SuperSU is in boot.img so you'd have to restore that to get rid of root.
You could use this: https://forum.xda-developers.com/mate-9/how-to/guide-mate-9-flash-update-package-t3593108
To get back to your old version or get to B190. Backing up /data is recommended if you're decrypted, or backup using titanium or similar. (that's if you want to unlock bootloader again after it's done, since it does a factory reset.)
Or you could try flashing system.img directly in twrp, to the /system partition. Youd have to flash your boot.img for B176 for this though.
ante0 said:
SuperSU is in boot.img so you'd have to restore that to get rid of root.
You could use this: https://forum.xda-developers.com/mate-9/how-to/guide-mate-9-flash-update-package-t3593108
To get back to your old version or get to B190. Backing up /data is recommended if you're decrypted, or backup using titanium or similar. (that's if you want to unlock bootloader again after it's done, since it does a factory reset.)
Or you could try flashing system.img directly in twrp, to the /system partition. Youd have to flash your boot.img for B176 for this though.
Click to expand...
Click to collapse
I've tried that, and it doesnt work for me, going to try different boot.img from another post on xda
lol that didnt work because my system image was too old, i flashed a newer version of supersu and it installed systemless and uninstalled my old one
You could have just downloaded your update.zip, taken out update.app, extracted system.img and made a flashable zip.
Powerlated said:
You could have just downloaded your update.zip, taken out update.app, extracted system.img and made a flashable zip.
Click to expand...
Click to collapse
cant be bothered, id rather just flash through fastboot

Update TWRP went wrong, how to solve?

I updated TWRP my Oneplus 6 to the latest 3.0.0.0 version. I am on Beta 16.
I installed the ZIP in the old TWRP and it installed itself on partition A and B.
When I rebooted the phone I get an error with; device corrupted and only option is to press power.
When I do this it starts to TWRP or I get the same error message again.
How to solve this? I need the files on my phone....
I read somewhere to extract the boot.img file from a full ota package and flash this in TWRP. Is this correct?
I already downloaded the OTA package but in this zip there is no boot.img....Can anybody give me a link?
grox said:
I updated TWRP my Oneplus 6 to the latest 3.0.0.0 version. I am on Beta 16.
I installed the ZIP in the old TWRP and it installed itself on partition A and B.
When I rebooted the phone I get an error with; device corrupted and only option is to press power.
When I do this it starts to TWRP or I get the same error message again.
How to solve this? I need the files on my phone....
I read somewhere to extract the boot.img file from a full ota package and flash this in TWRP. Is this correct?
I already downloaded the OTA package but in this zip there is no boot.img....Can anybody give me a link?
Click to expand...
Click to collapse
Try blu_spark TWRP
I downloaded the patched boot image here:
https://forum.xda-developers.com/showpost.php?p=79414448&postcount=390
I followed this tread:
https://forum.xda-developers.com/oneplus-6/how-to/patched-boot-image-magisk-16-7-beta-t3818853
It works!
enable AVB 2.0/dm-verity from magisk manager and flash magisk again from manager

Twrp boot loop

I patched twrp img with magisk and then ran fastboot flash boot "patched file" in fastboot mode. Now, whenever and however I start my system I get only the twrp menu. My device is Lenovo tab 4 8(tb-8504f)
Re-flash tablet's Stock ROM to get rid off of all modifications you applied so far.
re flash the ROM. dont flash the magisk or twrp after it. you will be saved.
you can use twrp via adb boot twrpxx.img So flashing it not needed.
Magisk installation has now become trickier simply flashing via recovery won't work
jwoegerbauer said:
Re-flash tablet's Stock ROM to get rid off of all modifications you applied so far.
Click to expand...
Click to collapse
hello thanks for replying. Could you provide me with the official rom. I've found one but not sure how reliable it is. I also in the twrp menu installed the patched twrp image from sd card to boot. After rebooting I again get the twrp menu but the file is not being show in sdcard anymore.
suraj123 said:
re flash the ROM. dont flash the magisk or twrp after it. you will be saved.
you can use twrp via adb boot twrpxx.img So flashing it not needed.
Magisk installation has now become trickier simply flashing via recovery won't work
Click to expand...
Click to collapse
I also in the twrp menu installed the patched twrp image from sd card to boot. After rebooting I again get the twrp menu but the file is not being show in sdcard anymore. Does this include what you've refused me to do so? And can u pls provide me the official link?

Categories

Resources