[Android Software Development] gu5t3r:
Changelog:

2016-04-03 v1.44

Alowed use of Android API 1-23 for smali (23 is A6.0 MM)

Updated smali to v2.1.1

Updated ApkTool to v2.1.0

Updated pngquant with newest libpng v1.6.21 to v2.6.0

Updated jpegoptim with libjpeg v9b to v1.44

2014-12-22 v1.43

Don't optimize 9 patch png's by default as ApkTool can't read them and decompile apk after....

Alowed use of Android API 1-21 for smali...

Updated smali to 686cf35c8e9d7eedc5af5989671917719dfe320a (2014-11-07)

Updated ApkTool to 2bd1e595df7dd0743f972845bd5874e8db65cd95 (2014-12-18)

Updated pngquant with newest libpng v1.6.15 to v2.3.1 (cc39b47799a7ff2ef17b529f9415ff6e6b213b8f) (2014-12-12)

Updated jpegoptim with libjpeg v9a to v1.42 (c6fa01bd56e00b764560b5ad3e1436ef829279c0) (2014-12-22)

2014-07-16 v1.42

Don't overreduce colors on 9-patch pngs...

Recompiled zopflipng with O3 and some other optimizations for 30% speedup...

AutoRepair APK's with bad header...

Updated pngquant to v2.3.0 (8d21a4563e)

2014-06-26 v1.41

GOptimize now also optimizes 9-patch (*.9.png) png's; To disable optimizing of 9-patch pngs use -9 option...

Updated libpng to v1.6.12 and recompiled pngquant with it

2014-06-19 v1.40

Updated ApkTool to 2.0.0-RC1-a7b06f161b91dfdf985a717e9713dff5c46688b7 https://github.com/iBotPeaches/Apktool/commits/master

Updated pngquant to 2.2.0-860f9fb80fceac2998242ed7c5327da480964d24 https://github.com/pornel/pngquant/commits/master

Fix: Removed need for tr.exe. (although I still put it in bin just in case =)

Removed posterize because its inferior to pngquant. (-c option is now -q0-100 aka -q0)

Improved -Ei option to remove non-required strings from required languages except the ones you want to keep. Works on YouTube now...

2014-06-01 v1.39

Changed default action to "goptimize -p -q50 -j0 -a0 -d6 -l6 *.apk;" as pngquant is much better than posterizer and setting -q50 is actually pngquant quality 50-100 so it won't reduce colors more than once no matter how many times you apply it...

In v1.38 cleaning of unneeded languages no longer worked with newest ApkTool, so I needed to change my code to read from new ApkTool output and as I were doing it I rewrote code for required strings integration to work better...

Compiled with libpng-1.6.10 and lcsm-2.6 and updated pngquant to 2.2 git-917f5e796d9d96ce22af25808e49ff24e4190176

Updated jpegoptim to v1.4.1 git-33aabed13dc24e16292405b79a13305059ba453a

Updated ApkTool to 2.0.0-RC1-848f0d6b5fb195f73222177ee161e35e6a1e65a6

2014-04-30 v1.38

Updated all Cygwin tools

Compiled with libpng-1.6.10 and lcsm-2.6 and updated pngquant to 2.2 git-636151dd8e

Updated jpegoptim to git--e9dc8ef069

Updated zopflipng to zopfli-Hello71-e7778ddedb with bunch of fixes

Some script improvements...

2014-04-09 v1.37

Added ability to specify advanced MIN-MAX thresholds when using pngquant; it's defaults are -q 45-85

2014-04-09 v1.36

Added converting pngs's to 8-bit using PngQuant; -q [0-100] option

Updated smali v2 & ApkTool v2

smali v2 is now used as default instead v1

2014-03-14 v1.35

Updated smali2: 2014-02-02 smali 2.0.3-2d8cbfe6.7z

Updated ApkTool v2 to 2014-03-09 ApkTool-GitHub-1e3b66f9be

Some layout folders were not removed when cleaning languages on newer apps

GOptimize now displays which version of ApkTool is used for cleaning

2014-01-20 v1.34.02

Updated smali2 & baksmali2 to 2014-01-18 smali 2.0.3-4357de47

Updated ApkTool v2 to 2014-01-19 ApkTool-GitHub-a91e87bb04

2013-12-14 v1.34.01

Updated smali2 & baksmali2 to GitHub-eae0b0edbf

Updated ApkTool v2 to beta 8 GitHub-d5d03fe1e4

2013-11-27 v1.34

Fixed Bug where using a combination of -p, -j and -r options without -R would cause all files to be stored in apk without compression

