From 6380b1ea331aeb3c9614835d1d872ed0b90b24ae Mon Sep 17 00:00:00 2001 From: Caleb Fenton Date: Sun, 29 Mar 2020 09:31:49 -0700 Subject: [PATCH] Update dexlib --- .../cf/simplify/strategy/UnreflectionStrategy.java | 12 +++++++++++- smalivm/build.gradle | 6 +++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/simplify/src/main/java/org/cf/simplify/strategy/UnreflectionStrategy.java b/simplify/src/main/java/org/cf/simplify/strategy/UnreflectionStrategy.java index e52f948ff..56611a1bf 100644 --- a/simplify/src/main/java/org/cf/simplify/strategy/UnreflectionStrategy.java +++ b/simplify/src/main/java/org/cf/simplify/strategy/UnreflectionStrategy.java @@ -10,9 +10,11 @@ import org.cf.util.ClassNameUtils; import org.cf.util.Utils; import org.jf.dexlib2.AccessFlags; +import org.jf.dexlib2.HiddenApiRestriction; import org.jf.dexlib2.Opcode; import org.jf.dexlib2.builder.BuilderInstruction; import org.jf.dexlib2.builder.instruction.*; +import org.jf.dexlib2.iface.Annotation; import org.jf.dexlib2.iface.MethodImplementation; import org.jf.dexlib2.iface.instruction.ReferenceInstruction; import org.jf.dexlib2.iface.reference.FieldReference; @@ -362,7 +364,15 @@ private BuilderInstruction buildFieldGetReplacement(int address) { boolean isStatic; BuilderField builderField = - manipulator.getDexBuilder().internField(className, fieldName, type, field.getModifiers(), null, null); + manipulator.getDexBuilder().internField( + className, + fieldName, + type, + field.getModifiers(), + null, + new HashSet<>(), + new HashSet<>() + ); FieldReference fieldRef = manipulator.getDexBuilder().internFieldReference(builderField); isStatic = Modifier.isStatic(field.getModifiers()); diff --git a/smalivm/build.gradle b/smalivm/build.gradle index bad8c721f..138f3bf6c 100644 --- a/smalivm/build.gradle +++ b/smalivm/build.gradle @@ -10,9 +10,9 @@ buildscript { } dependencies { - api group: 'org.smali', name: 'dexlib2', version: '2.3.4' - api group: 'org.smali', name: 'smali', version: '2.3.4' - api group: 'org.smali', name: 'baksmali', version: '2.3.4' + api group: 'org.smali', name: 'dexlib2', version: '2.4.0' + api group: 'org.smali', name: 'smali', version: '2.4.0' + api group: 'org.smali', name: 'baksmali', version: '2.4.0' implementation group: 'uk.com.robust-it', name: 'cloning', version: '1.9.12' implementation group: 'commons-beanutils', name: 'commons-beanutils', version: '1.9.4' implementation depends.commons_lang