Compare commits
8
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ba21a0d381 | ||
|
|
992060c969 | ||
|
|
07e8ea88af | ||
|
|
9ff1718d9f | ||
|
|
c3c41e0b7f | ||
|
|
6b60c9c498 | ||
|
|
4721893991 | ||
|
|
050bdbac47 |
@@ -0,0 +1 @@
|
|||||||
|
/local_manifests_device
|
||||||
@@ -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).
|
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").
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
Create a new working directory for your LineageOS build and navigate to it:
|
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:
|
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:
|
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_build_unified lineage_build_unified -b lineage-20-light
|
||||||
git clone https://github.com/AndyCGYan/lineage_patches_unified lineage_patches_unified -b lineage-18.1
|
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:
|
Finally, start the build script - for example, to build for all supported archs:
|
||||||
|
|
||||||
bash lineage_build_unified/buildbot_unified.sh treble 32B A64B 64B
|
bash lineage_build_unified/buildbot_unified.sh treble 64VN 64VS 64GN
|
||||||
|
|
||||||
Be sure to update the cloned repos from time to time!
|
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.
|
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.
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
patches="$(readlink -f -- $1)"
|
||||||
|
|
||||||
|
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
|
||||||
|
git clean -fdx; git reset --hard
|
||||||
|
for patch in $patches/$project/*.patch;do
|
||||||
|
if git apply --check $patch;then
|
||||||
|
git am $patch
|
||||||
|
elif patch -f -p1 --dry-run < $patch > /dev/null;then
|
||||||
|
#This will fail
|
||||||
|
git am $patch || true
|
||||||
|
patch -f -p1 < $patch
|
||||||
|
git add -u
|
||||||
|
git am --continue
|
||||||
|
else
|
||||||
|
echo "Failed applying $patch"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
popd
|
||||||
|
done
|
||||||
|
|
||||||
+16
-45
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
echo ""
|
echo ""
|
||||||
echo "LineageOS 19.x Unified Buildbot"
|
echo "LineageOS 20 Unified Buildbot"
|
||||||
echo "Executing in 5 seconds - CTRL-C to exit"
|
echo "Executing in 5 seconds - CTRL-C to exit"
|
||||||
echo ""
|
echo ""
|
||||||
sleep 5
|
sleep 5
|
||||||
@@ -45,9 +45,7 @@ echo\
|
|||||||
)' ERR
|
)' ERR
|
||||||
|
|
||||||
START=`date +%s`
|
START=`date +%s`
|
||||||
BUILD_DATE="$(date +%Y%m%d)"
|
BUILD_DATE="$(date -u +%Y%m%d)"
|
||||||
WITHOUT_CHECK_API=true
|
|
||||||
WITH_SU=true
|
|
||||||
|
|
||||||
prep_build() {
|
prep_build() {
|
||||||
echo "Preparing local manifests"
|
echo "Preparing local manifests"
|
||||||
@@ -64,29 +62,16 @@ prep_build() {
|
|||||||
mkdir -p ~/build-output
|
mkdir -p ~/build-output
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
repopick -t twelve-monet
|
repopick -t 13-taro-kalama -r -f
|
||||||
repopick -Q "status:open+project:LineageOS/android_packages_apps_AudioFX+branch:lineage-19.0"
|
repopick 321337 -r -f # Deprioritize important developer notifications
|
||||||
repopick -Q "status:open+project:LineageOS/android_packages_apps_Etar+branch:lineage-19.0"
|
repopick 321338 -r -f # Allow disabling important developer notifications
|
||||||
repopick -Q "status:open+project:LineageOS/android_packages_apps_Trebuchet+branch:lineage-19.0+NOT+317783+NOT+318747"
|
repopick 321339 -r -f # Allow disabling USB notifications
|
||||||
repopick -t twelve-burnin
|
repopick 340916 -r # SystemUI: add burnIn protection
|
||||||
repopick -t twelve-buttons
|
|
||||||
repopick -t twelve-fingerprint
|
|
||||||
repopick -t twelve-volume-panel-location
|
|
||||||
repopick -t twelve-swap-volume-buttons
|
|
||||||
repopick -t twelve-camera-button
|
|
||||||
repopick -t twelve-navbar-runtime-toggle
|
|
||||||
repopick -t twelve-buttons-lights
|
|
||||||
repopick -t twelve-keyboard-lights
|
|
||||||
repopick -t twelve-statusbar-brightness-and-qs-slider
|
|
||||||
repopick -t twelve-powermenu
|
|
||||||
repopick 321337 # Deprioritize important developer notifications
|
|
||||||
repopick 321338 # Allow disabling important developer notifications
|
|
||||||
repopick 321339 # Allow disabling USB notifications
|
|
||||||
}
|
}
|
||||||
|
|
||||||
apply_patches() {
|
apply_patches() {
|
||||||
echo "Applying patch group ${1}"
|
echo "Applying patch group ${1}"
|
||||||
bash ~/treble_experimentations/apply-patches.sh ./lineage_patches_unified/${1}
|
bash ./lineage_build_unified/apply_patches.sh ./lineage_patches_unified/${1}
|
||||||
}
|
}
|
||||||
|
|
||||||
prep_device() {
|
prep_device() {
|
||||||
@@ -94,8 +79,7 @@ prep_device() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
prep_treble() {
|
prep_treble() {
|
||||||
apply_patches patches_treble_prerequisite
|
:
|
||||||
apply_patches patches_treble_phh
|
|
||||||
}
|
}
|
||||||
|
|
||||||
finalize_device() {
|
finalize_device() {
|
||||||
@@ -103,38 +87,25 @@ finalize_device() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
finalize_treble() {
|
finalize_treble() {
|
||||||
rm -f device/*/sepolicy/common/private/genfs_contexts
|
:
|
||||||
cd device/phh/treble
|
|
||||||
git clean -fdx
|
|
||||||
bash generate.sh lineage
|
|
||||||
cd ../../..
|
|
||||||
}
|
}
|
||||||
|
|
||||||
build_device() {
|
build_device() {
|
||||||
if [ ${1} == "arm64" ]
|
brunch ${1}
|
||||||
then
|
mv $OUT/lineage-*.zip ~/build-output/lineage-20.0-$BUILD_DATE-UNOFFICIAL-${1}$($PERSONAL && echo "-personal" || echo "").zip
|
||||||
lunch lineage_arm64-userdebug
|
|
||||||
make -j$(nproc --all) systemimage
|
|
||||||
mv $OUT/system.img ~/build-output/lineage-19.0-$BUILD_DATE-UNOFFICIAL-arm64$(${PERSONAL} && echo "-personal" || echo "").img
|
|
||||||
else
|
|
||||||
brunch ${1}
|
|
||||||
mv $OUT/lineage-*.zip ~/build-output/lineage-19.0-$BUILD_DATE-UNOFFICIAL-${1}$($PERSONAL && echo "-personal" || echo "").zip
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
build_treble() {
|
build_treble() {
|
||||||
case "${1}" in
|
case "${1}" in
|
||||||
("A64B") TARGET=treble_a64_bvS;;
|
("64VN") TARGET=gsi_arm64_vN;;
|
||||||
("A64BG") TARGET=treble_a64_bgS;;
|
("64VS") TARGET=gsi_arm64_vS;;
|
||||||
("64B") TARGET=treble_arm64_bvS;;
|
("64GN") TARGET=gsi_arm64_gN;;
|
||||||
("64BG") TARGET=treble_arm64_bgS;;
|
|
||||||
(*) echo "Invalid target - exiting"; exit 1;;
|
(*) echo "Invalid target - exiting"; exit 1;;
|
||||||
esac
|
esac
|
||||||
lunch lineage_${TARGET}-userdebug
|
lunch lineage_${TARGET}-userdebug
|
||||||
make installclean
|
make installclean
|
||||||
make -j$(nproc --all) systemimage
|
make -j$(nproc --all) systemimage
|
||||||
mv $OUT/system.img ~/build-output/lineage-19.0-$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
|
||||||
make vndk-test-sepolicy
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ${NOSYNC}
|
if ${NOSYNC}
|
||||||
|
|||||||
@@ -1,13 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<manifest>
|
<manifest>
|
||||||
<project name="phhusson/vendor_hardware_overlay" path="vendor/hardware_overlay" remote="github" revision="pie" />
|
<project name="AndyCGYan/android_device_lineage_gsi" path="device/lineage/gsi" remote="github" revision="lineage-20" />
|
||||||
<project name="phhusson/device_phh_treble" path="device/phh/treble" remote="github" revision="android-12.0" />
|
<project name="AndyCGYan/android_packages_apps_QcRilAm" path="packages/apps/QcRilAm" remote="github" revision="master" />
|
||||||
<project name="phhusson/vendor_vndk-tests" path="vendor/vndk-tests" remote="github" revision="master" />
|
<project name="TrebleDroid/vendor_hardware_overlay" path="vendor/hardware_overlay" remote="github" revision="pie" />
|
||||||
<project name="phhusson/vendor_interfaces" path="vendor/interfaces" remote="github" revision="android-11.0" />
|
<remove-project name="LineageOS/android_packages_apps_Camera2" />
|
||||||
<project name="phhusson/vendor_lptools" path="vendor/lptools" remote="github" revision="master" />
|
|
||||||
<project name="phhusson/vendor_magisk" path="vendor/magisk" remote="github" revision="android-10.0" />
|
|
||||||
<remote name="gitlab" fetch="https://gitlab.com/" />
|
<remote name="gitlab" fetch="https://gitlab.com/" />
|
||||||
<project name="davi.sh/gms-android-12" path="vendor/partner_gms" remote="gitlab" revision="master" />
|
<project name="MindTheGapps/vendor_gapps" path="vendor/gapps" remote="gitlab" revision="tau" />
|
||||||
<remove-project name="platform/packages/apps/Gallery2" />
|
|
||||||
<project name="LineageOS/android_packages_apps_Gallery2" path="packages/apps/Gallery2" remote="github" revision="lineage-18.1" />
|
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|||||||
Reference in New Issue
Block a user