Skip to content

Commit

Permalink
Update 0.9.5-SNAPSHOT
Browse files Browse the repository at this point in the history
  • Loading branch information
zhkl0228 committed Aug 13, 2021
1 parent 8f53df5 commit e4f4a1c
Show file tree
Hide file tree
Showing 14 changed files with 41 additions and 35 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,6 @@ Simple tests under src/test directory
- [mman-win32](https://github.com/mcgarrah/mman-win32)

### One-time Donation
We accept donations via the following ways:
We accept donations via WeChatPay:

![WeChat Pay](assets/wx.jpg)
![WeChat Pay](assets/wx.png)
Binary file removed assets/wx.jpg
Binary file not shown.
Binary file added assets/wx.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions backend/dynarmic/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
<parent>
<groupId>com.github.zhkl0228</groupId>
<artifactId>unidbg-parent</artifactId>
<version>0.9.4</version>
<version>0.9.5-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>unidbg-dynarmic</artifactId>
<version>0.9.4</version>
<version>0.9.5-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>com.github.zhkl0228</groupId>
<artifactId>unidbg-api</artifactId>
<version>0.9.4</version>
<version>0.9.5-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
6 changes: 3 additions & 3 deletions backend/hypervisor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
<parent>
<groupId>com.github.zhkl0228</groupId>
<artifactId>unidbg-parent</artifactId>
<version>0.9.4</version>
<version>0.9.5-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>unidbg-hypervisor</artifactId>
<version>0.9.4</version>
<version>0.9.5-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>com.github.zhkl0228</groupId>
<artifactId>unidbg-api</artifactId>
<version>0.9.4</version>
<version>0.9.5-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
6 changes: 3 additions & 3 deletions backend/kvm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
<parent>
<groupId>com.github.zhkl0228</groupId>
<artifactId>unidbg-parent</artifactId>
<version>0.9.4</version>
<version>0.9.5-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>unidbg-kvm</artifactId>
<version>0.9.4</version>
<version>0.9.5-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>com.github.zhkl0228</groupId>
<artifactId>unidbg-api</artifactId>
<version>0.9.4</version>
<version>0.9.5-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>com.github.zhkl0228</groupId>
<artifactId>unidbg-parent</artifactId>
<packaging>pom</packaging>
<version>0.9.4</version>
<version>0.9.5-SNAPSHOT</version>
<modules>
<module>unidbg-api</module>
<module>unidbg-android</module>
Expand Down
12 changes: 6 additions & 6 deletions unidbg-android/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,34 @@
<parent>
<groupId>com.github.zhkl0228</groupId>
<artifactId>unidbg-parent</artifactId>
<version>0.9.4</version>
<version>0.9.5-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>unidbg-android</artifactId>
<version>0.9.4</version>
<version>0.9.5-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>com.github.zhkl0228</groupId>
<artifactId>unidbg-api</artifactId>
<version>0.9.4</version>
<version>0.9.5-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.github.zhkl0228</groupId>
<artifactId>unidbg-dynarmic</artifactId>
<version>0.9.4</version>
<version>0.9.5-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.zhkl0228</groupId>
<artifactId>unidbg-hypervisor</artifactId>
<version>0.9.4</version>
<version>0.9.5-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.zhkl0228</groupId>
<artifactId>unidbg-kvm</artifactId>
<version>0.9.4</version>
<version>0.9.5-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,13 @@ public long handle(Emulator<?> emulator) {
Pointer _GetSuperclass = svcMemory.registerSvc(new ArmSvc() {
@Override
public long handle(Emulator<?> emulator) {
Arm32RegisterContext context = emulator.getContext();
RegisterContext context = emulator.getContext();
UnidbgPointer clazz = context.getPointerArg(1);
DvmClass dvmClass = classMap.get(clazz.toIntPeer());
if (verbose) {
System.out.printf("JNIEnv->GetSuperClass(%s) was called from %s%n", dvmClass,
UnidbgPointer.register(emulator, ArmConst.UC_ARM_REG_LR));
System.out.printf("JNIEnv->GetSuperClass(%s) was called from %s%n", dvmClass, context.getLRPointer());
}
if(dvmClass.getClassName().equals("java/lang/Object")){
if (dvmClass.getClassName().equals("java/lang/Object")) {
log.debug("JNIEnv->GetSuperClass was called, class = " + dvmClass.getClassName() + " According to Java Native Interface Specification, " +
"If clazz specifies the class Object, returns NULL.");
throw new BackendException();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ public int write(byte[] data) {
if (debugStream != null) {
debugStream.write(data);
}
out.write(data);
out.flush();
if (log.isWarnEnabled()) {
out.write(data);
out.flush();
}
if (callback != null) {
callback.notifyOut(data, err);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@
import com.github.unidbg.linux.android.dvm.DvmClass;
import com.github.unidbg.linux.android.dvm.VM;
import com.github.unidbg.linux.android.dvm.VarArg;
import com.github.unidbg.linux.file.Stdout;
import com.github.unidbg.linux.struct.Dirent;
import com.github.unidbg.memory.Memory;
import com.github.unidbg.memory.SvcMemory;
import com.github.unidbg.unix.UnixSyscallHandler;
import com.sun.jna.Pointer;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;

import java.io.File;
import java.io.IOException;
Expand Down Expand Up @@ -103,7 +106,7 @@ private void test() {
0x789a, 0.12345D, true, 0x123, 0.456f, 0.789123D, (byte) 0x7f,
0x89abcdefL, 0.123f);

// Logger.getLogger("com.github.unidbg.linux.ARM32SyscallHandler").setLevel(Level.DEBUG);
Logger.getLogger(Stdout.class).setLevel(Level.ERROR);
System.err.println("exit code: " + module.callEntry(emulator) + ", backend=" + emulator.getBackend());
}

Expand Down
4 changes: 2 additions & 2 deletions unidbg-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<parent>
<groupId>com.github.zhkl0228</groupId>
<artifactId>unidbg-parent</artifactId>
<version>0.9.4</version>
<version>0.9.5-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>unidbg-api</artifactId>
<version>0.9.4</version>
<version>0.9.5-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>com.github.zhkl0228</groupId>
Expand Down
12 changes: 6 additions & 6 deletions unidbg-ios/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,34 @@
<parent>
<groupId>com.github.zhkl0228</groupId>
<artifactId>unidbg-parent</artifactId>
<version>0.9.4</version>
<version>0.9.5-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>unidbg-ios</artifactId>
<version>0.9.4</version>
<version>0.9.5-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>com.github.zhkl0228</groupId>
<artifactId>unidbg-api</artifactId>
<version>0.9.4</version>
<version>0.9.5-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.github.zhkl0228</groupId>
<artifactId>unidbg-dynarmic</artifactId>
<version>0.9.4</version>
<version>0.9.5-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.zhkl0228</groupId>
<artifactId>unidbg-hypervisor</artifactId>
<version>0.9.4</version>
<version>0.9.5-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.zhkl0228</groupId>
<artifactId>unidbg-kvm</artifactId>
<version>0.9.4</version>
<version>0.9.5-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ public int write(byte[] data) {
if (debugStream != null) {
debugStream.write(data);
}
out.write(data);
out.flush();
if (log.isWarnEnabled()) {
out.write(data);
out.flush();
}
if (callback != null) {
callback.notifyOut(data, err);
}
Expand Down

0 comments on commit e4f4a1c

Please sign in to comment.