├── .gitignore ├── .idea ├── .name ├── compiler.xml ├── copyright │ └── profiles_settings.xml ├── encodings.xml ├── gradle.xml ├── libraries │ ├── XposedBridgeApi_54.xml │ ├── antlr_3_5_2_complete.xml │ ├── commons_cli_1_2.xml │ ├── fastjson_1_1_43_android.xml │ ├── greendao_2_0_0.xml │ └── guava_18_0.xml ├── misc.xml ├── modules.xml ├── runConfigurations.xml └── workspace.xml ├── LICENSE ├── README.md ├── RedClock.iml ├── app ├── app.iml ├── build.gradle ├── lib │ └── XposedBridgeApi-54.jar ├── libs │ ├── antlr-3.5.2-complete.jar │ ├── commons-cli-1.2.jar │ ├── fastjson-1.1.43.android.jar │ └── guava-18.0.jar └── src │ └── main │ ├── AndroidManifest.xml │ ├── assets │ └── xposed_init │ ├── java │ ├── com │ │ └── cc │ │ │ └── apptroy │ │ │ ├── CommandBroadcastReceiver.java │ │ │ ├── CommandExecutor.java │ │ │ ├── DexFileInfo.java │ │ │ ├── ModuleContext.java │ │ │ ├── NativeFunction.java │ │ │ ├── PackageMetaInfo.java │ │ │ ├── apimonitor │ │ │ ├── AbstractBahaviorHookCallBack.java │ │ │ ├── AccountManagerHook.java │ │ │ ├── ActivityManagerHook.java │ │ │ ├── ActivityThreadHook.java │ │ │ ├── AlarmManagerHook.java │ │ │ ├── ApiMonitorHook.java │ │ │ ├── ApiMonitorHookManager.java │ │ │ ├── AudioRecordHook.java │ │ │ ├── CameraHook.java │ │ │ ├── ConnectivityManagerHook.java │ │ │ ├── ContentResolverHook.java │ │ │ ├── ContextImplHook.java │ │ │ ├── MediaRecorderHook.java │ │ │ ├── NetWorkHook.java │ │ │ ├── NotificationManagerHook.java │ │ │ ├── PackageManagerHook.java │ │ │ ├── ProcessBuilderHook.java │ │ │ ├── RuntimeHook.java │ │ │ ├── SmsManagerHook.java │ │ │ └── TelephonyManagerHook.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 │ │ │ ├── Renderers │ │ │ │ ├── BooleanRenderer.java │ │ │ │ ├── ByteRenderer.java │ │ │ │ ├── CharRenderer.java │ │ │ │ ├── DoubleRenderer.java │ │ │ │ ├── FloatRenderer.java │ │ │ │ ├── IntegerRenderer.java │ │ │ │ ├── LongRenderer.java │ │ │ │ └── ShortRenderer.java │ │ │ ├── baksmali.java │ │ │ ├── baksmaliOptions.java │ │ │ ├── dump.java │ │ │ └── main.java │ │ │ ├── collect │ │ │ ├── HeapDump.java │ │ │ ├── LuaScriptInvoker.java │ │ │ └── MemDump.java │ │ │ ├── hook │ │ │ ├── HookHelperFacktory.java │ │ │ ├── HookHelperInterface.java │ │ │ ├── HookParam.java │ │ │ ├── MethodHookCallBack.java │ │ │ └── XposeHookHelperImpl.java │ │ │ ├── request │ │ │ ├── BackSmaliClassUpdate.java │ │ │ ├── BackSmaliDump.java │ │ │ ├── BackSmaliInit.java │ │ │ ├── BackSmaliMethodUpdate.java │ │ │ ├── BackSmaliShow.java │ │ │ ├── BackSmaliUpdate.java │ │ │ ├── CommandHandler.java │ │ │ ├── HeapDumpHandler.java │ │ │ ├── HookMethodUpdate.java │ │ │ ├── InvokeLuaScript.java │ │ │ ├── MemoryDump.java │ │ │ └── ResourceDump.java │ │ │ ├── smali │ │ │ ├── DexBackedClinitMethod.java │ │ │ ├── DexBackedDeclareField.java │ │ │ ├── DexBackedDirectMethod.java │ │ │ ├── DexBackedReflectClassDef.java │ │ │ ├── DexBackedReflectMethod.java │ │ │ ├── DexBackedVirtualMethod.java │ │ │ ├── DexFileHeadersPointer.java │ │ │ ├── DexFileMethod.java │ │ │ ├── DexOrJar.java │ │ │ ├── EmptyClassdef.java │ │ │ └── MemoryBackSmali.java │ │ │ └── util │ │ │ ├── ActivityHook.java │ │ │ ├── Constant.java │ │ │ ├── JsonWriter.java │ │ │ ├── Logger.java │ │ │ ├── MethodLookaheadIterator.java │ │ │ ├── Oncreatehook.java │ │ │ ├── ParameterIterator.java │ │ │ ├── RefInvoke.java │ │ │ └── Utility.java │ ├── de │ │ └── robv │ │ │ └── android │ │ │ └── xposed │ │ │ └── mods │ │ │ └── redclock │ │ │ └── RedClock.java │ ├── javax │ │ └── annotation │ │ │ ├── CheckForNull.java │ │ │ ├── CheckForSigned.java │ │ │ ├── CheckReturnValue.java │ │ │ ├── Detainted.java │ │ │ ├── MatchesPattern.java │ │ │ ├── Nonnegative.java │ │ │ ├── Nonnull.java │ │ │ ├── Nullable.java │ │ │ ├── OverridingMethodsMustInvokeSuper.java │ │ │ ├── ParametersAreNonnullByDefault.java │ │ │ ├── ParametersAreNullableByDefault.java │ │ │ ├── PropertyKey.java │ │ │ ├── RegEx.java │ │ │ ├── Signed.java │ │ │ ├── Syntax.java │ │ │ ├── Tainted.java │ │ │ ├── Untainted.java │ │ │ ├── WillClose.java │ │ │ ├── WillCloseWhenClosed.java │ │ │ ├── WillNotClose.java │ │ │ ├── concurrent │ │ │ ├── GuardedBy.java │ │ │ ├── Immutable.java │ │ │ ├── NotThreadSafe.java │ │ │ └── ThreadSafe.java │ │ │ └── meta │ │ │ ├── Exclusive.java │ │ │ ├── Exhaustive.java │ │ │ ├── TypeQualifier.java │ │ │ ├── TypeQualifierDefault.java │ │ │ ├── TypeQualifierNickname.java │ │ │ ├── TypeQualifierValidator.java │ │ │ └── When.java │ └── org │ │ ├── cc │ │ ├── dexlib2 │ │ │ ├── AccessFlags.java │ │ │ ├── AnnotationVisibility.java │ │ │ ├── DebugItemType.java │ │ │ ├── DexFileFactory.java │ │ │ ├── Format.java │ │ │ ├── Opcode.java │ │ │ ├── Opcodes.java │ │ │ ├── ReferenceType.java │ │ │ ├── ValueType.java │ │ │ ├── VerificationError.java │ │ │ ├── analysis │ │ │ │ ├── AnalysisException.java │ │ │ │ ├── AnalyzedInstruction.java │ │ │ │ ├── ArrayProto.java │ │ │ │ ├── ClassPath.java │ │ │ │ ├── ClassProto.java │ │ │ │ ├── CustomInlineMethodResolver.java │ │ │ │ ├── DumpFields.java │ │ │ │ ├── DumpVtables.java │ │ │ │ ├── InlineMethodResolver.java │ │ │ │ ├── MethodAnalyzer.java │ │ │ │ ├── OdexedFieldInstructionMapper.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 │ │ │ │ │ ├── BaseFieldReference.java │ │ │ │ │ ├── BaseMethodReference.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 │ │ │ │ │ ├── BaseNullEncodedValue.java │ │ │ │ │ ├── BaseShortEncodedValue.java │ │ │ │ │ ├── BaseStringEncodedValue.java │ │ │ │ │ └── BaseTypeEncodedValue.java │ │ │ ├── builder │ │ │ │ ├── BuilderDebugItem.java │ │ │ │ ├── BuilderExceptionHandler.java │ │ │ │ ├── BuilderInstruction.java │ │ │ │ ├── BuilderOffsetInstruction.java │ │ │ │ ├── BuilderSwitchPayload.java │ │ │ │ ├── BuilderTryBlock.java │ │ │ │ ├── Label.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 │ │ │ │ │ ├── BuilderInstruction22s.java │ │ │ │ │ ├── BuilderInstruction22t.java │ │ │ │ │ ├── BuilderInstruction22x.java │ │ │ │ │ ├── BuilderInstruction23x.java │ │ │ │ │ ├── BuilderInstruction25x.java │ │ │ │ │ ├── BuilderInstruction30t.java │ │ │ │ │ ├── BuilderInstruction31c.java │ │ │ │ │ ├── BuilderInstruction31i.java │ │ │ │ │ ├── BuilderInstruction31t.java │ │ │ │ │ ├── BuilderInstruction32x.java │ │ │ │ │ ├── BuilderInstruction35c.java │ │ │ │ │ ├── BuilderInstruction3rc.java │ │ │ │ │ ├── BuilderInstruction51l.java │ │ │ │ │ ├── BuilderPackedSwitchPayload.java │ │ │ │ │ ├── BuilderSparseSwitchPayload.java │ │ │ │ │ └── BuilderSwitchElement.java │ │ │ ├── dexbacked │ │ │ │ ├── BaseDexBuffer.java │ │ │ │ ├── BaseDexReader.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 │ │ │ │ ├── DexReader.java │ │ │ │ ├── MemoryDexFileItemPointer.java │ │ │ │ ├── MemoryReader.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 │ │ │ │ │ ├── DexBackedInstruction25x.java │ │ │ │ │ ├── DexBackedInstruction30t.java │ │ │ │ │ ├── DexBackedInstruction31c.java │ │ │ │ │ ├── DexBackedInstruction31i.java │ │ │ │ │ ├── DexBackedInstruction31t.java │ │ │ │ │ ├── DexBackedInstruction32x.java │ │ │ │ │ ├── DexBackedInstruction35c.java │ │ │ │ │ ├── DexBackedInstruction35mi.java │ │ │ │ │ ├── DexBackedInstruction35ms.java │ │ │ │ │ ├── DexBackedInstruction3rc.java │ │ │ │ │ ├── DexBackedInstruction3rmi.java │ │ │ │ │ ├── DexBackedInstruction3rms.java │ │ │ │ │ ├── DexBackedInstruction51l.java │ │ │ │ │ ├── DexBackedPackedSwitchPayload.java │ │ │ │ │ ├── DexBackedSparseSwitchPayload.java │ │ │ │ │ └── DexBackedUnknownInstruction.java │ │ │ │ ├── raw │ │ │ │ │ ├── AnnotationDirectoryItem.java │ │ │ │ │ ├── AnnotationItem.java │ │ │ │ │ ├── AnnotationSetItem.java │ │ │ │ │ ├── AnnotationSetRefList.java │ │ │ │ │ ├── ClassDataItem.java │ │ │ │ │ ├── ClassDefItem.java │ │ │ │ │ ├── CodeItem.java │ │ │ │ │ ├── DebugInfoItem.java │ │ │ │ │ ├── EncodedArrayItem.java │ │ │ │ │ ├── EncodedValue.java │ │ │ │ │ ├── FieldIdItem.java │ │ │ │ │ ├── HeaderItem.java │ │ │ │ │ ├── ItemType.java │ │ │ │ │ ├── MapItem.java │ │ │ │ │ ├── MethodIdItem.java │ │ │ │ │ ├── OdexHeaderItem.java │ │ │ │ │ ├── ProtoIdItem.java │ │ │ │ │ ├── RawDexFile.java │ │ │ │ │ ├── SectionAnnotator.java │ │ │ │ │ ├── StringDataItem.java │ │ │ │ │ ├── StringIdItem.java │ │ │ │ │ ├── TypeIdItem.java │ │ │ │ │ ├── TypeListItem.java │ │ │ │ │ └── util │ │ │ │ │ │ └── DexAnnotator.java │ │ │ │ ├── reference │ │ │ │ │ ├── DexBackedFieldReference.java │ │ │ │ │ ├── DexBackedMethodReference.java │ │ │ │ │ ├── DexBackedReference.java │ │ │ │ │ ├── DexBackedStringReference.java │ │ │ │ │ └── DexBackedTypeReference.java │ │ │ │ ├── util │ │ │ │ │ ├── AnnotationsDirectory.java │ │ │ │ │ ├── DebugInfo.java │ │ │ │ │ ├── FixedSizeList.java │ │ │ │ │ ├── FixedSizeSet.java │ │ │ │ │ ├── ParameterIterator.java │ │ │ │ │ ├── StaticInitialValueIterator.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 │ │ │ │ │ ├── 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 │ │ │ │ ├── TryBlock.java │ │ │ │ ├── debug │ │ │ │ │ ├── DebugItem.java │ │ │ │ │ ├── EndLocal.java │ │ │ │ │ ├── EpilogueBegin.java │ │ │ │ │ ├── LineNumber.java │ │ │ │ │ ├── LocalInfo.java │ │ │ │ │ ├── PrologueEnd.java │ │ │ │ │ ├── RestartLocal.java │ │ │ │ │ ├── SetSourceFile.java │ │ │ │ │ └── StartLocal.java │ │ │ │ ├── instruction │ │ │ │ │ ├── FieldOffsetInstruction.java │ │ │ │ │ ├── FiveRegisterInstruction.java │ │ │ │ │ ├── HatLiteralInstruction.java │ │ │ │ │ ├── InlineIndexInstruction.java │ │ │ │ │ ├── Instruction.java │ │ │ │ │ ├── LongHatLiteralInstruction.java │ │ │ │ │ ├── NarrowHatLiteralInstruction.java │ │ │ │ │ ├── NarrowLiteralInstruction.java │ │ │ │ │ ├── OffsetInstruction.java │ │ │ │ │ ├── OneFixedFourParameterRegisterInstruction.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 │ │ │ │ │ │ ├── Instruction25x.java │ │ │ │ │ │ ├── Instruction30t.java │ │ │ │ │ │ ├── Instruction31c.java │ │ │ │ │ │ ├── Instruction31i.java │ │ │ │ │ │ ├── Instruction31t.java │ │ │ │ │ │ ├── Instruction32x.java │ │ │ │ │ │ ├── Instruction35c.java │ │ │ │ │ │ ├── Instruction35mi.java │ │ │ │ │ │ ├── Instruction35ms.java │ │ │ │ │ │ ├── Instruction3rc.java │ │ │ │ │ │ ├── Instruction3rmi.java │ │ │ │ │ │ ├── Instruction3rms.java │ │ │ │ │ │ ├── Instruction51l.java │ │ │ │ │ │ ├── PackedSwitchPayload.java │ │ │ │ │ │ ├── SparseSwitchPayload.java │ │ │ │ │ │ └── UnknownInstruction.java │ │ │ │ ├── reference │ │ │ │ │ ├── FieldReference.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 │ │ │ │ │ ├── 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 │ │ │ │ ├── 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 │ │ │ │ │ ├── ImmutableInstruction25x.java │ │ │ │ │ ├── ImmutableInstruction30t.java │ │ │ │ │ ├── ImmutableInstruction31c.java │ │ │ │ │ ├── ImmutableInstruction31i.java │ │ │ │ │ ├── ImmutableInstruction31t.java │ │ │ │ │ ├── ImmutableInstruction32x.java │ │ │ │ │ ├── ImmutableInstruction35c.java │ │ │ │ │ ├── ImmutableInstruction35mi.java │ │ │ │ │ ├── ImmutableInstruction35ms.java │ │ │ │ │ ├── ImmutableInstruction3rc.java │ │ │ │ │ ├── ImmutableInstruction3rmi.java │ │ │ │ │ ├── ImmutableInstruction3rms.java │ │ │ │ │ ├── ImmutableInstruction51l.java │ │ │ │ │ ├── ImmutableInstructionFactory.java │ │ │ │ │ ├── ImmutablePackedSwitchPayload.java │ │ │ │ │ ├── ImmutableSparseSwitchPayload.java │ │ │ │ │ ├── ImmutableSwitchElement.java │ │ │ │ │ └── ImmutableUnknownInstruction.java │ │ │ │ ├── reference │ │ │ │ │ ├── ImmutableFieldReference.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 │ │ │ │ │ ├── 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 │ │ │ │ ├── AnnotatedBytes.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 │ │ │ │ ├── ClassSection.java │ │ │ │ ├── DebugWriter.java │ │ │ │ ├── DexDataWriter.java │ │ │ │ ├── DexWriter.java │ │ │ │ ├── EncodedValueWriter.java │ │ │ │ ├── FieldSection.java │ │ │ │ ├── IndexSection.java │ │ │ │ ├── InstructionFactory.java │ │ │ │ ├── InstructionWriter.java │ │ │ │ ├── MethodSection.java │ │ │ │ ├── NullableIndexSection.java │ │ │ │ ├── NullableOffsetSection.java │ │ │ │ ├── OffsetSection.java │ │ │ │ ├── ProtoSection.java │ │ │ │ ├── StringSection.java │ │ │ │ ├── TypeListSection.java │ │ │ │ ├── TypeSection.java │ │ │ │ ├── builder │ │ │ │ ├── BuilderAnnotation.java │ │ │ │ ├── BuilderAnnotationElement.java │ │ │ │ ├── BuilderAnnotationPool.java │ │ │ │ ├── BuilderAnnotationSet.java │ │ │ │ ├── BuilderAnnotationSetPool.java │ │ │ │ ├── BuilderClassDef.java │ │ │ │ ├── BuilderClassPool.java │ │ │ │ ├── BuilderContext.java │ │ │ │ ├── BuilderEncodedValues.java │ │ │ │ ├── BuilderExceptionHandler.java │ │ │ │ ├── BuilderField.java │ │ │ │ ├── BuilderFieldPool.java │ │ │ │ ├── BuilderFieldReference.java │ │ │ │ ├── BuilderMapEntryCollection.java │ │ │ │ ├── BuilderMethod.java │ │ │ │ ├── BuilderMethodParameter.java │ │ │ │ ├── BuilderMethodPool.java │ │ │ │ ├── BuilderMethodReference.java │ │ │ │ ├── BuilderProtoPool.java │ │ │ │ ├── BuilderProtoReference.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 │ │ │ │ ├── ClassPool.java │ │ │ │ ├── DexPool.java │ │ │ │ ├── FieldPool.java │ │ │ │ ├── MethodPool.java │ │ │ │ ├── PoolClassDef.java │ │ │ │ ├── PoolMethod.java │ │ │ │ ├── ProtoPool.java │ │ │ │ ├── StringPool.java │ │ │ │ ├── StringTypeBasePool.java │ │ │ │ ├── TypeListPool.java │ │ │ │ └── TypePool.java │ │ │ │ └── util │ │ │ │ └── TryListBuilder.java │ │ ├── smali │ │ │ ├── InvalidToken.java │ │ │ ├── LexerErrorInterface.java │ │ │ ├── LiteralTools.java │ │ │ ├── OdexedInstructionException.java │ │ │ ├── SemanticException.java │ │ │ ├── SmaliMethodParameter.java │ │ │ ├── SmaliTestUtils.java │ │ │ ├── WithRegister.java │ │ │ ├── main.java │ │ │ ├── smaliFlexLexer.java │ │ │ ├── smaliParser.java │ │ │ └── smaliTreeWalker.java │ │ └── util │ │ │ ├── AbstractForwardSequentialList.java │ │ │ ├── AbstractListIterator.java │ │ │ ├── AlignmentUtils.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 │ │ │ ├── NakedByteArrayOutputStream.java │ │ │ ├── NibbleUtils.java │ │ │ ├── NumberUtils.java │ │ │ ├── PathUtil.java │ │ │ ├── RandomAccessFileInputStream.java │ │ │ ├── RandomAccessFileOutputStream.java │ │ │ ├── SmaliHelpFormatter.java │ │ │ ├── SparseArray.java │ │ │ ├── SparseIntArray.java │ │ │ ├── StringUtils.java │ │ │ ├── StringWrapper.java │ │ │ ├── TextUtils.java │ │ │ ├── TwoColumnOutput.java │ │ │ ├── Utf8Utils.java │ │ │ └── WrappedIndentingWriter.java │ │ └── keplerproject │ │ └── luajava │ │ ├── CPtr.java │ │ ├── Console.java │ │ ├── JavaFunction.java │ │ ├── LuaException.java │ │ ├── LuaInvocationHandler.java │ │ ├── LuaJavaAPI.java │ │ ├── LuaObject.java │ │ ├── LuaState.java │ │ └── LuaStateFactory.java │ └── res │ ├── drawable-hdpi │ └── ic_launcher.png │ ├── drawable-ldpi │ └── ic_launcher.png │ ├── drawable-mdpi │ └── ic_launcher.png │ ├── drawable-xhdpi │ └── ic_launcher.png │ └── values │ └── strings.xml ├── build.gradle ├── example ├── calOffset.py ├── epoll.c ├── epoll_arm.c ├── hijack ├── jni │ └── Android.mk └── libs │ └── armeabi │ └── libexample.so ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── import-summary.txt ├── jni ├── Android.mk ├── Application.mk ├── DexFile.h ├── com_cc_apptroy_NativeFunction.h ├── dump.cpp └── dump.h ├── libs └── armeabi │ └── libapptroy.so └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the Dalvik VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # Generated files 12 | bin/ 13 | gen/ 14 | obj/ 15 | app/build/ 16 | 17 | # Gradle files 18 | .gradle/ 19 | build/ 20 | .idea/ 21 | 22 | # Local configuration file (sdk path, etc) 23 | local.properties 24 | 25 | # Proguard folder generated by Eclipse 26 | proguard/ 27 | 28 | # Log Files 29 | *.log 30 | 31 | # Android Studio Navigation editor temp files 32 | .navigation/ 33 | 34 | # Android Studio captures folder 35 | captures/ 36 | 37 | # OS 38 | .DS_Store 39 | 40 | -------------------------------------------------------------------------------- /.idea/.name: -------------------------------------------------------------------------------- 1 | RedClock -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 24 | 25 | -------------------------------------------------------------------------------- /.idea/libraries/XposedBridgeApi_54.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/antlr_3_5_2_complete.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/commons_cli_1_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/fastjson_1_1_43_android.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/greendao_2_0_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/guava_18_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /RedClock.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | android { 3 | compileSdkVersion 22 4 | buildToolsVersion "22.0.1" 5 | 6 | defaultConfig { 7 | applicationId "de.robv.android.xposed.mods.redclock" 8 | minSdkVersion 15 9 | targetSdkVersion 15 10 | } 11 | 12 | buildTypes { 13 | release { 14 | minifyEnabled false 15 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' 16 | } 17 | } 18 | packagingOptions { 19 | exclude 'META-INF/NOTICE.txt' 20 | exclude 'META-INF/LICENSE.txt' 21 | } 22 | } 23 | 24 | dependencies { 25 | provided files('lib/XposedBridgeApi-54.jar') 26 | compile fileTree(include: ['*.jar'], dir: 'libs') 27 | compile files('libs/fastjson-1.1.43.android.jar') 28 | compile 'de.greenrobot:greendao:2.0.0' 29 | } -------------------------------------------------------------------------------- /app/lib/XposedBridgeApi-54.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CvvT/AppTroy/88c3f14dabea52531c4f541da776da4df8f5d644/app/lib/XposedBridgeApi-54.jar -------------------------------------------------------------------------------- /app/libs/antlr-3.5.2-complete.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CvvT/AppTroy/88c3f14dabea52531c4f541da776da4df8f5d644/app/libs/antlr-3.5.2-complete.jar -------------------------------------------------------------------------------- /app/libs/commons-cli-1.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CvvT/AppTroy/88c3f14dabea52531c4f541da776da4df8f5d644/app/libs/commons-cli-1.2.jar -------------------------------------------------------------------------------- /app/libs/fastjson-1.1.43.android.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CvvT/AppTroy/88c3f14dabea52531c4f541da776da4df8f5d644/app/libs/fastjson-1.1.43.android.jar -------------------------------------------------------------------------------- /app/libs/guava-18.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CvvT/AppTroy/88c3f14dabea52531c4f541da776da4df8f5d644/app/libs/guava-18.0.jar -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 13 | 16 | 19 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/assets/xposed_init: -------------------------------------------------------------------------------- 1 | de.robv.android.xposed.mods.redclock.RedClock 2 | -------------------------------------------------------------------------------- /app/src/main/java/com/cc/apptroy/DexFileInfo.java: -------------------------------------------------------------------------------- 1 | package com.cc.apptroy; 2 | 3 | /** 4 | * Created by CwT on 15/7/31. 5 | */ 6 | public class DexFileInfo { 7 | private String dexPath; 8 | private int mCookie; 9 | private ClassLoader defineClassLoader; 10 | 11 | public DexFileInfo(String dexPath,int mCookie) { 12 | super(); 13 | this.dexPath = dexPath; 14 | this.mCookie = mCookie; 15 | // Log.d("cc", "start"); 16 | // NativeFunction.getInstance().saveDexFileByCookie(mCookie, ModuleContext.getInstance().getBaseClassLoader()); 17 | // XposedBridge.log("dexpath: " + dexPath + ", mcookie: " + mCookie); 18 | // Log.d("cc", "dexpath: " + dexPath + ", mcookie: " + mCookie); 19 | // Log.d("cc", "end"); 20 | } 21 | 22 | public DexFileInfo(String dexPath,int mCookie,ClassLoader classLoader) { 23 | this(dexPath,mCookie); 24 | this.defineClassLoader = classLoader; 25 | } 26 | 27 | public String getDexPath() { 28 | return dexPath; 29 | } 30 | 31 | public int getmCookie() { 32 | return mCookie; 33 | } 34 | 35 | public void setmCookie(int mCookie) { 36 | this.mCookie = mCookie; 37 | } 38 | 39 | public ClassLoader getDefineClassLoader() { 40 | return defineClassLoader; 41 | } 42 | 43 | public void setDefineClassLoader(ClassLoader defineClassLoader) { 44 | this.defineClassLoader = defineClassLoader; 45 | } 46 | 47 | public void setDexPath(String dexPath) { 48 | this.dexPath = dexPath; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /app/src/main/java/com/cc/apptroy/PackageMetaInfo.java: -------------------------------------------------------------------------------- 1 | package com.cc.apptroy; 2 | 3 | import android.content.pm.ApplicationInfo; 4 | 5 | import de.robv.android.xposed.callbacks.XC_LoadPackage; 6 | 7 | /** 8 | * Created by CwT on 15/7/30. 9 | */ 10 | public class PackageMetaInfo { 11 | private String packageName; 12 | private String processName; 13 | private ClassLoader classLoader; 14 | private ApplicationInfo appInfo; 15 | private boolean isFirstApplication; 16 | 17 | public static PackageMetaInfo fromXposed(XC_LoadPackage.LoadPackageParam lpparam){ 18 | PackageMetaInfo pminfo = new PackageMetaInfo(); 19 | pminfo.packageName = lpparam.packageName; 20 | pminfo.processName = lpparam.processName; 21 | pminfo.classLoader = lpparam.classLoader; 22 | pminfo.appInfo = lpparam.appInfo; 23 | pminfo.isFirstApplication = lpparam.isFirstApplication; 24 | return pminfo; 25 | 26 | } 27 | 28 | public String getPackageName() { 29 | return packageName; 30 | } 31 | 32 | public String getProcessName() { 33 | return processName; 34 | } 35 | 36 | public ClassLoader getClassLoader() { 37 | return classLoader; 38 | } 39 | 40 | public ApplicationInfo getAppInfo() { 41 | return appInfo; 42 | } 43 | 44 | public boolean isFirstApplication() { 45 | return isFirstApplication; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /app/src/main/java/com/cc/apptroy/apimonitor/AbstractBahaviorHookCallBack.java: -------------------------------------------------------------------------------- 1 | package com.cc.apptroy.apimonitor; 2 | 3 | import com.cc.apptroy.hook.HookParam; 4 | import com.cc.apptroy.hook.MethodHookCallBack; 5 | import com.cc.apptroy.util.Logger; 6 | 7 | /** 8 | * Created by CwT on 16/5/16. 9 | */ 10 | public abstract class AbstractBahaviorHookCallBack extends MethodHookCallBack { 11 | 12 | @Override 13 | public void beforeHookedMethod(HookParam param) { 14 | // TODO Auto-generated method stub 15 | Logger.log_behavior("Invoke "+ param.method.getDeclaringClass().getName()+"->"+param.method.getName()); 16 | this.descParam(param); 17 | //this.printStackInfo(); 18 | } 19 | 20 | @Override 21 | public void afterHookedMethod(HookParam param) { 22 | // TODO Auto-generated method stub 23 | //Logger.log_behavior("End Invoke "+ param.method.toString()); 24 | } 25 | 26 | private void printStackInfo(){ 27 | Throwable ex = new Throwable(); 28 | StackTraceElement[] stackElements = ex.getStackTrace(); 29 | if(stackElements != null){ 30 | StackTraceElement st; 31 | for(int i=0; i"); 24 | } 25 | }); 26 | 27 | Method getAccountsByTypeMethod = RefInvoke.findMethodExact( 28 | "android.accounts.AccountManager", ClassLoader.getSystemClassLoader(), 29 | "getAccountsByType",String.class); 30 | hookhelper.hookMethod(getAccountsByTypeMethod, new AbstractBahaviorHookCallBack() { 31 | 32 | @Override 33 | public void descParam(HookParam param) { 34 | // TODO Auto-generated method stub 35 | String type = (String) param.args[0]; 36 | Logger.log_behavior("Get Account By Type ->"); 37 | Logger.log_behavior("type :" +type); 38 | } 39 | }); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /app/src/main/java/com/cc/apptroy/apimonitor/ActivityManagerHook.java: -------------------------------------------------------------------------------- 1 | package com.cc.apptroy.apimonitor; 2 | 3 | import com.cc.apptroy.hook.HookParam; 4 | import com.cc.apptroy.util.Logger; 5 | import com.cc.apptroy.util.RefInvoke; 6 | 7 | import java.lang.reflect.Method; 8 | 9 | public class ActivityManagerHook extends ApiMonitorHook { 10 | 11 | @Override 12 | public void startHook() { 13 | 14 | Method killBackgroundProcessesmethod = RefInvoke.findMethodExact( 15 | "android.app.ActivityManager", ClassLoader.getSystemClassLoader(), 16 | "killBackgroundProcesses", String.class); 17 | hookhelper.hookMethod(killBackgroundProcessesmethod, new AbstractBahaviorHookCallBack() { 18 | 19 | @Override 20 | public void descParam(HookParam param) { 21 | // TODO Auto-generated method stub 22 | String packageName = (String) param.args[0]; 23 | Logger.log_behavior("kill packagename = "+packageName); 24 | } 25 | }); 26 | 27 | Method forceStopPackagemethod = RefInvoke.findMethodExact( 28 | "android.app.ActivityManager", ClassLoader.getSystemClassLoader(), 29 | "forceStopPackage", String.class); 30 | hookhelper.hookMethod(forceStopPackagemethod, new AbstractBahaviorHookCallBack() { 31 | 32 | @Override 33 | public void descParam(HookParam param) { 34 | // TODO Auto-generated method stub 35 | String packageName = (String) param.args[0]; 36 | Logger.log_behavior("kill packagename = "+packageName); 37 | } 38 | }); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/java/com/cc/apptroy/apimonitor/ActivityThreadHook.java: -------------------------------------------------------------------------------- 1 | package com.cc.apptroy.apimonitor; 2 | 3 | import com.cc.apptroy.hook.HookParam; 4 | import com.cc.apptroy.util.Logger; 5 | import com.cc.apptroy.util.RefInvoke; 6 | 7 | import java.lang.reflect.Method; 8 | 9 | public class ActivityThreadHook extends ApiMonitorHook { 10 | 11 | @Override 12 | public void startHook() { 13 | // TODO Auto-generated method stub 14 | try { 15 | Class receiverDataClass = Class.forName("android.app.ActivityThread$ReceiverData"); 16 | if (receiverDataClass != null) { 17 | Method handleReceiverMethod = RefInvoke.findMethodExact("android.app.ActivityThread", ClassLoader.getSystemClassLoader(), 18 | "handleReceiver", receiverDataClass); 19 | hookhelper.hookMethod(handleReceiverMethod, new AbstractBahaviorHookCallBack() { 20 | 21 | @Override 22 | public void descParam(HookParam param) { 23 | Logger.log_behavior("The Receiver Information:"); 24 | Object data = param.args[0]; 25 | Logger.log_behavior(data.toString()); 26 | 27 | } 28 | }); 29 | } 30 | } catch (ClassNotFoundException e) { 31 | // TODO Auto-generated catch block 32 | e.printStackTrace(); 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/com/cc/apptroy/apimonitor/ApiMonitorHook.java: -------------------------------------------------------------------------------- 1 | package com.cc.apptroy.apimonitor; 2 | 3 | import com.cc.apptroy.hook.HookHelperFacktory; 4 | import com.cc.apptroy.hook.HookHelperInterface; 5 | 6 | /** 7 | * Created by CwT on 16/5/16. 8 | */ 9 | public abstract class ApiMonitorHook { 10 | 11 | protected HookHelperInterface hookhelper = HookHelperFacktory.getHookHelper(); 12 | public static class InvokeInfo{ 13 | private long invokeAtTime; 14 | private String className; 15 | private String methodName; 16 | private Object[] argv; 17 | private Object result; 18 | private Object invokeState; 19 | } 20 | public abstract void startHook(); 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/java/com/cc/apptroy/apimonitor/ApiMonitorHookManager.java: -------------------------------------------------------------------------------- 1 | package com.cc.apptroy.apimonitor; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | /** 7 | * Created by CwT on 16/5/16. 8 | */ 9 | public class ApiMonitorHookManager { 10 | 11 | static ApiMonitorHookManager instance; 12 | 13 | List list = new ArrayList<>(); 14 | 15 | public static ApiMonitorHookManager getInstance() { 16 | if (instance == null) 17 | instance = new ApiMonitorHookManager(); 18 | return instance; 19 | } 20 | 21 | public static ApiMonitorHookManager Default() { 22 | getInstance().addMonitor(new SmsManagerHook()) 23 | .addMonitor(new TelephonyManagerHook()) 24 | .addMonitor(new MediaRecorderHook()) 25 | .addMonitor(new AccountManagerHook()) 26 | .addMonitor(new ActivityManagerHook()) 27 | .addMonitor(new AlarmManagerHook()) 28 | .addMonitor(new ConnectivityManagerHook()) 29 | .addMonitor(new ContentResolverHook()) 30 | .addMonitor(new ContextImplHook()) 31 | .addMonitor(new PackageManagerHook()) 32 | .addMonitor(new RuntimeHook()) 33 | .addMonitor(new ActivityThreadHook()) 34 | .addMonitor(new AudioRecordHook()) 35 | .addMonitor(new CameraHook()) 36 | .addMonitor(new NetWorkHook()) 37 | .addMonitor(new NotificationManagerHook()) 38 | .addMonitor(new ProcessBuilderHook()); 39 | return instance; 40 | } 41 | 42 | public ApiMonitorHookManager addMonitor(ApiMonitorHook hook) { 43 | list.add(hook); 44 | return instance; 45 | } 46 | 47 | public void startMonitor() { 48 | for (ApiMonitorHook hook : list) { 49 | hook.startHook(); 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /app/src/main/java/com/cc/apptroy/apimonitor/AudioRecordHook.java: -------------------------------------------------------------------------------- 1 | package com.cc.apptroy.apimonitor; 2 | 3 | import com.cc.apptroy.hook.HookParam; 4 | import com.cc.apptroy.util.Logger; 5 | import com.cc.apptroy.util.RefInvoke; 6 | 7 | import java.lang.reflect.Method; 8 | 9 | public class AudioRecordHook extends ApiMonitorHook { 10 | 11 | @Override 12 | public void startHook() { 13 | // TODO Auto-generated method stub 14 | Method startRecordingMethod = RefInvoke.findMethodExact( 15 | "android.media.AudioRecord", ClassLoader.getSystemClassLoader(), 16 | "startRecording"); 17 | hookhelper.hookMethod(startRecordingMethod, new AbstractBahaviorHookCallBack() { 18 | 19 | @Override 20 | public void descParam(HookParam param) { 21 | // TODO Auto-generated method stub 22 | Logger.log_behavior("Audio Recording ->"); 23 | } 24 | }); 25 | 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/com/cc/apptroy/apimonitor/ConnectivityManagerHook.java: -------------------------------------------------------------------------------- 1 | package com.cc.apptroy.apimonitor; 2 | 3 | import com.cc.apptroy.hook.HookParam; 4 | import com.cc.apptroy.util.Logger; 5 | import com.cc.apptroy.util.RefInvoke; 6 | 7 | import java.lang.reflect.Method; 8 | 9 | 10 | public class ConnectivityManagerHook extends ApiMonitorHook { 11 | 12 | @Override 13 | public void startHook() { 14 | 15 | Method setMobileDataEnabledmethod = RefInvoke.findMethodExact( 16 | "android.net.ConnectivityManager", ClassLoader.getSystemClassLoader(), 17 | "setMobileDataEnabled",boolean.class); 18 | hookhelper.hookMethod(setMobileDataEnabledmethod, new AbstractBahaviorHookCallBack() { 19 | 20 | @Override 21 | public void descParam(HookParam param) { 22 | boolean status = (Boolean) param.args[0]; 23 | Logger.log("Set MobileDataEnabled = "+status); 24 | } 25 | }); 26 | 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/java/com/cc/apptroy/apimonitor/ContextImplHook.java: -------------------------------------------------------------------------------- 1 | package com.cc.apptroy.apimonitor; 2 | 3 | import java.lang.reflect.Method; 4 | import java.util.Iterator; 5 | import android.content.BroadcastReceiver; 6 | import android.content.IntentFilter; 7 | 8 | import com.cc.apptroy.hook.HookParam; 9 | import com.cc.apptroy.util.Logger; 10 | import com.cc.apptroy.util.RefInvoke; 11 | 12 | public class ContextImplHook extends ApiMonitorHook{ 13 | 14 | @Override 15 | public void startHook() { 16 | // TODO Auto-generated method stub 17 | Method registerReceivermethod = RefInvoke.findMethodExact( 18 | "android.app.ContextImpl", ClassLoader.getSystemClassLoader(), 19 | "registerReceiver", BroadcastReceiver.class,IntentFilter.class); 20 | hookhelper.hookMethod(registerReceivermethod, new AbstractBahaviorHookCallBack() { 21 | 22 | @Override 23 | public void descParam(HookParam param) { 24 | // TODO Auto-generated method stub 25 | Logger.log_behavior("Register BroatcastReceiver"); 26 | Logger.log_behavior("The BroatcastReceiver ClassName = "+param.args[0].getClass().toString()); 27 | if(param.args[1] != null){ 28 | String intentstr = descIntentFilter((IntentFilter) param.args[1]); 29 | Logger.log_behavior("Intent Action = ["+intentstr+"]"); 30 | } 31 | } 32 | }); 33 | } 34 | 35 | public String descIntentFilter(IntentFilter intentFilter){ 36 | StringBuilder sb = new StringBuilder(); 37 | Iterator actions =intentFilter.actionsIterator(); 38 | String action = null; 39 | while(actions.hasNext()){ 40 | action = actions.next(); 41 | sb.append(action+","); 42 | } 43 | return sb.toString(); 44 | 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /app/src/main/java/com/cc/apptroy/apimonitor/MediaRecorderHook.java: -------------------------------------------------------------------------------- 1 | package com.cc.apptroy.apimonitor; 2 | 3 | import com.cc.apptroy.hook.HookParam; 4 | import com.cc.apptroy.util.Logger; 5 | import com.cc.apptroy.util.RefInvoke; 6 | 7 | import java.io.FileDescriptor; 8 | import java.lang.reflect.Method; 9 | 10 | public class MediaRecorderHook extends ApiMonitorHook { 11 | 12 | @Override 13 | public void startHook() { 14 | 15 | Method startmethod = RefInvoke.findMethodExact( 16 | "android.media.MediaRecorder", ClassLoader.getSystemClassLoader(), 17 | "start"); 18 | hookhelper.hookMethod(startmethod, new AbstractBahaviorHookCallBack() { 19 | 20 | @Override 21 | public void descParam(HookParam param) { 22 | // TODO Auto-generated method stub 23 | Logger.log_behavior("Media Record: Start ->"); 24 | String mPath = (String)RefInvoke.getFieldOjbect("android.media.MediaRecorder", param.thisObject, "mPath"); 25 | if(mPath != null) 26 | Logger.log_behavior("Save Path: ->" +mPath); 27 | else{ 28 | FileDescriptor mFd = (FileDescriptor) RefInvoke.getFieldOjbect("android.media.MediaRecorder", param.thisObject, "mFd"); 29 | Logger.log_behavior("Save Path: ->" +mFd.toString()); 30 | } 31 | } 32 | }); 33 | 34 | Method stopmethod = RefInvoke.findMethodExact( 35 | "android.media.MediaRecorder", ClassLoader.getSystemClassLoader(), 36 | "stop"); 37 | hookhelper.hookMethod(stopmethod, new AbstractBahaviorHookCallBack() { 38 | 39 | @Override 40 | public void descParam(HookParam param) { 41 | // TODO Auto-generated method stub 42 | Logger.log_behavior("Media Record: Stop ->"); 43 | } 44 | }); 45 | 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /app/src/main/java/com/cc/apptroy/apimonitor/NotificationManagerHook.java: -------------------------------------------------------------------------------- 1 | package com.cc.apptroy.apimonitor; 2 | 3 | import java.lang.reflect.Method; 4 | import android.app.Notification; 5 | 6 | import com.cc.apptroy.hook.HookParam; 7 | import com.cc.apptroy.util.Logger; 8 | import com.cc.apptroy.util.RefInvoke; 9 | 10 | public class NotificationManagerHook extends ApiMonitorHook { 11 | 12 | @Override 13 | public void startHook() { 14 | // TODO Auto-generated method stub 15 | Method notifyMethod = RefInvoke.findMethodExact("android.app.NotificationManager", ClassLoader.getSystemClassLoader(), "notify",int.class,Notification.class); 16 | hookhelper.hookMethod(notifyMethod, new AbstractBahaviorHookCallBack() { 17 | @Override 18 | public void descParam(HookParam param) { 19 | // TODO Auto-generated method stub 20 | Notification notification = (Notification) param.args[1]; 21 | Logger.log_behavior("Send Notification ->"); 22 | Logger.log_behavior(notification.toString()); 23 | } 24 | }); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/java/com/cc/apptroy/apimonitor/ProcessBuilderHook.java: -------------------------------------------------------------------------------- 1 | package com.cc.apptroy.apimonitor; 2 | 3 | import com.cc.apptroy.hook.HookParam; 4 | import com.cc.apptroy.util.Logger; 5 | import com.cc.apptroy.util.RefInvoke; 6 | 7 | import java.lang.reflect.Method; 8 | import java.util.List; 9 | 10 | 11 | public class ProcessBuilderHook extends ApiMonitorHook { 12 | 13 | @Override 14 | public void startHook() { 15 | // TODO Auto-generated method stub 16 | Method execmethod = RefInvoke.findMethodExact( 17 | "java.lang.ProcessBuilder", ClassLoader.getSystemClassLoader(), 18 | "start"); 19 | hookhelper.hookMethod(execmethod, new AbstractBahaviorHookCallBack() { 20 | @Override 21 | public void descParam(HookParam param) { 22 | // TODO Auto-generated method stub 23 | Logger.log_behavior("Create New Process ->"); 24 | ProcessBuilder pb = (ProcessBuilder) param.thisObject; 25 | List cmds = pb.command(); 26 | StringBuilder sb = new StringBuilder(); 27 | for(int i=0 ;i "); 23 | String[] progs = (String[]) param.args[0]; 24 | for(int i=0 ;i "; 32 | } 33 | 34 | @Nonnull 35 | @Override 36 | public String getReturnType() { 37 | return "V"; 38 | } 39 | 40 | @Nonnull 41 | @Override 42 | public List getParameters() { 43 | return ImmutableList.of(); 44 | } 45 | 46 | @Nonnull 47 | @Override 48 | public List getParameterTypes() { 49 | return ImmutableList.of(); 50 | } 51 | 52 | // @Nullable 53 | // @Override 54 | // public DexBackedMethodImplementation getImplementation() { 55 | // DexFileMethod clinit = NativeFunction.getInstance().getclinit(clazz); 56 | // if (clinit != null) { 57 | // return new DexBackedMethodImplementation(dexFile, this, clinit.getCodeoffset()); 58 | // } 59 | // return null; 60 | // } 61 | } 62 | -------------------------------------------------------------------------------- /app/src/main/java/com/cc/apptroy/smali/DexBackedDeclareField.java: -------------------------------------------------------------------------------- 1 | package com.cc.apptroy.smali; 2 | 3 | import com.cc.apptroy.util.Utility; 4 | 5 | import org.cc.dexlib2.dexbacked.DexBackedClassDef; 6 | import org.cc.dexlib2.dexbacked.DexBackedDexFile; 7 | import org.cc.dexlib2.dexbacked.DexBackedField; 8 | 9 | import java.lang.reflect.Field; 10 | 11 | import javax.annotation.Nonnull; 12 | 13 | /** 14 | * Created by CwT on 15/12/4. 15 | */ 16 | public class DexBackedDeclareField extends DexBackedField { 17 | 18 | Field field = null; 19 | public DexBackedDeclareField(@Nonnull DexBackedDexFile dexfile, 20 | @Nonnull DexBackedClassDef classDef, 21 | @Nonnull Field field){ 22 | super(dexfile, classDef, field); 23 | this.field = field; 24 | } 25 | 26 | @Nonnull 27 | @Override 28 | public String getName() { 29 | return field.getName(); 30 | } 31 | 32 | @Nonnull 33 | @Override 34 | public String getType() { 35 | return Utility.dottoslash(field.getType().getName()); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/cc/apptroy/smali/DexBackedReflectMethod.java: -------------------------------------------------------------------------------- 1 | package com.cc.apptroy.smali; 2 | 3 | import org.cc.dexlib2.dexbacked.DexBackedDexFile; 4 | 5 | import java.lang.reflect.Method; 6 | 7 | import javax.annotation.Nonnull; 8 | 9 | /** 10 | * Created by CwT on 16/4/10. 11 | */ 12 | public class DexBackedReflectMethod extends DexBackedVirtualMethod { 13 | 14 | protected final String defineclass; 15 | 16 | public DexBackedReflectMethod(@Nonnull DexBackedDexFile dexfile, Class clazz, Method method) { 17 | super(dexfile, null, clazz, method); 18 | defineclass = "L" + clazz.getName().replaceAll("\\.", "/") + ";"; 19 | } 20 | 21 | @Nonnull @Override public String getDefiningClass() { return defineclass; } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/java/com/cc/apptroy/smali/DexFileHeadersPointer.java: -------------------------------------------------------------------------------- 1 | package com.cc.apptroy.smali; 2 | 3 | public class DexFileHeadersPointer { 4 | 5 | private int baseAddr; 6 | private int pStringIds; 7 | private int pTypeIds; 8 | private int pFieldIds; 9 | private int pMethodIds; 10 | private int pProtoIds; 11 | private int pClassDefs; 12 | private int classCount; 13 | 14 | public int getClassCount() { 15 | return classCount; 16 | } 17 | public void setClassCount(int classCount) { 18 | this.classCount = classCount; 19 | } 20 | public void setBaseAddr(int baseAddr) { 21 | this.baseAddr = baseAddr; 22 | } 23 | public void setpStringIds(int pStringIds) { 24 | this.pStringIds = pStringIds; 25 | } 26 | public void setpTypeIds(int pTypeIds) { 27 | this.pTypeIds = pTypeIds; 28 | } 29 | public void setpFieldIds(int pFieldIds) { 30 | this.pFieldIds = pFieldIds; 31 | } 32 | public void setpMethodIds(int pMethodIds) { 33 | this.pMethodIds = pMethodIds; 34 | } 35 | public void setpProtoIds(int pProtoIds) { 36 | this.pProtoIds = pProtoIds; 37 | } 38 | public void setpClassDefs(int pClassDefs) { 39 | this.pClassDefs = pClassDefs; 40 | } 41 | public int getBaseAddr() { 42 | return baseAddr; 43 | } 44 | public int getpStringIds() { 45 | return pStringIds; 46 | } 47 | public int getpTypeIds() { 48 | return pTypeIds; 49 | } 50 | public int getpFieldIds() { 51 | return pFieldIds; 52 | } 53 | public int getpMethodIds() { 54 | return pMethodIds; 55 | } 56 | public int getpProtoIds() { 57 | return pProtoIds; 58 | } 59 | public int getpClassDefs() { 60 | return pClassDefs; 61 | } 62 | 63 | public String toString(){ 64 | return "baseAddr:"+baseAddr+";pStringIds:"+pStringIds +";pTypeIds:"+pTypeIds+";pFieldIds:"+pFieldIds+";pMethodIds:"+pMethodIds+";pProtoIds:"+pProtoIds+";pClassDefs:"+pClassDefs; 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /app/src/main/java/com/cc/apptroy/smali/DexFileMethod.java: -------------------------------------------------------------------------------- 1 | package com.cc.apptroy.smali; 2 | 3 | /** 4 | * Created by CwT on 15/12/2. 5 | */ 6 | public class DexFileMethod { 7 | public int accessFlag; 8 | public int codeoffset; 9 | 10 | public int getAccessFlag(){ 11 | return accessFlag; 12 | } 13 | 14 | public int getCodeoffset() { 15 | return codeoffset; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/com/cc/apptroy/smali/DexOrJar.java: -------------------------------------------------------------------------------- 1 | package com.cc.apptroy.smali; 2 | 3 | /** 4 | * Created by CwT on 16/4/3. 5 | */ 6 | public class DexOrJar { 7 | 8 | int addr; 9 | String name; 10 | 11 | public DexOrJar(int addr, String name){ 12 | this.addr = addr; 13 | this.name = name; 14 | } 15 | 16 | public DexOrJar(){} 17 | 18 | public void setAddr(int addr) { 19 | this.addr = addr; 20 | } 21 | 22 | public void setName(String name) { 23 | this.name = name; 24 | } 25 | 26 | public int getAddr() { 27 | return addr; 28 | } 29 | 30 | public String getName() { 31 | return name; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/java/com/cc/apptroy/smali/EmptyClassdef.java: -------------------------------------------------------------------------------- 1 | package com.cc.apptroy.smali; 2 | 3 | import com.google.common.collect.ImmutableList; 4 | 5 | import org.cc.dexlib2.dexbacked.DexBackedClassDef; 6 | import org.cc.dexlib2.dexbacked.DexBackedDexFile; 7 | import org.cc.dexlib2.dexbacked.DexBackedField; 8 | import org.cc.dexlib2.dexbacked.DexBackedMethod; 9 | import org.cc.dexlib2.dexbacked.util.AnnotationsDirectory; 10 | 11 | import javax.annotation.Nonnull; 12 | 13 | /** 14 | * Created by CwT on 16/4/10. 15 | */ 16 | public class EmptyClassdef extends DexBackedClassDef { 17 | 18 | public EmptyClassdef(@Nonnull DexBackedDexFile dexFile) { 19 | super(dexFile); 20 | } 21 | 22 | @Nonnull 23 | public Iterable getStaticFields(final boolean skipDuplicates) { 24 | return ImmutableList.of(); 25 | } 26 | 27 | @Nonnull 28 | public Iterable getInstanceFields(final boolean skipDuplicates) { 29 | return ImmutableList.of(); 30 | } 31 | 32 | @Nonnull 33 | public Iterable getDirectMethods(final boolean skipDuplicates) { 34 | return ImmutableList.of(); 35 | } 36 | 37 | @Nonnull 38 | public Iterable getVirtualMethods(final boolean skipDuplicates) { 39 | return ImmutableList.of(); 40 | } 41 | 42 | private AnnotationsDirectory getAnnotationsDirectory() { 43 | return AnnotationsDirectory.EMPTY; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /app/src/main/java/com/cc/apptroy/util/Constant.java: -------------------------------------------------------------------------------- 1 | package com.cc.apptroy.util; 2 | 3 | public class Constant { 4 | 5 | public static String FILESAVEPATH = "XAndReverseTool"; 6 | 7 | } 8 | -------------------------------------------------------------------------------- /app/src/main/java/com/cc/apptroy/util/Logger.java: -------------------------------------------------------------------------------- 1 | package com.cc.apptroy.util; 2 | 3 | import android.system.Os; 4 | import android.util.Log; 5 | 6 | import com.cc.apptroy.ModuleContext; 7 | 8 | import java.io.BufferedWriter; 9 | import java.io.File; 10 | import java.io.FileNotFoundException; 11 | import java.io.FileOutputStream; 12 | import java.io.IOException; 13 | import java.io.OutputStreamWriter; 14 | 15 | public class Logger { 16 | 17 | public static String LOGTAG_COMMAN = "shell"; 18 | public static String LOGTAG_WORKFLOW = "apimonitor"; 19 | public static boolean DEBUG_ENABLE = true; 20 | public static int PID = android.os.Process.myPid(); 21 | 22 | public static void log(String message){ 23 | if(DEBUG_ENABLE) 24 | Log.d("cc", message); 25 | } 26 | 27 | public static void log_behavior(String message){ 28 | if(DEBUG_ENABLE) 29 | Log.d(LOGTAG_WORKFLOW + PID, message); 30 | } 31 | 32 | public static void log_file(String message) { 33 | log_file(message, "logger.log"); 34 | } 35 | 36 | public static void log_file(String message, String filename){ 37 | File file = new File(ModuleContext.getInstance().getAppContext().getFilesDir().getPath()+File.separator+filename); 38 | if (!file.exists()){ 39 | try { 40 | if (!file.createNewFile()) 41 | return; 42 | } catch (IOException e) { 43 | e.printStackTrace(); 44 | } 45 | } 46 | try { 47 | BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file, true))); 48 | out.write(message+"\n"); 49 | out.close(); 50 | } catch (FileNotFoundException e) { 51 | e.printStackTrace(); 52 | } catch (IOException e) { 53 | e.printStackTrace(); 54 | } 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /app/src/main/java/com/cc/apptroy/util/MethodLookaheadIterator.java: -------------------------------------------------------------------------------- 1 | package com.cc.apptroy.util; 2 | 3 | import com.google.common.collect.AbstractIterator; 4 | 5 | import org.cc.dexlib2.dexbacked.DexBackedDexFile; 6 | 7 | import java.lang.reflect.Method; 8 | import java.util.Iterator; 9 | 10 | import javax.annotation.Nonnull; 11 | import javax.annotation.Nullable; 12 | 13 | /** 14 | * Created by CwT on 15/12/3. 15 | */ 16 | public abstract class MethodLookaheadIterator extends AbstractIterator implements Iterator{ 17 | 18 | @Nonnull private final DexBackedDexFile dexfile; 19 | private final Method[] methods; 20 | private int index = 0; 21 | 22 | public MethodLookaheadIterator(@Nonnull DexBackedDexFile dexFile, Method[] methods){ 23 | this.dexfile = dexFile; 24 | this.methods = methods; 25 | } 26 | 27 | @Nullable 28 | protected abstract T readNextItem(@Nonnull DexBackedDexFile dexFile, @Nonnull Method method); 29 | 30 | @Override 31 | protected T computeNext() { 32 | return readNextItem(this.dexfile, methods[index++]); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/com/cc/apptroy/util/Oncreatehook.java: -------------------------------------------------------------------------------- 1 | package com.cc.apptroy.util; 2 | 3 | import android.app.Application; 4 | import android.content.IntentFilter; 5 | import android.util.Log; 6 | 7 | import com.cc.apptroy.CommandBroadcastReceiver; 8 | import com.cc.apptroy.ModuleContext; 9 | 10 | import de.robv.android.xposed.XC_MethodHook; 11 | 12 | /** 13 | * Created by CwT on 15/12/6. 14 | */ 15 | public class Oncreatehook extends XC_MethodHook { 16 | 17 | @Override 18 | protected void afterHookedMethod(MethodHookParam param) throws Throwable { 19 | Log.d("cc", "after, register receiver"); 20 | if (!ModuleContext.HAS_REGISTER_LISENER) { 21 | Application firstApplication = (Application) param.thisObject; 22 | IntentFilter filter = new IntentFilter(CommandBroadcastReceiver.INTENT_ACTION); 23 | firstApplication.registerReceiver(new CommandBroadcastReceiver(), filter); 24 | ModuleContext.HAS_REGISTER_LISENER = true; 25 | ModuleContext.getInstance().setFirstApplication(firstApplication); 26 | Log.d("cc", "register over"); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/java/javax/annotation/CheckForNull.java: -------------------------------------------------------------------------------- 1 | package javax.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | 7 | import javax.annotation.meta.TypeQualifierNickname; 8 | import javax.annotation.meta.When; 9 | 10 | @Documented 11 | @TypeQualifierNickname 12 | @Nonnull(when = When.MAYBE) 13 | @Retention(RetentionPolicy.RUNTIME) 14 | public @interface CheckForNull { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/javax/annotation/CheckForSigned.java: -------------------------------------------------------------------------------- 1 | package javax.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | 7 | import javax.annotation.meta.TypeQualifierNickname; 8 | import javax.annotation.meta.When; 9 | 10 | /** 11 | * Used to annotate a value that may be either negative or nonnegative, and 12 | * indicates that uses of it should check for 13 | * negative values before using it in a way that requires the value to be 14 | * nonnegative, and check for it being nonnegative before using it in a way that 15 | * requires it to be negative. 16 | */ 17 | 18 | @Documented 19 | @TypeQualifierNickname 20 | @Nonnegative(when = When.MAYBE) 21 | @Retention(RetentionPolicy.RUNTIME) 22 | public @interface CheckForSigned { 23 | 24 | } 25 | -------------------------------------------------------------------------------- /app/src/main/java/javax/annotation/CheckReturnValue.java: -------------------------------------------------------------------------------- 1 | package javax.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | import javax.annotation.meta.When; 10 | 11 | @Documented 12 | @Target( { ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.TYPE, 13 | ElementType.PACKAGE }) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | public @interface CheckReturnValue { 16 | When when() default When.ALWAYS; 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/javax/annotation/Detainted.java: -------------------------------------------------------------------------------- 1 | package javax.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | 7 | import javax.annotation.meta.TypeQualifierNickname; 8 | import javax.annotation.meta.When; 9 | 10 | @Documented 11 | @TypeQualifierNickname 12 | @Untainted(when = When.ALWAYS) 13 | @Retention(RetentionPolicy.RUNTIME) 14 | public @interface Detainted { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/javax/annotation/MatchesPattern.java: -------------------------------------------------------------------------------- 1 | package javax.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.util.regex.Pattern; 7 | 8 | import javax.annotation.meta.TypeQualifier; 9 | import javax.annotation.meta.TypeQualifierValidator; 10 | import javax.annotation.meta.When; 11 | 12 | @Documented 13 | @TypeQualifier(applicableTo = String.class) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | public @interface MatchesPattern { 16 | @RegEx 17 | String value(); 18 | 19 | int flags() default 0; 20 | 21 | static class Checker implements TypeQualifierValidator { 22 | public When forConstantValue(MatchesPattern annotation, Object value) { 23 | Pattern p = Pattern.compile(annotation.value(), annotation.flags()); 24 | if (p.matcher(((String) value)).matches()) 25 | return When.ALWAYS; 26 | return When.NEVER; 27 | } 28 | 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/javax/annotation/Nonnegative.java: -------------------------------------------------------------------------------- 1 | package javax.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | 7 | import javax.annotation.meta.TypeQualifier; 8 | import javax.annotation.meta.TypeQualifierValidator; 9 | import javax.annotation.meta.When; 10 | 11 | /** Used to annotate a value that should only contain nonnegative values */ 12 | @Documented 13 | @TypeQualifier(applicableTo = Number.class) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | public @interface Nonnegative { 16 | When when() default When.ALWAYS; 17 | 18 | class Checker implements TypeQualifierValidator { 19 | 20 | public When forConstantValue(Nonnegative annotation, Object v) { 21 | if (!(v instanceof Number)) 22 | return When.NEVER; 23 | boolean isNegative; 24 | Number value = (Number) v; 25 | if (value instanceof Long) 26 | isNegative = value.longValue() < 0; 27 | else if (value instanceof Double) 28 | isNegative = value.doubleValue() < 0; 29 | else if (value instanceof Float) 30 | isNegative = value.floatValue() < 0; 31 | else 32 | isNegative = value.intValue() < 0; 33 | 34 | if (isNegative) 35 | return When.NEVER; 36 | else 37 | return When.ALWAYS; 38 | 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/java/javax/annotation/Nonnull.java: -------------------------------------------------------------------------------- 1 | package javax.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | 7 | import javax.annotation.meta.TypeQualifier; 8 | import javax.annotation.meta.TypeQualifierValidator; 9 | import javax.annotation.meta.When; 10 | 11 | @Documented 12 | @TypeQualifier 13 | @Retention(RetentionPolicy.RUNTIME) 14 | public @interface Nonnull { 15 | When when() default When.ALWAYS; 16 | 17 | static class Checker implements TypeQualifierValidator { 18 | 19 | public When forConstantValue(Nonnull qualifierqualifierArgument, 20 | Object value) { 21 | if (value == null) 22 | return When.NEVER; 23 | return When.ALWAYS; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/java/javax/annotation/Nullable.java: -------------------------------------------------------------------------------- 1 | package javax.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | 7 | import javax.annotation.meta.TypeQualifierNickname; 8 | import javax.annotation.meta.When; 9 | 10 | @Documented 11 | @TypeQualifierNickname 12 | @Nonnull(when = When.UNKNOWN) 13 | @Retention(RetentionPolicy.RUNTIME) 14 | public @interface Nullable { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/javax/annotation/OverridingMethodsMustInvokeSuper.java: -------------------------------------------------------------------------------- 1 | package javax.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * When this annotation is applied to a method, it indicates that if this method 11 | * is overridden in a subclass, the overriding method should invoke this method 12 | * (through method invocation on super). 13 | * 14 | */ 15 | @Documented 16 | @Target( { ElementType.METHOD }) 17 | @Retention(RetentionPolicy.RUNTIME) 18 | public @interface OverridingMethodsMustInvokeSuper { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/javax/annotation/ParametersAreNonnullByDefault.java: -------------------------------------------------------------------------------- 1 | package javax.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | 8 | import javax.annotation.meta.TypeQualifierDefault; 9 | 10 | /** 11 | * This annotation can be applied to a package, class or method to indicate that 12 | * the method parameters in that element are nonnull by default unless there is: 13 | *
    14 | *
  • An explicit nullness annotation 15 | *
  • The method overrides a method in a superclass (in which case the 16 | * annotation of the corresponding parameter in the superclass applies) 17 | *
  • there is a default parameter annotation applied to a more tightly nested 18 | * element. 19 | *
