forked from Kodecable/QuickSwitch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
zipsigner
22 lines (20 loc) · 782 Bytes
/
zipsigner
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/system/bin/sh
# zipsigner: wrapper to set up and run zipsigner.jar from terminal
# osm0sis @ xda-developers
case $# in
1 | 3 | 5)
# when one argument less than needed assume the output name is missing and automatically set it to *-signed.*
eval n=\${$#}
set -- "$@" "$(echo $n | sed 's/\(.*\)\./\1-signed\./')"
;;
esac
if [ "$USER" == "root" ]; then
dir="$(
cd "$(dirname "$0")"
pwd
)"
/apex/com.android.art/bin/dalvikvm -Djava.io.tmpdir=. -Xnodex2oat -Xnoimage-dex2oat -cp $dir/zipsigner-*.jar com.topjohnwu.utils.ZipSigner "$@" 2>/dev/null \
|| /apex/com.android.art/bin/dalvikvm -Djava.io.tmpdir=. -Xnoimage-dex2oat -cp $dir/zipsigner-*.jar com.topjohnwu.utils.ZipSigner "$@";
else
echo "zipsigner: need root permissions"
fi