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

vivo iqoo PD1824 boot unpack failed #90

Closed
Liberations opened this issue Jun 7, 2022 · 14 comments
Closed

vivo iqoo PD1824 boot unpack failed #90

Liberations opened this issue Jun 7, 2022 · 14 comments

Comments

@Liberations
Copy link

03:18:46.445 [main] WARN cfig.packable.PackableLauncher - [boot.img] will be handled by [BootImgParser]
03:18:46.504 [main] WARN cfig.packable.PackableLauncher - 'unpack' sequence initialized
03:18:46.505 [main] INFO cfig.packable.IPackable - deleting build/unzip_boot/ ...
03:18:46.509 [main] INFO Helper - deleting uiderrors
03:18:46.515 [main] INFO cfig.packable.BootImgParser - header version 2
03:18:46.523 [main] WARN cfig.bootimg.v2.BootHeaderV2 - BootImgHeader constructor
03:18:46.534 [main] INFO cfig.Avb - python aosp/avb/avbtool.v1.2.py verify_image --image boot.img
aosp/avb/avbtool.v1.2.py: Signature check failed for SHA256_RSA2048 vbmeta struct boot.img
Verifying image boot.img using embedded public key
03:18:46.606 [main] ERROR cfig.Avb - boot.img failed integrity check by "python aosp/avb/avbtool.v1.2.py verify_image --image boot.img"
03:18:46.973 [main] INFO KernelExtractor - [aosp/build/tools/extract_kernel.py, --input, build/unzip_boot/kernel, --output-configs, build/unzip_boot/kernel_configs.txt, --output-version, build/unzip_boot/kernel_version.txt]
03:18:46.974 [main] INFO KernelExtractor - kernel version: [4.14.190]
03:18:46.975 [main] INFO KernelExtractor - kernel config dumped to : build/unzip_boot/kernel_configs.txt
03:18:47.028 [main] INFO Helper - CMD: [lz4, -t, build/unzip_boot/ramdisk.img], workDir: null
Error 44 : Unrecognized header : file cannot be decoded
03:18:47.039 [main] ERROR Helper - org.apache.commons.exec.ExecuteException: Process exited with an error: 44 (Exit value: 44): can not exec command
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.IllegalArgumentException: ramdisk is in unknown format
at cfig.bootimg.Common$Companion.dumpRamdisk(Common.kt:164)
at cfig.bootimg.Common$Companion.dumpRamdisk$default(Common.kt:125)
at cfig.bootimg.v2.BootV2.extractImages(BootV2.kt:193)
at cfig.packable.BootImgParser.unpack(BootImgParser.kt:45)
... 8 more

FAILURE: Build failed with an exception.

@Liberations
Copy link
Author

「boot.img.png」https://www.aliyundrive.com/s/1une5kwsuJk
点击链接保存,或者复制本段内容,打开「阿里云盘」APP `,无需下载极速在线查看,视频原画倍速播放。```

@cfig
Copy link
Owner

cfig commented Jun 7, 2022

Unpacking the image works fine here.
Did you git fetch the latest code?
Can you check your "lz4" version, by "lz4 --version" ?
Mine is *** LZ4 command line interface 64-bits v1.9.3, by Yann Collet ***

log:

debian➜  ~/work/boot git:(0a34236) ✗ g u

