While compiling Dirty Unicorns 6.0.1 for the Samsung Galaxy S4 T-Mobile variant (JFLTETMO SGH-M919) I ran into an interesting error, as you can see below.
target StaticLib: libhealthd.qcom (/home/alaskalinuxuser/Documents/projects/phones/compile/dirtyunicorns_m-caf/out/target/product/jfltetmo/obj/STATIC_LIBRARIES/libhealthd.qcom_intermediates/libhealthd.qcom.a)
Target buildinfo: /home/alaskalinuxuser/Documents/projects/phones/compile/dirtyunicorns_m-caf/out/target/product/jfltetmo/root/default.prop
host Executable: checkseapp (/home/alaskalinuxuser/Documents/projects/phones/compile/dirtyunicorns_m-caf/out/host/linux-x86/obj/EXECUTABLES/checkseapp_intermediates/checkseapp)
error: ro.bootimage.build.fingerprint cannot exceed 91 bytes: samsung/du_jfltetmo/jfltetmo:6.0.1/MOB30J/eng.alaskalinuxuser.20160603.060623:userdebug/test-keys (97)
make: *** [/home/alaskalinuxuser/Documents/projects/phones/compile/dirtyunicorns_m-caf/out/target/product/jfltetmo/root/default.prop] Error 1
make: *** Deleting file `/home/alaskalinuxuser/Documents/projects/phones/compile/dirtyunicorns_m-caf/out/target/product/jfltetmo/root/default.prop’
make: *** Waiting for unfinished jobs….
So I edited /home/alaskalinuxuser/Documents/projects/phones/compile/dirtyunicorns_m-caf/build/tools/post_process_props.py like this:
# See PROP_NAME_MAX and PROP_VALUE_MAX system_properties.h.
# The constants in system_properties.h includes the termination NUL,
# so we decrease the values by 1 here.
PROP_NAME_MAX = 31
# WJH PROP_VALUE_MAX = 91
PROP_VALUE_MAX = 99
While editing this, it also pointed out that I needed to edit system_properties, which is in the bionic/libc/include/sys/ folder, so I did this:
#define PROP_NAME_MAX 32
// WJH #define PROP_VALUE_MAX 92
#define PROP_VALUE_MAX 100
I only needed 97 characters, but I set it for 100 in the system_properties, in case something was longer then that. I then set the post_process_props.py one lower, as the notes above it said. Then I ran the brunch command again. Now, I hope that none of you are thinking, “Man, this guy is smart!” Because, well, I’m not that bright, and I want to give the credit where it is due. So I ran the error through Google a couple of times, and finaly found this:
And if I had a stackoverflow account, I would slap the upvote button, because that was really helpful.
Linux – Keep it simple.