11#! /bin/bash
22echo " "
3- echo " LineageOS 18.x Treble Buildbot"
3+ echo " Pixel Experience 11 Treble Buildbot"
44echo " ATTENTION: this script syncs repo on each run"
55echo " Executing in 5 seconds - CTRL-C to exit"
66echo " "
77sleep 5
88
99START=` date +%s`
1010BUILD_DATE=" $( date +%Y%m%d) "
11- BL=$PWD /treble_build_los
11+ BL=$PWD /treble_build_pe
1212
1313echo " Preparing local manifest"
1414mkdir -p .repo/local_manifests
15- cp $BL /manifest.xml .repo/local_manifests/manifest .xml
15+ cp $BL /manifest.xml .repo/local_manifests/pixel .xml
1616echo " "
1717
1818echo " Syncing repos"
@@ -23,22 +23,21 @@ echo "Setting up build environment"
2323source build/envsetup.sh & > /dev/null
2424echo " "
2525
26- repopick 289372 # Messaging: Add "Mark as read" quick action for message notifications
27-
2826echo " Reverting LOS FOD implementation"
2927cd frameworks/base
3028git am $BL /patches/0001-Squashed-revert-of-LOS-FOD-implementation.patch
3129cd ../..
3230cd frameworks/native
33- git revert 381416d540ea92dca5f64cd48fd8c9dc887cac7b --no-edit # surfaceflinger: Add support for extension lib
31+ git revert 542069c3aa6d003887b4abba3c0f494e8271085f --no-edit # surfaceflinger: Add support for extension lib
3432cd ../..
3533echo " "
3634
3735echo " Applying PHH patches"
3836rm -f device/* /sepolicy/common/private/genfs_contexts
3937cd device/phh/treble
4038git clean -fdx
41- bash generate.sh lineage
39+ cp $BL /pe.mk .
40+ bash generate.sh pe
4241cd ../../..
4342bash ~ /treble_experimentations/apply-patches.sh treble_patches
4443echo " "
@@ -48,84 +47,102 @@ cd build/make
4847git am $BL /patches/0001-Make-broken-copy-headers-the-default.patch
4948cd ../..
5049cd frameworks/base
51- git am $BL /patches/0001-UI-Revive-navbar-layout-tuning-via-sysui_nav_bar-tun.patch
5250git am $BL /patches/0001-UI-Disable-wallpaper-zoom.patch
5351git am $BL /patches/0001-Disable-vendor-mismatch-warning.patch
5452cd ../..
55- cd lineage-sdk
56- git am $BL /patches/0001-sdk-Invert-per-app-stretch-to-fullscreen.patch
57- cd ..
58- cd packages/apps/LineageParts
59- git am $BL /patches/0001-LineageParts-Invert-per-app-stretch-to-fullscreen.patch
60- cd ../../..
61- cd packages/apps/Trebuchet
62- git am $BL /patches/0001-Trebuchet-Move-clear-all-button-to-actions-view.patch
63- cd ../../..
64- cd vendor/lineage
53+ cd vendor/aosp
6554git am $BL /patches/0001-vendor_lineage-Log-privapp-permissions-whitelist-vio.patch
6655cd ../..
6756echo " "
6857
6958echo " Applying GSI-specific patches"
7059cd bootable/recovery
71- git revert 0e369f42b82c4d12edba9a46dd20bee0d4b783ec --no-edit # recovery: Allow custom bootloader msg offset in block misc
72- cd ../..
73- cd build/make
74- git am $BL /patches/0001-build-Don-t-handle-apns-conf.patch
75- git revert 78c28df40f72fdcbe3f82a83828060ad19765fa1 --no-edit # mainline_system: Exclude vendor.lineage.power@1.0 from artifact path requirements
60+ git revert c9a3611b0bab1744b3c4321e728c917fcdc2abc3 --no-edit # recovery: Allow custom bootloader msg offset in block misc
7661cd ../..
7762cd device/phh/treble
7863git revert 82b15278bad816632dcaeaed623b569978e9840d --no-edit # Update lineage.mk for LineageOS 16.0
7964git am $BL /patches/0001-Remove-fsck-SELinux-labels.patch
80- git am $BL /patches/0001-treble-Add-overlay-lineage.patch
81- git am $BL /patches/0001-treble-Don-t-specify-config_wallpaperCropperPackage.patch
65+ git am $BL /patches/0001-base-provide-libnfc-nci.patch
66+ git am $BL /patches/0001-base-remove-securize-script.patch
67+ git am $BL /patches/0001-board-add-broken-duplicate-rules-flag.patch
8268cd ../../..
8369cd frameworks/av
84- git revert 5a5606dbd92f01de322c797a7128fce69902d067 --no-edit # camera: Allow devices to load custom CameraParameter code
70+ git revert 72fb8d96c85fd45e85516b4023cd5116b5d5a8eb --no-edit # camera: Allow devices to load custom CameraParameter code
8571cd ../..
8672cd frameworks/native
8773git revert 581c22f979af05e48ad4843cdfa9605186d286da --no-edit # Add suspend_resume trace events to the atrace 'freq' category.
8874cd ../..
8975cd packages/apps/Bluetooth
90- git revert 4ceb47e32c1be30640e40f81b6f741942f8598ed --no-edit # Bluetooth: Reset packages/apps/Bluetooth to upstream
76+ git revert bba4192627ca9987c0128f9774d79ffb17ece2f5 --no-edit # Bluetooth: Reset packages/apps/Bluetooth to upstream
9177cd ../../..
9278cd system/core
9379git am $BL /patches/0001-Revert-init-Add-vendor-specific-initialization-hooks.patch
9480git am $BL /patches/0001-Panic-into-recovery-rather-than-bootloader.patch
95- git am $BL /patches/0001-Restore-sbin.patch
9681git am $BL /patches/0001-fix-offline-charger-v7.patch
9782cd ../..
9883cd system/hardware/interfaces
99- git revert cb732f9b635b5f6f79e447ddaf743ebb800b8535 --no-edit # system_suspend: start early
84+ git am $BL /patches/0001-Revert- system_suspend- start- early.patch
10085cd ../../..
10186cd system/sepolicy
10287git am $BL /patches/0001-Revert-sepolicy-Relabel-wifi.-properties-as-wifi_pro.patch
10388cd ../..
104- cd vendor/lineage
89+ cd vendor/aosp
10590git am $BL /patches/0001-build_soong-Disable-generated_kernel_headers.patch
91+ git am $BL /patches/0001-build-fix-build-number.patch
10692cd ../..
10793echo " "
10894
95+ echo " Applying GSI-specific fixes"
96+ mkdir -p device/generic/common/nfc
97+ curl " https://android.googlesource.com/device/generic/common/+/refs/tags/android-11.0.0_r35/nfc/libnfc-nci.conf?format=TEXT" | base64 --decode > device/generic/common/nfc/libnfc-nci.conf
98+ mkdir -p device/sample/etc
99+ cp vendor/aosp/prebuilt/common/etc/apns-conf.xml device/sample/etc/apns-full-conf.xml
100+ echo " "
101+
109102echo " CHECK PATCH STATUS NOW!"
110103sleep 5
111104echo " "
112105
113106export WITHOUT_CHECK_API=true
114- export WITH_SU=true
115- mkdir -p ~ /build-output/
107+ mkdir -p ~ /builds
116108
117109buildVariant () {
118110 lunch ${1} -userdebug
119111 make installclean
120112 make -j$( nproc --all) systemimage
121113 make vndk-test-sepolicy
122- mv $OUT /system.img ~ /build-output/lineage-18.1-$BUILD_DATE -UNOFFICIAL-${1} .img
114+ buildSasImage $1
115+ }
116+
117+ buildSasImage () {
118+ cd sas-creator
119+ case $1 in
120+ " treble_a64_bvN" )
121+ bash lite-adapter.sh 32 $OUT /system.img
122+ xz -c s.img -T0 > ~ /builds/PixelExperience_arm32_binder64-ab-vndklite-11.0-$BUILD_DATE -UNOFFICIAL.img.xz
123+ xz -c $OUT /system.img -T0 > ~ /builds/PixelExperience_arm32_binder64-ab-11.0-$BUILD_DATE -UNOFFICIAL.img.xz
124+ ;;
125+ " treble_arm_bvN" )
126+ bash run.sh 32 $OUT /system.img
127+ xz -c s.img -T0 > ~ /builds/PixelExperience_arm-aonly-11.0-$BUILD_DATE -UNOFFICIAL.img.xz
128+ xz -c $OUT /system.img -T0 > ~ /builds/PixelExperience_arm-ab-11.0-$BUILD_DATE -UNOFFICIAL.img.xz
129+ ;;
130+ " treble_arm64_bvN" )
131+ bash run.sh 64 $OUT /system.img
132+ xz -c s.img -T0 > ~ /builds/PixelExperience_arm64-aonly-11.0-$BUILD_DATE -UNOFFICIAL.img.xz
133+ bash lite-adapter.sh 64 $OUT /system.img
134+ xz -c s.img -T0 > ~ /builds/PixelExperience_arm64-ab-vndklite-11.0-$BUILD_DATE -UNOFFICIAL.img.xz
135+ xz -c $OUT /system.img -T0 > ~ /builds/PixelExperience_arm64-ab-11.0-$BUILD_DATE -UNOFFICIAL.img.xz
136+ ;;
137+ esac
138+ rm -rf s.img
139+ cd ..
123140}
124141
125- buildVariant treble_arm_bvS
126- buildVariant treble_a64_bvS
127- buildVariant treble_arm64_bvS
128- ls ~ /build-output | grep ' lineage '
142+ buildVariant treble_arm_bvN
143+ buildVariant treble_a64_bvN
144+ buildVariant treble_arm64_bvN
145+ ls ~ /builds | grep ' PixelExperience '
129146
130147END=` date +%s`
131148ELAPSEDM=$(( $(($END - $START )) /60))
0 commit comments