From 054093025e9b9773853151665ee1cd635f0e7953 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Mon, 19 Jun 2023 19:59:21 +0800 Subject: [PATCH] Disk (Android): actually detect something --- src/detection/disk/disk_linux.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/detection/disk/disk_linux.c b/src/detection/disk/disk_linux.c index 446e93b15..2859fa374 100644 --- a/src/detection/disk/disk_linux.c +++ b/src/detection/disk/disk_linux.c @@ -17,6 +17,8 @@ static bool isPhysicalDevice(FFstrbuf* device) { + #ifndef __ANDROID__ //On Android, `/dev` is not accessable, so that the following checks always fail + //DrvFs is a filesystem plugin to WSL that was designed to support interop between WSL and the Windows filesystem. if(ffStrbufEqualS(device, "drvfs")) return true; @@ -37,6 +39,8 @@ static bool isPhysicalDevice(FFstrbuf* device) if(!ffStrbufStartsWithS(device, "/dev/")) return false; + #endif // __ANDROID__ + if( ffStrbufStartsWithS(device, "/dev/loop") || //Ignore loop devices ffStrbufStartsWithS(device, "/dev/ram") || //Ignore ram devices