├── .gitignore ├── README.en.md ├── README.md ├── app ├── .gitignore ├── CMakeLists.txt ├── app.iml ├── libs │ ├── AndroidHiddenAPI.jar │ └── dom4j-2.0.1.jar ├── proguard-rules.pro ├── release │ └── output.json └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── example │ │ └── myapplication │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── assets │ │ └── libs │ │ │ ├── classes.dex │ │ │ ├── hahahaha │ │ │ └── lib │ │ │ ├── arm64-v8a │ │ │ └── libsandhook.so │ │ │ └── armeabi-v7a │ │ │ └── libsandhook.so │ ├── cpp │ │ ├── CMakeLists.txt │ │ └── native-lib.cpp │ ├── java │ │ ├── com │ │ │ └── example │ │ │ │ └── myapplication │ │ │ │ ├── BootReceiver.java │ │ │ │ ├── FileUtils.java │ │ │ │ ├── MainActivity.java │ │ │ │ ├── ModuleAdapter.java │ │ │ │ ├── ModuleUtil.java │ │ │ │ ├── ModulesFragment.java │ │ │ │ ├── StrUtil.java │ │ │ │ ├── StudentsProvider.java │ │ │ │ ├── haha.java │ │ │ │ └── hahahaha.java │ │ └── org │ │ │ └── jf │ │ │ ├── android │ │ │ ├── dex │ │ │ │ ├── Annotation.java │ │ │ │ ├── CallSiteId.java │ │ │ │ ├── ClassData.java │ │ │ │ ├── ClassDef.java │ │ │ │ ├── Code.java │ │ │ │ ├── Dex.java │ │ │ │ ├── DexException.java │ │ │ │ ├── DexFormat.java │ │ │ │ ├── DexIndexOverflowException.java │ │ │ │ ├── EncodedValue.java │ │ │ │ ├── EncodedValueCodec.java │ │ │ │ ├── EncodedValueReader.java │ │ │ │ ├── FieldId.java │ │ │ │ ├── Leb128.java │ │ │ │ ├── MethodHandle.java │ │ │ │ ├── MethodId.java │ │ │ │ ├── Mutf8.java │ │ │ │ ├── ProtoId.java │ │ │ │ ├── SizeOf.java │ │ │ │ ├── TableOfContents.java │ │ │ │ ├── TypeList.java │ │ │ │ └── util │ │ │ │ │ ├── ByteArrayByteInput.java │ │ │ │ │ ├── ByteInput.java │ │ │ │ │ ├── ByteOutput.java │ │ │ │ │ ├── ExceptionWithContext.java │ │ │ │ │ ├── FileUtils.java │ │ │ │ │ └── Unsigned.java │ │ │ ├── dx │ │ │ │ ├── Version.java │ │ │ │ ├── cf │ │ │ │ │ ├── attrib │ │ │ │ │ │ ├── AttAnnotationDefault.java │ │ │ │ │ │ ├── AttBootstrapMethods.java │ │ │ │ │ │ ├── AttCode.java │ │ │ │ │ │ ├── AttConstantValue.java │ │ │ │ │ │ ├── AttDeprecated.java │ │ │ │ │ │ ├── AttEnclosingMethod.java │ │ │ │ │ │ ├── AttExceptions.java │ │ │ │ │ │ ├── AttInnerClasses.java │ │ │ │ │ │ ├── AttLineNumberTable.java │ │ │ │ │ │ ├── AttLocalVariableTable.java │ │ │ │ │ │ ├── AttLocalVariableTypeTable.java │ │ │ │ │ │ ├── AttRuntimeInvisibleAnnotations.java │ │ │ │ │ │ ├── AttRuntimeInvisibleParameterAnnotations.java │ │ │ │ │ │ ├── AttRuntimeVisibleAnnotations.java │ │ │ │ │ │ ├── AttRuntimeVisibleParameterAnnotations.java │ │ │ │ │ │ ├── AttSignature.java │ │ │ │ │ │ ├── AttSourceDebugExtension.java │ │ │ │ │ │ ├── AttSourceFile.java │ │ │ │ │ │ ├── AttSynthetic.java │ │ │ │ │ │ ├── BaseAnnotations.java │ │ │ │ │ │ ├── BaseAttribute.java │ │ │ │ │ │ ├── BaseLocalVariables.java │ │ │ │ │ │ ├── BaseParameterAnnotations.java │ │ │ │ │ │ ├── InnerClassList.java │ │ │ │ │ │ ├── RawAttribute.java │ │ │ │ │ │ └── package.html │ │ │ │ │ ├── code │ │ │ │ │ │ ├── BaseMachine.java │ │ │ │ │ │ ├── BasicBlocker.java │ │ │ │ │ │ ├── BootstrapMethodArgumentsList.java │ │ │ │ │ │ ├── BootstrapMethodsList.java │ │ │ │ │ │ ├── ByteBlock.java │ │ │ │ │ │ ├── ByteBlockList.java │ │ │ │ │ │ ├── ByteCatchList.java │ │ │ │ │ │ ├── ByteOps.java │ │ │ │ │ │ ├── BytecodeArray.java │ │ │ │ │ │ ├── ConcreteMethod.java │ │ │ │ │ │ ├── ExecutionStack.java │ │ │ │ │ │ ├── Frame.java │ │ │ │ │ │ ├── LineNumberList.java │ │ │ │ │ │ ├── LocalVariableList.java │ │ │ │ │ │ ├── LocalsArray.java │ │ │ │ │ │ ├── LocalsArraySet.java │ │ │ │ │ │ ├── Machine.java │ │ │ │ │ │ ├── Merger.java │ │ │ │ │ │ ├── OneLocalsArray.java │ │ │ │ │ │ ├── ReturnAddress.java │ │ │ │ │ │ ├── Ropper.java │ │ │ │ │ │ ├── RopperMachine.java │ │ │ │ │ │ ├── SimException.java │ │ │ │ │ │ ├── Simulator.java │ │ │ │ │ │ ├── SwitchList.java │ │ │ │ │ │ ├── ValueAwareMachine.java │ │ │ │ │ │ └── package.html │ │ │ │ │ ├── cst │ │ │ │ │ │ ├── ConstantPoolParser.java │ │ │ │ │ │ ├── ConstantTags.java │ │ │ │ │ │ └── MethodHandleKind.java │ │ │ │ │ ├── direct │ │ │ │ │ │ ├── AnnotationParser.java │ │ │ │ │ │ ├── AttributeFactory.java │ │ │ │ │ │ ├── AttributeListParser.java │ │ │ │ │ │ ├── ClassPathOpener.java │ │ │ │ │ │ ├── CodeObserver.java │ │ │ │ │ │ ├── DirectClassFile.java │ │ │ │ │ │ ├── FieldListParser.java │ │ │ │ │ │ ├── MemberListParser.java │ │ │ │ │ │ ├── MethodListParser.java │ │ │ │ │ │ ├── StdAttributeFactory.java │ │ │ │ │ │ └── package.html │ │ │ │ │ └── iface │ │ │ │ │ │ ├── Attribute.java │ │ │ │ │ │ ├── AttributeList.java │ │ │ │ │ │ ├── ClassFile.java │ │ │ │ │ │ ├── Field.java │ │ │ │ │ │ ├── FieldList.java │ │ │ │ │ │ ├── HasAttribute.java │ │ │ │ │ │ ├── Member.java │ │ │ │ │ │ ├── Method.java │ │ │ │ │ │ ├── MethodList.java │ │ │ │ │ │ ├── ParseException.java │ │ │ │ │ │ ├── ParseObserver.java │ │ │ │ │ │ ├── StdAttributeList.java │ │ │ │ │ │ ├── StdField.java │ │ │ │ │ │ ├── StdFieldList.java │ │ │ │ │ │ ├── StdMember.java │ │ │ │ │ │ ├── StdMethod.java │ │ │ │ │ │ ├── StdMethodList.java │ │ │ │ │ │ └── package.html │ │ │ │ ├── command │ │ │ │ │ ├── Main.java │ │ │ │ │ ├── UsageException.java │ │ │ │ │ ├── annotool │ │ │ │ │ │ ├── AnnotationLister.java │ │ │ │ │ │ └── Main.java │ │ │ │ │ ├── dexer │ │ │ │ │ │ ├── DxContext.java │ │ │ │ │ │ └── Main.java │ │ │ │ │ ├── dump │ │ │ │ │ │ ├── Args.java │ │ │ │ │ │ ├── BaseDumper.java │ │ │ │ │ │ ├── BlockDumper.java │ │ │ │ │ │ ├── ClassDumper.java │ │ │ │ │ │ ├── DotDumper.java │ │ │ │ │ │ ├── Main.java │ │ │ │ │ │ └── SsaDumper.java │ │ │ │ │ ├── findusages │ │ │ │ │ │ ├── FindUsages.java │ │ │ │ │ │ └── Main.java │ │ │ │ │ └── grep │ │ │ │ │ │ ├── Grep.java │ │ │ │ │ │ └── Main.java │ │ │ │ ├── dex │ │ │ │ │ ├── DexOptions.java │ │ │ │ │ ├── cf │ │ │ │ │ │ ├── AttributeTranslator.java │ │ │ │ │ │ ├── CfOptions.java │ │ │ │ │ │ ├── CfTranslator.java │ │ │ │ │ │ ├── CodeStatistics.java │ │ │ │ │ │ ├── OptimizerOptions.java │ │ │ │ │ │ └── package.html │ │ │ │ │ ├── code │ │ │ │ │ │ ├── ArrayData.java │ │ │ │ │ │ ├── BlockAddresses.java │ │ │ │ │ │ ├── CatchBuilder.java │ │ │ │ │ │ ├── CatchHandlerList.java │ │ │ │ │ │ ├── CatchTable.java │ │ │ │ │ │ ├── CodeAddress.java │ │ │ │ │ │ ├── CstInsn.java │ │ │ │ │ │ ├── DalvCode.java │ │ │ │ │ │ ├── DalvInsn.java │ │ │ │ │ │ ├── DalvInsnList.java │ │ │ │ │ │ ├── Dop.java │ │ │ │ │ │ ├── Dops.java │ │ │ │ │ │ ├── FixedSizeInsn.java │ │ │ │ │ │ ├── HighRegisterPrefix.java │ │ │ │ │ │ ├── InsnFormat.java │ │ │ │ │ │ ├── LocalList.java │ │ │ │ │ │ ├── LocalSnapshot.java │ │ │ │ │ │ ├── LocalStart.java │ │ │ │ │ │ ├── MultiCstInsn.java │ │ │ │ │ │ ├── OddSpacer.java │ │ │ │ │ │ ├── OutputCollector.java │ │ │ │ │ │ ├── OutputFinisher.java │ │ │ │ │ │ ├── PositionList.java │ │ │ │ │ │ ├── RopToDop.java │ │ │ │ │ │ ├── RopTranslator.java │ │ │ │ │ │ ├── SimpleInsn.java │ │ │ │ │ │ ├── StdCatchBuilder.java │ │ │ │ │ │ ├── SwitchData.java │ │ │ │ │ │ ├── TargetInsn.java │ │ │ │ │ │ ├── VariableSizeInsn.java │ │ │ │ │ │ ├── ZeroSizeInsn.java │ │ │ │ │ │ └── form │ │ │ │ │ │ │ ├── Form10t.java │ │ │ │ │ │ │ ├── Form10x.java │ │ │ │ │ │ │ ├── Form11n.java │ │ │ │ │ │ │ ├── Form11x.java │ │ │ │ │ │ │ ├── Form12x.java │ │ │ │ │ │ │ ├── Form20t.java │ │ │ │ │ │ │ ├── Form21c.java │ │ │ │ │ │ │ ├── Form21h.java │ │ │ │ │ │ │ ├── Form21s.java │ │ │ │ │ │ │ ├── Form21t.java │ │ │ │ │ │ │ ├── Form22b.java │ │ │ │ │ │ │ ├── Form22c.java │ │ │ │ │ │ │ ├── Form22s.java │ │ │ │ │ │ │ ├── Form22t.java │ │ │ │ │ │ │ ├── Form22x.java │ │ │ │ │ │ │ ├── Form23x.java │ │ │ │ │ │ │ ├── Form30t.java │ │ │ │ │ │ │ ├── Form31c.java │ │ │ │ │ │ │ ├── Form31i.java │ │ │ │ │ │ │ ├── Form31t.java │ │ │ │ │ │ │ ├── Form32x.java │ │ │ │ │ │ │ ├── Form35c.java │ │ │ │ │ │ │ ├── Form3rc.java │ │ │ │ │ │ │ ├── Form45cc.java │ │ │ │ │ │ │ ├── Form4rcc.java │ │ │ │ │ │ │ ├── Form51l.java │ │ │ │ │ │ │ └── SpecialFormat.java │ │ │ │ │ └── file │ │ │ │ │ │ ├── AnnotationItem.java │ │ │ │ │ │ ├── AnnotationSetItem.java │ │ │ │ │ │ ├── AnnotationSetRefItem.java │ │ │ │ │ │ ├── AnnotationUtils.java │ │ │ │ │ │ ├── AnnotationsDirectoryItem.java │ │ │ │ │ │ ├── CallSiteIdItem.java │ │ │ │ │ │ ├── CallSiteIdsSection.java │ │ │ │ │ │ ├── CallSiteItem.java │ │ │ │ │ │ ├── CatchStructs.java │ │ │ │ │ │ ├── ClassDataItem.java │ │ │ │ │ │ ├── ClassDefItem.java │ │ │ │ │ │ ├── ClassDefsSection.java │ │ │ │ │ │ ├── CodeItem.java │ │ │ │ │ │ ├── DebugInfoConstants.java │ │ │ │ │ │ ├── DebugInfoDecoder.java │ │ │ │ │ │ ├── DebugInfoEncoder.java │ │ │ │ │ │ ├── DebugInfoItem.java │ │ │ │ │ │ ├── DexFile.java │ │ │ │ │ │ ├── EncodedArrayItem.java │ │ │ │ │ │ ├── EncodedField.java │ │ │ │ │ │ ├── EncodedMember.java │ │ │ │ │ │ ├── EncodedMethod.java │ │ │ │ │ │ ├── FieldAnnotationStruct.java │ │ │ │ │ │ ├── FieldIdItem.java │ │ │ │ │ │ ├── FieldIdsSection.java │ │ │ │ │ │ ├── HeaderItem.java │ │ │ │ │ │ ├── HeaderSection.java │ │ │ │ │ │ ├── IdItem.java │ │ │ │ │ │ ├── IndexedItem.java │ │ │ │ │ │ ├── Item.java │ │ │ │ │ │ ├── ItemType.java │ │ │ │ │ │ ├── MapItem.java │ │ │ │ │ │ ├── MemberIdItem.java │ │ │ │ │ │ ├── MemberIdsSection.java │ │ │ │ │ │ ├── MethodAnnotationStruct.java │ │ │ │ │ │ ├── MethodHandleItem.java │ │ │ │ │ │ ├── MethodHandlesSection.java │ │ │ │ │ │ ├── MethodIdItem.java │ │ │ │ │ │ ├── MethodIdsSection.java │ │ │ │ │ │ ├── MixedItemSection.java │ │ │ │ │ │ ├── OffsettedItem.java │ │ │ │ │ │ ├── ParameterAnnotationStruct.java │ │ │ │ │ │ ├── ProtoIdItem.java │ │ │ │ │ │ ├── ProtoIdsSection.java │ │ │ │ │ │ ├── Section.java │ │ │ │ │ │ ├── Statistics.java │ │ │ │ │ │ ├── StringDataItem.java │ │ │ │ │ │ ├── StringIdItem.java │ │ │ │ │ │ ├── StringIdsSection.java │ │ │ │ │ │ ├── TypeIdItem.java │ │ │ │ │ │ ├── TypeIdsSection.java │ │ │ │ │ │ ├── TypeListItem.java │ │ │ │ │ │ ├── UniformItemSection.java │ │ │ │ │ │ ├── UniformListItem.java │ │ │ │ │ │ └── ValueEncoder.java │ │ │ │ ├── io │ │ │ │ │ ├── CodeReader.java │ │ │ │ │ ├── DexIndexPrinter.java │ │ │ │ │ ├── IndexType.java │ │ │ │ │ ├── OpcodeInfo.java │ │ │ │ │ ├── Opcodes.java │ │ │ │ │ └── instructions │ │ │ │ │ │ ├── AddressMap.java │ │ │ │ │ │ ├── BaseCodeCursor.java │ │ │ │ │ │ ├── CodeCursor.java │ │ │ │ │ │ ├── CodeInput.java │ │ │ │ │ │ ├── CodeOutput.java │ │ │ │ │ │ ├── DecodedInstruction.java │ │ │ │ │ │ ├── FillArrayDataPayloadDecodedInstruction.java │ │ │ │ │ │ ├── FiveRegisterDecodedInstruction.java │ │ │ │ │ │ ├── FourRegisterDecodedInstruction.java │ │ │ │ │ │ ├── InstructionCodec.java │ │ │ │ │ │ ├── InvokePolymorphicDecodedInstruction.java │ │ │ │ │ │ ├── InvokePolymorphicRangeDecodedInstruction.java │ │ │ │ │ │ ├── OneRegisterDecodedInstruction.java │ │ │ │ │ │ ├── PackedSwitchPayloadDecodedInstruction.java │ │ │ │ │ │ ├── RegisterRangeDecodedInstruction.java │ │ │ │ │ │ ├── ShortArrayCodeInput.java │ │ │ │ │ │ ├── ShortArrayCodeOutput.java │ │ │ │ │ │ ├── SparseSwitchPayloadDecodedInstruction.java │ │ │ │ │ │ ├── ThreeRegisterDecodedInstruction.java │ │ │ │ │ │ ├── TwoRegisterDecodedInstruction.java │ │ │ │ │ │ └── ZeroRegisterDecodedInstruction.java │ │ │ │ ├── merge │ │ │ │ │ ├── CollisionPolicy.java │ │ │ │ │ ├── DexMerger.java │ │ │ │ │ ├── IndexMap.java │ │ │ │ │ ├── InstructionTransformer.java │ │ │ │ │ └── SortableType.java │ │ │ │ ├── rop │ │ │ │ │ ├── annotation │ │ │ │ │ │ ├── Annotation.java │ │ │ │ │ │ ├── AnnotationVisibility.java │ │ │ │ │ │ ├── Annotations.java │ │ │ │ │ │ ├── AnnotationsList.java │ │ │ │ │ │ └── NameValuePair.java │ │ │ │ │ ├── code │ │ │ │ │ │ ├── AccessFlags.java │ │ │ │ │ │ ├── BasicBlock.java │ │ │ │ │ │ ├── BasicBlockList.java │ │ │ │ │ │ ├── ConservativeTranslationAdvice.java │ │ │ │ │ │ ├── CstInsn.java │ │ │ │ │ │ ├── DexTranslationAdvice.java │ │ │ │ │ │ ├── Exceptions.java │ │ │ │ │ │ ├── FillArrayDataInsn.java │ │ │ │ │ │ ├── Insn.java │ │ │ │ │ │ ├── InsnList.java │ │ │ │ │ │ ├── InvokePolymorphicInsn.java │ │ │ │ │ │ ├── LocalItem.java │ │ │ │ │ │ ├── LocalVariableExtractor.java │ │ │ │ │ │ ├── LocalVariableInfo.java │ │ │ │ │ │ ├── PlainCstInsn.java │ │ │ │ │ │ ├── PlainInsn.java │ │ │ │ │ │ ├── RegOps.java │ │ │ │ │ │ ├── RegisterSpec.java │ │ │ │ │ │ ├── RegisterSpecList.java │ │ │ │ │ │ ├── RegisterSpecSet.java │ │ │ │ │ │ ├── Rop.java │ │ │ │ │ │ ├── RopMethod.java │ │ │ │ │ │ ├── Rops.java │ │ │ │ │ │ ├── SourcePosition.java │ │ │ │ │ │ ├── SwitchInsn.java │ │ │ │ │ │ ├── ThrowingCstInsn.java │ │ │ │ │ │ ├── ThrowingInsn.java │ │ │ │ │ │ ├── TranslationAdvice.java │ │ │ │ │ │ └── package.html │ │ │ │ │ ├── cst │ │ │ │ │ │ ├── Constant.java │ │ │ │ │ │ ├── ConstantPool.java │ │ │ │ │ │ ├── CstAnnotation.java │ │ │ │ │ │ ├── CstArray.java │ │ │ │ │ │ ├── CstBaseMethodRef.java │ │ │ │ │ │ ├── CstBoolean.java │ │ │ │ │ │ ├── CstByte.java │ │ │ │ │ │ ├── CstCallSite.java │ │ │ │ │ │ ├── CstCallSiteRef.java │ │ │ │ │ │ ├── CstChar.java │ │ │ │ │ │ ├── CstDouble.java │ │ │ │ │ │ ├── CstEnumRef.java │ │ │ │ │ │ ├── CstFieldRef.java │ │ │ │ │ │ ├── CstFloat.java │ │ │ │ │ │ ├── CstInteger.java │ │ │ │ │ │ ├── CstInterfaceMethodRef.java │ │ │ │ │ │ ├── CstInvokeDynamic.java │ │ │ │ │ │ ├── CstKnownNull.java │ │ │ │ │ │ ├── CstLiteral32.java │ │ │ │ │ │ ├── CstLiteral64.java │ │ │ │ │ │ ├── CstLiteralBits.java │ │ │ │ │ │ ├── CstLong.java │ │ │ │ │ │ ├── CstMemberRef.java │ │ │ │ │ │ ├── CstMethodHandle.java │ │ │ │ │ │ ├── CstMethodRef.java │ │ │ │ │ │ ├── CstNat.java │ │ │ │ │ │ ├── CstProtoRef.java │ │ │ │ │ │ ├── CstShort.java │ │ │ │ │ │ ├── CstString.java │ │ │ │ │ │ ├── CstType.java │ │ │ │ │ │ ├── StdConstantPool.java │ │ │ │ │ │ ├── TypedConstant.java │ │ │ │ │ │ ├── Zeroes.java │ │ │ │ │ │ └── package.html │ │ │ │ │ ├── package-info.java │ │ │ │ │ └── type │ │ │ │ │ │ ├── Prototype.java │ │ │ │ │ │ ├── StdTypeList.java │ │ │ │ │ │ ├── Type.java │ │ │ │ │ │ ├── TypeBearer.java │ │ │ │ │ │ ├── TypeList.java │ │ │ │ │ │ └── package.html │ │ │ │ ├── ssa │ │ │ │ │ ├── BasicRegisterMapper.java │ │ │ │ │ ├── ConstCollector.java │ │ │ │ │ ├── DeadCodeRemover.java │ │ │ │ │ ├── DomFront.java │ │ │ │ │ ├── Dominators.java │ │ │ │ │ ├── EscapeAnalysis.java │ │ │ │ │ ├── InterferenceRegisterMapper.java │ │ │ │ │ ├── LiteralOpUpgrader.java │ │ │ │ │ ├── LocalVariableExtractor.java │ │ │ │ │ ├── LocalVariableInfo.java │ │ │ │ │ ├── MoveParamCombiner.java │ │ │ │ │ ├── NormalSsaInsn.java │ │ │ │ │ ├── Optimizer.java │ │ │ │ │ ├── PhiInsn.java │ │ │ │ │ ├── PhiTypeResolver.java │ │ │ │ │ ├── RegisterMapper.java │ │ │ │ │ ├── SCCP.java │ │ │ │ │ ├── SetFactory.java │ │ │ │ │ ├── SsaBasicBlock.java │ │ │ │ │ ├── SsaConverter.java │ │ │ │ │ ├── SsaInsn.java │ │ │ │ │ ├── SsaMethod.java │ │ │ │ │ ├── SsaRenamer.java │ │ │ │ │ ├── back │ │ │ │ │ │ ├── FirstFitAllocator.java │ │ │ │ │ │ ├── FirstFitLocalCombiningAllocator.java │ │ │ │ │ │ ├── IdenticalBlockCombiner.java │ │ │ │ │ │ ├── InterferenceGraph.java │ │ │ │ │ │ ├── LivenessAnalyzer.java │ │ │ │ │ │ ├── NullRegisterAllocator.java │ │ │ │ │ │ ├── RegisterAllocator.java │ │ │ │ │ │ └── SsaToRop.java │ │ │ │ │ └── package-info.java │ │ │ │ └── util │ │ │ │ │ ├── AnnotatedOutput.java │ │ │ │ │ ├── BitIntSet.java │ │ │ │ │ ├── Bits.java │ │ │ │ │ ├── ByteArray.java │ │ │ │ │ ├── ByteArrayAnnotatedOutput.java │ │ │ │ │ ├── FixedSizeList.java │ │ │ │ │ ├── Hex.java │ │ │ │ │ ├── HexParser.java │ │ │ │ │ ├── IndentingWriter.java │ │ │ │ │ ├── IntIterator.java │ │ │ │ │ ├── IntList.java │ │ │ │ │ ├── IntSet.java │ │ │ │ │ ├── LabeledItem.java │ │ │ │ │ ├── LabeledList.java │ │ │ │ │ ├── ListIntSet.java │ │ │ │ │ ├── MutabilityControl.java │ │ │ │ │ ├── MutabilityException.java │ │ │ │ │ ├── Output.java │ │ │ │ │ ├── ToHuman.java │ │ │ │ │ ├── TwoColumnOutput.java │ │ │ │ │ ├── Warning.java │ │ │ │ │ ├── Writers.java │ │ │ │ │ └── package.html │ │ │ └── multidex │ │ │ │ ├── ArchivePathElement.java │ │ │ │ ├── ClassPathElement.java │ │ │ │ ├── ClassReferenceListBuilder.java │ │ │ │ ├── FolderPathElement.java │ │ │ │ ├── MainDexListBuilder.java │ │ │ │ └── Path.java │ │ │ ├── baksmali │ │ │ ├── Adaptors │ │ │ │ ├── AnnotationFormatter.java │ │ │ │ ├── BlankMethodItem.java │ │ │ │ ├── CatchMethodItem.java │ │ │ │ ├── ClassDefinition.java │ │ │ │ ├── CommentMethodItem.java │ │ │ │ ├── CommentedOutMethodItem.java │ │ │ │ ├── CommentingIndentingWriter.java │ │ │ │ ├── Debug │ │ │ │ │ ├── BeginEpilogueMethodItem.java │ │ │ │ │ ├── DebugMethodItem.java │ │ │ │ │ ├── EndLocalMethodItem.java │ │ │ │ │ ├── EndPrologueMethodItem.java │ │ │ │ │ ├── LineNumberMethodItem.java │ │ │ │ │ ├── LocalFormatter.java │ │ │ │ │ ├── RestartLocalMethodItem.java │ │ │ │ │ ├── SetSourceFileMethodItem.java │ │ │ │ │ └── StartLocalMethodItem.java │ │ │ │ ├── EncodedValue │ │ │ │ │ ├── AnnotationEncodedValueAdaptor.java │ │ │ │ │ ├── ArrayEncodedValueAdaptor.java │ │ │ │ │ └── EncodedValueAdaptor.java │ │ │ │ ├── EndTryLabelMethodItem.java │ │ │ │ ├── FieldDefinition.java │ │ │ │ ├── Format │ │ │ │ │ ├── ArrayDataMethodItem.java │ │ │ │ │ ├── InstructionMethodItem.java │ │ │ │ │ ├── InstructionMethodItemFactory.java │ │ │ │ │ ├── OffsetInstructionFormatMethodItem.java │ │ │ │ │ ├── PackedSwitchMethodItem.java │ │ │ │ │ ├── SparseSwitchMethodItem.java │ │ │ │ │ └── UnresolvedOdexInstructionMethodItem.java │ │ │ │ ├── LabelMethodItem.java │ │ │ │ ├── MethodDefinition.java │ │ │ │ ├── MethodItem.java │ │ │ │ ├── PostInstructionRegisterInfoMethodItem.java │ │ │ │ ├── PreInstructionRegisterInfoMethodItem.java │ │ │ │ ├── ReferenceFormatter.java │ │ │ │ ├── RegisterFormatter.java │ │ │ │ └── SyntheticAccessCommentMethodItem.java │ │ │ ├── AnalysisArguments.java │ │ │ ├── Baksmali.java │ │ │ ├── BaksmaliOptions.java │ │ │ ├── DeodexCommand.java │ │ │ ├── DexInputCommand.java │ │ │ ├── DisassembleCommand.java │ │ │ ├── DumpCommand.java │ │ │ ├── HelpCommand.java │ │ │ ├── ListClassesCommand.java │ │ │ ├── ListCommand.java │ │ │ ├── ListDependenciesCommand.java │ │ │ ├── ListDexCommand.java │ │ │ ├── ListFieldOffsetsCommand.java │ │ │ ├── ListFieldsCommand.java │ │ │ ├── ListHelpCommand.java │ │ │ ├── ListMethodsCommand.java │ │ │ ├── ListReferencesCommand.java │ │ │ ├── ListStringsCommand.java │ │ │ ├── ListTypesCommand.java │ │ │ ├── ListVtablesCommand.java │ │ │ ├── Main.java │ │ │ └── Renderers │ │ │ │ ├── BooleanRenderer.java │ │ │ │ ├── ByteRenderer.java │ │ │ │ ├── CharRenderer.java │ │ │ │ ├── DoubleRenderer.java │ │ │ │ ├── FloatRenderer.java │ │ │ │ ├── IntegerRenderer.java │ │ │ │ ├── LongRenderer.java │ │ │ │ └── ShortRenderer.java │ │ │ ├── dexlib2 │ │ │ ├── AccessFlags.java │ │ │ ├── AnnotationVisibility.java │ │ │ ├── DebugItemType.java │ │ │ ├── DexFileFactory.java │ │ │ ├── Format.java │ │ │ ├── MethodHandleType.java │ │ │ ├── Opcode.java │ │ │ ├── Opcodes.java │ │ │ ├── ReferenceType.java │ │ │ ├── ValueType.java │ │ │ ├── VerificationError.java │ │ │ ├── VersionMap.java │ │ │ ├── analysis │ │ │ │ ├── AnalysisException.java │ │ │ │ ├── AnalyzedInstruction.java │ │ │ │ ├── AnalyzedMethodUtil.java │ │ │ │ ├── ArrayProto.java │ │ │ │ ├── ClassPath.java │ │ │ │ ├── ClassPathResolver.java │ │ │ │ ├── ClassProto.java │ │ │ │ ├── ClassProvider.java │ │ │ │ ├── CustomInlineMethodResolver.java │ │ │ │ ├── DexClassProvider.java │ │ │ │ ├── InlineMethodResolver.java │ │ │ │ ├── MethodAnalyzer.java │ │ │ │ ├── OdexedFieldInstructionMapper.java │ │ │ │ ├── PathEntryLoader.java │ │ │ │ ├── PrimitiveProto.java │ │ │ │ ├── RegisterType.java │ │ │ │ ├── TypeProto.java │ │ │ │ ├── UnknownClassProto.java │ │ │ │ ├── UnresolvedClassException.java │ │ │ │ ├── UnresolvedOdexInstruction.java │ │ │ │ ├── reflection │ │ │ │ │ ├── ReflectionClassDef.java │ │ │ │ │ ├── ReflectionConstructor.java │ │ │ │ │ ├── ReflectionField.java │ │ │ │ │ ├── ReflectionMethod.java │ │ │ │ │ └── util │ │ │ │ │ │ └── ReflectionUtils.java │ │ │ │ └── util │ │ │ │ │ └── TypeProtoUtils.java │ │ │ ├── base │ │ │ │ ├── BaseAnnotation.java │ │ │ │ ├── BaseAnnotationElement.java │ │ │ │ ├── BaseExceptionHandler.java │ │ │ │ ├── BaseMethodParameter.java │ │ │ │ ├── BaseTryBlock.java │ │ │ │ ├── reference │ │ │ │ │ ├── BaseCallSiteReference.java │ │ │ │ │ ├── BaseFieldReference.java │ │ │ │ │ ├── BaseMethodHandleReference.java │ │ │ │ │ ├── BaseMethodProtoReference.java │ │ │ │ │ ├── BaseMethodReference.java │ │ │ │ │ ├── BaseReference.java │ │ │ │ │ ├── BaseStringReference.java │ │ │ │ │ └── BaseTypeReference.java │ │ │ │ └── value │ │ │ │ │ ├── BaseAnnotationEncodedValue.java │ │ │ │ │ ├── BaseArrayEncodedValue.java │ │ │ │ │ ├── BaseBooleanEncodedValue.java │ │ │ │ │ ├── BaseByteEncodedValue.java │ │ │ │ │ ├── BaseCharEncodedValue.java │ │ │ │ │ ├── BaseDoubleEncodedValue.java │ │ │ │ │ ├── BaseEnumEncodedValue.java │ │ │ │ │ ├── BaseFieldEncodedValue.java │ │ │ │ │ ├── BaseFloatEncodedValue.java │ │ │ │ │ ├── BaseIntEncodedValue.java │ │ │ │ │ ├── BaseLongEncodedValue.java │ │ │ │ │ ├── BaseMethodEncodedValue.java │ │ │ │ │ ├── BaseMethodHandleEncodedValue.java │ │ │ │ │ ├── BaseMethodTypeEncodedValue.java │ │ │ │ │ ├── BaseNullEncodedValue.java │ │ │ │ │ ├── BaseShortEncodedValue.java │ │ │ │ │ ├── BaseStringEncodedValue.java │ │ │ │ │ └── BaseTypeEncodedValue.java │ │ │ ├── builder │ │ │ │ ├── BuilderDebugItem.java │ │ │ │ ├── BuilderExceptionHandler.java │ │ │ │ ├── BuilderInstruction.java │ │ │ │ ├── BuilderOffsetInstruction.java │ │ │ │ ├── BuilderSwitchPayload.java │ │ │ │ ├── BuilderTryBlock.java │ │ │ │ ├── ItemWithLocation.java │ │ │ │ ├── Label.java │ │ │ │ ├── LocatedDebugItems.java │ │ │ │ ├── LocatedItems.java │ │ │ │ ├── LocatedLabels.java │ │ │ │ ├── MethodImplementationBuilder.java │ │ │ │ ├── MethodLocation.java │ │ │ │ ├── MutableMethodImplementation.java │ │ │ │ ├── SwitchLabelElement.java │ │ │ │ ├── debug │ │ │ │ │ ├── BuilderEndLocal.java │ │ │ │ │ ├── BuilderEpilogueBegin.java │ │ │ │ │ ├── BuilderLineNumber.java │ │ │ │ │ ├── BuilderPrologueEnd.java │ │ │ │ │ ├── BuilderRestartLocal.java │ │ │ │ │ ├── BuilderSetSourceFile.java │ │ │ │ │ └── BuilderStartLocal.java │ │ │ │ └── instruction │ │ │ │ │ ├── BuilderArrayPayload.java │ │ │ │ │ ├── BuilderInstruction10t.java │ │ │ │ │ ├── BuilderInstruction10x.java │ │ │ │ │ ├── BuilderInstruction11n.java │ │ │ │ │ ├── BuilderInstruction11x.java │ │ │ │ │ ├── BuilderInstruction12x.java │ │ │ │ │ ├── BuilderInstruction20bc.java │ │ │ │ │ ├── BuilderInstruction20t.java │ │ │ │ │ ├── BuilderInstruction21c.java │ │ │ │ │ ├── BuilderInstruction21ih.java │ │ │ │ │ ├── BuilderInstruction21lh.java │ │ │ │ │ ├── BuilderInstruction21s.java │ │ │ │ │ ├── BuilderInstruction21t.java │ │ │ │ │ ├── BuilderInstruction22b.java │ │ │ │ │ ├── BuilderInstruction22c.java │ │ │ │ │ ├── BuilderInstruction22cs.java │ │ │ │ │ ├── BuilderInstruction22s.java │ │ │ │ │ ├── BuilderInstruction22t.java │ │ │ │ │ ├── BuilderInstruction22x.java │ │ │ │ │ ├── BuilderInstruction23x.java │ │ │ │ │ ├── BuilderInstruction30t.java │ │ │ │ │ ├── BuilderInstruction31c.java │ │ │ │ │ ├── BuilderInstruction31i.java │ │ │ │ │ ├── BuilderInstruction31t.java │ │ │ │ │ ├── BuilderInstruction32x.java │ │ │ │ │ ├── BuilderInstruction35c.java │ │ │ │ │ ├── BuilderInstruction35mi.java │ │ │ │ │ ├── BuilderInstruction35ms.java │ │ │ │ │ ├── BuilderInstruction3rc.java │ │ │ │ │ ├── BuilderInstruction3rmi.java │ │ │ │ │ ├── BuilderInstruction3rms.java │ │ │ │ │ ├── BuilderInstruction45cc.java │ │ │ │ │ ├── BuilderInstruction4rcc.java │ │ │ │ │ ├── BuilderInstruction51l.java │ │ │ │ │ ├── BuilderPackedSwitchPayload.java │ │ │ │ │ ├── BuilderSparseSwitchPayload.java │ │ │ │ │ └── BuilderSwitchElement.java │ │ │ ├── dexbacked │ │ │ │ ├── CDexBackedDexFile.java │ │ │ │ ├── CDexBackedMethodImplementation.java │ │ │ │ ├── DexBackedAnnotation.java │ │ │ │ ├── DexBackedAnnotationElement.java │ │ │ │ ├── DexBackedCatchAllExceptionHandler.java │ │ │ │ ├── DexBackedClassDef.java │ │ │ │ ├── DexBackedDexFile.java │ │ │ │ ├── DexBackedExceptionHandler.java │ │ │ │ ├── DexBackedField.java │ │ │ │ ├── DexBackedMethod.java │ │ │ │ ├── DexBackedMethodImplementation.java │ │ │ │ ├── DexBackedOdexFile.java │ │ │ │ ├── DexBackedTryBlock.java │ │ │ │ ├── DexBackedTypedExceptionHandler.java │ │ │ │ ├── DexBuffer.java │ │ │ │ ├── DexReader.java │ │ │ │ ├── OatFile.java │ │ │ │ ├── ZipDexContainer.java │ │ │ │ ├── instruction │ │ │ │ │ ├── DexBackedArrayPayload.java │ │ │ │ │ ├── DexBackedInstruction.java │ │ │ │ │ ├── DexBackedInstruction10t.java │ │ │ │ │ ├── DexBackedInstruction10x.java │ │ │ │ │ ├── DexBackedInstruction11n.java │ │ │ │ │ ├── DexBackedInstruction11x.java │ │ │ │ │ ├── DexBackedInstruction12x.java │ │ │ │ │ ├── DexBackedInstruction20bc.java │ │ │ │ │ ├── DexBackedInstruction20t.java │ │ │ │ │ ├── DexBackedInstruction21c.java │ │ │ │ │ ├── DexBackedInstruction21ih.java │ │ │ │ │ ├── DexBackedInstruction21lh.java │ │ │ │ │ ├── DexBackedInstruction21s.java │ │ │ │ │ ├── DexBackedInstruction21t.java │ │ │ │ │ ├── DexBackedInstruction22b.java │ │ │ │ │ ├── DexBackedInstruction22c.java │ │ │ │ │ ├── DexBackedInstruction22cs.java │ │ │ │ │ ├── DexBackedInstruction22s.java │ │ │ │ │ ├── DexBackedInstruction22t.java │ │ │ │ │ ├── DexBackedInstruction22x.java │ │ │ │ │ ├── DexBackedInstruction23x.java │ │ │ │ │ ├── DexBackedInstruction30t.java │ │ │ │ │ ├── DexBackedInstruction31c.java │ │ │ │ │ ├── DexBackedInstruction31i.java │ │ │ │ │ ├── DexBackedInstruction31t.java │ │ │ │ │ ├── DexBackedInstruction32x.java │ │ │ │ │ ├── DexBackedInstruction35c.java │ │ │ │ │ ├── DexBackedInstruction35mi.java │ │ │ │ │ ├── DexBackedInstruction35ms.java │ │ │ │ │ ├── DexBackedInstruction3rc.java │ │ │ │ │ ├── DexBackedInstruction3rmi.java │ │ │ │ │ ├── DexBackedInstruction3rms.java │ │ │ │ │ ├── DexBackedInstruction45cc.java │ │ │ │ │ ├── DexBackedInstruction4rcc.java │ │ │ │ │ ├── DexBackedInstruction51l.java │ │ │ │ │ ├── DexBackedPackedSwitchPayload.java │ │ │ │ │ ├── DexBackedSparseSwitchPayload.java │ │ │ │ │ └── DexBackedUnknownInstruction.java │ │ │ │ ├── raw │ │ │ │ │ ├── AnnotationDirectoryItem.java │ │ │ │ │ ├── AnnotationItem.java │ │ │ │ │ ├── AnnotationSetItem.java │ │ │ │ │ ├── AnnotationSetRefList.java │ │ │ │ │ ├── CallSiteIdItem.java │ │ │ │ │ ├── CdexDebugOffsetTable.java │ │ │ │ │ ├── CdexHeaderItem.java │ │ │ │ │ ├── ClassDataItem.java │ │ │ │ │ ├── ClassDefItem.java │ │ │ │ │ ├── CodeItem.java │ │ │ │ │ ├── DebugInfoItem.java │ │ │ │ │ ├── EncodedArrayItem.java │ │ │ │ │ ├── EncodedValue.java │ │ │ │ │ ├── FieldIdItem.java │ │ │ │ │ ├── HeaderItem.java │ │ │ │ │ ├── ItemType.java │ │ │ │ │ ├── MapItem.java │ │ │ │ │ ├── MethodHandleItem.java │ │ │ │ │ ├── MethodIdItem.java │ │ │ │ │ ├── OdexHeaderItem.java │ │ │ │ │ ├── ProtoIdItem.java │ │ │ │ │ ├── SectionAnnotator.java │ │ │ │ │ ├── StringDataItem.java │ │ │ │ │ ├── StringIdItem.java │ │ │ │ │ ├── TypeIdItem.java │ │ │ │ │ ├── TypeListItem.java │ │ │ │ │ └── util │ │ │ │ │ │ └── DexAnnotator.java │ │ │ │ ├── reference │ │ │ │ │ ├── DexBackedCallSiteReference.java │ │ │ │ │ ├── DexBackedFieldReference.java │ │ │ │ │ ├── DexBackedMethodHandleReference.java │ │ │ │ │ ├── DexBackedMethodProtoReference.java │ │ │ │ │ ├── DexBackedMethodReference.java │ │ │ │ │ ├── DexBackedReference.java │ │ │ │ │ ├── DexBackedStringReference.java │ │ │ │ │ └── DexBackedTypeReference.java │ │ │ │ ├── util │ │ │ │ │ ├── AnnotationsDirectory.java │ │ │ │ │ ├── DebugInfo.java │ │ │ │ │ ├── EncodedArrayItemIterator.java │ │ │ │ │ ├── FixedSizeList.java │ │ │ │ │ ├── FixedSizeSet.java │ │ │ │ │ ├── ParameterIterator.java │ │ │ │ │ ├── VariableSizeCollection.java │ │ │ │ │ ├── VariableSizeIterator.java │ │ │ │ │ ├── VariableSizeList.java │ │ │ │ │ ├── VariableSizeListIterator.java │ │ │ │ │ ├── VariableSizeLookaheadIterator.java │ │ │ │ │ └── VariableSizeSet.java │ │ │ │ └── value │ │ │ │ │ ├── DexBackedAnnotationEncodedValue.java │ │ │ │ │ ├── DexBackedArrayEncodedValue.java │ │ │ │ │ ├── DexBackedEncodedValue.java │ │ │ │ │ ├── DexBackedEnumEncodedValue.java │ │ │ │ │ ├── DexBackedFieldEncodedValue.java │ │ │ │ │ ├── DexBackedMethodEncodedValue.java │ │ │ │ │ ├── DexBackedMethodHandleEncodedValue.java │ │ │ │ │ ├── DexBackedMethodTypeEncodedValue.java │ │ │ │ │ ├── DexBackedStringEncodedValue.java │ │ │ │ │ └── DexBackedTypeEncodedValue.java │ │ │ ├── iface │ │ │ │ ├── Annotatable.java │ │ │ │ ├── Annotation.java │ │ │ │ ├── AnnotationElement.java │ │ │ │ ├── BasicAnnotation.java │ │ │ │ ├── ClassDef.java │ │ │ │ ├── DexFile.java │ │ │ │ ├── ExceptionHandler.java │ │ │ │ ├── Field.java │ │ │ │ ├── Member.java │ │ │ │ ├── Method.java │ │ │ │ ├── MethodImplementation.java │ │ │ │ ├── MethodParameter.java │ │ │ │ ├── MultiDexContainer.java │ │ │ │ ├── TryBlock.java │ │ │ │ ├── debug │ │ │ │ │ ├── DebugItem.java │ │ │ │ │ ├── EndLocal.java │ │ │ │ │ ├── EpilogueBegin.java │ │ │ │ │ ├── LineNumber.java │ │ │ │ │ ├── LocalInfo.java │ │ │ │ │ ├── PrologueEnd.java │ │ │ │ │ ├── RestartLocal.java │ │ │ │ │ ├── SetSourceFile.java │ │ │ │ │ └── StartLocal.java │ │ │ │ ├── instruction │ │ │ │ │ ├── DualReferenceInstruction.java │ │ │ │ │ ├── FieldOffsetInstruction.java │ │ │ │ │ ├── FiveRegisterInstruction.java │ │ │ │ │ ├── HatLiteralInstruction.java │ │ │ │ │ ├── InlineIndexInstruction.java │ │ │ │ │ ├── Instruction.java │ │ │ │ │ ├── LongHatLiteralInstruction.java │ │ │ │ │ ├── NarrowHatLiteralInstruction.java │ │ │ │ │ ├── NarrowLiteralInstruction.java │ │ │ │ │ ├── OffsetInstruction.java │ │ │ │ │ ├── OneRegisterInstruction.java │ │ │ │ │ ├── PayloadInstruction.java │ │ │ │ │ ├── ReferenceInstruction.java │ │ │ │ │ ├── RegisterRangeInstruction.java │ │ │ │ │ ├── SwitchElement.java │ │ │ │ │ ├── SwitchPayload.java │ │ │ │ │ ├── ThreeRegisterInstruction.java │ │ │ │ │ ├── TwoRegisterInstruction.java │ │ │ │ │ ├── VariableRegisterInstruction.java │ │ │ │ │ ├── VerificationErrorInstruction.java │ │ │ │ │ ├── VtableIndexInstruction.java │ │ │ │ │ ├── WideLiteralInstruction.java │ │ │ │ │ └── formats │ │ │ │ │ │ ├── ArrayPayload.java │ │ │ │ │ │ ├── Instruction10t.java │ │ │ │ │ │ ├── Instruction10x.java │ │ │ │ │ │ ├── Instruction11n.java │ │ │ │ │ │ ├── Instruction11x.java │ │ │ │ │ │ ├── Instruction12x.java │ │ │ │ │ │ ├── Instruction20bc.java │ │ │ │ │ │ ├── Instruction20t.java │ │ │ │ │ │ ├── Instruction21c.java │ │ │ │ │ │ ├── Instruction21ih.java │ │ │ │ │ │ ├── Instruction21lh.java │ │ │ │ │ │ ├── Instruction21s.java │ │ │ │ │ │ ├── Instruction21t.java │ │ │ │ │ │ ├── Instruction22b.java │ │ │ │ │ │ ├── Instruction22c.java │ │ │ │ │ │ ├── Instruction22cs.java │ │ │ │ │ │ ├── Instruction22s.java │ │ │ │ │ │ ├── Instruction22t.java │ │ │ │ │ │ ├── Instruction22x.java │ │ │ │ │ │ ├── Instruction23x.java │ │ │ │ │ │ ├── Instruction30t.java │ │ │ │ │ │ ├── Instruction31c.java │ │ │ │ │ │ ├── Instruction31i.java │ │ │ │ │ │ ├── Instruction31t.java │ │ │ │ │ │ ├── Instruction32x.java │ │ │ │ │ │ ├── Instruction35c.java │ │ │ │ │ │ ├── Instruction35mi.java │ │ │ │ │ │ ├── Instruction35ms.java │ │ │ │ │ │ ├── Instruction3rc.java │ │ │ │ │ │ ├── Instruction3rmi.java │ │ │ │ │ │ ├── Instruction3rms.java │ │ │ │ │ │ ├── Instruction45cc.java │ │ │ │ │ │ ├── Instruction4rcc.java │ │ │ │ │ │ ├── Instruction51l.java │ │ │ │ │ │ ├── PackedSwitchPayload.java │ │ │ │ │ │ ├── SparseSwitchPayload.java │ │ │ │ │ │ └── UnknownInstruction.java │ │ │ │ ├── reference │ │ │ │ │ ├── CallSiteReference.java │ │ │ │ │ ├── FieldReference.java │ │ │ │ │ ├── MethodHandleReference.java │ │ │ │ │ ├── MethodProtoReference.java │ │ │ │ │ ├── MethodReference.java │ │ │ │ │ ├── Reference.java │ │ │ │ │ ├── StringReference.java │ │ │ │ │ └── TypeReference.java │ │ │ │ └── value │ │ │ │ │ ├── AnnotationEncodedValue.java │ │ │ │ │ ├── ArrayEncodedValue.java │ │ │ │ │ ├── BooleanEncodedValue.java │ │ │ │ │ ├── ByteEncodedValue.java │ │ │ │ │ ├── CharEncodedValue.java │ │ │ │ │ ├── DoubleEncodedValue.java │ │ │ │ │ ├── EncodedValue.java │ │ │ │ │ ├── EnumEncodedValue.java │ │ │ │ │ ├── FieldEncodedValue.java │ │ │ │ │ ├── FloatEncodedValue.java │ │ │ │ │ ├── IntEncodedValue.java │ │ │ │ │ ├── LongEncodedValue.java │ │ │ │ │ ├── MethodEncodedValue.java │ │ │ │ │ ├── MethodHandleEncodedValue.java │ │ │ │ │ ├── MethodTypeEncodedValue.java │ │ │ │ │ ├── NullEncodedValue.java │ │ │ │ │ ├── ShortEncodedValue.java │ │ │ │ │ ├── StringEncodedValue.java │ │ │ │ │ └── TypeEncodedValue.java │ │ │ ├── immutable │ │ │ │ ├── ImmutableAnnotation.java │ │ │ │ ├── ImmutableAnnotationElement.java │ │ │ │ ├── ImmutableClassDef.java │ │ │ │ ├── ImmutableDexFile.java │ │ │ │ ├── ImmutableExceptionHandler.java │ │ │ │ ├── ImmutableField.java │ │ │ │ ├── ImmutableMethod.java │ │ │ │ ├── ImmutableMethodImplementation.java │ │ │ │ ├── ImmutableMethodParameter.java │ │ │ │ ├── ImmutableMultiDexContainer.java │ │ │ │ ├── ImmutableTryBlock.java │ │ │ │ ├── debug │ │ │ │ │ ├── ImmutableDebugItem.java │ │ │ │ │ ├── ImmutableEndLocal.java │ │ │ │ │ ├── ImmutableEpilogueBegin.java │ │ │ │ │ ├── ImmutableLineNumber.java │ │ │ │ │ ├── ImmutablePrologueEnd.java │ │ │ │ │ ├── ImmutableRestartLocal.java │ │ │ │ │ ├── ImmutableSetSourceFile.java │ │ │ │ │ └── ImmutableStartLocal.java │ │ │ │ ├── instruction │ │ │ │ │ ├── ImmutableArrayPayload.java │ │ │ │ │ ├── ImmutableInstruction.java │ │ │ │ │ ├── ImmutableInstruction10t.java │ │ │ │ │ ├── ImmutableInstruction10x.java │ │ │ │ │ ├── ImmutableInstruction11n.java │ │ │ │ │ ├── ImmutableInstruction11x.java │ │ │ │ │ ├── ImmutableInstruction12x.java │ │ │ │ │ ├── ImmutableInstruction20bc.java │ │ │ │ │ ├── ImmutableInstruction20t.java │ │ │ │ │ ├── ImmutableInstruction21c.java │ │ │ │ │ ├── ImmutableInstruction21ih.java │ │ │ │ │ ├── ImmutableInstruction21lh.java │ │ │ │ │ ├── ImmutableInstruction21s.java │ │ │ │ │ ├── ImmutableInstruction21t.java │ │ │ │ │ ├── ImmutableInstruction22b.java │ │ │ │ │ ├── ImmutableInstruction22c.java │ │ │ │ │ ├── ImmutableInstruction22cs.java │ │ │ │ │ ├── ImmutableInstruction22s.java │ │ │ │ │ ├── ImmutableInstruction22t.java │ │ │ │ │ ├── ImmutableInstruction22x.java │ │ │ │ │ ├── ImmutableInstruction23x.java │ │ │ │ │ ├── ImmutableInstruction30t.java │ │ │ │ │ ├── ImmutableInstruction31c.java │ │ │ │ │ ├── ImmutableInstruction31i.java │ │ │ │ │ ├── ImmutableInstruction31t.java │ │ │ │ │ ├── ImmutableInstruction32x.java │ │ │ │ │ ├── ImmutableInstruction35c.java │ │ │ │ │ ├── ImmutableInstruction35mi.java │ │ │ │ │ ├── ImmutableInstruction35ms.java │ │ │ │ │ ├── ImmutableInstruction3rc.java │ │ │ │ │ ├── ImmutableInstruction3rmi.java │ │ │ │ │ ├── ImmutableInstruction3rms.java │ │ │ │ │ ├── ImmutableInstruction45cc.java │ │ │ │ │ ├── ImmutableInstruction4rcc.java │ │ │ │ │ ├── ImmutableInstruction51l.java │ │ │ │ │ ├── ImmutableInstructionFactory.java │ │ │ │ │ ├── ImmutablePackedSwitchPayload.java │ │ │ │ │ ├── ImmutableSparseSwitchPayload.java │ │ │ │ │ ├── ImmutableSwitchElement.java │ │ │ │ │ └── ImmutableUnknownInstruction.java │ │ │ │ ├── reference │ │ │ │ │ ├── ImmutableCallSiteReference.java │ │ │ │ │ ├── ImmutableFieldReference.java │ │ │ │ │ ├── ImmutableMethodHandleReference.java │ │ │ │ │ ├── ImmutableMethodProtoReference.java │ │ │ │ │ ├── ImmutableMethodReference.java │ │ │ │ │ ├── ImmutableReference.java │ │ │ │ │ ├── ImmutableReferenceFactory.java │ │ │ │ │ ├── ImmutableStringReference.java │ │ │ │ │ └── ImmutableTypeReference.java │ │ │ │ ├── util │ │ │ │ │ ├── CharSequenceConverter.java │ │ │ │ │ └── ParamUtil.java │ │ │ │ └── value │ │ │ │ │ ├── ImmutableAnnotationEncodedValue.java │ │ │ │ │ ├── ImmutableArrayEncodedValue.java │ │ │ │ │ ├── ImmutableBooleanEncodedValue.java │ │ │ │ │ ├── ImmutableByteEncodedValue.java │ │ │ │ │ ├── ImmutableCharEncodedValue.java │ │ │ │ │ ├── ImmutableDoubleEncodedValue.java │ │ │ │ │ ├── ImmutableEncodedValue.java │ │ │ │ │ ├── ImmutableEncodedValueFactory.java │ │ │ │ │ ├── ImmutableEnumEncodedValue.java │ │ │ │ │ ├── ImmutableFieldEncodedValue.java │ │ │ │ │ ├── ImmutableFloatEncodedValue.java │ │ │ │ │ ├── ImmutableIntEncodedValue.java │ │ │ │ │ ├── ImmutableLongEncodedValue.java │ │ │ │ │ ├── ImmutableMethodEncodedValue.java │ │ │ │ │ ├── ImmutableMethodHandleEncodedValue.java │ │ │ │ │ ├── ImmutableMethodTypeEncodedValue.java │ │ │ │ │ ├── ImmutableNullEncodedValue.java │ │ │ │ │ ├── ImmutableShortEncodedValue.java │ │ │ │ │ ├── ImmutableStringEncodedValue.java │ │ │ │ │ └── ImmutableTypeEncodedValue.java │ │ │ ├── rewriter │ │ │ │ ├── AnnotationElementRewriter.java │ │ │ │ ├── AnnotationRewriter.java │ │ │ │ ├── ClassDefRewriter.java │ │ │ │ ├── DebugItemRewriter.java │ │ │ │ ├── DexRewriter.java │ │ │ │ ├── EncodedValueRewriter.java │ │ │ │ ├── ExceptionHandlerRewriter.java │ │ │ │ ├── FieldReferenceRewriter.java │ │ │ │ ├── FieldRewriter.java │ │ │ │ ├── InstructionRewriter.java │ │ │ │ ├── MethodImplementationRewriter.java │ │ │ │ ├── MethodParameterRewriter.java │ │ │ │ ├── MethodReferenceRewriter.java │ │ │ │ ├── MethodRewriter.java │ │ │ │ ├── Rewriter.java │ │ │ │ ├── RewriterModule.java │ │ │ │ ├── RewriterUtils.java │ │ │ │ ├── Rewriters.java │ │ │ │ ├── TryBlockRewriter.java │ │ │ │ └── TypeRewriter.java │ │ │ ├── util │ │ │ │ ├── AlignmentUtils.java │ │ │ │ ├── AnnotatedBytes.java │ │ │ │ ├── DexUtil.java │ │ │ │ ├── EncodedValueUtils.java │ │ │ │ ├── FieldUtil.java │ │ │ │ ├── InstructionOffsetMap.java │ │ │ │ ├── InstructionUtil.java │ │ │ │ ├── MethodUtil.java │ │ │ │ ├── Preconditions.java │ │ │ │ ├── ReferenceUtil.java │ │ │ │ ├── SyntheticAccessorFSM.java │ │ │ │ ├── SyntheticAccessorResolver.java │ │ │ │ └── TypeUtils.java │ │ │ └── writer │ │ │ │ ├── AnnotationSection.java │ │ │ │ ├── AnnotationSetSection.java │ │ │ │ ├── CallSiteSection.java │ │ │ │ ├── ClassSection.java │ │ │ │ ├── DebugWriter.java │ │ │ │ ├── DexDataWriter.java │ │ │ │ ├── DexWriter.java │ │ │ │ ├── EncodedArraySection.java │ │ │ │ ├── EncodedValueWriter.java │ │ │ │ ├── FieldSection.java │ │ │ │ ├── IndexSection.java │ │ │ │ ├── InstructionFactory.java │ │ │ │ ├── InstructionWriter.java │ │ │ │ ├── MethodHandleSection.java │ │ │ │ ├── MethodSection.java │ │ │ │ ├── NullableIndexSection.java │ │ │ │ ├── NullableOffsetSection.java │ │ │ │ ├── OffsetSection.java │ │ │ │ ├── ProtoSection.java │ │ │ │ ├── StringSection.java │ │ │ │ ├── TypeListSection.java │ │ │ │ ├── TypeSection.java │ │ │ │ ├── builder │ │ │ │ ├── BaseBuilderPool.java │ │ │ │ ├── BuilderAnnotation.java │ │ │ │ ├── BuilderAnnotationElement.java │ │ │ │ ├── BuilderAnnotationPool.java │ │ │ │ ├── BuilderAnnotationSet.java │ │ │ │ ├── BuilderAnnotationSetPool.java │ │ │ │ ├── BuilderCallSitePool.java │ │ │ │ ├── BuilderCallSiteReference.java │ │ │ │ ├── BuilderClassDef.java │ │ │ │ ├── BuilderClassPool.java │ │ │ │ ├── BuilderEncodedArrayPool.java │ │ │ │ ├── BuilderEncodedValues.java │ │ │ │ ├── BuilderExceptionHandler.java │ │ │ │ ├── BuilderField.java │ │ │ │ ├── BuilderFieldPool.java │ │ │ │ ├── BuilderFieldReference.java │ │ │ │ ├── BuilderMapEntryCollection.java │ │ │ │ ├── BuilderMethod.java │ │ │ │ ├── BuilderMethodHandlePool.java │ │ │ │ ├── BuilderMethodHandleReference.java │ │ │ │ ├── BuilderMethodParameter.java │ │ │ │ ├── BuilderMethodPool.java │ │ │ │ ├── BuilderMethodProtoReference.java │ │ │ │ ├── BuilderMethodReference.java │ │ │ │ ├── BuilderProtoPool.java │ │ │ │ ├── BuilderReference.java │ │ │ │ ├── BuilderStringPool.java │ │ │ │ ├── BuilderStringReference.java │ │ │ │ ├── BuilderTryBlock.java │ │ │ │ ├── BuilderTypeList.java │ │ │ │ ├── BuilderTypeListPool.java │ │ │ │ ├── BuilderTypePool.java │ │ │ │ ├── BuilderTypeReference.java │ │ │ │ └── DexBuilder.java │ │ │ │ ├── io │ │ │ │ ├── DeferredOutputStream.java │ │ │ │ ├── DeferredOutputStreamFactory.java │ │ │ │ ├── DexDataStore.java │ │ │ │ ├── FileDataStore.java │ │ │ │ ├── FileDeferredOutputStream.java │ │ │ │ ├── MemoryDataStore.java │ │ │ │ └── MemoryDeferredOutputStream.java │ │ │ │ ├── pool │ │ │ │ ├── AnnotationPool.java │ │ │ │ ├── AnnotationSetPool.java │ │ │ │ ├── BaseIndexPool.java │ │ │ │ ├── BaseNullableOffsetPool.java │ │ │ │ ├── BaseOffsetPool.java │ │ │ │ ├── BasePool.java │ │ │ │ ├── CallSitePool.java │ │ │ │ ├── ClassPool.java │ │ │ │ ├── DexPool.java │ │ │ │ ├── EncodedArrayPool.java │ │ │ │ ├── FieldPool.java │ │ │ │ ├── Markable.java │ │ │ │ ├── MethodHandlePool.java │ │ │ │ ├── MethodPool.java │ │ │ │ ├── PoolClassDef.java │ │ │ │ ├── PoolMethod.java │ │ │ │ ├── PoolMethodProto.java │ │ │ │ ├── ProtoPool.java │ │ │ │ ├── StringPool.java │ │ │ │ ├── StringTypeBasePool.java │ │ │ │ ├── TypeListPool.java │ │ │ │ └── TypePool.java │ │ │ │ └── util │ │ │ │ ├── CallSiteUtil.java │ │ │ │ ├── StaticInitializerUtil.java │ │ │ │ └── TryListBuilder.java │ │ │ ├── net │ │ │ └── fornwall │ │ │ │ └── apksigner │ │ │ │ ├── ApkSignatureHelper.java │ │ │ │ ├── Base64.java │ │ │ │ ├── CertCreator.java │ │ │ │ ├── JKS.java │ │ │ │ ├── KeySet.java │ │ │ │ ├── KeyStoreFileManager.java │ │ │ │ ├── LoadKeystoreException.java │ │ │ │ ├── Main.java │ │ │ │ ├── SignatureBlockGenerator.java │ │ │ │ ├── ZipSigner.java │ │ │ │ └── zipio │ │ │ │ ├── CentralEnd.java │ │ │ │ ├── ZioEntry.java │ │ │ │ ├── ZioEntryInputStream.java │ │ │ │ ├── ZioEntryOutputStream.java │ │ │ │ ├── ZipInput.java │ │ │ │ └── ZipOutput.java │ │ │ ├── pxb │ │ │ ├── AXmlConverter.java │ │ │ ├── android │ │ │ │ └── axml │ │ │ │ │ ├── Axml.java │ │ │ │ │ ├── AxmlReader.java │ │ │ │ │ ├── AxmlVisitor.java │ │ │ │ │ ├── AxmlWriter.java │ │ │ │ │ ├── EnableDebugger.java │ │ │ │ │ ├── NodeVisitor.java │ │ │ │ │ ├── StringItem.java │ │ │ │ │ └── StringItems.java │ │ │ └── googlecode │ │ │ │ └── dex2jar │ │ │ │ └── reader │ │ │ │ └── io │ │ │ │ ├── ArrayDataIn.java │ │ │ │ ├── DataIn.java │ │ │ │ ├── DataOut.java │ │ │ │ └── LeDataOut.java │ │ │ ├── smali │ │ │ ├── AssembleCommand.java │ │ │ ├── HelpCommand.java │ │ │ ├── InvalidToken.java │ │ │ ├── LexerErrorInterface.java │ │ │ ├── LiteralTools.java │ │ │ ├── Main.java │ │ │ ├── OdexedInstructionException.java │ │ │ ├── PrintTokensCommand.java │ │ │ ├── SemanticException.java │ │ │ ├── Smali.java │ │ │ ├── SmaliMethodParameter.java │ │ │ ├── SmaliOptions.java │ │ │ ├── SmaliTestUtils.java │ │ │ ├── WithRegister.java │ │ │ ├── smaliFlexLexer.java │ │ │ ├── smaliParser.java │ │ │ ├── smaliTreeWalker.java │ │ │ └── util │ │ │ │ └── BlankReader.java │ │ │ └── util │ │ │ ├── AbstractForwardSequentialList.java │ │ │ ├── AbstractListIterator.java │ │ │ ├── ArraySortedSet.java │ │ │ ├── BitSetUtils.java │ │ │ ├── CharSequenceUtils.java │ │ │ ├── ClassFileNameHandler.java │ │ │ ├── CollectionUtils.java │ │ │ ├── ConsoleUtil.java │ │ │ ├── ExceptionWithContext.java │ │ │ ├── Hex.java │ │ │ ├── ImmutableConverter.java │ │ │ ├── ImmutableUtils.java │ │ │ ├── IndentingWriter.java │ │ │ ├── LinearSearch.java │ │ │ ├── NibbleUtils.java │ │ │ ├── NumberUtils.java │ │ │ ├── PathUtil.java │ │ │ ├── RandomAccessFileInputStream.java │ │ │ ├── RandomAccessFileOutputStream.java │ │ │ ├── SparseArray.java │ │ │ ├── SparseIntArray.java │ │ │ ├── StringUtils.java │ │ │ ├── StringWrapper.java │ │ │ ├── TwoColumnOutput.java │ │ │ ├── Utf8Utils.java │ │ │ ├── WrappedIndentingWriter.java │ │ │ └── jcommander │ │ │ ├── ColonParameterSplitter.java │ │ │ ├── Command.java │ │ │ ├── ExtendedCommands.java │ │ │ ├── ExtendedParameter.java │ │ │ ├── ExtendedParameters.java │ │ │ └── HelpFormatter.java │ └── res │ │ ├── drawable │ │ ├── background_card_black.xml │ │ ├── background_card_dark.xml │ │ ├── background_card_light.xml │ │ ├── background_card_normal_black.xml │ │ ├── background_card_normal_dark.xml │ │ ├── background_card_normal_light.xml │ │ ├── background_card_pressed_black.xml │ │ ├── background_card_pressed_dark.xml │ │ ├── background_card_pressed_light.xml │ │ ├── ic_check_circle.xml │ │ ├── ic_launcher.png │ │ ├── ic_menu_refresh.xml │ │ └── timg.png │ │ ├── layout │ │ ├── activity_main.xml │ │ ├── layout.xml │ │ └── list_item_module.xml │ │ ├── menu │ │ ├── context_menu_modules.xml │ │ └── menu_installer.xml │ │ ├── values │ │ ├── attrs.xml │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── styles.xml │ │ └── xml │ │ └── provider_paths.xml │ └── test │ └── java │ └── com │ └── example │ └── myapplication │ └── ExampleUnitTest.java ├── gradle.properties ├── libs └── classes.dex ├── out.dex └── 无极.iml /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyun1314/haha/e66a1844be45348db0828eb79ea23e3f739dc45a/.gitignore -------------------------------------------------------------------------------- /README.en.md: -------------------------------------------------------------------------------- 1 | # 太极 2 | 3 | #### Description 4 | 想仿照太极 5 | 6 | #### Software Architecture 7 | Software architecture description 8 | 9 | #### Installation 10 | 11 | 1. xxxx 12 | 2. xxxx 13 | 3. xxxx 14 | 15 | #### Instructions 16 | 17 | 1. xxxx 18 | 2. xxxx 19 | 3. xxxx 20 | 21 | #### Contribution 22 | 23 | 1. Fork the repository 24 | 2. Create Feat_xxx branch 25 | 3. Commit your code 26 | 4. Create Pull Request 27 | 28 | 29 | #### Gitee Feature 30 | 31 | 1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md 32 | 2. Gitee blog [blog.gitee.com](https://blog.gitee.com) 33 | 3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) 34 | 4. The most valuable open source project [GVP](https://gitee.com/gvp) 35 | 5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) 36 | 6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 类太极 2 | 3 | #### 介绍 4 | 仿照太极 5 | 6 | #### 软件架构 7 | 软件架构说明 8 | 9 | 10 | #### 安装教程 11 | 12 | 1. xxxx 13 | 2. xxxx 14 | 3. xxxx 15 | 16 | #### 使用说明 17 | 18 | 1. xxxx 19 | 2. xxxx 20 | 3. xxxx 21 | 22 | #### 参与贡献 23 | 24 | 1. Fork 本仓库 25 | 2. 新建 Feat_xxx 分支 26 | 3. 提交代码 27 | 4. 新建 Pull Request 28 | 29 | 30 | #### 码云特技 31 | 32 | 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 33 | 2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com) 34 | 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目 35 | 4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目 36 | 5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 37 | 6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) 38 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # For more information about using CMake with Android Studio, read the 2 | # documentation: https://d.android.com/studio/projects/add-native-code.html 3 | 4 | # Sets the minimum version of CMake required to build the native library. 5 | 6 | cmake_minimum_required(VERSION 3.4.1) 7 | 8 | # Creates and names a library, sets it as either STATIC 9 | # or SHARED, and provides the relative paths to its source code. 10 | # You can define multiple libraries, and CMake builds them for you. 11 | # Gradle automatically packages shared libraries with your APK. 12 | 13 | add_library( # Sets the name of the library. 14 | native-lib 15 | 16 | # Sets the library as a shared library. 17 | SHARED 18 | 19 | # Provides a relative path to your source file(s). 20 | native-lib.cpp ) 21 | 22 | # Searches for a specified prebuilt library and stores the path as a 23 | # variable. Because CMake includes system libraries in the search path by 24 | # default, you only need to specify the name of the public NDK library 25 | # you want to add. CMake verifies that the library exists before 26 | # completing its build. 27 | 28 | find_library( # Sets the name of the path variable. 29 | log-lib 30 | 31 | # Specifies the name of the NDK library that 32 | # you want CMake to locate. 33 | log ) 34 | 35 | # Specifies libraries CMake should link to your target library. You 36 | # can link multiple libraries, such as libraries you define in this 37 | # build script, prebuilt third-party libraries, or system libraries. 38 | 39 | target_link_libraries( # Specifies the target library. 40 | native-lib 41 | 42 | # Links the target library to the log library 43 | # included in the NDK. 44 | ${log-lib} ) -------------------------------------------------------------------------------- /app/libs/AndroidHiddenAPI.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyun1314/haha/e66a1844be45348db0828eb79ea23e3f739dc45a/app/libs/AndroidHiddenAPI.jar -------------------------------------------------------------------------------- /app/libs/dom4j-2.0.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyun1314/haha/e66a1844be45348db0828eb79ea23e3f739dc45a/app/libs/dom4j-2.0.1.jar -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /app/release/output.json: -------------------------------------------------------------------------------- 1 | [{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":1},"path":"app-release.apk","properties":{"packageId":"com.example.myapplication","split":"","minSdkVersion":"15"}}] -------------------------------------------------------------------------------- /app/src/androidTest/java/com/example/myapplication/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.example.myapplication; 2 | 3 | 4 | 5 | 6 | /** 7 | * Instrumented test, which will execute on an Android device. 8 | * 9 | * @see Testing documentation 10 | */ 11 | public class ExampleInstrumentedTest { 12 | 13 | } 14 | -------------------------------------------------------------------------------- /app/src/main/assets/libs/classes.dex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyun1314/haha/e66a1844be45348db0828eb79ea23e3f739dc45a/app/src/main/assets/libs/classes.dex -------------------------------------------------------------------------------- /app/src/main/assets/libs/hahahaha: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyun1314/haha/e66a1844be45348db0828eb79ea23e3f739dc45a/app/src/main/assets/libs/hahahaha -------------------------------------------------------------------------------- /app/src/main/assets/libs/lib/arm64-v8a/libsandhook.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyun1314/haha/e66a1844be45348db0828eb79ea23e3f739dc45a/app/src/main/assets/libs/lib/arm64-v8a/libsandhook.so -------------------------------------------------------------------------------- /app/src/main/assets/libs/lib/armeabi-v7a/libsandhook.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyun1314/haha/e66a1844be45348db0828eb79ea23e3f739dc45a/app/src/main/assets/libs/lib/armeabi-v7a/libsandhook.so -------------------------------------------------------------------------------- /app/src/main/cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # For more information about using CMake with Android Studio, read the 2 | # documentation: https://d.android.com/studio/projects/add-native-code.html 3 | 4 | # Sets the minimum version of CMake required to build the native library. 5 | 6 | cmake_minimum_required(VERSION 3.4.1) 7 | 8 | # Creates and names a library, sets it as either STATIC 9 | # or SHARED, and provides the relative paths to its source code. 10 | # You can define multiple libraries, and CMake builds them for you. 11 | # Gradle automatically packages shared libraries with your APK. 12 | 13 | add_library( # Sets the name of the library. 14 | native-lib 15 | 16 | # Sets the library as a shared library. 17 | SHARED 18 | 19 | # Provides a relative path to your source file(s). 20 | native-lib.cpp ) 21 | 22 | # Searches for a specified prebuilt library and stores the path as a 23 | # variable. Because CMake includes system libraries in the search path by 24 | # default, you only need to specify the name of the public NDK library 25 | # you want to add. CMake verifies that the library exists before 26 | # completing its build. 27 | 28 | find_library( # Sets the name of the path variable. 29 | log-lib 30 | 31 | # Specifies the name of the NDK library that 32 | # you want CMake to locate. 33 | log ) 34 | 35 | # Specifies libraries CMake should link to your target library. You 36 | # can link multiple libraries, such as libraries you define in this 37 | # build script, prebuilt third-party libraries, or system libraries. 38 | 39 | target_link_libraries( # Specifies the target library. 40 | native-lib 41 | 42 | # Links the target library to the log library 43 | # included in the NDK. 44 | ${log-lib} ) -------------------------------------------------------------------------------- /app/src/main/cpp/native-lib.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | extern "C" JNIEXPORT jstring JNICALL 5 | Java_com_example_myapplication_MainActivity_stringFromJNI( 6 | JNIEnv* env, 7 | jobject /* this */) { 8 | std::string hello = "Hello from C++"; 9 | return env->NewStringUTF(hello.c_str()); 10 | } 11 | 12 | 13 | 14 | JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved) { 15 | 16 | 17 | JNIEnv *env = NULL; 18 | jint result = -1; 19 | if ((vm)->GetEnv((void **) &env, JNI_VERSION_1_4) != JNI_OK) { 20 | return -1; 21 | } 22 | 23 | 24 | 25 | 26 | result = JNI_VERSION_1_4; 27 | 28 | 29 | return result; 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dex/CallSiteId.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dex; 18 | 19 | import org.jf.android.dex.Dex.Section; 20 | import org.jf.android.dex.util.Unsigned; 21 | 22 | /** 23 | * A call_site_id_item: https://source.android.com/devices/tech/dalvik/dex-format#call-site-id-item 24 | */ 25 | public class CallSiteId implements Comparable { 26 | 27 | private final Dex dex; 28 | private final int offset; 29 | 30 | public CallSiteId(Dex dex, int offset) { 31 | this.dex = dex; 32 | this.offset = offset; 33 | } 34 | 35 | @Override 36 | public int compareTo(CallSiteId o) { 37 | return Unsigned.compare(offset, o.offset); 38 | } 39 | 40 | public int getCallSiteOffset() { 41 | return offset; 42 | } 43 | 44 | public void writeTo(Section out) { 45 | out.writeInt(offset); 46 | } 47 | 48 | @Override 49 | public String toString() { 50 | if (dex == null) { 51 | return String.valueOf(offset); 52 | } 53 | return dex.protoIds().get(offset).toString(); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dex/DexException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dex; 18 | 19 | import org.jf.android.dex.util.ExceptionWithContext; 20 | 21 | /** 22 | * Thrown when there's a format problem reading, writing, or generally 23 | * processing a dex file. 24 | */ 25 | public class DexException extends ExceptionWithContext { 26 | public DexException(String message) { 27 | super(message); 28 | } 29 | 30 | public DexException(Throwable cause) { 31 | super(cause); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dex/DexIndexOverflowException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dex; 18 | 19 | /** 20 | * Thrown when there's an index overflow writing a dex file. 21 | */ 22 | public final class DexIndexOverflowException extends DexException { 23 | public DexIndexOverflowException(String message) { 24 | super(message); 25 | } 26 | 27 | public DexIndexOverflowException(Throwable cause) { 28 | super(cause); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dex/EncodedValue.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dex; 18 | 19 | import org.jf.android.dex.util.ByteArrayByteInput; 20 | import org.jf.android.dex.util.ByteInput; 21 | 22 | /** 23 | * An encoded value or array. 24 | */ 25 | public final class EncodedValue implements Comparable { 26 | private final byte[] data; 27 | 28 | public EncodedValue(byte[] data) { 29 | this.data = data; 30 | } 31 | 32 | public ByteInput asByteInput() { 33 | return new ByteArrayByteInput(data); 34 | } 35 | 36 | public byte[] getBytes() { 37 | return data; 38 | } 39 | 40 | public void writeTo(Dex.Section out) { 41 | out.write(data); 42 | } 43 | 44 | @Override 45 | public int compareTo(EncodedValue other) { 46 | int size = Math.min(data.length, other.data.length); 47 | for (int i = 0; i < size; i++) { 48 | if (data[i] != other.data[i]) { 49 | return (data[i] & 0xff) - (other.data[i] & 0xff); 50 | } 51 | } 52 | return data.length - other.data.length; 53 | } 54 | 55 | @Override 56 | public String toString() { 57 | return Integer.toHexString(data[0] & 0xff) + "...(" + data.length + ")"; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dex/util/ByteArrayByteInput.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dex.util; 18 | 19 | public final class ByteArrayByteInput implements ByteInput { 20 | 21 | private final byte[] bytes; 22 | private int position; 23 | 24 | public ByteArrayByteInput(byte... bytes) { 25 | this.bytes = bytes; 26 | } 27 | 28 | @Override 29 | public byte readByte() { 30 | return bytes[position++]; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dex/util/ByteInput.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dex.util; 18 | 19 | /** 20 | * A byte source. 21 | */ 22 | public interface ByteInput { 23 | 24 | /** 25 | * Returns a byte. 26 | * 27 | * @throws IndexOutOfBoundsException if all bytes have been read. 28 | */ 29 | byte readByte(); 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dex/util/ByteOutput.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dex.util; 18 | 19 | /** 20 | * A byte sink. 21 | */ 22 | public interface ByteOutput { 23 | 24 | /** 25 | * Writes a byte. 26 | * 27 | * @throws IndexOutOfBoundsException if all bytes have been written. 28 | */ 29 | void writeByte(int i); 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dex/util/Unsigned.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dex.util; 18 | 19 | /** 20 | * Unsigned arithmetic over Java's signed types. 21 | */ 22 | public final class Unsigned { 23 | private Unsigned() {} 24 | 25 | public static int compare(short ushortA, short ushortB) { 26 | if (ushortA == ushortB) { 27 | return 0; 28 | } 29 | int a = ushortA & 0xFFFF; 30 | int b = ushortB & 0xFFFF; 31 | return a < b ? -1 : 1; 32 | } 33 | 34 | public static int compare(int uintA, int uintB) { 35 | if (uintA == uintB) { 36 | return 0; 37 | } 38 | long a = uintA & 0xFFFFFFFFL; 39 | long b = uintB & 0xFFFFFFFFL; 40 | return a < b ? -1 : 1; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/Version.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx; 18 | 19 | /** 20 | * Version number for dx. 21 | */ 22 | public class Version { 23 | /** {@code non-null;} version string */ 24 | public static final String VERSION = "1.16"; 25 | } 26 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/cf/attrib/AttDeprecated.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.cf.attrib; 18 | 19 | /** 20 | * Attribute class for standard {@code Deprecated} attributes. 21 | */ 22 | public final class AttDeprecated extends BaseAttribute { 23 | /** {@code non-null;} attribute name for attributes of this type */ 24 | public static final String ATTRIBUTE_NAME = "Deprecated"; 25 | 26 | /** 27 | * Constructs an instance. 28 | */ 29 | public AttDeprecated() { 30 | super(ATTRIBUTE_NAME); 31 | } 32 | 33 | /** {@inheritDoc} */ 34 | @Override 35 | public int byteLength() { 36 | return 6; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/cf/attrib/AttLocalVariableTable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.cf.attrib; 18 | 19 | import org.jf.android.dx.cf.code.LocalVariableList; 20 | 21 | /** 22 | * Attribute class for standard {@code LocalVariableTable} attributes. 23 | */ 24 | public final class AttLocalVariableTable extends BaseLocalVariables { 25 | /** {@code non-null;} attribute name for attributes of this type */ 26 | public static final String ATTRIBUTE_NAME = "LocalVariableTable"; 27 | 28 | /** 29 | * Constructs an instance. 30 | * 31 | * @param localVariables {@code non-null;} list of local variable entries 32 | */ 33 | public AttLocalVariableTable(LocalVariableList localVariables) { 34 | super(ATTRIBUTE_NAME, localVariables); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/cf/attrib/AttLocalVariableTypeTable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.cf.attrib; 18 | 19 | import org.jf.android.dx.cf.code.LocalVariableList; 20 | 21 | /** 22 | * Attribute class for standard {@code LocalVariableTypeTable} attributes. 23 | */ 24 | public final class AttLocalVariableTypeTable extends BaseLocalVariables { 25 | /** {@code non-null;} attribute name for attributes of this type */ 26 | public static final String ATTRIBUTE_NAME = "LocalVariableTypeTable"; 27 | 28 | /** 29 | * Constructs an instance. 30 | * 31 | * @param localVariables {@code non-null;} list of local variable entries 32 | */ 33 | public AttLocalVariableTypeTable(LocalVariableList localVariables) { 34 | super(ATTRIBUTE_NAME, localVariables); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/cf/attrib/AttRuntimeInvisibleAnnotations.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.cf.attrib; 18 | 19 | import org.jf.android.dx.rop.annotation.Annotations; 20 | 21 | /** 22 | * Attribute class for standard {@code RuntimeInvisibleAnnotations} 23 | * attributes. 24 | */ 25 | public final class AttRuntimeInvisibleAnnotations extends BaseAnnotations { 26 | /** {@code non-null;} attribute name for attributes of this type */ 27 | public static final String ATTRIBUTE_NAME = "RuntimeInvisibleAnnotations"; 28 | 29 | /** 30 | * Constructs an instance. 31 | * 32 | * @param annotations {@code non-null;} the list of annotations 33 | * @param byteLength {@code >= 0;} attribute data length in the original 34 | * classfile (not including the attribute header) 35 | */ 36 | public AttRuntimeInvisibleAnnotations(Annotations annotations, 37 | int byteLength) { 38 | super(ATTRIBUTE_NAME, annotations, byteLength); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/cf/attrib/AttRuntimeInvisibleParameterAnnotations.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.cf.attrib; 18 | 19 | import org.jf.android.dx.rop.annotation.AnnotationsList; 20 | 21 | /** 22 | * Attribute class for standard 23 | * {@code RuntimeInvisibleParameterAnnotations} attributes. 24 | */ 25 | public final class AttRuntimeInvisibleParameterAnnotations 26 | extends BaseParameterAnnotations { 27 | /** {@code non-null;} attribute name for attributes of this type */ 28 | public static final String ATTRIBUTE_NAME = 29 | "RuntimeInvisibleParameterAnnotations"; 30 | 31 | /** 32 | * Constructs an instance. 33 | * 34 | * @param parameterAnnotations {@code non-null;} the parameter annotations 35 | * @param byteLength {@code >= 0;} attribute data length in the original 36 | * classfile (not including the attribute header) 37 | */ 38 | public AttRuntimeInvisibleParameterAnnotations( 39 | AnnotationsList parameterAnnotations, int byteLength) { 40 | super(ATTRIBUTE_NAME, parameterAnnotations, byteLength); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/cf/attrib/AttRuntimeVisibleAnnotations.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.cf.attrib; 18 | 19 | import org.jf.android.dx.rop.annotation.Annotations; 20 | 21 | /** 22 | * Attribute class for standard {@code RuntimeVisibleAnnotations} 23 | * attributes. 24 | */ 25 | public final class AttRuntimeVisibleAnnotations extends BaseAnnotations { 26 | /** {@code non-null;} attribute name for attributes of this type */ 27 | public static final String ATTRIBUTE_NAME = "RuntimeVisibleAnnotations"; 28 | 29 | /** 30 | * Constructs an instance. 31 | * 32 | * @param annotations {@code non-null;} the list of annotations 33 | * @param byteLength {@code >= 0;} attribute data length in the original 34 | * classfile (not including the attribute header) 35 | */ 36 | public AttRuntimeVisibleAnnotations(Annotations annotations, 37 | int byteLength) { 38 | super(ATTRIBUTE_NAME, annotations, byteLength); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/cf/attrib/AttRuntimeVisibleParameterAnnotations.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.cf.attrib; 18 | 19 | import org.jf.android.dx.rop.annotation.AnnotationsList; 20 | 21 | /** 22 | * Attribute class for standard {@code RuntimeVisibleParameterAnnotations} 23 | * attributes. 24 | */ 25 | public final class AttRuntimeVisibleParameterAnnotations 26 | extends BaseParameterAnnotations { 27 | /** {@code non-null;} attribute name for attributes of this type */ 28 | public static final String ATTRIBUTE_NAME = 29 | "RuntimeVisibleParameterAnnotations"; 30 | 31 | /** 32 | * Constructs an instance. 33 | * 34 | * @param annotations {@code non-null;} the parameter annotations 35 | * @param byteLength {@code >= 0;} attribute data length in the original 36 | * classfile (not including the attribute header) 37 | */ 38 | public AttRuntimeVisibleParameterAnnotations( 39 | AnnotationsList annotations, int byteLength) { 40 | super(ATTRIBUTE_NAME, annotations, byteLength); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/cf/attrib/AttSignature.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.cf.attrib; 18 | 19 | import org.jf.android.dx.rop.cst.CstString; 20 | 21 | /** 22 | * Attribute class for standards-track {@code Signature} attributes. 23 | */ 24 | public final class AttSignature extends BaseAttribute { 25 | /** {@code non-null;} attribute name for attributes of this type */ 26 | public static final String ATTRIBUTE_NAME = "Signature"; 27 | 28 | /** {@code non-null;} the signature string */ 29 | private final CstString signature; 30 | 31 | /** 32 | * Constructs an instance. 33 | * 34 | * @param signature {@code non-null;} the signature string 35 | */ 36 | public AttSignature(CstString signature) { 37 | super(ATTRIBUTE_NAME); 38 | 39 | if (signature == null) { 40 | throw new NullPointerException("signature == null"); 41 | } 42 | 43 | this.signature = signature; 44 | } 45 | 46 | /** {@inheritDoc} */ 47 | @Override 48 | public int byteLength() { 49 | return 8; 50 | } 51 | 52 | /** 53 | * Gets the signature string. 54 | * 55 | * @return {@code non-null;} the signature string 56 | */ 57 | public CstString getSignature() { 58 | return signature; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/cf/attrib/AttSynthetic.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.cf.attrib; 18 | 19 | /** 20 | * Attribute class for standard {@code Synthetic} attributes. 21 | */ 22 | public final class AttSynthetic extends BaseAttribute { 23 | /** {@code non-null;} attribute name for attributes of this type */ 24 | public static final String ATTRIBUTE_NAME = "Synthetic"; 25 | 26 | /** 27 | * Constructs an instance. 28 | */ 29 | public AttSynthetic() { 30 | super(ATTRIBUTE_NAME); 31 | } 32 | 33 | /** {@inheritDoc} */ 34 | @Override 35 | public int byteLength() { 36 | return 6; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/cf/attrib/BaseAttribute.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.cf.attrib; 18 | 19 | import org.jf.android.dx.cf.iface.Attribute; 20 | 21 | /** 22 | * Base implementation of {@link Attribute}, which directly stores 23 | * the attribute name but leaves the rest up to subclasses. 24 | */ 25 | public abstract class BaseAttribute implements Attribute { 26 | /** {@code non-null;} attribute name */ 27 | private final String name; 28 | 29 | /** 30 | * Constructs an instance. 31 | * 32 | * @param name {@code non-null;} attribute name 33 | */ 34 | public BaseAttribute(String name) { 35 | if (name == null) { 36 | throw new NullPointerException("name == null"); 37 | } 38 | 39 | this.name = name; 40 | } 41 | 42 | /** {@inheritDoc} */ 43 | @Override 44 | public String getName() { 45 | return name; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/cf/attrib/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Implementation of containers and utilities for all the standard Java 3 | attribute types.

