From 52dba9a5a5b5355ad9b6e6a1aaec5e2eba829ab0 Mon Sep 17 00:00:00 2001 From: Christoph Baumann Date: Fri, 23 May 2025 18:05:27 +0200 Subject: [PATCH] use correct storage when checking if can flash android --- nyx/nyx_gui/frontend/gui_tools_partition_manager.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nyx/nyx_gui/frontend/gui_tools_partition_manager.c b/nyx/nyx_gui/frontend/gui_tools_partition_manager.c index 2bd19112..4f32b4c6 100644 --- a/nyx/nyx_gui/frontend/gui_tools_partition_manager.c +++ b/nyx/nyx_gui/frontend/gui_tools_partition_manager.c @@ -1062,7 +1062,8 @@ static int _get_available_android_partition() gpt_t *gpt = zalloc(sizeof(gpt_t)); // Read main GPT. - sdmmc_storage_read(&sd_storage, 1, sizeof(gpt_t) >> 9, gpt); + sdmmc_storage_t *storage = part_info.drive == DRIVE_SD ? &sd_storage : &emmc_storage; + sdmmc_storage_read(storage, 1, sizeof(gpt_t) >> 9, gpt); // Check if GPT. if (memcmp(&gpt->header.signature, "EFI PART", 8) || gpt->header.num_part_ents > 128)