【问题标题】:Android build error: ro.build.fingerprint cannot exceed 91 bytesAndroid 构建错误:ro.build.fingerprint 不能超过 91 字节
【发布时间】:2015-04-30 20:49:15
【问题描述】:

我正在从 android 源代码构建一个 android rom,但大约 5 分钟后它给出了这个错误。

error: ro.build.fingerprint cannot exceed 91 bytes: Android/mini_emulator_x86/mini-emulator-x86:5.0.555/AOSP/username02280306:userdebug/test-keys (97)
make: *** [out/target/product/mini-emulator-x86/system/build.prop] Error 1
make: *** Deleting file `out/target/product/mini-emulator-x86/system/build.prop'
make: *** Waiting for unfinished jobs....

如何增加 ro.build.fingerprint 大小限制?

另外,我正在 Mac 上构建。

【问题讨论】:

    标签: java android build terminal android-source


    【解决方案1】:

    编辑build/tools/post_process_props.py。换行如下:

    PROP_NAME_MAX = 31
    # PROP_VALUE_MAX = 91
    PROP_VALUE_MAX = 128
    

    编辑bionic/libc/include/sys/system_properties.h。换行如下:

    #define PROP_NAME_MAX   32
    // #define PROP_VALUE_MAX  92
    #define PROP_VALUE_MAX  128
    

    做

    make clean
    make
    

    您还可以使用诸如

    之类的语法并行运行第二个 make 命令
    make -j8
    

    【讨论】:

    • 您好,谢谢。 PROP_NAME_MAX等可以在boardconfig.mk中设置吗?
    • 正如@Matt 提到的,它会导致frameworks/native/cmds/installd/installd.cpp 中的错误。要修复它,您还需要在 frameworks/native/cmds/installd/installd_deps.h 中更改 kPropertyValueMax 的值。
    【解决方案2】:

    或者,您可以将构建指纹字符串指定为命令行参数以使用:

    make -j5 BUILD_FINGERPRINT="....."

    这将允许您保持在 91 字节的限制内。

    【讨论】:

      猜你喜欢
      • 2015-03-16
      • 2023-03-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-06-29
      • 2023-04-03
      • 2018-12-08
      • 1970-01-01
      相关资源
      最近更新 更多