Using apktool (version 2.1.0) I decode an APK as follows:
$ apktool d test.apk
I: Using Apktool 2.1.0 on test.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /Users/*****/Library/apktool/framework/1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
$
Without making any changes whatsoever, I immediately rebuild the APK as follows:
$ apktool b test
I: Using Apktool 2.1.0
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...
I: Copying unknown files/dir...
$
The resulting APK file is almost twice the size of the original:
$ ls -la test.apk
-rw-r--r--@ 1 ***** staff 10266918 Aug 9 13:15 test.apk
$ ls -la test/dist/test.apk
-rw-r--r-- 1 ***** staff 19656549 Aug 9 13:20 test/dist/test.apk
Any ideas as to why the size has increased? A decrease in size I would attribute to the resulting APK file being unsigned... Note that I performed the same experiment with APK Studio, which has version 2.0.2 of apktool built-in, and there the resulting APK file is in fact a little smaller. Am I missing something obvious, or is this a known difference in behavior between the two versions of apktool? Thanks in advance...!!!