-
Notifications
You must be signed in to change notification settings - Fork 5
/
zipper.sh
executable file
·47 lines (44 loc) · 1.03 KB
/
zipper.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
#! /bin/bash
# Kernel Tool
# Author: Russell Dias
# Version: 0.0.2
# Date: May 19, 2013
# Contact: [email protected]
#Kerenl Tool by russelldias
echo "Making Flashable zip"
cd target
# Making zip
cp -r ../tools/META-INF META-INF
cp -r ../tools/system system
cp ../tools/signapk.jar signapk.jar
cp ../tools/testkey.x509.pem testkey.x509.pem
cp ../tools/testkey.pk8 testkey.pk8
# zipping
zip -r kernel-tool.zip META-INF system boot.img
echo "ZIP Ready, signing it"
java -jar signapk.jar testkey.x509.pem testkey.pk8 kernel-tool.zip kernel-tool-SIGNED.zip
# Cleanup
rm kernel-tool.zip
rm *.jar
rm *.pk8
rm *.pem
rm -r META-INF
rm -r system
cd ..
#Zip sizw
cd target
s1=`ls -lh kernel-tool-SIGNED.zip | sed -e 's/.* [ ]*\([0-9]*\.[0-9]*[MK]\) .*/\1/g'`
rm boot.img
tput setaf 3
echo "Size of Zip is = $s1"
tput setaf 1
echo "Flashable zip is target/kernel-tool-SIGNED.zip"
tput sgr0
setterm -bold
echo "Kernel Tool by russelldias"
sleep 2
echo "Thanks for using Kernel Tool"
sleep 2
echo "Please press [Enter] to exit."
tput sgr0
read ANS