-
Notifications
You must be signed in to change notification settings - Fork 6
/
unfold_lineageos.sh
executable file
·55 lines (44 loc) · 1.19 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
51
52
53
54
55
#!/bin/bash -ex
echo "LineageOS-21 is not supported yet"
exit 1
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 ${GD_REPO_INIT_ARGS}
cd .repo/manifests
rm default.xml
cp ${LOCAL_PATH}/manifests/lineage-static.xml lineage.xml
cp ${LOCAL_PATH}/manifests/tesla-android.xml tesla-android.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/*.patch
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"