oSumAtrIX
b0f3957320
Merge upstream
2024-02-14 00:18:03 +01:00
oSumAtrIX
0fd4443db7
build: Revert publishing on Jitpack
2024-02-14 00:08:44 +01:00
Connor Tumbleson
bd82a53663
test: run path traversal test on Windows
2024-01-20 06:37:17 -05:00
Connor Tumbleson
93e7d6bdbf
Prevent arbitrary file writes with malicious resource names. ( #3484 )
...
* refactor: rename sanitize function
* fix: expose getDir
* fix: safe handling of untrusted resource names
- fixes: GHSA-2hqv-2xv4-5h5w
* test: sample file for GHSA-2hqv-2xv4-5h5w
* refactor: avoid detection of absolute files for resource check
* chore: enable info mode on gradle
* test: skip test on windows
* chore: debug windows handling
* fix: normalize entry with file separators
* fix: normalize filepath after cleansing
* chore: Android paths are not OS specific
* refactor: use java.nio for path traversal checking
* chore: align path separator on Windows for Zip files
* chore: rework towards basic directory traversal
* chore: remove '--info' on build.yml
2024-01-05 06:28:07 -05:00
Connor Tumbleson
a375717ade
fix: support alignment towards resTable_entry start ( #3452 )
2023-12-04 05:58:27 -05:00
Connor Tumbleson
72d0bc164d
#3427 - Treat manifest warnings as warnings ( #3429 )
...
* feat: treat warnings as warnings during aapt2 build
* test: add invalid fragment to manifest to confirm warning
2023-11-16 06:45:38 -05:00
Connor Tumbleson
bf1041e4fb
test: add test case for android:isAccessibilityTool ( #3426 )
...
* test: add test case for android:isAccessibilityTool
* test: augment tests for accessibility service extension
2023-11-16 05:58:38 -05:00
Connor Tumbleson
9e9079d30f
build: patch aapt2 to ignore private resources (unix/win) ( #3396 )
...
* build: patch aapt2 to ignore private resources (unix/win)
* build: patch aapt2 private resources (mac)
2023-11-08 06:30:13 -05:00
Connor Tumbleson
eec0288e69
Adapt null resource to be treated as reference instead of empty string. ( #3417 )
...
* fix: handle null resolved items as references
* test: add color null test for aapt2
2023-11-03 06:40:32 -04:00
oSumAtrIX
fc4a59fb33
Merge branch 'upstream'
2023-11-03 00:16:28 +01:00
Connor Tumbleson
247735c434
feat: de-dupe attribute names during styles writing ( #3404 )
2023-10-16 07:15:34 -04:00
Josh Miers
e2a5742b18
use apiLevel instead of forceApi when building the apk ( #3399 )
2023-10-11 19:44:00 -04:00
Connor Tumbleson
199780103c
refactor: support current position during chunk verbose output ( #3395 )
2023-10-10 21:23:05 -04:00
oSumAtrIX
c68c74f7d4
build: Publish on Jitpack
2023-10-09 05:15:46 +02:00
oSumAtrIX
35e23a9ad7
Merge branch 'upstream'
...
# Conflicts:
# brut.apktool/apktool-lib/build.gradle.kts
# build.gradle.kts
2023-10-08 20:42:48 +02:00
Connor Tumbleson
ef268f2d26
build: restore aapt1 miui qualifiers + static ( #3379 )
...
* build: restore aapt1 miui qualifiers (mac)
* build: restore aapt1 miui qualifiers (unix/win)
2023-10-08 08:04:35 -04:00
Connor Tumbleson
7fe58ca0c2
Android 14 - Support for Grammatical Inflection ( #3374 )
...
* build: update aapt/aapt2 with win/linux binaries
* docs: add note for specific aapt tag
* test: test for grammatical inflection
* build: update aapt/aapt2 with mac binaries
* build: update aapt/aapt2 with mac binaries (static libstl)
2023-10-08 06:38:10 -04:00
Connor Tumbleson
959b6de063
fix: support COMPACT/OFFSET16 packed resources. ( #3372 )
...
* fix: support COMPACT/OFFSET16
* fix: properly read specNamesId from compact resources
* fix: properly read OFFSET16 in entries
* test: add assertions for compact/offset16 sample
* refactor: extract flags out of private functions
2023-10-06 07:22:02 -04:00
Connor Tumbleson
679c133d21
feat: make aapt2 default ( #3370 )
2023-10-04 20:52:28 -04:00
Connor Tumbleson
bc7394080d
Android 14 Support (Partial) ( #3206 )
...
* fix: prevent over-reading config flags
* feat: add grammatical inflection
* fix: add natural requirement for U
* fix: UpsideDownCake is now 34
* test: test for grammatical inflection
* fix: add detection for compact resources
* fix: add detection for offset16 table types
* Revert "test: test for grammatical inflection"
This reverts commit fa08cef9fe6d436176f74152d85a652a771971ad.
* refactor: use enum instead of magic numbers
2023-10-04 20:13:58 -04:00
Connor Tumbleson
91a5863f16
build: update aapt/aapt2 with win/linux binaries ( #3360 )
...
* build: update aapt/aapt2 with win/linux binaries
* build: update aapt/aapt2 with mac binaries
2023-10-04 19:03:12 -04:00
Connor Tumbleson
9265c8bfde
refactor: remake android-framework jar file ( #3356 )
2023-10-01 07:42:03 -04:00
Connor Tumbleson
93c66ef373
build: migrate towards "libs.versions.toml" ( #3353 )
2023-10-01 06:08:47 -04:00
Connor Tumbleson
77b4229d10
refactor: suppress last unused method return ( #3349 )
2023-09-30 07:33:06 -04:00
Connor Tumbleson
f63bbc0be2
fix: handle duplicate res entries during a complex resource ( #3347 )
2023-09-30 07:21:58 -04:00
Connor Tumbleson
aea1d68dbc
refactor: adjust line to fit 120 length line endings in /value ( #3338 )
2023-09-18 06:18:44 -04:00
Connor Tumbleson
515af4faf8
Reworks Attr/Array Handler ( #3326 )
...
* test: add example pkcs key
* fix: rework towards ResScalarValue instead of ResIntValue
* fix: prefer res name instead of "guessing" based on ids
2023-09-11 19:01:09 -04:00
Connor Tumbleson
c07e4a92e6
fix: load type spec if no TYPE_SPEC chunks ( #3325 )
2023-09-11 06:24:23 -04:00
Connor Tumbleson
a117132e39
Feat: Introduce "res-mode" options. ( #3318 )
...
* Revert "Remove Apktool Dummys. (#3258 )"
This reverts commit 0e226928ce
.
* feat: properly add dummys
* refactor: shorten ResTypeSpec
* style: remove extra space
* refactor: extract FlagItem into own class
* refactor: notate which type is null
* fix: only add dummys if enabled
* feat: skip unknown (if enabled)
* feat: introduce "res-mode"
* feat: expose config on res table
* feat: add method to base attr for res skips
* fix: ensure autobuild doesn't choke
* refactor: remove java17 enhanced switch
* refactor: rename methods
* refactor: cleanup res-mode param
* test: introduction of test/sample apk
* refactor: make ResXmlPatcher public for loading XML
* test: assertions for dummy|leave|retain
* fix: prevent using `@null` as a name
* refactor: shorten long param for 'resm'
* refactor: leave for preserve
2023-09-09 07:29:39 -04:00
Connor Tumbleson
dcb6788243
refactor: verbose doesn't adapt handler ( #3310 )
2023-09-03 07:06:44 -04:00
oSumAtrIX
43edf043ed
Merge branch 'upstream'
2023-08-27 21:30:14 +02:00
Connor Tumbleson
81a7e1e434
fix: only mark as sparse if intended application ( #3299 )
2023-08-27 15:06:58 -04:00
Connor Tumbleson
06c5f462e0
refactor: use proper enum (0 on both) for setMethod() ( #3297 )
2023-08-26 21:39:42 -04:00
oSumAtrIX
24c0bd96ee
feat: remove AAPT2 argument unavailable in stable version of platform-tools
2023-08-22 18:52:23 +02:00
oSumAtrIX
452a620775
feat: disable customAapt
logic
2023-08-21 02:25:35 +02:00
oSumAtrIX
61bcd855dd
Merge branch 'upstream'
2023-08-19 02:02:00 +02:00
Connor Tumbleson
fedc754a78
refactor: remove unneeded blocks/semicolons ( #3273 )
2023-08-17 07:35:23 -04:00
Connor Tumbleson
225c9089d9
refactor: remove deprecations from test suite ( #3269 )
2023-08-13 14:25:32 -04:00
Connor Tumbleson
e99ed1ccbb
refactor: remove unused decodeManifest function ( #3268 )
2023-08-13 14:07:45 -04:00
Connor Tumbleson
fb6cd883c0
refactor: split out string block vs res table string ( #3267 )
2023-08-13 13:46:47 -04:00
oSumAtrIX
adc9452f66
feat: create missing directories
2023-08-12 01:59:12 +02:00
oSumAtrIX
72ffcbbc44
feat: decode 9patch
files on Android
2023-08-11 00:56:49 +02:00
oSumAtrIX
4608df636e
feat: allow using the default XML
serializer by ResourcesDecoder
manually
2023-08-11 00:53:43 +02:00
oSumAtrIX
c0900e50c5
feat: allow instantiating with existing ApkInfo
2023-08-11 00:51:30 +02:00
oSumAtrIX
019b2e648d
feat: allow recording uncompressed files manually
2023-08-11 00:51:05 +02:00
oSumAtrIX
ad7520357f
fix: do not try to get existing AAPT binary if a path to it is provided
2023-08-11 00:50:32 +02:00
Connor Tumbleson
1243dd5546
Refactor logging for chunks and sparse flags. ( #3260 )
...
* refactor: log each chunk in verbose mode
* refactor: drop unneeded ":" from log output
* refactor: spit out sparse message once
2023-08-09 08:38:34 -04:00
Connor Tumbleson
0e226928ce
Remove Apktool Dummys. ( #3258 )
...
* refactor: properly parse dummy resources
* feat: remove dummys
2023-08-09 06:15:57 -04:00
Connor Tumbleson
bb9519a2d0
refactor: change naming pattern of class variables in StringBlock ( #3256 )
2023-08-08 07:11:11 -04:00
Connor Tumbleson
22d792e328
fix: support encode styled string if length larger than offset ( #3254 )
2023-08-07 19:52:34 -04:00