Great tool thanks! I've found many apk's with thumbs.db file hidden in it. If you use jpegtran on the jpg files, you may also reduce a lot of size.
Well, it's jpegtran -optimize feature looks promising for reducing few more kBsGreat tool thanks! I've found many apk's with thumbs.db file hidden in it. If you use jpegtran on the jpg files, you may also reduce a lot of size.
Thank youYou can... but you can't remove debug info from odexed jar because there is no dex file in it...
I use API Level of my Rom, 15 for ICS...Thank you
In case of a user app should I use -b with the number of my phone API level or with the highest API level number for which the app is written?
Found even better tool for optimizing jpegs https://github.com/tjko/jpegoptim XDGreat tool thanks! I've found many apk's with thumbs.db file hidden in it. If you use jpegtran on the jpg files, you may also reduce a lot of size.
$ goptimize -m4 -zb -j0 'Clean Master (Cleaner) v3.8.1.apk'
[+] GOptimizing: <[ Clean Master (Cleaner) v3.8.1.apk ]>
|- Extracting APK...
|- Optimized PNG's: 100% | Saved: 123 kB (19%)
|- Optimized JPG's: 100% | Saved: 31 kB (6%)
+- Zipaligning APK...
##########[ MiniCygwin GOptimize v1.22 ]###########
[i] Put APK's in "PlaceApksHere"
and press any key to start...
[+] GOptimizing: <[ Facebook.apk ]>
|- Extracting APK...
|- Optimized PNG's: 100% | Saved: 532 kB (18%)
|- Packing PNG's in APK...
|- Storing resources.arsc uncompressed
|- Removing debugging info from classes.dex using smali
[w] Failed Removing debugging info...
|- Recompressing classes.dex with CL(5)
|- Recompressing libraries with CL(5)
|- Signing APK with Android test certificate
java.lang.NullPointerException
at s.IOUtils.copyLarge(IOUtils.java:61)
at s.IOUtils.copy(IOUtils.java:49)
at s.IOUtils.toByteArray(IOUtils.java:39)
at s.Sign.<clinit>(Sign.java:393)
java.lang.NullPointerException
at s.IOUtils.copyLarge(IOUtils.java:61)
at s.IOUtils.copy(IOUtils.java:49)
at s.IOUtils.toByteArray(IOUtils.java:39)
at s.Sign.<clinit>(Sign.java:396)
java.lang.NullPointerException
at java.io.ByteArrayInputStream.<init>(Unknown Source)
at s.Sign.readPublicKey(Sign.java:78)
at s.Sign.sign(Sign.java:435)
at s.Sign.main(Sign.java:532)
+- Zipaligning APK...
Unable to open 'Facebook.apk' as zip archive
mv: cannot stat `Facebook.apk.zipa': No such file or directory
[i] Press any key to exit...
Try removing new line character from bin/.JavaPATH if you have it, if you still get error then Java version is to low or Java is incorrectly installed.I get this error
Is it Java config error? i did configure it properlyCode:##########[ MiniCygwin GOptimize v1.22 ]########### [i] Put APK's in "PlaceApksHere" and press any key to start... [+] GOptimizing: <[ Facebook.apk ]> |- Extracting APK... |- Optimized PNG's: 100% | Saved: 532 kB (18%) |- Packing PNG's in APK... |- Storing resources.arsc uncompressed |- Removing debugging info from classes.dex using smali [w] Failed Removing debugging info... |- Recompressing classes.dex with CL(5) |- Recompressing libraries with CL(5) |- Signing APK with Android test certificate java.lang.NullPointerException at s.IOUtils.copyLarge(IOUtils.java:61) at s.IOUtils.copy(IOUtils.java:49) at s.IOUtils.toByteArray(IOUtils.java:39) at s.Sign.<clinit>(Sign.java:393) java.lang.NullPointerException at s.IOUtils.copyLarge(IOUtils.java:61) at s.IOUtils.copy(IOUtils.java:49) at s.IOUtils.toByteArray(IOUtils.java:39) at s.Sign.<clinit>(Sign.java:396) java.lang.NullPointerException at java.io.ByteArrayInputStream.<init>(Unknown Source) at s.Sign.readPublicKey(Sign.java:78) at s.Sign.sign(Sign.java:435) at s.Sign.main(Sign.java:532) +- Zipaligning APK... Unable to open 'Facebook.apk' as zip archive mv: cannot stat `Facebook.apk.zipa': No such file or directory [i] Press any key to exit...
also tried removing '-b'(remove debugging) option but some error with testkey
i dont have a newline in .Java PATH and i do use Notepad++Just checked if there is new line after Java bin path it does not recognize Java at all
Edited script to read only first line if there are multiple lines in bin/.JavaPATH
Will be fixed in v1.23, for now if you have new line in .JavaPATH remove it
But, I still think your problem is bad Java installation or old Java version
You should always edit GOptimize files with Notepad2 or Notepad++ because windows notepad does not recognize unix files correctly...

