├── .gitignore ├── .idea ├── caches │ └── build_file_checksums.ser ├── codeStyles │ └── Project.xml ├── gradle.xml ├── misc.xml ├── runConfigurations.xml └── vcs.xml ├── LICENSE ├── README.md ├── app ├── build.gradle ├── build │ ├── generated │ │ └── source │ │ │ ├── buildConfig │ │ │ └── debug │ │ │ │ └── com │ │ │ │ └── android │ │ │ │ └── reverse │ │ │ │ └── BuildConfig.java │ │ │ └── r │ │ │ └── debug │ │ │ ├── android │ │ │ └── support │ │ │ │ └── multidex │ │ │ │ └── R.java │ │ │ ├── com │ │ │ └── android │ │ │ │ └── reverse │ │ │ │ └── R.java │ │ │ └── top │ │ │ └── imlk │ │ │ └── xpmodulemultidex │ │ │ └── R.java │ ├── intermediates │ │ ├── blame │ │ │ └── res │ │ │ │ └── debug │ │ │ │ ├── multi-v2 │ │ │ │ ├── debug.json │ │ │ │ ├── values-sw720dp-land-v13.json │ │ │ │ ├── values-v11.json │ │ │ │ ├── values-v14.json │ │ │ │ └── values.json │ │ │ │ └── single │ │ │ │ └── debug.json │ │ ├── incremental │ │ │ ├── compileDebugAidl │ │ │ │ └── dependency.store │ │ │ └── mergeDebugResources │ │ │ │ ├── compile-file-map.properties │ │ │ │ ├── merged.dir │ │ │ │ ├── values-sw720dp-land-v13 │ │ │ │ │ └── values-sw720dp-land-v13.xml │ │ │ │ ├── values-v11 │ │ │ │ │ └── values-v11.xml │ │ │ │ ├── values-v14 │ │ │ │ │ └── values-v14.xml │ │ │ │ └── values │ │ │ │ │ └── values.xml │ │ │ │ └── merger.xml │ │ ├── manifests │ │ │ ├── density │ │ │ │ └── debug │ │ │ │ │ └── output.json │ │ │ ├── full │ │ │ │ └── debug │ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ │ └── output.json │ │ │ └── instant-run │ │ │ │ └── debug │ │ │ │ └── output.json │ │ ├── multi-dex │ │ │ └── debug │ │ │ │ └── manifest_keep.txt │ │ ├── res │ │ │ ├── debug │ │ │ │ ├── output.json │ │ │ │ └── resources-debug.ap_ │ │ │ ├── merged │ │ │ │ └── debug │ │ │ │ │ ├── drawable-hdpi_ic_launcher.png.flat │ │ │ │ │ ├── drawable-hdpi_logo.png.flat │ │ │ │ │ ├── drawable-mdpi_ic_launcher.png.flat │ │ │ │ │ ├── drawable-xhdpi_ic_launcher.png.flat │ │ │ │ │ ├── drawable-xxhdpi_ic_launcher.png.flat │ │ │ │ │ ├── layout_activity_main.xml.flat │ │ │ │ │ ├── menu_main.xml.flat │ │ │ │ │ ├── values-sw720dp-land-v13_values-sw720dp-land-v13.arsc.flat │ │ │ │ │ ├── values-v11_values-v11.arsc.flat │ │ │ │ │ ├── values-v14_values-v14.arsc.flat │ │ │ │ │ └── values_values.arsc.flat │ │ │ └── symbol-table-with-package │ │ │ │ └── debug │ │ │ │ └── package-aware-r.txt │ │ ├── splits-support │ │ │ └── debug │ │ │ │ ├── apk-list │ │ │ │ └── apk-list.gson │ │ │ │ └── split-list │ │ │ │ └── split-list.gson │ │ └── symbols │ │ │ └── debug │ │ │ └── R.txt │ └── outputs │ │ └── logs │ │ └── manifest-merger-debug-report.txt ├── lib │ ├── .gitignore │ ├── XposedBridgeApi-54.jar │ └── full_framework_15.jar ├── libs │ ├── antlr-3.5.2-complete.jar │ ├── commons-cli-1.2.jar │ ├── guava-17.0.jar │ └── org.apache.http.legacy.jar ├── lint.xml ├── maindexlist.pro ├── release │ └── output.json └── src │ └── main │ ├── AndroidManifest.xml │ ├── assets │ └── xposed_init │ ├── java │ ├── com │ │ └── android │ │ │ └── reverse │ │ │ ├── apimonitor │ │ │ ├── AbstractBahaviorHookCallBack.java │ │ │ ├── AccountManagerHook.java │ │ │ ├── ActivityManagerHook.java │ │ │ ├── ActivityThreadHook.java │ │ │ ├── AlarmManagerHook.java │ │ │ ├── ApacheHttpHook.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 │ │ │ ├── client │ │ │ ├── MainActivity.java │ │ │ └── MyApplication.java │ │ │ ├── collecter │ │ │ ├── DexFileInfo.java │ │ │ ├── DexFileInfoCollecter.java │ │ │ ├── HeapDump.java │ │ │ ├── LuaScriptInvoker.java │ │ │ ├── MemDump.java │ │ │ ├── ModuleContext.java │ │ │ └── NativeHookCollecter.java │ │ │ ├── hook │ │ │ ├── HookHelperFacktory.java │ │ │ ├── HookHelperInterface.java │ │ │ ├── HookParam.java │ │ │ ├── MethodHookCallBack.java │ │ │ └── XposeHookHelperImpl.java │ │ │ ├── mod │ │ │ ├── CommandBroadcastReceiver.java │ │ │ ├── PackageMetaInfo.java │ │ │ └── ReverseXposedModule.java │ │ │ ├── request │ │ │ ├── BackSmaliCommandHandler.java │ │ │ ├── CommandHandler.java │ │ │ ├── CommandHandlerParser.java │ │ │ ├── DumpClassCommandHandler.java │ │ │ ├── DumpDexFileCommandHandler.java │ │ │ ├── DumpDexInfoCommandHandler.java │ │ │ ├── DumpHeapCommandHandler.java │ │ │ ├── DumpMemCommandHandler.java │ │ │ ├── InvokeScriptCommandHandler.java │ │ │ └── NativeHookInfoHandler.java │ │ │ ├── smali │ │ │ ├── DexFileBuilder.java │ │ │ ├── DexFileHeadersPointer.java │ │ │ └── MemoryBackSmali.java │ │ │ └── util │ │ │ ├── Constant.java │ │ │ ├── JsonWriter.java │ │ │ ├── Logger.java │ │ │ ├── NativeFunction.java │ │ │ ├── RefInvoke.java │ │ │ ├── SoFileLoader.java │ │ │ └── Utility.java │ ├── ds │ │ └── tree │ │ │ ├── DuplicateKeyException.java │ │ │ ├── RadixTree.java │ │ │ ├── RadixTreeImpl.java │ │ │ ├── RadixTreeNode.java │ │ │ ├── Visitor.java │ │ │ └── VisitorImpl.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 │ │ ├── jf │ │ ├── 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 │ │ ├── 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 │ │ │ │ │ ├── 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 │ │ │ │ │ ├── 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 │ │ │ │ ├── Annotation.java │ │ │ │ ├── AnnotationElement.java │ │ │ │ ├── BasicAnnotation.java │ │ │ │ ├── ClassDef.java │ │ │ │ ├── DexFile.java │ │ │ │ ├── ExceptionHandler.java │ │ │ │ ├── Field.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 │ │ │ │ │ ├── OneRegisterInstruction.java │ │ │ │ │ ├── PayloadInstruction.java │ │ │ │ │ ├── ReferenceInstruction.java │ │ │ │ │ ├── RegisterRangeInstruction.java │ │ │ │ │ ├── SwitchElement.java │ │ │ │ │ ├── SwitchPayload.java │ │ │ │ │ ├── ThreeRegisterInstruction.java │ │ │ │ │ ├── TwoRegisterInstruction.java │ │ │ │ │ ├── VariableRegisterInstruction.java │ │ │ │ │ ├── VerificationErrorInstruction.java │ │ │ │ │ ├── VtableIndexInstruction.java │ │ │ │ │ ├── WideLiteralInstruction.java │ │ │ │ │ └── formats │ │ │ │ │ │ ├── ArrayPayload.java │ │ │ │ │ │ ├── Instruction10t.java │ │ │ │ │ │ ├── Instruction10x.java │ │ │ │ │ │ ├── Instruction11n.java │ │ │ │ │ │ ├── Instruction11x.java │ │ │ │ │ │ ├── Instruction12x.java │ │ │ │ │ │ ├── Instruction20bc.java │ │ │ │ │ │ ├── Instruction20t.java │ │ │ │ │ │ ├── Instruction21c.java │ │ │ │ │ │ ├── Instruction21ih.java │ │ │ │ │ │ ├── Instruction21lh.java │ │ │ │ │ │ ├── Instruction21s.java │ │ │ │ │ │ ├── Instruction21t.java │ │ │ │ │ │ ├── Instruction22b.java │ │ │ │ │ │ ├── Instruction22c.java │ │ │ │ │ │ ├── Instruction22cs.java │ │ │ │ │ │ ├── Instruction22s.java │ │ │ │ │ │ ├── Instruction22t.java │ │ │ │ │ │ ├── Instruction22x.java │ │ │ │ │ │ ├── Instruction23x.java │ │ │ │ │ │ ├── Instruction30t.java │ │ │ │ │ │ ├── Instruction31c.java │ │ │ │ │ │ ├── Instruction31i.java │ │ │ │ │ │ ├── Instruction31t.java │ │ │ │ │ │ ├── Instruction32x.java │ │ │ │ │ │ ├── Instruction35c.java │ │ │ │ │ │ ├── Instruction35mi.java │ │ │ │ │ │ ├── Instruction35ms.java │ │ │ │ │ │ ├── Instruction3rc.java │ │ │ │ │ │ ├── Instruction3rmi.java │ │ │ │ │ │ ├── Instruction3rms.java │ │ │ │ │ │ ├── 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 │ │ │ │ │ ├── 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 │ │ │ ├── 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 │ │ │ ├── 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 │ ├── jni │ ├── Android.mk │ ├── Application.mk │ ├── dvmnative │ │ ├── Android.mk │ │ ├── base │ │ │ └── macros.h │ │ ├── dexfile_art.h │ │ ├── dvmnative.cpp │ │ ├── elfinfo.cpp │ │ ├── elfinfo.h │ │ ├── jvalue.h │ │ └── util.h │ ├── lua │ │ ├── Android.mk │ │ ├── lapi.c │ │ ├── lapi.h │ │ ├── lauxlib.c │ │ ├── lauxlib.h │ │ ├── lbaselib.c │ │ ├── lcode.c │ │ ├── lcode.h │ │ ├── ldblib.c │ │ ├── ldebug.c │ │ ├── ldebug.h │ │ ├── ldo.c │ │ ├── ldo.h │ │ ├── ldump.c │ │ ├── lfunc.c │ │ ├── lfunc.h │ │ ├── lgc.c │ │ ├── lgc.h │ │ ├── linit.c │ │ ├── liolib.c │ │ ├── llex.c │ │ ├── llex.h │ │ ├── llimits.h │ │ ├── lmathlib.c │ │ ├── lmem.c │ │ ├── lmem.h │ │ ├── loadlib.c │ │ ├── lobject.c │ │ ├── lobject.h │ │ ├── lopcodes.c │ │ ├── lopcodes.h │ │ ├── loslib.c │ │ ├── lparser.c │ │ ├── lparser.h │ │ ├── lstate.c │ │ ├── lstate.h │ │ ├── lstring.c │ │ ├── lstring.h │ │ ├── lstrlib.c │ │ ├── ltable.c │ │ ├── ltable.h │ │ ├── ltablib.c │ │ ├── ltm.c │ │ ├── ltm.h │ │ ├── lua.h │ │ ├── luaconf.h │ │ ├── lualib.h │ │ ├── lundump.c │ │ ├── lundump.h │ │ ├── lvm.c │ │ ├── lvm.h │ │ ├── lzio.c │ │ └── lzio.h │ └── luajava │ │ ├── Android.mk │ │ └── luajava.c │ └── res │ ├── drawable-hdpi │ ├── ic_launcher.png │ └── logo.png │ ├── drawable-mdpi │ └── ic_launcher.png │ ├── drawable-xhdpi │ └── ic_launcher.png │ ├── drawable-xxhdpi │ └── ic_launcher.png │ ├── layout │ └── activity_main.xml │ ├── menu │ └── main.xml │ ├── values-sw600dp │ └── dimens.xml │ ├── values-sw720dp-land │ └── dimens.xml │ ├── values-v11 │ └── styles.xml │ ├── values-v14 │ └── styles.xml │ └── values │ ├── dimens.xml │ ├── strings.xml │ └── styles.xml ├── build.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── import-summary.txt └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/libraries 5 | /.idea/modules.xml 6 | /.idea/workspace.xml 7 | .DS_Store 8 | /build 9 | /captures 10 | .externalNativeBuild 11 | -------------------------------------------------------------------------------- /.idea/caches/build_file_checksums.ser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imlk0/ZjDroid/15b9bf4fb5a5b62c9c5dc2402f04bdaa629b22ad/.idea/caches/build_file_checksums.ser -------------------------------------------------------------------------------- /.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 15 | 16 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 27 | 28 | 29 | 30 | 31 | 32 | 34 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | //apply plugin: 'com.ceabie.dexnkife' 3 | 4 | android { 5 | compileSdkVersion 27 6 | buildToolsVersion "27.0.3" 7 | 8 | defaultConfig { 9 | applicationId "com.android.reverse" 10 | minSdkVersion 8 11 | targetSdkVersion 22 12 | 13 | versionCode 4 14 | versionName "1.0.3" 15 | 16 | multiDexEnabled true 17 | 18 | multiDexKeepProguard file('maindexlist.pro') // 指定主dex中的class 19 | } 20 | 21 | lintOptions { 22 | checkReleaseBuilds false 23 | // Or, if you prefer, you can continue to check for errors in release builds, 24 | // but continue the build even when errors are found: 25 | abortOnError false 26 | } 27 | 28 | buildTypes { 29 | release { 30 | minifyEnabled false 31 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' 32 | } 33 | } 34 | 35 | 36 | externalNativeBuild { 37 | ndkBuild { 38 | path 'src/main/jni/Android.mk' 39 | } 40 | } 41 | 42 | } 43 | 44 | dependencies { 45 | implementation 'com.android.support:multidex:1.0.3' 46 | implementation files('libs/antlr-3.5.2-complete.jar') 47 | implementation files('libs/commons-cli-1.2.jar') 48 | implementation files('lib/full_framework_15.jar') 49 | implementation files('libs/guava-17.0.jar') 50 | compileOnly files('lib/XposedBridgeApi-54.jar') 51 | implementation 'top.imlk.xpmodulemultidex:XposedModuleMultidex:1.0.0' 52 | compileOnly files('libs/org.apache.http.legacy.jar') 53 | } 54 | -------------------------------------------------------------------------------- /app/build/generated/source/buildConfig/debug/com/android/reverse/BuildConfig.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Automatically generated file. DO NOT MODIFY 3 | */ 4 | package com.android.reverse; 5 | 6 | public final class BuildConfig { 7 | public static final boolean DEBUG = Boolean.parseBoolean("true"); 8 | public static final String APPLICATION_ID = "com.android.reverse"; 9 | public static final String BUILD_TYPE = "debug"; 10 | public static final String FLAVOR = ""; 11 | public static final int VERSION_CODE = 4; 12 | public static final String VERSION_NAME = "1.0.3"; 13 | } 14 | -------------------------------------------------------------------------------- /app/build/generated/source/r/debug/android/support/multidex/R.java: -------------------------------------------------------------------------------- 1 | /* AUTO-GENERATED FILE. DO NOT MODIFY. 2 | * 3 | * This class was automatically generated by the 4 | * gradle plugin from the resource data it found. It 5 | * should not be modified by hand. 6 | */ 7 | package android.support.multidex; 8 | 9 | public final class R { 10 | } 11 | -------------------------------------------------------------------------------- /app/build/generated/source/r/debug/com/android/reverse/R.java: -------------------------------------------------------------------------------- 1 | /* AUTO-GENERATED FILE. DO NOT MODIFY. 2 | * 3 | * This class was automatically generated by the 4 | * aapt tool from the resource data it found. It 5 | * should not be modified by hand. 6 | */ 7 | 8 | package com.android.reverse; 9 | 10 | public final class R { 11 | public static final class dimen { 12 | public static final int activity_horizontal_margin=0x7f010000; 13 | public static final int activity_vertical_margin=0x7f010001; 14 | } 15 | public static final class drawable { 16 | public static final int ic_launcher=0x7f020000; 17 | public static final int logo=0x7f020001; 18 | } 19 | public static final class id { 20 | public static final int action_settings=0x7f030000; 21 | public static final int imageView1=0x7f030001; 22 | public static final int textView1=0x7f030002; 23 | } 24 | public static final class layout { 25 | public static final int activity_main=0x7f040000; 26 | } 27 | public static final class menu { 28 | public static final int main=0x7f050000; 29 | } 30 | public static final class string { 31 | public static final int action_settings=0x7f060000; 32 | public static final int app_name=0x7f060001; 33 | public static final int hello_world=0x7f060002; 34 | } 35 | public static final class style { 36 | public static final int AppBaseTheme=0x7f070000; 37 | public static final int AppTheme=0x7f070001; 38 | } 39 | } -------------------------------------------------------------------------------- /app/build/generated/source/r/debug/top/imlk/xpmodulemultidex/R.java: -------------------------------------------------------------------------------- 1 | /* AUTO-GENERATED FILE. DO NOT MODIFY. 2 | * 3 | * This class was automatically generated by the 4 | * gradle plugin from the resource data it found. It 5 | * should not be modified by hand. 6 | */ 7 | package top.imlk.xpmodulemultidex; 8 | 9 | public final class R { 10 | public static final class string { 11 | public static final int app_name = 0x7f060001; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /app/build/intermediates/blame/res/debug/multi-v2/values-sw720dp-land-v13.json: -------------------------------------------------------------------------------- 1 | { 2 | "logs": [ 3 | { 4 | "outputFile": "C:\\Users\\jxht\\AndroidStudioProjects\\ZjDroid\\app\\build\\intermediates\\incremental\\mergeDebugResources\\merged.dir\\values-sw720dp-land-v13\\values-sw720dp-land-v13.xml", 5 | "map": [ 6 | { 7 | "source": "C:\\Users\\jxht\\AndroidStudioProjects\\ZjDroid\\app\\src\\main\\res\\values-sw720dp-land\\dimens.xml", 8 | "from": { 9 | "startLines": "6", 10 | "startColumns": "4", 11 | "startOffsets": "200", 12 | "endColumns": "58", 13 | "endOffsets": "254" 14 | }, 15 | "to": { 16 | "startLines": "2", 17 | "startColumns": "4", 18 | "startOffsets": "55", 19 | "endColumns": "58", 20 | "endOffsets": "109" 21 | } 22 | } 23 | ] 24 | } 25 | ] 26 | } -------------------------------------------------------------------------------- /app/build/intermediates/blame/res/debug/multi-v2/values-v11.json: -------------------------------------------------------------------------------- 1 | { 2 | "logs": [ 3 | { 4 | "outputFile": "C:\\Users\\jxht\\AndroidStudioProjects\\ZjDroid\\app\\build\\intermediates\\incremental\\mergeDebugResources\\merged.dir\\values-v11\\values-v11.xml", 5 | "map": [ 6 | { 7 | "source": "C:\\Users\\jxht\\AndroidStudioProjects\\ZjDroid\\app\\src\\main\\res\\values-v11\\styles.xml", 8 | "from": { 9 | "startLines": "6", 10 | "startColumns": "4", 11 | "startOffsets": "177", 12 | "endLines": "8", 13 | "endColumns": "12", 14 | "endOffsets": "309" 15 | }, 16 | "to": { 17 | "startLines": "2", 18 | "startColumns": "4", 19 | "startOffsets": "55", 20 | "endLines": "4", 21 | "endColumns": "12", 22 | "endOffsets": "187" 23 | } 24 | } 25 | ] 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /app/build/intermediates/blame/res/debug/multi-v2/values-v14.json: -------------------------------------------------------------------------------- 1 | { 2 | "logs": [ 3 | { 4 | "outputFile": "C:\\Users\\jxht\\AndroidStudioProjects\\ZjDroid\\app\\build\\intermediates\\incremental\\mergeDebugResources\\merged.dir\\values-v14\\values-v14.xml", 5 | "map": [ 6 | { 7 | "source": "C:\\Users\\jxht\\AndroidStudioProjects\\ZjDroid\\app\\src\\main\\res\\values-v14\\styles.xml", 8 | "from": { 9 | "startLines": "7", 10 | "startColumns": "4", 11 | "startOffsets": "220", 12 | "endLines": "9", 13 | "endColumns": "12", 14 | "endOffsets": "366" 15 | }, 16 | "to": { 17 | "startLines": "2", 18 | "startColumns": "4", 19 | "startOffsets": "55", 20 | "endLines": "4", 21 | "endColumns": "12", 22 | "endOffsets": "201" 23 | } 24 | } 25 | ] 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /app/build/intermediates/incremental/compileDebugAidl/dependency.store: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /app/build/intermediates/incremental/mergeDebugResources/merged.dir/values-sw720dp-land-v13/values-sw720dp-land-v13.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 128dp 4 | -------------------------------------------------------------------------------- /app/build/intermediates/incremental/mergeDebugResources/merged.dir/values-v11/values-v11.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /app/build/intermediates/incremental/mergeDebugResources/merged.dir/values-v14/values-v14.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | Settings 6 | ZjDroid 7 | ZjDroid是基于Xposed Framewrok的动态逆向分析模块 8 | 15 | 18 | -------------------------------------------------------------------------------- /app/build/intermediates/manifests/density/debug/output.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /app/build/intermediates/manifests/full/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 19 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 32 | 35 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /app/build/intermediates/manifests/full/debug/output.json: -------------------------------------------------------------------------------- 1 | [{"outputType":{"type":"MERGED_MANIFESTS"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":4,"versionName":"1.0.3","enabled":true,"outputFile":"app-debug.apk","fullName":"debug","baseName":"debug"},"path":"AndroidManifest.xml","properties":{"packageId":"com.android.reverse","split":"","minSdkVersion":"8"}}] -------------------------------------------------------------------------------- /app/build/intermediates/manifests/instant-run/debug/output.json: -------------------------------------------------------------------------------- 1 | [{"outputType":{"type":"INSTANT_RUN_MERGED_MANIFESTS"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":4,"versionName":"1.0.3","enabled":true,"outputFile":"app-debug.apk","fullName":"debug","baseName":"debug"},"path":"AndroidManifest.xml","properties":{"packageId":"com.android.reverse","split":"","minSdkVersion":"8"}}] -------------------------------------------------------------------------------- /app/build/intermediates/multi-dex/debug/manifest_keep.txt: -------------------------------------------------------------------------------- 1 | # Referenced at C:\Users\jxht\AndroidStudioProjects\ZjDroid\app\build\intermediates\manifests\full\debug\AndroidManifest.xml:11 2 | -keep class android.support.multidex.MultiDexApplication { (...); } 3 | 4 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/output.json: -------------------------------------------------------------------------------- 1 | [{"outputType":{"type":"PROCESSED_RES"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":4,"versionName":"1.0.3","enabled":true,"outputFile":"app-debug.apk","fullName":"debug","baseName":"debug"},"path":"resources-debug.ap_","properties":{"packageId":"com.android.reverse","split":"","minSdkVersion":"8"}}] -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/resources-debug.ap_: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imlk0/ZjDroid/15b9bf4fb5a5b62c9c5dc2402f04bdaa629b22ad/app/build/intermediates/res/debug/resources-debug.ap_ -------------------------------------------------------------------------------- /app/build/intermediates/res/merged/debug/drawable-hdpi_ic_launcher.png.flat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imlk0/ZjDroid/15b9bf4fb5a5b62c9c5dc2402f04bdaa629b22ad/app/build/intermediates/res/merged/debug/drawable-hdpi_ic_launcher.png.flat -------------------------------------------------------------------------------- /app/build/intermediates/res/merged/debug/drawable-hdpi_logo.png.flat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imlk0/ZjDroid/15b9bf4fb5a5b62c9c5dc2402f04bdaa629b22ad/app/build/intermediates/res/merged/debug/drawable-hdpi_logo.png.flat -------------------------------------------------------------------------------- /app/build/intermediates/res/merged/debug/drawable-mdpi_ic_launcher.png.flat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imlk0/ZjDroid/15b9bf4fb5a5b62c9c5dc2402f04bdaa629b22ad/app/build/intermediates/res/merged/debug/drawable-mdpi_ic_launcher.png.flat -------------------------------------------------------------------------------- /app/build/intermediates/res/merged/debug/drawable-xhdpi_ic_launcher.png.flat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imlk0/ZjDroid/15b9bf4fb5a5b62c9c5dc2402f04bdaa629b22ad/app/build/intermediates/res/merged/debug/drawable-xhdpi_ic_launcher.png.flat -------------------------------------------------------------------------------- /app/build/intermediates/res/merged/debug/drawable-xxhdpi_ic_launcher.png.flat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imlk0/ZjDroid/15b9bf4fb5a5b62c9c5dc2402f04bdaa629b22ad/app/build/intermediates/res/merged/debug/drawable-xxhdpi_ic_launcher.png.flat -------------------------------------------------------------------------------- /app/build/intermediates/res/merged/debug/layout_activity_main.xml.flat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imlk0/ZjDroid/15b9bf4fb5a5b62c9c5dc2402f04bdaa629b22ad/app/build/intermediates/res/merged/debug/layout_activity_main.xml.flat -------------------------------------------------------------------------------- /app/build/intermediates/res/merged/debug/menu_main.xml.flat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imlk0/ZjDroid/15b9bf4fb5a5b62c9c5dc2402f04bdaa629b22ad/app/build/intermediates/res/merged/debug/menu_main.xml.flat -------------------------------------------------------------------------------- /app/build/intermediates/res/merged/debug/values-sw720dp-land-v13_values-sw720dp-land-v13.arsc.flat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imlk0/ZjDroid/15b9bf4fb5a5b62c9c5dc2402f04bdaa629b22ad/app/build/intermediates/res/merged/debug/values-sw720dp-land-v13_values-sw720dp-land-v13.arsc.flat -------------------------------------------------------------------------------- /app/build/intermediates/res/merged/debug/values-v11_values-v11.arsc.flat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imlk0/ZjDroid/15b9bf4fb5a5b62c9c5dc2402f04bdaa629b22ad/app/build/intermediates/res/merged/debug/values-v11_values-v11.arsc.flat -------------------------------------------------------------------------------- /app/build/intermediates/res/merged/debug/values-v14_values-v14.arsc.flat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imlk0/ZjDroid/15b9bf4fb5a5b62c9c5dc2402f04bdaa629b22ad/app/build/intermediates/res/merged/debug/values-v14_values-v14.arsc.flat -------------------------------------------------------------------------------- /app/build/intermediates/res/merged/debug/values_values.arsc.flat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imlk0/ZjDroid/15b9bf4fb5a5b62c9c5dc2402f04bdaa629b22ad/app/build/intermediates/res/merged/debug/values_values.arsc.flat -------------------------------------------------------------------------------- /app/build/intermediates/res/symbol-table-with-package/debug/package-aware-r.txt: -------------------------------------------------------------------------------- 1 | com.android.reverse 2 | int dimen activity_horizontal_margin 0x7f010000 3 | int dimen activity_vertical_margin 0x7f010001 4 | int drawable ic_launcher 0x7f020000 5 | int drawable logo 0x7f020001 6 | int id action_settings 0x7f030000 7 | int id imageView1 0x7f030001 8 | int id textView1 0x7f030002 9 | int layout activity_main 0x7f040000 10 | int menu main 0x7f050000 11 | int string action_settings 0x7f060000 12 | int string app_name 0x7f060001 13 | int string hello_world 0x7f060002 14 | int style AppBaseTheme 0x7f070000 15 | int style AppTheme 0x7f070001 16 | -------------------------------------------------------------------------------- /app/build/intermediates/splits-support/debug/apk-list/apk-list.gson: -------------------------------------------------------------------------------- 1 | [{"type":"MAIN","splits":[],"versionCode":4,"versionName":"1.0.3","enabled":true,"outputFile":"app-debug.apk","fullName":"debug","baseName":"debug"}] -------------------------------------------------------------------------------- /app/build/intermediates/splits-support/debug/split-list/split-list.gson: -------------------------------------------------------------------------------- 1 | [{"splitType":"DENSITY","filters":[]},{"splitType":"LANGUAGE","filters":[]},{"splitType":"ABI","filters":[]},{"splitType":"ResConfigs","filters":[]}] -------------------------------------------------------------------------------- /app/build/intermediates/symbols/debug/R.txt: -------------------------------------------------------------------------------- 1 | int dimen activity_horizontal_margin 0x7f010000 2 | int dimen activity_vertical_margin 0x7f010001 3 | int drawable ic_launcher 0x7f020000 4 | int drawable logo 0x7f020001 5 | int id action_settings 0x7f030000 6 | int id imageView1 0x7f030001 7 | int id textView1 0x7f030002 8 | int layout activity_main 0x7f040000 9 | int menu main 0x7f050000 10 | int string action_settings 0x7f060000 11 | int string app_name 0x7f060001 12 | int string hello_world 0x7f060002 13 | int style AppBaseTheme 0x7f070000 14 | int style AppTheme 0x7f070001 15 | -------------------------------------------------------------------------------- /app/lib/.gitignore: -------------------------------------------------------------------------------- 1 | /sdk_sources_15 2 | -------------------------------------------------------------------------------- /app/lib/XposedBridgeApi-54.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imlk0/ZjDroid/15b9bf4fb5a5b62c9c5dc2402f04bdaa629b22ad/app/lib/XposedBridgeApi-54.jar -------------------------------------------------------------------------------- /app/lib/full_framework_15.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imlk0/ZjDroid/15b9bf4fb5a5b62c9c5dc2402f04bdaa629b22ad/app/lib/full_framework_15.jar -------------------------------------------------------------------------------- /app/libs/antlr-3.5.2-complete.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imlk0/ZjDroid/15b9bf4fb5a5b62c9c5dc2402f04bdaa629b22ad/app/libs/antlr-3.5.2-complete.jar -------------------------------------------------------------------------------- /app/libs/commons-cli-1.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imlk0/ZjDroid/15b9bf4fb5a5b62c9c5dc2402f04bdaa629b22ad/app/libs/commons-cli-1.2.jar -------------------------------------------------------------------------------- /app/libs/guava-17.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imlk0/ZjDroid/15b9bf4fb5a5b62c9c5dc2402f04bdaa629b22ad/app/libs/guava-17.0.jar -------------------------------------------------------------------------------- /app/libs/org.apache.http.legacy.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imlk0/ZjDroid/15b9bf4fb5a5b62c9c5dc2402f04bdaa629b22ad/app/libs/org.apache.http.legacy.jar -------------------------------------------------------------------------------- /app/lint.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/maindexlist.pro: -------------------------------------------------------------------------------- 1 | -keep class com.android.reverse.mod.ReverseXposedModule 2 | -keep class top.imlk.xpmodulemultidex.* 3 | -------------------------------------------------------------------------------- /app/release/output.json: -------------------------------------------------------------------------------- 1 | [{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":4,"versionName":"1.0.3","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}] -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 23 | 26 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /app/src/main/assets/xposed_init: -------------------------------------------------------------------------------- 1 | com.android.reverse.mod.ReverseXposedModule -------------------------------------------------------------------------------- /app/src/main/java/com/android/reverse/apimonitor/AbstractBahaviorHookCallBack.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.apimonitor; 2 | 3 | import com.android.reverse.hook.HookParam; 4 | import com.android.reverse.hook.MethodHookCallBack; 5 | import com.android.reverse.util.Logger; 6 | 7 | public abstract class AbstractBahaviorHookCallBack extends MethodHookCallBack { 8 | 9 | @Override 10 | public void beforeHookedMethod(HookParam param) { 11 | Logger.log_behavior("Invoke " + param.method.getDeclaringClass().getName() + "->" + param.method.getName()); 12 | this.descParam(param); 13 | this.printStackInfo(); 14 | } 15 | 16 | @Override 17 | public void afterHookedMethod(HookParam param) { 18 | //Logger.log_behavior("End Invoke "+ param.method.toString()); 19 | } 20 | 21 | private void printStackInfo() { 22 | Throwable ex = new Throwable(); 23 | StackTraceElement[] stackElements = ex.getStackTrace(); 24 | if (stackElements != null) { 25 | StackTraceElement st; 26 | for (int i = 0; i < stackElements.length; i++) { 27 | st = stackElements[i]; 28 | if (st.getClassName().startsWith("com.android.reverse") || st.getClassName().startsWith("de.robv.android.xposed.XposedBridge")) 29 | continue; 30 | Logger.log_behavior(" at " + st.getClassName() + ":" + st.getMethodName() + ":" + st.getFileName() + ":" + st.getLineNumber()); 31 | } 32 | } 33 | } 34 | 35 | public abstract void descParam(HookParam param); 36 | 37 | 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/reverse/apimonitor/AccountManagerHook.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.apimonitor; 2 | 3 | import java.lang.reflect.Method; 4 | 5 | import com.android.reverse.hook.HookParam; 6 | import com.android.reverse.util.Logger; 7 | import com.android.reverse.util.RefInvoke; 8 | 9 | public class AccountManagerHook extends ApiMonitorHook { 10 | 11 | 12 | @Override 13 | public void startHook() { 14 | 15 | Method getAccountsMethod = RefInvoke.findMethodExact( 16 | "android.accounts.AccountManager", ClassLoader.getSystemClassLoader(), 17 | "getAccounts"); 18 | hookhelper.hookMethod(getAccountsMethod, new AbstractBahaviorHookCallBack() { 19 | 20 | @Override 21 | public void descParam(HookParam param) { 22 | Logger.log_behavior("Get Account ->"); 23 | } 24 | }); 25 | 26 | Method getAccountsByTypeMethod = RefInvoke.findMethodExact( 27 | "android.accounts.AccountManager", ClassLoader.getSystemClassLoader(), 28 | "getAccountsByType",String.class); 29 | hookhelper.hookMethod(getAccountsByTypeMethod, new AbstractBahaviorHookCallBack() { 30 | 31 | @Override 32 | public void descParam(HookParam param) { 33 | String type = (String) param.args[0]; 34 | Logger.log_behavior("Get Account By Type ->"); 35 | Logger.log_behavior("type :" +type); 36 | } 37 | }); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/reverse/apimonitor/ActivityManagerHook.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.apimonitor; 2 | 3 | import java.lang.reflect.Method; 4 | 5 | import com.android.reverse.hook.HookParam; 6 | import com.android.reverse.util.Logger; 7 | import com.android.reverse.util.RefInvoke; 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 | String packageName = (String) param.args[0]; 22 | Logger.log_behavior("kill packagename = "+packageName); 23 | } 24 | }); 25 | 26 | Method forceStopPackagemethod = RefInvoke.findMethodExact( 27 | "android.app.ActivityManager", ClassLoader.getSystemClassLoader(), 28 | "forceStopPackage", String.class); 29 | hookhelper.hookMethod(forceStopPackagemethod, new AbstractBahaviorHookCallBack() { 30 | 31 | @Override 32 | public void descParam(HookParam param) { 33 | String packageName = (String) param.args[0]; 34 | Logger.log_behavior("kill packagename = "+packageName); 35 | } 36 | }); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/reverse/apimonitor/ActivityThreadHook.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.apimonitor; 2 | 3 | import java.lang.reflect.Method; 4 | import com.android.reverse.hook.HookParam; 5 | import com.android.reverse.util.Logger; 6 | import com.android.reverse.util.RefInvoke; 7 | 8 | public class ActivityThreadHook extends ApiMonitorHook { 9 | 10 | @Override 11 | public void startHook() { 12 | try { 13 | Class receiverDataClass = Class.forName("android.app.ActivityThread$ReceiverData"); 14 | if (receiverDataClass != null) { 15 | Method handleReceiverMethod = RefInvoke.findMethodExact("android.app.ActivityThread", ClassLoader.getSystemClassLoader(), 16 | "handleReceiver", receiverDataClass); 17 | hookhelper.hookMethod(handleReceiverMethod, new AbstractBahaviorHookCallBack() { 18 | 19 | @Override 20 | public void descParam(HookParam param) { 21 | Logger.log_behavior("The Receiver Information:"); 22 | Object data = param.args[0]; 23 | Logger.log_behavior(data.toString()); 24 | 25 | } 26 | }); 27 | } 28 | } catch (ClassNotFoundException e) { 29 | e.printStackTrace(); 30 | } 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/reverse/apimonitor/ApiMonitorHook.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.apimonitor; 2 | 3 | 4 | import com.android.reverse.hook.HookHelperFacktory; 5 | import com.android.reverse.hook.HookHelperInterface; 6 | 7 | public abstract class ApiMonitorHook { 8 | 9 | protected HookHelperInterface hookhelper = HookHelperFacktory.getHookHelper(); 10 | public static class InvokeInfo{ 11 | private long invokeAtTime; 12 | private String className; 13 | private String methodName; 14 | private Object[] argv; 15 | private Object result; 16 | private Object invokeState; 17 | } 18 | public abstract void startHook(); 19 | 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/reverse/apimonitor/AudioRecordHook.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.apimonitor; 2 | 3 | import java.lang.reflect.Method; 4 | import com.android.reverse.hook.HookParam; 5 | import com.android.reverse.util.Logger; 6 | import com.android.reverse.util.RefInvoke; 7 | 8 | public class AudioRecordHook extends ApiMonitorHook { 9 | 10 | @Override 11 | public void startHook() { 12 | Method startRecordingMethod = RefInvoke.findMethodExact( 13 | "android.media.AudioRecord", ClassLoader.getSystemClassLoader(), 14 | "startRecording"); 15 | hookhelper.hookMethod(startRecordingMethod, new AbstractBahaviorHookCallBack() { 16 | 17 | @Override 18 | public void descParam(HookParam param) { 19 | Logger.log_behavior("Audio Recording ->"); 20 | } 21 | }); 22 | 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/reverse/apimonitor/ConnectivityManagerHook.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.apimonitor; 2 | 3 | import android.os.Build; 4 | 5 | import java.lang.reflect.Method; 6 | 7 | 8 | import com.android.reverse.hook.HookParam; 9 | import com.android.reverse.util.Logger; 10 | import com.android.reverse.util.RefInvoke; 11 | 12 | public class ConnectivityManagerHook extends ApiMonitorHook { 13 | 14 | @Override 15 | public void startHook() { 16 | 17 | if (Build.VERSION.SDK_INT <= 19) { 18 | 19 | Method setMobileDataEnabledmethod = RefInvoke.findMethodExact( 20 | "android.net.ConnectivityManager", ClassLoader.getSystemClassLoader(), 21 | "setMobileDataEnabled", boolean.class); 22 | hookhelper.hookMethod(setMobileDataEnabledmethod, new AbstractBahaviorHookCallBack() { 23 | 24 | @Override 25 | public void descParam(HookParam param) { 26 | boolean status = (Boolean) param.args[0]; 27 | Logger.log("Set MobileDataEnabled = " + status); 28 | } 29 | }); 30 | 31 | } 32 | 33 | 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/reverse/apimonitor/MediaRecorderHook.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.apimonitor; 2 | 3 | import java.io.FileDescriptor; 4 | import java.lang.reflect.Method; 5 | 6 | import com.android.reverse.hook.HookParam; 7 | import com.android.reverse.util.Logger; 8 | import com.android.reverse.util.RefInvoke; 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 | Logger.log_behavior("Media Record: Start ->"); 23 | String mPath = (String)RefInvoke.getFieldOjbect("android.media.MediaRecorder", param.thisObject, "mPath"); 24 | if(mPath != null) 25 | Logger.log_behavior("Save Path: ->" +mPath); 26 | else{ 27 | FileDescriptor mFd = (FileDescriptor) RefInvoke.getFieldOjbect("android.media.MediaRecorder", param.thisObject, "mFd"); 28 | Logger.log_behavior("Save Path: ->" +mFd.toString()); 29 | } 30 | } 31 | }); 32 | 33 | Method stopmethod = RefInvoke.findMethodExact( 34 | "android.media.MediaRecorder", ClassLoader.getSystemClassLoader(), 35 | "stop"); 36 | hookhelper.hookMethod(stopmethod, new AbstractBahaviorHookCallBack() { 37 | 38 | @Override 39 | public void descParam(HookParam param) { 40 | Logger.log_behavior("Media Record: Stop ->"); 41 | } 42 | }); 43 | 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/reverse/apimonitor/NetWorkHook.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.apimonitor; 2 | 3 | import android.annotation.TargetApi; 4 | import android.os.Build; 5 | 6 | import java.io.IOException; 7 | import java.lang.reflect.Method; 8 | import java.net.URL; 9 | 10 | import com.android.reverse.hook.HookParam; 11 | import com.android.reverse.util.Logger; 12 | import com.android.reverse.util.RefInvoke; 13 | 14 | 15 | public class NetWorkHook extends ApiMonitorHook { 16 | 17 | @Override 18 | public void startHook() { 19 | // HttpURLConnection 20 | Method openConnectionMethod = RefInvoke.findMethodExact("java.net.URL", ClassLoader.getSystemClassLoader(), "openConnection"); 21 | hookhelper.hookMethod(openConnectionMethod, new AbstractBahaviorHookCallBack() { 22 | @Override 23 | public void descParam(HookParam param) { 24 | URL url = (URL) param.thisObject; 25 | Logger.log_behavior("Connect to URL ->"); 26 | Logger.log_behavior("The URL = " + url.toString()); 27 | } 28 | }); 29 | 30 | if(Build.VERSION.SDK_INT < 23){ 31 | httpHook = new ApacheHttpHook(); 32 | 33 | httpHook.startHook(); 34 | 35 | } 36 | 37 | 38 | 39 | } 40 | 41 | public ApiMonitorHook httpHook; 42 | 43 | 44 | 45 | } 46 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/reverse/apimonitor/NotificationManagerHook.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.apimonitor; 2 | 3 | import java.lang.reflect.Method; 4 | import android.app.Notification; 5 | 6 | import com.android.reverse.hook.HookParam; 7 | import com.android.reverse.util.Logger; 8 | import com.android.reverse.util.RefInvoke; 9 | 10 | public class NotificationManagerHook extends ApiMonitorHook { 11 | 12 | @Override 13 | public void startHook() { 14 | Method notifyMethod = RefInvoke.findMethodExact("android.app.NotificationManager", ClassLoader.getSystemClassLoader(), "notify",int.class,Notification.class); 15 | hookhelper.hookMethod(notifyMethod, new AbstractBahaviorHookCallBack() { 16 | @Override 17 | public void descParam(HookParam param) { 18 | Notification notification = (Notification) param.args[1]; 19 | Logger.log_behavior("Send Notification ->"); 20 | Logger.log_behavior(notification.toString()); 21 | } 22 | }); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/reverse/apimonitor/ProcessBuilderHook.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.apimonitor; 2 | 3 | import java.lang.reflect.Method; 4 | import java.util.List; 5 | import com.android.reverse.hook.HookParam; 6 | import com.android.reverse.util.Logger; 7 | import com.android.reverse.util.RefInvoke; 8 | 9 | 10 | public class ProcessBuilderHook extends ApiMonitorHook { 11 | 12 | @Override 13 | public void startHook() { 14 | Method execmethod = RefInvoke.findMethodExact( 15 | "java.lang.ProcessBuilder", ClassLoader.getSystemClassLoader(), 16 | "start"); 17 | hookhelper.hookMethod(execmethod, new AbstractBahaviorHookCallBack() { 18 | @Override 19 | public void descParam(HookParam param) { 20 | Logger.log_behavior("Create New Process ->"); 21 | ProcessBuilder pb = (ProcessBuilder) param.thisObject; 22 | List cmds = pb.command(); 23 | StringBuilder sb = new StringBuilder(); 24 | for(int i=0 ;i "); 22 | String[] progs = (String[]) param.args[0]; 23 | for(int i=0 ;i = 20) { 21 | //TODO 增加art虚拟机中backsmali的支持 22 | Logger.log("Forbidden ! in Art, ZjDroid was unable to back smali dex file automaticly!"); 23 | return; 24 | } 25 | 26 | String filename = ModuleContext.getInstance().getAppContext().getFilesDir() + "/dexfile" + mCookie + ".dex"; 27 | DexFileInfoCollecter.getInstance().backsmaliDexFile(filename, mCookie); 28 | Logger.log("the dexfile data save to =" + filename); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/reverse/request/CommandHandler.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.request; 2 | 3 | public interface CommandHandler { 4 | 5 | public abstract void doAction(); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/reverse/request/DumpClassCommandHandler.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.request; 2 | 3 | import com.android.reverse.collecter.DexFileInfoCollecter; 4 | import com.android.reverse.util.Logger; 5 | 6 | public class DumpClassCommandHandler implements CommandHandler { 7 | 8 | private String mCookie; 9 | 10 | public DumpClassCommandHandler(String mCookie) { 11 | this.mCookie = mCookie; 12 | } 13 | 14 | @Override 15 | public void doAction() { 16 | String[] loadClass = DexFileInfoCollecter.getInstance().dumpLoadableClass(mCookie); 17 | if (loadClass != null) { 18 | Logger.log("Start Loadable ClassName ->"); 19 | String className = null; 20 | for (int i = 0; i < loadClass.length; i++) { 21 | className = loadClass[i]; 22 | if (!this.isFilterClass(className)) { 23 | Logger.log("ClassName = " + className); 24 | } 25 | } 26 | Logger.log("End Loadable ClassName"); 27 | }else{ 28 | Logger.log("Can't find class loaded by the dex"); 29 | } 30 | } 31 | 32 | private final String[] filterClassName = { "android.support.v4.", "com.android.reverse.", "org.jf.", "org.keplerproject." }; 33 | 34 | private boolean isFilterClass(String className) { 35 | String filterName = null; 36 | for (int i = 0; i < filterClassName.length; i++) { 37 | filterName = filterClassName[i]; 38 | if (className.startsWith(filterName)) { 39 | return true; 40 | } 41 | } 42 | return false; 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/reverse/request/DumpDexFileCommandHandler.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.request; 2 | 3 | 4 | import com.android.reverse.collecter.DexFileInfoCollecter; 5 | import com.android.reverse.collecter.ModuleContext; 6 | import com.android.reverse.util.Logger; 7 | 8 | public class DumpDexFileCommandHandler implements CommandHandler { 9 | 10 | private String mCookie; 11 | 12 | public DumpDexFileCommandHandler(String mCookie) { 13 | this.mCookie = mCookie; 14 | } 15 | 16 | @Override 17 | public void doAction() { 18 | String filename = ModuleContext.getInstance().getAppContext().getFilesDir() + "/dexdump" + mCookie + ".odex"; 19 | DexFileInfoCollecter.getInstance().dumpDexFile(filename, Long.parseLong(mCookie)); 20 | Logger.log("the dexfile data save to =" + filename); 21 | } 22 | 23 | 24 | } 25 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/reverse/request/DumpDexInfoCommandHandler.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.request; 2 | 3 | import java.util.HashMap; 4 | import java.util.Iterator; 5 | import com.android.reverse.collecter.DexFileInfo; 6 | import com.android.reverse.collecter.DexFileInfoCollecter; 7 | import com.android.reverse.util.Logger; 8 | 9 | public class DumpDexInfoCommandHandler implements CommandHandler { 10 | 11 | @Override 12 | public void doAction() { 13 | HashMap dexfileInfo = DexFileInfoCollecter.getInstance().dumpDexFileInfo(); 14 | Iterator itor = dexfileInfo.values().iterator(); 15 | DexFileInfo info = null; 16 | Logger.log("The DexFile Infomation ->"); 17 | while (itor.hasNext()) { 18 | info = itor.next(); 19 | Logger.log("filepath:"+ info.getDexPath()+" dexElementToString:"+info.getToStringResult() +" mCookie:"+info.getmCookie()); 20 | } 21 | Logger.log("End DexFile Infomation"); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/reverse/request/DumpHeapCommandHandler.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.request; 2 | 3 | import com.android.reverse.collecter.HeapDump; 4 | import com.android.reverse.collecter.ModuleContext; 5 | import com.android.reverse.util.Logger; 6 | 7 | public class DumpHeapCommandHandler implements CommandHandler { 8 | 9 | private static String dumpFileName; 10 | 11 | public DumpHeapCommandHandler() { 12 | dumpFileName = android.os.Process.myPid()+".hprof"; 13 | } 14 | 15 | @Override 16 | public void doAction() { 17 | String heapfilePath =ModuleContext.getInstance().getAppContext().getFilesDir()+"/"+dumpFileName; 18 | HeapDump.dumpHeap(heapfilePath); 19 | Logger.log("the heap data save to ="+ heapfilePath); 20 | } 21 | 22 | 23 | 24 | } 25 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/reverse/request/DumpMemCommandHandler.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.request; 2 | 3 | 4 | import com.android.reverse.collecter.MemDump; 5 | import com.android.reverse.collecter.ModuleContext; 6 | import com.android.reverse.util.Logger; 7 | 8 | public class DumpMemCommandHandler implements CommandHandler { 9 | 10 | private String dumpFileName; 11 | private long start; 12 | private int length; 13 | 14 | public DumpMemCommandHandler(long start, int length){ 15 | this.start = start; 16 | this.length = length; 17 | this.dumpFileName = String.valueOf(start); 18 | } 19 | 20 | @Override 21 | public void doAction() { 22 | String memfilePath = ModuleContext.getInstance().getAppContext().getFilesDir()+"/"+dumpFileName; 23 | MemDump.dumpMem(memfilePath, start, length); 24 | Logger.log("the mem data save to ="+ memfilePath); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/reverse/request/InvokeScriptCommandHandler.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.request; 2 | 3 | import com.android.reverse.collecter.LuaScriptInvoker; 4 | import com.android.reverse.util.Logger; 5 | 6 | public class InvokeScriptCommandHandler implements CommandHandler { 7 | 8 | private String script; 9 | private String filePath; 10 | private ScriptType type; 11 | 12 | public static enum ScriptType { 13 | TEXTTYPE, FILETYPE 14 | } 15 | 16 | public InvokeScriptCommandHandler(String str, ScriptType type) { 17 | this.type = type; 18 | if (type == ScriptType.TEXTTYPE) 19 | this.script = str; 20 | else if (type == ScriptType.FILETYPE) 21 | this.filePath = str; 22 | } 23 | 24 | @Override 25 | public void doAction() { 26 | Logger.log("The Script invoke start"); 27 | if (this.type == ScriptType.TEXTTYPE) { 28 | LuaScriptInvoker.getInstance().invokeScript(script); 29 | } else if (this.type == ScriptType.FILETYPE) { 30 | LuaScriptInvoker.getInstance().invokeFileScript(filePath); 31 | } else { 32 | Logger.log("the script type is invalid"); 33 | } 34 | Logger.log("The Script invoke end"); 35 | 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/reverse/request/NativeHookInfoHandler.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.request; 2 | 3 | 4 | import com.android.reverse.collecter.NativeHookCollecter; 5 | 6 | public class NativeHookInfoHandler implements CommandHandler { 7 | 8 | @Override 9 | public void doAction() { 10 | NativeHookCollecter.getInstance().parserNativeHookInfo(); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/reverse/util/Constant.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.util; 2 | 3 | public class Constant { 4 | 5 | public static String FILESAVEPATH = "XAndReverseTool"; 6 | 7 | } 8 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/reverse/util/Logger.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.util; 2 | 3 | import android.util.Log; 4 | 5 | public class Logger { 6 | 7 | public static String LOGTAG_COMMAN = "zjdroid-shell-"; 8 | public static String LOGTAG_WORKFLOW = "zjdroid-apimonitor-"; 9 | public static boolean DEBUG_ENABLE = true; 10 | public static String PACKAGENAME; 11 | 12 | public static void log(String message){ 13 | if(DEBUG_ENABLE) 14 | Log.e(LOGTAG_COMMAN+PACKAGENAME,message); 15 | } 16 | 17 | public static void log_behavior(String message){ 18 | if(DEBUG_ENABLE) 19 | Log.e(LOGTAG_WORKFLOW+PACKAGENAME,message); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/reverse/util/Utility.java: -------------------------------------------------------------------------------- 1 | package com.android.reverse.util; 2 | 3 | import java.lang.reflect.InvocationTargetException; 4 | import java.lang.reflect.Method; 5 | 6 | public class Utility { 7 | 8 | public static int getApiLevel() { 9 | 10 | try { 11 | Class mClassType = Class.forName("android.os.SystemProperties"); 12 | Method mGetIntMethod = mClassType.getDeclaredMethod("getInt", 13 | String.class, int.class); 14 | mGetIntMethod.setAccessible(true); 15 | return (Integer)mGetIntMethod.invoke(null, "ro.build.version.sdk",14); 16 | } catch (ClassNotFoundException e) { 17 | e.printStackTrace(); 18 | } catch (NoSuchMethodException e) { 19 | e.printStackTrace(); 20 | } catch (IllegalArgumentException e) { 21 | e.printStackTrace(); 22 | } catch (IllegalAccessException e) { 23 | e.printStackTrace(); 24 | } catch (InvocationTargetException e) { 25 | e.printStackTrace(); 26 | } 27 | return 14; 28 | 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/ds/tree/DuplicateKeyException.java: -------------------------------------------------------------------------------- 1 | /* 2 | The MIT License 3 | 4 | Copyright (c) 2008 Tahseen Ur Rehman 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | */ 24 | 25 | package ds.tree; 26 | 27 | /** 28 | * excepion thrown if a duplicate key is inserted in a {@link RadixTree} 29 | * 30 | * @author Tahseen Ur Rehman 31 | * email: tahseen.ur.rehman {at.spam.me.not} gmail.com 32 | */ 33 | public class DuplicateKeyException extends RuntimeException 34 | { 35 | private static final long serialVersionUID = 3141795907493885706L; 36 | 37 | public DuplicateKeyException(String msg) 38 | { 39 | super(msg); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/java/ds/tree/VisitorImpl.java: -------------------------------------------------------------------------------- 1 | package ds.tree; 2 | 3 | 4 | /** 5 | * A simple standard implementation for a {@link visitor}. 6 | * 7 | * @author Dennis Heidsiek 8 | * @param 9 | */ 10 | public abstract class VisitorImpl implements Visitor { 11 | 12 | protected R result; 13 | 14 | public VisitorImpl() { 15 | this.result = null; 16 | } 17 | 18 | public VisitorImpl(R initialValue) { 19 | this.result = initialValue; 20 | } 21 | 22 | public R getResult() { 23 | return result; 24 | } 25 | 26 | abstract public void visit(String key, RadixTreeNode parent, RadixTreeNode node); 27 | } -------------------------------------------------------------------------------- /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/jf/baksmali/Renderers/DoubleRenderer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * [The "BSD licence"] 3 | * Copyright (c) 2010 Ben Gruver 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions 8 | * are met: 9 | * 1. Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 2. Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * 3. The name of the author may not be used to endorse or promote products 15 | * derived from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | * INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | 29 | package org.jf.baksmali.Renderers; 30 | 31 | import org.jf.util.IndentingWriter; 32 | 33 | import java.io.IOException; 34 | 35 | public class DoubleRenderer { 36 | public static void writeTo(IndentingWriter writer, double val) throws IOException { 37 | writer.write(Double.toString(val)); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/dexlib2/builder/instruction/BuilderSwitchElement.java: -------------------------------------------------------------------------------- 1 | package org.jf.dexlib2.builder.instruction; 2 | 3 | import org.jf.dexlib2.builder.BuilderSwitchPayload; 4 | import org.jf.dexlib2.builder.Label; 5 | import org.jf.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/jf/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.jf.dexlib2.dexbacked; 33 | 34 | import org.jf.dexlib2.base.BaseExceptionHandler; 35 | 36 | public abstract class DexBackedExceptionHandler extends BaseExceptionHandler { 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/dexlib2/dexbacked/MemoryDexFileItemPointer.java: -------------------------------------------------------------------------------- 1 | package org.jf.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+";pFieldIds:"+pFieldIds+";pMethodIds:"+pMethodIds+";pProtoIds:"+pProtoIds+";pClassDefs:"+pClassDefs; 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/dexlib2/dexbacked/MemoryReader.java: -------------------------------------------------------------------------------- 1 | package org.jf.dexlib2.dexbacked; 2 | 3 | public interface MemoryReader { 4 | 5 | public byte[] readBytes(int start, int lenght); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/dexlib2/iface/BasicAnnotation.java: -------------------------------------------------------------------------------- 1 | package org.jf.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/jf/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.jf.dexlib2.iface.debug; 33 | 34 | public interface EndLocal extends DebugItem, LocalInfo { 35 | int getRegister(); 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/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.jf.dexlib2.iface.debug; 33 | 34 | public interface EpilogueBegin extends DebugItem { 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/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.jf.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/jf/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.jf.dexlib2.iface.debug; 33 | 34 | public interface PrologueEnd extends DebugItem { 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/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.jf.dexlib2.iface.debug; 33 | 34 | public interface RestartLocal extends DebugItem, LocalInfo { 35 | int getRegister(); 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/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.jf.dexlib2.iface.instruction; 33 | 34 | public interface FieldOffsetInstruction extends Instruction { 35 | int getFieldOffset(); 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/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.jf.dexlib2.iface.instruction; 33 | 34 | public interface InlineIndexInstruction extends Instruction { 35 | int getInlineIndex(); 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/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.jf.dexlib2.iface.instruction; 33 | 34 | public interface LongHatLiteralInstruction extends WideLiteralInstruction, HatLiteralInstruction { 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/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.jf.dexlib2.iface.instruction; 33 | 34 | public interface NarrowHatLiteralInstruction extends HatLiteralInstruction, NarrowLiteralInstruction { 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/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.jf.dexlib2.iface.instruction; 33 | 34 | public interface NarrowLiteralInstruction extends WideLiteralInstruction { 35 | int getNarrowLiteral(); 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/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.jf.dexlib2.iface.instruction; 33 | 34 | public interface OffsetInstruction extends Instruction { 35 | int getCodeOffset(); 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/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.jf.dexlib2.iface.instruction; 33 | 34 | public interface OneRegisterInstruction extends Instruction { 35 | int getRegisterA(); 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/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.jf.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/jf/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.jf.dexlib2.iface.instruction; 33 | 34 | public interface RegisterRangeInstruction extends VariableRegisterInstruction { 35 | int getStartRegister(); 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/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.jf.dexlib2.iface.instruction; 33 | 34 | public interface SwitchElement { 35 | public int getKey(); 36 | public int getOffset(); 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/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.jf.dexlib2.iface.instruction; 33 | 34 | public interface ThreeRegisterInstruction extends TwoRegisterInstruction { 35 | int getRegisterC(); 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/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.jf.dexlib2.iface.instruction; 33 | 34 | public interface TwoRegisterInstruction extends OneRegisterInstruction { 35 | int getRegisterB(); 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/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.jf.dexlib2.iface.instruction; 33 | 34 | public interface VariableRegisterInstruction extends Instruction { 35 | int getRegisterCount(); 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/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.jf.dexlib2.iface.instruction; 33 | 34 | public interface VerificationErrorInstruction extends Instruction { 35 | int getVerificationError(); 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/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.jf.dexlib2.iface.instruction; 33 | 34 | public interface VtableIndexInstruction extends Instruction { 35 | int getVtableIndex(); 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/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.jf.dexlib2.iface.instruction; 33 | 34 | public interface WideLiteralInstruction extends Instruction { 35 | long getWideLiteral(); 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/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.jf.dexlib2.iface.instruction.formats; 33 | 34 | import org.jf.dexlib2.iface.instruction.OffsetInstruction; 35 | 36 | public interface Instruction10t extends OffsetInstruction { 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/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.jf.dexlib2.iface.instruction.formats; 33 | 34 | import org.jf.dexlib2.iface.instruction.Instruction; 35 | 36 | public interface Instruction10x extends Instruction { 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/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.jf.dexlib2.iface.instruction.formats; 33 | 34 | import org.jf.dexlib2.iface.instruction.OneRegisterInstruction; 35 | 36 | public interface Instruction11x extends OneRegisterInstruction { 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/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.jf.dexlib2.iface.instruction.formats; 33 | 34 | import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction; 35 | 36 | public interface Instruction12x extends TwoRegisterInstruction { 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/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.jf.dexlib2.iface.instruction.formats; 33 | 34 | import org.jf.dexlib2.iface.instruction.OffsetInstruction; 35 | 36 | public interface Instruction20t extends OffsetInstruction { 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/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.jf.dexlib2.iface.instruction.formats; 33 | 34 | import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction; 35 | 36 | public interface Instruction22x extends TwoRegisterInstruction { 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/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.jf.dexlib2.iface.instruction.formats; 33 | 34 | import org.jf.dexlib2.iface.instruction.ThreeRegisterInstruction; 35 | 36 | public interface Instruction23x extends ThreeRegisterInstruction { 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/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.jf.dexlib2.iface.instruction.formats; 33 | 34 | import org.jf.dexlib2.iface.instruction.OffsetInstruction; 35 | 36 | public interface Instruction30t extends OffsetInstruction { 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/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.jf.dexlib2.iface.instruction.formats; 33 | 34 | import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction; 35 | 36 | public interface Instruction32x extends TwoRegisterInstruction { 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/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.jf.dexlib2.iface.instruction.formats; 33 | 34 | import org.jf.dexlib2.iface.instruction.SwitchPayload; 35 | 36 | public interface PackedSwitchPayload extends SwitchPayload { 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/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.jf.dexlib2.iface.instruction.formats; 33 | 34 | import org.jf.dexlib2.iface.instruction.SwitchPayload; 35 | 36 | public interface SparseSwitchPayload extends SwitchPayload { 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/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.jf.dexlib2.iface.instruction.formats; 33 | 34 | public interface UnknownInstruction extends Instruction10x { 35 | int getOriginalOpcode(); 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/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.jf.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/jf/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.jf.dexlib2.immutable.value; 33 | 34 | import org.jf.dexlib2.iface.value.EncodedValue; 35 | 36 | public interface ImmutableEncodedValue extends EncodedValue { 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/org/jf/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.jf.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/jf/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.jf.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/jf/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.jf.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/jf/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.jf.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/jf/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.jf.dexlib2.writer.builder; 33 | 34 | import org.jf.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/jf/dexlib2/writer/io/DeferredOutputStream.java: -------------------------------------------------------------------------------- 1 | package org.jf.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/jf/dexlib2/writer/io/DeferredOutputStreamFactory.java: -------------------------------------------------------------------------------- 1 | package org.jf.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/jf/dexlib2/writer/io/DexDataStore.java: -------------------------------------------------------------------------------- 1 | package org.jf.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/jf/dexlib2/writer/io/FileDataStore.java: -------------------------------------------------------------------------------- 1 | package org.jf.dexlib2.writer.io; 2 | 3 | import org.jf.util.RandomAccessFileInputStream; 4 | import org.jf.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/jf/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.jf.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/jni/Android.mk: -------------------------------------------------------------------------------- 1 | include $(call all-subdir-makefiles) 2 | 3 | -------------------------------------------------------------------------------- /app/src/main/jni/Application.mk: -------------------------------------------------------------------------------- 1 | APP_ABI := all 2 | APP_STL := gnustl_static 3 | APP_CPPFLAGS := -std=c++11 4 | -------------------------------------------------------------------------------- /app/src/main/jni/dvmnative/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 | 18 | 19 | # elfinfo 20 | include $(CLEAR_VARS) 21 | LOCAL_CPP_EXTENSION := .cxx .cpp .cc 22 | 23 | LOCAL_MODULE := elfinfo 24 | LOCAL_SRC_FILES := $(LOCAL_PATH)/elfinfo.cpp 25 | LOCAL_LDLIBS := -ldl -llog 26 | 27 | include $(BUILD_STATIC_LIBRARY) 28 | 29 | 30 | # dvmnative 31 | 32 | include $(CLEAR_VARS) 33 | LOCAL_CPP_EXTENSION := .cxx .cpp .cc 34 | 35 | LOCAL_MODULE := dvmnative 36 | 37 | LOCAL_SRC_FILES := dvmnative.cpp 38 | LOCAL_STATIC_LIBRARIES := libelfinfo 39 | LOCAL_LDLIBS := -ldl -llog 40 | 41 | include $(BUILD_SHARED_LIBRARY) 42 | 43 | -------------------------------------------------------------------------------- /app/src/main/jni/dvmnative/elfinfo.h: -------------------------------------------------------------------------------- 1 | #ifndef ELFINFO_H_ 2 | #define ELFINFO_H_ 3 | #include 4 | #include "util.h" 5 | 6 | struct dyn_info { 7 | Elf32_Addr symtab; 8 | Elf32_Addr strtab; 9 | Elf32_Addr jmprel; 10 | Elf32_Word totalrelsize; 11 | Elf32_Word relsize; 12 | Elf32_Word nrels; 13 | 14 | }; 15 | 16 | struct elf_info { 17 | int pid; 18 | Elf32_Addr base; 19 | Elf32_Ehdr ehdr; 20 | Elf32_Phdr phdr; 21 | Elf32_Dyn dyn; 22 | Elf32_Addr dynaddr; 23 | Elf32_Word got; 24 | Elf32_Addr phdr_addr; 25 | Elf32_Addr map_addr; 26 | Elf32_Word nchains; 27 | 28 | }; 29 | 30 | #define IS_DYN(_einfo) (_einfo->ehdr.e_type == ET_DYN) 31 | void get_elf_info(int pid, Elf32_Addr base, struct elf_info *einfo); 32 | unsigned long find_sym_in_rel(struct elf_info *einfo, char *sym_name); 33 | void get_dyn_info(struct elf_info *einfo, struct dyn_info *dinfo); 34 | bool replace_all_rels(char* libpath, char *fucation_name, void *newFun_ptr); 35 | bool replace_certain_rels(char *libpath, char* fucation_name[], u4 newFun_ptr[], int size); 36 | char * readstr(int pid, unsigned long addr); 37 | #endif 38 | -------------------------------------------------------------------------------- /app/src/main/jni/dvmnative/util.h: -------------------------------------------------------------------------------- 1 | #ifndef DALVIK_TYPE_WARP_H_ 2 | #define DALVIK_TYPE_WARP_H_ 3 | #include 4 | #include 5 | 6 | typedef uint8_t u1; 7 | typedef uint16_t u2; 8 | typedef uint32_t u4; 9 | typedef uint64_t u8; 10 | typedef int8_t s1; 11 | typedef int16_t s2; 12 | typedef int32_t s4; 13 | typedef int64_t s8; 14 | //typedef char bool; 15 | // 16 | //#define true (bool)1 17 | //#define false (bool)0 18 | 19 | typedef union JValue { 20 | u1 z; 21 | s1 b; 22 | u2 c; 23 | s2 s; 24 | s4 i; 25 | s8 j; 26 | float f; 27 | double d; 28 | void* l; 29 | } JValue; 30 | 31 | #define LOGTAG "zjdroid" 32 | 33 | #define LOGW(...) __android_log_print(ANDROID_LOG_DEBUG, LOGTAG,"W/" __VA_ARGS__) 34 | #define LOGE(...) __android_log_print(ANDROID_LOG_DEBUG, LOGTAG,"E/" __VA_ARGS__) 35 | #define LOGV(...) __android_log_print(ANDROID_LOG_DEBUG, LOGTAG,"V/" __VA_ARGS__) 36 | #define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, LOGTAG,"D/" __VA_ARGS__) 37 | #define LOGVV(...) __android_log_print(ANDROID_LOG_DEBUG, LOGTAG,"D/" __VA_ARGS__) 38 | 39 | #define pint(_x) __android_log_print(ANDROID_LOG_DEBUG, "ELF","[%20s( %04d )] %-30s = %d (0x%08x)\n",__FUNCTION__,__LINE__, #_x, (int)(_x), (int)(_x)) 40 | #define puint(_x) __android_log_print(ANDROID_LOG_DEBUG, "ELF","[%20s( %04d )] %-30s = %u (0x%08x)\n",__FUNCTION__,__LINE__, #_x, (unsigned int)(_x), (unsigned int)(_x)) 41 | #define pstr(_x) __android_log_print(ANDROID_LOG_DEBUG, "ELF","[%20s( %04d )] %-30s = %s \n",__FUNCTION__,__LINE__, #_x, (char*)(_x)) 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /app/src/main/jni/lua/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | LOCAL_MODULE := lua 6 | LOCAL_SRC_FILES := lapi.c lauxlib.c lbaselib.c lcode.c ldblib.c ldebug.c ldo.c ldump.c lfunc.c lgc.c linit.c liolib.c llex.c lmathlib.c lmem.c loadlib.c lobject.c lopcodes.c loslib.c lparser.c lstate.c lstring.c lstrlib.c ltable.c ltablib.c ltm.c lundump.c lvm.c lzio.c 7 | LOCAL_LDLIBS := -ld -lm 8 | 9 | include $(BUILD_STATIC_LIBRARY) 10 | -------------------------------------------------------------------------------- /app/src/main/jni/lua/lapi.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lapi.h,v 2.2.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** Auxiliary functions from Lua API 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lapi_h 8 | #define lapi_h 9 | 10 | 11 | #include "lobject.h" 12 | 13 | 14 | LUAI_FUNC void luaA_pushobject (lua_State *L, const TValue *o); 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /app/src/main/jni/lua/ldebug.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: ldebug.h,v 2.3.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** Auxiliary functions from Debug Interface module 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef ldebug_h 8 | #define ldebug_h 9 | 10 | 11 | #include "lstate.h" 12 | 13 | 14 | #define pcRel(pc, p) (cast(int, (pc) - (p)->code) - 1) 15 | 16 | #define getline(f,pc) (((f)->lineinfo) ? (f)->lineinfo[pc] : 0) 17 | 18 | #define resethookcount(L) (L->hookcount = L->basehookcount) 19 | 20 | 21 | LUAI_FUNC void luaG_typeerror (lua_State *L, const TValue *o, 22 | const char *opname); 23 | LUAI_FUNC void luaG_concaterror (lua_State *L, StkId p1, StkId p2); 24 | LUAI_FUNC void luaG_aritherror (lua_State *L, const TValue *p1, 25 | const TValue *p2); 26 | LUAI_FUNC int luaG_ordererror (lua_State *L, const TValue *p1, 27 | const TValue *p2); 28 | LUAI_FUNC void luaG_runerror (lua_State *L, const char *fmt, ...); 29 | LUAI_FUNC void luaG_errormsg (lua_State *L); 30 | LUAI_FUNC int luaG_checkcode (const Proto *pt); 31 | LUAI_FUNC int luaG_checkopenop (Instruction i); 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /app/src/main/jni/lua/lfunc.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lfunc.h,v 2.4.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** Auxiliary functions to manipulate prototypes and closures 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lfunc_h 8 | #define lfunc_h 9 | 10 | 11 | #include "lobject.h" 12 | 13 | 14 | #define sizeCclosure(n) (cast(int, sizeof(CClosure)) + \ 15 | cast(int, sizeof(TValue)*((n)-1))) 16 | 17 | #define sizeLclosure(n) (cast(int, sizeof(LClosure)) + \ 18 | cast(int, sizeof(TValue *)*((n)-1))) 19 | 20 | 21 | LUAI_FUNC Proto *luaF_newproto (lua_State *L); 22 | LUAI_FUNC Closure *luaF_newCclosure (lua_State *L, int nelems, Table *e); 23 | LUAI_FUNC Closure *luaF_newLclosure (lua_State *L, int nelems, Table *e); 24 | LUAI_FUNC UpVal *luaF_newupval (lua_State *L); 25 | LUAI_FUNC UpVal *luaF_findupval (lua_State *L, StkId level); 26 | LUAI_FUNC void luaF_close (lua_State *L, StkId level); 27 | LUAI_FUNC void luaF_freeproto (lua_State *L, Proto *f); 28 | LUAI_FUNC void luaF_freeclosure (lua_State *L, Closure *c); 29 | LUAI_FUNC void luaF_freeupval (lua_State *L, UpVal *uv); 30 | LUAI_FUNC const char *luaF_getlocalname (const Proto *func, int local_number, 31 | int pc); 32 | 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /app/src/main/jni/lua/linit.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: linit.c,v 1.14.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** Initialization of libraries for lua.c 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #define linit_c 9 | #define LUA_LIB 10 | 11 | #include "lua.h" 12 | 13 | #include "lualib.h" 14 | #include "lauxlib.h" 15 | 16 | 17 | static const luaL_Reg lualibs[] = { 18 | {"", luaopen_base}, 19 | {LUA_LOADLIBNAME, luaopen_package}, 20 | {LUA_TABLIBNAME, luaopen_table}, 21 | {LUA_IOLIBNAME, luaopen_io}, 22 | {LUA_OSLIBNAME, luaopen_os}, 23 | {LUA_STRLIBNAME, luaopen_string}, 24 | {LUA_MATHLIBNAME, luaopen_math}, 25 | {LUA_DBLIBNAME, luaopen_debug}, 26 | {NULL, NULL} 27 | }; 28 | 29 | 30 | LUALIB_API void luaL_openlibs (lua_State *L) { 31 | const luaL_Reg *lib = lualibs; 32 | for (; lib->func; lib++) { 33 | lua_pushcfunction(L, lib->func); 34 | lua_pushstring(L, lib->name); 35 | lua_call(L, 1, 0); 36 | } 37 | } 38 | 39 | -------------------------------------------------------------------------------- /app/src/main/jni/lua/lmem.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lmem.h,v 1.31.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** Interface to Memory Manager 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lmem_h 8 | #define lmem_h 9 | 10 | 11 | #include 12 | 13 | #include "llimits.h" 14 | #include "lua.h" 15 | 16 | #define MEMERRMSG "not enough memory" 17 | 18 | 19 | #define luaM_reallocv(L,b,on,n,e) \ 20 | ((cast(size_t, (n)+1) <= MAX_SIZET/(e)) ? /* +1 to avoid warnings */ \ 21 | luaM_realloc_(L, (b), (on)*(e), (n)*(e)) : \ 22 | luaM_toobig(L)) 23 | 24 | #define luaM_freemem(L, b, s) luaM_realloc_(L, (b), (s), 0) 25 | #define luaM_free(L, b) luaM_realloc_(L, (b), sizeof(*(b)), 0) 26 | #define luaM_freearray(L, b, n, t) luaM_reallocv(L, (b), n, 0, sizeof(t)) 27 | 28 | #define luaM_malloc(L,t) luaM_realloc_(L, NULL, 0, (t)) 29 | #define luaM_new(L,t) cast(t *, luaM_malloc(L, sizeof(t))) 30 | #define luaM_newvector(L,n,t) \ 31 | cast(t *, luaM_reallocv(L, NULL, 0, n, sizeof(t))) 32 | 33 | #define luaM_growvector(L,v,nelems,size,t,limit,e) \ 34 | if ((nelems)+1 > (size)) \ 35 | ((v)=cast(t *, luaM_growaux_(L,v,&(size),sizeof(t),limit,e))) 36 | 37 | #define luaM_reallocvector(L, v,oldn,n,t) \ 38 | ((v)=cast(t *, luaM_reallocv(L, v, oldn, n, sizeof(t)))) 39 | 40 | 41 | LUAI_FUNC void *luaM_realloc_ (lua_State *L, void *block, size_t oldsize, 42 | size_t size); 43 | LUAI_FUNC void *luaM_toobig (lua_State *L); 44 | LUAI_FUNC void *luaM_growaux_ (lua_State *L, void *block, int *size, 45 | size_t size_elem, int limit, 46 | const char *errormsg); 47 | 48 | #endif 49 | 50 | -------------------------------------------------------------------------------- /app/src/main/jni/lua/lstring.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lstring.h,v 1.43.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** String table (keep all strings handled by Lua) 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lstring_h 8 | #define lstring_h 9 | 10 | 11 | #include "lgc.h" 12 | #include "lobject.h" 13 | #include "lstate.h" 14 | 15 | 16 | #define sizestring(s) (sizeof(union TString)+((s)->len+1)*sizeof(char)) 17 | 18 | #define sizeudata(u) (sizeof(union Udata)+(u)->len) 19 | 20 | #define luaS_new(L, s) (luaS_newlstr(L, s, strlen(s))) 21 | #define luaS_newliteral(L, s) (luaS_newlstr(L, "" s, \ 22 | (sizeof(s)/sizeof(char))-1)) 23 | 24 | #define luaS_fix(s) l_setbit((s)->tsv.marked, FIXEDBIT) 25 | 26 | LUAI_FUNC void luaS_resize (lua_State *L, int newsize); 27 | LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s, Table *e); 28 | LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l); 29 | 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /app/src/main/jni/lua/ltable.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: ltable.h,v 2.10.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** Lua tables (hash) 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef ltable_h 8 | #define ltable_h 9 | 10 | #include "lobject.h" 11 | 12 | 13 | #define gnode(t,i) (&(t)->node[i]) 14 | #define gkey(n) (&(n)->i_key.nk) 15 | #define gval(n) (&(n)->i_val) 16 | #define gnext(n) ((n)->i_key.nk.next) 17 | 18 | #define key2tval(n) (&(n)->i_key.tvk) 19 | 20 | 21 | LUAI_FUNC const TValue *luaH_getnum (Table *t, int key); 22 | LUAI_FUNC TValue *luaH_setnum (lua_State *L, Table *t, int key); 23 | LUAI_FUNC const TValue *luaH_getstr (Table *t, TString *key); 24 | LUAI_FUNC TValue *luaH_setstr (lua_State *L, Table *t, TString *key); 25 | LUAI_FUNC const TValue *luaH_get (Table *t, const TValue *key); 26 | LUAI_FUNC TValue *luaH_set (lua_State *L, Table *t, const TValue *key); 27 | LUAI_FUNC Table *luaH_new (lua_State *L, int narray, int lnhash); 28 | LUAI_FUNC void luaH_resizearray (lua_State *L, Table *t, int nasize); 29 | LUAI_FUNC void luaH_free (lua_State *L, Table *t); 30 | LUAI_FUNC int luaH_next (lua_State *L, Table *t, StkId key); 31 | LUAI_FUNC int luaH_getn (Table *t); 32 | 33 | 34 | #if defined(LUA_DEBUG) 35 | LUAI_FUNC Node *luaH_mainposition (const Table *t, const TValue *key); 36 | LUAI_FUNC int luaH_isdummy (Node *n); 37 | #endif 38 | 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /app/src/main/jni/lua/ltm.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: ltm.h,v 2.6.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** Tag methods 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef ltm_h 8 | #define ltm_h 9 | 10 | 11 | #include "lobject.h" 12 | 13 | 14 | /* 15 | * WARNING: if you change the order of this enumeration, 16 | * grep "ORDER TM" 17 | */ 18 | typedef enum { 19 | TM_INDEX, 20 | TM_NEWINDEX, 21 | TM_GC, 22 | TM_MODE, 23 | TM_EQ, /* last tag method with `fast' access */ 24 | TM_ADD, 25 | TM_SUB, 26 | TM_MUL, 27 | TM_DIV, 28 | TM_MOD, 29 | TM_POW, 30 | TM_UNM, 31 | TM_LEN, 32 | TM_LT, 33 | TM_LE, 34 | TM_CONCAT, 35 | TM_CALL, 36 | TM_N /* number of elements in the enum */ 37 | } TMS; 38 | 39 | 40 | 41 | #define gfasttm(g,et,e) ((et) == NULL ? NULL : \ 42 | ((et)->flags & (1u<<(e))) ? NULL : luaT_gettm(et, e, (g)->tmname[e])) 43 | 44 | #define fasttm(l,et,e) gfasttm(G(l), et, e) 45 | 46 | LUAI_DATA const char *const luaT_typenames[]; 47 | 48 | 49 | LUAI_FUNC const TValue *luaT_gettm (Table *events, TMS event, TString *ename); 50 | LUAI_FUNC const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, 51 | TMS event); 52 | LUAI_FUNC void luaT_init (lua_State *L); 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /app/src/main/jni/lua/lualib.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lualib.h,v 1.36.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** Lua standard libraries 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #ifndef lualib_h 9 | #define lualib_h 10 | 11 | #include "lua.h" 12 | 13 | 14 | /* Key to file-handle type */ 15 | #define LUA_FILEHANDLE "FILE*" 16 | 17 | 18 | #define LUA_COLIBNAME "coroutine" 19 | LUALIB_API int (luaopen_base) (lua_State *L); 20 | 21 | #define LUA_TABLIBNAME "table" 22 | LUALIB_API int (luaopen_table) (lua_State *L); 23 | 24 | #define LUA_IOLIBNAME "io" 25 | LUALIB_API int (luaopen_io) (lua_State *L); 26 | 27 | #define LUA_OSLIBNAME "os" 28 | LUALIB_API int (luaopen_os) (lua_State *L); 29 | 30 | #define LUA_STRLIBNAME "string" 31 | LUALIB_API int (luaopen_string) (lua_State *L); 32 | 33 | #define LUA_MATHLIBNAME "math" 34 | LUALIB_API int (luaopen_math) (lua_State *L); 35 | 36 | #define LUA_DBLIBNAME "debug" 37 | LUALIB_API int (luaopen_debug) (lua_State *L); 38 | 39 | #define LUA_LOADLIBNAME "package" 40 | LUALIB_API int (luaopen_package) (lua_State *L); 41 | 42 | 43 | /* open all previous libraries */ 44 | LUALIB_API void (luaL_openlibs) (lua_State *L); 45 | 46 | 47 | 48 | #ifndef lua_assert 49 | #define lua_assert(x) ((void)0) 50 | #endif 51 | 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /app/src/main/jni/lua/lundump.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lundump.h,v 1.37.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** load precompiled Lua chunks 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lundump_h 8 | #define lundump_h 9 | 10 | #include "lobject.h" 11 | #include "lzio.h" 12 | 13 | /* load one chunk; from lundump.c */ 14 | LUAI_FUNC Proto* luaU_undump (lua_State* L, ZIO* Z, Mbuffer* buff, const char* name); 15 | 16 | /* make header; from lundump.c */ 17 | LUAI_FUNC void luaU_header (char* h); 18 | 19 | /* dump one chunk; from ldump.c */ 20 | LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip); 21 | 22 | #ifdef luac_c 23 | /* print one chunk; from print.c */ 24 | LUAI_FUNC void luaU_print (const Proto* f, int full); 25 | #endif 26 | 27 | /* for header of binary files -- this is Lua 5.1 */ 28 | #define LUAC_VERSION 0x51 29 | 30 | /* for header of binary files -- this is the official format */ 31 | #define LUAC_FORMAT 0 32 | 33 | /* size of header of binary files */ 34 | #define LUAC_HEADERSIZE 12 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /app/src/main/jni/lua/lvm.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lvm.h,v 2.5.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** Lua virtual machine 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lvm_h 8 | #define lvm_h 9 | 10 | 11 | #include "ldo.h" 12 | #include "lobject.h" 13 | #include "ltm.h" 14 | 15 | 16 | #define tostring(L,o) ((ttype(o) == LUA_TSTRING) || (luaV_tostring(L, o))) 17 | 18 | #define tonumber(o,n) (ttype(o) == LUA_TNUMBER || \ 19 | (((o) = luaV_tonumber(o,n)) != NULL)) 20 | 21 | #define equalobj(L,o1,o2) \ 22 | (ttype(o1) == ttype(o2) && luaV_equalval(L, o1, o2)) 23 | 24 | 25 | LUAI_FUNC int luaV_lessthan (lua_State *L, const TValue *l, const TValue *r); 26 | LUAI_FUNC int luaV_equalval (lua_State *L, const TValue *t1, const TValue *t2); 27 | LUAI_FUNC const TValue *luaV_tonumber (const TValue *obj, TValue *n); 28 | LUAI_FUNC int luaV_tostring (lua_State *L, StkId obj); 29 | LUAI_FUNC void luaV_gettable (lua_State *L, const TValue *t, TValue *key, 30 | StkId val); 31 | LUAI_FUNC void luaV_settable (lua_State *L, const TValue *t, TValue *key, 32 | StkId val); 33 | LUAI_FUNC void luaV_execute (lua_State *L, int nexeccalls); 34 | LUAI_FUNC void luaV_concat (lua_State *L, int total, int last); 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /app/src/main/jni/lua/lzio.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lzio.h,v 1.21.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** Buffered streams 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #ifndef lzio_h 9 | #define lzio_h 10 | 11 | #include "lua.h" 12 | 13 | #include "lmem.h" 14 | 15 | 16 | #define EOZ (-1) /* end of stream */ 17 | 18 | typedef struct Zio ZIO; 19 | 20 | #define char2int(c) cast(int, cast(unsigned char, (c))) 21 | 22 | #define zgetc(z) (((z)->n--)>0 ? char2int(*(z)->p++) : luaZ_fill(z)) 23 | 24 | typedef struct Mbuffer { 25 | char *buffer; 26 | size_t n; 27 | size_t buffsize; 28 | } Mbuffer; 29 | 30 | #define luaZ_initbuffer(L, buff) ((buff)->buffer = NULL, (buff)->buffsize = 0) 31 | 32 | #define luaZ_buffer(buff) ((buff)->buffer) 33 | #define luaZ_sizebuffer(buff) ((buff)->buffsize) 34 | #define luaZ_bufflen(buff) ((buff)->n) 35 | 36 | #define luaZ_resetbuffer(buff) ((buff)->n = 0) 37 | 38 | 39 | #define luaZ_resizebuffer(L, buff, size) \ 40 | (luaM_reallocvector(L, (buff)->buffer, (buff)->buffsize, size, char), \ 41 | (buff)->buffsize = size) 42 | 43 | #define luaZ_freebuffer(L, buff) luaZ_resizebuffer(L, buff, 0) 44 | 45 | 46 | LUAI_FUNC char *luaZ_openspace (lua_State *L, Mbuffer *buff, size_t n); 47 | LUAI_FUNC void luaZ_init (lua_State *L, ZIO *z, lua_Reader reader, 48 | void *data); 49 | LUAI_FUNC size_t luaZ_read (ZIO* z, void* b, size_t n); /* read next n bytes */ 50 | LUAI_FUNC int luaZ_lookahead (ZIO *z); 51 | 52 | 53 | 54 | /* --------- Private Part ------------------ */ 55 | 56 | struct Zio { 57 | size_t n; /* bytes still unread */ 58 | const char *p; /* current position in buffer */ 59 | lua_Reader reader; 60 | void* data; /* additional data */ 61 | lua_State *L; /* Lua state (for reader) */ 62 | }; 63 | 64 | 65 | LUAI_FUNC int luaZ_fill (ZIO *z); 66 | 67 | #endif 68 | -------------------------------------------------------------------------------- /app/src/main/jni/luajava/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/../lua 6 | LOCAL_MODULE := luajava 7 | LOCAL_SRC_FILES := luajava.c 8 | LOCAL_STATIC_LIBRARIES := liblua 9 | 10 | include $(BUILD_SHARED_LIBRARY) 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imlk0/ZjDroid/15b9bf4fb5a5b62c9c5dc2402f04bdaa629b22ad/app/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imlk0/ZjDroid/15b9bf4fb5a5b62c9c5dc2402f04bdaa629b22ad/app/src/main/res/drawable-hdpi/logo.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imlk0/ZjDroid/15b9bf4fb5a5b62c9c5dc2402f04bdaa629b22ad/app/src/main/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imlk0/ZjDroid/15b9bf4fb5a5b62c9c5dc2402f04bdaa629b22ad/app/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imlk0/ZjDroid/15b9bf4fb5a5b62c9c5dc2402f04bdaa629b22ad/app/src/main/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 19 | 20 | -------------------------------------------------------------------------------- /app/src/main/res/menu/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/values-sw600dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/values-sw720dp-land/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 128dp 8 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/values-v11/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/values-v14/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16dp 5 | 16dp 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ZjDroid 5 | Settings 6 | ZjDroid是基于Xposed Framewrok的动态逆向分析模块 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 14 | 15 | 16 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /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 | google() 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.1.2' 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | jcenter() 15 | google() 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imlk0/ZjDroid/15b9bf4fb5a5b62c9c5dc2402f04bdaa629b22ad/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sat Jan 13 09:12:34 PST 2018 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-4.4.1-all.zip 7 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | --------------------------------------------------------------------------------