Updated ApkTool v2 to beta 8 GitHub-a1ca5019d8

2013-11-17 v1.33

Default options changed to "goptimize -p -j0 -a0 -d5 -l5 *.apk;" because now it auto detects number of CPU cores for PNG optimization. -m option no longer needed.

You can also use shortcut -pczo for maximum png optimization instead -p -c -zo

NEW FEATURE: When cleaning unneeded languages use -Ei option to try to integrate only required strings from required languages to public strings to make even smaller resources.arsc; example "goptimize -e- -Ei *.apk"

-Ea is alternative apk repacking on cleaning unneeded languages if apk does not work after; you can use both -Eai; -Eia does the same...

Updated ApkTool v2 to 2.0.0-Beta8-d2fc74d984 (GitHub)

Updated smali v2 to v2.0.2

Added defluff to PNG optimization chain for maximum PNG structure optimization

Code improvements and cleanup...

2013-10-30 v1.32

FIXED Bug in Cleaning languages where optimizing multiple apps would cause required languages to accumulate i.e. detected required languages from above apk would not be removed from below/latter apks because I forgot to reset variables (or make them local).

Thanks [MENTION=303041]ct_moi[/MENTION] for detection =)

2013-10-29 v1.31

Added some code to avoid where Median Cut Posterizer could make some small (<8kB) png's bigger than original.

I was GOptimizing JEFIT with -czo and freaked out when PNG Savings went -100kB, so I added some code to avoid that =)

Updated TruePNG binary to v0.4.1.1

2013-10-26 v1.30

Cleaning of unneeded languages works fine as long as ApkTool is able to rebuild apk; only problematic app which gets corrupted is GMail

Known language codes: af am ar be bg bn ca cs da de el en es et fa fi fr gu hi hr hu id in it iw ja kn ko lt lv ml mr ms nb nl pa pl pt ro ru sk sl sr sv ta te th tl tr uk vi zh zu

NEW Feature: -c; Pre-process PNG's with Median Cut Posterizer (posterize -d -Q 100; maximum quality) which makes PNG's more compressible and save 2-3X more kBs with almost none visual difference. However, keep in mind it's lossy optimization.

Updated ApkTool v2 beta 7 to GitHub-2ef25fe5e2 latest version

Updated smali 2.0.1 to GitHub-263083faed latest version

Updated TruePNG to 0.4.0.9

Replaced PNGZopfli with ZopfliPNG which is better tool.

Default GOptimize options are now in bin\.DefaultGO file for easier editing

-zo option is now default instead -zb; you can still use -zb, it does the same as -zo;

PNG Optimization code improvements

Java 1.7 or above required for -b and -e

Archives are RAR5 format and WinRAR5 is needed to extract.

2013-10-17 v1.27 beta 12

Changelog Here

2013-10-01 v1.26

Fixed -t i.e. signing not working in v1.25

2013-09-30 v1.25

Introduced Smart Recompression, read extra help.

Improved removing debug info, no -s option needed unless you want to strictly force smali v1 or v2

Reduced passes when recompressing from 16 to 11, difference is less <1kB on 16MB apk but now recompressing is faster...

2013-09-26 v1.24

Added jpe and jfif extensions to search list when optimizing jpg's which now is: jpg, jpeg, jpe, jfif.

Found and FIXED bug where files with no extension were not recompressed on -r option

ReWorked some compression code for easier reading and editing

Paths containing '!' (exclamation mark) will no longer be problem for script.

Minor code improvements...

You can now write -zo instead -zb if you like, it's easier for me =)

Updated smali v2 to 2.0b6 which can now remove debug info from some *****y classes.dex which smali 1.4.2 and 2.0b5 couldn't.

2013-09-25 v1.23

Added -j option to optimize jpg images in apk using jpegoptim

-j0 is lossless optimization and is recommended; it only strips unnecessary info from jpg (like which app is used to create it) and optimizes huffman coding

If you want to lower jpg's size even more, use -j95 which will recompress jpg's (and optimize) that are unnecessary big and only perform lossless optimization on others.

Every JPG compression guide agrees that compression level above 95 is pointless and creates unnecessary big jpg's.

I also left you choice to choose compression level between [75-100]

Reworked code for APK recompressing for easier adding of file extensions/formats that should always be uncompressed

Also added zip and lzma to that list

Improved reading Java bin path from bin/.JavaPATH

Removed "Packing PNG's" info line after optimizing pngs; don't worry, optimized png's are still packed in apk

2013-09-22 v1.22

Added -t option to sign apk with Android test certificate so you can install goptimized apk's (Java configuration required)

2013-09-13 v1.21

