diff --git a/README.md b/README.md index 5f6a4da6..fdddbc9b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# AOSP GSI +# TrebleDroid AOSP GSI ## Build To get started with building AOSP GSI, you'll need to get familiar with [Git and Repo](https://source.android.com/source/using-repo.html) as well as [How to build a GSI](https://github.com/phhusson/treble_experimentations/wiki/How-to-build-a-GSI%3F). diff --git a/build.sh b/build.sh index 58e7f261..b1afd2c3 100644 --- a/build.sh +++ b/build.sh @@ -83,12 +83,16 @@ buildGappsVariant() { echo } -buildVndkliteVariant() { +buildVndkliteVariants() { echo "--> Building treble_arm64_bvN-vndklite" cd sas-creator sudo bash lite-adapter.sh 64 $BD/system-treble_arm64_bvN.img - cp s.img $BD/system-treble_arm64_bvN-vndklite.img - sudo rm -rf s.img d tmp + mv s.img $BD/system-treble_arm64_bvN-vndklite.img + sudo rm -rf d tmp + echo "--> Building treble_arm64_bgN-vndklite" + sudo bash lite-adapter.sh 64 $BD/system-treble_arm64_bgN.img + mv s.img $BD/system-treble_arm64_bgN-vndklite.img + sudo rm -rf d tmp cd .. echo } @@ -97,8 +101,9 @@ generatePackages() { echo "--> Generating packages" buildDate="$(date +%Y%m%d)" xz -cv $BD/system-treble_arm64_bvN.img -T0 > $BD/aosp-arm64-ab-vanilla-14.0-$buildDate.img.xz - xz -cv $BD/system-treble_arm64_bvN-vndklite.img -T0 > $BD/aosp-arm64-ab-vndklite-14.0-$buildDate.img.xz + xz -cv $BD/system-treble_arm64_bvN-vndklite.img -T0 > $BD/aosp-arm64-ab-vanilla-vndklite-14.0-$buildDate.img.xz xz -cv $BD/system-treble_arm64_bgN.img -T0 > $BD/aosp-arm64-ab-gapps-14.0-$buildDate.img.xz + xz -cv $BD/system-treble_arm64_bgN-vndklite.img -T0 > $BD/aosp-arm64-ab-gapps-vndklite-14.0-$buildDate.img.xz rm -rf $BD/system-*.img echo } @@ -106,15 +111,18 @@ generatePackages() { generateOta() { echo "--> Generating OTA file" version="$(date +v%Y.%m.%d)" + buildDate="$(date +%Y%m%d)" timestamp="$START" json="{\"version\": \"$version\",\"date\": \"$timestamp\",\"variants\": [" - find $BD/ -name "aosp-*" | sort | { + find $BD/ -name "aosp-*-14.0-$buildDate.img.xz" | sort | { while read file; do filename="$(basename $file)" - if [[ $filename == *"vanilla"* ]]; then - name="treble_arm64_bvN" - elif [[ $filename == *"vndklite"* ]]; then + if [[ $filename == *"vanilla-vndklite"* ]]; then name="treble_arm64_bvN-vndklite" + elif [[ $filename == *"gapps-vndklite"* ]]; then + name="treble_arm64_bgN-vndklite" + elif [[ $filename == *"vanilla"* ]]; then + name="treble_arm64_bvN" else name="treble_arm64_bgN" fi @@ -137,7 +145,7 @@ setupEnv buildTrebleApp buildVanillaVariant buildGappsVariant -buildVndkliteVariant +buildVndkliteVariants generatePackages generateOta