R0rt1z2 / mtk-bpf-patcher

GNU General Public License v3.0
38 stars 5 forks source link

Fastboot flash boot failed #2

Open Sp1ke47 opened 1 year ago

Sp1ke47 commented 1 year ago

Running the script on Linux and got a .gz file. Unziped it to get the .img. When I tried to flash it via fastboot an error occured (remote: 'image is not a boot image') logs:

[?] Detected BOOT_IMAGE for /root/temp/boot.img!
[!] Extracting kernel from /root/temp/boot.img...
[+] Found a match for '48010035822240b980420491e10313aa'!
[!] Compressing the patched kernel binary...
[+] Success. The patched kernel is available at /root/temp/boot1.img.gz!

The original kernel and patched file attached. Please help!

boot_original.zip boot1.img.gz

R0rt1z2 commented 1 year ago

Running the script on Linux and got a .gz file. Unziped it to get the .img. When I tried to flash it via fastboot an error occured (remote: 'image is not a boot image') logs:

[?] Detected BOOT_IMAGE for /root/temp/boot.img!
[!] Extracting kernel from /root/temp/boot.img...
[+] Found a match for '48010035822240b980420491e10313aa'!
[!] Compressing the patched kernel binary...
[+] Success. The patched kernel is available at /root/temp/boot1.img.gz!

The original kernel and patched file attached. Please help!

boot_original.zip boot1.img.gz

I think you're confusing whatever the script is supposed to return you. As it stands currently, it isn't capable of repacking boot images yet. Thus, in your specific situation, it only returns the compressed zImage.

You are supposed to manually repack the resulting boot1.img.gz using a third-party tool, such as Android Image Kitchen (AIK), for example.

Sp1ke47 commented 1 year ago

True. After repacking the kernel binary into boot.img the flash process succeeded. However, when I attempted to patch the newly packed image via Magisk and flashed it, my phone began to bootloop. vbmeta.img has been flashed to disable AVB verification. Haven’t tried patching in Magisk first then using this script. Maybe there are some arguments idk between the ramdisk patch and kernel patch.

R0rt1z2 commented 1 year ago

True. After repacking the kernel binary into boot.img the flash process succeeded. However, when I attempted to patch the newly packed image via Magisk and flashed it, my phone began to bootloop. vbmeta.img has been flashed to disable AVB verification. Haven’t tried patching in Magisk first then using this script. Maybe there are some arguments idk between the ramdisk patch and kernel patch.

Could you elaborate that, please? Did the phone boot without the Magisk patch? What kind of bootlop are you experiencing?

dtisfg commented 1 year ago
image

i don't know how to solve this problem, can you help me?

LineageOSDefender commented 1 year ago

Running the script on Linux and got a .gz file. Unziped it to get the .img. When I tried to flash it via fastboot an error occured (remote: 'image is not a boot image') logs:

[?] Detected BOOT_IMAGE for /root/temp/boot.img!
[!] Extracting kernel from /root/temp/boot.img...
[+] Found a match for '48010035822240b980420491e10313aa'!
[!] Compressing the patched kernel binary...
[+] Success. The patched kernel is available at /root/temp/boot1.img.gz!

The original kernel and patched file attached. Please help!

boot_original.zip boot1.img.gz

X2

LineageOSDefender commented 1 year ago

Running the script on Linux and got a .gz file. Unziped it to get the .img. When I tried to flash it via fastboot an error occured (remote: 'image is not a boot image') logs:

[?] Detected BOOT_IMAGE for /root/temp/boot.img!
[!] Extracting kernel from /root/temp/boot.img...
[+] Found a match for '48010035822240b980420491e10313aa'!
[!] Compressing the patched kernel binary...
[+] Success. The patched kernel is available at /root/temp/boot1.img.gz!

The original kernel and patched file attached. Please help!

boot_original.zip boot1.img.gz

I think you're confusing whatever the script is supposed to return you. As it stands currently, it isn't capable of repacking boot images yet. Thus, in your specific situation, it only returns the compressed zImage.

You are supposed to manually repack the resulting boot1.img.gz using a third-party tool, such as Android Image Kitchen (AIK), for example.

I tried, but AIK cannot recognize the output file as image file

ghost commented 9 months ago

Just found this and it works great. Thank you. @R0rt1z2

@Sp1ke47 @dtisfg @LineageOSDefender Here's what I did:

Now it's time to use mtk-bpf-patcher

Go back to Android image Kitchen to repack boot.img.

Tested with GSI.