-
Notifications
You must be signed in to change notification settings - Fork 75
Upstreaming with AOSP
This page documents instructions required to upstream 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 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.
Other than public APIs, Seedvault also uses specific private or system-only APIs that are required to work correctly. Unfortunately, these APIs are unavailable in the 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 app and contactsbackup module hosts these .jar
file which should be updated with the new Android release.
libs | 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.