Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Commit

Permalink
Send signal should be the last
Browse files Browse the repository at this point in the history
Scan /proc is too slow
  • Loading branch information
RikkaW committed Jan 13, 2021
1 parent 452a1d9 commit 97f3d0b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions riru/src/main/java/riru/Daemon.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ private void startWait(boolean allowRestart, boolean isFirst) {
Log.i(TAG, "Zygote is probably dead, delete existing /dev/riru_ folders...");
DaemonUtils.deleteDevFolder();

Log.i(TAG, "Zygote is probably dead, restart rirud socket...");
DaemonUtils.startSocket(DaemonUtils.findNativeDaemonPid());

Log.i(TAG, "Zygote is probably dead, reset native bridge to " + RIRU_LOADER + "...");
DaemonUtils.resetNativeBridgeProp(RIRU_LOADER);

Log.i(TAG, "Zygote is probably dead, restart rirud socket...");
DaemonUtils.startSocket(DaemonUtils.findNativeDaemonPid());

handler.post(() -> startWait(true, false));
}, 0);
} catch (RemoteException e) {
Expand Down
6 changes: 3 additions & 3 deletions riru/src/main/java/riru/DaemonUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,15 @@ public static void deleteDevFolder() {
File file;

file = new File("/dev/riru_" + devRandom);
Log.i(Daemon.TAG, "Attempt to delete " + file + ".");
Log.i(Daemon.TAG, "Attempt to delete " + file + "...");
if (!deleteDir(file)) {
file.renameTo(new File("/dev/riru_" + devRandom + "_" + System.currentTimeMillis()));
} else {
Log.i(Daemon.TAG, "Deleted " + file + ".");
Log.i(Daemon.TAG, "Deleted " + file);
}

file = new File("/dev/riru64_" + devRandom);
Log.i(Daemon.TAG, "Attempt to delete " + file + ".");
Log.i(Daemon.TAG, "Attempt to delete " + file + "...");
if (!deleteDir(file)) {
file.renameTo(new File("/dev/riru_" + devRandom + "_" + System.currentTimeMillis()));
} else {
Expand Down

0 comments on commit 97f3d0b

Please sign in to comment.