diff --git a/app/src/main/java/com/droiddeck/launcher/runtime/LinuxRuntime.java b/app/src/main/java/com/droiddeck/launcher/runtime/LinuxRuntime.java index 3e5b0a29c..345ff31d1 100644 --- a/app/src/main/java/com/droiddeck/launcher/runtime/LinuxRuntime.java +++ b/app/src/main/java/com/droiddeck/launcher/runtime/LinuxRuntime.java @@ -306,7 +306,17 @@ public final class LinuxRuntime { private static boolean unreadablePciDevice() { File[] devices = new File("/sys/bus/pci/devices").listFiles(); - if (devices == null) return false; + if (devices == null) { + // The directory is there but the app may not list it (Android 13 on the AYN Thor): libpci then + // aborts the whole program with "Cannot open /sys/bus/pci/devices", which Chromium's GPU + // initialisation runs into. Not there at all (no PCI bus) is fine as it is. + try { + android.system.Os.stat("/sys/bus/pci/devices"); + return true; + } catch (android.system.ErrnoException e) { + return e.errno == android.system.OsConstants.EACCES; + } + } for (File device : devices) { if (!new File(device, "vendor").canRead()) return true; }