forked from cm13-microG/z_patches
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild_gts210ltexx.sh
executable file
·51 lines (42 loc) · 1.13 KB
/
build_gts210ltexx.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
# Check parameters
case "$1" in
test) TESTKEY=true
;;
sign) TESTKEY=false
;;
*) echo "usage: build_gts210ltexx test|sign"
echo "----------------------------------"
echo "test - build with testkeys (insecure, but compatible)"
echo "sign - create a signed build"
exit
;;
esac
# Initiate environment
source build/envsetup.sh
# CCache
# ------
# uncomment the below line to set own cache
# directory (default is ~/.ccache)
export USE_CCACHE=1
#export CCACHE_DIR=~/android/.ccache
prebuilts/misc/linux-x86/ccache/ccache -M 40G
# build with root baked in
export WITH_SU=true
# Normalize build metadata
export KBUILD_BUILD_USER=android
export KBUILD_BUILD_HOST=localhost
if [ "$TESTKEY" = false ] ; then
export OWN_KEYS_DIR=~/.android-certs
export RELEASE_TYPE=UNOFFICIAL-signed
# We need symlinks to fake the existence of a testkey
# for the selinux build process and cyngn-priv-app for
# some old CM apps
for c in cyngn{-priv,}-app testkey; do
for e in pk8 x509.pem; do
ln -s releasekey.$e "$OWN_KEYS_DIR/$c.$e" 2> /dev/null
done
done
fi
# start build
brunch gts210ltexx