1932 Commits

Author SHA1 Message Date
oSumAtrIX
a3836654dc
chore: bump version to 2.5.3 2023-01-16 16:03:12 +01:00
oSumAtrIX
c8b6e969aa
chore: change group to app.revanced 2023-01-16 16:03:01 +01:00
oSumAtrIX
fa09633c02
chore: publicate to revanced 2023-01-16 16:02:47 +01:00
oSumAtrIX
7419b19f9a
Merge remote-tracking branch 'zerny/debuginfo' 2023-01-16 16:01:28 +01:00
Connor Tumbleson
403e90375e
feat: add jitpack (#2)
* feat: add jitpack

* fix: skip tests for jitpack
2022-11-18 06:39:54 -05:00
Connor Tumbleson
a0868b9ede
feat: add github actions (#1) 2022-11-18 06:31:29 -05:00
Ben Gruver
2771eae0a1 Use the FEATURE_SECURE_PROCESSING feature for loading resource ids
This fixes a potential security issues reported by ready-research at
https://huntr.dev/bounties/c68f1aed-2922-4ebb-9699-00e0aea1d662
2022-03-08 14:50:22 -06:00
Michael Roberts
81bd303a80 fix DexWriter for hiddenapi section 2022-03-08 14:50:22 -06:00
Shivang Desai
891703dff2 Update HelloWorld.smali
-o option does not seem to work with latest smali version.
Hence modified first command in comments section.
2022-03-08 14:50:22 -06:00
Steven Arzt
85334314da Check whether we have a next element instead of accessing it and catching the exception. Exceptions are notoriously slow in Java, so we want to avoid that. 2022-03-08 14:50:22 -06:00
Ben Gruver
78a829342f Add tests for ReflectionUtils 2022-03-08 14:50:22 -06:00
NeonOrbit
b38f84838d Fix dexToJavaName() returning invalid name 2022-03-08 14:50:22 -06:00
Sriteja Sugoor
c70b71709f added support for 45cc and METHOD_PROTO 2022-03-08 14:50:18 -06:00
Andrey Galkin
3fb538f202 Fixing METHOD_PROTO and DualReferenceInstruction writing via class interning in DexPool 2022-03-08 14:49:49 -06:00
Marc Miltenberger
11f71ae481 Fix range check for character arrays with elements over 32767 2022-03-08 13:00:17 -06:00
Danny
ec5ae22888 Added greylist-max-r 2022-03-08 10:06:11 -08:00
Ian Zerny
4f4df9d54e Don't include debug info in method size.
The debug info items can be shared across methods so don't count
them as part of private method size.
2022-02-04 12:18:27 +01:00
Ian Zerny
6187d13f14 Only include debug info within the instruction range of a method. 2022-02-04 11:49:20 +01:00
Ben Gruver
cbd41d36cc Bump the version to v2.5.2 2021-03-02 23:45:38 -08:00
Ben Gruver
b56a29632f Switch to api dependency for dexlib2 in smali and baksmali
dexlib2 classes are a part of the smali and baksmali public api
2021-03-02 23:45:10 -08:00
Ben Gruver
5842cee8ec Fix bad formatting of some char values with the new BaksmaliWriter 2021-03-02 17:57:56 -08:00
Ben Gruver
c52c16b8e4 Bump the version to v2.5.1 2021-03-02 16:55:45 -08:00
Ben Gruver
5da8a04863 Update the gradle wrapper itself to 6.8.2 2021-03-02 16:55:02 -08:00
Connor Tumbleson
e4746fbd75 fix: Cast java.nio.ByteBuffer to support java6-8
- affected methods
 -- position
 -- limit
 -- flip
 -- clear
2021-03-02 16:42:36 -08:00
Ben Gruver
0e53c0fd0f Bump the version to 2.5.0 2021-03-01 17:13:38 -08:00
Ben Gruver
fb77140154 Allow duplicate paths in the smali sourcesJar task
This fixes a gradle deprecation warning
2021-03-01 17:13:38 -08:00
Ben Gruver
1d72698081 Update proguard version to 6.2.2, to support building with java 11 2021-03-01 17:13:38 -08:00
Ben Gruver
93e7043ac7 Set target/source java version to 1.8 2021-03-01 17:13:38 -08:00
Ben Gruver
fd25f51eec Replace some deprecated property usages in the gradle file 2021-03-01 17:13:38 -08:00
Ben Gruver
c03e4bf7f8 Switch from the maven plugin to the maven-publish plugin 2021-03-01 17:13:38 -08:00
Ben Gruver
53b52f023d Switch from "compile" to "implementation" in gradle dependencies
compile/testCompile has been deprecated for a long time, and will be
removed in the next major version of gradle.
2021-03-01 15:36:10 -08:00
Ben Gruver
ecd68918ac Update everything in baksmali to use the new BaksmaliWriter functionality 2021-03-01 13:09:57 -08:00
Ben Gruver
9ce00aae9c Switch out IndentingWriter for BaksmaliWriter throughout baksmali
This refactors everything using an IndentingWriter to use a BaksmaliWriter
instead, but the usages of ReferenceUtil and EncodedValue aren't refactored
yet.
2021-03-01 13:04:55 -08:00
Ben Gruver
6efebc1543 Add the numeric writing methods from IndentingWriter to BaksmaliWriter
Those were never really a good fit for IndentingWriter anyway, they had
nothing to do with that class's functionality.

They'll be removed from IndentingWriter once all the usages are switched.
2021-03-01 12:58:38 -08:00
Ben Gruver
b6a1ae3481 Add new BaksmaliWriter/BaksmaliFormatter classes
These are intended to be the centralized place for most individual items
to be formatted and converted to/written as text
2021-03-01 12:55:51 -08:00
Ben Gruver
c2ac11c693 Use DexFormatter everywhere in dexlib2
This replaces all uses of ReferenceUtil/EncodedValueUtils.writeEncodedValue.
2021-02-26 17:19:59 -08:00
Ben Gruver
e894435e9d Add new DexFormatter/DexFormattedWriter class
This will be a more unified way to get/write out human-readable strings for
individual "things" from a dex file. The goal is to replace things like
ReferenceUtil, EncodedValueUtils, etc.
2021-02-26 17:19:59 -08:00
Ben Gruver
812bf35149 Add support for the new test-api hidden api restriction in Android 11 2021-02-17 16:17:38 -08:00
Ben Gruver
66802eb926 Update gradle to 6.8.2 2021-02-16 16:52:15 -08:00
Ben Gruver
1e655c2e54 Handle unicode filename collisions on mac
Some unicode characters are considered equivalent for filename purposes on mac.
This adds logic to treat these collisions the same way as case sensitivy
collisions are currently handled -- by adding a numeric suffix to the
file/directory anytime there is a collision.

See pull request #789 for more information.
2021-02-16 16:52:15 -08:00
Régis Décamps
c1534fc96d Cast long yychar to int.
Starting from JFlex 1.8.0, `yychar` is a long.

However, it is used to build an antlr `CommonToken` which takes an int.
Hence, explicit casting is needed.

I propose to cast the `yychar` with `java.lang.Math.toIntExact()` which throw an ArithmeticException in case of overflow.
This is acceptable because the previous code would have returned an overflowed (negative) position.

See https://github.com/jflex-de/jflex/pull/605 for details.
2020-03-30 11:24:38 -07:00
Ben Gruver
b761c5f089 Remove smalidea from the smali repository
It has been split out into a separate smalidea repository
2020-02-23 16:44:37 -08:00
Ben Gruver
5339a81f0f Bump the version to 2.4.0 2020-02-05 12:09:45 -08:00
Ben Gruver
71a79c8ac1 Add the new hidden api restriction tokens to the lexer token test 2020-02-04 21:40:56 -08:00
Ben Gruver
15a98cbb4b Add the new HIDDENAPI_RESTRICTION as a possible SIMPLE_NAME 2020-02-04 21:40:56 -08:00
Ben Gruver
c1f2da0e0b Improve the performance of the TypeRewriter.rewrite method 2020-02-03 00:09:21 -08:00
Ben Gruver
409cf27ba9 Make the new TypeRewriter.rewriteUnwrappedType protected
This method shouldn't be called from outside the class.
2020-02-02 20:52:57 -08:00
Ben Gruver
12b95235e3 Add a dex file rewriter to the rewriters module
Previously, if you needed to provide a custom dex file rewriter, you
would have to override the DexRewriter class. This provides a more
consistent interface, allowing the dex file rewriter to be specified in
the module.
2020-02-02 20:47:17 -08:00
Ben Gruver
cb37770c1c Make RewrittenArrayEncodedValue delegate rewriting sub-values to the module 2020-02-02 20:37:00 -08:00
Ben Gruver
78e92b0524 Add support for automatically rewriting array types in the rewriter
This adds a new rewriteUnwrappedType to the TypeRewriter class, which
gets called with the unwrapped type for array types, with the potentially
modified return value automatically being re-array-ified.
2020-02-02 20:34:29 -08:00