Commit Graph

1005 Commits

Author SHA1 Message Date
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
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
23d9ec0e58
refactor: support more resource-mode params (#3354) 2023-10-01 06:26:54 -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
6e3fac2414
refactor: make _options lowercase (#3324) 2023-09-09 09:47:41 -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
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
Connor Tumbleson
7d76829ad9
feat: shorten archive name to apktool-{version}.jar (#3289) 2023-08-23 07:26:21 -04: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
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
Connor Tumbleson
50226e50c1
fix: support decoding application with duplicate res entries (#3252) 2023-08-05 12:21:42 -04:00
Connor Tumbleson
342ff67a4c
Migrate to Gradle Kotlin DSL (#3249)
* feat: initial migration to kotlin

* feat: initial migration to kotlin

* fix: wire up dependencies

* fix: Deprecated tag for kotlin detection

* refactor: put all modules into sub-projects

* fix: include jar file (android framework)

* fix: add version message/info

* fix: wire up version/gitrev to properties

* fix: wire up proguard on cli

* fix: wire up proguard

* fix: wire up output cleaning command

* fix: drop license header on gradle files

 - fully rewritten from scratch by myself
 - no longer including license header on build files

* fix: add compile utf8/flags for java8

* refactor: remove unneeded curly braces

* feat: progress towards maven-publish

* build: publish to maven

* docs: update documentation

* refactor: prevent implicit order by removal of afterEvaluate

* build: remove unused license plugin
2023-08-05 06:28:31 -04:00
sv99
0a354a9d97
Merge ResAttrDecoder into the AXmlResourceParser (#3243) 2023-08-01 18:43:15 -04:00
sv99
9d7d58016e
ApkDecoder use apkFile and unknownFiles from ApkInfo (#3242) 2023-08-01 06:57:22 -04:00
Connor Tumbleson
7c2cb5b30a
Hardened String Block Parser (#3239)
* fix: add headerSize to stringBlock to detect larger headers

* fix: handle app with style offset, but 0 styles

* refactor: split counting stream into CountingDataInput

* fix: read strings till end of string pool chunk

* fix: support out of bound string reading

* fix: don't read string/style offset out of bounds

* refactor: cleanup comments for string parser

* style: comment on 4 byte alignment

* fix: only warn if utf16 string
2023-08-01 06:23:14 -04:00
Connor Tumbleson
663088890b
fix: skip unknown chunks in AXML (#3237) 2023-07-30 16:20:07 -04:00
Connor Tumbleson
445da0e658
Move to XMLUnit Legacy (#3235)
* build: migrate to xmlunit 2.9.1

* feat: opt into xxe protection for test suite
2023-07-30 13:48:26 -04:00
Connor Tumbleson
e19c44b1b1
refactor: drop unused method 2023-07-30 13:16:34 -04:00
Connor Tumbleson
cd275ff48b
fix: resolve missing namespace on system resources (#3234)
* fix: resolve missing namespace on system resources

* refactor: align pkdId check to 2nd of if
2023-07-30 07:18:06 -04:00
Connor Tumbleson
57ef8a205a
fix: support duplicated namespaces (#3233) 2023-07-30 05:52:35 -04:00
Igor Eisberg
33ca2929c9
refactor: clean up style and redundancy (#3232)
* refactor: clean up redundancy

* refactor: no need for both setApkFile and setApkFileName
2023-07-29 18:56:27 -04:00
Connor Tumbleson
ce180dce87
fix: un-deprecate --copy-original
-- fixes: #2129
2023-07-29 06:51:29 -04:00
Connor Tumbleson
486fb20084
Support empty resource table. (#3230)
* test: assertions for empty arsc table

* fix: don't crash if no pkgs found
2023-07-29 06:49:13 -04:00
Connor Tumbleson
fe93fd21d1
refactor: manual YAML Cleanup (#3229)
* refactor: add missing license headers

* fix: remove unused exceptions

* refactor: remove unused single quote / slash param
2023-07-29 06:14:40 -04:00
sv99
62b9eedb9e
Remove SnakeYAML for manual YAML Parser (#3191)
* Simple straitforward yaml serialization with minimal needed functionality

* Consolidate ApkInfo tests in the package brut.androlib.apk, unify interface YamlReader and add ApkInfoSerializationTest read -> write -> read test

* remove dependencies from snakeyaml

* remove unused methods

* correct indent test value

* correct style with curly braces

* add test item with hieroglyph
2023-07-29 05:59:15 -04:00
Connor Tumbleson
772646f95b
fix: end parsing if EOF is hit (#3223) 2023-07-26 07:27:15 -04:00
Connor Tumbleson
ab7998439e
"--no-compile-sdk-metadata" tests. (#3220)
* refactor: move loadDocument() to base

* test: confirm manifest properties are removed/left-alone

* chore: remove unused imports
2023-07-25 07:29:53 -04:00
Connor Tumbleson
7f0d94ede9
feat: Introduce --no-compile-sdk-metadata (#3208)
* feat: ignore sdk metadata during aapt2

* test: adjust test suite for aapt2 change
2023-07-25 06:43:15 -04:00
sv99
7a4a20ba34
Support explicit operation for when to load full resource table (#3217) 2023-07-25 06:18:13 -04:00
sv99
c2ddeac3ab
Explicit ResFileDecoder initiazation and add constructors AXmlResourceParser(ResTable resTable) and AndroidManifestResourceParser(ResTable resTable) (#3211) 2023-07-24 06:43:56 -04:00