Skip to content

Building with AOSP

Steve Soltys edited this page Oct 15, 2023 · 16 revisions

Requirements

Building

Building AOSP with this application will be similar to a standard build, except you will use a local manifest to synchronize the source tree, rather than the official one.

  1. Clone the official AOSP manifest:
# git clone https://android.googlesource.com/platform/manifest.git
  1. Check out the tag or branch that you are interested in using:
# cd platform_manifest
# git checkout master
# vim default.xml
  1. Add a remote entry for my Github account, or fork the prebuilt repository and use your own:
<remote name="stevesoltys-github"
    fetch="https://github.com/stevesoltys/"
    revision="refs/heads/master" />
  1. Add a new project entry for the backup application:
<project path="packages/apps/Seedvault" name="seedvault-prebuilt" remote="stevesoltys-github" />
  1. Commit the changes:
# git add default.xml
# git commit -m "Add backup application"
# cd ..
  1. Create the AOSP directory and synchronize the source tree using the local manifest:
# mkdir aosp
# mv platform_manifest aosp
# cd aosp
# repo init -u platform_manifest -b master
# repo sync -j32
  1. Once the source tree is finished synchronizing, add the Seedvault entry to PRODUCT_PACKAGES:
# vim build/target/product/core.mk
...
PRODUCT_PACKAGES += \
    Seedvault \
    BasicDreams \
...
  1. Add or replace the transport in frameworks/base/packages/SettingsProvider/res/values/default.xml:
<bool name="def_backup_enabled">true</bool>
<string name="def_backup_transport" translatable="false">com.stevesoltys.seedvault.transport.ConfigurableBackupTransport</string>
  1. Bump the settings version and set the backup transport programmatically, as done here: https://gitlab.com/calyxos/platform_frameworks_base/commit/9738a0c752dd75b1c6146882e2ca53a2232e7148

    Make sure the settings currentVersion variable is incremented correctly for your personal source tree - don't blindly copy the above.

  2. Continue the build as per usual, starting from Preparing to Build.

Notes

If you'd like, you can ignore steps 8 and 9, but after installation you will need to manually set the transport through ADB on each device that you install the AOSP build on:

# adb shell bmgr enable true
# adb shell bmgr transport com.stevesoltys.seedvault.transport.ConfigurableBackupTransport