- when using aapt and debug flag, we remove the 'debuggable' attribute from AndroidManifest and aapt adds it back. (see issue 1621)
- when using aapt2 and debug flag, we add and set the value of 'debuggable' attribute ourselves.
* The empty test file needs to be STORED in the testapp, so put it on
the initial doNotCompress list.
* It needs to have a file extension that matches the NO_COMPRESS_PATTERN.
* assertNotSame tests for object equality, which doesn't work for String
comparisons.
We do not want one empty file to cause all files with that extension to
not be compressed, so we always put the full filename on the doNotCompress
list in this case.
1.base on AOSP's frameworks/base/tools/aapt/Package.cpp: NO_COMPRESS_PATTERN = Pattern.compile("(jpg|jpeg|png|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|webm|mkv)$"); specifically this rule include 9patch files.
2.file has not ext
3.the compressive type is store
warning:
even if there are the same type of files, they are compressive type may different, just like this example:
-rw---- 1.0 fat 8343 b- 0% stor 80-Jan-01 08:00 assets/resources/assets/effect/common/ctp_trail15_1_tex.unity3d
-rw---- 1.0 fat 11526 b- 0% stor 80-Jan-01 08:00 assets/resources/assets/effect/common/ctp_trail15_tex.unity3d
-rw---- 2.0 fat 2483 bl 19% defN 80-Jan-01 08:00 assets/resources/assets/effect/common/cw_310300_cylq_ql01_mat.unity3d
-rw---- 2.0 fat 9467 bl 17% defN 80-Jan-01 08:00 assets/resources/assets/effect/common/cw_310300_cylq_ql03_fbx.unity3d
ctp_trail15_1_tex.unity3d and ctp_trail15_tex.unity3d are uncompressed, but cw_310300_cylq_ql01_mat.unity3d and cw_310300_cylq_ql03_fbx.unity3d are compressed.
That is why I modified recordUncompressedFiles Method.
Windows has its limits, even Windows 10, at least on older versions before the max path length restriction was removed.
Because apktool failed to recognize the .9.png extension as a variety of the .png extension, those .9.png files were piling up in apktool.yml and then passed to aapt, which would fail to run on Windows because of an immense command length.
This fix makes a special exception for the .png exception and will allow the .9.png one to pass as another .png extension.
Before: http://dpaste.com/2BC3RRB
After: http://dpaste.com/177CVZQ
This old issue prevented the package to be renamed from com.miui.core to miui, making it impossible to recompile, as all attributes are refefred to as miui:*/*. This fixes it permanently.