-
Notifications
You must be signed in to change notification settings - Fork 4
/
unfold_lineageos.sh
executable file
·50 lines (41 loc) · 1.05 KB
/
unfold_lineageos.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
#!/bin/bash -ex
LOCAL_PATH=$(pwd)
echo Init repo tree using AOSP manifest
pushd aosptree
repo init -u https://github.com/LineageOS/android.git -b refs/heads/lineage-20.0
cd .repo/manifests
rm default.xml
cp ${LOCAL_PATH}/manifests/lineage-static.xml lineage.xml
cp ${LOCAL_PATH}/manifests/glodroid.xml glodroid.xml
cp ${LOCAL_PATH}/manifests/default_lineage.xml default.xml
git add *
git commit -m "Add GloDroid Project" --no-edit
popd
echo Sync repo tree
pushd aosptree
repo sync -cq
popd
echo Patch AOSP tree
patch_dir() {
pushd aosptree/$1
repo sync -l .
git am ${LOCAL_PATH}/patches-aosp/$1/*
popd
}
pushd patches-aosp
directories=$(find -name *patch | xargs dirname | uniq)
popd
for dir in ${directories}
do
echo "Patching: $dir"
patch_dir $dir
done
# Hack to avoid rebuilding AOSP from scratch
touch -c -t 200101010101 aosptree/external/libcxx/include/chrono
cd aosptree/external/chromium-webview/prebuilt/arm64
git lfs pull
cd -
cd aosptree/external/chromium-webview/prebuilt/arm
git lfs pull
cd -
echo -e "\n\033[32m Done \033[0m"