无法在AOSP 11中创建AB OTA ZIP文件

发布于 2025-02-01 10:06:42 字数 3958 浏览 5 评论 0原文

无法在AOSP11中创建AB OTA ZIP文件。

请找到以下错误:

test@test:~/aosp/test1_android$ ./build/tools/releasetools/ota_from_target_files out/dist/rockpi4b-target_files-eng.test.zip update.zip

2022-05-26 20:05:32 - common.py - WARNING : Failed to read SYSTEM/etc/build.prop

2022-05-26 20:05:32 - common.py - WARNING : Failed to read VENDOR/etc/build.prop

2022-05-26 20:05:32 - common.py - WARNING : Failed to read PRODUCT/etc/build.prop

2022-05-26 20:05:32 - common.py - WARNING : Failed to read SYSTEM_EXT/etc/build.prop

2022-05-26 20:05:55 - common.py - WARNING : Failed to read SYSTEM/etc/build.prop

2022-05-26 20:05:55 - common.py - WARNING : Failed to read VENDOR/etc/build.prop

2022-05-26 20:05:55 - common.py - WARNING : Failed to read PRODUCT/etc/build.prop

2022-05-26 20:05:55 - common.py - WARNING : Failed to read SYSTEM_EXT/etc/build.prop

2022-05-26 20:05:55 - common.py - WARNING : Failed to read SYSTEM/etc/build.prop

2022-05-26 20:05:55 - common.py - WARNING : Failed to read VENDOR/etc/build.prop

2022-05-26 20:05:55 - common.py - WARNING : Failed to read PRODUCT/etc/build.prop

2022-05-26 20:05:55 - common.py - WARNING : Failed to read SYSTEM_EXT/etc/build.prop

2022-05-26 20:05:55 - common.py - WARNING : Failed to read SYSTEM/etc/build.prop

2022-05-26 20:05:55 - common.py - WARNING : Failed to read VENDOR/etc/build.prop

2022-05-26 20:05:55 - common.py - WARNING : Failed to read PRODUCT/etc/build.prop

2022-05-26 20:05:55 - common.py - WARNING : Failed to read SYSTEM_EXT/etc/build.prop

2022-05-26 20:05:57 - ota_from_target_files - WARNING : Duplicate block difference found. 
Device specific block diff for partition 'system_ext' overrides the one in generic script.

2022-05-26 20:05:57 - ota_from_target_files - WARNING : Duplicate block difference found. Device specific block diff for partition 'product' overrides the one in generic script.

2022-05-26 20:05:57 - ota_from_target_files - WARNING : Duplicate block difference found. Device specific block diff for partition 'odm' overrides the one in generic script.

Compressing system.new.dat with brotli

Compressing vendor.new.dat with brotli

Compressing product.new.dat with brotli

Compressing odm.new.dat with brotli

Compressing system_ext.new.dat with brotli

write trust now...

write uboot now...

warning: no vbmeta.img in input target_files; not flashing vbmeta

wirte dtbo now...

no charge img; ignore it.

info: no resource image; ignore it.

no RKLoader.bin, ignore it.

info: no vendor_boot.img in input target_files; ignore it

info: no logo image; ignore it.
2022-05-26 20:07:28 - ota_from_target_files - ERROR   : 

   ERROR:

Traceback (most recent call last):
  File "./build/tools/releasetools/ota_from_target_files", line 2258, in <module>
    main(sys.argv[1:])

  File "./build/tools/releasetools/ota_from_target_files", line 2237, in main
    source_file=OPTIONS.incremental_source)

  File "./build/tools/releasetools/ota_from_target_files", line 1980, in GenerateNonAbOtaPackage
    output_file)

  File "./build/tools/releasetools/ota_from_target_files", line 880, in WriteFullOTAPackage

    FinalizeMetadata(metadata, staging_file, output_file, needed_property_files)

  File "./build/tools/releasetools/ota_from_target_files", line 1328, in FinalizeMetadata
    prelim_signing = ComputeAllPropertyFiles(input_file, needed_property_files)

  File "./build/tools/releasetools/ota_from_target_files", line 1314, in ComputeAllPropertyFiles
    SignOutput(input_file, prelim_signing)

  File "./build/tools/releasetools/ota_from_target_files", line 492, in SignOutput
    whole_file=True)

  File "/home/test/aosp/test1_android/build/make/tools/releasetools/common.py", line 1854, in SignFile
    proc.returncode, stdoutdata))

ExternalError: Failed to run signapk.jar: return code 1:

Error: Unable to access jarfile 

/home/test/aosp/test1_android/build/make/tools/framework/signapk.jar

您能帮我吗,如何克服此错误。

Unable to create AB OTA zip file in AOSP11.

Please find below error:

test@test:~/aosp/test1_android$ ./build/tools/releasetools/ota_from_target_files out/dist/rockpi4b-target_files-eng.test.zip update.zip

2022-05-26 20:05:32 - common.py - WARNING : Failed to read SYSTEM/etc/build.prop

2022-05-26 20:05:32 - common.py - WARNING : Failed to read VENDOR/etc/build.prop

2022-05-26 20:05:32 - common.py - WARNING : Failed to read PRODUCT/etc/build.prop

2022-05-26 20:05:32 - common.py - WARNING : Failed to read SYSTEM_EXT/etc/build.prop

2022-05-26 20:05:55 - common.py - WARNING : Failed to read SYSTEM/etc/build.prop

2022-05-26 20:05:55 - common.py - WARNING : Failed to read VENDOR/etc/build.prop

2022-05-26 20:05:55 - common.py - WARNING : Failed to read PRODUCT/etc/build.prop

2022-05-26 20:05:55 - common.py - WARNING : Failed to read SYSTEM_EXT/etc/build.prop

2022-05-26 20:05:55 - common.py - WARNING : Failed to read SYSTEM/etc/build.prop

2022-05-26 20:05:55 - common.py - WARNING : Failed to read VENDOR/etc/build.prop

2022-05-26 20:05:55 - common.py - WARNING : Failed to read PRODUCT/etc/build.prop

2022-05-26 20:05:55 - common.py - WARNING : Failed to read SYSTEM_EXT/etc/build.prop

2022-05-26 20:05:55 - common.py - WARNING : Failed to read SYSTEM/etc/build.prop

2022-05-26 20:05:55 - common.py - WARNING : Failed to read VENDOR/etc/build.prop

2022-05-26 20:05:55 - common.py - WARNING : Failed to read PRODUCT/etc/build.prop

2022-05-26 20:05:55 - common.py - WARNING : Failed to read SYSTEM_EXT/etc/build.prop

2022-05-26 20:05:57 - ota_from_target_files - WARNING : Duplicate block difference found. 
Device specific block diff for partition 'system_ext' overrides the one in generic script.

2022-05-26 20:05:57 - ota_from_target_files - WARNING : Duplicate block difference found. Device specific block diff for partition 'product' overrides the one in generic script.

2022-05-26 20:05:57 - ota_from_target_files - WARNING : Duplicate block difference found. Device specific block diff for partition 'odm' overrides the one in generic script.

Compressing system.new.dat with brotli

Compressing vendor.new.dat with brotli

Compressing product.new.dat with brotli

Compressing odm.new.dat with brotli

Compressing system_ext.new.dat with brotli

write trust now...

write uboot now...

warning: no vbmeta.img in input target_files; not flashing vbmeta

wirte dtbo now...

no charge img; ignore it.

info: no resource image; ignore it.

no RKLoader.bin, ignore it.

info: no vendor_boot.img in input target_files; ignore it

info: no logo image; ignore it.
2022-05-26 20:07:28 - ota_from_target_files - ERROR   : 

   ERROR:

