Install contactsbackup before restart, so default permissions get applied
Also add testkey for signed builds
This commit is contained in:
parent
910c68aa52
commit
9e5f22a8a0
3 changed files with 18 additions and 20 deletions
|
@ -31,7 +31,7 @@ instrumentation_tests_task:
|
|||
adb remount;
|
||||
sleep 5;
|
||||
assemble_script:
|
||||
./gradlew :app:assembleRelease :app:assembleAndroidTest
|
||||
./gradlew :app:assembleRelease :contacts:assembleRelease assembleAndroidTest
|
||||
install_app_script:
|
||||
timeout 180s bash -c 'while [[ -z $(adb shell mount | grep "/system " | grep "(rw,") ]]; do sleep 1; done;';
|
||||
adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;';
|
||||
|
@ -44,7 +44,11 @@ instrumentation_tests_task:
|
|||
adb push app/build/outputs/apk/release/app-release.apk /system/priv-app/Seedvault/Seedvault.apk;
|
||||
adb push permissions_com.stevesoltys.seedvault.xml /system/etc/permissions/privapp-permissions-seedvault.xml;
|
||||
adb push allowlist_com.stevesoltys.seedvault.xml /system/etc/sysconfig/allowlist-seedvault.xml;
|
||||
|
||||
adb shell mkdir -p /system/priv-app/ContactsBackup;
|
||||
adb push contactsbackup/build/outputs/apk/release/contactsbackup-release.apk /system/priv-app/ContactsBackup/contactsbackup.apk;
|
||||
adb push contactsbackup/default-permissions_org.calyxos.backup.contacts.xml /system/etc/default-permissions/default-permissions_org.calyxos.backup.contacts.xml;
|
||||
|
||||
adb shell bmgr enable true;
|
||||
adb reboot;
|
||||
adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;';
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
* SPDX-FileCopyrightText: 2020 The Calyx Institute
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
import java.io.FileInputStream
|
||||
import java.util.Properties
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.android.application)
|
||||
|
@ -42,23 +40,18 @@ android {
|
|||
isReturnDefaultValues = true
|
||||
}
|
||||
|
||||
// optional signingConfigs
|
||||
// On userdebug builds, you can use the testkey here to update the system app
|
||||
val keystorePropertiesFile = project.file("keystore.properties")
|
||||
if (keystorePropertiesFile.exists()) {
|
||||
val keystoreProperties = Properties()
|
||||
keystoreProperties.load(FileInputStream(keystorePropertiesFile))
|
||||
|
||||
signingConfigs {
|
||||
create("release") {
|
||||
keyAlias = keystoreProperties["keyAlias"] as String
|
||||
keyPassword = keystoreProperties["keyPassword"] as String
|
||||
storeFile = file(keystoreProperties["storeFile"] as String)
|
||||
storePassword = keystoreProperties["storePassword"] as String
|
||||
create("aosp") {
|
||||
keyAlias = "android"
|
||||
keyPassword = "android"
|
||||
storePassword = "android"
|
||||
storeFile = file("testkey.jks")
|
||||
}
|
||||
}
|
||||
buildTypes.getByName("release").signingConfig = signingConfigs.getByName("release")
|
||||
buildTypes.getByName("debug").signingConfig = signingConfigs.getByName("release")
|
||||
|
||||
buildTypes {
|
||||
getByName("release").signingConfig = signingConfigs.getByName("aosp")
|
||||
getByName("debug").signingConfig = signingConfigs.getByName("aosp")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -74,6 +67,7 @@ dependencies {
|
|||
androidTestImplementation(libs.kotlin.stdlib.jdk8)
|
||||
androidTestImplementation("androidx.test.ext:junit:1.1.5")
|
||||
androidTestImplementation(
|
||||
"androidx.test.espresso:espresso-core:${libs.versions.espresso.get()}")
|
||||
"androidx.test.espresso:espresso-core:${libs.versions.espresso.get()}"
|
||||
)
|
||||
androidTestImplementation("io.mockk:mockk-android:${libs.versions.mockk.get()}")
|
||||
}
|
||||
|
|
BIN
contactsbackup/testkey.jks
Normal file
BIN
contactsbackup/testkey.jks
Normal file
Binary file not shown.
Loading…
Reference in a new issue