4 | 5 |

PACKAGES USED: 6 |

    7 |
  • external.com.android.dx.cf.iface
  • 8 |
  • external.com.android.dx.rop.pool
  • 9 |
  • external.com.android.dx.util
  • 10 |
11 | 12 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/cf/code/SimException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.cf.code; 18 | 19 | import org.jf.android.dex.util.ExceptionWithContext; 20 | 21 | /** 22 | * Exception from simulation. 23 | */ 24 | public class SimException 25 | extends ExceptionWithContext { 26 | public SimException(String message) { 27 | super(message); 28 | } 29 | 30 | public SimException(Throwable cause) { 31 | super(cause); 32 | } 33 | 34 | public SimException(String message, Throwable cause) { 35 | super(message, cause); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/cf/code/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Implementation of classes having to do with Java simulation, such as 3 | is needed for verification or stack-to-register conversion.

4 | 5 |

PACKAGES USED: 6 |

    7 |
  • external.com.android.dx.rop.pool
  • 8 |
  • external.com.android.dx.util
  • 9 |
10 | 11 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/cf/cst/MethodHandleKind.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.cf.cst; 18 | 19 | /** 20 | * Method Handle kinds for {@code CONSTANT_MethodHandle_info} constants. 21 | */ 22 | public interface MethodHandleKind { 23 | /** A method handle that gets an instance field. */ 24 | int REF_getField = 1; 25 | 26 | /** A method handle that gets a static field. */ 27 | int REF_getStatic = 2; 28 | 29 | /** A method handle that sets an instance field. */ 30 | int REF_putField = 3; 31 | 32 | /** A method handle that sets a static field. */ 33 | int REF_putStatic = 4; 34 | 35 | /** A method handle for {@code invokevirtual}. */ 36 | int REF_invokeVirtual = 5; 37 | 38 | /** A method handle for {@code invokestatic}. */ 39 | int REF_invokeStatic = 6; 40 | 41 | /** A method handle for {@code invokespecial}. */ 42 | int REF_invokeSpecial = 7; 43 | 44 | /** A method handle for invoking a constructor. */ 45 | int REF_newInvokeSpecial = 8; 46 | 47 | /** A method handle for {@code invokeinterface}. */ 48 | int REF_invokeInterface = 9; 49 | } 50 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/cf/direct/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Implementation of cf.iface.* based on a direct representation 3 | of class files as byte[]s.

4 | 5 |

PACKAGES USED: 6 |

    7 |
  • external.com.android.dx.cf.attrib
  • 8 |
  • external.com.android.dx.cf.iface
  • 9 |
  • external.com.android.dx.rop.pool
  • 10 |
  • external.com.android.dx.util
  • 11 |
12 | 13 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/cf/iface/Attribute.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.cf.iface; 18 | 19 | /** 20 | * Interface representing attributes of class files (directly or indirectly). 21 | */ 22 | public interface Attribute { 23 | /** 24 | * Get the name of the attribute. 25 | * 26 | * @return {@code non-null;} the name 27 | */ 28 | public String getName(); 29 | 30 | /** 31 | * Get the total length of the attribute in bytes, including the 32 | * header. Since the header is always six bytes, the result of 33 | * this method is always at least {@code 6}. 34 | * 35 | * @return {@code >= 6;} the total length, in bytes 36 | */ 37 | public int byteLength(); 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/cf/iface/Field.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.cf.iface; 18 | 19 | import org.jf.android.dx.rop.cst.TypedConstant; 20 | 21 | /** 22 | * Interface representing fields of class files. 23 | */ 24 | public interface Field 25 | extends Member { 26 | /** 27 | * Get the constant value for this field, if any. This only returns 28 | * non-{@code null} for a {@code static final} field which 29 | * includes a {@code ConstantValue} attribute. 30 | * 31 | * @return {@code null-ok;} the constant value, or {@code null} if this 32 | * field isn't a constant 33 | */ 34 | public TypedConstant getConstantValue(); 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/cf/iface/FieldList.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.cf.iface; 18 | 19 | /** 20 | * Interface for lists of fields. 21 | */ 22 | public interface FieldList 23 | { 24 | /** 25 | * Get whether this instance is mutable. Note that the 26 | * {@code FieldList} interface itself doesn't provide any means 27 | * of mutation, but that doesn't mean that there isn't a non-interface 28 | * way of mutating an instance. 29 | * 30 | * @return {@code true} iff this instance is somehow mutable 31 | */ 32 | public boolean isMutable(); 33 | 34 | /** 35 | * Get the number of fields in the list. 36 | * 37 | * @return the size 38 | */ 39 | public int size(); 40 | 41 | /** 42 | * Get the {@code n}th field. 43 | * 44 | * @param n {@code n >= 0, n < size();} which field 45 | * @return {@code non-null;} the field in question 46 | */ 47 | public Field get(int n); 48 | } 49 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/cf/iface/HasAttribute.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.cf.iface; 18 | 19 | /** 20 | * An element that can have {@link Attribute} 21 | */ 22 | public interface HasAttribute { 23 | 24 | /** 25 | * Get the element {@code attributes} (along with 26 | * {@code attributes_count}). 27 | * 28 | * @return {@code non-null;} the attributes list 29 | */ 30 | public AttributeList getAttributes(); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/cf/iface/Method.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.cf.iface; 18 | 19 | import org.jf.android.dx.rop.type.Prototype; 20 | 21 | /** 22 | * Interface representing methods of class files. 23 | */ 24 | public interface Method 25 | extends Member 26 | { 27 | /** 28 | * Get the effective method descriptor, which includes, if 29 | * necessary, a first {@code this} parameter. 30 | * 31 | * @return {@code non-null;} the effective method descriptor 32 | */ 33 | public Prototype getEffectiveDescriptor(); 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/cf/iface/MethodList.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.cf.iface; 18 | 19 | /** 20 | * Interface for lists of methods. 21 | */ 22 | public interface MethodList { 23 | /** 24 | * Get whether this instance is mutable. Note that the 25 | * {@code MethodList} interface itself doesn't provide any means 26 | * of mutation, but that doesn't mean that there isn't a non-interface 27 | * way of mutating an instance. 28 | * 29 | * @return {@code true} iff this instance is somehow mutable 30 | */ 31 | public boolean isMutable(); 32 | 33 | /** 34 | * Get the number of methods in the list. 35 | * 36 | * @return the size 37 | */ 38 | public int size(); 39 | 40 | /** 41 | * Get the {@code n}th method. 42 | * 43 | * @param n {@code n >= 0, n < size();} which method 44 | * @return {@code non-null;} the method in question 45 | */ 46 | public Method get(int n); 47 | } 48 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/cf/iface/ParseException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.cf.iface; 18 | 19 | import org.jf.android.dex.util.ExceptionWithContext; 20 | 21 | /** 22 | * Exception from parsing. 23 | */ 24 | public class ParseException 25 | extends ExceptionWithContext { 26 | public ParseException(String message) { 27 | super(message); 28 | } 29 | 30 | public ParseException(Throwable cause) { 31 | super(cause); 32 | } 33 | 34 | public ParseException(String message, Throwable cause) { 35 | super(message, cause); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/cf/iface/StdFieldList.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.cf.iface; 18 | 19 | import org.jf.android.dx.util.FixedSizeList; 20 | 21 | /** 22 | * Standard implementation of {@link FieldList}, which directly stores 23 | * an array of {@link Field} objects and can be made immutable. 24 | */ 25 | public final class StdFieldList extends FixedSizeList implements FieldList { 26 | /** 27 | * Constructs an instance. All indices initially contain {@code null}. 28 | * 29 | * @param size the size of the list 30 | */ 31 | public StdFieldList(int size) { 32 | super(size); 33 | } 34 | 35 | /** {@inheritDoc} */ 36 | @Override 37 | public Field get(int n) { 38 | return (Field) get0(n); 39 | } 40 | 41 | /** 42 | * Sets the field at the given index. 43 | * 44 | * @param n {@code >= 0, < size();} which field 45 | * @param field {@code null-ok;} the field object 46 | */ 47 | public void set(int n, Field field) { 48 | set0(n, field); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/cf/iface/StdMethodList.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.cf.iface; 18 | 19 | import org.jf.android.dx.util.FixedSizeList; 20 | 21 | /** 22 | * Standard implementation of {@link MethodList}, which directly stores 23 | * an array of {@link Method} objects and can be made immutable. 24 | */ 25 | public final class StdMethodList extends FixedSizeList implements MethodList { 26 | /** 27 | * Constructs an instance. All indices initially contain {@code null}. 28 | * 29 | * @param size the size of the list 30 | */ 31 | public StdMethodList(int size) { 32 | super(size); 33 | } 34 | 35 | /** {@inheritDoc} */ 36 | @Override 37 | public Method get(int n) { 38 | return (Method) get0(n); 39 | } 40 | 41 | /** 42 | * Sets the method at the given index. 43 | * 44 | * @param n {@code >= 0, < size();} which method 45 | * @param method {@code null-ok;} the method object 46 | */ 47 | public void set(int n, Method method) { 48 | set0(n, method); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/cf/iface/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Interfaces and base classes for dealing with class files. This package 3 | doesn't have any parsing but does have basic container implementations.

4 | 5 |

PACKAGES USED: 6 |

    7 |
  • external.com.android.dx.rop.pool
  • 8 |
  • external.com.android.dx.util
  • 9 |
10 | 11 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/command/UsageException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.command; 18 | 19 | /** 20 | * Simple exception class used to communicate that the command-line tool 21 | * should print the usage message. 22 | */ 23 | public class UsageException extends RuntimeException { 24 | // This space intentionally left blank. 25 | } 26 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/command/dexer/DxContext.java: -------------------------------------------------------------------------------- 1 | package org.jf.android.dx.command.dexer; 2 | 3 | import org.jf.android.dx.dex.cf.CodeStatistics; 4 | import org.jf.android.dx.dex.cf.OptimizerOptions; 5 | 6 | import java.io.IOException; 7 | import java.io.OutputStream; 8 | import java.io.PrintStream; 9 | 10 | /** 11 | * State used by a single invocation of {@link Main}. 12 | */ 13 | public class DxContext { 14 | public final CodeStatistics codeStatistics = new CodeStatistics(); 15 | public final OptimizerOptions optimizerOptions = new OptimizerOptions(); 16 | public final PrintStream out; 17 | public final PrintStream err; 18 | 19 | @SuppressWarnings("IOResourceOpenedButNotSafelyClosed") 20 | final PrintStream noop = new PrintStream(new OutputStream() { 21 | @Override 22 | public void write(int b) throws IOException { 23 | // noop; 24 | } 25 | }); 26 | 27 | public DxContext(OutputStream out, OutputStream err) { 28 | this.out = new PrintStream(out); 29 | this.err = new PrintStream(err); 30 | } 31 | 32 | public DxContext() { 33 | this(System.out, System.err); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/command/dump/Args.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.command.dump; 18 | 19 | /** 20 | * contains command line parsedArgs values 21 | */ 22 | class Args { 23 | /** whether to run in debug mode */ 24 | boolean debug = false; 25 | 26 | /** whether to dump raw bytes where salient */ 27 | boolean rawBytes = false; 28 | 29 | /** whether to dump information about basic blocks */ 30 | boolean basicBlocks = false; 31 | 32 | /** whether to dump regiserized blocks */ 33 | boolean ropBlocks = false; 34 | 35 | /** whether to dump SSA-form blocks */ 36 | boolean ssaBlocks = false; 37 | 38 | /** Step in SSA processing to stop at, or null for all */ 39 | String ssaStep = null; 40 | 41 | /** whether to run SSA optimizations */ 42 | boolean optimize = false; 43 | 44 | /** whether to be strict about parsing classfiles*/ 45 | boolean strictParse = false; 46 | 47 | /** max width for columnar output */ 48 | int width = 0; 49 | 50 | /** whether to dump flow-graph in "dot" format */ 51 | boolean dotDump = false; 52 | 53 | /** if non-null, an explicit method to dump */ 54 | String method; 55 | 56 | } 57 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/command/findusages/Main.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.command.findusages; 18 | 19 | import org.jf.android.dex.Dex; 20 | 21 | import java.io.File; 22 | import java.io.IOException; 23 | import java.io.PrintWriter; 24 | 25 | public final class Main { 26 | public static void main(String[] args) throws IOException { 27 | String dexFile = args[0]; 28 | String declaredBy = args[1]; 29 | String memberName = args[2]; 30 | 31 | Dex dex = new Dex(new File(dexFile)); 32 | PrintWriter out = new PrintWriter(System.out); 33 | new FindUsages(dex, declaredBy, memberName, out).findUsages(); 34 | out.flush(); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/command/grep/Main.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.command.grep; 18 | 19 | import org.jf.android.dex.Dex; 20 | 21 | import java.io.File; 22 | import java.io.IOException; 23 | import java.io.PrintWriter; 24 | import java.util.regex.Pattern; 25 | 26 | public final class Main { 27 | public static void main(String[] args) throws IOException { 28 | String dexFile = args[0]; 29 | String pattern = args[1]; 30 | 31 | Dex dex = new Dex(new File(dexFile)); 32 | int count = new Grep(dex, Pattern.compile(pattern), new PrintWriter(System.out)).grep(); 33 | System.exit((count > 0) ? 0 : 1); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/dex/cf/CfOptions.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.dex.cf; 18 | 19 | import org.jf.android.dx.dex.code.PositionList; 20 | 21 | import java.io.PrintStream; 22 | 23 | /** 24 | * A class to contain options passed into dex.cf 25 | */ 26 | public class CfOptions { 27 | /** how much source position info to preserve */ 28 | public int positionInfo = PositionList.LINES; 29 | 30 | /** whether to keep local variable information */ 31 | public boolean localInfo = false; 32 | 33 | /** whether strict file-name-vs-class-name checking should be done */ 34 | public boolean strictNameCheck = true; 35 | 36 | /** whether to do SSA/register optimization */ 37 | public boolean optimize = false; 38 | 39 | /** filename containing list of methods to optimize */ 40 | public String optimizeListFile = null; 41 | 42 | /** filename containing list of methods not to optimize */ 43 | public String dontOptimizeListFile = null; 44 | 45 | /** whether to print statistics to stdout at end of compile cycle */ 46 | public boolean statistics; 47 | 48 | /** where to issue warnings to */ 49 | public PrintStream warn = System.err; 50 | } 51 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/dex/cf/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Classes for translating Java classfiles into Dalvik classes.

3 | 4 |

PACKAGES USED: 5 |

    6 |
  • external.com.android.dx.cf.code
  • 7 |
  • external.com.android.dx.cf.direct
  • 8 |
  • external.com.android.dx.cf.iface
  • 9 |
  • external.com.android.dx.dex.code
  • 10 |
  • external.com.android.dx.dex.file
  • 11 |
  • external.com.android.dx.rop.code
  • 12 |
  • external.com.android.dx.rop.cst
  • 13 |
  • external.com.android.dx.util
  • 14 |
15 | 16 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/dex/code/CatchBuilder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.dex.code; 18 | 19 | import org.jf.android.dx.rop.type.Type; 20 | 21 | import java.util.HashSet; 22 | 23 | /** 24 | * Interface for the construction of {@link CatchTable} instances. 25 | */ 26 | public interface CatchBuilder { 27 | /** 28 | * Builds and returns the catch table for this instance. 29 | * 30 | * @return {@code non-null;} the constructed table 31 | */ 32 | public CatchTable build(); 33 | 34 | /** 35 | * Gets whether this instance has any catches at all (either typed 36 | * or catch-all). 37 | * 38 | * @return whether this instance has any catches at all 39 | */ 40 | public boolean hasAnyCatches(); 41 | 42 | /** 43 | * Gets the set of catch types associated with this instance. 44 | * 45 | * @return {@code non-null;} the set of catch types 46 | */ 47 | public HashSet getCatchTypes(); 48 | } 49 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/dex/code/VariableSizeInsn.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.dex.code; 18 | 19 | import org.jf.android.dx.rop.code.RegisterSpecList; 20 | import org.jf.android.dx.rop.code.SourcePosition; 21 | 22 | /** 23 | * Pseudo-instruction base class for variable-sized instructions. 24 | */ 25 | public abstract class VariableSizeInsn extends DalvInsn { 26 | /** 27 | * Constructs an instance. The output address of this instance is initially 28 | * unknown ({@code -1}). 29 | * 30 | * @param position {@code non-null;} source position 31 | * @param registers {@code non-null;} source registers 32 | */ 33 | public VariableSizeInsn(SourcePosition position, 34 | RegisterSpecList registers) { 35 | super(Dops.SPECIAL_FORMAT, position, registers); 36 | } 37 | 38 | /** {@inheritDoc} */ 39 | @Override 40 | public final DalvInsn withOpcode(Dop opcode) { 41 | throw new RuntimeException("unsupported"); 42 | } 43 | 44 | /** {@inheritDoc} */ 45 | @Override 46 | public final DalvInsn withRegisterOffset(int delta) { 47 | return withRegisters(getRegisters().withOffset(delta)); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/dex/file/IdItem.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.dex.file; 18 | 19 | import org.jf.android.dx.rop.cst.CstType; 20 | 21 | /** 22 | * Representation of a reference to an item inside a Dalvik file. 23 | */ 24 | public abstract class IdItem extends IndexedItem { 25 | /** 26 | * {@code non-null;} the type constant for the defining class of 27 | * the reference 28 | */ 29 | private final CstType type; 30 | 31 | /** 32 | * Constructs an instance. 33 | * 34 | * @param type {@code non-null;} the type constant for the defining 35 | * class of the reference 36 | */ 37 | public IdItem(CstType type) { 38 | if (type == null) { 39 | throw new NullPointerException("type == null"); 40 | } 41 | 42 | this.type = type; 43 | } 44 | 45 | /** {@inheritDoc} */ 46 | @Override 47 | public void addContents(DexFile file) { 48 | TypeIdsSection typeIds = file.getTypeIds(); 49 | typeIds.intern(type); 50 | } 51 | 52 | /** 53 | * Gets the type constant for the defining class of the 54 | * reference. 55 | * 56 | * @return {@code non-null;} the type constant 57 | */ 58 | public final CstType getDefiningClass() { 59 | return type; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/io/instructions/AddressMap.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.io.instructions; 18 | 19 | import java.util.HashMap; 20 | 21 | /** 22 | * Map from addresses to addresses, where addresses are all 23 | * {@code int}s. 24 | */ 25 | public final class AddressMap { 26 | /** underlying map. TODO: This might be too inefficient. */ 27 | private final HashMap map; 28 | 29 | /** 30 | * Constructs an instance. 31 | */ 32 | public AddressMap() { 33 | map = new HashMap(); 34 | } 35 | 36 | /** 37 | * Gets the value address corresponding to the given key address. Returns 38 | * {@code -1} if there is no mapping. 39 | */ 40 | public int get(int keyAddress) { 41 | Integer value = map.get(keyAddress); 42 | return (value == null) ? -1 : value; 43 | } 44 | 45 | /** 46 | * Sets the value address associated with the given key address. 47 | */ 48 | public void put(int keyAddress, int valueAddress) { 49 | map.put(keyAddress, valueAddress); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/io/instructions/CodeCursor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.io.instructions; 18 | 19 | /** 20 | * Cursor over code units, for reading or writing out Dalvik bytecode. 21 | */ 22 | public interface CodeCursor { 23 | /** 24 | * Gets the cursor. The cursor is the offset in code units from 25 | * the start of the input of the next code unit to be read or 26 | * written, where the input generally consists of the code for a 27 | * single method. 28 | */ 29 | public int cursor(); 30 | 31 | /** 32 | * Gets the base address associated with the current cursor. This 33 | * differs from the cursor value when explicitly set (by {@link 34 | * #setBaseAddress}). This is used, in particular, to convey base 35 | * addresses to switch data payload instructions, whose relative 36 | * addresses are relative to the address of a dependant switch 37 | * instruction. 38 | */ 39 | public int baseAddressForCursor(); 40 | 41 | /** 42 | * Sets the base address for the given target address to be as indicated. 43 | * 44 | * @see #baseAddressForCursor 45 | */ 46 | public void setBaseAddress(int targetAddress, int baseAddress); 47 | } 48 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/io/instructions/CodeInput.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.io.instructions; 18 | 19 | import java.io.EOFException; 20 | 21 | /** 22 | * Input stream of code units, for reading in Dalvik bytecode. 23 | */ 24 | public interface CodeInput extends CodeCursor { 25 | /** 26 | * Returns whether there are any more code units to read. This 27 | * is analogous to {@code hasNext()} on an interator. 28 | */ 29 | public boolean hasMore(); 30 | 31 | /** 32 | * Reads a code unit. 33 | */ 34 | public int read() throws EOFException; 35 | 36 | /** 37 | * Reads two code units, treating them as a little-endian {@code int}. 38 | */ 39 | public int readInt() throws EOFException; 40 | 41 | /** 42 | * Reads four code units, treating them as a little-endian {@code long}. 43 | */ 44 | public long readLong() throws EOFException; 45 | } 46 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/io/instructions/ZeroRegisterDecodedInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.io.instructions; 18 | 19 | import org.jf.android.dx.io.IndexType; 20 | 21 | /** 22 | * A decoded Dalvik instruction which has no register arguments. 23 | */ 24 | public final class ZeroRegisterDecodedInstruction extends DecodedInstruction { 25 | /** 26 | * Constructs an instance. 27 | */ 28 | public ZeroRegisterDecodedInstruction(InstructionCodec format, int opcode, 29 | int index, IndexType indexType, int target, long literal) { 30 | super(format, opcode, index, indexType, target, literal); 31 | } 32 | 33 | /** {@inheritDoc} */ 34 | @Override 35 | public int getRegisterCount() { 36 | return 0; 37 | } 38 | 39 | /** {@inheritDoc} */ 40 | @Override 41 | public DecodedInstruction withIndex(int newIndex) { 42 | return new ZeroRegisterDecodedInstruction( 43 | getFormat(), getOpcode(), newIndex, getIndexType(), 44 | getTarget(), getLiteral()); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/merge/CollisionPolicy.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.merge; 18 | 19 | /** 20 | * What to do when two dex files define the same class. 21 | */ 22 | public enum CollisionPolicy { 23 | 24 | /** 25 | * Keep the class def from the first dex file and discard the def from the 26 | * second dex file. This policy is appropriate for incremental builds. 27 | */ 28 | KEEP_FIRST, 29 | 30 | /** 31 | * Forbid collisions. This policy is appropriate for merging libraries. 32 | */ 33 | FAIL 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/rop/annotation/AnnotationVisibility.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.rop.annotation; 18 | 19 | import org.jf.android.dx.util.ToHuman; 20 | 21 | /** 22 | * Visibility scope of an annotation. 23 | */ 24 | public enum AnnotationVisibility implements ToHuman { 25 | RUNTIME("runtime"), 26 | BUILD("build"), 27 | SYSTEM("system"), 28 | EMBEDDED("embedded"); 29 | 30 | /** {@code non-null;} the human-oriented string representation */ 31 | private final String human; 32 | 33 | /** 34 | * Constructs an instance. 35 | * 36 | * @param human {@code non-null;} the human-oriented string representation 37 | */ 38 | private AnnotationVisibility(String human) { 39 | this.human = human; 40 | } 41 | 42 | /** {@inheritDoc} */ 43 | @Override 44 | public String toHuman() { 45 | return human; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/rop/code/ConservativeTranslationAdvice.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.rop.code; 18 | 19 | /** 20 | * Implementation of {@link TranslationAdvice} which conservatively answers 21 | * {@code false} to all methods. 22 | */ 23 | public final class ConservativeTranslationAdvice 24 | implements TranslationAdvice { 25 | /** {@code non-null;} standard instance of this class */ 26 | public static final ConservativeTranslationAdvice THE_ONE = 27 | new ConservativeTranslationAdvice(); 28 | 29 | /** 30 | * This class is not publicly instantiable. Use {@link #THE_ONE}. 31 | */ 32 | private ConservativeTranslationAdvice() { 33 | // This space intentionally left blank. 34 | } 35 | 36 | /** {@inheritDoc} */ 37 | @Override 38 | public boolean hasConstantOperation(Rop opcode, 39 | RegisterSpec sourceA, RegisterSpec sourceB) { 40 | return false; 41 | } 42 | 43 | /** {@inheritDoc} */ 44 | @Override 45 | public boolean requiresSourcesInOrder(Rop opcode, 46 | RegisterSpecList sources) { 47 | return false; 48 | } 49 | 50 | /** {@inheritDoc} */ 51 | @Override 52 | public int getMaxOptimalRegisterCount() { 53 | return Integer.MAX_VALUE; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/rop/code/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Classes relating to a register-based opcode system.

3 | 4 |

PACKAGES USED: 5 |

    6 |
  • external.com.android.dx.util
  • 7 |
8 | 9 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/rop/cst/CstMethodRef.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.rop.cst; 18 | 19 | /** 20 | * Constants of type {@code CONSTANT_Methodref_info}. 21 | */ 22 | public final class CstMethodRef 23 | extends CstBaseMethodRef { 24 | /** 25 | * Constructs an instance. 26 | * 27 | * @param definingClass {@code non-null;} the type of the defining class 28 | * @param nat {@code non-null;} the name-and-type 29 | */ 30 | public CstMethodRef(CstType definingClass, CstNat nat) { 31 | super(definingClass, nat); 32 | } 33 | 34 | /** {@inheritDoc} */ 35 | @Override 36 | public String typeName() { 37 | return "method"; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/rop/cst/TypedConstant.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.rop.cst; 18 | 19 | import org.jf.android.dx.rop.type.TypeBearer; 20 | 21 | /** 22 | * Base class for constants which implement {@link TypeBearer}. 23 | */ 24 | public abstract class TypedConstant 25 | extends Constant implements TypeBearer { 26 | /** 27 | * {@inheritDoc} 28 | * 29 | * This implementation always returns {@code this}. 30 | */ 31 | @Override 32 | public final TypeBearer getFrameType() { 33 | return this; 34 | } 35 | 36 | /** {@inheritDoc} */ 37 | @Override 38 | public final int getBasicType() { 39 | return getType().getBasicType(); 40 | } 41 | 42 | /** {@inheritDoc} */ 43 | @Override 44 | public final int getBasicFrameType() { 45 | return getType().getBasicFrameType(); 46 | } 47 | 48 | /** {@inheritDoc} */ 49 | @Override 50 | public final boolean isConstant() { 51 | return true; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/rop/cst/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Interfaces and implementation of things related to the constant pool.

3 | 4 |

PACKAGES USED: 5 |

    6 |
  • external.com.android.dx.rop.type
  • 7 |
  • external.com.android.dx.util
  • 8 |
9 | 10 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/rop/type/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Implementation of classes that represent types (classes or primitives).

3 | 4 |

PACKAGES USED: 5 |

    6 |
  • external.com.android.dx.util
  • 7 |
8 | 9 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/util/IntIterator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.util; 18 | 19 | /** 20 | * An iterator for a list of ints. 21 | */ 22 | public interface IntIterator { 23 | 24 | /** 25 | * Checks to see if the iterator has a next value. 26 | * 27 | * @return true if next() will succeed 28 | */ 29 | boolean hasNext(); 30 | 31 | /** 32 | * Returns the next value in the iterator. 33 | * 34 | * @return next value 35 | * @throws java.util.NoSuchElementException if no next element exists 36 | */ 37 | int next(); 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/util/IntSet.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.util; 18 | 19 | /** 20 | * A set of integers 21 | */ 22 | public interface IntSet { 23 | 24 | /** 25 | * Adds an int to a set 26 | * 27 | * @param value int to add 28 | */ 29 | void add(int value); 30 | 31 | /** 32 | * Removes an int from a set. 33 | * 34 | * @param value int to remove 35 | */ 36 | void remove(int value); 37 | 38 | /** 39 | * Checks to see if a value is in the set 40 | * 41 | * @param value int to check 42 | * @return true if in set 43 | */ 44 | boolean has(int value); 45 | 46 | /** 47 | * Merges {@code other} into this set, so this set becomes the 48 | * union of the two. 49 | * 50 | * @param other {@code non-null;} other set to merge with. 51 | */ 52 | void merge(IntSet other); 53 | 54 | /** 55 | * Returns the count of unique elements in this set. 56 | * 57 | * @return {@code > = 0;} count of unique elements 58 | */ 59 | int elements(); 60 | 61 | /** 62 | * Iterates the set 63 | * 64 | * @return {@code non-null;} a set iterator 65 | */ 66 | IntIterator iterator(); 67 | } 68 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/util/LabeledItem.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.util; 18 | 19 | /** 20 | * An item that has an integer label. 21 | */ 22 | public interface LabeledItem { 23 | 24 | /* 25 | * Gets the label of this block. 26 | * 27 | * @return {@code >= 0;} the label 28 | */ 29 | public int getLabel(); 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/util/MutabilityException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.util; 18 | 19 | import org.jf.android.dex.util.ExceptionWithContext; 20 | 21 | /** 22 | * Exception due to a mutability problem. 23 | */ 24 | public class MutabilityException 25 | extends ExceptionWithContext { 26 | public MutabilityException(String message) { 27 | super(message); 28 | } 29 | 30 | public MutabilityException(Throwable cause) { 31 | super(cause); 32 | } 33 | 34 | public MutabilityException(String message, Throwable cause) { 35 | super(message, cause); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/util/ToHuman.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.util; 18 | 19 | /** 20 | * Simple interface for objects that can return a "human" (as opposed to 21 | * a complete but often hard to read) string form. 22 | */ 23 | public interface ToHuman { 24 | /** 25 | * Return the "human" string form of this instance. This is 26 | * generally less "debuggy" than {@code toString()}. 27 | * 28 | * @return {@code non-null;} the human string form 29 | */ 30 | public String toHuman(); 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/util/Warning.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.util; 18 | 19 | /** 20 | * Exception which is meant to indicate a non-fatal warning. 21 | */ 22 | public class Warning extends RuntimeException { 23 | /** 24 | * Constructs an instance. 25 | * 26 | * @param message human-oriented message 27 | */ 28 | public Warning(String message) { 29 | super(message); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/util/Writers.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.dx.util; 18 | 19 | import java.io.PrintWriter; 20 | import java.io.Writer; 21 | 22 | /** 23 | * Utilities for dealing with {@code Writer}s. 24 | */ 25 | public final class Writers { 26 | /** 27 | * This class is uninstantiable. 28 | */ 29 | private Writers() { 30 | // This space intentionally left blank. 31 | } 32 | 33 | /** 34 | * Makes a {@code PrintWriter} for the given {@code Writer}, 35 | * returning the given writer if it already happens to be the right 36 | * class. 37 | * 38 | * @param writer {@code non-null;} writer to (possibly) wrap 39 | * @return {@code non-null;} an appropriate instance 40 | */ 41 | public static PrintWriter printWriterFor(Writer writer) { 42 | if (writer instanceof PrintWriter) { 43 | return (PrintWriter) writer; 44 | } 45 | 46 | return new PrintWriter(writer); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/dx/util/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Utility classes for class file access/manipulation.

3 | 4 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/android/multidex/ClassPathElement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.jf.android.multidex; 18 | 19 | import java.io.IOException; 20 | import java.io.InputStream; 21 | 22 | /** 23 | * An element of the class path in which class files can be found. 24 | */ 25 | interface ClassPathElement { 26 | 27 | char SEPARATOR_CHAR = '/'; 28 | 29 | /** 30 | * Open a "file" from this {@code ClassPathElement}. 31 | * @param path a '/' separated relative path to the wanted file. 32 | * @return an {@code InputStream} ready to read the requested file. 33 | * @throws IOException if the path can not be found or if an error occurred while opening it. 34 | */ 35 | InputStream open(String path) throws IOException; 36 | 37 | void close() throws IOException; 38 | 39 | Iterable list(); 40 | 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/baksmali/Renderers/DoubleRenderer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * [The "BSD licence"] 3 | * Copyright (c) 2010 Ben Gruver 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions 8 | * are met: 9 | * 1. Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 2. Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * 3. The name of the author may not be used to endorse or promote products 15 | * derived from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | * INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | 29 | package org.jf.baksmali.Renderers; 30 | 31 | import org.jf.util.IndentingWriter; 32 | 33 | import java.io.IOException; 34 | 35 | public class DoubleRenderer { 36 | public static void writeTo(IndentingWriter writer, double val) throws IOException { 37 | writer.write(Double.toString(val)); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/dexlib2/analysis/ClassProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.analysis; 33 | 34 | import org.jf.dexlib2.iface.ClassDef; 35 | 36 | import javax.annotation.Nullable; 37 | 38 | public interface ClassProvider { 39 | @Nullable ClassDef getClassDef(String type); 40 | } 41 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/dexlib2/builder/ItemWithLocation.java: -------------------------------------------------------------------------------- 1 | package org.jf.dexlib2.builder; 2 | 3 | import javax.annotation.Nullable; 4 | 5 | public abstract class ItemWithLocation { 6 | @Nullable 7 | MethodLocation location; 8 | 9 | public boolean isPlaced() { 10 | return location != null; 11 | } 12 | 13 | public void setLocation(MethodLocation methodLocation) { 14 | location = methodLocation; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/dexlib2/builder/LocatedDebugItems.java: -------------------------------------------------------------------------------- 1 | package org.jf.dexlib2.builder; 2 | 3 | public class LocatedDebugItems extends LocatedItems { 4 | 5 | @Override 6 | protected String getAddLocatedItemError() { 7 | return "Cannot add a debug item that has already been added to a method." + 8 | "You must remove it from its current location first."; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/dexlib2/builder/LocatedLabels.java: -------------------------------------------------------------------------------- 1 | package org.jf.dexlib2.builder; 2 | 3 | public class LocatedLabels extends LocatedItems