[Android-tools-devel] Bug#824927: apktool: copies upstream apktool script instead of patching it

Paul Wise pabs at debian.org
Sat May 21 12:27:50 UTC 2016


Source: apktool
Version: 2.1.1+dfsg-1
Severity: normal
Usertags: copy

The below changes to the upstream apktool script should have been
applied by using a patch instead of copying the script around.

pabs at chianamo ~ $ wget -qOupstream https://sources.debian.net/data/main/a/apktool/2.1.1+dfsg-1/scripts/linux/apktool 
pabs at chianamo ~ $ wget -qOdebian https://sources.debian.net/data/main/a/apktool/2.1.1+dfsg-1/debian/wrapper/apktool
pabs at chianamo ~ $ diff -u upstream debian 
--- upstream	2016-05-08 04:55:49.000000000 +0800
+++ debian	2016-05-10 08:39:22.000000000 +0800
@@ -20,6 +20,9 @@
 
 # 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.
+
+APP_HOME="/usr/share/apktool"
+
 prog="$0"
 while [ -h "${prog}" ]; do
     newProg=`/bin/ls -ld "${prog}"`
@@ -35,25 +38,18 @@
 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"
+w
+#
+javaOpts="-Xmx512M -Dfile.encoding=utf-8"
 
 # Alternatively, this will extract any parameter "-Jxxx" from the command line
 # and pass them to Java (instead of to dx). This makes it possible for you to
@@ -65,13 +61,7 @@
     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 "$@"

-- 
bye,
pabs

https://wiki.debian.org/PaulWise
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/android-tools-devel/attachments/20160521/bb06cf3a/attachment.sig>


More information about the Android-tools-devel mailing list