This repository has been archived by the owner on May 2, 2024. It is now read-only.
forked from nitin1438/android_build_scripts
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.sh
63 lines (45 loc) · 1.82 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/bash
set -e
# Set Crave to build using LineageOS 21 as base
repo init -u https://github.com/LineageOS/android.git -b lineage-21.0 --git-lfs
# Run inside foss.crave.io devspace, in the project folder
# Remove existing local_manifests
crave run --no-patch -- "rm -rf .repo/local_manifests && \
# Initialize repo with specified manifest
repo init -u https://github.com/RisingTechOSS/android -b fourteen --git-lfs ;\
# Clone local_manifests repository
git clone https://github.com/OkBuddyGSI/treble_manifest.git .repo/local_manifests -b 14 ;\
# Removals
rm -rf system/libhidl prebuilts/clang/host/linux-x86 prebuilt/*/webview.apk platform/external/python/pyfakefs platform/external/python/bumble external/chromium-webview/prebuilt/x86_64 platform/external/opencensus-java RisingOS_gsi patches device/phh/treble && \
# Sync the repositories
repo sync -c -j\$(nproc --all) --force-sync --no-clone-bundle --no-tags && \
# Clone our GSI Repo
git clone https://github.com/OkBuddyGSI/RisingOS_gsi -b 14 && \
mv RisingOS_gsi/patches patches; \
mv RisingOS_gsi/patches/RisingOS.mk device/phh/treble; \
# Apply Patches
bash patches/apply-patches.sh . && \
# Set up build environment
cd device/phh/treble
bash generate.sh RisingOS && \
cd ../../.. && \
source build/envsetup.sh && \
# Lunch configuration
lunch treble_arm64_bgN-userdebug ;\
croot ;\
make systemimage ; \
echo "Date and time:" ; \
# Print out/build_date.txt
cat out/build_date.txt; \
# Print SHA256
sha256sum out/target/product/*/*.img"
# Clean up
# rm -rf tissot/*
# Pull generated zip files
# crave pull out/target/product/*/*.zip
# Pull generated img files
crave pull out/target/product/*/*.img
# Upload zips to Telegram
# telegram-upload --to sdreleases tissot/*.zip
#Upload to Github Releases
#curl -sf https://raw.githubusercontent.com/Meghthedev/Releases/main/headless.sh | sh