Commit Graph

1256 Commits

Author SHA1 Message Date
7a3d09cc47 Add ability to list methods/fields/types when assembling with smali
This can be useful in analyzing why you are going over the 64k
method/field/type limit
2015-09-30 14:17:16 -05:00
52fd17a436 Handle invalid debug item offsets more gracefully 2015-09-30 14:16:48 -05:00
fd489e990c Add backwards compatible version of DexFileFactory.loadDexFile and Opcodes
Keep the old prototype, so we don't break existing code.
2015-09-30 14:16:29 -05:00
008b12f97c Replace a missed usage of Iterators.emptyIterator() 2015-09-30 14:16:15 -05:00
5cd9d01a9e Remove usages of the deprecated Iterators.emptyIterator() method 2015-09-30 14:14:05 -05:00
027e135d41 Merge branch 'phhusson-fix-flag-ref' 2015-09-12 15:07:58 -05:00
0d53923e24 Merge branch 'fix-flag-ref' of https://github.com/phhusson/Apktool into phhusson-fix-flag-ref 2015-09-12 15:07:49 -05:00
52dc52c2d3 add failing unit-test for reference in attribute 2015-09-12 15:07:32 -05:00
22305ccb7c travis ci no longer supports jdk switch on mac hosts 2015-09-12 14:39:51 -05:00
e7b294a3ea Fix flags being defined as references 2015-09-10 18:07:00 +02:00
e8ad159438 Some APKs are reporting wrong pkgId
- fallback to renamed package to find that pkgId
2015-08-21 11:01:43 -05:00
579d7c561e fixes #1021
- adds support for godzillaui
2015-08-15 10:29:24 -05:00
4219997470 update internal aapt to include various patches
- miui support for godzillaui
 - miui support for 4 digit mnc/mcc
 - no-op the compat functions
2015-08-15 10:20:05 -05:00
5c6f325c06 Merge pull request #1020 from agrieve/stored-entries
Adds doNotCompress list to apktool.yml
2015-08-15 09:11:26 -05:00
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
2033e305af Prevent reading resources when -r / --no-res is used 2015-08-11 13:47:10 -05:00
099cc0fcb3 fixes #1005
- handles apks that have .9.xml files
2015-08-03 08:45:30 -05:00
f49335ab99 start next dev cycle (2.0.2-SNAPSHOT) 2015-07-15 17:08:05 -05:00
f5c6925943 version bump (2.0.1) 2015-07-15 16:17:05 -05:00
59c5316d94 Merge pull request #991 from mmastrac/master
Propagate the raw int values to callers
2015-07-14 08:51:37 -05:00
4249dde7cc Propagate the raw int values to callers 2015-07-07 15:39:22 -06:00
d5f3b3fd5a [skip] its com.miui.core now 2015-06-29 11:33:13 -05:00
b878cbd776 [miui] add a new ignored package 2015-06-06 10:43:48 -05:00
0370416d90 Add the generated accessorTest to source control
Some java compilers don't generate the synthetic accessor methods in the
way that the accessorTest is trying to test. So we build the test dex
file using a known-good compiler and check it in, ensuring the test is
always run using an appropriate dex file.

Conflicts:
	brut.apktool.smali/dexlib2/build.gradle
2015-05-23 19:43:56 -05:00
6ee029dd30 Read extra data if over known bytes
If the ResConfig had a size over KNOWN_CONFIG_BYTES
then the remaining bytes would be read twice, thus breaking
the next config. Fixes #924
2015-05-22 09:07:15 -05:00
2c1226fab8 [skip] use append instead of concat 2015-05-22 08:47:51 -05:00
8254764c6c More robust ResFileValue detection
Previously in 4882396163, strings that
resembled a filepath (ie res/foo/file), would be assigned to a
ResFileValue, which when attempted to be casted to ResScalarValue would
error out.

Attempting to check the filesystem for such files, slowed apktool's
execution majorly. In order to prevent this, the ClassCastException
and other checks related to checking ResFileValue when type is string
was added.