> Task :unpack
23:24:02.980 [main] WARN  cfig.packable.PackableLauncher - [boot.img] will be handled by [BootImgParser]
23:24:03.058 [main] WARN  cfig.packable.PackableLauncher - 'unpack' sequence initialized
23:24:03.060 [main] INFO  cfig.packable.IPackable - deleting build/unzip_boot/ ...
23:24:03.070 [main] INFO  Helper - deleting uiderrors
23:24:03.075 [main] INFO  cfig.packable.BootImgParser - header version 2
23:24:03.184 [main] WARN  cfig.bootimg.v2.BootHeaderV2 - BootImgHeader constructor
23:24:03.200 [main] INFO  cfig.Avb - python aosp/avb/avbtool.v1.2.py verify_image --image boot.img
Verifying image boot.img using embedded public key
vbmeta: Successfully verified footer and SHA256_RSA2048 vbmeta struct in boot.img
boot: Successfully verified sha256 hash of boot.img for image of 46379008 bytes
23:24:03.650 [main] INFO  KernelExtractor - [aosp/make/tools/extract_kernel.py, --input, build/unzip_boot/kernel, --output-configs, build/unzip_boot/kernel_configs.txt, --output-version, build/unzip_boot/kernel_version.txt]
23:24:03.651 [main] INFO  KernelExtractor - kernel version: [4.14.190]
23:24:03.652 [main] INFO  KernelExtractor - kernel config dumped to : build/unzip_boot/kernel_configs.txt
23:24:03.657 [main] INFO  cfig.utils.DTC - parsing DTB: build/unzip_boot/dtb
23:24:03.664 [main] INFO  cfig.utils.DTC - [dtc, -q, -I, dtb, -O, dts, build/unzip_boot/dtb, -o, build/unzip_boot/dtb.src]
23:24:03.675 [main] INFO  cfig.utils.DTC - [dtc, -q, -I, dts, -O, yaml, build/unzip_boot/dtb.src, -o, build/unzip_boot/dtb.src.yaml]
23:24:03.677 [main] INFO  avb.AVBInfo - parseFrom(FILE:boot.img) ...
23:24:03.696 [main] INFO  avb.AVBInfo - FILE:boot.img: Glance(footer=Footer(versionMajor=1, versionMinor=0, originalImageSize=46379008, vbMetaOffset=46379008, vbMetaSize=1728), vbMetaOffset=46379008).footer
23:24:03.768 [main] INFO  avb.AVBInfo - VBMeta: boot.img -> build/unzip_boot/boot.avb.json
23:24:03.848 [main] INFO  cfig.Avb - signed with release key
23:24:03.854 [main] INFO  cfig.Avb - signed with release key
23:24:03.878 [main] INFO  cfig.bootimg.v2.BootV2 - 
                        Unpack Summary of boot.img
┌───────────────────────────────────────┬──────────────────────────────────────┐
│What                                   │Where                                 │
└───────────────────────────────────────┴──────────────────────────────────────┘
┌───────────────────────────────────────┬──────────────────────────────────────┐
│image info                             │build/unzip_boot/boot.json            │
├───────────────────────────────────────┼──────────────────────────────────────┤
│AVB info [verified]                    │build/unzip_boot/boot.avb.json        │
│\-- signing key                        │release key                           │
├───────────────────────────────────────┼──────────────────────────────────────┤
│kernel                                 │build/unzip_boot/kernel               │
│\-- version [4.14.190]                 │build/unzip_boot/kernel_version.txt   │
│\-- config                             │build/unzip_boot/kernel_configs.txt   │
├───────────────────────────────────────┼──────────────────────────────────────┤
│dtb                                    │build/unzip_boot/dtb                  │
│\-- decompiled dts                     │build/unzip_boot/dtb.src              │
└───────────────────────────────────────┴──────────────────────────────────────┘
23:24:03.924 [main] WARN  cfig.packable.PackableLauncher - 'unpack' sequence completed

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.4.2/userguide/command_line_interface.html#sec:command_line_warnings

@Liberations
Copy link
Author

lz4 --version
*** LZ4 command line interface 64-bits v1.9.2, by Yann Collet ***

@Liberations
Copy link
Author

how can i update lz4 version...

@Liberations
Copy link
Author

update lz4 version same problem

lz4 --version
*** LZ4 command line interface 64-bits v1.9.3, by Yann Collet ***
https://www.aliyundrive.com/s/SN99f5Rfo4K

boot.img

wen@ZJZL-20211210GX:~/dev/Android_boot_image_editor-master$ ./gradlew unpack

