Commit Graph

265 Commits

Author SHA1 Message Date
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
468ead8f10 test: add testcase for static field values 2021-03-28 07:44:16 -04:00
447ba50332 refactor: drop author tags and support javadocs 2021-03-07 15:06:45 -05:00
b17832f0e1 style: add missing license headers 2020-12-11 07:07:54 -05:00
785cb4f89d test: add High Brightness Symbol into tests for feature test against #2299 2020-12-11 07:06:14 -05:00
961f1f94f6 Rename variables in tests. 2020-12-10 14:44:01 +02:00
201b5976bb Add tests for StringBlock#decodeString with failing tests for code points above 0x10FFFF (issue 2299). 2020-12-10 12:29:34 +02:00
6bd1ab603b test: add triple dex test to aapt1 2020-11-27 10:51:54 -05:00
5658c959b4 test: add triple dex test on aapt2 2020-11-27 10:51:54 -05:00
231ce72483 test: add more tests for #2386 2020-11-27 09:22:41 -05:00
d6f84df00b fix: leading 0s not supported in aapt anymore 2020-11-27 09:22:41 -05:00
3101a05ef6 fix: add development next version (S) - API 31 2020-09-13 08:52:15 -04:00
ecbcfb437e match test apk name with the relevant issue. 2020-06-09 07:08:22 -04:00
306959a6fb fix the usage of debug flag (-d) when using aapt2
- 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.
2020-06-09 07:08:22 -04:00
408050ffde Add tests to ensure empty, uncompressed files are put on the doNotCompress list.
Also, fix a bug where ext would retain its value from a previous
iteration of the loop, since we don't always overwrite it now.
2020-06-09 07:05:43 -04:00
05f81f9dd0 Change zero-byte-file tests so they test the correct behavior.
* 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.
2020-06-09 07:05:43 -04:00
3f831c8221 refactor: copyright year should be year started, not current year 2020-04-11 06:33:05 -04:00
81ca785e02 Fix file header comment format 2020-02-29 17:37:46 -08:00
dc312a5336 Fixes issue with decoding apk containing a zero byte 9patch 2019-09-19 13:34:06 +02:00
4aa933b31a test: ensure we don't allow path traversal with win 2019-07-18 07:42:34 -04:00
342661cbaa fix: correct license header on "DuplicateDexTest" 2019-07-14 07:30:41 -04:00
9edcc78ee5 style: clean test file 2019-07-14 07:29:32 -04:00
d79724549c Added new option to skip non classes[0-9]*.dex files 2019-07-14 07:17:20 -04:00
25a1cb02ef fix: License 2019 update 2019-07-13 12:19:41 -04:00
5f43a1fbca style: cleanup formatting 2019-06-01 09:27:41 -04:00
cfd50acd1d Add unit tests
- add APK file containing a simple app that tries to use coroutines every 2 seconds, and would fail with earlier versions of APKTool
- add unit test for decoding the app
2019-05-30 22:12:57 +04:30
25a65186a9 test: add "android:appCategory=game" into AndroidManifest.xml
- refs: #2055
2019-05-07 18:12:53 -04:00
3037024022 test: add 32,767 byte string for aapt2
- https://issuetracker.google.com/issues/73456167
2019-04-26 14:11:41 -04:00
4030e94cb3 test: aapt2 test for raw qmg file 2019-04-26 11:14:51 -04:00
95fe0f3f02 test: assert SDK_Q works with insane test value (10,000) 2019-04-24 18:46:48 -04:00
bc7302a52b test: assert that vertical/horizontal divs are added if missing 2019-02-17 13:07:32 -05:00
72368fc0d4 bug: reproduce the bug were array resources are decoded as style bag 2019-01-29 10:06:32 +01:00
cfea3e0831 build: initial attempt at getting travis windows support
build: force windows onto the bash environment

build: update permission (+x) of clean-test file

build: "bat" instead of "exe" extension

build: attempt to support long-path names on windows

build: another attempt at long filepaths on windows

build: force +x on scripts prior to execution

build: exit with return code of last command

build: dump out current path

build: dump out current path - part 2

fix: remove 5 chars from path to drop down from 260 windows max path

build: correct gradlew.bat path and remove unneeded lines

fix: remove long path global configuration

fix: restore PATH setting for windows env

build: PATH resets between scripts, fix for windows
2019-01-09 17:43:40 -05:00
c833a32a6e style: syntax changes for review 2019-01-04 18:05:51 -05:00
39faff0a21 test: allow aapt2 xsd test to run 2019-01-04 18:00:33 -05:00
a5cfe41a8f test: add test for aapt1/aapt2
- ignore aapt2 due to failure
2019-01-04 17:45:51 -05:00
af4a506567 fix: add aapt1/aapt2 xsd file 2019-01-04 17:45:36 -05:00
0dfa6c4656 test: add test to ensure empty ids.xml are generated for aapt1/aapt2 2019-01-03 16:56:25 -05:00
bec8778d7a tests: update platformBuild* values to inherit from AndroidManifest 2018-12-18 18:07:40 -05:00
859b7c6d3f test: updates aapt2 tests to handle the new "compileSdk" attributes 2018-09-02 09:55:49 -04:00
7a481f68e0 test: updates aapt1 tests to handle the new "compileSdk" attributes 2018-09-02 09:39:07 -04:00
b49bba19e4 test: don't enforce attribute order or compare attributes that don't exist 2018-09-02 09:37:59 -04:00
b7d33cb623 style: update license headers that are missing 2018 2018-08-23 16:14:24 -04:00
abdd536a18 test: add aapt1/aapt2 tests for "0byte" files 2018-07-20 15:21:44 -04:00
4bda4674f9 test: use correct "new" variable for tests 2018-07-20 15:20:39 -04:00
eecfc18c82 fix: add another example aapt1 version string 2018-07-02 11:37:55 -04:00
39ab6b636b test: add "$" leading resource test 2018-06-14 16:30:16 -04:00
06aa8db942 test: navigation resource test added 2018-06-12 08:22:10 -04:00
3879b90f76 test: add test for various aapt2 version strings 2018-04-19 17:10:10 -04:00
ba9b532283 test: add a test to confirm that mp3 file is stored (not compressed) 2018-04-12 12:00:38 -04:00