Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f3d3eb63 authored by Guillaume Jacquart's avatar Guillaume Jacquart
Browse files

Add demo app in module.

parent f90c9655
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -21,6 +21,11 @@ TL;DR
* Then we will merge .classes of platform.jar/android into android.jar (using dex2jar at some point)
* Replace the new builded android.jar in <SDK-dir>/platforms/android-X/

# Build

    ./gradlew :privacymodulese:assembleRelease
    ./gradlew --console=verbose publishToMavenLocal


# Structure (UML class diagrams)

+1 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ buildscript {
    }
    dependencies {
        classpath "com.android.tools.build:gradle:4.0.1"
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.20"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
+1 −0
Original line number Diff line number Diff line
/build
 No newline at end of file
+2.83 KiB

File added.

No diff preview for this file type.

+32 −0
Original line number Diff line number Diff line
### To run apk on /e/OS devices

./gradlew :eprivacymoduledemo:assembleDebug


PrivacyCentral needs to be installed as system app and whitelisting in order to grant some system specific permissions. Follow these steps to make it work properly on /e/OS

1. From `Developer options`, enable `Android debugging` and `Rooted debugging`
1. Sign the apk with platform certificate. You can use this command to do that

    ```shell
    apksigner sign --key platform.pk8 --cert platform.x509.pem EPrivacyModuleDemo.apk app-e-release-unsigned.apk
    ```

   If you are running your tests on an `/test` build, you can find keys at https://gitlab.e.foundation/e/os/android_build/-/tree/v1-q/target/product/security
1. Install apk as system app and push permissions whitelist with following commands:
    ```shell
    adb root && adb remount
    adb shell mkdir system/priv-app/EPrivacyModuleDemo
    adb push EPrivacyModuleDemo.apk system/priv-app/EPrivacyModuleDemo
    ```

1. Push permissions whitelist.
    - it requires the whitelisting [privapp-permissions-foundation.e.privacycentralapp.xml](privapp-permissions-foundation.e.eprivacymoduledemo.xml) file that can be found in the project repository.
    - then use the following command
        ```bash
        adb push privapp-permissions-foundation.e.eprivacymoduledemo.xml /system/etc/permissions/
        ```
1. Reboot the device
    ```shell
    adb reboot
    ```
 No newline at end of file
Loading