From 73f591dd826b0abb10732152ccb608123e0d9cb5 Mon Sep 17 00:00:00 2001 From: Bruno Martins Date: Sun, 1 Apr 2018 10:56:30 +0100 Subject: [PATCH] msm8974-common: libinit: Handle overriding system and vendor props * Up until now, vendor build properties were added into /system/build.prop when property split isn't enabled. However, Google realised that either /vendor/build.prop or /system/vendor/build.prop can always exist, and decided to clean up code and always install vendor build props into $(TARGET_OUT_VENDOR)/build.prop. * For this reason, the unified devices that used to override build props such as build fingerprint, will need to override the matching vendor build props. Change-Id: Iacdd8eb67543daff5a46b92dbaf17cd094ce462b --- init/init_msm8974.cpp | 9 ++++++++- init/init_msm8974.h | 3 +++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/init/init_msm8974.cpp b/init/init_msm8974.cpp index 7ce2fb2..374e980 100644 --- a/init/init_msm8974.cpp +++ b/init/init_msm8974.cpp @@ -1,6 +1,6 @@ /* Copyright (c) 2016, The CyanogenMod Project. All rights reserved. - Copyright (c) 2017, The LineageOS Project. All rights reserved. + Copyright (c) 2017-2018, The LineageOS Project. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -63,6 +63,13 @@ void property_override(char const prop[], char const value[]) __system_property_add(prop, strlen(prop), value, strlen(value)); } +void property_override_dual(char const system_prop[], + char const vendor_prop[], char const value[]) +{ + property_override(system_prop, value); + property_override(vendor_prop, value); +} + static int read_file2(const char *fname, char *data, int max_size) { int fd, rc; diff --git a/init/init_msm8974.h b/init/init_msm8974.h index 2c11511..b33e3cb 100644 --- a/init/init_msm8974.h +++ b/init/init_msm8974.h @@ -1,5 +1,6 @@ /* Copyright (c) 2016, The CyanogenMod Project + Copyright (c) 2018, The LineageOS Project Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -32,5 +33,7 @@ void init_target_properties(); void property_override(char const prop[], char const value[]); +void property_override_dual(char const system_prop[], + char const vendor_prop[], char const value[]); #endif /* __INIT_MSM8974__H__ */