From 723e8482c0e9a55c0f8f203059d7bcc60a95bf95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20J=2E=20Est=C3=A9banez?= Date: Tue, 22 Aug 2017 00:26:35 +0200 Subject: [PATCH] Make Android debug over USB the only option 'Remote debug over ADB' is removed as that will be always the case. Closes #10458. --- platform/android/export/export.cpp | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp index 737a7c8f6c7..3a62008ad9f 100644 --- a/platform/android/export/export.cpp +++ b/platform/android/export/export.cpp @@ -1596,11 +1596,7 @@ Error EditorExportPlatformAndroid::run(int p_device, int p_flags) { //export_temp ep.step("Exporting APK", 0); - bool use_adb_over_usb = bool(EDITOR_DEF("android/use_remote_debug_over_adb", true)); - - if (use_adb_over_usb) { - p_flags |= EXPORT_REMOTE_DEBUG_LOCALHOST; - } + p_flags |= EXPORT_REMOTE_DEBUG_LOCALHOST; // Needed for adb reverse String export_to = EditorSettings::get_singleton()->get_settings_path() + "/tmp/tmpexport.apk"; Error err = export_project(export_to, true, p_flags); @@ -1649,14 +1645,14 @@ Error EditorExportPlatformAndroid::run(int p_device, int p_flags) { return ERR_CANT_CREATE; } - if (use_adb_over_usb) { + args.clear(); + args.push_back("-s"); + args.push_back(devices[p_device].id); + args.push_back("reverse"); + args.push_back("--remove-all"); + err = OS::get_singleton()->execute(adb, args, true, NULL, NULL, &rv); - args.clear(); - args.push_back("-s"); - args.push_back(devices[p_device].id); - args.push_back("reverse"); - args.push_back("--remove-all"); - err = OS::get_singleton()->execute(adb, args, true, NULL, NULL, &rv); + if (p_flags & EXPORT_REMOTE_DEBUG) { int dbg_port = (int)EditorSettings::get_singleton()->get("network/debug_port"); args.clear(); @@ -1668,6 +1664,9 @@ Error EditorExportPlatformAndroid::run(int p_device, int p_flags) { err = OS::get_singleton()->execute(adb, args, true, NULL, NULL, &rv); print_line("Reverse result: " + itos(rv)); + } + + if (p_flags & EXPORT_DUMB_CLIENT) { int fs_port = EditorSettings::get_singleton()->get("file_server/port"); @@ -1847,7 +1846,6 @@ void register_android_exporter() { //EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING,"android/release_keystore",PROPERTY_HINT_GLOBAL_FILE,"*.keystore")); EDITOR_DEF("android/force_system_user", false); EDITOR_DEF("android/timestamping_authority_url", ""); - EDITOR_DEF("android/use_remote_debug_over_adb", false); EDITOR_DEF("android/shutdown_adb_on_exit", true); Ref exporter = Ref(memnew(EditorExportPlatformAndroid));