Skip to content

Commit

Permalink
add jvm args
Browse files Browse the repository at this point in the history
  • Loading branch information
jmp0 committed Apr 6, 2023
1 parent 51c3e5b commit de355c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
12 changes: 2 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,13 @@ make it possible to run android dex file in original Java Virtual Machine.

3. use the jre you modified(**or use jdk in [appdbg-JDK](https://github.com/asmjmp0/appdbg-JDK)**)

4. **exclude temp dir at project root dir.(if it exist)**<br>
![](assets/idea_highlight_error.png)


5. change idea settings
4. change idea settings
- set gradle jdk version with the patched jdk
![](assets/gradle0.png)
- set gradle java home with the patched jdk in [gradle.properties](gradle.properties)
![](assets/gradle1.png)

6. **io redirect feature powered by java agent [agentJar](agent/build.gradle)**

7. build test apk by [test-app sub project](test-app)

8. run test suites in [testSuites](core/src/test/java/suites)
5. run test suites in [testSuites](core/src/test/java/suites)

![](assets/1.png)

Expand Down
6 changes: 4 additions & 2 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ repositories {
}

test{
if (file("agent/$agent_jar_name").exists() && file("agent/$bootstrap_jar_name").exists()) jvmArgs("-javaagent:agent/$agent_jar_name")
if (file("agent/$agent_jar_name").exists() && file("agent/$bootstrap_jar_name").exists()){
jvmArgs("-Xverify:none","-javaagent:agent/$agent_jar_name")
}
else System.err.println("core/agent/$agent_jar_name or core/agent/$bootstrap_jar_name not exists, please run task [agentJar] in agent/build.gradle file first.")
useJUnitPlatform()
}
Expand All @@ -47,7 +49,7 @@ dependencies {
implementation 'net.dongliu:apk-parser:2.6.10'
compileOnly files('../libs/'+android_lib_name)

testImplementation('org.junit.jupiter:junit-jupiter:5.8.2')
testImplementation('org.junit.jupiter:junit-jupiter:5.9.2')
testCompileOnly fileTree(dir:'../libs/tempLibs',includes:['*jar'])
testCompileOnly files('../libs/'+android_lib_name)

Expand Down

0 comments on commit de355c1

Please sign in to comment.