Further improved MT PNG optimization

Added -s2 option so you can try removing debugging info using smali/baksmali v2 beta if default v1.4.2 fails

ReWorked compression levels; Read Extra Help; -he or -hh option

Updated TruePNG to 0.4.0.8

Updated CygWin Tools

Lots of "can't remember right now" minor fixes

2013-08-15 v1.20

PNG optimization MultiThreading code optimized, should be ~30% faster now....

PNG optimization now runs with low priority so it does not interfere with other apps and can run in background (will not make flash player stutter anymore, and other apps lag), but it uses 100% CPU if you're not using it because of new MT code...

PNGZopfli code optimization

2013-07-12 v1.19

MultiThreading code optimizations

PNGZopfli updated to 1.2

I contacted author of PNGZopfli and TruePNG (http://x128.ho.ua) about some multithreading bugs in PNGZopfli for which I had to use sort of hack to work... It's now fixed in 1.2 and should be faster a bit...

Multiple ManualGO shells can be launched now as temp folder is named as apk...

Other minor fixes

2013-07-10 v1.17

NEW Feature: Removal of debug data from classes.dex using baksmali/smali; to use -b option you need to have JAVA installed and java bin path saved in /bin/.JavaPATH which is usually C:\Program Files\Java\jre[version number]\bin

Script should be failsafe, i.e. revert on default classes.dex if baksmali/smali outputs any error

You need to specify your roms API level for debug data removal. If you don't know it, use -b14. API LIST

NEW default options are: -m4 -a0 -d5 -l5

Switched -l and -k option as it seems more logical to use -l for libraries recompression and -k for keep only architecture...

Default options can be changed in /bin/.GOptimize file

NEW feature: PNGZopfli; use PNGZopfli instead PNGout in PNG optimizing chain with -zz option to save few more kB at cost ~20% more time; use both PNGout + PNGZopfli with -zb option for maximum kB savings on PNG optimizing at cost of extra ~20% more time needed for optimization

MultiThreading extended up to 16

TruePNG binary updated to 4.0.0.6

Lots of code optimization

2013-07-06 v1.15

Updated list of files that should always stay uncompressed for recompress option: png, jpg, jpeg, gif, wav, mp2, mp3, ogg, aac, mpg, mpeg, mid, midi, smf, jet, rtttl, imy, xmf, mp4, m4a, m4v, 3gp, 3gpp, 3g2, 3gpp2, amr, awb, wma, wmv.

2013-07-06 v1.14

NEW: MultiThreaded PNG optimization, made it faster x2-8 times dependable on how many cores your cpu have

NEW Features: Separate compression level for resources.arsc, classes.dex and libraries

New default options are "-m2 -a0 -d5 -l5" to use 2 threads for png optimization and recompress dex and libs with CL5 to make smaller apk as dex and libs are never accessed from apk, they are extracted on installation

In v1.14 default behaviour can be changed in /bin/.GOptimize

2013-06-21 v1.13

NEW Feature: Remove libraries not needed by your phone architecture... Why should you keep libraries for other architectures?

Example: Tapatalk_4.0.14.apk; By removing libraries not for LT18i (armeabi-v7a) APK size is reduced from 10.6MB to 7.88MB; and by further optimizing PNG's APK size is reduced to 7.49MB. That is 3.11MB of unnecessary data...

FIX: APK's were getting mis-flagged as corrupted on recompression

2013-06-04 v1.12

APK's containing zip comments were mis-flagged as corrupted after optimization

Script displays a message when no resources.arsc detected...

2013-05-30 v1.11

Script will skip PNG's with corrupted header (or invalid ones)...found in UHD 3.1 beta UxpNxtLockScreen.apk->default_wallpaper.png

2013-05-29 v1.10

Saved size on PNG Optimization is now better and correctly calculated

(On previous versions, saved size displayed was usually smaller than correct one and sometimes it displayed 0 when few kBs were saved)

Script now displays also percentage saved on PNG's

Added check for APK file to be correct type (ZIP)

Added check for APK to contain all files after optimization

BATCH scripts can now be run as administrator

FIXED: Stumbled upon error when GOptimizing eBay app, for some reason if not run as admin, some files were extracted with permission 000 which caused APK to miss some files

MISC Tweaks and Code optimization

2013-05-19 v1.04

"goptimize.sh *.apk" now works and optimizes all apk's in current directory

Treats files case-insensitive so ".PNG"'s also get optimized

Minor fixes and code rearrangement

2013-05-18

Made MiniCygwin_GOptimize_v1.02.7z which already contains all binaries and Cygwin tools. Just run GOptimize.cmd...