Task :unpack FAILED
12:15:02.090 [main] WARN cfig.packable.PackableLauncher - [boot.img] will be handled by [BootImgParser]
12:15:02.145 [main] WARN cfig.packable.PackableLauncher - 'unpack' sequence initialized
12:15:02.147 [main] INFO cfig.packable.IPackable - deleting build/unzip_boot/ ...
12:15:02.153 [main] INFO Helper - deleting uiderrors
12:15:02.157 [main] INFO cfig.packable.BootImgParser - header version 2
12:15:02.161 [main] WARN cfig.bootimg.v2.BootHeaderV2 - BootImgHeader constructor
12:15:02.170 [main] INFO cfig.Avb - python aosp/avb/avbtool.v1.2.py verify_image --image boot.img
Verifying image boot.img using embedded public key
vbmeta: Successfully verified footer and SHA256_RSA2048 vbmeta struct in boot.img
sha256 digest of boot.img does not match digest in descriptor
aosp/avb/avbtool.v1.2.py: Error verifying descriptor.
12:15:02.326 [main] ERROR cfig.Avb - boot.img failed integrity check by "python aosp/avb/avbtool.v1.2.py verify_image --image boot.img"
12:15:02.510 [main] INFO KernelExtractor - [aosp/make/tools/extract_kernel.py, --input, build/unzip_boot/kernel, --output-configs, build/unzip_boot/kernel_configs.txt, --output-version, build/unzip_boot/kernel_version.txt]
12:15:02.511 [main] INFO KernelExtractor - kernel version: [4.14.190]
12:15:02.512 [main] INFO KernelExtractor - kernel config dumped to : build/unzip_boot/kernel_configs.txt
12:15:02.550 [main] INFO Helper - CMD: [lz4, -t, build/unzip_boot/ramdisk.img], workDir: null
Error 44 : Unrecognized header : file cannot be decoded
12:15:02.554 [main] ERROR Helper - org.apache.commons.exec.ExecuteException: Process exited with an error: 44 (Exit value: 44): can not exec command
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.IllegalArgumentException: ramdisk is in unknown format
at cfig.bootimg.Common$Companion.dumpRamdisk(Common.kt:164)
at cfig.bootimg.Common$Companion.dumpRamdisk$default(Common.kt:125)
at cfig.bootimg.v2.BootV2.extractImages(BootV2.kt:194)
at cfig.packable.BootImgParser.unpack(BootImgParser.kt:46)
... 8 more

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':unpack'.

Process 'command '/usr/lib/jvm/java-11-openjdk-amd64/bin/java'' finished with non-zero exit value 1

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.4/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 1s
10 actionable tasks: 1 executed, 9 up-to-date
wen@ZJZL-20211210GX:/dev/Android_boot_image_editor-master$ lz4 --version
*** LZ4 command line interface 64-bits v1.9.3, by Yann Collet ***
wen@ZJZL-20211210GX:
/dev/Android_boot_image_editor-master$

@cfig
Copy link
Owner

cfig commented Jun 8, 2022

Ahhh, I see magisk again. Sure I can adapt the code for magisk.
But I just wonder whether the boot.img can boot up?

@Liberations
Copy link
Author

bootloop to fastboot mode. ...may be iqoo pd1824a .boot.img not include ramdisk.img...

@Liberations
Copy link
Author

do u know how to root not by patch ramdisk.... any way? my phone is unlock bootloader.

@Liberations
Copy link
Author

i want patch boot with magisk .android unpack vbmeta to disable verify.set head.flag=2 and repack boot...but now magisk boot can not unpack well..

@cfig
Copy link
Owner

cfig commented Jun 9, 2022

Can you try latest "dev" branch?
It's able to to unpack/pack the magisk boot image.

@Liberations
Copy link
Author

ok let me try..

@Liberations
Copy link
Author

dev branch work normal...but boot loop 。

@cfig
Copy link
Owner

cfig commented Jun 9, 2022

Then it's the problem of magisk ...
You may start it over from the factory ROM.

@Liberations
Copy link
Author

thks.closed

cfig added a commit that referenced this issue Jun 11, 2022
Issue #90: support magisk-modified uncompressed ramdisk
cfig added a commit that referenced this issue Jun 11, 2022
Issue #90: support magisk-modified uncompressed ramdisk
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