Move /default.prop to /system/etc/prop.default
This patch tries to fix the problem where the default properties need to go with the system image especially on non-AB devices where /default.prop is on the ramdisk image. A symlink is created at /default.prop for backward compatibility. Bug: 37815285 Test: Tested with ag/2416542. Booted pixel phones, checked the location of prop.default, verified the symlink, checked a few properties (via adb shell getprop) and manually tested a few apps (Camera, Maps etc). sign_target_files_apks.py was tested with: sign_target_files_apks -o -e DynamiteLoader.apk= -e DynamiteModulesA.apk= \ -e DynamiteModulesB.apk= -e DynamiteModulesC.apk= -e DynamiteModulesD.apk= \ -e GoogleCertificates.apk= out/dist/*-target_files-*.zip signed-target_files.zip Booted to recovery and ran 'adb sideload' successfully. Change-Id: I1a9a2ba49c8252afc13ced3dea71253afbd3091e
This commit is contained in:
@@ -212,11 +212,17 @@ def ProcessTargetFiles(input_tf_zip, output_tf_zip, misc_info,
|
||||
# System properties.
|
||||
elif info.filename in ("SYSTEM/build.prop",
|
||||
"VENDOR/build.prop",
|
||||
"BOOT/RAMDISK/default.prop",
|
||||
"ROOT/default.prop",
|
||||
"RECOVERY/RAMDISK/default.prop"):
|
||||
"SYSTEM/etc/prop.default",
|
||||
"BOOT/RAMDISK/prop.default",
|
||||
"BOOT/RAMDISK/default.prop", # legacy
|
||||
"ROOT/default.prop", # legacy
|
||||
"RECOVERY/RAMDISK/prop.default",
|
||||
"RECOVERY/RAMDISK/default.prop"): # legacy
|
||||
print "rewriting %s:" % (info.filename,)
|
||||
new_data = RewriteProps(data, misc_info)
|
||||
if stat.S_ISLNK(info.external_attr >> 16):
|
||||
new_data = data
|
||||
else:
|
||||
new_data = RewriteProps(data, misc_info)
|
||||
common.ZipWriteStr(output_tf_zip, out_info, new_data)
|
||||
|
||||
elif info.filename.endswith("mac_permissions.xml"):
|
||||
|
Reference in New Issue
Block a user