commit | b7fbbf6caf9e215237d5d6d5d622ada43f195f0d | [log] [tgz] |
---|---|---|
author | Luca Weiss <luca.weiss@fairphone.com> | Fri Nov 12 08:45:20 2021 +0100 |
committer | Luca Weiss <luca.weiss@fairphone.com> | Fri Nov 12 08:45:22 2021 +0100 |
tree | e9a268738404ea72ab72dd31ac5cd836120aff97 | |
parent | 1cd595e9aabe43d65bf2dd3784e820569d20bd72 [diff] |
Send camera changed intent explicitly to Camera2 app Due to implicit broadcast restrictions starting in Android Oreo the camera app doesn't receive the broadcast in its current setup. By setting the component name to the camera app we can get around these restrictions. An alternative solution would be to register the BroadcastReceiver in Camera2 during runtime, so the implicit broadcast restrictions wouldn't affect us. This is the solution used in CameraSwapInfo. Issue: FP2A10-90 Change-Id: Idf528d69a7472e60ae3d5ab47a36aca39d5e1442
ModuleDetect can be built using Android Studio or directly with Gradle.
In order to build in Android Studio, import the root of the Git repository as a new project and use the features of the IDE to edit, build, run, and debug ModuleDetect.
To build from commandline you will need the Android SDK and Gradle. Follow the instructions in Android documentation.
By default both debug and release build variants are signed using default keys included in the Android SDK. To sign the app for release, you need
The release key can be put in a keystore using a script in vendor/fairphone/tools/
.
Point the build system to the keystore using a configuration file which includes the path to the keystore, the alias of the key, and passwords for keystore and key. The file keystore.properties
needs to be at the root of the Git repository and contain information like:
storePassword=<pwd-of-keystore> keyPassword=<pwd-of-key-in-keystore> keyAlias=ModuleDetectReleaseKey storeFile=../relative/path/to/moduledetect.keystore
You can verify that Gradle can find and open the key by checking the output of gradlew signingReport
. The sections for release
and releaseUnitTest
variants should look similar to:
Variant: release Config: release Store: /absolute/path/to/moduledetect.keystore Alias: ModuleDetectReleaseKey MD5: 7D:F2:FC:AA:FD:75:F3:83:5C:ED:AE:63:B7:F2:AD:AB SHA1: 30:63:51:FB:98:33:47:1A:26:00:2D:58:C7:F1:1D:76:DE:F0:34:8E Valid until: Monday, November 24, 2042
If configuration is correct, gradlew assembleRelease
can be used to create the signed app at ./app/build/outputs/apk/release/app-release.apk
.