Skip to content

Commit

Permalink
Merge branch 'refs/heads/develop' into 1034-bug-fix-bodyinterceptor-d…
Browse files Browse the repository at this point in the history
…ead-assignment-eliminator-1

# Conflicts:
#	sootup.apk.frontend/pom.xml
  • Loading branch information
sahilagichani14 committed Sep 17, 2024
2 parents befbb2d + d6d411f commit 1174d9e
Show file tree
Hide file tree
Showing 18 changed files with 262 additions and 114 deletions.
9 changes: 3 additions & 6 deletions docs/analysisinput.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ Path path = Paths.get("Banana.apk");
AnalysisInputLocation inputLocation = new ApkAnalysisInputLocation(path, "", DexBodyInterceptors.Default.bodyInterceptors());
JavaView view = new JavaView(inputLocation);
```


### Android Bytecode with Dex2Jar
File-Extensions: `.apk`

The `ApkAnalysisInputLocation` currently uses dex2jar internally
If you prefer to use dex2jar as a base to transform android apps to jimple, you can add the code below to create your own analysis input location.
We used the dependency de.femtopedia.dex2jar:dex2jar:2.4.22 in the given example.
We recommend to use ApkAnalysisInputLocation

```java
Path path = Paths.get("Banana.apk");
Expand Down Expand Up @@ -150,9 +150,6 @@ public class Dex2JarAnalysisInputLocation extends ArchiveBasedAnalysisInputLocat
}
```

!!! info "A SootUp solution to directly generate Jimple is WIP!"


### Combining Multiple AnalysisInputLocations
But what if I want to point to multiple AnalysisInputLocations?

Expand Down
96 changes: 76 additions & 20 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,20 +86,12 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven-surefire-plugin.version>3.2.5</maven-surefire-plugin.version>
<jacoco-maven-plugin.version>0.8.4</jacoco-maven-plugin.version>
<slf4j.version>2.0.5</slf4j.version>
<slf4j-simple.version>2.0.5</slf4j-simple.version>
<guava.version>32.0.1-jre</guava.version>
<apache-commons.version>3.12.0</apache-commons.version>
<apache-commons-io.version>2.11.0</apache-commons-io.version>
<junit.version>5.10.2</junit.version>
<powermock-module-junit4.version>1.7.3</powermock-module-junit4.version>
<powermock-api-mockito.version>1.7.3</powermock-api-mockito.version>
<nexus-staging-maven-plugin.version>1.6.13</nexus-staging-maven-plugin.version>
<maven-source-plugin.version>3.2.1</maven-source-plugin.version>
<maven-javadoc-plugin.version>3.1.1</maven-javadoc-plugin.version>
<maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
<maven-gpg-plugin.version>3.1.0</maven-gpg-plugin.version>
<maven-release-plugin.version>3.0.1</maven-release-plugin.version>
<maven-release-plugin.version>3.0.1</maven-release-plugin.version>
<licence-check.failOnMissingHeader>true</licence-check.failOnMissingHeader>
<reactorRootsTarget>${basedir}/target</reactorRootsTarget>
</properties>
Expand Down Expand Up @@ -379,34 +371,76 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>${slf4j-simple.version}</version>
<optional>true</optional>
<version>2.0.13</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${apache-commons.version}</version>
<version>3.14.0</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${apache-commons-io.version}</version>
<version>2.16.1</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
<version>33.3.0-jre</version>
</dependency>
<dependency>
<groupId>org.jgrapht</groupId>
<artifactId>jgrapht-core</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>de.upb.cs.swt</groupId>
<artifactId>heros</artifactId>
<version>1.2.3</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-util</artifactId>
<version>9.6</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-commons</artifactId>
<version>9.7</version>
</dependency>
<dependency>
<groupId>org.smali</groupId>
<artifactId>dexlib2</artifactId>
<version>2.5.2</version>
</dependency>
<dependency>
<groupId>de.upb.cs.swt</groupId>
<artifactId>axml</artifactId>
<version>2.1.3</version>
</dependency>
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
<version>4.9.3</version>
</dependency>
<!-- https://mvnrepository.com/artifact/commons-cli/commons-cli -->
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>1.5.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.github.oshi/oshi-core -->
<dependency>
<groupId>com.github.oshi</groupId>
<artifactId>oshi-core</artifactId>
<version>6.4.0</version>
</dependency>

<!-- testing -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit.version}</version>
<version>5.10.2</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -415,6 +449,18 @@
<version>${slf4j-simple.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>4.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>5.12.0</version>
<scope>test</scope>
</dependency>
<!-- adds `@Nullable` and `@Nonnull` annotations -->
<dependency>
<groupId>com.google.code.findbugs</groupId>
Expand Down Expand Up @@ -476,6 +522,16 @@
<artifactId>sootup.apk.frontend</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.soot-oss</groupId>
<artifactId>sootup.qilin</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.soot-oss</groupId>
<artifactId>sootup.tests</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down
2 changes: 1 addition & 1 deletion sootup.analysis.interprocedural/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand All @@ -39,7 +40,6 @@
<dependency>
<groupId>de.upb.cs.swt</groupId>
<artifactId>heros</artifactId>
<version>1.2.3</version>
</dependency>
</dependencies>
<repositories>
Expand Down
5 changes: 5 additions & 0 deletions sootup.analysis.intraprocedural/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,10 @@
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
37 changes: 20 additions & 17 deletions sootup.callgraph/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,9 @@
<groupId>org.soot-oss</groupId>
<artifactId>sootup.core</artifactId>
</dependency>
<dependency>
<groupId>org.soot-oss</groupId>
<artifactId>sootup.java.bytecode.frontend</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.soot-oss</groupId>
<artifactId>sootup.java.sourcecode.frontend</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.soot-oss</groupId>
<artifactId>sootup.jimple.frontend</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jgrapht</groupId>
<artifactId>jgrapht-core</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
Expand All @@ -57,7 +41,26 @@
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.soot-oss</groupId>
<artifactId>sootup.java.bytecode.frontend</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.soot-oss</groupId>
<artifactId>sootup.java.sourcecode.frontend</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.soot-oss</groupId>
<artifactId>sootup.jimple.frontend</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

</project>
Loading

0 comments on commit 1174d9e

Please sign in to comment.