This allows bogus strings such as (res/foo/file) to be added, but the
exception is caught and allows decoding to continues. Fixes #921.
2015-05-14 13:27:22 -05:00
9cb3df85d8 Catch attr lookup on internal attributes
Internal attributes will fail the AttrDecoder. Catch the errors
and simply return the undecoded value which will be correct. Fixes #913
2015-05-10 07:36:44 -05:00
48285bde03 Prevent frameworks from modifying sharedLibrary
Since all frameworks are decoded the same via readPackage(), reading
a framework that was a sharedLibrary would throw the sharedLibrary
flag for the apk. Since packageName isn't set until after the first
decode, we check the values to make sure we only set this variable on
the first apk decoded. Refs #936
2015-05-05 07:43:48 -05:00
1fb87e3e4c Post smali 2.0.6 cleanup
- fix smaliDecoder/AccessorTest to use new DexFileFactory params
 - remove unneeded ds/tree files
 - cleanup unmerged lines
2015-05-02 06:59:36 -05:00
4cc5f07fd2 Bump the version number to 2.0.6
Conflicts:
	build.gradle
2015-05-01 10:53:51 -05:00
91a47123bf Ensure the stream is closed in DexFileFactory.loadDexFile 2015-05-01 10:53:08 -05:00
f803a08711 Upgrade to proguard 5.2.1
Conflicts:
	build.gradle
2015-05-01 10:52:58 -05:00
122af6253c DuplicateTest FAILED fix 2015-05-01 10:52:00 -05:00
90e6923ae7 Fix a bounds check problem in IndentingWriter 2015-05-01 10:51:37 -05:00
fa773b5382 Comment out unused switch payload instructions 2015-05-01 10:51:27 -05:00
7b3e5a1668 Don't wrap a large (>32k) register count in a register directive 2015-05-01 10:51:13 -05:00
1c084171ed Duplicate a switch payload that is refered to multiple times 2015-05-01 10:50:38 -05:00
395043667a Ensure that sparse switch items are written out in the correct order 2015-05-01 10:50:11 -05:00
32a400396d Fix up the whitespace normalization in TextUtils.normalizeWhitespace
Previously, all inter-line whitespace was being removed. And it now
normalizes trailing new lines as well
2015-05-01 10:49:40 -05:00
a01bf8c832 Don't propagate exceptions from RoundtripTest.runTest() 2015-05-01 10:49:29 -05:00
ce8a993bc7 Extract out a base RoundtripTest and IdenticalRoundtripTest class 2015-05-01 10:49:08 -05:00
6d3497f72d Add Member and Annotatable interfaces 2015-05-01 10:48:36 -05:00
eb3b01f318 Make sure the elements are sorted in an encoded annotation 2015-05-01 10:48:11 -05:00
757e1dac45 Don't assume dx is on-path. Rather, grab it from maven central
The version of dx in maven central seems to be fairly old, but it works
well enough for our purposes.

Conflicts:
	build.gradle
2015-05-01 10:48:00 -05:00
58b7c27316 Add lambda experimental dalvik opcodes
* Add new -X/--experimental flag to [dis]assemble opcodes not in art yet
* Add new opcodes liberate-variable, box-lambda, unbox-lambda,
                  capture-variable, create-lambda, invoke-lambda
* Add support for encoding 25x instructions
* Adds LambdaTest to check new opcodes assemble/disassemble properly

TODO: invoke-lambda-range

Change-Id: I5c8bcbfa8b6cb9a13ef2017fce2d1b7fda6e11c3
2015-05-01 10:46:51 -05:00
d54c78d966 Use [^] for the lexer's catch-all rule
[^] matches the entire character set, while . doesn't match new lines, etc.
2015-05-01 10:46:07 -05:00
8284715f4d Don't try to test for reserved file names
Instead, we'll just check os.name
2015-05-01 10:45:50 -05:00
b903c2066a Enable parallel gradle execution by default 2015-05-01 10:45:01 -05:00
df0156aa7e Use single-quotes in build.gradle files when double-quotes aren't needed
Conflicts:
	brut.apktool.smali/baksmali/build.gradle
	brut.apktool.smali/smali/build.gradle
	build.gradle
2015-05-01 10:43:59 -05:00