Commit Graph

119 Commits

Author SHA1 Message Date
Connor Tumbleson
d755724ed8 Revert "decode: only store full relative path to uncompressed assets"
This reverts commit bd9c9c7cec.
2018-04-06 14:59:03 -04:00
Connor Tumbleson
0700c684b6 Revert "build: introduce "buildUnknownAndUncompressedAssets""
This reverts commit e35f66b0e0.
2018-04-06 14:58:35 -04:00
Connor Tumbleson
72196f3544 Revert "fix: normalize paths for uncompressed assets & unknown files"
This reverts commit ca25a26944.
2018-04-06 14:58:11 -04:00
Connor Tumbleson
bb42ef068e Revert "fix: Applications with implicit sdk versioning lose that information"
This reverts commit 25a164dd10.
2018-04-06 14:57:09 -04:00
Connor Tumbleson
041659c43f style: output "built apk" when task is completed 2018-04-06 14:03:42 -04:00
Connor Tumbleson
25a164dd10 fix: Applications with implicit sdk versioning lose that information
- This is a temporary hack to keep application building, but will not
 work due to missing nearly all resources.
 - refs: #1761
2018-04-06 14:02:41 -04:00
Connor Tumbleson
ca25a26944 fix: normalize paths for uncompressed assets & unknown files 2018-04-06 10:31:28 -04:00
Connor Tumbleson
e35f66b0e0 build: introduce "buildUnknownAndUncompressedAssets"
- processes assets that are stored (uncompressed)
 - additionally process unknown files
 - modifies application after build process
 - prevents "too long" execution command
 - fixes #1272
2018-04-05 17:07:55 -04:00
Connor Tumbleson
bd9c9c7cec decode: only store full relative path to uncompressed assets 2018-04-05 17:07:55 -04:00
Connor Tumbleson
448d14592f aapt2: don't rebuild compile stage unless needed 2018-02-28 18:40:13 -05:00
Connor Tumbleson
f05bd31e59 aapt2: sparse resource pulling from yaml 2018-02-28 11:05:07 -05:00
Connor Tumbleson
5a8bc45653 aapt2: aapt2 is a staged build (compile and link).
- we destroy the "compile" stage item after a link, but keep the pending directory
 - apktool then cannot complete link stage
 - if aapt2 is used, lie to system and re-process
 - todo: rethink this
2018-02-22 11:22:40 -05:00
Connor Tumbleson
a8bdad628a aapt2: wire up zipPackage() instead of using aapt1 for final apk package 2018-02-22 11:22:40 -05:00
Connor Tumbleson
34a2d03b31
Support for applications with an empty resources.arsc file
- fixes #1730
2018-02-19 06:45:48 -05:00
Connor Tumbleson
9fc1ede991
License 2018 update 2018-02-16 08:26:53 -05:00
Connor Tumbleson
e7d511adf8 Remove unused line
- refs: no issue
2018-02-08 15:17:51 -05:00
Connor Tumbleson
d1857102dd Add spaces where missing to make logic easier to read
- refs: no issue
2018-02-08 15:14:19 -05:00
Connor Tumbleson
bca474272e Support for rebuilding root depth kotlin folder
- refs: #1703
2018-02-07 09:42:56 -05:00
Connor Tumbleson
2b9728e9f3 Prevent ugly "Content is not allowed in prolog" warning
- fixes: #1634
2017-12-01 15:21:47 -05:00
Connor Tumbleson
3ec4f360ab
Add support for shorthand SDK for bounding check
- fixes #1630
2017-09-28 08:23:02 -04:00
Connor Tumbleson
f0f87c844e Adds ability to skip asset files
- fixes #1605
 - prevents rebuild
2017-09-19 15:51:04 -04:00
Connor Tumbleson
eee73b945d Support for VRHeadset Qualifier 2017-08-23 13:05:08 -04:00
Connor Tumbleson
f9c091f54b refactor sdk codename to sdk level into function 2017-08-15 15:35:26 -04:00
Connor Tumbleson
02c8b62b00 Prevent malicious directory/file work with unknown files 2017-07-05 12:45:17 -04:00
Connor Tumbleson
1597c12472 changed all license files 2017-07-05 12:05:52 -04:00
Connor Tumbleson
93d61cc07a kotlin folder should not be treated as unknown - #1520 2017-07-04 09:55:50 -04:00
Connor Tumbleson
e1f7ac355e
add support for preview builds (N, O) 2017-05-08 09:03:13 -04:00
Marc Miltenberger
66c1b46865 Closing Framework and APK after use
This commit should fix https://github.com/iBotPeaches/Apktool/issues/1160
2017-05-02 08:21:09 +02:00
Connor Tumbleson
891d0d39e0 Refactor ExtFile to brut.j.dir
- move to using Paths when possible
 - adapt calls to FileDirectory to leverage Paths
2016-12-25 07:57:41 -05:00
Connor Tumbleson
6361fa9725
Evolve Update-Framework to Empty Framework Directory
- allows emptying of framework via (empty-framework-dir)
 - checks in place to only delete files that are APKs, non recursive
2016-10-06 09:18:16 -04:00
Connor Tumbleson
daa1e1d753
Updating Framework Support 2016-10-06 07:21:10 -04:00
Connor Tumbleson
c1b4e0d321
Merge branch 'smali-api-level' of https://github.com/benjamin-promon/Apktool into benjamin-promon-smali-api-level 2016-09-18 16:47:04 -04:00
Benjamin Adolphi
db35f54af6 Pass minimum api level to smali library
When apktool creates a DexBuilder class, it creates it without specifying a minimum api level. This causes the DexBuilder class to assume api level 20 by default. This is not ideal since in some cases, the concrete minimum api level is required.

One such case is in smali's DexWriter class which implements a workaround for a bug in Dalvik that was fixed in Android 4.2 (https://code.google.com/p/android/issues/detail?id=35304) that causes apps that call the Method.getParameterAnnotations api to crash in some cases (see bug report for more details). The workaround that smali implements is only triggered if the minimum api level is below 17 (Android 4.2). But since apktool effectively sets the minimum api level to 20, this code is never triggered causing apktool to create apk files that crash on devices below Android 4.2.

This change passes the minimum api level to the smali library.
2016-09-15 00:31:32 +02:00
Connor Tumbleson
7801a4bbf2
don't compress mkv/webm 2016-08-24 08:44:24 -04:00
Connor Tumbleson
bada6441ec
don't edit the original Manifest
- use dummy copy and restore original after build
2016-08-06 09:45:18 -04:00
Connor Tumbleson
6e509695eb
Patch newest AndroResGuard format 2016-08-06 07:56:17 -04:00
Connor Tumbleson
3a982948ea
Adds full filepath for STORED files in case of multiple extensions
- fixes #1244
 - prevents greedy extension check STORE`ing too many files
2016-07-29 09:21:52 -04:00
Connor Tumbleson
87315af36e Remove previous android:debuggable value to allow changing
- adds unit test
 - normalizeNewlines moved to TestUtils
2016-04-28 08:31:36 -04:00
Connor Tumbleson
ea2c821fa5 Add support for AndResGuard
- fixes #1170
2016-03-10 09:29:49 -05:00
Connor Tumbleson
cd852cd658 Removes SmaliDebugging
- fixes #1061
2016-02-27 20:20:53 -05:00
Connor Tumbleson
b29df52b87 Cleanup unclosed streams plus formatting
- run FindBugs to find problems
2016-02-14 20:34:06 -05:00
Rover12421
123912d226 Apktool.yml file (MetaInfo) using object serialization
non-printable character more intuitive, does not affect printable
character view
2016-01-22 06:28:03 -06:00
Connor Tumbleson
0011498b52 [skip] rename var to match extension or file without extension 2016-01-06 12:49:55 -06:00
Andrei Zhukouski
22bd5b0acc Fixes issue #1122 2016-01-04 13:15:54 +03:00
Ira Hanson
8232ee0ea8 Consistently encode unknown filenames to prevent cast error 2016-01-02 21:40:15 -06:00
Connor Tumbleson
5e4bae0526 Only stores extension(s) of uncompressed files
- fixes #1053
2015-10-13 07:28:43 -05:00
Andrew Grieve
392420c909 Adds doNotCompress list to apktool.yml
This is the list of files (resources, assets, etc) that are stored in
the .apk uncompressed.

For apps that use AssetFileDescriptor.openFd(), the adding compression
will break the call.

Maintains support for the resourcesAreCompressed key, but no longer
records it when decompiling (it instead records resources.arsc in the
doNotCompress list).
2015-08-14 11:52:33 -04:00
Connor Tumbleson
e407fe839b Correctly rebuild /libs & /lib folder on [b]uild 2015-04-22 07:21:02 -05:00
Connor Tumbleson
3208624bf6 Moves all XML parsing related functions to new class: ResXmlPatcher 2015-04-16 08:24:30 -05:00
Connor Tumbleson
addbf8336d [WIP] Wires up rewriter of @string references in provider attrs
- finds all <providers> in manifest
 - finds corresponding @string in res/values/strings.xml
 - does reference replacement w/ literal value
 - fixes #636
2015-04-16 08:24:30 -05:00