C:\Program Files\Java\jre7\bin
C:\Program Files\Java\jre6\bin
Can you enter in ManualGOi dont have a newline in .Java PATH and i do use Notepad++
this' what my java folder looks like
View attachment 2282749
I Gave path as
and also triedCode:C:\Program Files\Java\jre7\bin
manualGo.cmd detects 'which java' and gives the right path though!Code:C:\Program Files\Java\jre6\bin
BUt have the Same Problem!
sign
java -jar "$(cygpath -wal "/bin/sign.jar")"
cygpath -wal "/bin/sign.jar"
$ goptimize -j0 *.apk
[+] GOptimizing: <[ Clean Master (Cleaner) v3.8.1 build 30810406.apk ]>
|- Extracting APK...
|- Optimized JPG's: 100% | Saved: 31 kB (6%)
+- Zipaligning APK...
$ goptimize -j95 *.apk
[+] GOptimizing: <[ Clean Master (Cleaner) v3.8.1 build 30810406.apk ]>
|- Extracting APK...
|- Optimized JPG's: 100% | Saved: 31 kB (6%)
+- Zipaligning APK...
$ goptimize -j90 *.apk
[+] GOptimizing: <[ Clean Master (Cleaner) v3.8.1 build 30810406.apk ]>
|- Extracting APK...
|- Optimized JPG's: 100% | Saved: 44 kB (9%)
+- Zipaligning APK...
$ goptimize -j85 *.apk
[+] GOptimizing: <[ Clean Master (Cleaner) v3.8.1 build 30810406.apk ]>
|- Extracting APK...
|- Optimized JPG's: 100% | Saved: 85 kB (17%)
+- Zipaligning APK...
$ goptimize -j0 *.apk
[+] GOptimizing: <[ Facebook for Android v3.7 build 367848.apk ]>
|- Extracting APK...
|- Optimized JPG's: 100% | Saved: 10 kB (4%)
+- Zipaligning APK...
$ goptimize -j95 *.apk
[+] GOptimizing: <[ Facebook for Android v3.7 build 367848.apk ]>
|- Extracting APK...
|- Optimized JPG's: 100% | Saved: 20 kB (7%)
+- Zipaligning APK...
$ goptimize -j90 *.apk
[+] GOptimizing: <[ Facebook for Android v3.7 build 367848.apk ]>
|- Extracting APK...
|- Optimized JPG's: 100% | Saved: 56 kB (21%)
+- Zipaligning APK...
$ goptimize -j85 *.apk
[+] GOptimizing: <[ Facebook for Android v3.7 build 367848.apk ]>
|- Extracting APK...
|- Optimized JPG's: 100% | Saved: 87 kB (33%)
+- Zipaligning APK...
=) Only thing I forgot to add jpe and jfif extensions to jpg list (script now searches for jpg and jpeg)Hi gu5t3r, that was fast! Thank you very much for implementing, I will try it.
And this' is what i get!Can you enter in ManualGO
andCode:sign
andCode:java -jar "$(cygpath -wal "/bin/sign.jar")"
Code:cygpath -wal "/bin/sign.jar"
[email protected] /PlaceApksHere
$ sign
java.lang.NullPointerException
at s.IOUtils.copyLarge(IOUtils.java:61)
at s.IOUtils.copy(IOUtils.java:49)
at s.IOUtils.toByteArray(IOUtils.java:39)
at s.Sign.<clinit>(Sign.java:393)
java.lang.NullPointerException
at s.IOUtils.copyLarge(IOUtils.java:61)
at s.IOUtils.copy(IOUtils.java:49)
at s.IOUtils.toByteArray(IOUtils.java:39)
at s.Sign.<clinit>(Sign.java:396)
Usage: java -jar sign.jar my_1.apk [my_2.apk ...] [--override]
[email protected] /PlaceApksHere
$ java -jar "$(cygpath -wal "/bin/sign.jar")"
java.lang.NullPointerException
at s.IOUtils.copyLarge(IOUtils.java:61)
at s.IOUtils.copy(IOUtils.java:49)
at s.IOUtils.toByteArray(IOUtils.java:39)
at s.Sign.<clinit>(Sign.java:393)
java.lang.NullPointerException
at s.IOUtils.copyLarge(IOUtils.java:61)
at s.IOUtils.copy(IOUtils.java:49)
at s.IOUtils.toByteArray(IOUtils.java:39)
at s.Sign.<clinit>(Sign.java:396)
Usage: java -jar sign.jar my_1.apk [my_2.apk ...] [--override]
[email protected] /PlaceApksHere
$ cygpath -wal "/bin/sign.jar"
E:\Sonu\Android-Root\Tools\Apk EDits!\Go Optimizer\MiniCygwin_GOptimize_v1.22\bi
n\sign.jar
[email protected] /PlaceApksHere
$
Problem is 100% inAnd this' is what i get!
Edit:Post #57 Worked!Code:[email protected] /PlaceApksHere $ sign java.lang.NullPointerException at s.IOUtils.copyLarge(IOUtils.java:61) at s.IOUtils.copy(IOUtils.java:49) at s.IOUtils.toByteArray(IOUtils.java:39) at s.Sign.<clinit>(Sign.java:393) java.lang.NullPointerException at s.IOUtils.copyLarge(IOUtils.java:61) at s.IOUtils.copy(IOUtils.java:49) at s.IOUtils.toByteArray(IOUtils.java:39) at s.Sign.<clinit>(Sign.java:396) Usage: java -jar sign.jar my_1.apk [my_2.apk ...] [--override] [email protected] /PlaceApksHere $ java -jar "$(cygpath -wal "/bin/sign.jar")" java.lang.NullPointerException at s.IOUtils.copyLarge(IOUtils.java:61) at s.IOUtils.copy(IOUtils.java:49) at s.IOUtils.toByteArray(IOUtils.java:39) at s.Sign.<clinit>(Sign.java:393) java.lang.NullPointerException at s.IOUtils.copyLarge(IOUtils.java:61) at s.IOUtils.copy(IOUtils.java:49) at s.IOUtils.toByteArray(IOUtils.java:39) at s.Sign.<clinit>(Sign.java:396) Usage: java -jar sign.jar my_1.apk [my_2.apk ...] [--override] [email protected] /PlaceApksHere $ cygpath -wal "/bin/sign.jar" E:\Sonu\Android-Root\Tools\Apk EDits!\Go Optimizer\MiniCygwin_GOptimize_v1.22\bi n\sign.jar [email protected] /PlaceApksHere $
Just Placed 'Goptimizer' with its parent folder and all works!
!
I found solution, it's to turn history expand off...Problem is 100% inin PATH...Code:!