New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unity packed assets are skipping compression, bloating apk size. #1244

Closed
designzoo-peter opened this Issue May 13, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@designzoo-peter

designzoo-peter commented May 13, 2016

Information

  1. Apktool Version (apktool -version) - 2.1.1
  2. Operating System (Mac, Linux, Windows) - Mac
  3. APK From? (Playstore, ROM, Other) - Personal APK

Stacktrace/Logcat

Gordons-iMac:android dzoo$ apktool if template.apk -p .
I: Framework installed to: ./127.apk
Gordons-iMac:android dzoo$ apktool d template.apk -p . -f
I: Using Apktool 2.1.1 on template.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: ./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...
Gordons-iMac:android dzoo$ apktool b template -f -p .
I: Using Apktool 2.1.1
I: Smaling smali folder into classes.dex...
I: Building resources...
I: Copying libs... (/lib)
I: Building apk file...
I: Copying unknown files/dir...

Steps to Reproduce

  1. apktool if template.apk -p .
  2. apktool d template.apk -p . -f
  3. apktool b template -f -p .

Template file size - 42.3mb
New build size - 72.4mb

Frameworks

N/A

APK

https://drive.google.com/open?id=0B0OESZeCanYUMVhzbUFEQVlwRFU

Questions to ask before submission

  1. Have you tried apktool d, apktool b without changing anything? Yes, same result
  2. If you are trying to install a modified apk, did you resign it? N/A
  3. Are you using the latest apktool version? Yes

@iBotPeaches iBotPeaches added the Bug label May 18, 2016

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches May 18, 2016

Owner

Original

1048576  Defl:N   334327  68% 2016-05-13 08:37 33f33516  assets/bin/Data/sharedassets0.assets.split0
 1048576  Defl:N   390300  63% 2016-05-13 08:37 5e3296e6  assets/bin/Data/sharedassets0.assets.split1

Rebuilt

1048576  Stored  1048576   0% 2016-05-18 07:30 33f33516  assets/bin/Data/sharedassets0.assets.split0
 1048576  Stored  1048576   0% 2016-05-18 07:30 5e3296e6  assets/bin/Data/sharedassets0.assets.split1

Yet apktool.yml is listing those extensions, which it shouldn't.

doNotCompress:
- arsc
- resource
- split0
- split1
- split2
- split3
- split4
- split5
- split6
- split7

Might be because there is like 2 extensions for this unity stuff. .assets.split#.

Owner

iBotPeaches commented May 18, 2016

Original

1048576  Defl:N   334327  68% 2016-05-13 08:37 33f33516  assets/bin/Data/sharedassets0.assets.split0
 1048576  Defl:N   390300  63% 2016-05-13 08:37 5e3296e6  assets/bin/Data/sharedassets0.assets.split1

Rebuilt

1048576  Stored  1048576   0% 2016-05-18 07:30 33f33516  assets/bin/Data/sharedassets0.assets.split0
 1048576  Stored  1048576   0% 2016-05-18 07:30 5e3296e6  assets/bin/Data/sharedassets0.assets.split1

Yet apktool.yml is listing those extensions, which it shouldn't.

doNotCompress:
- arsc
- resource
- split0
- split1
- split2
- split3
- split4
- split5
- split6
- split7

Might be because there is like 2 extensions for this unity stuff. .assets.split#.

@iBotPeaches iBotPeaches changed the title from Decompile then Build nearly doubles the file size to Unity packed assets are skipping compression, bloating apk size. May 18, 2016

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Jul 29, 2016

Owner
-rw-rw-r-- 1 ibotpeaches ibotpeaches 42265664 May 18 07:29 template.apk
-rw-rw-r-- 1 ibotpeaches ibotpeaches 42613078 Jul 29 08:48 template-rebuilt.apk

Adapted check to look for multiple dots, if so we can't reliably determine what the extension is, so we use full file path.

Owner

iBotPeaches commented Jul 29, 2016

-rw-rw-r-- 1 ibotpeaches ibotpeaches 42265664 May 18 07:29 template.apk
-rw-rw-r-- 1 ibotpeaches ibotpeaches 42613078 Jul 29 08:48 template-rebuilt.apk

Adapted check to look for multiple dots, if so we can't reliably determine what the extension is, so we use full file path.

iBotPeaches added a commit that referenced this issue Jul 29, 2016

@iBotPeaches iBotPeaches added this to the 2.1.2 milestone Jul 29, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment