forked from phhusson/treble_experimentations
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
45 lines (34 loc) · 1.21 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
rom_fp="$(date +%y%m%d)"
mkdir -p release/$rom_fp/
set -e
aosp="android-vts-8.0_r4"
phh="master"
if [ "$1" == "8.1" ] ;then
aosp="android-8.1.0_r15"
phh="android-8.1"
fi
repo init -u https://android.googlesource.com/platform/manifest -b $aosp
if [ -d .repo/local_manifests ] ;then
( cd .repo/local_manifests; git fetch; git reset --hard; git checkout origin/$phh)
else
git clone https://github.com/phhusson/treble_manifest .repo/local_manifests -b $phh
fi
repo sync -c -j 1 --force-sync
(cd device/phh/treble; git clean -fdx; bash generate.sh)
. build/envsetup.sh
buildVariant() {
lunch $1
make BUILD_NUMBER=$rom_fp installclean
make BUILD_NUMBER=$rom_fp -j8 systemimage
make BUILD_NUMBER=$rom_fp vndk-test-sepolicy
cp $OUT/system.img release/$rom_fp/system-${2}.img
}
repo manifest -r > release/$rom_fp/manifest.xml
bash $(dirname "$0")/list-patches.sh
cp patches.zip release/$rom_fp/patches.zip
buildVariant treble_arm64_avN-userdebug arm64-aonly-vanilla-nosu
buildVariant treble_arm64_agS-userdebug arm64-aonly-gapps-su
buildVariant treble_arm64_bvN-userdebug arm64-ab-vanilla-nosu
buildVariant treble_arm64_bgS-userdebug arm64-ab-gapps-su
buildVariant treble_arm_avN-userdebug arm-aonly-vanilla-nosu