20 | * 21 | */ 22 | @Documented 23 | @Nonnull 24 | @TypeQualifierDefault(ElementType.PARAMETER) 25 | @Retention(RetentionPolicy.RUNTIME) 26 | public @interface ParametersAreNonnullByDefault { 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/java/javax/annotation/ParametersAreNullableByDefault.java: -------------------------------------------------------------------------------- 1 | package javax.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | 8 | import javax.annotation.meta.TypeQualifierDefault; 9 | 10 | /** 11 | * This annotation can be applied to a package, class or method to indicate that 12 | * the method parameters in that element are nullable by default unless there is: 13 | *
    14 | *
  • An explicit nullness annotation 15 | *
  • The method overrides a method in a superclass (in which case the 16 | * annotation of the corresponding parameter in the superclass applies) 17 | *
  • there is a default parameter annotation applied to a more tightly nested 18 | * element. 19 | *
20 | *

This annotation implies the same "nullness" as no annotation. However, it is different 21 | * than having no annotation, as it is inherited and it can override a ParametersAreNonnullByDefault 22 | * annotation at an outer scope. 23 | * 24 | */ 25 | @Documented 26 | @Nullable 27 | @TypeQualifierDefault(ElementType.PARAMETER) 28 | @Retention(RetentionPolicy.RUNTIME) 29 | public @interface ParametersAreNullableByDefault { 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/javax/annotation/PropertyKey.java: -------------------------------------------------------------------------------- 1 | package javax.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | 7 | import javax.annotation.meta.TypeQualifier; 8 | import javax.annotation.meta.When; 9 | 10 | @Documented 11 | @TypeQualifier 12 | @Retention(RetentionPolicy.RUNTIME) 13 | public @interface PropertyKey { 14 | When when() default When.ALWAYS; 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/java/javax/annotation/RegEx.java: -------------------------------------------------------------------------------- 1 | package javax.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.util.regex.Pattern; 7 | import java.util.regex.PatternSyntaxException; 8 | 9 | import javax.annotation.meta.TypeQualifierNickname; 10 | import javax.annotation.meta.TypeQualifierValidator; 11 | import javax.annotation.meta.When; 12 | 13 | /** 14 | * This qualifier is used to denote String values that should be a Regular 15 | * expression. 16 | * 17 | */ 18 | @Documented 19 | @Syntax("RegEx") 20 | @TypeQualifierNickname 21 | @Retention(RetentionPolicy.RUNTIME) 22 | public @interface RegEx { 23 | When when() default When.ALWAYS; 24 | 25 | static class Checker implements TypeQualifierValidator { 26 | 27 | public When forConstantValue(RegEx annotation, Object value) { 28 | if (!(value instanceof String)) 29 | return When.NEVER; 30 | 31 | try { 32 | Pattern.compile((String) value); 33 | } catch (PatternSyntaxException e) { 34 | return When.NEVER; 35 | } 36 | return When.ALWAYS; 37 | 38 | } 39 | 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /app/src/main/java/javax/annotation/Signed.java: -------------------------------------------------------------------------------- 1 | package javax.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | 7 | import javax.annotation.meta.TypeQualifierNickname; 8 | import javax.annotation.meta.When; 9 | 10 | /** Used to annotate a value of unknown sign */ 11 | 12 | @Documented 13 | @TypeQualifierNickname 14 | @Nonnegative(when = When.UNKNOWN) 15 | @Retention(RetentionPolicy.RUNTIME) 16 | public @interface Signed { 17 | 18 | } 19 | -------------------------------------------------------------------------------- /app/src/main/java/javax/annotation/Syntax.java: -------------------------------------------------------------------------------- 1 | package javax.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | 7 | import javax.annotation.meta.TypeQualifier; 8 | import javax.annotation.meta.When; 9 | 10 | /** 11 | * This annotation a value that is of a particular syntax, such as Java syntax 12 | * or regular expression syntax. This can be used to provide syntax checking of 13 | * constant values at compile time, run time checking at runtime, and can assist 14 | * IDEs in deciding how to interpret String constants (e.g., should a 15 | * refactoring that renames method x() to y() update the String constant "x()"). 16 | * 17 | * 18 | */ 19 | @Documented 20 | @TypeQualifier(applicableTo = CharSequence.class) 21 | @Retention(RetentionPolicy.RUNTIME) 22 | public @interface Syntax { 23 | /** 24 | * Value indicating the particular syntax denoted by this annotation. 25 | * Different tools will recognize different syntaxes, but some proposed 26 | * canonical values are: 27 | *

    28 | *
  • "Java" 29 | *
  • "RegEx" 30 | *
  • "JavaScript" 31 | *
  • "Ruby" 32 | *
  • "Groovy" 33 | *
  • "SQL" 34 | *
  • "FormatString" 35 | *
36 | * 37 | * Syntax names can be followed by a colon and a list of key value pairs, 38 | * separated by commas. For example, "SQL:dialect=Oracle,version=2.3". Tools 39 | * should ignore any keys they don't recognize. 40 | */ 41 | String value(); 42 | 43 | When when() default When.ALWAYS; 44 | } 45 | -------------------------------------------------------------------------------- /app/src/main/java/javax/annotation/Tainted.java: -------------------------------------------------------------------------------- 1 | package javax.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | 7 | import javax.annotation.meta.TypeQualifierNickname; 8 | import javax.annotation.meta.When; 9 | 10 | @Documented 11 | @TypeQualifierNickname 12 | @Untainted(when = When.MAYBE) 13 | @Retention(RetentionPolicy.RUNTIME) 14 | public @interface Tainted { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/javax/annotation/Untainted.java: -------------------------------------------------------------------------------- 1 | package javax.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | 7 | import javax.annotation.meta.TypeQualifier; 8 | import javax.annotation.meta.When; 9 | 10 | @Documented 11 | @TypeQualifier 12 | @Retention(RetentionPolicy.RUNTIME) 13 | public @interface Untainted { 14 | When when() default When.ALWAYS; 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/java/javax/annotation/WillClose.java: -------------------------------------------------------------------------------- 1 | package javax.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | 7 | @Documented 8 | @Retention(RetentionPolicy.RUNTIME) 9 | /** 10 | * Used to annotate a method parameter to indicate that this method will close 11 | * the resource. 12 | */ 13 | public @interface WillClose { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/java/javax/annotation/WillCloseWhenClosed.java: -------------------------------------------------------------------------------- 1 | package javax.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | 7 | @Documented 8 | @Retention(RetentionPolicy.RUNTIME) 9 | /** 10 | * Used to annotate a constructor/factory parameter to indicate that returned 11 | * object (X) will close the resource when X is closed. 12 | */ 13 | public @interface WillCloseWhenClosed { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/java/javax/annotation/WillNotClose.java: -------------------------------------------------------------------------------- 1 | package javax.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | 7 | @Documented 8 | @Retention(RetentionPolicy.RUNTIME) 9 | /** 10 | * Used to annotate a method parameter to indicate that this method will not 11 | * close the resource. 12 | */ 13 | public @interface WillNotClose { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/java/javax/annotation/concurrent/GuardedBy.java: -------------------------------------------------------------------------------- 1 | package javax.annotation.concurrent; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | /* 9 | * Copyright (c) 2005 Brian Goetz 10 | * Released under the Creative Commons Attribution License 11 | * (http://creativecommons.org/licenses/by/2.5) 12 | * Official home: http://www.jcip.net 13 | */ 14 | 15 | /** 16 | * GuardedBy 17 | * 18 | * The field or method to which this annotation is applied can only be accessed 19 | * when holding a particular lock, which may be a built-in (synchronization) 20 | * lock, or may be an explicit java.util.concurrent.Lock. 21 | * 22 | * The argument determines which lock guards the annotated field or method: this : 23 | * The string literal "this" means that this field is guarded by the class in 24 | * which it is defined. class-name.this : For inner classes, it may be necessary 25 | * to disambiguate 'this'; the class-name.this designation allows you to specify 26 | * which 'this' reference is intended itself : For reference fields only; the 27 | * object to which the field refers. field-name : The lock object is referenced 28 | * by the (instance or static) field specified by field-name. 29 | * class-name.field-name : The lock object is reference by the static field 30 | * specified by class-name.field-name. method-name() : The lock object is 31 | * returned by calling the named nil-ary method. class-name.class : The Class 32 | * object for the specified class should be used as the lock object. 33 | */ 34 | @Target( { ElementType.FIELD, ElementType.METHOD }) 35 | @Retention(RetentionPolicy.CLASS) 36 | public @interface GuardedBy { 37 | String value(); 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/javax/annotation/concurrent/Immutable.java: -------------------------------------------------------------------------------- 1 | package javax.annotation.concurrent; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /* 10 | * Copyright (c) 2005 Brian Goetz 11 | * Released under the Creative Commons Attribution License 12 | * (http://creativecommons.org/licenses/by/2.5) 13 | * Official home: http://www.jcip.net 14 | */ 15 | 16 | /** 17 | * Immutable 18 | * 19 | * The class to which this annotation is applied is immutable. This means that 20 | * its state cannot be seen to change by callers. Of necessity this means that 21 | * all public fields are final, and that all public final reference fields refer 22 | * to other immutable objects, and that methods do not publish references to any 23 | * internal state which is mutable by implementation even if not by design. 24 | * Immutable objects may still have internal mutable state for purposes of 25 | * performance optimization; some state variables may be lazily computed, so 26 | * long as they are computed from immutable state and that callers cannot tell 27 | * the difference. 28 | * 29 | * Immutable objects are inherently thread-safe; they may be passed between 30 | * threads or published without synchronization. 31 | */ 32 | @Documented 33 | @Target(ElementType.TYPE) 34 | @Retention(RetentionPolicy.CLASS) 35 | public @interface Immutable { 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/javax/annotation/concurrent/NotThreadSafe.java: -------------------------------------------------------------------------------- 1 | package javax.annotation.concurrent; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /* 10 | * Copyright (c) 2005 Brian Goetz 11 | * Released under the Creative Commons Attribution License 12 | * (http://creativecommons.org/licenses/by/2.5) 13 | * Official home: http://www.jcip.net 14 | */ 15 | 16 | /** 17 | * NotThreadSafe 18 | * 19 | * The class to which this annotation is applied is not thread-safe. This 20 | * annotation primarily exists for clarifying the non-thread-safety of a class 21 | * that might otherwise be assumed to be thread-safe, despite the fact that it 22 | * is a bad idea to assume a class is thread-safe without good reason. 23 | * 24 | * @see ThreadSafe 25 | */ 26 | @Documented 27 | @Target(ElementType.TYPE) 28 | @Retention(RetentionPolicy.CLASS) 29 | public @interface NotThreadSafe { 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/javax/annotation/concurrent/ThreadSafe.java: -------------------------------------------------------------------------------- 1 | package javax.annotation.concurrent; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * ThreadSafe 11 | * 12 | * The class to which this annotation is applied is thread-safe. This means that 13 | * no sequences of accesses (reads and writes to public fields, calls to public 14 | * methods) may put the object into an invalid state, regardless of the 15 | * interleaving of those actions by the runtime, and without requiring any 16 | * additional synchronization or coordination on the part of the caller. 17 | */ 18 | @Documented 19 | @Target(ElementType.TYPE) 20 | @Retention(RetentionPolicy.CLASS) 21 | public @interface ThreadSafe { 22 | } 23 | -------------------------------------------------------------------------------- /app/src/main/java/javax/annotation/meta/Exclusive.java: -------------------------------------------------------------------------------- 1 | package javax.annotation.meta; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | 7 | /** 8 | * This annotation can be applied to the value() element of an annotation that 9 | * is annotated as a TypeQualifier. 10 | * 11 | * For example, the following defines a type qualifier such that if you know a 12 | * value is {@literal @Foo(1)}, then the value cannot be {@literal @Foo(2)} or {{@literal @Foo(3)}. 13 | * 14 | * 15 | * @TypeQualifier @interface Foo { 16 | * @Exclusive int value(); 17 | * } 18 | * 19 | * 20 | */ 21 | 22 | @Documented 23 | @Retention(RetentionPolicy.RUNTIME) 24 | public @interface Exclusive { 25 | 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/java/javax/annotation/meta/Exhaustive.java: -------------------------------------------------------------------------------- 1 | package javax.annotation.meta; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | 7 | /** 8 | * This annotation can be applied to the value() element of an annotation that 9 | * is annotated as a TypeQualifier. This is only appropriate if the value field 10 | * returns a value that is an Enumeration. 11 | * 12 | * Applications of the type qualifier with different values are exclusive, and 13 | * the enumeration is an exhaustive list of the possible values. 14 | * 15 | * For example, the following defines a type qualifier such that if you know a 16 | * value is neither {@literal @Foo(Color.Red)} or {@literal @Foo(Color.Blue)}, 17 | * then the value must be {@literal @Foo(Color.Green)}. And if you know it is 18 | * {@literal @Foo(Color.Green)}, you know it cannot be 19 | * {@literal @Foo(Color.Red)} or {@literal @Foo(Color.Blue)} 20 | * 21 | * 22 | * @TypeQualifier @interface Foo { 23 | * enum Color {RED, BLUE, GREEN}; 24 | * @Exhaustive Color value(); 25 | * } 26 | * 27 | */ 28 | 29 | @Documented 30 | @Retention(RetentionPolicy.RUNTIME) 31 | public @interface Exhaustive { 32 | 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/java/javax/annotation/meta/TypeQualifier.java: -------------------------------------------------------------------------------- 1 | package javax.annotation.meta; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * This qualifier is applied to an annotation to denote that the annotation 11 | * should be treated as a type qualifier. 12 | */ 13 | 14 | @Documented 15 | @Target(ElementType.ANNOTATION_TYPE) 16 | @Retention(RetentionPolicy.RUNTIME) 17 | public @interface TypeQualifier { 18 | 19 | /** 20 | * Describes the kinds of values the qualifier can be applied to. If a 21 | * numeric class is provided (e.g., Number.class or Integer.class) then the 22 | * annotation can also be applied to the corresponding primitive numeric 23 | * types. 24 | */ 25 | Class applicableTo() default Object.class; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/java/javax/annotation/meta/TypeQualifierDefault.java: -------------------------------------------------------------------------------- 1 | package javax.annotation.meta; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * This qualifier is applied to an annotation to denote that the annotation 11 | * defines a default type qualifier that is visible within the scope of the 12 | * element it is applied to. 13 | */ 14 | 15 | @Documented 16 | @Target(ElementType.ANNOTATION_TYPE) 17 | @Retention(RetentionPolicy.RUNTIME) 18 | public @interface TypeQualifierDefault { 19 | ElementType[] value() default {}; 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/javax/annotation/meta/TypeQualifierNickname.java: -------------------------------------------------------------------------------- 1 | package javax.annotation.meta; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Target; 6 | 7 | /** 8 | * 9 | * This annotation is applied to a annotation, and marks the annotation as being 10 | * a qualifier nickname. Applying a nickname annotation X to a element Y should 11 | * be interpreted as having the same meaning as applying all of annotations of X 12 | * (other than QualifierNickname) to Y. 13 | * 14 | *

15 | * Thus, you might define a qualifier SocialSecurityNumber as follows: 16 | *

17 | * 18 | * 19 | * 20 | @Documented 21 | @TypeQualifierNickname @Pattern("[0-9]{3}-[0-9]{2}-[0-9]{4}") 22 | @Retention(RetentionPolicy.RUNTIME) 23 | public @interface SocialSecurityNumber { 24 | } 25 | 26 | * 27 | * 28 | */ 29 | @Documented 30 | @Target(ElementType.ANNOTATION_TYPE) 31 | public @interface TypeQualifierNickname { 32 | 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/java/javax/annotation/meta/TypeQualifierValidator.java: -------------------------------------------------------------------------------- 1 | package javax.annotation.meta; 2 | 3 | import java.lang.annotation.Annotation; 4 | 5 | import javax.annotation.Nonnull; 6 | 7 | public interface TypeQualifierValidator { 8 | /** 9 | * Given a type qualifier, check to see if a known specific constant value 10 | * is an instance of the set of values denoted by the qualifier. 11 | * 12 | * @param annotation 13 | * the type qualifier 14 | * @param value 15 | * the value to check 16 | * @return a value indicating whether or not the value is an member of the 17 | * values denoted by the type qualifier 18 | */ 19 | public @Nonnull 20 | When forConstantValue(@Nonnull A annotation, Object value); 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/java/javax/annotation/meta/When.java: -------------------------------------------------------------------------------- 1 | package javax.annotation.meta; 2 | 3 | /** 4 | * Used to describe the relationship between a qualifier T and the set of values 5 | * S possible on an annotated element. 6 | * 7 | * In particular, an issues should be reported if an ALWAYS or MAYBE value is 8 | * used where a NEVER value is required, or if a NEVER or MAYBE value is used 9 | * where an ALWAYS value is required. 10 | * 11 | * 12 | */ 13 | public enum When { 14 | /** S is a subset of T */ 15 | ALWAYS, 16 | /** nothing definitive is known about the relation between S and T */ 17 | UNKNOWN, 18 | /** S intersection T is non empty and S - T is nonempty */ 19 | MAYBE, 20 | /** S intersection T is empty */ 21 | NEVER; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/builder/instruction/BuilderSwitchElement.java: -------------------------------------------------------------------------------- 1 | package org.cc.dexlib2.builder.instruction; 2 | 3 | import org.cc.dexlib2.builder.BuilderSwitchPayload; 4 | import org.cc.dexlib2.builder.Label; 5 | import org.cc.dexlib2.iface.instruction.SwitchElement; 6 | 7 | import javax.annotation.Nonnull; 8 | 9 | public class BuilderSwitchElement implements SwitchElement { 10 | @Nonnull BuilderSwitchPayload parent; 11 | private final int key; 12 | @Nonnull private final Label target; 13 | 14 | public BuilderSwitchElement(@Nonnull BuilderSwitchPayload parent, 15 | int key, 16 | @Nonnull Label target) { 17 | this.parent = parent; 18 | this.key = key; 19 | this.target = target; 20 | } 21 | 22 | @Override public int getKey() { 23 | return key; 24 | } 25 | 26 | @Override public int getOffset() { 27 | return target.getCodeAddress() - parent.getReferrer().getCodeAddress(); 28 | } 29 | 30 | @Nonnull 31 | public Label getTarget() { 32 | return target; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/dexbacked/DexBackedExceptionHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.dexbacked; 33 | 34 | import org.cc.dexlib2.base.BaseExceptionHandler; 35 | 36 | public abstract class DexBackedExceptionHandler extends BaseExceptionHandler { 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/dexbacked/DexReader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.dexbacked; 33 | 34 | import javax.annotation.Nonnull; 35 | 36 | public class DexReader extends BaseDexReader { 37 | public DexReader(@Nonnull DexBackedDexFile dexFile, int offset) { 38 | super(dexFile, offset); 39 | } 40 | } -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/dexbacked/MemoryDexFileItemPointer.java: -------------------------------------------------------------------------------- 1 | package org.cc.dexlib2.dexbacked; 2 | 3 | public class MemoryDexFileItemPointer { 4 | 5 | private int baseAddr; 6 | private int pStringIds; 7 | private int pTypeIds; 8 | private int pFieldIds; 9 | private int pMethodIds; 10 | private int pProtoIds; 11 | private int pClassDefs; 12 | private int classCount; 13 | 14 | 15 | 16 | public int getClassCount() { 17 | return classCount; 18 | } 19 | public void setClassCount(int classCount) { 20 | this.classCount = classCount; 21 | } 22 | public void setBaseAddr(int baseAddr) { 23 | this.baseAddr = baseAddr; 24 | } 25 | public void setpStringIds(int pStringIds) { 26 | this.pStringIds = pStringIds; 27 | } 28 | public void setpTypeIds(int pTypeIds) { 29 | this.pTypeIds = pTypeIds; 30 | } 31 | public void setpFieldIds(int pFieldIds) { 32 | this.pFieldIds = pFieldIds; 33 | } 34 | public void setpMethodIds(int pMethodIds) { 35 | this.pMethodIds = pMethodIds; 36 | } 37 | public void setpProtoIds(int pProtoIds) { 38 | this.pProtoIds = pProtoIds; 39 | } 40 | public void setpClassDefs(int pClassDefs) { 41 | this.pClassDefs = pClassDefs; 42 | } 43 | public int getBaseAddr() { 44 | return baseAddr; 45 | } 46 | public int getpStringIds() { 47 | return pStringIds; 48 | } 49 | public int getpTypeIds() { 50 | return pTypeIds; 51 | } 52 | public int getpFieldIds() { 53 | return pFieldIds; 54 | } 55 | public int getpMethodIds() { 56 | return pMethodIds; 57 | } 58 | public int getpProtoIds() { 59 | return pProtoIds; 60 | } 61 | public int getpClassDefs() { 62 | return pClassDefs; 63 | } 64 | 65 | public String toString(){ 66 | return "baseAddr:"+baseAddr+";pStringIds:"+pStringIds +";pTypeIds:"+pTypeIds+ 67 | ";pFieldIds:"+pFieldIds+";pMethodIds:"+pMethodIds+";pProtoIds:"+pProtoIds+ 68 | ";pClassDefs:"+pClassDefs+";classCount:"+classCount; 69 | } 70 | 71 | } 72 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/dexbacked/MemoryReader.java: -------------------------------------------------------------------------------- 1 | package org.cc.dexlib2.dexbacked; 2 | 3 | public interface MemoryReader { 4 | 5 | public byte[] readBytes(int start, int lenght); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/BasicAnnotation.java: -------------------------------------------------------------------------------- 1 | package org.cc.dexlib2.iface; 2 | 3 | import javax.annotation.Nonnull; 4 | import java.util.Set; 5 | 6 | /** 7 | * This represents a basic annotation, and serves as a common superclass for Annotation and AnnotationEncodedValue 8 | */ 9 | public interface BasicAnnotation { 10 | /** 11 | * Gets the type of this annotation. 12 | * 13 | * This will be the type descriptor of the class that defines this annotation. 14 | * 15 | * @return The type of this annotation 16 | */ 17 | @Nonnull String getType(); 18 | 19 | /** 20 | * Gets a set of the name/value elements associated with this annotation. 21 | * 22 | * The elements in the returned set will be unique with respect to the element name. 23 | * 24 | * @return A set of AnnotationElements 25 | */ 26 | @Nonnull Set getElements(); 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/debug/EndLocal.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.iface.debug; 33 | 34 | public interface EndLocal extends DebugItem, LocalInfo { 35 | int getRegister(); 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/debug/EpilogueBegin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.iface.debug; 33 | 34 | public interface EpilogueBegin extends DebugItem { 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/debug/LocalInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.iface.debug; 33 | 34 | import javax.annotation.Nullable; 35 | 36 | public interface LocalInfo { 37 | @Nullable String getName(); 38 | @Nullable String getType(); 39 | @Nullable String getSignature(); 40 | } 41 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/debug/PrologueEnd.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.iface.debug; 33 | 34 | public interface PrologueEnd extends DebugItem { 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/debug/RestartLocal.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.iface.debug; 33 | 34 | public interface RestartLocal extends DebugItem, LocalInfo { 35 | int getRegister(); 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/debug/SetSourceFile.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.iface.debug; 33 | 34 | import org.cc.dexlib2.iface.reference.StringReference; 35 | 36 | import javax.annotation.Nullable; 37 | 38 | public interface SetSourceFile extends DebugItem { 39 | @Nullable String getSourceFile(); 40 | @Nullable StringReference getSourceFileReference(); 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/instruction/FieldOffsetInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013, 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.cc.dexlib2.iface.instruction; 33 | 34 | public interface FieldOffsetInstruction extends Instruction { 35 | int getFieldOffset(); 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/instruction/FiveRegisterInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.iface.instruction; 33 | 34 | public interface FiveRegisterInstruction extends VariableRegisterInstruction { 35 | int getRegisterC(); 36 | int getRegisterD(); 37 | int getRegisterE(); 38 | int getRegisterF(); 39 | int getRegisterG(); 40 | } 41 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/instruction/HatLiteralInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.iface.instruction; 33 | 34 | public interface HatLiteralInstruction extends Instruction { 35 | /** 36 | * @return the high order 16 bits of the literal, as a short value 37 | */ 38 | short getHatLiteral(); 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/instruction/InlineIndexInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013, 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.cc.dexlib2.iface.instruction; 33 | 34 | public interface InlineIndexInstruction extends Instruction { 35 | int getInlineIndex(); 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/instruction/LongHatLiteralInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.iface.instruction; 33 | 34 | public interface LongHatLiteralInstruction extends WideLiteralInstruction, HatLiteralInstruction { 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/instruction/NarrowHatLiteralInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.iface.instruction; 33 | 34 | public interface NarrowHatLiteralInstruction extends HatLiteralInstruction, NarrowLiteralInstruction { 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/instruction/NarrowLiteralInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.iface.instruction; 33 | 34 | public interface NarrowLiteralInstruction extends WideLiteralInstruction { 35 | int getNarrowLiteral(); 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/instruction/OffsetInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.iface.instruction; 33 | 34 | public interface OffsetInstruction extends Instruction { 35 | int getCodeOffset(); 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/instruction/OneRegisterInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.iface.instruction; 33 | 34 | public interface OneRegisterInstruction extends Instruction { 35 | int getRegisterA(); 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/instruction/PayloadInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.iface.instruction; 33 | 34 | /** 35 | * Empty marker interface for the switch/array payload instructions 36 | */ 37 | public interface PayloadInstruction extends Instruction { 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/instruction/ReferenceInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.iface.instruction; 33 | 34 | import org.cc.dexlib2.iface.reference.Reference; 35 | 36 | import javax.annotation.Nonnull; 37 | 38 | public interface ReferenceInstruction extends Instruction { 39 | @Nonnull Reference getReference(); 40 | int getReferenceType(); 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/instruction/RegisterRangeInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.iface.instruction; 33 | 34 | public interface RegisterRangeInstruction extends VariableRegisterInstruction { 35 | int getStartRegister(); 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/instruction/SwitchElement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.iface.instruction; 33 | 34 | public interface SwitchElement { 35 | public int getKey(); 36 | public int getOffset(); 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/instruction/SwitchPayload.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.iface.instruction; 33 | 34 | import javax.annotation.Nonnull; 35 | import java.util.List; 36 | 37 | public interface SwitchPayload extends PayloadInstruction { 38 | @Nonnull List getSwitchElements(); 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/instruction/ThreeRegisterInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.iface.instruction; 33 | 34 | public interface ThreeRegisterInstruction extends TwoRegisterInstruction { 35 | int getRegisterC(); 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/instruction/TwoRegisterInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.iface.instruction; 33 | 34 | public interface TwoRegisterInstruction extends OneRegisterInstruction { 35 | int getRegisterB(); 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/instruction/VariableRegisterInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013, 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.cc.dexlib2.iface.instruction; 33 | 34 | public interface VariableRegisterInstruction extends Instruction { 35 | int getRegisterCount(); 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/instruction/VerificationErrorInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013, 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.cc.dexlib2.iface.instruction; 33 | 34 | public interface VerificationErrorInstruction extends Instruction { 35 | int getVerificationError(); 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/instruction/VtableIndexInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013, 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.cc.dexlib2.iface.instruction; 33 | 34 | public interface VtableIndexInstruction extends Instruction { 35 | int getVtableIndex(); 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/instruction/WideLiteralInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.iface.instruction; 33 | 34 | public interface WideLiteralInstruction extends Instruction { 35 | long getWideLiteral(); 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/instruction/formats/Instruction10t.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.iface.instruction.formats; 33 | 34 | import org.cc.dexlib2.iface.instruction.OffsetInstruction; 35 | 36 | public interface Instruction10t extends OffsetInstruction { 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/instruction/formats/Instruction10x.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.iface.instruction.formats; 33 | 34 | import org.cc.dexlib2.iface.instruction.Instruction; 35 | 36 | public interface Instruction10x extends Instruction { 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/instruction/formats/Instruction11x.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.iface.instruction.formats; 33 | 34 | import org.cc.dexlib2.iface.instruction.OneRegisterInstruction; 35 | 36 | public interface Instruction11x extends OneRegisterInstruction { 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/instruction/formats/Instruction12x.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.iface.instruction.formats; 33 | 34 | import org.cc.dexlib2.iface.instruction.TwoRegisterInstruction; 35 | 36 | public interface Instruction12x extends TwoRegisterInstruction { 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/instruction/formats/Instruction20t.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.iface.instruction.formats; 33 | 34 | import org.cc.dexlib2.iface.instruction.OffsetInstruction; 35 | 36 | public interface Instruction20t extends OffsetInstruction { 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/instruction/formats/Instruction21c.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.iface.instruction.formats; 33 | 34 | import org.cc.dexlib2.iface.instruction.OneRegisterInstruction; 35 | import org.cc.dexlib2.iface.instruction.ReferenceInstruction; 36 | 37 | public interface Instruction21c extends OneRegisterInstruction, ReferenceInstruction { 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/instruction/formats/Instruction21t.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.iface.instruction.formats; 33 | 34 | import org.cc.dexlib2.iface.instruction.OffsetInstruction; 35 | import org.cc.dexlib2.iface.instruction.OneRegisterInstruction; 36 | 37 | public interface Instruction21t extends OneRegisterInstruction, OffsetInstruction { 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/instruction/formats/Instruction22c.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.iface.instruction.formats; 33 | 34 | import org.cc.dexlib2.iface.instruction.ReferenceInstruction; 35 | import org.cc.dexlib2.iface.instruction.TwoRegisterInstruction; 36 | 37 | public interface Instruction22c extends TwoRegisterInstruction, ReferenceInstruction { 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/instruction/formats/Instruction22t.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.iface.instruction.formats; 33 | 34 | import org.cc.dexlib2.iface.instruction.OffsetInstruction; 35 | import org.cc.dexlib2.iface.instruction.TwoRegisterInstruction; 36 | 37 | public interface Instruction22t extends TwoRegisterInstruction, OffsetInstruction { 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/instruction/formats/Instruction22x.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.iface.instruction.formats; 33 | 34 | import org.cc.dexlib2.iface.instruction.TwoRegisterInstruction; 35 | 36 | public interface Instruction22x extends TwoRegisterInstruction { 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/instruction/formats/Instruction23x.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.iface.instruction.formats; 33 | 34 | import org.cc.dexlib2.iface.instruction.ThreeRegisterInstruction; 35 | 36 | public interface Instruction23x extends ThreeRegisterInstruction { 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/instruction/formats/Instruction25x.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015, 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.cc.dexlib2.iface.instruction.formats; 33 | 34 | import org.cc.dexlib2.iface.instruction.OneFixedFourParameterRegisterInstruction; 35 | 36 | public interface Instruction25x extends OneFixedFourParameterRegisterInstruction { 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/instruction/formats/Instruction30t.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.iface.instruction.formats; 33 | 34 | import org.cc.dexlib2.iface.instruction.OffsetInstruction; 35 | 36 | public interface Instruction30t extends OffsetInstruction { 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/instruction/formats/Instruction31c.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.iface.instruction.formats; 33 | 34 | import org.cc.dexlib2.iface.instruction.OneRegisterInstruction; 35 | import org.cc.dexlib2.iface.instruction.ReferenceInstruction; 36 | 37 | public interface Instruction31c extends OneRegisterInstruction, ReferenceInstruction { 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/instruction/formats/Instruction31t.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.iface.instruction.formats; 33 | 34 | import org.cc.dexlib2.iface.instruction.OffsetInstruction; 35 | import org.cc.dexlib2.iface.instruction.OneRegisterInstruction; 36 | 37 | public interface Instruction31t extends OneRegisterInstruction, OffsetInstruction { 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/instruction/formats/Instruction32x.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.iface.instruction.formats; 33 | 34 | import org.cc.dexlib2.iface.instruction.TwoRegisterInstruction; 35 | 36 | public interface Instruction32x extends TwoRegisterInstruction { 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/instruction/formats/Instruction35c.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.iface.instruction.formats; 33 | 34 | import org.cc.dexlib2.iface.instruction.FiveRegisterInstruction; 35 | import org.cc.dexlib2.iface.instruction.ReferenceInstruction; 36 | 37 | public interface Instruction35c extends FiveRegisterInstruction, ReferenceInstruction { 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/instruction/formats/PackedSwitchPayload.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.iface.instruction.formats; 33 | 34 | import org.cc.dexlib2.iface.instruction.SwitchPayload; 35 | 36 | public interface PackedSwitchPayload extends SwitchPayload { 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/instruction/formats/SparseSwitchPayload.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.iface.instruction.formats; 33 | 34 | import org.cc.dexlib2.iface.instruction.SwitchPayload; 35 | 36 | public interface SparseSwitchPayload extends SwitchPayload { 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/instruction/formats/UnknownInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013, 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.cc.dexlib2.iface.instruction.formats; 33 | 34 | public interface UnknownInstruction extends Instruction10x { 35 | int getOriginalOpcode(); 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/iface/reference/Reference.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.iface.reference; 33 | 34 | /** 35 | * This class is the base interface for field/method/string/type references in a dex file. It has no functionality or 36 | * contract itself. 37 | */ 38 | public interface Reference { 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/immutable/reference/ImmutableReference.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.immutable.reference; 33 | 34 | import org.cc.dexlib2.ReferenceType; 35 | import org.cc.dexlib2.iface.reference.*; 36 | import org.cc.util.ExceptionWithContext; 37 | 38 | import javax.annotation.Nonnull; 39 | 40 | public interface ImmutableReference extends Reference { 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/immutable/value/ImmutableEncodedValue.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, 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.cc.dexlib2.immutable.value; 33 | 34 | import org.cc.dexlib2.iface.value.EncodedValue; 35 | 36 | public interface ImmutableEncodedValue extends EncodedValue { 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/rewriter/Rewriter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014, 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.cc.dexlib2.rewriter; 33 | 34 | import javax.annotation.Nonnull; 35 | 36 | public interface Rewriter { 37 | @Nonnull 38 | T rewrite(@Nonnull T value); 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/rewriter/TypeRewriter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014, 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.cc.dexlib2.rewriter; 33 | 34 | import javax.annotation.Nonnull; 35 | 36 | public class TypeRewriter implements Rewriter { 37 | @Nonnull @Override public String rewrite(@Nonnull String value) { 38 | return value; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/writer/NullableIndexSection.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013, 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.cc.dexlib2.writer; 33 | 34 | import javax.annotation.Nullable; 35 | 36 | public interface NullableIndexSection extends IndexSection { 37 | int getNullableItemIndex(@Nullable Key key); 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/writer/NullableOffsetSection.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013, 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.cc.dexlib2.writer; 33 | 34 | import javax.annotation.Nullable; 35 | 36 | public interface NullableOffsetSection extends OffsetSection { 37 | int getNullableItemOffset(@Nullable Key key); 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/writer/builder/BuilderReference.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013, 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.cc.dexlib2.writer.builder; 33 | 34 | import org.cc.dexlib2.iface.reference.Reference; 35 | 36 | public interface BuilderReference extends Reference { 37 | int getIndex(); 38 | void setIndex(int index); 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/writer/io/DeferredOutputStream.java: -------------------------------------------------------------------------------- 1 | package org.cc.dexlib2.writer.io; 2 | 3 | import java.io.IOException; 4 | import java.io.OutputStream; 5 | 6 | public abstract class DeferredOutputStream extends OutputStream { 7 | public abstract void writeTo(OutputStream output) throws IOException; 8 | } 9 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/writer/io/DeferredOutputStreamFactory.java: -------------------------------------------------------------------------------- 1 | package org.cc.dexlib2.writer.io; 2 | 3 | import java.io.IOException; 4 | 5 | public interface DeferredOutputStreamFactory { 6 | DeferredOutputStream makeDeferredOutputStream() throws IOException; 7 | } 8 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/writer/io/DexDataStore.java: -------------------------------------------------------------------------------- 1 | package org.cc.dexlib2.writer.io; 2 | 3 | import javax.annotation.Nonnull; 4 | import java.io.IOException; 5 | import java.io.InputStream; 6 | import java.io.OutputStream; 7 | 8 | public interface DexDataStore { 9 | @Nonnull OutputStream outputAt(int offset); 10 | @Nonnull InputStream readAt(int offset); 11 | void close() throws IOException; 12 | } 13 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/dexlib2/writer/io/FileDataStore.java: -------------------------------------------------------------------------------- 1 | package org.cc.dexlib2.writer.io; 2 | 3 | import org.cc.util.RandomAccessFileInputStream; 4 | import org.cc.util.RandomAccessFileOutputStream; 5 | 6 | import javax.annotation.Nonnull; 7 | import java.io.*; 8 | 9 | public class FileDataStore implements DexDataStore { 10 | private final RandomAccessFile raf; 11 | 12 | public FileDataStore(@Nonnull File file) throws FileNotFoundException, IOException { 13 | this.raf = new RandomAccessFile(file, "rw"); 14 | this.raf.setLength(0); 15 | } 16 | 17 | @Nonnull @Override public OutputStream outputAt(int offset) { 18 | return new RandomAccessFileOutputStream(raf, offset); 19 | } 20 | 21 | @Nonnull @Override public InputStream readAt(int offset) { 22 | return new RandomAccessFileInputStream(raf, offset); 23 | } 24 | 25 | @Override public void close() throws IOException { 26 | raf.close(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/org/cc/smali/WithRegister.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013, 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.cc.smali; 33 | 34 | public interface WithRegister { 35 | int getRegister(); 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/org/keplerproject/luajava/LuaException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * $Id: LuaException.java,v 1.6 2006/12/22 14:06:40 thiago Exp $ 3 | * Copyright (C) 2003-2007 Kepler Project. 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining 6 | * a copy of this software and associated documentation files (the 7 | * "Software"), to deal in the Software without restriction, including 8 | * without limitation the rights to use, copy, modify, merge, publish, 9 | * distribute, sublicense, and/or sell copies of the Software, and to 10 | * permit persons to whom the Software is furnished to do so, subject to 11 | * the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be 14 | * included in all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | */ 24 | 25 | package org.keplerproject.luajava; 26 | 27 | /** 28 | * LuaJava exception 29 | * 30 | * @author Thiago Ponte 31 | * 32 | */ 33 | public class LuaException extends Exception 34 | { 35 | /** 36 | * 37 | */ 38 | private static final long serialVersionUID = 1L; 39 | 40 | public LuaException(String str) 41 | { 42 | super(str); 43 | } 44 | 45 | /** 46 | * Will work only on Java 1.4 or later. 47 | * To work with Java 1.3, comment the first line and uncomment the second one. 48 | */ 49 | public LuaException(Exception e) 50 | { 51 | super((e.getCause() != null) ? e.getCause() : e); 52 | //super(e.getMessage()); 53 | } 54 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CvvT/AppTroy/88c3f14dabea52531c4f541da776da4df8f5d644/app/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-ldpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CvvT/AppTroy/88c3f14dabea52531c4f541da776da4df8f5d644/app/src/main/res/drawable-ldpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CvvT/AppTroy/88c3f14dabea52531c4f541da776da4df8f5d644/app/src/main/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CvvT/AppTroy/88c3f14dabea52531c4f541da776da4df8f5d644/app/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Xposed: Red clock example 5 | 6 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | buildscript { 3 | repositories { 4 | jcenter() 5 | } 6 | dependencies { 7 | classpath 'com.android.tools.build:gradle:2.1.0' 8 | } 9 | } 10 | 11 | allprojects { 12 | repositories { 13 | jcenter() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /example/calOffset.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | from capstone import * 4 | from capstone.arm import * 5 | 6 | # arch: CS_ARCH_ARM 7 | # MODE: CS_MODE_THUMB, CS_MODE_ARM 8 | # CODE = "\x03\x4b\x7b\x44\x1b\x68\xd3\xf8\x1c\x03\xe2\xf7\x3d\xbd\x00\xbf\xc2\x2f\x04\x00\x03\x68\x2d\xe9\xf0\x41\x07\x46\x9e\x69\x10\x4c" 9 | CODE = "" 10 | base = 11 | DEBUG = False 12 | try: 13 | md = Cs(CS_ARCH_ARM, CS_MODE_THUMB) 14 | md.detail = True 15 | insn = None 16 | for i in md.disasm(CODE, base): 17 | if DEBUG : print "0x%x:\t%s\t%s" %(i.address, i.mnemonic, i.op_str) 18 | if i.mnemonic.upper().startswith('LDR'): 19 | if i.reg_name(i.operands[0].value.reg) == 'r0' and i.operands[1].type == ARM_OP_MEM : 20 | insn = i 21 | if i.mnemonic.upper().startswith('B'): 22 | if insn is None: 23 | print "ERROR: %s" % "offset not found" 24 | else: 25 | print "offset is :", insn.operands[1].mem.disp 26 | break 27 | 28 | except CsError as e: 29 | print("ERROR: %s" %e) 30 | 31 | -------------------------------------------------------------------------------- /example/epoll_arm.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Collin's Binary Instrumentation Tool/Framework for Android 3 | * Collin Mulliner 4 | * http://www.mulliner.org/android/ 5 | * 6 | * (c) 2012,2013 7 | * 8 | * License: LGPL v2.1 9 | * 10 | */ 11 | 12 | #include 13 | #include 14 | 15 | extern int my_epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout); 16 | 17 | int my_epoll_wait_arm(int epfd, struct epoll_event *events, int maxevents, int timeout) 18 | { 19 | return my_epoll_wait(epfd, events, maxevents, timeout); 20 | } 21 | -------------------------------------------------------------------------------- /example/hijack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CvvT/AppTroy/88c3f14dabea52531c4f541da776da4df8f5d644/example/hijack -------------------------------------------------------------------------------- /example/jni/Android.mk: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2009 The Android Open Source Project 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | LOCAL_PATH := $(call my-dir) 16 | 17 | include $(CLEAR_VARS) 18 | LOCAL_MODULE := base 19 | LOCAL_SRC_FILES := ../../base/obj/local/armeabi/libbase.a 20 | LOCAL_EXPORT_C_INCLUDES := ../../base 21 | include $(PREBUILT_STATIC_LIBRARY) 22 | 23 | 24 | include $(CLEAR_VARS) 25 | LOCAL_MODULE := libexample 26 | LOCAL_SRC_FILES := ../epoll.c ../epoll_arm.c.arm 27 | LOCAL_CFLAGS := -g 28 | LOCAL_SHARED_LIBRARIES := dl libandroid_runtime libnativehelper libdvm\ 29 | libcutils libutils 30 | LOCAL_STATIC_LIBRARIES := base -landroid_runtime 31 | include $(BUILD_SHARED_LIBRARY) 32 | -------------------------------------------------------------------------------- /example/libs/armeabi/libexample.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CvvT/AppTroy/88c3f14dabea52531c4f541da776da4df8f5d644/example/libs/armeabi/libexample.so -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CvvT/AppTroy/88c3f14dabea52531c4f541da776da4df8f5d644/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sat May 14 00:25:08 CST 2016 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip 7 | -------------------------------------------------------------------------------- /import-summary.txt: -------------------------------------------------------------------------------- 1 | ECLIPSE ANDROID PROJECT IMPORT SUMMARY 2 | ====================================== 3 | 4 | Ignored Files: 5 | -------------- 6 | The following files were *not* copied into the new Gradle project; you 7 | should evaluate whether these are still needed in your project and if 8 | so manually move them: 9 | 10 | * .DS_Store 11 | 12 | Moved Files: 13 | ------------ 14 | Android Gradle projects use a different directory structure than ADT 15 | Eclipse projects. Here's how the projects were restructured: 16 | 17 | * AndroidManifest.xml => app/src/main/AndroidManifest.xml 18 | * assets/ => app/src/main/assets/ 19 | * res/ => app/src/main/res/ 20 | * src/ => app/src/main/java/ 21 | * src/.DS_Store => app/src/main/resources/.DS_Store 22 | * src/de/.DS_Store => app/src/main/resources/de/.DS_Store 23 | * src/de/robv/.DS_Store => app/src/main/resources/de/robv/.DS_Store 24 | * src/de/robv/android/.DS_Store => app/src/main/resources/de/robv/android/.DS_Store 25 | * src/de/robv/android/xposed/.DS_Store => app/src/main/resources/de/robv/android/xposed/.DS_Store 26 | * src/de/robv/android/xposed/mods/.DS_Store => app/src/main/resources/de/robv/android/xposed/mods/.DS_Store 27 | 28 | Next Steps: 29 | ----------- 30 | You can now build the project. The Gradle project needs network 31 | connectivity to download dependencies. 32 | 33 | Bugs: 34 | ----- 35 | If for some reason your project does not build, and you determine that 36 | it is due to a bug or limitation of the Eclipse to Gradle importer, 37 | please file a bug at http://b.android.com with category 38 | Component-Tools. 39 | 40 | (This import summary is for your information only, and can be deleted 41 | after import once you are satisfied with the results.) 42 | -------------------------------------------------------------------------------- /jni/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH:= $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | LOCAL_MODULE := apptroy 5 | LOCAL_LDLIBS := -llog 6 | LOCAL_SRC_FILES:= dump.cpp 7 | 8 | 9 | include $(BUILD_SHARED_LIBRARY) 10 | -------------------------------------------------------------------------------- /jni/Application.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | APP_ABI := armeabi 6 | 7 | include $(BUILD_SHARED_LIBRARY) -------------------------------------------------------------------------------- /libs/armeabi/libapptroy.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CvvT/AppTroy/88c3f14dabea52531c4f541da776da4df8f5d644/libs/armeabi/libapptroy.so -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | --------------------------------------------------------------------------------