From bf8224213d2a06f1668fb9c123cabe6cfde50da9 Mon Sep 17 00:00:00 2001
From: bunnei <bunneidev@gmail.com>
Date: Fri, 5 Jul 2019 18:56:17 -0400
Subject: [PATCH] android: common: file_util: Add user_path, ConfigDir, and
 CacheDir.

---
 src/common/file_util.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/common/file_util.cpp b/src/common/file_util.cpp
index 338d4bebb..247104b6d 100644
--- a/src/common/file_util.cpp
+++ b/src/common/file_util.cpp
@@ -683,7 +683,11 @@ void SetUserPath(const std::string& path) {
         g_paths.emplace(UserPath::ConfigDir, user_path + CONFIG_DIR DIR_SEP);
         g_paths.emplace(UserPath::CacheDir, user_path + CACHE_DIR DIR_SEP);
 #elif ANDROID
-        ASSERT_MSG(false, "Specified path {} is not valid", path);
+        if (FileUtil::Exists(ROOT_DIR DIR_SEP SDCARD_DIR)) {
+            user_path = ROOT_DIR DIR_SEP SDCARD_DIR DIR_SEP EMU_DATA_DIR DIR_SEP;
+            g_paths.emplace(UserPath::ConfigDir, user_path + CONFIG_DIR DIR_SEP);
+            g_paths.emplace(UserPath::CacheDir, user_path + CACHE_DIR DIR_SEP);
+        }
 #else
         if (FileUtil::Exists(ROOT_DIR DIR_SEP USERDATA_DIR)) {
             user_path = ROOT_DIR DIR_SEP USERDATA_DIR DIR_SEP;