Author SHA1 Message Date
Andy CrossGate Yan ba21a0d381 Changes for February 2024 2024-02-16 22:13:54 +08:00
Andy CrossGate Yan 992060c969 Changes for December 2023 2023-12-16 19:09:17 +08:00
Andy CrossGate Yan 07e8ea88af Changes for April 2023 2023-04-17 12:31:40 +00:00
Andy CrossGate Yan 9ff1718d9f Changes for March 2023 2023-03-24 12:35:37 +00:00
Andy CrossGate Yan c3c41e0b7f Changes for February 2023
Use TD's overlay repo, which I'll try and keep up-to-date
2023-02-14 13:39:36 +00:00
Andy CrossGate Yan 6b60c9c498 Changes for January 2023
Basically reverts the "integrally securized" part
2023-01-10 14:40:26 +00:00
Andy CrossGate Yan 4721893991 Changes for November 2022 2022-11-11 12:10:45 +00:00
Andy CrossGate Yan 050bdbac47 Initial unified commit for Android 13, with "light" GSI target 2022-10-23 11:08:57 +00:00
5 changed files with 75 additions and 72 deletions
+1
View File
@@ -0,0 +1 @@
/local_manifests_device
+7 -15
View File
@@ -1,35 +1,27 @@
## Building PHH-based LineageOS GSIs ##
## Building "generic" LineageOS GSIs ##
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), and set up your environment by referring to [LineageOS Wiki](https://wiki.lineageos.org/devices/redfin/build) (mainly "Install the build packages") and [How to build a GSI](https://github.com/phhusson/treble_experimentations/wiki/How-to-build-a-GSI%3F).
First, open a new Terminal window, which defaults to your home directory. Clone the modified treble_experimentations repo there:
git clone https://github.com/AndyCGYan/treble_experimentations
Set up your environment by referring to [LineageOS Wiki](https://wiki.lineageos.org/devices/TP1803/build) (mainly "Install the build packages" and "Install the repo command").
Create a new working directory for your LineageOS build and navigate to it:
mkdir lineage-18.x-build-gsi; cd lineage-18.x-build-gsi
mkdir lineage-20-build-gsi; cd lineage-20-build-gsi
Initialize your LineageOS workspace:
repo init -u https://github.com/LineageOS/android.git -b lineage-18.1
repo init -u https://github.com/LineageOS/android.git -b lineage-20.0 --git-lfs
Clone both this and the patches repos:
git clone https://github.com/AndyCGYan/lineage_build_unified lineage_build_unified -b lineage-18.1
git clone https://github.com/AndyCGYan/lineage_patches_unified lineage_patches_unified -b lineage-18.1
git clone https://github.com/AndyCGYan/lineage_build_unified lineage_build_unified -b lineage-20-light
git clone https://github.com/AndyCGYan/lineage_patches_unified lineage_patches_unified -b lineage-20-light
Finally, start the build script - for example, to build for all supported archs:
bash lineage_build_unified/buildbot_unified.sh treble 32B 32BO A64B A64BG A64BO 64B 64BG
bash lineage_build_unified/buildbot_unified.sh treble 64VN 64VS 64GN
Be sure to update the cloned repos from time to time!
---
Note: A-only and VNDKLite targets are generated from AB images instead of source-built - refer to [sas-creator](https://github.com/AndyCGYan/sas-creator).
---
This script is also used to make device-specific and/or personal builds. To do so, understand the script, and try the `device` and `personal` keywords.
+1
View File
@@ -8,6 +8,7 @@ shopt -s nullglob
for project in $(cd $patches; echo *);do
p="$(tr _ / <<<$project |sed -e 's;platform/;;g')"
[ "$p" == build ] && p=build/make
[ "$p" == frameworks/proto/logging ] && p=frameworks/proto_logging
[ "$p" == vendor/hardware/overlay ] && p=vendor/hardware_overlay
[ "$p" == vendor/partner/gms ] && p=vendor/partner_gms
pushd $p
+58 -45
View File
@@ -1,7 +1,6 @@
#!/bin/bash
echo ""
echo "LineageOS 18.x Unified Buildbot"
echo "ATTENTION: this script syncs repo on each run"
echo "LineageOS 20 Unified Buildbot"
echo "Executing in 5 seconds - CTRL-C to exit"
echo ""
sleep 5
@@ -21,11 +20,19 @@ then
exit 1
fi
NOSYNC=false
PERSONAL=false
if [ ${!#} == "personal" ]
then
for var in "${@:2}"
do
if [ ${var} == "nosync" ]
then
NOSYNC=true
fi
if [ ${var} == "personal" ]
then
PERSONAL=true
fi
fi
done
# Abort early on error
set -eE
@@ -38,23 +45,29 @@ echo\
)' ERR
START=`date +%s`
BUILD_DATE="$(date +%Y%m%d)"
WITHOUT_CHECK_API=true
WITH_SU=true
BUILD_DATE="$(date -u +%Y%m%d)"
echo "Preparing local manifests"
mkdir -p .repo/local_manifests
cp ./lineage_build_unified/local_manifests_${MODE}/*.xml .repo/local_manifests
echo ""
prep_build() {
echo "Preparing local manifests"
mkdir -p .repo/local_manifests
cp ./lineage_build_unified/local_manifests_${MODE}/*.xml .repo/local_manifests
echo ""
echo "Syncing repos"
repo sync -c --force-sync --no-clone-bundle --no-tags -j$(nproc --all)
echo ""
echo "Syncing repos"
repo sync -c --force-sync --no-clone-bundle --no-tags -j$(nproc --all)
echo ""
echo "Setting up build environment"
source build/envsetup.sh &> /dev/null
mkdir -p ~/build-output
echo ""
echo "Setting up build environment"
source build/envsetup.sh &> /dev/null
mkdir -p ~/build-output
echo ""
repopick -t 13-taro-kalama -r -f
repopick 321337 -r -f # Deprioritize important developer notifications
repopick 321338 -r -f # Allow disabling important developer notifications
repopick 321339 -r -f # Allow disabling USB notifications
repopick 340916 -r # SystemUI: add burnIn protection
}
apply_patches() {
echo "Applying patch group ${1}"
@@ -66,8 +79,7 @@ prep_device() {
}
prep_treble() {
apply_patches patches_treble_prerequisite
apply_patches patches_treble_phh
:
}
finalize_device() {
@@ -75,52 +87,53 @@ finalize_device() {
}
finalize_treble() {
rm -f device/*/sepolicy/common/private/genfs_contexts
cd device/phh/treble
git clean -fdx
bash generate.sh lineage
cd ../../..
:
}
build_device() {
brunch ${1}
mv $OUT/lineage-*.zip ~/build-output/lineage-18.1-$BUILD_DATE-UNOFFICIAL-${1}$($PERSONAL && echo "-personal" || echo "").zip
mv $OUT/lineage-*.zip ~/build-output/lineage-20.0-$BUILD_DATE-UNOFFICIAL-${1}$($PERSONAL && echo "-personal" || echo "").zip
}
build_treble() {
case "${1}" in
("32B") TARGET=arm_bvS;;
("32BO") TARGET=arm_boS;;
("A64B") TARGET=a64_bvS;;
("A64BG") TARGET=a64_bgS;;
("A64BO") TARGET=a64_boS;;
("64B") TARGET=arm64_bvS;;
("64BG") TARGET=arm64_bgS;;
("TTP") TARGET=ttp;;
("64VN") TARGET=gsi_arm64_vN;;
("64VS") TARGET=gsi_arm64_vS;;
("64GN") TARGET=gsi_arm64_gN;;
(*) echo "Invalid target - exiting"; exit 1;;
esac
lunch lineage_${TARGET}-userdebug
make installclean
make -j$(nproc --all) systemimage
make vndk-test-sepolicy
mv $OUT/system.img ~/build-output/lineage-18.1-$BUILD_DATE-UNOFFICIAL-${TARGET}$(${PERSONAL} && echo "-personal" || echo "").img
mv $OUT/system.img ~/build-output/lineage-20.0-$BUILD_DATE-UNOFFICIAL-${TARGET}$(${PERSONAL} && echo "-personal" || echo "").img
}
echo "Applying patches"
prep_${MODE}
apply_patches patches_platform
apply_patches patches_${MODE}
if ${PERSONAL}
if ${NOSYNC}
then
echo "ATTENTION: syncing/patching skipped!"
echo ""
echo "Setting up build environment"
source build/envsetup.sh &> /dev/null
echo ""
else
prep_build
echo "Applying patches"
prep_${MODE}
apply_patches patches_platform
apply_patches patches_${MODE}
if ${PERSONAL}
then
apply_patches patches_platform_personal
apply_patches patches_${MODE}_personal
fi
finalize_${MODE}
echo ""
fi
finalize_${MODE}
echo ""
for var in "${@:2}"
do
if [ ${var} == "personal" ]
if [ ${var} == "nosync" ] || [ ${var} == "personal" ]
then
continue
fi
+5 -9
View File
@@ -1,13 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="AndyCGYan/android_device_lineage_gsi" path="device/lineage/gsi" remote="github" revision="lineage-20" />
<project name="AndyCGYan/android_packages_apps_QcRilAm" path="packages/apps/QcRilAm" remote="github" revision="master" />
<project name="TrebleDroid/vendor_hardware_overlay" path="vendor/hardware_overlay" remote="github" revision="pie" />
<remove-project name="LineageOS/android_packages_apps_Camera2" />
<remote name="gitlab" fetch="https://gitlab.com/" />
<remove-project name="platform/packages/apps/Jelly" />
<project name="phhusson/vendor_hardware_overlay" path="vendor/hardware_overlay" remote="github" revision="pie" />
<project name="phhusson/device_phh_treble" path="device/phh/treble" remote="github" revision="android-11.0" />
<project name="phhusson/vendor_vndk-tests" path="vendor/vndk-tests" remote="github" revision="master" />
<project name="phhusson/vendor_interfaces" path="vendor/interfaces" remote="github" revision="android-11.0" />
<project name="phhusson/vendor_magisk" path="vendor/magisk" remote="github" revision="android-10.0" />
<project name="00p513-dev/partner_gms" path="vendor/partner_gms" remote="gitlab" revision="11" />
<project name="MindTheGapps/vendor_gapps" path="vendor/gapps" remote="gitlab" revision="tau" />
</manifest>