File: debian-wrapper.patch

package info (click to toggle)
apktool 2.3.4-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 8,496 kB
  • sloc: java: 11,932; xml: 372; sh: 201; makefile: 31
file content (71 lines) | stat: -rw-r--r-- 1,945 bytes parent folder | download | duplicates (2)
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
From: Markus Koschany <apo@debian.org>
Date: Sat, 21 May 2016 16:22:29 +0200
Subject: debian wrapper

---
 scripts/linux/apktool | 29 ++++++++++++-----------------
 1 file changed, 12 insertions(+), 17 deletions(-)

diff --git a/scripts/linux/apktool b/scripts/linux/apktool
index e99086b..827e580 100755
--- a/scripts/linux/apktool
+++ b/scripts/linux/apktool
@@ -20,6 +20,16 @@
 
 # Set up prog to be the path of this script, including following symlinks,
 # and set up progdir to be the fully-qualified pathname of its directory.
+
+WORKING_DIRECTORY=~/.local/share/apktool/framework/
+
+if [ ! -d ${WORKING_DIRECTORY} ]; then
+    mkdir -m 700 -p ${WORKING_DIRECTORY}
+    ln -s /usr/share/android-framework-res/framework-res.apk ${WORKING_DIRECTORY}/1.apk
+fi
+
+APP_HOME="/usr/share/apktool"
+
 prog="$0"
 while [ -h "${prog}" ]; do
     newProg=`/bin/ls -ld "${prog}"`
@@ -35,24 +45,15 @@ done
 oldwd=`pwd`
 progdir=`dirname "${prog}"`
 cd "${progdir}"
-progdir=`pwd`
+progdir="/usr/share/apktool"
 prog="${progdir}"/`basename "${prog}"`
 cd "${oldwd}"
 
-jarfile=apktool.jar
-libdir="$progdir"
-if [ ! -r "$libdir/$jarfile" ]
-then
-    echo `basename "$prog"`": can't find $jarfile"
-    exit 1
-fi
-
 javaOpts=""
 
 # If you want DX to have more memory when executing, uncomment the following
 # line and adjust the value accordingly. Use "java -X" for a list of options
 # you can pass here.
-# 
 javaOpts="-Xmx512M -Dfile.encoding=utf-8"
 
 # Alternatively, this will extract any parameter "-Jxxx" from the command line
@@ -65,13 +66,7 @@ while expr "x$1" : 'x-J' >/dev/null; do
     shift
 done
 
-if [ "$OSTYPE" = "cygwin" ] ; then
-	jarpath=`cygpath -w  "$libdir/$jarfile"`
-else
-	jarpath="$libdir/$jarfile"
-fi
-
 # add current location to path for aapt
 PATH=$PATH:`pwd`;
 export PATH;
-exec java $javaOpts -jar "$jarpath" "$@"
\ No newline at end of file
+exec java $javaOpts -cp "/usr/share/apktool/*" brut.apktool.Main "$@"