Skip to content
This repository was archived by the owner on Dec 12, 2023. It is now read-only.

Commit b8cf162

Browse files
committed
Pixel Experience: AOSP-ify
1 parent a9a02b7 commit b8cf162

20 files changed

+588
-1202
lines changed

README.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11

2-
## Building PHH-based LineageOS GSIs ##
2+
## Building PHH-based Pixel Experience GSIs ##
33

4-
To get started with building LineageOS 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).
4+
To get started with building Pixel Experience 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).
55

66
First, open a new Terminal window, which defaults to your home directory. Clone the modified treble_experimentations repo there:
77

8-
git clone https://github.com/AndyCGYan/treble_experimentations
8+
git clone https://github.com/ponces/treble_experimentations
99

10-
Create a new working directory for your LineageOS build and navigate to it:
10+
Create a new working directory for your Pixel Experience build and navigate to it:
1111

12-
mkdir lineage-18.x-build-gsi; cd lineage-18.x-build-gsi
12+
mkdir pixel; cd pixel
1313

14-
Initialize your LineageOS workspace:
14+
Initialize your Pixel Experience workspace:
1515

16-
repo init -u https://github.com/LineageOS/android.git -b lineage-18.1
16+
repo init -u https://github.com/PixelExperience/manifest -b eleven
1717

1818
Clone the modified treble patches and this repo:
1919

20-
git clone https://github.com/AndyCGYan/treble_patches -b lineage-18.1
21-
git clone https://github.com/AndyCGYan/treble_build_los -b lineage-18.1
20+
git clone https://github.com/ponces/treble_patches -b eleven
21+
git clone https://github.com/ponces/treble_build_pe -b eleven
2222

2323
Finally, start the build script:
2424

25-
bash treble_build_los/buildbot_treble.sh
25+
bash treble_build_pe/buildbot_treble.sh
2626

2727
Be sure to update the cloned repos from time to time!
2828

buildbot_treble.sh

+54-37
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
#!/bin/bash
22
echo ""
3-
echo "LineageOS 18.x Treble Buildbot"
3+
echo "Pixel Experience 11 Treble Buildbot"
44
echo "ATTENTION: this script syncs repo on each run"
55
echo "Executing in 5 seconds - CTRL-C to exit"
66
echo ""
77
sleep 5
88

99
START=`date +%s`
1010
BUILD_DATE="$(date +%Y%m%d)"
11-
BL=$PWD/treble_build_los
11+
BL=$PWD/treble_build_pe
1212

1313
echo "Preparing local manifest"
1414
mkdir -p .repo/local_manifests
15-
cp $BL/manifest.xml .repo/local_manifests/manifest.xml
15+
cp $BL/manifest.xml .repo/local_manifests/pixel.xml
1616
echo ""
1717

1818
echo "Syncing repos"
@@ -23,22 +23,21 @@ echo "Setting up build environment"
2323
source build/envsetup.sh &> /dev/null
2424
echo ""
2525

26-
repopick 289372 # Messaging: Add "Mark as read" quick action for message notifications
27-
2826
echo "Reverting LOS FOD implementation"
2927
cd frameworks/base
3028
git am $BL/patches/0001-Squashed-revert-of-LOS-FOD-implementation.patch
3129
cd ../..
3230
cd 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
3432
cd ../..
3533
echo ""
3634

3735
echo "Applying PHH patches"
3836
rm -f device/*/sepolicy/common/private/genfs_contexts
3937
cd device/phh/treble
4038
git clean -fdx
41-
bash generate.sh lineage
39+
cp $BL/pe.mk .
40+
bash generate.sh pe
4241
cd ../../..
4342
bash ~/treble_experimentations/apply-patches.sh treble_patches
4443
echo ""
@@ -48,84 +47,102 @@ cd build/make
4847
git am $BL/patches/0001-Make-broken-copy-headers-the-default.patch
4948
cd ../..
5049
cd frameworks/base
51-
git am $BL/patches/0001-UI-Revive-navbar-layout-tuning-via-sysui_nav_bar-tun.patch
5250
git am $BL/patches/0001-UI-Disable-wallpaper-zoom.patch
5351
git am $BL/patches/0001-Disable-vendor-mismatch-warning.patch
5452
cd ../..
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
6554
git am $BL/patches/0001-vendor_lineage-Log-privapp-permissions-whitelist-vio.patch
6655
cd ../..
6756
echo ""
6857

6958
echo "Applying GSI-specific patches"
7059
cd 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 [email protected] from artifact path requirements
60+
git revert c9a3611b0bab1744b3c4321e728c917fcdc2abc3 --no-edit # recovery: Allow custom bootloader msg offset in block misc
7661
cd ../..
7762
cd device/phh/treble
7863
git revert 82b15278bad816632dcaeaed623b569978e9840d --no-edit # Update lineage.mk for LineageOS 16.0
7964
git 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
8268
cd ../../..
8369
cd 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
8571
cd ../..
8672
cd frameworks/native
8773
git revert 581c22f979af05e48ad4843cdfa9605186d286da --no-edit # Add suspend_resume trace events to the atrace 'freq' category.
8874
cd ../..
8975
cd 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
9177
cd ../../..
9278
cd system/core
9379
git am $BL/patches/0001-Revert-init-Add-vendor-specific-initialization-hooks.patch
9480
git am $BL/patches/0001-Panic-into-recovery-rather-than-bootloader.patch
95-
git am $BL/patches/0001-Restore-sbin.patch
9681
git am $BL/patches/0001-fix-offline-charger-v7.patch
9782
cd ../..
9883
cd 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
10085
cd ../../..
10186
cd system/sepolicy
10287
git am $BL/patches/0001-Revert-sepolicy-Relabel-wifi.-properties-as-wifi_pro.patch
10388
cd ../..
104-
cd vendor/lineage
89+
cd vendor/aosp
10590
git am $BL/patches/0001-build_soong-Disable-generated_kernel_headers.patch
91+
git am $BL/patches/0001-build-fix-build-number.patch
10692
cd ../..
10793
echo ""
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+
109102
echo "CHECK PATCH STATUS NOW!"
110103
sleep 5
111104
echo ""
112105

113106
export WITHOUT_CHECK_API=true
114-
export WITH_SU=true
115-
mkdir -p ~/build-output/
107+
mkdir -p ~/builds
116108

117109
buildVariant() {
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

130147
END=`date +%s`
131148
ELAPSEDM=$(($(($END-$START))/60))

patches/0001-LineageParts-Invert-per-app-stretch-to-fullscreen.patch

-105
This file was deleted.

patches/0001-Restore-sbin.patch

-71
This file was deleted.

0 commit comments

Comments
 (0)