-
Notifications
You must be signed in to change notification settings - Fork 75
Updating SeedVault for new Android versions
This page documents instructions required to update SeedVault to support a new Android release. Certain caveats are also mentioned, which a developer might encounter hampering the development.
SeedVault aims to support building via both AOSP and Gradle / Android Studio build systems for maximum compatibility with OS based on AOSP and ease of development via Android Studio. However, due to AOSP often using older libraries, there is a high chance of mismatch between both build systems resulting in unidentifiable bugs only affecting a specific build system. To mitigate this issue, SeedVault syncs the same dependencies version used by the AOSP.
All significant dependencies that should be kept in sync between AOSP and Gradle can be found in the dependencies.gradle file. In addition, all dependencies have a comment directing to the dependency's origin in AOSP, where they can be found for the specific release. To upstream these dependencies, navigate to the same file path for the new Android release, upgrade the version, and comment as required.
Ensure that the version used in AOSP is also available for Gradle and supports the new Android release. Quite often, AOSP can be using a release that was not publicly released. In such cases, prefer using an older version available for Gradle.
Some dependencies are unavailable in AOSP and thus requires importing their respective release in Seedvault locally. At the time of writing this documentation, the libs that should be updated with a new Android release are:
Tests in SeedVault are only supported in the Gradle build system, allowing much greater flexibility to upstream and use the required dependencies. All modules have required unit and instrumentation tests covering most of the code. Locate and upgrade these dependencies in the individual module's build.gradle
file.
Some test dependencies such as
robolectric
might be behind on supporting the latest Android release or might cause tests to fail. Ensure all tests are still passing after upgrading these dependencies.
Other than public APIs, SeedVault also uses private or system-only APIs as needed. Unfortunately, these APIs are unavailable in the public SDK and must be generated manually from AOSP. To do this, sync the new Android release tag (AOSP) and create a build (user preferred) that would pack all the classes into specific .jar
files.
At the time of writing this documentation, the .jar
files that should be updated with a new Android release are:
JAR | AOSP |
---|---|
app/libs/android.jar | out/target/common/obj/JAVA_LIBRARIES/framework-minus-apex_intermediates/classes.jar |
app/libs/libcore.jar | out/target/common/obj/JAVA_LIBRARIES/core-libart.com.android.art_intermediates/classes.jar |
contactsbackup/libs/com.android.vcard.jar | out/target/common/obj/JAVA_LIBRARIES/com.android.vcard_intermediates/classes.jar |
The path mentioned in AOSP is for
user
builds and may be different in the case of other build types.