Use overlay

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-08-17 21:24:31 +03:00
parent 795ea28583
commit 09fbf7150c
95 changed files with 546 additions and 735 deletions

View File

@@ -0,0 +1,21 @@
--- a/vendor/adb/adb_utils.cpp
+++ b/vendor/adb/adb_utils.cpp
@@ -308,8 +308,16 @@
}
std::string adb_get_android_dir_path() {
- std::string user_dir = adb_get_homedir_path();
- std::string android_dir = user_dir + OS_PATH_SEPARATOR + ".android";
+ const char* android_user_home = getenv("ANDROID_USER_HOME");
+ std::string android_dir;
+
+ if (android_user_home) {
+ android_dir = std::string(android_user_home);
+ } else {
+ std::string user_dir = adb_get_homedir_path();
+ android_dir = user_dir + OS_PATH_SEPARATOR + ".android";
+ }
+
struct stat buf;
if (stat(android_dir.c_str(), &buf) == -1) {
if (adb_mkdir(android_dir, 0750) == -1) {