From c3df4d359a046467a8c24935bc3415d44480d894 Mon Sep 17 00:00:00 2001 From: Marcel Alexandru Nitan Date: Mon, 22 May 2023 09:36:51 +0000 Subject: [PATCH] configfs: add /config as an alternate mount point --- src/util.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/util.cpp b/src/util.cpp index 39328f1..8f60d8b 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -10,6 +10,7 @@ #include #include #include +#include char *fs_mount_point(char *filesystem_type) { struct mntent *ent; @@ -24,6 +25,17 @@ char *fs_mount_point(char *filesystem_type) { break; } } + + // Alternate search location on Android + if (mount_point == nullptr) + { + const char *alt_usb_gadget = "/config/usb_gadget"; + DIR *dir = opendir(alt_usb_gadget); + if (dir) + { + mount_point = (char*)"/config"; + } + } return mount_point; }