diff options
author | Brint E. Kriebel <bekit@cyngn.com> | 2016-02-04 13:48:13 -0800 |
---|---|---|
committer | Brint E. Kriebel <bekit@cyngn.com> | 2016-02-04 16:29:10 -0800 |
commit | d063c0fb4e0c9d06eaff35d2bdfa1678b30c3c35 (patch) | |
tree | 6fc4804bf6c621b5e59f8729bda4d6cbf15ceca9 /tools/releasetools | |
parent | 470b95c076ba54a1f0aa4def685bc28f6ca1e1d1 (diff) | |
download | build-d063c0fb4e0c9d06eaff35d2bdfa1678b30c3c35.zip build-d063c0fb4e0c9d06eaff35d2bdfa1678b30c3c35.tar.gz build-d063c0fb4e0c9d06eaff35d2bdfa1678b30c3c35.tar.bz2 |
releasetools: Replace key values in permission files during re-signing
Permission files may grant permissions based on signatures in the same
way mac_permissions grants selinux permissions. In order to have this
work properly with dev-key and production key signed builds, allow these
files to be re-written during the signing process to replace the value
of the keys in production signed builds.
Change-Id: Id0311e49f8bba5a9f71b2fa49b480cb74779c853
Ticket: CYNGNOS-1877, RM-179
Diffstat (limited to 'tools/releasetools')
-rwxr-xr-x | tools/releasetools/sign_target_files_apks.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/releasetools/sign_target_files_apks.py b/tools/releasetools/sign_target_files_apks.py index a95af16..632c36f 100755 --- a/tools/releasetools/sign_target_files_apks.py +++ b/tools/releasetools/sign_target_files_apks.py @@ -221,6 +221,10 @@ def ProcessTargetFiles(input_tf_zip, output_tf_zip, misc_info, print("rewriting %s with new keys." % info.filename) new_data = ReplaceCerts(data) common.ZipWriteStr(output_tf_zip, out_info, new_data) + elif info.filename.startswith("SYSTEM/etc/permissions/"): + print("rewriting %s with new keys." % info.filename) + new_data = ReplaceCerts(data) + common.ZipWriteStr(output_tf_zip, out_info, new_data) elif info.filename in ("SYSTEM/recovery-from-boot.p", "SYSTEM/bin/install-recovery.sh"): rebuild_recovery = True |