Commit Graph

898 Commits

Author SHA1 Message Date
ddc4bb360a Cleanup trailing temp files/folders (#2742)
* test: add missing afterClass to cleanup BRUT* directory

* fix: properly cleanup apkFile temp after buildManifest
2022-01-17 07:19:22 -05:00
95874be448 Replace use of deprecated methods with their recommended replacements (#2713)
* Replace use of deprecated methods with their recommended replacements

* Add scripting jmod to proguard inputs
2021-12-13 06:27:19 -05:00
6cfe2987e5 fix: support for signature scheme v4 (#2705) 2021-11-27 07:41:15 -05:00
d29411117e fix: decoding references to private resources (#2650)
* fix: decoding references to private resources

* style: fix naming in constructor parameter

* test: add test to check build/decode private references
2021-10-17 12:01:54 -04:00
3b179f8750 refactor: rename ApkOptions -> Options/BuildOptions 2021-09-06 06:59:30 -04:00
3f09781939 docs: add missing docblocks for getHTML() in StringBlock 2021-09-01 07:40:41 -04:00
99166e3609 refactor: change test name of aapt2 issue 2632 2021-08-30 21:38:01 -04:00
851309dde0 Merge branch 'master' into refine 2021-08-30 21:17:49 -04:00
087142d4cf fix wrong HTML start/end tags in strings.xml (#2631)
* fix wrong HTML start/end tags in strings.xml
2021-08-30 21:15:23 -04:00
0645821883 fix: remove unneeded depth/logic in serializer 2021-08-30 20:59:53 -04:00
2e3f22af7c refactor: log first package if 2 2021-08-30 20:59:38 -04:00
5c6d091f39 Merge branch 'master' into refine 2021-08-30 18:48:04 +08:00
a0c2fef83b feat: new aapt1/aap2 binaries for mac (static) 2021-08-29 11:50:36 -04:00
caee50b35b test: adjust test for SDK S/T 2021-08-29 07:22:05 -04:00
f4a75fe761 refactor: remove SDK name from development sdk version 2021-08-29 07:22:05 -04:00
b80d13b56a fix: add support for proper API 31/S (12) + API 32/T (13) 2021-08-29 07:22:05 -04:00
fc2f12363d feat: new windows/linux aapt/aapt2 binaries 2021-08-28 14:27:30 -04:00
394394c3b5 feat: add new aapt/aapt2 binaries 2021-08-28 14:27:30 -04:00
c3e8be3e8a Reformat & Rearrange 2021-08-27 01:32:40 +08:00
94ed86db28 Code cleanups 2021-08-27 01:16:46 +08:00
e25c3636ff Update docs & licenses to use https 2021-08-26 07:40:32 -04:00
8d59882e5f Fix: numeric string meta-data value corruption (#2612)
* Fix: handle numeric strings in manifest meta-data value
* fix regex
* scoped solution
* improve comment

Co-authored-by: Cody Lund <colund@microsoft.com>
2021-08-17 07:01:08 -04:00
e4654e0b5f fix: write dummy resources as items 2021-07-04 09:49:59 -04:00
fad2f99541 style: return DexFile interface from SmaliDecoder 2021-07-04 14:12:38 +03:00
6cfa79e456 Determine minSdkVersion with baksmali for JARs + don't compress webp
We take advantage of the fact that baksmali can determine the minimum API version needed for a given collection of opcodes and extract it, then save to mMinSdkVersion, which is only used by smali via buildSourcesSmali.
This change, in addition to my previous change, allows to decompile and recompile JARs without worrying about specifying an API version via -api/--api-level.

As an extra, added webp file extension to NO_COMPRESS_PATTERN, according to AAPT2 standards, and since it's factually never compresses as it's an already compressed format.
https://cs.android.com/android/platform/superproject/+/master:frameworks/base/tools/aapt2/cmd/Link.cpp;l=2328
2021-07-04 02:14:56 +03:00
1ed1076a84 correction: don't clear resource table if it was already loaded 2021-07-04 00:16:22 +03:00
88d3d0038c style: organize some using statements for consistency 2021-07-03 23:24:42 +03:00
83f9693633 clean: get rid of useless throws 2021-07-03 23:15:10 +03:00
1472b50541 fix: pass opcodes=null for baksmali to auto-determine by dex version
When DexBackedDexFile gets opcodes==null, it calls getDefaultOpcodes(dexVersion) which returns the appropriate opcodes for the given dex version. No hints are required for baksmali, but only needed for smali.
https://github.com/JesusFreke/smali/blob/master/dexlib2/src/main/java/org/jf/dexlib2/dexbacked/DexBackedDexFile.java#L83
2021-07-03 23:05:04 +03:00
204b742cf0 Avoid abuse of getResTable calls and unneeded checks 2021-07-03 22:46:11 +03:00
1fd3f52b9d clean: setTargetSdkVersion used before manifest was decoded 2021-07-03 22:35:59 +03:00
992de66bac Handle setAnalysisMode properly 2021-07-03 22:17:00 +03:00
bb42159880 style: rename vars for consistency 2021-07-03 21:26:16 +03:00
d65c88a447 Merge branch 'master' into gradle7
# Conflicts:
#	build.gradle
2021-07-01 11:12:17 +08:00
a6138f3be4 feat: add helpful message if CantFindFrameworkResException is thrown 2021-06-26 07:02:46 -04:00
9f8ddb1bb0 feat: update internal framework to API 31 (S Beta 4) 2021-06-02 06:21:30 -04:00
66b1c30fa0 style: use new form of junit assertions 2021-05-31 06:43:40 -04:00
076ade6a51 TestImplementation jUnit in depends 2021-04-25 22:40:46 +08:00
8a8cd6eb89 Bump versions 2021-04-22 18:14:18 -04:00
c57a731d17 Update gradle to 7.0
Signed-off-by: pashamcr <36408873+pashamcr@users.noreply.github.com>
2021-04-16 11:22:17 +03:00
491d18058a test: fix incorrect 3-byte encoding. 2021-04-03 13:47:13 +03:00
f10060fe8f fix: when decoding with UTF-8 fails, create a new buffer for the retry with CESU-8.
If the decoding fails and there are UTF-8 decodable bytes before the bytes that couldn't be decoded, then the read index of the original buffer is incremented and those bytes will be missing from the decode result.
Now we create a new buffer and the decoding will start at the original start offset.

issue #2546
2021-04-03 13:28:22 +03:00
0a7b843786 fix: cleanup StringBlock from unused methods 2021-03-28 17:26:35 -04:00
d2288ef921 fix: remove unused smali builder methods 2021-03-28 17:26:19 -04:00
bddf575318 fix: remove no longer used resources on ResPackage 2021-03-28 17:26:08 -04:00
618d9b23e5 fix: remove unused methods from Res* data classes 2021-03-28 17:25:37 -04:00
edb4fc86cc fix: remove unused methods/properties from AXmlParser 2021-03-28 17:25:16 -04:00
8a23d0dbc1 refactor: correct spelling mistake of aapt 2021-03-28 10:54:31 -04:00
468ead8f10 test: add testcase for static field values 2021-03-28 07:44:16 -04:00
f4c2f9bc50 fix: remove declared exceptions that aren't thrown 2021-03-12 07:47:19 -05:00