diff --git a/source/cli/Cache/AdbConfigCache.cpp b/source/cli/Cache/AdbConfigCache.cpp index fd6f0e8..811e32a 100644 --- a/source/cli/Cache/AdbConfigCache.cpp +++ b/source/cli/Cache/AdbConfigCache.cpp @@ -25,7 +25,7 @@ std::string AdbConfigCache::get_adb_config(const std::string& device_name, const std::string cache_key = generate_cache_key(device_name, device_SN); std::string adb_config; if (!load(cache_key, adb_config)) { - return std::string(); + return get_default_adb_config(); } return adb_config; } diff --git a/source/cli/main.cpp b/source/cli/main.cpp index 439a6f3..cf014c3 100644 --- a/source/cli/main.cpp +++ b/source/cli/main.cpp @@ -76,12 +76,7 @@ int main(int argc, char** argv) config.init(); AdbConfigCache adb_config_cache; - if (!adb_config_cache.has(device.get_config_device_name(), device.get_config_device_SN())) { - adb_config = adb_config_cache.get_default_adb_config(); - } - else { - adb_config = adb_config_cache.get_adb_config(device.get_config_device_name(), device.get_config_device_SN()); - } + adb_config = adb_config_cache.get_adb_config(device.get_config_device_name(), device.get_config_device_SN()); bool identified = app_package_and_activity(control.get_config_server(), package, activity); if (!identified) {