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

Header version error #35

Closed
iusearch opened this issue Dec 26, 2019 · 5 comments
Closed

Header version error #35

iusearch opened this issue Dec 26, 2019 · 5 comments

Comments

@iusearch
Copy link

[main] WARN cfig.packable.PackableLauncher - Active image target: boot.img
[main] INFO Packer - Loading config from build/unzip_boot/bootimg.json
[main] INFO Packer - Deleting build/unzip_boot/ramdisk.img.gz ...
[main] INFO Packer - Packing rootfs build/unzip_boot/root ...
[main] INFO Packer - ./aosp/mkbootfs/build/exe/mkbootfs/mkbootfs build/unzip_boot/root
[main] INFO Helper - compress(gz) done: build/unzip_boot/ramdisk.img.gz
[main] INFO Packer - build/unzip_boot/ramdisk.img.gz is ready
Exception in thread "main" java.lang.IllegalArgumentException: headerVersion 23169024 illegal
        at cfig.bootimg.BootImgHeader.refresh(BootImgHeader.kt:237)
        at cfig.bootimg.BootImgHeader.encode(BootImgHeader.kt:244)
        at cfig.Packer.pack(Packer.kt:149)
        at cfig.packable.BootImgParser.pack(BootImgParser.kt:71)
        at cfig.packable.PackableLauncherKt.main(PackableLauncher.kt:67)

> Task :pack FAILED
:pack (Thread[Execution worker for ':' Thread 3,5,main]) completed. Took 4.087 secs.
@cfig
Copy link
Owner

cfig commented Dec 28, 2019

Hi, Can you attach your image here?

Thanks

@iusearch
Copy link
Author

Yea, I will send it tomorrow since the file is not on my PC, I will grab one and send it to you.

@iusearch
Copy link
Author

boot.zip

@cfig
Copy link
Owner

cfig commented Dec 29, 2019

00000000: 414e 4452 4f49 4421 2af4 9800 0080 0080  ANDROID!*.......
00000010: ab09 7400 0000 0082 0000 0000 0000 f080  ..t.............
00000020: 0001 0080 0008 0000 0088 6101 0000 0000  ..........a.....
00000030: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000040: 636f 6e73 6f6c 653d 7474 7948 534c 302c  console=ttyHSL0,

See above hex dump of the header:
Value of the "header version filed" is "00 88 61 01", it's illegal. Valid values should be one of [0, 1, 2].
If this image is the official one, it should have private data fields which differ from AOSP definition.

Of course you can manually change the header version to "0" or "1" in "build/unzip_boot/bootimg.json" and re-pack it, but I'm not sure whether the repacked image can actually boot up or not.

Also I see "product.version=PD1602_A_3.12.8", is it for Vivo X7 ?
If confirmed, i can add this product into 'incompatability list'.

Thanks

@iusearch
Copy link
Author

Yeah, it is vivo X7, tried magisk but not booting. I may try modifying the header version and flash. I guess they have verification in their bootloader.

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

No branches or pull requests

2 participants