Skip to content

Commit

Permalink
sync with latest sources of TrebleDroid
Browse files Browse the repository at this point in the history
  • Loading branch information
BoNic committed Jan 31, 2024
1 parent 3716d1c commit 9607f16
Show file tree
Hide file tree
Showing 188 changed files with 1,408 additions and 1,431 deletions.
64 changes: 56 additions & 8 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ BD=$PWD/treble_DerpFest_GSI/GSI
initRepos() {
if [ ! -d .repo ]; then
echo "--> Initializing workspace"
repo init -u https://github.com/DerpFest-AOSP/manifest.git -b 14 --git-lfs --depth=1
repo init -u https://github.com/DerpFest-AOSP/manifest.git -b 14 --depth=1
echo

echo "--> Preparing local manifest"
mkdir -p .repo/local_manifests
cp $BL/manifest.xml .repo/local_manifests/dp.xml
cp $BL/manifest.xml .repo/local_manifests/aosp.xml
echo
fi
}
Expand Down Expand Up @@ -66,32 +66,80 @@ buildTrebleApp() {
echo
}

buildVariant() {
echo "--> Building treble_arm64_bvN"
lunch treble_arm64_bvN-userdebug
buildGappsVariant() {
echo "--> Building treble_arm64_bgN"
lunch treble_arm64_bgN-userdebug
make -j$(nproc --all) installclean
make -j$(nproc --all) systemimage
mv $OUT/system.img $BD/system-treble_arm64_bvN.img
mv $OUT/system.img $BD/system-treble_arm64_bgN.img
echo
}

buildMiniVariant() {
echo "--> Building treble_arm64_bgN-mini"
lunch treble_arm64_bgN_mini-userdebug
make -j$(nproc --all) installclean
make -j$(nproc --all) systemimage
mv $OUT/system.img $BD/system-treble_arm64_bgN-mini.img
echo
}

buildPicoVariant() {
echo "--> Building treble_arm64_bgN-pico"
lunch treble_arm64_bgN_pico-userdebug
make -j$(nproc --all) installclean
make -j$(nproc --all) systemimage
mv $OUT/system.img $BD/system-treble_arm64_bgN-pico.img
echo
}

generatePackages() {
echo "--> Generating packages"
buildDate="$(date +%Y%m%d)"
xz -cv $BD/system-treble_arm64_bvN.img -T0 > $BD/DerpFest-arm64-ab-14.0-unofficial-$buildDate.img.xz
xz -cv $BD/system-treble_arm64_bgN.img -T0 > $BD/DerpFest-arm64_bgN-14.0-unofficial-$buildDate.img.xz
xz -cv $BD/system-treble_arm64_bgN-mini.img -T0 > $BD/DerpFest-arm64_bgN-mini-14.0-unofficial-$buildDate.img.xz
xz -cv $BD/system-treble_arm64_bgN-pico.img -T0 > $BD/DerpFest-arm64_bgN-pico-14.0-unofficial-$buildDate.img.xz
rm -rf $BD/system-*.img
echo
}

generateOta() {
echo "--> Generating OTA file"
version="$(date +v%Y.%m.%d)"
timestamp="$START"
json="{\"version\": \"$version\",\"date\": \"$timestamp\",\"variants\": ["
find $BD/ -name "DerpFest-*" | sort | {
while read file; do
filename="$(basename $file)"
if [[ $filename == *"mini"* ]]; then
name="treble_arm64_bgN-mini"
elif [[ $filename == *"pico"* ]]; then
name="treble_arm64_bgN-pico"
else
name="treble_arm64_bgN"
fi
size=$(wc -c $file | awk '{print $1}')
url="https://github.com/KoysX/treble_DerpFest_GSI/releases/download/$version/$filename"
json="${json} {\"name\": \"$name\",\"size\": \"$size\",\"url\": \"$url\"},"
done
json="${json%?}]}"
echo "$json" | jq . > $BL/ota.json
}
echo
}

START=$(date +%s)

initRepos
syncRepos
applyPatches
setupEnv
buildTrebleApp
buildVariant
buildGappsVariant
buildMiniVariant
buildPicoVariant
generatePackages
generateOta

END=$(date +%s)
ELAPSEDM=$(($(($END-$START))/60))
Expand Down
19 changes: 12 additions & 7 deletions ota.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
{
"version": "v2024.01.08",
"date": "1704697118",
"version": "v2024.01.30",
"date": "1706630436",
"variants": [
{
"name": "treble_arm64_bgN",
"size": "1471847920",
"url": "https://github.com/KoysX/treble_DerpFest_GSI/releases/download/v2024.01.08/DerpFest-arm64_bgN-14.0-unofficial-20240108.img.xz"
"size": "1674979588",
"url": "https://github.com/KoysX/treble_DerpFest_GSI/releases/download/v2024.01.30/DerpFest-arm64_bgN-14.0-unofficial-20240130.img.xz"
},
{
"name": "treble_arm64_bvN",
"size": "1317410256",
"url": "https://github.com/KoysX/treble_DerpFest_GSI/releases/download/v2024.01.08/DerpFest-arm64_bvN-14.0-unofficial-20240108.img.xz"
"name": "treble_arm64_bgN-mini",
"size": "1476054108",
"url": "https://github.com/KoysX/treble_DerpFest_GSI/releases/download/v2024.01.30/DerpFest-arm64_bgN-mini-14.0-unofficial-20240130.img.xz"
},
{
"name": "treble_arm64_bgN-pico",
"size": "1327136200",
"url": "https://github.com/KoysX/treble_DerpFest_GSI/releases/download/v2024.01.30/DerpFest-arm64_bgN-pico-14.0-unofficial-20240130.img.xz"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
From d1b8c6df5c22d0f7307db95824472f434aa4a46d Mon Sep 17 00:00:00 2001
From: BoNic <bonio9527@gmail.com>
Date: Tue, 30 Jan 2024 06:14:49 -0500
Subject: [PATCH] Changelog.txt: No such file or directory

---
core/Makefile | 4 ----
1 file changed, 4 deletions(-)

diff --git a/core/Makefile b/core/Makefile
index 87817b5..6bc6b73 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -910,10 +910,6 @@ $(INSTALLED_FILES_FILE_ROOT) : $(INTERNAL_ROOT_FILES) $(FILESLIST) $(FILESLIST_U
$(FILESLIST) $(TARGET_ROOT_OUT) > $(@:.txt=.json)
$(FILESLIST_UTIL) -c $(@:.txt=.json) > $@

- @echo "Generating Changelog"
- $(hide) ./vendor/derp/tools/changelog
- $(hide) mv $(PRODUCT_OUT)/Changelog.txt $(PRODUCT_OUT)/$(PLATFORM_VERSION)-$(TARGET_PRODUCT)-$(shell $(DATE_FROM_FILE) +%Y%m%d-%H%M)-Changelog.txt
-
$(call declare-0p-target,$(INSTALLED_FILES_FILE_ROOT))
$(call declare-0p-target,$(INSTALLED_FILES_JSON_ROOT))

--
2.34.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
From f6bf41e1f28f52ca85de6f65686a9b2d980c4636 Mon Sep 17 00:00:00 2001
From: BoNic <bonio9527@gmail.com>
Date: Tue, 30 Jan 2024 02:40:49 -0500
Subject: [PATCH] Implement pico and mini gapps

---
generate.sh | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/generate.sh b/generate.sh
index 461eff1..0a5fc7e 100644
--- a/generate.sh
+++ b/generate.sh
@@ -15,20 +15,32 @@ fi
echo 'PRODUCT_MAKEFILES := \' > AndroidProducts.mk

for part in a ab;do
- for apps in vanilla gapps foss gapps-go;do
+ for apps in vanilla gapps foss gapps-go gapps-mini gapps-pico;do
for arch in arm64 arm a64;do
for su in yes no;do
apps_suffix=""
apps_script=""
apps_name=""
extra_packages=""
+ file_suffix=""
vndk="vndk.mk"
optional_base=""
if [ "$apps" == "gapps" ];then
apps_suffix="g"
- apps_script='$(call inherit-product, device/phh/treble/gapps.mk)'
apps_name="with GApps"
fi
+ if [ "$apps" == "gapps-mini" ];then
+ apps_suffix="g"
+ apps_script='TARGET_USES_MINI_GAPPS := true'
+ apps_name="With mini GApps"
+ file_suffix="_mini"
+ fi
+ if [ "$apps" == "gapps-pico" ];then
+ apps_suffix="g"
+ apps_script='TARGET_USES_PICO_GAPPS := true'
+ apps_name="With pico GApps"
+ file_suffix="_pico"
+ fi
if [ "$apps" == "gapps-go" ];then
apps_suffix="o"
apps_script='$(call inherit-product, device/phh/treble/gapps-go.mk)'
@@ -64,7 +76,7 @@ for part in a ab;do
optional_base='$(call inherit-product, device/phh/treble/base-sas.mk)'
fi

- target="treble_${arch}_${part_suffix}${apps_suffix}${su_suffix}"
+ target="treble_${arch}_${part_suffix}${apps_suffix}${su_suffix}${file_suffix}"

baseArch="$arch"
if [ "$arch" = "a64" ];then
--
2.34.1

24 changes: 0 additions & 24 deletions patches/misc/platform_device_phh_treble/0004-Remove-gapps.patch

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ Subject: [PATCH] Add tunnings for status bar paddings [1/2]
5 files changed, 143 insertions(+), 8 deletions(-)

diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index b261275d2..28486d208 100644
index 2f95762fe..84e82b4d4 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -6825,6 +6825,24 @@ public final class Settings {
@@ -6848,6 +6848,24 @@ public final class Settings {
*/
public static final String LOCK_HIDE_STATUS_BAR = "lockscreen_hide_status_bar";

Expand All @@ -38,26 +38,26 @@ index b261275d2..28486d208 100644
+ public static final String STATUSBAR_TOP_PADDING = "statusbar_top_padding";
+
/**
* Whether keyguard will rotate
* 0 = false, 1 = true
@@ -7007,6 +7025,9 @@ public final class Settings {
PRIVATE_SETTINGS.add(INCREASING_RING_START_VOLUME);
PRIVATE_SETTINGS.add(INCREASING_RING_RAMP_UP_TIME);
* Whether edge light is enabled.
* Default 0
@@ -7092,6 +7110,9 @@ public final class Settings {
PRIVATE_SETTINGS.add(SENSOR_BLOCK);
PRIVATE_SETTINGS.add(FORCE_FULLSCREEN_CUTOUT_APPS);
PRIVATE_SETTINGS.add(LOCK_HIDE_STATUS_BAR);
+ PRIVATE_SETTINGS.add(STATUSBAR_LEFT_PADDING);
+ PRIVATE_SETTINGS.add(STATUSBAR_RIGHT_PADDING);
+ PRIVATE_SETTINGS.add(STATUSBAR_TOP_PADDING);
PRIVATE_SETTINGS.add(AUTO_BRIGHTNESS_ONE_SHOT);
PRIVATE_SETTINGS.add(CLICK_PARTIAL_SCREENSHOT);
PRIVATE_SETTINGS.add(SWAP_VOLUME_KEYS_ON_ROTATION);
PRIVATE_SETTINGS.add(FLASHLIGHT_ON_CALL);
PRIVATE_SETTINGS.add(FLASHLIGHT_ON_CALL_IGNORE_DND);
PRIVATE_SETTINGS.add(FLASHLIGHT_ON_CALL_RATE);
diff --git a/core/res/res/values/derp_symbols.xml b/core/res/res/values/derp_symbols.xml
index c051574dd..ebd74c79d 100644
index cdeeedfca..d3b1c767e 100644
--- a/core/res/res/values/derp_symbols.xml
+++ b/core/res/res/values/derp_symbols.xml
@@ -171,4 +171,9 @@
@@ -201,4 +201,9 @@

<!-- Whether to cancel fingerprint operation if not idle -->
<java-symbol type="bool" name="config_fpCancelIfNotIdle" />
<!-- Parallel space max count. -->
<java-symbol type="integer" name="config_parallelSpaceMaxCount" />
+
+ <!-- Status bar paddings -->
+ <java-symbol type="dimen" name="status_bar_padding_start" />
Expand Down
Loading

0 comments on commit 9607f16

Please sign in to comment.