aboutsummaryrefslogtreecommitdiff
path: root/dexlib2/src/main/java
AgeCommit message (Collapse)Author
2024-02-01Fix return value of ZipDexContainer.getEntryDavid Srbecky
Fix regression from the previous CL. As per the comment, if dex file isn't found, it should return null, instead DexEntry with null dexFile content. Change-Id: I765177d221749890493b1d36f94889fed7f76f90
2023-12-14Support V41 container dex for reading (only)David Srbecky
Test: smali-baksmali dis -o framework.jar/classes.dex/2 Change-Id: I8cf93be29993d29b9c10b18632d92e628ca33fda
2023-12-07Add partial support for dex containers (DEX v41).David Srbecky
Accept the new format as long as the container has just one dex file. (ported from external/smali) Test: TreeHugger Change-Id: I307a16172820c7e73066f952f2f1c9ac6c52c0e2
2023-03-29Fixing missing reference type handling for rewriting purposes (#11)Andrey Galkin
2023-02-15Only include debug info within the instruction range of a method. (#6)Ian Zerny
2023-02-15Don't include debug info in method size. (#7)Ian Zerny
* 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.
2023-01-27Changed namespace from org.jf to com.android.tools.smali (#4)Søren Gjesse
Included in this sweeping change: * Removed all imports using *. * Updated version to 3.0.0.
2022-12-06Update headers in source filesSøren Gjesse
Replace Google Inc. with Google LLC Remove 'All reights reserved' Updated using the following script: git reset --hard for year in {2000..2022} do find . -type f -print0 | xargs -0 sed -i "s/Copyright ${year}, Google Inc\./Copyright ${year}, Google LLC/" done find . -type f -print0 | xargs -0 sed -i "s/the name of Google Inc\./the name of Google LLC/" find . -type f -print0 | xargs -0 sed -i "/^ \* All rights reserved\.$/d" find . -type f -print0 | xargs -0 sed -i "/^ ~ All rights reserved\.$/d" find . -type f -print0 | xargs -0 sed -i "/^# All rights reserved\.$/d" echo "Remaining occourences of 'Google Inc'" find . -type f | xargs grep 'Google Inc' echo "Remaining occourences of 'All rights reserved'" find . -type f | xargs grep 'All rights reserved' Bug: b/260825748 Change-Id: Ibeb8a198c25d9d333a1cdd6afa465e2fc2702367
2022-11-25Move files without Google copyright to third_partySøren Gjesse
Bug: b/253197642 Change-Id: Ic9ce1042464d506f38b9a53b39ab446574afb6d6 Reviewed-on: https://team-review.git.corp.google.com/c/r8-team/smali/+/1655693 Reviewed-by: Ian Zerny <zerny@google.com>
2022-11-25Fix typo in copyright headerSøren Gjesse
Bug: b/253197642 Change-Id: I08cba5041a26132ed11b7be6b29e00155328f813 Reviewed-on: https://team-review.git.corp.google.com/c/r8-team/smali/+/1646132 Reviewed-by: Ian Zerny <zerny@google.com>
2022-11-02Add missing licencesSøren Gjesse
Files missing linceses found with the Go addlicense tool: go install github.com/google/addlicense@latest ~/go/bin/addlicense -c "Google LLC" -l bsd . Licenses added using the original authors license with the year each file was added to the repository. Bug: b/253197642 Change-Id: I7cd3fef96fcadc81dfde8d29f9dfc80c5bbfefff Reviewed-on: https://team-review.git.corp.google.com/c/r8-team/smali/+/1606655 Reviewed-by: Ian Zerny <zerny@google.com>
2022-03-08fix DexWriter for hiddenapi sectionMichael Roberts
2022-03-08Check whether we have a next element instead of accessing it and catching ↵Steven Arzt
the exception. Exceptions are notoriously slow in Java, so we want to avoid that.
2022-03-08Fix dexToJavaName() returning invalid nameNeonOrbit
2022-03-08added support for 45cc and METHOD_PROTOSriteja Sugoor
2022-03-08Fixing METHOD_PROTO and DualReferenceInstruction writing via class interning ↵Andrey Galkin
in DexPool
2022-03-08Fix range check for character arrays with elements over 32767Marc Miltenberger
2022-03-08Added greylist-max-rDanny
2021-03-02fix: Cast java.nio.ByteBuffer to support java6-8Connor Tumbleson
- affected methods -- position -- limit -- flip -- clear
2021-03-01Switch out IndentingWriter for BaksmaliWriter throughout baksmaliBen Gruver
This refactors everything using an IndentingWriter to use a BaksmaliWriter instead, but the usages of ReferenceUtil and EncodedValue aren't refactored yet.
2021-03-01Add new BaksmaliWriter/BaksmaliFormatter classesBen Gruver
These are intended to be the centralized place for most individual items to be formatted and converted to/written as text
2021-02-26Use DexFormatter everywhere in dexlib2Ben Gruver
This replaces all uses of ReferenceUtil/EncodedValueUtils.writeEncodedValue.
2021-02-26Add new DexFormatter/DexFormattedWriter classBen Gruver
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-17Add support for the new test-api hidden api restriction in Android 11Ben Gruver
2020-02-03Improve the performance of the TypeRewriter.rewrite methodBen Gruver
2020-02-02Make the new TypeRewriter.rewriteUnwrappedType protectedBen Gruver
This method shouldn't be called from outside the class.
2020-02-02Add a dex file rewriter to the rewriters moduleBen Gruver
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-02Make RewrittenArrayEncodedValue delegate rewriting sub-values to the moduleBen Gruver
2020-02-02Add support for automatically rewriting array types in the rewriterBen Gruver
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-02Use reference type from wrapped instruction in BaseRewrittenReferenceInstructionBen Gruver
Otherwise, the reference won't be rewritten correctly if the overriding class overrides getReferenceType to return a different type.
2020-02-02Set the hiddenApiRestrictionOffset in the new DexBackedDexFile constructorBen Gruver
This fixes the build. That's what I get for rebasing changes and not testing.
2020-02-02Update VersionMap for Android 10Ben Gruver
2020-02-02Add support for hidden api restrictions to smali and baksmaliBen Gruver
The hidden api restrictions are exposed in the smali language as additional access flags for fields and methods
2020-02-02Add support to dexlib2 for writing hidden api restrictionsBen Gruver
2020-02-02Add support for reading the new hidden api restrictions in dexlib2Ben Gruver
2020-01-22Use HeaderItem.ITEM_SIZE in the new DexBackedDexFile constructorBen Gruver
2020-01-22Add support for constructing a DexBackedDexFile from a DexBufferHuaxin Li
2019-10-02Add support for Oat versions up to 173Ben Gruver
The only relevant differences are some added/removed fields in the OatHeader that affect the offsets of some fields we use.
2019-10-02Use the correct path separator character when looking for classpath entriesBen Gruver
2019-09-12Fix Preconditions.checkArrayPayloadElementsBen Gruver
The previous implementation did not correctly handle negative numbers.
2019-08-28Fix the getters in ImmutableInstruction45ccBen Gruver
2019-08-23Add better error messages when finding embedded dex files for oat filesBen Gruver
2019-08-23Gracefully handle malformed array payload instructions with element width=0Ben Gruver
These get handled as if they had element width=1 and element count=0
2019-08-23Use DexBacked* classes for the various sections in DexBackedDexFileBen Gruver
2019-08-23Fix bug #709Alex Melkonyan
2019-08-07Update the version map to reflect the released version of api 28Ben Gruver
2019-08-07Add a workaround for the sym linked vdex files in api 28Ben Gruver
In api 28, the vdex files in, e.g. the framework/arm directory are actually just sym links to a shared vdex file in the framework directory. However, the sym links use an absolute path, and so they don't resolve correctly in the loop mounted system image. As a simple workaround, we'll just search upward one directory in the path if the vdex file can't be resolved.
2019-08-07Add support for the new debug offset table for cdex filesBen Gruver
2019-08-07Some dex files are listed in the oat file, but aren't present in the oat/vdexBen Gruver
Oat version 138 introduced the concept of an "uncompressed" dex file, where the dex file is listed in the oat file, but it's not actually present in the oat or vdex files, instead, it's in the apk as per usual. This change makes dexlib2 ignore these files, treating them as if they are not a part of the oat file.
2019-08-07Allow '!' as a separator char in embedded dex file namesBen Gruver
Newer versions of art seem to use ! instead of : to separate the inner dex filename from the name of the container containing it. e.g. /system/framework/framework.jar!classes2.dex instead of /system/framework/framework.jar:classes2.dex