├── GroundTruth ├── 2800groundtruth.txt ├── Ground Truth 2.txt ├── LibD │ ├── LibD_detected_pairs.txt │ ├── LibD_true_positive_pairs.txt │ └── readme └── LibRadar │ ├── LibRadar_detected_pairs 02-27.txt │ ├── LibRadar_true_positive_pairs 02-27.txt │ └── readme ├── README.md ├── cn ├── fudan │ └── libpecker │ │ ├── core │ │ ├── DealWithXML.java │ │ ├── DecompressionUtils.java │ │ ├── ExecuteCommand.java │ │ ├── ExtractlibbyARP.java │ │ ├── LibApkMapper.java │ │ ├── PackageMapEnumerator.java │ │ ├── PackagePairCandidate.java │ │ ├── ParseApkTest.java │ │ ├── ParserXML.java │ │ ├── PerfectMatch.java │ │ ├── ProcessingDirectory.java │ │ └── ProfileComparator.java │ │ ├── main │ │ ├── CreateBatFile.java │ │ ├── Filter.java │ │ ├── Filtration.java │ │ ├── Integritymatchagain.java │ │ ├── Integrityquickmatch.java │ │ ├── LibAnalysis.java │ │ ├── LibDetective.java │ │ ├── LibRoad.java │ │ ├── LibSeacher.java │ │ ├── ProfileBasedLibPecker.java │ │ ├── ProfileBasedLibPeckertest.java │ │ ├── SupplementDetect.java │ │ ├── SupplementDetective.java │ │ ├── TestDriver.java │ │ ├── aar2dex.java │ │ ├── defanaly.java │ │ ├── getdexfilepath.java │ │ ├── jar2dex.java │ │ ├── resultcompare.java │ │ └── txtExport.java │ │ └── model │ │ ├── ApkPackageProfile.java │ │ ├── ApkProfile.java │ │ ├── CachedClassProfile.java │ │ ├── ConversionPkgName.java │ │ ├── LibPackageProfile.java │ │ ├── LibProfile.java │ │ └── SimpleClassProfile.java └── njust │ ├── analysis │ ├── cfg │ │ ├── BasicBlock.java │ │ ├── CFGAnalysis.java │ │ └── InvokeInstruction.java │ ├── dep │ │ ├── ConcreteDepNode.java │ │ ├── DepAnalysis.java │ │ ├── DepEdge.java │ │ └── DepNode.java │ ├── name │ │ ├── NameAnalysis.java │ │ └── NameCollector.java │ ├── profile │ │ ├── ClassNameProfile.java │ │ ├── ClassProfile.java │ │ ├── FieldProfile.java │ │ ├── MethodProfile.java │ │ ├── ProfileGenerator.java │ │ └── ProfileSignature.java │ ├── tree │ │ ├── ClassNode.java │ │ ├── PackageNode.java │ │ └── TreeAnalysis.java │ └── util │ │ └── DexHelper.java │ └── common │ ├── Apk.java │ ├── CodeContainer.java │ ├── Lib.java │ ├── LibPeckerConfig.java │ └── Sdk.java ├── lib ├── AXMLPrinter2.jar ├── baksmali-2.1.3.jar ├── commons-io-2.5.jar ├── guava-18.0.jar ├── jcommander-1.48.jar ├── jsr305-1.3.9.jar ├── mysql-connector-java-5.1.7-bin.jar └── note ├── sdk ├── android-14.dex ├── android-14.jar ├── android-19.dex ├── android-19.jar ├── android-20.dex ├── android-20.jar ├── android-21.dex ├── android-21.jar ├── android-22.dex ├── android-22.jar ├── android-23.dex ├── android-23.jar └── note └── src ├── HibernateSessionFactory.java ├── META-INF └── MANIFEST.MF ├── cn ├── fudan │ ├── common │ │ └── util │ │ │ ├── HashHelper.java │ │ │ └── PackageNameUtil.java │ └── libpecker │ │ ├── analysis │ │ ├── ClassWeightAnalysis.java │ │ ├── ConfusedAPKAnalysis.java │ │ ├── HazardfunctionAnalysis.java │ │ ├── PackageSortAnalysis.java │ │ └── RootPackageAnalysis.java │ │ ├── core │ │ ├── DealWithApkFile.java │ │ ├── DealWithXML.java │ │ ├── DecompressionUtils.java │ │ ├── ExecuteCommand.java │ │ ├── ExtractlibbyARP.java │ │ ├── LibApkMapper.java │ │ ├── PackageMapEnumerator.java │ │ ├── PackagePairCandidate.java │ │ ├── ParseApkTest.java │ │ ├── ParserXML.java │ │ ├── PerfectMatch.java │ │ ├── ProcessingDirectory.java │ │ └── ProfileComparator.java │ │ ├── main │ │ ├── CreateBatFile.java │ │ ├── Filter.java │ │ ├── Filtration.java │ │ ├── Integritymatchagain.java │ │ ├── Integrityquickmatch.java │ │ ├── LibAnalysis.java │ │ ├── LibDetective.java │ │ ├── LibRoad.java │ │ ├── LibSeacher.java │ │ ├── ProfileBasedLibPecker.java │ │ ├── ProfileBasedLibPeckertest.java │ │ ├── SupplementDetect.java │ │ ├── SupplementDetective.java │ │ ├── TestDriver.java │ │ ├── aar2dex.java │ │ ├── defanaly.java │ │ ├── getdexfilepath.java │ │ ├── jar2dex.java │ │ ├── resultcompare.java │ │ └── txtExport.java │ │ └── model │ │ ├── ApkPackageProfile.java │ │ ├── ApkProfile.java │ │ ├── CachedClassProfile.java │ │ ├── ConversionPkgName.java │ │ ├── LibPackageProfile.java │ │ ├── LibProfile.java │ │ └── SimpleClassProfile.java └── njust │ ├── analysis │ ├── cfg │ │ ├── BasicBlock.java │ │ ├── CFGAnalysis.java │ │ └── InvokeInstruction.java │ ├── dep │ │ ├── ConcreteDepNode.java │ │ ├── DepAnalysis.java │ │ ├── DepEdge.java │ │ └── DepNode.java │ ├── name │ │ ├── NameAnalysis.java │ │ └── NameCollector.java │ ├── profile │ │ ├── ClassNameProfile.java │ │ ├── ClassProfile.java │ │ ├── FieldProfile.java │ │ ├── MethodProfile.java │ │ ├── ProfileGenerator.java │ │ └── ProfileSignature.java │ ├── tree │ │ ├── ClassNode.java │ │ ├── PackageNode.java │ │ └── TreeAnalysis.java │ └── util │ │ └── DexHelper.java │ └── common │ ├── Apk.java │ ├── CodeContainer.java │ ├── Lib.java │ ├── LibPeckerConfig.java │ └── Sdk.java ├── edu └── njust │ ├── bean │ ├── ApkInfo.hbm.xml │ ├── ApkInfo.java │ ├── ApkLib.hbm.xml │ ├── ApkLib.java │ ├── ApkLibInfos.hbm.xml │ ├── ApkLibInfos.java │ ├── ApkLibinfo.hbm.xml │ ├── ApkLibinfo.java │ ├── ApkRootpackageInfo.hbm.xml │ ├── ApkRootpackageInfo.java │ ├── LibClassInfo.hbm.xml │ ├── LibClassInfo.java │ ├── LibInfo.hbm.xml │ ├── LibInfo.java │ ├── LibPackagestructure.hbm.xml │ ├── LibPackagestructure.java │ ├── LibRootpackageInfo.hbm.xml │ ├── LibRootpackageInfo.java │ ├── LibSubpackageInfo.hbm.xml │ ├── LibSubpackageInfo.java │ ├── LibdetectionResult.hbm.xml │ ├── LibdetectionResult.java │ ├── LibpeckerResult.hbm.xml │ ├── LibpeckerResult.java │ ├── LitelibClassInfo.hbm.xml │ ├── LitelibClassInfo.java │ ├── Permission.hbm.xml │ ├── Permission.java │ ├── PermissionClassname.hbm.xml │ └── PermissionClassname.java │ └── otherUtils │ └── HibernateUtil.java ├── hibernate.cfg.xml ├── njust └── lib │ ├── Service │ ├── ApkInfoService.java │ ├── ApkLibInfosService.java │ ├── ApkLibService.java │ ├── ApkLibinfoService.java │ ├── ApkRootpackageInfoService.java │ ├── LibClassInfoService.java │ ├── LibInfoService.java │ ├── LibPackagestructureService.java │ ├── LibRootpackageInfoService.java │ ├── LibSubpackageInfoService.java │ ├── LibdetectionResultService.java │ ├── LibpeckerResultService.java │ ├── LitelibClassInfoService.java │ ├── PermissionClassnameService.java │ └── PermissionService.java │ └── dao │ ├── ApkInfoDAO.java │ ├── ApkLibDAO.java │ ├── ApkLibInfosDAO.java │ ├── ApkLibinfoDAO.java │ ├── ApkRootpackageInfoDAO.java │ ├── BaseDAO.java │ ├── LibClassInfoDAO.java │ ├── LibInfoDAO.java │ ├── LibPackagestructureDAO.java │ ├── LibRootpackageInfoDAO.java │ ├── LibSubpackageInfoDAO.java │ ├── LibdetectionResultDAO.java │ ├── LibpeckerResultDAO.java │ ├── LitelibClassInfoDAO.java │ ├── PermissionClassnameDAO.java │ └── PermissionDAO.java ├── note └── org └── jf ├── dexlib2 ├── AccessFlags.java ├── AnnotationVisibility.java ├── DebugItemType.java ├── DexFileFactory.java ├── Format.java ├── analysis │ ├── AnalysisException.java │ ├── AnalyzedInstruction.java │ ├── AnalyzedMethodUtil.java │ ├── ArrayProto.java │ ├── ClassPath.java │ ├── ClassPathResolver.java │ ├── ClassProto.java │ ├── ClassProvider.java │ ├── CustomInlineMethodResolver.java │ ├── DexClassProvider.java │ ├── InlineMethodResolver.java │ ├── MethodAnalyzer.java │ ├── OdexedFieldInstructionMapper.java │ ├── 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 │ │ ├── BaseMethodProtoReference.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 │ ├── 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 │ │ ├── BuilderInstruction45cc.java │ │ ├── BuilderInstruction4rcc.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 │ ├── OatFile.java │ ├── ZipDexContainer.java │ ├── instruction │ │ ├── DexBackedArrayPayload.java │ │ ├── DexBackedInstruction.java │ │ ├── DexBackedInstruction10t.java │ │ ├── DexBackedInstruction10x.java │ │ ├── DexBackedInstruction11n.java │ │ ├── DexBackedInstruction11x.java │ │ ├── DexBackedInstruction12x.java │ │ ├── DexBackedInstruction20bc.java │ │ ├── DexBackedInstruction20t.java │ │ ├── DexBackedInstruction21c.java │ │ ├── DexBackedInstruction21ih.java │ │ ├── DexBackedInstruction21lh.java │ │ ├── DexBackedInstruction21s.java │ │ ├── DexBackedInstruction21t.java │ │ ├── DexBackedInstruction22b.java │ │ ├── DexBackedInstruction22c.java │ │ ├── DexBackedInstruction22cs.java │ │ ├── DexBackedInstruction22s.java │ │ ├── DexBackedInstruction22t.java │ │ ├── DexBackedInstruction22x.java │ │ ├── DexBackedInstruction23x.java │ │ ├── DexBackedInstruction30t.java │ │ ├── DexBackedInstruction31c.java │ │ ├── DexBackedInstruction31i.java │ │ ├── DexBackedInstruction31t.java │ │ ├── DexBackedInstruction32x.java │ │ ├── DexBackedInstruction35c.java │ │ ├── DexBackedInstruction35mi.java │ │ ├── DexBackedInstruction35ms.java │ │ ├── DexBackedInstruction3rc.java │ │ ├── DexBackedInstruction3rmi.java │ │ ├── DexBackedInstruction3rms.java │ │ ├── DexBackedInstruction45cc.java │ │ ├── DexBackedInstruction4rcc.java │ │ ├── DexBackedInstruction51l.java │ │ ├── DexBackedPackedSwitchPayload.java │ │ ├── DexBackedSparseSwitchPayload.java │ │ └── DexBackedUnknownInstruction.java │ ├── raw │ │ ├── AnnotationDirectoryItem.java │ │ ├── AnnotationItem.java │ │ ├── AnnotationSetItem.java │ │ ├── AnnotationSetRefList.java │ │ ├── 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 │ │ ├── DexBackedMethodProtoReference.java │ │ ├── DexBackedMethodReference.java │ │ ├── DexBackedReference.java │ │ ├── DexBackedStringReference.java │ │ └── DexBackedTypeReference.java │ ├── util │ │ ├── AnnotationsDirectory.java │ │ ├── DebugInfo.java │ │ ├── FixedSizeList.java │ │ ├── FixedSizeSet.java │ │ ├── ParameterIterator.java │ │ ├── StaticInitialValueIterator.java │ │ ├── VariableSizeCollection.java │ │ ├── VariableSizeIterator.java │ │ ├── VariableSizeList.java │ │ ├── VariableSizeListIterator.java │ │ ├── VariableSizeLookaheadIterator.java │ │ └── VariableSizeSet.java │ └── value │ │ ├── DexBackedAnnotationEncodedValue.java │ │ ├── DexBackedArrayEncodedValue.java │ │ ├── DexBackedEncodedValue.java │ │ ├── DexBackedEnumEncodedValue.java │ │ ├── DexBackedFieldEncodedValue.java │ │ ├── DexBackedMethodEncodedValue.java │ │ ├── DexBackedStringEncodedValue.java │ │ └── DexBackedTypeEncodedValue.java ├── iface │ ├── Annotatable.java │ ├── Annotation.java │ ├── AnnotationElement.java │ ├── BasicAnnotation.java │ ├── ClassDef.java │ ├── DexFile.java │ ├── ExceptionHandler.java │ ├── Field.java │ ├── Member.java │ ├── Method.java │ ├── MethodImplementation.java │ ├── MethodParameter.java │ ├── MultiDexContainer.java │ ├── TryBlock.java │ ├── debug │ │ ├── DebugItem.java │ │ ├── EndLocal.java │ │ ├── EpilogueBegin.java │ │ ├── LineNumber.java │ │ ├── LocalInfo.java │ │ ├── PrologueEnd.java │ │ ├── RestartLocal.java │ │ ├── SetSourceFile.java │ │ └── StartLocal.java │ ├── instruction │ │ ├── DualReferenceInstruction.java │ │ ├── FieldOffsetInstruction.java │ │ ├── FiveRegisterInstruction.java │ │ ├── HatLiteralInstruction.java │ │ ├── InlineIndexInstruction.java │ │ ├── Instruction.java │ │ ├── LongHatLiteralInstruction.java │ │ ├── NarrowHatLiteralInstruction.java │ │ ├── NarrowLiteralInstruction.java │ │ ├── OffsetInstruction.java │ │ ├── OneRegisterInstruction.java │ │ ├── PayloadInstruction.java │ │ ├── ReferenceInstruction.java │ │ ├── RegisterRangeInstruction.java │ │ ├── SwitchElement.java │ │ ├── SwitchPayload.java │ │ ├── ThreeRegisterInstruction.java │ │ ├── TwoRegisterInstruction.java │ │ ├── VariableRegisterInstruction.java │ │ ├── VerificationErrorInstruction.java │ │ ├── VtableIndexInstruction.java │ │ ├── WideLiteralInstruction.java │ │ └── formats │ │ │ ├── ArrayPayload.java │ │ │ ├── Instruction10t.java │ │ │ ├── Instruction10x.java │ │ │ ├── Instruction11n.java │ │ │ ├── Instruction11x.java │ │ │ ├── Instruction12x.java │ │ │ ├── Instruction20bc.java │ │ │ ├── Instruction20t.java │ │ │ ├── Instruction21c.java │ │ │ ├── Instruction21ih.java │ │ │ ├── Instruction21lh.java │ │ │ ├── Instruction21s.java │ │ │ ├── Instruction21t.java │ │ │ ├── Instruction22b.java │ │ │ ├── Instruction22c.java │ │ │ ├── Instruction22cs.java │ │ │ ├── Instruction22s.java │ │ │ ├── Instruction22t.java │ │ │ ├── Instruction22x.java │ │ │ ├── Instruction23x.java │ │ │ ├── Instruction30t.java │ │ │ ├── Instruction31c.java │ │ │ ├── Instruction31i.java │ │ │ ├── Instruction31t.java │ │ │ ├── Instruction32x.java │ │ │ ├── Instruction35c.java │ │ │ ├── Instruction35mi.java │ │ │ ├── Instruction35ms.java │ │ │ ├── Instruction3rc.java │ │ │ ├── Instruction3rmi.java │ │ │ ├── Instruction3rms.java │ │ │ ├── Instruction45cc.java │ │ │ ├── Instruction4rcc.java │ │ │ ├── Instruction51l.java │ │ │ ├── PackedSwitchPayload.java │ │ │ ├── SparseSwitchPayload.java │ │ │ └── UnknownInstruction.java │ ├── reference │ │ ├── FieldReference.java │ │ ├── MethodProtoReference.java │ │ ├── MethodReference.java │ │ ├── Reference.java │ │ ├── StringReference.java │ │ └── TypeReference.java │ └── value │ │ ├── AnnotationEncodedValue.java │ │ ├── ArrayEncodedValue.java │ │ ├── BooleanEncodedValue.java │ │ ├── ByteEncodedValue.java │ │ ├── CharEncodedValue.java │ │ ├── DoubleEncodedValue.java │ │ ├── EncodedValue.java │ │ ├── EnumEncodedValue.java │ │ ├── FieldEncodedValue.java │ │ ├── FloatEncodedValue.java │ │ ├── IntEncodedValue.java │ │ ├── LongEncodedValue.java │ │ ├── MethodEncodedValue.java │ │ ├── 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 │ │ ├── ImmutableMethodProtoReference.java │ │ ├── ImmutableMethodReference.java │ │ ├── ImmutableReference.java │ │ ├── ImmutableReferenceFactory.java │ │ ├── ImmutableStringReference.java │ │ └── ImmutableTypeReference.java │ ├── util │ │ ├── CharSequenceConverter.java │ │ └── ParamUtil.java │ └── value │ │ ├── ImmutableAnnotationEncodedValue.java │ │ ├── ImmutableArrayEncodedValue.java │ │ ├── ImmutableBooleanEncodedValue.java │ │ ├── ImmutableByteEncodedValue.java │ │ ├── ImmutableCharEncodedValue.java │ │ ├── ImmutableDoubleEncodedValue.java │ │ ├── ImmutableEncodedValue.java │ │ ├── ImmutableEncodedValueFactory.java │ │ ├── ImmutableEnumEncodedValue.java │ │ ├── ImmutableFieldEncodedValue.java │ │ ├── ImmutableFloatEncodedValue.java │ │ ├── ImmutableIntEncodedValue.java │ │ ├── ImmutableLongEncodedValue.java │ │ ├── ImmutableMethodEncodedValue.java │ │ ├── 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 │ ├── DexUtil.java │ ├── EncodedValueUtils.java │ ├── FieldUtil.java │ ├── InstructionOffsetMap.java │ ├── InstructionUtil.java │ ├── MethodUtil.java │ ├── Preconditions.java │ ├── ReferenceUtil.java │ ├── SyntheticAccessorFSM.java │ ├── SyntheticAccessorResolver.java │ └── TypeUtils.java └── writer │ ├── AnnotationSection.java │ ├── AnnotationSetSection.java │ ├── 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 │ ├── BaseBuilderPool.java │ ├── BuilderAnnotation.java │ ├── BuilderAnnotationElement.java │ ├── BuilderAnnotationPool.java │ ├── BuilderAnnotationSet.java │ ├── BuilderAnnotationSetPool.java │ ├── BuilderClassDef.java │ ├── BuilderClassPool.java │ ├── BuilderEncodedValues.java │ ├── BuilderExceptionHandler.java │ ├── BuilderField.java │ ├── BuilderFieldPool.java │ ├── BuilderFieldReference.java │ ├── BuilderMapEntryCollection.java │ ├── BuilderMethod.java │ ├── BuilderMethodParameter.java │ ├── BuilderMethodPool.java │ ├── BuilderMethodProtoReference.java │ ├── BuilderMethodReference.java │ ├── BuilderProtoPool.java │ ├── BuilderReference.java │ ├── BuilderStringPool.java │ ├── BuilderStringReference.java │ ├── BuilderTryBlock.java │ ├── BuilderTypeList.java │ ├── BuilderTypeListPool.java │ ├── BuilderTypePool.java │ ├── BuilderTypeReference.java │ └── DexBuilder.java │ ├── io │ ├── DeferredOutputStream.java │ ├── DeferredOutputStreamFactory.java │ ├── DexDataStore.java │ ├── FileDataStore.java │ ├── FileDeferredOutputStream.java │ ├── MemoryDataStore.java │ └── MemoryDeferredOutputStream.java │ ├── pool │ ├── AnnotationPool.java │ ├── AnnotationSetPool.java │ ├── BaseIndexPool.java │ ├── BaseNullableOffsetPool.java │ ├── BaseOffsetPool.java │ ├── BasePool.java │ ├── ClassPool.java │ ├── DexPool.java │ ├── FieldPool.java │ ├── Markable.java │ ├── MethodPool.java │ ├── PoolClassDef.java │ ├── PoolMethod.java │ ├── PoolMethodProto.java │ ├── ProtoPool.java │ ├── StringPool.java │ ├── StringTypeBasePool.java │ ├── TypeListPool.java │ └── TypePool.java │ └── util │ └── TryListBuilder.java └── util ├── AbstractForwardSequentialList.java ├── AbstractListIterator.java ├── AlignmentUtils.java ├── ArraySortedSet.java ├── BitSetUtils.java ├── BlankReader.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 ├── OldWrappedIndentingWriter.java ├── PathUtil.java ├── RandomAccessFileInputStream.java ├── RandomAccessFileOutputStream.java ├── SparseArray.java ├── SparseIntArray.java ├── StringUtils.java ├── StringWrapper.java ├── TextUtils.java ├── TwoColumnOutput.java ├── Utf8Utils.java ├── WrappedIndentingWriter.java └── jcommander ├── ColonParameterSplitter.java ├── Command.java ├── ExtendedCommands.java ├── ExtendedParameter.java ├── ExtendedParameters.java └── HelpFormatter.java /GroundTruth/Ground Truth 2.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/GroundTruth/Ground Truth 2.txt -------------------------------------------------------------------------------- /GroundTruth/LibD/LibD_detected_pairs.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/GroundTruth/LibD/LibD_detected_pairs.txt -------------------------------------------------------------------------------- /GroundTruth/LibD/LibD_true_positive_pairs.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/GroundTruth/LibD/LibD_true_positive_pairs.txt -------------------------------------------------------------------------------- /GroundTruth/LibD/readme: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /GroundTruth/LibRadar/readme: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /cn/fudan/libpecker/core/DealWithXML.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/cn/fudan/libpecker/core/DealWithXML.java -------------------------------------------------------------------------------- /cn/fudan/libpecker/core/DecompressionUtils.java: -------------------------------------------------------------------------------- 1 | package cn.fudan.libpecker.core; 2 | 3 | public class DecompressionUtils { 4 | 5 | public String doDecompression(String apkFilePath, String targetFolderPath) { 6 | // TODO Auto-generated method stub 7 | return null; 8 | } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /cn/fudan/libpecker/core/ExecuteCommand.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/cn/fudan/libpecker/core/ExecuteCommand.java -------------------------------------------------------------------------------- /cn/fudan/libpecker/core/ExtractlibbyARP.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/cn/fudan/libpecker/core/ExtractlibbyARP.java -------------------------------------------------------------------------------- /cn/fudan/libpecker/core/ParseApkTest.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/cn/fudan/libpecker/core/ParseApkTest.java -------------------------------------------------------------------------------- /cn/fudan/libpecker/core/ParserXML.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/cn/fudan/libpecker/core/ParserXML.java -------------------------------------------------------------------------------- /cn/fudan/libpecker/core/ProcessingDirectory.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/cn/fudan/libpecker/core/ProcessingDirectory.java -------------------------------------------------------------------------------- /cn/fudan/libpecker/core/ProfileComparator.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/cn/fudan/libpecker/core/ProfileComparator.java -------------------------------------------------------------------------------- /cn/fudan/libpecker/main/CreateBatFile.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/cn/fudan/libpecker/main/CreateBatFile.java -------------------------------------------------------------------------------- /cn/fudan/libpecker/main/Filter.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/cn/fudan/libpecker/main/Filter.java -------------------------------------------------------------------------------- /cn/fudan/libpecker/main/Filtration.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/cn/fudan/libpecker/main/Filtration.java -------------------------------------------------------------------------------- /cn/fudan/libpecker/main/Integritymatchagain.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/cn/fudan/libpecker/main/Integritymatchagain.java -------------------------------------------------------------------------------- /cn/fudan/libpecker/main/Integrityquickmatch.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/cn/fudan/libpecker/main/Integrityquickmatch.java -------------------------------------------------------------------------------- /cn/fudan/libpecker/main/LibAnalysis.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/cn/fudan/libpecker/main/LibAnalysis.java -------------------------------------------------------------------------------- /cn/fudan/libpecker/main/LibDetective.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/cn/fudan/libpecker/main/LibDetective.java -------------------------------------------------------------------------------- /cn/fudan/libpecker/main/LibRoad.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/cn/fudan/libpecker/main/LibRoad.java -------------------------------------------------------------------------------- /cn/fudan/libpecker/main/LibSeacher.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/cn/fudan/libpecker/main/LibSeacher.java -------------------------------------------------------------------------------- /cn/fudan/libpecker/main/ProfileBasedLibPecker.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/cn/fudan/libpecker/main/ProfileBasedLibPecker.java -------------------------------------------------------------------------------- /cn/fudan/libpecker/main/ProfileBasedLibPeckertest.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/cn/fudan/libpecker/main/ProfileBasedLibPeckertest.java -------------------------------------------------------------------------------- /cn/fudan/libpecker/main/SupplementDetect.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/cn/fudan/libpecker/main/SupplementDetect.java -------------------------------------------------------------------------------- /cn/fudan/libpecker/main/SupplementDetective.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/cn/fudan/libpecker/main/SupplementDetective.java -------------------------------------------------------------------------------- /cn/fudan/libpecker/main/TestDriver.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/cn/fudan/libpecker/main/TestDriver.java -------------------------------------------------------------------------------- /cn/fudan/libpecker/main/aar2dex.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/cn/fudan/libpecker/main/aar2dex.java -------------------------------------------------------------------------------- /cn/fudan/libpecker/main/defanaly.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/cn/fudan/libpecker/main/defanaly.java -------------------------------------------------------------------------------- /cn/fudan/libpecker/main/getdexfilepath.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/cn/fudan/libpecker/main/getdexfilepath.java -------------------------------------------------------------------------------- /cn/fudan/libpecker/main/jar2dex.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/cn/fudan/libpecker/main/jar2dex.java -------------------------------------------------------------------------------- /cn/fudan/libpecker/main/resultcompare.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/cn/fudan/libpecker/main/resultcompare.java -------------------------------------------------------------------------------- /cn/fudan/libpecker/main/txtExport.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/cn/fudan/libpecker/main/txtExport.java -------------------------------------------------------------------------------- /cn/fudan/libpecker/model/ApkProfile.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/cn/fudan/libpecker/model/ApkProfile.java -------------------------------------------------------------------------------- /cn/fudan/libpecker/model/ConversionPkgName.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/cn/fudan/libpecker/model/ConversionPkgName.java -------------------------------------------------------------------------------- /cn/fudan/libpecker/model/LibProfile.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/cn/fudan/libpecker/model/LibProfile.java -------------------------------------------------------------------------------- /cn/fudan/libpecker/model/SimpleClassProfile.java: -------------------------------------------------------------------------------- 1 | package cn.fudan.libpecker.model; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * Created by yuanxzhang on 19/05/2017. 7 | */ 8 | public interface SimpleClassProfile { 9 | String getClassName(); 10 | 11 | String getClassHash(); 12 | String getClassHashStrict(); 13 | 14 | String getBasicHash(); 15 | String getBasicHashStrict(); 16 | 17 | List getMethodHashList(); 18 | List getMethodHashStrictList(); 19 | 20 | List getFieldHashList(); 21 | List getFieldHashStrictList(); 22 | 23 | String getMethoddescriptorHashList(); 24 | } 25 | -------------------------------------------------------------------------------- /cn/njust/analysis/cfg/InvokeInstruction.java: -------------------------------------------------------------------------------- 1 | package cn.njust.analysis.cfg; 2 | 3 | import org.jf.dexlib2.dexbacked.instruction.DexBackedInstruction; 4 | import org.jf.dexlib2.iface.instruction.Instruction; 5 | import org.jf.dexlib2.iface.instruction.ReferenceInstruction; 6 | import org.jf.dexlib2.iface.reference.Reference; 7 | import org.jf.dexlib2.util.ReferenceUtil; 8 | 9 | public class InvokeInstruction { 10 | public final BasicBlock basicBlock; 11 | public final Instruction instruction; 12 | /** 13 | * The instruction index of this inside its basic block. 14 | */ 15 | public final int index; 16 | 17 | public InvokeInstruction(BasicBlock basicBlock, Instruction i,int index) { 18 | this.basicBlock = basicBlock; 19 | this.instruction = i; 20 | this.index = index; 21 | } 22 | 23 | /** 24 | * Get the corresponding callee of this invoke instruction. The result is a 25 | * string representation, not a method reference, for the callee can be an 26 | * api or any method implemented by this dex file. 27 | * 28 | * Example of return value: 29 | * Ljava/lang/Runnable;->run()V 30 | * 31 | * @return The callee of this instruction, represented by a string. 32 | */ 33 | public String getCallee() { 34 | StringBuilder s = new StringBuilder(); 35 | Reference reference = ((ReferenceInstruction) instruction) 36 | .getReference(); 37 | s.append(ReferenceUtil.getReferenceString(reference)); 38 | 39 | return s.toString(); 40 | } 41 | 42 | public int getStartAddress(){ 43 | return ((DexBackedInstruction)this.instruction).instructionStart; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /cn/njust/analysis/dep/ConcreteDepNode.java: -------------------------------------------------------------------------------- 1 | package cn.njust.analysis.dep; 2 | 3 | import cn.njust.analysis.profile.ClassProfile; 4 | 5 | /** 6 | * Created by lemonleaves on 2017/4/14. 7 | */ 8 | public class ConcreteDepNode extends DepNode { 9 | public ClassProfile classProfile; 10 | public int[][] countOfDepEdgePointToEachTypeOfClass; // DepEdge: 6 (DepEdgeType) * TypeOfClass: 3 (system/package/other) 11 | // 6 types: DEP_EDGE_EXTENDS, DEP_EDGE_IMPLEMENTS, DEP_EDGE_FIELD_IN, DEP_EDGE_METHOD_PARAMETER, DEP_EDGE_METHOD_RETURN, DEP_EDGE_METHOD_EXCEPTION 12 | 13 | public ConcreteDepNode(ClassProfile classProfile) { 14 | super(classProfile.getClassName()); 15 | this.classProfile = classProfile; 16 | this.countOfDepEdgePointToEachTypeOfClass = new int[6][3]; 17 | } 18 | 19 | public void addTypecount(int edgetype, int pointtype) { 20 | this.countOfDepEdgePointToEachTypeOfClass[edgetype][pointtype]++; 21 | } 22 | 23 | public int getCountByDepEdgeAndPointToType(int edgetype, int pointtype) { 24 | return this.countOfDepEdgePointToEachTypeOfClass[edgetype][pointtype]; 25 | } 26 | 27 | } -------------------------------------------------------------------------------- /cn/njust/analysis/dep/DepAnalysis.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/cn/njust/analysis/dep/DepAnalysis.java -------------------------------------------------------------------------------- /cn/njust/analysis/dep/DepEdge.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/cn/njust/analysis/dep/DepEdge.java -------------------------------------------------------------------------------- /cn/njust/analysis/dep/DepNode.java: -------------------------------------------------------------------------------- 1 | package cn.njust.analysis.dep; 2 | 3 | import java.util.HashSet; 4 | import java.util.Set; 5 | 6 | /** 7 | * Created by lemonleaves on 2017/4/14. 8 | */ 9 | public class DepNode { 10 | public Set edges; 11 | public Set sinkedges; 12 | public String classname; 13 | 14 | public DepNode(String classname) { 15 | this.classname = classname; 16 | this.edges = new HashSet<>(); 17 | this.sinkedges = new HashSet<>(); 18 | } 19 | 20 | public void addDepEdge(DepEdge de) { 21 | this.edges.add(de); 22 | } 23 | 24 | public void addSinkEdge(DepEdge de) { 25 | this.sinkedges.add(de); 26 | } 27 | } 28 | 29 | -------------------------------------------------------------------------------- /cn/njust/analysis/name/NameAnalysis.java: -------------------------------------------------------------------------------- 1 | package cn.njust.analysis.name; 2 | 3 | import cn.njust.common.CodeContainer; 4 | 5 | import java.io.*; 6 | 7 | /** 8 | * Created by yuanxzhang on 12/03/2017. 9 | */ 10 | public class NameAnalysis { 11 | public static NameCollector analyzeNames(CodeContainer container) { 12 | return new NameCollector(container); 13 | } 14 | 15 | public static void persistNamesToFile(NameCollector collector, File file) { 16 | try { 17 | ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(file)); 18 | oos.writeObject(collector); 19 | oos.close(); 20 | } catch (IOException e) { 21 | e.printStackTrace(); 22 | throw new RuntimeException(e.getMessage()); 23 | } 24 | } 25 | 26 | public static NameCollector readNamesFromFile(File file) { 27 | NameCollector collector = null; 28 | try { 29 | ObjectInputStream iis = new ObjectInputStream(new FileInputStream(file)); 30 | collector = (NameCollector) iis.readObject(); 31 | iis.close(); 32 | } catch (IOException e) { 33 | e.printStackTrace(); 34 | throw new RuntimeException(e.getMessage()); 35 | } catch (ClassNotFoundException e) { 36 | e.printStackTrace(); 37 | throw new RuntimeException(e.getMessage()); 38 | } 39 | return collector; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /cn/njust/analysis/profile/ProfileSignature.java: -------------------------------------------------------------------------------- 1 | package cn.njust.analysis.profile; 2 | 3 | /** 4 | * Created by yuanxzhang on 15/04/2017. 5 | */ 6 | public interface ProfileSignature { 7 | String CLASS_NAME_SAME_PKG = "X"; 8 | String CLASS_NAME_OTHER = "Y"; 9 | String FINAL_VALUE_UNINITIALIZED = "uninitialized"; 10 | String FINAL_VALUE_ARRAY = "array"; 11 | String FINAL_VALUE_ANNOTATION = "annotation"; 12 | String FINAL_VALUE_METHOD = "method"; 13 | String FINAL_VALUE_FIELD = "field"; 14 | String FINAL_VALUE_TYPE = "type"; 15 | String PROFILE_SEP_COMMA = ","; 16 | String PROFILE_SEP_SEMICOLON = ";"; 17 | 18 | String composeSignature(); 19 | String composeSignatureStrict(); 20 | } 21 | -------------------------------------------------------------------------------- /cn/njust/common/CodeContainer.java: -------------------------------------------------------------------------------- 1 | package cn.njust.common; 2 | 3 | import org.jf.dexlib2.iface.ClassDef; 4 | 5 | import java.util.Set; 6 | 7 | /** 8 | * Created by yuanxzhang on 08/03/2017. 9 | */ 10 | public abstract class CodeContainer { 11 | public abstract String codeHash(); 12 | public abstract String codePath(); 13 | public abstract Set getClasses(); 14 | } 15 | -------------------------------------------------------------------------------- /cn/njust/common/Lib.java: -------------------------------------------------------------------------------- 1 | package cn.njust.common; 2 | 3 | import cn.fudan.common.util.HashHelper; 4 | import org.jf.dexlib2.DexFileFactory; 5 | import org.jf.dexlib2.Opcodes; 6 | import org.jf.dexlib2.iface.ClassDef; 7 | import org.jf.dexlib2.iface.DexFile; 8 | 9 | import java.io.File; 10 | import java.io.IOException; 11 | import java.util.Set; 12 | 13 | /** 14 | * Created by yuanxzhang on 03/03/2017. 15 | */ 16 | public class Lib extends CodeContainer { 17 | private String dexHash; 18 | private String dexPath; 19 | private DexFile dex; 20 | 21 | @Override 22 | public String codeHash() { 23 | return dexHash; 24 | } 25 | 26 | @Override 27 | public String codePath(){return dexPath;} 28 | 29 | @Override 30 | public Set getClasses() { 31 | return dex.getClasses(); 32 | } 33 | 34 | public static Lib loadFromFile(String libFilePath) { 35 | Lib lib = new Lib(); 36 | try { 37 | lib.dex = DexFileFactory.loadDexFile(libFilePath, Opcodes.getDefault()); 38 | lib.dexHash = HashHelper.md5_32(new File(libFilePath)); 39 | lib.dexPath = libFilePath; 40 | 41 | return lib; 42 | } catch (IOException e) { 43 | e.printStackTrace(); 44 | } 45 | return null; 46 | } 47 | 48 | public static Lib loadFromFile(File libFile){ 49 | Lib lib = new Lib(); 50 | try { 51 | lib.dex = DexFileFactory.loadDexFile(libFile.getPath(), Opcodes.getDefault()); 52 | lib.dexHash = HashHelper.md5_32(libFile); 53 | lib.dexPath = libFile.getPath(); 54 | 55 | return lib; 56 | } catch (IOException e) { 57 | e.printStackTrace(); 58 | } 59 | return null; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /cn/njust/common/LibPeckerConfig.java: -------------------------------------------------------------------------------- 1 | package cn.njust.common; 2 | 3 | import org.apache.commons.io.FileUtils; 4 | 5 | import java.io.File; 6 | import java.io.IOException; 7 | import java.util.List; 8 | 9 | /** 10 | * Created by yuanxzhang on 14/03/2017. 11 | */ 12 | public class LibPeckerConfig { 13 | public static final double LIB_APK_PAIR_THRESHOLD = 0.5; 14 | 15 | public static boolean DEBUG_LIBPECKER = true; 16 | public static String DEBUG_LIBPECKER_LIB_PKG_NAME = ""; 17 | public static String DEBUG_LIBPECKER_APK_PKG_NAME = ""; 18 | 19 | public static final String DALVIK_ANNOTATION_PKG = "dalvik.annotation."; 20 | public static final String DALVIK_SIGNATURE = "dalvik.annotation.Signature"; 21 | public static final String DALVIK_INNER_CLASS = "dalvik.annotation.InnerClass"; 22 | public static final String DALVIK_THROWS = "dalvik.annotation.Throws"; 23 | public static final String DALVIK_ANNOTATION_DEFAULT = "dalvik.annotation.AnnotationDefault"; 24 | 25 | 26 | public static final String DEFAULT_SDK_DEX_PATH = "./sdk/android-20.dex"; 27 | } 28 | -------------------------------------------------------------------------------- /lib/AXMLPrinter2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/lib/AXMLPrinter2.jar -------------------------------------------------------------------------------- /lib/baksmali-2.1.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/lib/baksmali-2.1.3.jar -------------------------------------------------------------------------------- /lib/commons-io-2.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/lib/commons-io-2.5.jar -------------------------------------------------------------------------------- /lib/guava-18.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/lib/guava-18.0.jar -------------------------------------------------------------------------------- /lib/jcommander-1.48.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/lib/jcommander-1.48.jar -------------------------------------------------------------------------------- /lib/jsr305-1.3.9.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/lib/jsr305-1.3.9.jar -------------------------------------------------------------------------------- /lib/mysql-connector-java-5.1.7-bin.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/lib/mysql-connector-java-5.1.7-bin.jar -------------------------------------------------------------------------------- /lib/note: -------------------------------------------------------------------------------- 1 | here is for the libraries needed in our project 2 | -------------------------------------------------------------------------------- /sdk/android-14.dex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/sdk/android-14.dex -------------------------------------------------------------------------------- /sdk/android-14.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/sdk/android-14.jar -------------------------------------------------------------------------------- /sdk/android-19.dex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/sdk/android-19.dex -------------------------------------------------------------------------------- /sdk/android-19.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/sdk/android-19.jar -------------------------------------------------------------------------------- /sdk/android-20.dex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/sdk/android-20.dex -------------------------------------------------------------------------------- /sdk/android-20.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/sdk/android-20.jar -------------------------------------------------------------------------------- /sdk/android-21.dex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/sdk/android-21.dex -------------------------------------------------------------------------------- /sdk/android-21.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/sdk/android-21.jar -------------------------------------------------------------------------------- /sdk/android-22.dex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/sdk/android-22.dex -------------------------------------------------------------------------------- /sdk/android-22.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/sdk/android-22.jar -------------------------------------------------------------------------------- /sdk/android-23.dex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/sdk/android-23.dex -------------------------------------------------------------------------------- /sdk/android-23.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/sdk/android-23.jar -------------------------------------------------------------------------------- /sdk/note: -------------------------------------------------------------------------------- 1 | this is for various versions of SDK 2 | -------------------------------------------------------------------------------- /src/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: lib/commons-io-2.5.jar lib/guava-18.0.jar lib/jcommander-1 3 | .48.jar lib/jsr305-1.3.9.jar 4 | Main-Class: cn.fudan.libpecker.main.ProfileBasedLibPecker 5 | 6 | -------------------------------------------------------------------------------- /src/cn/fudan/libpecker/analysis/ConfusedAPKAnalysis.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/cn/fudan/libpecker/analysis/ConfusedAPKAnalysis.java -------------------------------------------------------------------------------- /src/cn/fudan/libpecker/analysis/HazardfunctionAnalysis.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/cn/fudan/libpecker/analysis/HazardfunctionAnalysis.java -------------------------------------------------------------------------------- /src/cn/fudan/libpecker/analysis/PackageSortAnalysis.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/cn/fudan/libpecker/analysis/PackageSortAnalysis.java -------------------------------------------------------------------------------- /src/cn/fudan/libpecker/analysis/RootPackageAnalysis.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/cn/fudan/libpecker/analysis/RootPackageAnalysis.java -------------------------------------------------------------------------------- /src/cn/fudan/libpecker/core/DealWithApkFile.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/cn/fudan/libpecker/core/DealWithApkFile.java -------------------------------------------------------------------------------- /src/cn/fudan/libpecker/core/DealWithXML.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/cn/fudan/libpecker/core/DealWithXML.java -------------------------------------------------------------------------------- /src/cn/fudan/libpecker/core/DecompressionUtils.java: -------------------------------------------------------------------------------- 1 | package cn.fudan.libpecker.core; 2 | 3 | public class DecompressionUtils { 4 | 5 | public String doDecompression(String apkFilePath, String targetFolderPath) { 6 | // TODO Auto-generated method stub 7 | return null; 8 | } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /src/cn/fudan/libpecker/core/ExecuteCommand.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/cn/fudan/libpecker/core/ExecuteCommand.java -------------------------------------------------------------------------------- /src/cn/fudan/libpecker/core/ExtractlibbyARP.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/cn/fudan/libpecker/core/ExtractlibbyARP.java -------------------------------------------------------------------------------- /src/cn/fudan/libpecker/core/ParseApkTest.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/cn/fudan/libpecker/core/ParseApkTest.java -------------------------------------------------------------------------------- /src/cn/fudan/libpecker/core/ParserXML.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/cn/fudan/libpecker/core/ParserXML.java -------------------------------------------------------------------------------- /src/cn/fudan/libpecker/core/ProcessingDirectory.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/cn/fudan/libpecker/core/ProcessingDirectory.java -------------------------------------------------------------------------------- /src/cn/fudan/libpecker/core/ProfileComparator.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/cn/fudan/libpecker/core/ProfileComparator.java -------------------------------------------------------------------------------- /src/cn/fudan/libpecker/main/CreateBatFile.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/cn/fudan/libpecker/main/CreateBatFile.java -------------------------------------------------------------------------------- /src/cn/fudan/libpecker/main/Filter.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/cn/fudan/libpecker/main/Filter.java -------------------------------------------------------------------------------- /src/cn/fudan/libpecker/main/Filtration.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/cn/fudan/libpecker/main/Filtration.java -------------------------------------------------------------------------------- /src/cn/fudan/libpecker/main/Integritymatchagain.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/cn/fudan/libpecker/main/Integritymatchagain.java -------------------------------------------------------------------------------- /src/cn/fudan/libpecker/main/Integrityquickmatch.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/cn/fudan/libpecker/main/Integrityquickmatch.java -------------------------------------------------------------------------------- /src/cn/fudan/libpecker/main/LibAnalysis.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/cn/fudan/libpecker/main/LibAnalysis.java -------------------------------------------------------------------------------- /src/cn/fudan/libpecker/main/LibDetective.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/cn/fudan/libpecker/main/LibDetective.java -------------------------------------------------------------------------------- /src/cn/fudan/libpecker/main/LibRoad.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/cn/fudan/libpecker/main/LibRoad.java -------------------------------------------------------------------------------- /src/cn/fudan/libpecker/main/LibSeacher.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/cn/fudan/libpecker/main/LibSeacher.java -------------------------------------------------------------------------------- /src/cn/fudan/libpecker/main/ProfileBasedLibPecker.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/cn/fudan/libpecker/main/ProfileBasedLibPecker.java -------------------------------------------------------------------------------- /src/cn/fudan/libpecker/main/ProfileBasedLibPeckertest.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/cn/fudan/libpecker/main/ProfileBasedLibPeckertest.java -------------------------------------------------------------------------------- /src/cn/fudan/libpecker/main/SupplementDetect.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/cn/fudan/libpecker/main/SupplementDetect.java -------------------------------------------------------------------------------- /src/cn/fudan/libpecker/main/SupplementDetective.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/cn/fudan/libpecker/main/SupplementDetective.java -------------------------------------------------------------------------------- /src/cn/fudan/libpecker/main/TestDriver.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/cn/fudan/libpecker/main/TestDriver.java -------------------------------------------------------------------------------- /src/cn/fudan/libpecker/main/aar2dex.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/cn/fudan/libpecker/main/aar2dex.java -------------------------------------------------------------------------------- /src/cn/fudan/libpecker/main/defanaly.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/cn/fudan/libpecker/main/defanaly.java -------------------------------------------------------------------------------- /src/cn/fudan/libpecker/main/getdexfilepath.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/cn/fudan/libpecker/main/getdexfilepath.java -------------------------------------------------------------------------------- /src/cn/fudan/libpecker/main/jar2dex.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/cn/fudan/libpecker/main/jar2dex.java -------------------------------------------------------------------------------- /src/cn/fudan/libpecker/main/resultcompare.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/cn/fudan/libpecker/main/resultcompare.java -------------------------------------------------------------------------------- /src/cn/fudan/libpecker/main/txtExport.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/cn/fudan/libpecker/main/txtExport.java -------------------------------------------------------------------------------- /src/cn/fudan/libpecker/model/ApkProfile.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/cn/fudan/libpecker/model/ApkProfile.java -------------------------------------------------------------------------------- /src/cn/fudan/libpecker/model/ConversionPkgName.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/cn/fudan/libpecker/model/ConversionPkgName.java -------------------------------------------------------------------------------- /src/cn/fudan/libpecker/model/LibProfile.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/cn/fudan/libpecker/model/LibProfile.java -------------------------------------------------------------------------------- /src/cn/fudan/libpecker/model/SimpleClassProfile.java: -------------------------------------------------------------------------------- 1 | package cn.fudan.libpecker.model; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * Created by yuanxzhang on 19/05/2017. 7 | */ 8 | public interface SimpleClassProfile { 9 | String getClassName(); 10 | 11 | String getClassHash(); 12 | String getClassHashStrict(); 13 | 14 | String getBasicHash(); 15 | String getBasicHashStrict(); 16 | 17 | List getMethodHashList(); 18 | List getMethodHashStrictList(); 19 | 20 | List getFieldHashList(); 21 | List getFieldHashStrictList(); 22 | 23 | String getMethoddescriptorHashList(); 24 | } 25 | -------------------------------------------------------------------------------- /src/cn/njust/analysis/cfg/InvokeInstruction.java: -------------------------------------------------------------------------------- 1 | package cn.njust.analysis.cfg; 2 | 3 | import org.jf.dexlib2.dexbacked.instruction.DexBackedInstruction; 4 | import org.jf.dexlib2.iface.instruction.Instruction; 5 | import org.jf.dexlib2.iface.instruction.ReferenceInstruction; 6 | import org.jf.dexlib2.iface.reference.Reference; 7 | import org.jf.dexlib2.util.ReferenceUtil; 8 | 9 | public class InvokeInstruction { 10 | public final BasicBlock basicBlock; 11 | public final Instruction instruction; 12 | /** 13 | * The instruction index of this inside its basic block. 14 | */ 15 | public final int index; 16 | 17 | public InvokeInstruction(BasicBlock basicBlock, Instruction i,int index) { 18 | this.basicBlock = basicBlock; 19 | this.instruction = i; 20 | this.index = index; 21 | } 22 | 23 | /** 24 | * Get the corresponding callee of this invoke instruction. The result is a 25 | * string representation, not a method reference, for the callee can be an 26 | * api or any method implemented by this dex file. 27 | * 28 | * Example of return value: 29 | * Ljava/lang/Runnable;->run()V 30 | * 31 | * @return The callee of this instruction, represented by a string. 32 | */ 33 | public String getCallee() { 34 | StringBuilder s = new StringBuilder(); 35 | Reference reference = ((ReferenceInstruction) instruction) 36 | .getReference(); 37 | s.append(ReferenceUtil.getReferenceString(reference)); 38 | 39 | return s.toString(); 40 | } 41 | 42 | public int getStartAddress(){ 43 | return ((DexBackedInstruction)this.instruction).instructionStart; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/cn/njust/analysis/dep/ConcreteDepNode.java: -------------------------------------------------------------------------------- 1 | package cn.njust.analysis.dep; 2 | 3 | import cn.njust.analysis.profile.ClassProfile; 4 | 5 | /** 6 | * Created by lemonleaves on 2017/4/14. 7 | */ 8 | public class ConcreteDepNode extends DepNode { 9 | public ClassProfile classProfile; 10 | public int[][] countOfDepEdgePointToEachTypeOfClass; // DepEdge: 6 (DepEdgeType) * TypeOfClass: 3 (system/package/other) 11 | // 6 types: DEP_EDGE_EXTENDS, DEP_EDGE_IMPLEMENTS, DEP_EDGE_FIELD_IN, DEP_EDGE_METHOD_PARAMETER, DEP_EDGE_METHOD_RETURN, DEP_EDGE_METHOD_EXCEPTION 12 | 13 | public ConcreteDepNode(ClassProfile classProfile) { 14 | super(classProfile.getClassName()); 15 | this.classProfile = classProfile; 16 | this.countOfDepEdgePointToEachTypeOfClass = new int[6][3]; 17 | } 18 | 19 | public void addTypecount(int edgetype, int pointtype) { 20 | this.countOfDepEdgePointToEachTypeOfClass[edgetype][pointtype]++; 21 | } 22 | 23 | public int getCountByDepEdgeAndPointToType(int edgetype, int pointtype) { 24 | return this.countOfDepEdgePointToEachTypeOfClass[edgetype][pointtype]; 25 | } 26 | 27 | } -------------------------------------------------------------------------------- /src/cn/njust/analysis/dep/DepAnalysis.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/cn/njust/analysis/dep/DepAnalysis.java -------------------------------------------------------------------------------- /src/cn/njust/analysis/dep/DepEdge.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/cn/njust/analysis/dep/DepEdge.java -------------------------------------------------------------------------------- /src/cn/njust/analysis/dep/DepNode.java: -------------------------------------------------------------------------------- 1 | package cn.njust.analysis.dep; 2 | 3 | import java.util.HashSet; 4 | import java.util.Set; 5 | 6 | /** 7 | * Created by lemonleaves on 2017/4/14. 8 | */ 9 | public class DepNode { 10 | public Set edges; 11 | public Set sinkedges; 12 | public String classname; 13 | 14 | public DepNode(String classname) { 15 | this.classname = classname; 16 | this.edges = new HashSet<>(); 17 | this.sinkedges = new HashSet<>(); 18 | } 19 | 20 | public void addDepEdge(DepEdge de) { 21 | this.edges.add(de); 22 | } 23 | 24 | public void addSinkEdge(DepEdge de) { 25 | this.sinkedges.add(de); 26 | } 27 | } 28 | 29 | -------------------------------------------------------------------------------- /src/cn/njust/analysis/name/NameAnalysis.java: -------------------------------------------------------------------------------- 1 | package cn.njust.analysis.name; 2 | 3 | import cn.njust.common.CodeContainer; 4 | 5 | import java.io.*; 6 | 7 | /** 8 | * Created by yuanxzhang on 12/03/2017. 9 | */ 10 | public class NameAnalysis { 11 | public static NameCollector analyzeNames(CodeContainer container) { 12 | return new NameCollector(container); 13 | } 14 | 15 | public static void persistNamesToFile(NameCollector collector, File file) { 16 | try { 17 | ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(file)); 18 | oos.writeObject(collector); 19 | oos.close(); 20 | } catch (IOException e) { 21 | e.printStackTrace(); 22 | throw new RuntimeException(e.getMessage()); 23 | } 24 | } 25 | 26 | public static NameCollector readNamesFromFile(File file) { 27 | NameCollector collector = null; 28 | try { 29 | ObjectInputStream iis = new ObjectInputStream(new FileInputStream(file)); 30 | collector = (NameCollector) iis.readObject(); 31 | iis.close(); 32 | } catch (IOException e) { 33 | e.printStackTrace(); 34 | throw new RuntimeException(e.getMessage()); 35 | } catch (ClassNotFoundException e) { 36 | e.printStackTrace(); 37 | throw new RuntimeException(e.getMessage()); 38 | } 39 | return collector; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/cn/njust/analysis/profile/ProfileSignature.java: -------------------------------------------------------------------------------- 1 | package cn.njust.analysis.profile; 2 | 3 | /** 4 | * Created by yuanxzhang on 15/04/2017. 5 | */ 6 | public interface ProfileSignature { 7 | String CLASS_NAME_SAME_PKG = "X"; 8 | String CLASS_NAME_OTHER = "Y"; 9 | String FINAL_VALUE_UNINITIALIZED = "uninitialized"; 10 | String FINAL_VALUE_ARRAY = "array"; 11 | String FINAL_VALUE_ANNOTATION = "annotation"; 12 | String FINAL_VALUE_METHOD = "method"; 13 | String FINAL_VALUE_FIELD = "field"; 14 | String FINAL_VALUE_TYPE = "type"; 15 | String PROFILE_SEP_COMMA = ","; 16 | String PROFILE_SEP_SEMICOLON = ";"; 17 | 18 | String composeSignature(); 19 | String composeSignatureStrict(); 20 | } 21 | -------------------------------------------------------------------------------- /src/cn/njust/common/CodeContainer.java: -------------------------------------------------------------------------------- 1 | package cn.njust.common; 2 | 3 | import org.jf.dexlib2.iface.ClassDef; 4 | 5 | import java.util.Set; 6 | 7 | /** 8 | * Created by yuanxzhang on 08/03/2017. 9 | */ 10 | public abstract class CodeContainer { 11 | public abstract String codeHash(); 12 | public abstract String codePath(); 13 | public abstract Set getClasses(); 14 | } 15 | -------------------------------------------------------------------------------- /src/cn/njust/common/Lib.java: -------------------------------------------------------------------------------- 1 | package cn.njust.common; 2 | 3 | import cn.fudan.common.util.HashHelper; 4 | import org.jf.dexlib2.DexFileFactory; 5 | import org.jf.dexlib2.Opcodes; 6 | import org.jf.dexlib2.iface.ClassDef; 7 | import org.jf.dexlib2.iface.DexFile; 8 | 9 | import java.io.File; 10 | import java.io.IOException; 11 | import java.util.Set; 12 | 13 | /** 14 | * Created by yuanxzhang on 03/03/2017. 15 | */ 16 | public class Lib extends CodeContainer { 17 | private String dexHash; 18 | private String dexPath; 19 | private DexFile dex; 20 | 21 | @Override 22 | public String codeHash() { 23 | return dexHash; 24 | } 25 | 26 | @Override 27 | public String codePath(){return dexPath;} 28 | 29 | @Override 30 | public Set getClasses() { 31 | return dex.getClasses(); 32 | } 33 | 34 | public static Lib loadFromFile(String libFilePath) { 35 | Lib lib = new Lib(); 36 | try { 37 | lib.dex = DexFileFactory.loadDexFile(libFilePath, Opcodes.getDefault()); 38 | lib.dexHash = HashHelper.md5_32(new File(libFilePath)); 39 | lib.dexPath = libFilePath; 40 | 41 | return lib; 42 | } catch (IOException e) { 43 | e.printStackTrace(); 44 | } 45 | return null; 46 | } 47 | 48 | public static Lib loadFromFile(File libFile){ 49 | Lib lib = new Lib(); 50 | try { 51 | lib.dex = DexFileFactory.loadDexFile(libFile.getPath(), Opcodes.getDefault()); 52 | lib.dexHash = HashHelper.md5_32(libFile); 53 | lib.dexPath = libFile.getPath(); 54 | 55 | return lib; 56 | } catch (IOException e) { 57 | e.printStackTrace(); 58 | } 59 | return null; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/cn/njust/common/LibPeckerConfig.java: -------------------------------------------------------------------------------- 1 | package cn.njust.common; 2 | 3 | import org.apache.commons.io.FileUtils; 4 | 5 | import java.io.File; 6 | import java.io.IOException; 7 | import java.util.List; 8 | 9 | /** 10 | * Created by yuanxzhang on 14/03/2017. 11 | */ 12 | public class LibPeckerConfig { 13 | public static final double LIB_APK_PAIR_THRESHOLD = 0.5; 14 | 15 | public static boolean DEBUG_LIBPECKER = true; 16 | public static String DEBUG_LIBPECKER_LIB_PKG_NAME = ""; 17 | public static String DEBUG_LIBPECKER_APK_PKG_NAME = ""; 18 | 19 | public static final String DALVIK_ANNOTATION_PKG = "dalvik.annotation."; 20 | public static final String DALVIK_SIGNATURE = "dalvik.annotation.Signature"; 21 | public static final String DALVIK_INNER_CLASS = "dalvik.annotation.InnerClass"; 22 | public static final String DALVIK_THROWS = "dalvik.annotation.Throws"; 23 | public static final String DALVIK_ANNOTATION_DEFAULT = "dalvik.annotation.AnnotationDefault"; 24 | 25 | 26 | public static final String DEFAULT_SDK_DEX_PATH = "./sdk/android-20.dex"; 27 | } 28 | -------------------------------------------------------------------------------- /src/edu/njust/bean/ApkInfo.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/edu/njust/bean/ApkInfo.java: -------------------------------------------------------------------------------- 1 | package edu.njust.bean; 2 | 3 | /** 4 | * ApkInfo entity. @author MyEclipse Persistence Tools 5 | */ 6 | 7 | public class ApkInfo implements java.io.Serializable { 8 | 9 | // Fields 10 | 11 | private Integer id; 12 | private Integer apkId; 13 | private String apkName; 14 | 15 | // Constructors 16 | 17 | /** default constructor */ 18 | public ApkInfo() { 19 | } 20 | 21 | /** full constructor */ 22 | public ApkInfo(Integer apkId, String apkName) { 23 | this.apkId = apkId; 24 | this.apkName = apkName; 25 | } 26 | 27 | // Property accessors 28 | 29 | public Integer getId() { 30 | return this.id; 31 | } 32 | 33 | public void setId(Integer id) { 34 | this.id = id; 35 | } 36 | 37 | public Integer getApkId() { 38 | return this.apkId; 39 | } 40 | 41 | public void setApkId(Integer apkId) { 42 | this.apkId = apkId; 43 | } 44 | 45 | public String getApkName() { 46 | return this.apkName; 47 | } 48 | 49 | public void setApkName(String apkName) { 50 | this.apkName = apkName; 51 | } 52 | 53 | } -------------------------------------------------------------------------------- /src/edu/njust/bean/ApkLib.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/edu/njust/bean/ApkLib.java: -------------------------------------------------------------------------------- 1 | package edu.njust.bean; 2 | 3 | /** 4 | * ApkLib entity. @author MyEclipse Persistence Tools 5 | */ 6 | 7 | public class ApkLib implements java.io.Serializable { 8 | 9 | // Fields 10 | 11 | private Integer id; 12 | private String apk; 13 | private String lib; 14 | 15 | // Constructors 16 | 17 | /** default constructor */ 18 | public ApkLib() { 19 | } 20 | 21 | /** full constructor */ 22 | public ApkLib(String apk, String lib) { 23 | this.apk = apk; 24 | this.lib = lib; 25 | } 26 | 27 | // Property accessors 28 | 29 | public Integer getId() { 30 | return this.id; 31 | } 32 | 33 | public void setId(Integer id) { 34 | this.id = id; 35 | } 36 | 37 | public String getApk() { 38 | return this.apk; 39 | } 40 | 41 | public void setApk(String apk) { 42 | this.apk = apk; 43 | } 44 | 45 | public String getLib() { 46 | return this.lib; 47 | } 48 | 49 | public void setLib(String lib) { 50 | this.lib = lib; 51 | } 52 | 53 | } -------------------------------------------------------------------------------- /src/edu/njust/bean/ApkLibInfos.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/edu/njust/bean/ApkLibInfos.java: -------------------------------------------------------------------------------- 1 | package edu.njust.bean; 2 | 3 | /** 4 | * ApkLibInfos entity. @author MyEclipse Persistence Tools 5 | */ 6 | 7 | public class ApkLibInfos implements java.io.Serializable { 8 | 9 | // Fields 10 | 11 | private Integer id; 12 | private Integer apkid; 13 | private String apkname; 14 | private Integer libid; 15 | private String libname; 16 | private Integer attribute; 17 | 18 | // Constructors 19 | 20 | /** default constructor */ 21 | public ApkLibInfos() { 22 | } 23 | 24 | /** full constructor */ 25 | public ApkLibInfos(Integer apkid, String apkname, Integer libid, 26 | String libname, Integer attribute) { 27 | this.apkid = apkid; 28 | this.apkname = apkname; 29 | this.libid = libid; 30 | this.libname = libname; 31 | this.attribute = attribute; 32 | } 33 | 34 | // Property accessors 35 | 36 | public Integer getId() { 37 | return this.id; 38 | } 39 | 40 | public void setId(Integer id) { 41 | this.id = id; 42 | } 43 | 44 | public Integer getApkid() { 45 | return this.apkid; 46 | } 47 | 48 | public void setApkid(Integer apkid) { 49 | this.apkid = apkid; 50 | } 51 | 52 | public String getApkname() { 53 | return this.apkname; 54 | } 55 | 56 | public void setApkname(String apkname) { 57 | this.apkname = apkname; 58 | } 59 | 60 | public Integer getLibid() { 61 | return this.libid; 62 | } 63 | 64 | public void setLibid(Integer libid) { 65 | this.libid = libid; 66 | } 67 | 68 | public String getLibname() { 69 | return this.libname; 70 | } 71 | 72 | public void setLibname(String libname) { 73 | this.libname = libname; 74 | } 75 | 76 | public Integer getAttribute() { 77 | return this.attribute; 78 | } 79 | 80 | public void setAttribute(Integer attribute) { 81 | this.attribute = attribute; 82 | } 83 | 84 | } -------------------------------------------------------------------------------- /src/edu/njust/bean/ApkLibinfo.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/edu/njust/bean/ApkLibinfo.java: -------------------------------------------------------------------------------- 1 | package edu.njust.bean; 2 | 3 | /** 4 | * ApkLibinfo entity. @author MyEclipse Persistence Tools 5 | */ 6 | 7 | public class ApkLibinfo implements java.io.Serializable { 8 | 9 | // Fields 10 | 11 | private Integer id; 12 | private Integer apkId; 13 | private String apkName; 14 | private Integer libId; 15 | private String libName; 16 | 17 | // Constructors 18 | 19 | /** default constructor */ 20 | public ApkLibinfo() { 21 | } 22 | 23 | /** full constructor */ 24 | public ApkLibinfo(Integer apkId, String apkName, Integer libId, 25 | String libName) { 26 | this.apkId = apkId; 27 | this.apkName = apkName; 28 | this.libId = libId; 29 | this.libName = libName; 30 | } 31 | 32 | // Property accessors 33 | 34 | public Integer getId() { 35 | return this.id; 36 | } 37 | 38 | public void setId(Integer id) { 39 | this.id = id; 40 | } 41 | 42 | public Integer getApkId() { 43 | return this.apkId; 44 | } 45 | 46 | public void setApkId(Integer apkId) { 47 | this.apkId = apkId; 48 | } 49 | 50 | public String getApkName() { 51 | return this.apkName; 52 | } 53 | 54 | public void setApkName(String apkName) { 55 | this.apkName = apkName; 56 | } 57 | 58 | public Integer getLibId() { 59 | return this.libId; 60 | } 61 | 62 | public void setLibId(Integer libId) { 63 | this.libId = libId; 64 | } 65 | 66 | public String getLibName() { 67 | return this.libName; 68 | } 69 | 70 | public void setLibName(String libName) { 71 | this.libName = libName; 72 | } 73 | 74 | } -------------------------------------------------------------------------------- /src/edu/njust/bean/ApkRootpackageInfo.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/edu/njust/bean/LibClassInfo.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/edu/njust/bean/LibInfo.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/edu/njust/bean/LibInfo.java: -------------------------------------------------------------------------------- 1 | package edu.njust.bean; 2 | 3 | /** 4 | * LibInfo entity. @author MyEclipse Persistence Tools 5 | */ 6 | 7 | public class LibInfo implements java.io.Serializable { 8 | 9 | // Fields 10 | 11 | private Integer id; 12 | private Integer libId; 13 | private String libName; 14 | private String packagestructureHash; 15 | 16 | // Constructors 17 | 18 | /** default constructor */ 19 | public LibInfo() { 20 | } 21 | 22 | /** full constructor */ 23 | public LibInfo(Integer libId, String libName, String packagestructureHash) { 24 | this.libId = libId; 25 | this.libName = libName; 26 | this.packagestructureHash = packagestructureHash; 27 | } 28 | 29 | // Property accessors 30 | 31 | public Integer getId() { 32 | return this.id; 33 | } 34 | 35 | public void setId(Integer id) { 36 | this.id = id; 37 | } 38 | 39 | public Integer getLibId() { 40 | return this.libId; 41 | } 42 | 43 | public void setLibId(Integer libId) { 44 | this.libId = libId; 45 | } 46 | 47 | public String getLibName() { 48 | return this.libName; 49 | } 50 | 51 | public void setLibName(String libName) { 52 | this.libName = libName; 53 | } 54 | 55 | public String getPackagestructureHash() { 56 | return this.packagestructureHash; 57 | } 58 | 59 | public void setPackagestructureHash(String packagestructureHash) { 60 | this.packagestructureHash = packagestructureHash; 61 | } 62 | 63 | } -------------------------------------------------------------------------------- /src/edu/njust/bean/LibPackagestructure.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/edu/njust/bean/LibPackagestructure.java: -------------------------------------------------------------------------------- 1 | package edu.njust.bean; 2 | 3 | /** 4 | * LibPackagestructure entity. @author MyEclipse Persistence Tools 5 | */ 6 | 7 | public class LibPackagestructure implements java.io.Serializable { 8 | 9 | // Fields 10 | 11 | private Integer id; 12 | private String libName; 13 | private String packagestructureHash; 14 | 15 | // Constructors 16 | 17 | /** default constructor */ 18 | public LibPackagestructure() { 19 | } 20 | 21 | /** full constructor */ 22 | public LibPackagestructure(String libName, String packagestructureHash) { 23 | this.libName = libName; 24 | this.packagestructureHash = packagestructureHash; 25 | } 26 | 27 | // Property accessors 28 | 29 | public Integer getId() { 30 | return this.id; 31 | } 32 | 33 | public void setId(Integer id) { 34 | this.id = id; 35 | } 36 | 37 | public String getLibName() { 38 | return this.libName; 39 | } 40 | 41 | public void setLibName(String libName) { 42 | this.libName = libName; 43 | } 44 | 45 | public String getPackagestructureHash() { 46 | return this.packagestructureHash; 47 | } 48 | 49 | public void setPackagestructureHash(String packagestructureHash) { 50 | this.packagestructureHash = packagestructureHash; 51 | } 52 | 53 | } -------------------------------------------------------------------------------- /src/edu/njust/bean/LibRootpackageInfo.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/edu/njust/bean/LibSubpackageInfo.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/edu/njust/bean/LibdetectionResult.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/edu/njust/bean/LibdetectionResult.java: -------------------------------------------------------------------------------- 1 | package edu.njust.bean; 2 | 3 | /** 4 | * LibdetectionResult entity. @author MyEclipse Persistence Tools 5 | */ 6 | 7 | public class LibdetectionResult implements java.io.Serializable { 8 | 9 | // Fields 10 | 11 | private Integer id; 12 | private Integer apkid; 13 | private String apkname; 14 | private Integer libid; 15 | private String libname; 16 | private Integer attribute; 17 | 18 | // Constructors 19 | 20 | /** default constructor */ 21 | public LibdetectionResult() { 22 | } 23 | 24 | /** full constructor */ 25 | public LibdetectionResult(Integer apkid, String apkname, Integer libid, 26 | String libname, Integer attribute) { 27 | this.apkid = apkid; 28 | this.apkname = apkname; 29 | this.libid = libid; 30 | this.libname = libname; 31 | this.attribute = attribute; 32 | } 33 | 34 | // Property accessors 35 | 36 | public Integer getId() { 37 | return this.id; 38 | } 39 | 40 | public void setId(Integer id) { 41 | this.id = id; 42 | } 43 | 44 | public Integer getApkid() { 45 | return this.apkid; 46 | } 47 | 48 | public void setApkid(Integer apkid) { 49 | this.apkid = apkid; 50 | } 51 | 52 | public String getApkname() { 53 | return this.apkname; 54 | } 55 | 56 | public void setApkname(String apkname) { 57 | this.apkname = apkname; 58 | } 59 | 60 | public Integer getLibid() { 61 | return this.libid; 62 | } 63 | 64 | public void setLibid(Integer libid) { 65 | this.libid = libid; 66 | } 67 | 68 | public String getLibname() { 69 | return this.libname; 70 | } 71 | 72 | public void setLibname(String libname) { 73 | this.libname = libname; 74 | } 75 | 76 | public Integer getAttribute() { 77 | return this.attribute; 78 | } 79 | 80 | public void setAttribute(Integer attribute) { 81 | this.attribute = attribute; 82 | } 83 | 84 | } -------------------------------------------------------------------------------- /src/edu/njust/bean/LibpeckerResult.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/edu/njust/bean/LibpeckerResult.java: -------------------------------------------------------------------------------- 1 | package edu.njust.bean; 2 | 3 | /** 4 | * LibpeckerResult entity. @author MyEclipse Persistence Tools 5 | */ 6 | 7 | public class LibpeckerResult implements java.io.Serializable { 8 | 9 | // Fields 10 | 11 | private Integer id; 12 | private Integer apkid; 13 | private String apkname; 14 | private Integer libid; 15 | private String libname; 16 | private Integer attribute; 17 | 18 | // Constructors 19 | 20 | /** default constructor */ 21 | public LibpeckerResult() { 22 | } 23 | 24 | /** full constructor */ 25 | public LibpeckerResult(Integer apkid, String apkname, Integer libid, 26 | String libname, Integer attribute) { 27 | this.apkid = apkid; 28 | this.apkname = apkname; 29 | this.libid = libid; 30 | this.libname = libname; 31 | this.attribute = attribute; 32 | } 33 | 34 | // Property accessors 35 | 36 | public Integer getId() { 37 | return this.id; 38 | } 39 | 40 | public void setId(Integer id) { 41 | this.id = id; 42 | } 43 | 44 | public Integer getApkid() { 45 | return this.apkid; 46 | } 47 | 48 | public void setApkid(Integer apkid) { 49 | this.apkid = apkid; 50 | } 51 | 52 | public String getApkname() { 53 | return this.apkname; 54 | } 55 | 56 | public void setApkname(String apkname) { 57 | this.apkname = apkname; 58 | } 59 | 60 | public Integer getLibid() { 61 | return this.libid; 62 | } 63 | 64 | public void setLibid(Integer libid) { 65 | this.libid = libid; 66 | } 67 | 68 | public String getLibname() { 69 | return this.libname; 70 | } 71 | 72 | public void setLibname(String libname) { 73 | this.libname = libname; 74 | } 75 | 76 | public Integer getAttribute() { 77 | return this.attribute; 78 | } 79 | 80 | public void setAttribute(Integer attribute) { 81 | this.attribute = attribute; 82 | } 83 | 84 | } -------------------------------------------------------------------------------- /src/edu/njust/bean/LitelibClassInfo.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/edu/njust/bean/Permission.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /src/edu/njust/bean/PermissionClassname.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/edu/njust/bean/PermissionClassname.java: -------------------------------------------------------------------------------- 1 | package edu.njust.bean; 2 | 3 | /** 4 | * PermissionClassname entity. @author MyEclipse Persistence Tools 5 | */ 6 | 7 | public class PermissionClassname implements java.io.Serializable { 8 | 9 | // Fields 10 | 11 | private Integer id; 12 | private String callerClass; 13 | private String remarks; 14 | 15 | // Constructors 16 | 17 | /** default constructor */ 18 | public PermissionClassname() { 19 | } 20 | 21 | /** full constructor */ 22 | public PermissionClassname(String callerClass, String remarks) { 23 | this.callerClass = callerClass; 24 | this.remarks = remarks; 25 | } 26 | 27 | // Property accessors 28 | 29 | public Integer getId() { 30 | return this.id; 31 | } 32 | 33 | public void setId(Integer id) { 34 | this.id = id; 35 | } 36 | 37 | public String getCallerClass() { 38 | return this.callerClass; 39 | } 40 | 41 | public void setCallerClass(String callerClass) { 42 | this.callerClass = callerClass; 43 | } 44 | 45 | public String getRemarks() { 46 | return this.remarks; 47 | } 48 | 49 | public void setRemarks(String remarks) { 50 | this.remarks = remarks; 51 | } 52 | 53 | } -------------------------------------------------------------------------------- /src/edu/njust/otherUtils/HibernateUtil.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/edu/njust/otherUtils/HibernateUtil.java -------------------------------------------------------------------------------- /src/hibernate.cfg.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | mysql 10 | 11 | jdbc:mysql://127.0.0.1:3306/apk_lib_groundtruth 12 | 13 | root 14 | 15920430090qt 15 | 16 | com.mysql.jdbc.Driver 17 | 18 | 19 | org.hibernate.dialect.MySQLDialect 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/njust/lib/Service/ApkInfoService.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/njust/lib/Service/ApkInfoService.java -------------------------------------------------------------------------------- /src/njust/lib/Service/ApkLibInfosService.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/njust/lib/Service/ApkLibInfosService.java -------------------------------------------------------------------------------- /src/njust/lib/Service/ApkLibService.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/njust/lib/Service/ApkLibService.java -------------------------------------------------------------------------------- /src/njust/lib/Service/ApkLibinfoService.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/njust/lib/Service/ApkLibinfoService.java -------------------------------------------------------------------------------- /src/njust/lib/Service/ApkRootpackageInfoService.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/njust/lib/Service/ApkRootpackageInfoService.java -------------------------------------------------------------------------------- /src/njust/lib/Service/LibClassInfoService.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/njust/lib/Service/LibClassInfoService.java -------------------------------------------------------------------------------- /src/njust/lib/Service/LibInfoService.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/njust/lib/Service/LibInfoService.java -------------------------------------------------------------------------------- /src/njust/lib/Service/LibPackagestructureService.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/njust/lib/Service/LibPackagestructureService.java -------------------------------------------------------------------------------- /src/njust/lib/Service/LibRootpackageInfoService.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/njust/lib/Service/LibRootpackageInfoService.java -------------------------------------------------------------------------------- /src/njust/lib/Service/LibSubpackageInfoService.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/njust/lib/Service/LibSubpackageInfoService.java -------------------------------------------------------------------------------- /src/njust/lib/Service/LibdetectionResultService.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/njust/lib/Service/LibdetectionResultService.java -------------------------------------------------------------------------------- /src/njust/lib/Service/LibpeckerResultService.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/njust/lib/Service/LibpeckerResultService.java -------------------------------------------------------------------------------- /src/njust/lib/Service/LitelibClassInfoService.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/njust/lib/Service/LitelibClassInfoService.java -------------------------------------------------------------------------------- /src/njust/lib/Service/PermissionClassnameService.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/njust/lib/Service/PermissionClassnameService.java -------------------------------------------------------------------------------- /src/njust/lib/Service/PermissionService.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/njust/lib/Service/PermissionService.java -------------------------------------------------------------------------------- /src/njust/lib/dao/ApkInfoDAO.java: -------------------------------------------------------------------------------- 1 | package njust.lib.dao; 2 | 3 | import edu.njust.bean.ApkInfo; 4 | import edu.njust.bean.LibInfo; 5 | 6 | public class ApkInfoDAO extends BaseDAO{ 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/njust/lib/dao/ApkLibDAO.java: -------------------------------------------------------------------------------- 1 | package njust.lib.dao; 2 | import edu.njust.bean.ApkLib; 3 | public class ApkLibDAO extends BaseDAO{ 4 | 5 | } 6 | 7 | -------------------------------------------------------------------------------- /src/njust/lib/dao/ApkLibInfosDAO.java: -------------------------------------------------------------------------------- 1 | package njust.lib.dao; 2 | 3 | 4 | import njust.lib.Service.ApkLibService; 5 | import edu.njust.bean.ApkLib; 6 | import edu.njust.bean.ApkLibInfos; 7 | import edu.njust.bean.ApkLibinfo; 8 | 9 | public class ApkLibInfosDAO extends BaseDAO{ 10 | 11 | } -------------------------------------------------------------------------------- /src/njust/lib/dao/ApkLibinfoDAO.java: -------------------------------------------------------------------------------- 1 | package njust.lib.dao; 2 | 3 | import njust.lib.Service.ApkLibService; 4 | import edu.njust.bean.ApkLib; 5 | import edu.njust.bean.ApkLibinfo; 6 | 7 | public class ApkLibinfoDAO extends BaseDAO{ 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/njust/lib/dao/ApkRootpackageInfoDAO.java: -------------------------------------------------------------------------------- 1 | package njust.lib.dao; 2 | 3 | import edu.njust.bean.ApkRootpackageInfo; 4 | import edu.njust.bean.LibRootpackageInfo; 5 | 6 | public class ApkRootpackageInfoDAO extends BaseDAO{ 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/njust/lib/dao/BaseDAO.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/njustbdag/LibRoad/90412a94c8f5c4916d6edc5bd6f524d43d555063/src/njust/lib/dao/BaseDAO.java -------------------------------------------------------------------------------- /src/njust/lib/dao/LibClassInfoDAO.java: -------------------------------------------------------------------------------- 1 | package njust.lib.dao; 2 | 3 | import edu.njust.bean.LibClassInfo; 4 | import edu.njust.bean.LibSubpackageInfo; 5 | 6 | public class LibClassInfoDAO extends BaseDAO{ 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/njust/lib/dao/LibInfoDAO.java: -------------------------------------------------------------------------------- 1 | package njust.lib.dao; 2 | 3 | import edu.njust.bean.ApkLibinfo; 4 | import edu.njust.bean.LibInfo; 5 | 6 | public class LibInfoDAO extends BaseDAO{ 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/njust/lib/dao/LibPackagestructureDAO.java: -------------------------------------------------------------------------------- 1 | package njust.lib.dao; 2 | 3 | import edu.njust.bean.LibPackagestructure; 4 | 5 | public class LibPackagestructureDAO extends BaseDAO{ 6 | 7 | } 8 | -------------------------------------------------------------------------------- /src/njust/lib/dao/LibRootpackageInfoDAO.java: -------------------------------------------------------------------------------- 1 | package njust.lib.dao; 2 | 3 | import edu.njust.bean.ApkLibinfo; 4 | import edu.njust.bean.LibRootpackageInfo; 5 | 6 | public class LibRootpackageInfoDAO extends BaseDAO{ 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/njust/lib/dao/LibSubpackageInfoDAO.java: -------------------------------------------------------------------------------- 1 | package njust.lib.dao; 2 | 3 | import edu.njust.bean.LibRootpackageInfo; 4 | import edu.njust.bean.LibSubpackageInfo; 5 | 6 | public class LibSubpackageInfoDAO extends BaseDAO{ 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/njust/lib/dao/LibdetectionResultDAO.java: -------------------------------------------------------------------------------- 1 | package njust.lib.dao; 2 | 3 | import edu.njust.bean.ApkLibinfo; 4 | import edu.njust.bean.LibdetectionResult; 5 | 6 | public class LibdetectionResultDAO extends BaseDAO{ 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/njust/lib/dao/LibpeckerResultDAO.java: -------------------------------------------------------------------------------- 1 | package njust.lib.dao; 2 | 3 | import edu.njust.bean.ApkLibinfo; 4 | import edu.njust.bean.LibpeckerResult; 5 | 6 | public class LibpeckerResultDAO extends BaseDAO{ 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/njust/lib/dao/LitelibClassInfoDAO.java: -------------------------------------------------------------------------------- 1 | package njust.lib.dao; 2 | 3 | import edu.njust.bean.LibClassInfo; 4 | import edu.njust.bean.LitelibClassInfo; 5 | 6 | public class LitelibClassInfoDAO extends BaseDAO{ 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/njust/lib/dao/PermissionClassnameDAO.java: -------------------------------------------------------------------------------- 1 | package njust.lib.dao; 2 | 3 | import edu.njust.bean.PermissionClassname; 4 | 5 | public class PermissionClassnameDAO extends BaseDAO{ 6 | 7 | } 8 | -------------------------------------------------------------------------------- /src/njust/lib/dao/PermissionDAO.java: -------------------------------------------------------------------------------- 1 | package njust.lib.dao; 2 | 3 | import edu.njust.bean.Permission; 4 | 5 | 6 | 7 | public class PermissionDAO extends BaseDAO{ 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/note: -------------------------------------------------------------------------------- 1 | here is for source codes of our approach 2 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/analysis/ClassProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.analysis; 33 | 34 | import org.jf.dexlib2.iface.ClassDef; 35 | 36 | import javax.annotation.Nullable; 37 | 38 | public interface ClassProvider { 39 | @Nullable ClassDef getClassDef(String type); 40 | } 41 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/dexbacked/DexReader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.dexbacked; 33 | 34 | import javax.annotation.Nonnull; 35 | 36 | public class DexReader extends BaseDexReader { 37 | public DexReader(@Nonnull DexBackedDexFile dexFile, int offset) { 38 | super(dexFile, offset); 39 | } 40 | } -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/FiveRegisterInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction; 33 | 34 | public interface FiveRegisterInstruction extends VariableRegisterInstruction { 35 | int getRegisterC(); 36 | int getRegisterD(); 37 | int getRegisterE(); 38 | int getRegisterF(); 39 | int getRegisterG(); 40 | } 41 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/HatLiteralInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction; 33 | 34 | public interface HatLiteralInstruction extends Instruction { 35 | /** 36 | * @return the high order 16 bits of the literal, as a short value 37 | */ 38 | short getHatLiteral(); 39 | } 40 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/ReferenceInstruction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction; 33 | 34 | import org.jf.dexlib2.iface.reference.Reference; 35 | 36 | import javax.annotation.Nonnull; 37 | 38 | public interface ReferenceInstruction extends Instruction { 39 | @Nonnull Reference getReference(); 40 | int getReferenceType(); 41 | } 42 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/SwitchPayload.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction; 33 | 34 | import javax.annotation.Nonnull; 35 | import java.util.List; 36 | 37 | public interface SwitchPayload extends PayloadInstruction { 38 | @Nonnull List getSwitchElements(); 39 | } 40 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/formats/Instruction21c.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction.formats; 33 | 34 | import org.jf.dexlib2.iface.instruction.OneRegisterInstruction; 35 | import org.jf.dexlib2.iface.instruction.ReferenceInstruction; 36 | 37 | public interface Instruction21c extends OneRegisterInstruction, ReferenceInstruction { 38 | } 39 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/formats/Instruction21t.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction.formats; 33 | 34 | import org.jf.dexlib2.iface.instruction.OffsetInstruction; 35 | import org.jf.dexlib2.iface.instruction.OneRegisterInstruction; 36 | 37 | public interface Instruction21t extends OneRegisterInstruction, OffsetInstruction { 38 | } 39 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/formats/Instruction22c.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction.formats; 33 | 34 | import org.jf.dexlib2.iface.instruction.ReferenceInstruction; 35 | import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction; 36 | 37 | public interface Instruction22c extends TwoRegisterInstruction, ReferenceInstruction { 38 | } 39 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/formats/Instruction22cs.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 | import org.jf.dexlib2.iface.instruction.FieldOffsetInstruction; 35 | import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction; 36 | 37 | public interface Instruction22cs extends TwoRegisterInstruction, FieldOffsetInstruction { 38 | } 39 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/formats/Instruction22t.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction.formats; 33 | 34 | import org.jf.dexlib2.iface.instruction.OffsetInstruction; 35 | import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction; 36 | 37 | public interface Instruction22t extends TwoRegisterInstruction, OffsetInstruction { 38 | } 39 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/formats/Instruction31c.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction.formats; 33 | 34 | import org.jf.dexlib2.iface.instruction.OneRegisterInstruction; 35 | import org.jf.dexlib2.iface.instruction.ReferenceInstruction; 36 | 37 | public interface Instruction31c extends OneRegisterInstruction, ReferenceInstruction { 38 | } 39 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/formats/Instruction31t.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction.formats; 33 | 34 | import org.jf.dexlib2.iface.instruction.OffsetInstruction; 35 | import org.jf.dexlib2.iface.instruction.OneRegisterInstruction; 36 | 37 | public interface Instruction31t extends OneRegisterInstruction, OffsetInstruction { 38 | } 39 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/formats/Instruction35c.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.iface.instruction.formats; 33 | 34 | import org.jf.dexlib2.iface.instruction.FiveRegisterInstruction; 35 | import org.jf.dexlib2.iface.instruction.ReferenceInstruction; 36 | 37 | public interface Instruction35c extends FiveRegisterInstruction, ReferenceInstruction { 38 | } 39 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/formats/Instruction3rc.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.ReferenceInstruction; 35 | import org.jf.dexlib2.iface.instruction.RegisterRangeInstruction; 36 | 37 | public interface Instruction3rc extends RegisterRangeInstruction, ReferenceInstruction { 38 | } 39 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/iface/instruction/formats/Instruction51l.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 | import org.jf.dexlib2.iface.instruction.WideLiteralInstruction; 36 | 37 | public interface Instruction51l extends OneRegisterInstruction, WideLiteralInstruction { 38 | } 39 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/immutable/reference/ImmutableReference.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.immutable.reference; 33 | 34 | import org.jf.dexlib2.iface.reference.*; 35 | 36 | public interface ImmutableReference extends Reference { 37 | } 38 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/writer/OffsetSection.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.Nonnull; 35 | import java.util.Collection; 36 | import java.util.Map; 37 | 38 | public interface OffsetSection { 39 | int getItemOffset(@Nonnull Key key); 40 | @Nonnull Collection> getItems(); 41 | } 42 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/writer/builder/BaseBuilderPool.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.writer.builder; 33 | 34 | import javax.annotation.Nonnull; 35 | 36 | public class BaseBuilderPool { 37 | @Nonnull protected final DexBuilder dexBuilder; 38 | 39 | public BaseBuilderPool(@Nonnull DexBuilder dexBuilder) { 40 | this.dexBuilder = dexBuilder; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/org/jf/dexlib2/writer/pool/Markable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.dexlib2.writer.pool; 33 | 34 | public interface Markable { 35 | void mark(); 36 | void reset(); 37 | } 38 | -------------------------------------------------------------------------------- /src/org/jf/util/jcommander/ExtendedParameter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016, Google Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * Neither the name of Google Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | package org.jf.util.jcommander; 33 | 34 | import java.lang.annotation.Retention; 35 | import java.lang.annotation.RetentionPolicy; 36 | 37 | @Retention(RetentionPolicy.RUNTIME) 38 | public @interface ExtendedParameter { 39 | String[] argumentNames(); 40 | } 41 | --------------------------------------------------------------------------------