Skip to content

Commit

Permalink
Fix dex2oat on 64bit only Android 10 (LSPosed#2820)
Browse files Browse the repository at this point in the history
  • Loading branch information
rawer886 committed Oct 19, 2023
1 parent bd4db30 commit 6f1268e
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import android.net.LocalServerSocket;
import android.os.Build;
import android.os.FileObserver;
import android.os.Process;
import android.os.SELinux;
import android.system.ErrnoException;
import android.system.Os;
Expand Down Expand Up @@ -66,8 +67,8 @@ private void openDex2oat(int id, String path) {

public Dex2OatService() {
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.Q) {
openDex2oat(0, "/apex/com.android.runtime/bin/dex2oat");
openDex2oat(1, "/apex/com.android.runtime/bin/dex2oatd");
openDex2oat(Process.is64Bit() ? 2 : 0, "/apex/com.android.runtime/bin/dex2oat");
openDex2oat(Process.is64Bit() ? 3 : 1, "/apex/com.android.runtime/bin/dex2oatd");
} else {
openDex2oat(0, "/apex/com.android.art/bin/dex2oat32");
openDex2oat(1, "/apex/com.android.art/bin/dex2oatd32");
Expand Down

0 comments on commit 6f1268e

Please sign in to comment.