From 533f3f9147f5deda89103cab8afa5172d07750f9 Mon Sep 17 00:00:00 2001 From: Amit Kumar Date: Wed, 12 May 2021 17:47:21 +0530 Subject: Add script to build, sign and install apk as system app --- .idea/runConfigurations.xml | 10 ---------- .idea/runConfigurations/Build_system_app.xml | 13 +++++++++++++ scripts/sign_and_push.sh | 18 ++++++++++++++++++ 3 files changed, 31 insertions(+), 10 deletions(-) delete mode 100644 .idea/runConfigurations.xml create mode 100644 .idea/runConfigurations/Build_system_app.xml create mode 100755 scripts/sign_and_push.sh diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml deleted file mode 100644 index 797acea..0000000 --- a/.idea/runConfigurations.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/runConfigurations/Build_system_app.xml b/.idea/runConfigurations/Build_system_app.xml new file mode 100644 index 0000000..755d57a --- /dev/null +++ b/.idea/runConfigurations/Build_system_app.xml @@ -0,0 +1,13 @@ + + + + \ No newline at end of file diff --git a/scripts/sign_and_push.sh b/scripts/sign_and_push.sh new file mode 100755 index 0000000..240f96a --- /dev/null +++ b/scripts/sign_and_push.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +## This script is used for signing the apk with the platform keys and pushing it into System partition. +## Used for testing purposes. + +./gradlew assembleDebug +rm PrivacyCentral.apk +wait ${!} +apksigner sign --key lineage_keys/platform.pk8 --cert lineage_keys/target_product_security_platform.x509.pem --out PrivacyCentral.apk app/build/outputs/apk/e/debug/app-e-debug.apk +wait ${!} +adb root +wait ${!} +adb devices +wait ${!} +adb install -r PrivacyCentral.apk +wait ${!} +adb remount && adb push privapp-permissions-foundation.e.privacycentralapp.xml system/etc/permissions +wait ${!} \ No newline at end of file -- cgit v1.2.1