-
Notifications
You must be signed in to change notification settings - Fork 4
/
build_no_clean_signed_lineage15
executable file
·52 lines (42 loc) · 1.75 KB
/
build_no_clean_signed_lineage15
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
#!/bin/bash
# Path to root of CM project directory
CM_PROJECT_DIR=~/android/system/lineage-15.1
# Set device
ANDROID_DEVICE=gts210vewifi
# Enable SU by default
export WITH_SU=true
# Enable ccache
export USE_CCACHE=1
# enable ccache compression
export CCACHE_COMPRESS=1
# Path to ccache dir
export CCACHE_DIR=~/T5/android/system/.ccache-15
export ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4g"
# Fix Flex for Ubuntu 18.04
export LC_ALL=C
## End Edit
sudo update-java-alternatives -s java-1.8.0-openjdk-amd64
java -version
javac -version
if [ ! -e ~/.android-certs ]; then
echo "Android Keys directory (~/.android-certs) does not exist. Exiting."
exit
fi
# Ask for signing keys unlock password
echo -n "Enter password: "
read -s password
echo
export ANDROID_SECURE_STORAGE_CMD="echo '$password'"
cd "$CM_PROJECT_DIR"
prebuilts/misc/linux-x86/ccache/ccache -z
source build/envsetup.sh
rm out/dist/*-target_files-*.zip
lunch lineage_"$ANDROID_DEVICE"-userdebug
mka target-files-package dist otatools
# Set Date
DATE=$(grep ro.lineage.version out/target/product/"$ANDROID_DEVICE"/system/build.prop | cut -d "-" -f 2)
build/tools/releasetools/sign_target_files_apks -o -d ~/.android-certs out/dist/*-target_files-*.zip out/target/product/"$ANDROID_DEVICE"/signed-target_files.zip
build/tools/releasetools/ota_from_target_files -k ~/.android-certs/releasekey --block --backup=true out/target/product/"$ANDROID_DEVICE"/signed-target_files.zip out/target/product/"$ANDROID_DEVICE"/lineage-15.1-"$DATE"-NIGHTLY-"$ANDROID_DEVICE"-signed.zip
prebuilts/misc/linux-x86/ccache/ccache -s
cd out/target/product/"$ANDROID_DEVICE"/
md5sum lineage-15.1-"$DATE"-NIGHTLY-"$ANDROID_DEVICE"-signed.zip > lineage-15.1-"$DATE"-NIGHTLY-"$ANDROID_DEVICE"-signed.zip.md5sum