7

I'm building an android rom from the android source code but after about 5 minutes it gives this error.

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....

How do I increase the ro.build.fingerprint size limit?

Plus I'm building on a Mac.

2 Answers 2

12

Edit build/tools/post_process_props.py. Change lines as follows:

PROP_NAME_MAX = 31
# PROP_VALUE_MAX = 91
PROP_VALUE_MAX = 128

Edit bionic/libc/include/sys/system_properties.h. Change lines as follows:

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

Do

make clean
make

You can also run the second make command in parallel using syntax such as

make -j8
2
  • Hi and thank you. Can PROP_NAME_MAX etc, be set in boardconfig.mk ?
    – moonbutt74
    Feb 25, 2016 at 0:34
  • As mentioned @Matt, it leads to error in frameworks/native/cmds/installd/installd.cpp. To fix it you need also change value of kPropertyValueMax in frameworks/native/cmds/installd/installd_deps.h.
    – Gluttton
    Nov 20, 2017 at 15:14
11

Alternatively, you can specify the build fingerprint string as command line argument to make using:

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

This will allow you to stay within the 91 byte limit.

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.