Traceback (most recent call last):
  File "./build/tools/releasetools/ota_from_target_files", line 2258, in <module>
    main(sys.argv[1:])

  File "./build/tools/releasetools/ota_from_target_files", line 2237, in main
    source_file=OPTIONS.incremental_source)

  File "./build/tools/releasetools/ota_from_target_files", line 1980, in GenerateNonAbOtaPackage
    output_file)

  File "./build/tools/releasetools/ota_from_target_files", line 880, in WriteFullOTAPackage

    FinalizeMetadata(metadata, staging_file, output_file, needed_property_files)

  File "./build/tools/releasetools/ota_from_target_files", line 1328, in FinalizeMetadata
    prelim_signing = ComputeAllPropertyFiles(input_file, needed_property_files)

  File "./build/tools/releasetools/ota_from_target_files", line 1314, in ComputeAllPropertyFiles
    SignOutput(input_file, prelim_signing)

  File "./build/tools/releasetools/ota_from_target_files", line 492, in SignOutput
    whole_file=True)

  File "/home/test/aosp/test1_android/build/make/tools/releasetools/common.py", line 1854, in SignFile
    proc.returncode, stdoutdata))

ExternalError: Failed to run signapk.jar: return code 1:

Error: Unable to access jarfile 

/home/test/aosp/test1_android/build/make/tools/framework/signapk.jar

Can you please help me , how to overcome this error.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

辞慾 2025-02-08 10:06:42

成功构建AOSP代码后,您必须设置DIST_DIR如下:

. build/envsetup.sh && lunch {your_target}
mkdir dist_output
make dist DIST_DIR=dist_output

After you build AOSP code successfully,you must set DIST_DIR as follows:

. build/envsetup.sh && lunch {your_target}
mkdir dist_output
make dist DIST_DIR=dist_output
江挽川 2025-02-08 10:06:42

ota_from_target_files acts different in android 11.

If you have executed "make dist", the otatools is put in out/dist/otatools.zip, or you can "make otatools-package", the otatools will put in out/target/product/ xxxx/otatools.zip。

所有依赖性都包装在otatools.zip中,然后您可以在otatools.zip中使用ota_from_target_files来制作OTA ZIP。

ota_from_target_files acts different in android 11.

If you have executed "make dist", the otatools is put in out/dist/otatools.zip, or you can "make otatools-package", the otatools will put in out/target/product/xxxx/otatools.zip.

All the dependency is packed in otatools.zip, then you can use ota_from_target_files in otatools.zip to make ota zip.

魔法少女 2025-02-08 10:06:42

如果您在根目录中执行python脚本ota_from_target_files.py,则需要使用-p来指定路径。

或者

./build/tools/releasetools/ota_from_target_files.py -p out/host/linux-x86 -i PREVIOUS-tardis-target_files.zip dist_output/tardis-target_files.zip incremental_ota_update.zip

,您可以直接从根目录中执行它:

./out/host/linux-x86/bin/ota_from_target_files -i PREVIOUS-tardis-target_files.zip dist_output/tardis-target_files.zip incremental_ota_update.zip

有关详细信息,请参阅构建/工具/reareaseTools/ota_from_target_files.py和build/build/tools/areaseSetools/common.py。

通常,此问题的关键是options.search_path。

If you execute the Python script ota_from_target_files.py in the root directory, you need to use -p to specify the path.

Using

./build/tools/releasetools/ota_from_target_files.py -p out/host/linux-x86 -i PREVIOUS-tardis-target_files.zip dist_output/tardis-target_files.zip incremental_ota_update.zip

Alternatively, you can execute it directly from the root directory:

./out/host/linux-x86/bin/ota_from_target_files -i PREVIOUS-tardis-target_files.zip dist_output/tardis-target_files.zip incremental_ota_update.zip

For details, refer to build/tools/releasetools/ota_from_target_files.py and build/tools/releasetools/common.py.

In common.py, the key to this issue is Options.search_path.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文