Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compatibility check: verify as many ROMs and devices as possible #17

Open
cfig opened this issue May 21, 2018 · 22 comments
Open

compatibility check: verify as many ROMs and devices as possible #17

cfig opened this issue May 21, 2018 · 22 comments

Comments

@cfig
Copy link
Owner

cfig commented May 21, 2018

We want to know how many device ROMs can be edited with this tool, which helps new comers.
If you use this tool for your debugging work or hacking, please kindly drop a comment.

@Surendrajat
Copy link
Contributor

Surendrajat commented Sep 21, 2019

Confirmed working with Oppo K3(CPH1955) recovery.img (with some tricks - to get recovery.img out from boot.img using a bsdiff patch under system because didn't work with boot.img)

@cfig
Copy link
Owner Author

cfig commented Sep 22, 2019

@Surendrajat Thanks for the kindness! This helps others.

@cfig
Copy link
Owner Author

cfig commented Sep 22, 2019

Hi @Surendrajat , could you provide more info such as its Android version details?

Device Model Manufacturer Compatible Android Version Note
Pixel 3 (blueline) Google Y Q preview (qpp2.190228.023,
2019)
Nexus 9 (volantis/flounder) HTC Y(with some tricks) 7.1.1 (N9F27M, Oct 2017) [tricks]
K3 (CPH1955) OPPO Y (recovery.img) ??? [tricks]

@Surendrajat
Copy link
Contributor

Surendrajat commented Sep 22, 2019

Absolutely. Pie it is.
I will open a PR for tricks about how to get recovery.img.

@Surendrajat
Copy link
Contributor

@cfig Done #32

@eebssk1
Copy link

eebssk1 commented Apr 10, 2021

Xiaomi Redmi K30 4g(phoenix[n]) (LOS-like ROM android10 )boot.img with vbmeta.img modification works.

@cfig
Copy link
Owner Author

cfig commented Apr 11, 2021

Xiaomi Redmi K30 4g(phoenix[n]) (LOS-like ROM)boot.img with vbmeta.img modification works.

Thank you! It would be better if you can provide more info like Android Version, download links of stock images(or 3rd party images).

cfig added a commit that referenced this issue Apr 15, 2021
Issue #17: add Redmi K30 into compatible list
cfig added a commit that referenced this issue Apr 15, 2021
Issue #17: add Redmi K30 into compatible list
@mariodantas
Copy link

Worked with Topway TS10 firmware (Android10)
China car Android headunit

Does not work after image patched with magisk but I think this is out of scope here

@eebssk1
Copy link

eebssk1 commented May 28, 2021

Worked with Topway TS10 firmware (Android10)
China car Android headunit

Does not work after image patched with magisk but I think this is out of scope here

Magisk directly patch the kernel to force load the ramdisk. It's not very recommended to modify magisk patched image with these tool. Modify the original image and then install magisk if possible.

@mariodantas
Copy link

Worked with Topway TS10 firmware (Android10)
China car Android headunit
Does not work after image patched with magisk but I think this is out of scope here

Magisk directly patch the kernel to force load the ramdisk. It's not very recommended to modify magisk patched image with these tool. Modify the original image and then install magisk if possible.

Thanks for the tip

@mariodantas
Copy link

In fact I wasn't trying to modify the patched image, I was trying to understand why I had an error (like the one in the attached PNG below) with the magisk patched image, it seems like Magisk is not doing the job supposed to be done correctly:

The test was done because my unit don't boot with magisk patched image

screenshot-2021-05-28 131120

@eebssk1
Copy link

eebssk1 commented May 28, 2021

In fact I wasn't trying to modify the patched image, I was trying to understand why I had an error (like the one in the attached PNG below) with the magisk patched image, it seems like Magisk is not doing the job supposed to be done correctly:

The test was done because my unit don't boot with magisk patched image

screenshot-2021-05-28 131120

Because magisk modifies the content so the signature will no longer match.However this should'nt happen as magisk resign the image with its own key..

Maybe signature in vbmeta is not changed when resigning,whch causes the error.Maybe you can open a issue at magisk repo for this..

@mariodantas
Copy link

In fact I wasn't trying to modify the patched image, I was trying to understand why I had an error (like the one in the attached PNG below) with the magisk patched image, it seems like Magisk is not doing the job supposed to be done correctly:
The test was done because my unit don't boot with magisk patched image
screenshot-2021-05-28 131120

Because magisk modifies the content so the signature will no longer match.However this should'nt happen as magisk resign the image with its own key..

Maybe signature in vbmeta is not changed when resigning,whch causes the error.Maybe you can open a issue at magisk repo for this..

I did, he closed the issue !

@mariodantas
Copy link

I know that this is not the right place to post this but, I'd like to get this boot rooted as the unit works very bad with GPS (need to replace some configs in gps.conf / gps_debug.conf) and also need root privileges to user Alpha Backup Pro, and save y 2Gb of music data from deezer app

boot.zip.gz

@cfig
Copy link
Owner Author

cfig commented May 31, 2021

In fact I wasn't trying to modify the patched image, I was trying to understand why I had an error (like the one in the attached PNG below) with the magisk patched image, it seems like Magisk is not doing the job supposed to be done correctly:
The test was done because my unit don't boot with magisk patched image
screenshot-2021-05-28 131120

Because magisk modifies the content so the signature will no longer match.However this should'nt happen as magisk resign the image with its own key..
Maybe signature in vbmeta is not changed when resigning,whch causes the error.Maybe you can open a issue at magisk repo for this..

I did, he closed the issue !

you can disable the integrity check by

diff --git a/bbootimg/src/main/kotlin/avb/Avb.kt b/bbootimg/src/main/kotlin/avb/Avb.kt
index 6488c96..5884050 100644
--- a/bbootimg/src/main/kotlin/avb/Avb.kt
+++ b/bbootimg/src/main/kotlin/avb/Avb.kt
@@ -471,7 +471,7 @@ class Avb {
             try {
                 DefaultExecutor().execute(CommandLine.parse(cmdline))
             } catch (e: Exception) {
-                throw IllegalArgumentException("$fileName failed integrity check by \"$cmdline\"")
+                log.error("$fileName failed integrity check by \"$cmdline\"")
             }
         }

magisk patched boot.img can not pass AVB integrity check , but it doesn't matter if bootloader is unlocked, as the bootloader should always load the image for unlocked devices.

@mariodantas
Copy link

Oh thanks fellow for that, all I want to do is "understand" whhat's wrong after magisk patch, cause my headunit does not boot with magisk patched boot image

cfig added a commit that referenced this issue Jun 5, 2021
MNoxx74 pushed a commit to MNoxx74/Android_boot_image_editor that referenced this issue Jun 14, 2021
@kereng77
Copy link

I tried to unpack the vendor boot image from Galaxy S22+ and failed -

Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at kotlin.reflect.jvm.internal.calls.CallerImpl$Method.callMethod(CallerImpl.kt:97)
at kotlin.reflect.jvm.internal.calls.CallerImpl$Method$Instance.call(CallerImpl.kt:113)
at kotlin.reflect.jvm.internal.KCallableImpl.call(KCallableImpl.kt:108)
at cfig.packable.PackableLauncherKt.main(PackableLauncher.kt:108)
Caused by: java.lang.OutOfMemoryError: Java heap space
at java.base/java.lang.StringCoding.decodeUTF8_0(StringCoding.java:768)
at java.base/java.lang.StringCoding.decodeUTF8(StringCoding.java:725)
at java.base/java.lang.StringCoding.decode(StringCoding.java:257)
at java.base/java.lang.String.(String.java:507)
at java.base/java.lang.String.(String.java:561)
at cfig.bootimg.cpio.AndroidCpio$Companion.decompressCPIO(AndroidCpio.kt:280)
at cfig.bootimg.Common$Companion.unpackRamdisk(Common.kt:355)
at cfig.bootimg.Common$Companion.dumpRamdisk(Common.kt:167)
at cfig.bootimg.v3.VendorBoot.extractImages(VendorBoot.kt:348)
at cfig.packable.VendorBootParser.unpack(VendorBootParser.kt:34)
... 8 more
:unpack (Thread[Execution worker for ':' Thread 6,5,main]) completed. Took 1.217 secs.

FAILURE: Build failed with an exception.

Can I provide any other useful info?

@cfig
Copy link
Owner Author

cfig commented Apr 19, 2022

Hi, can you attach your image here? if it's not confidential .

@kereng77
Copy link

Sure -
vendor_boot.tar.gz

@cfig
Copy link
Owner Author

cfig commented Apr 19, 2022

Sure - vendor_boot.tar.gz

That's a bug. Just created an issue here: #86

@arvanasoft
Copy link

Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at kotlin.reflect.jvm.internal.calls.CallerImpl$Method.callMethod(CallerImpl.kt:97)
at kotlin.reflect.jvm.internal.calls.CallerImpl$Method$Instance.call(CallerImpl.kt:113)
at kotlin.reflect.jvm.internal.KCallableImpl.call(KCallableImpl.kt:108)
at cfig.packable.PackableLauncherKt.main(PackableLauncher.kt:110)
Caused by: java.lang.UnknownError: Do not know why hash verification fails, maybe a bug
at cfig.helper.Helper$Companion.assertFileEquals(Helper.kt:336)
at cfig.bootimg.v3.VendorBoot.pack(VendorBoot.kt:306)
at cfig.packable.VendorBootParser.pack(VendorBootParser.kt:44)
... 8 more

repack failed
vendor_boot.zip

@cfig
Copy link
Owner Author

cfig commented Jul 13, 2023

Exception in thread "main" java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at kotlin.reflect.jvm.internal.calls.CallerImpl$Method.callMethod(CallerImpl.kt:97) at kotlin.reflect.jvm.internal.calls.CallerImpl$Method$Instance.call(CallerImpl.kt:113) at kotlin.reflect.jvm.internal.KCallableImpl.call(KCallableImpl.kt:108) at cfig.packable.PackableLauncherKt.main(PackableLauncher.kt:110) Caused by: java.lang.UnknownError: Do not know why hash verification fails, maybe a bug at cfig.helper.Helper$Companion.assertFileEquals(Helper.kt:336) at cfig.bootimg.v3.VendorBoot.pack(VendorBoot.kt:306) at cfig.packable.VendorBootParser.pack(VendorBootParser.kt:44) ... 8 more

repack failed vendor_boot.zip

Recorded as:
#125

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants