From 0ed524f1734ef0db4c4f42e179c0124644fef096 Mon Sep 17 00:00:00 2001 From: classic-gentleman <43123392+classic-gentleman@users.noreply.github.com> Date: Tue, 21 Jul 2020 19:57:06 -0300 Subject: [PATCH] Test for NVIDIA/Tegra partition naming scheme first Fixes https://github.com/topjohnwu/Magisk/issues/3014 --- native/jni/init/mount.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/native/jni/init/mount.cpp b/native/jni/init/mount.cpp index 41f7952f4..01ff233af 100644 --- a/native/jni/init/mount.cpp +++ b/native/jni/init/mount.cpp @@ -243,12 +243,12 @@ void SARBase::backup_files() { void SARBase::mount_system_root() { LOGD("Early mount system_root\n"); - sprintf(blk_info.partname, "system%s", cmd->slot); + // Try NVIDIA naming scheme + strcpy(blk_info.partname, "APP"); strcpy(blk_info.block_dev, "/dev/root"); auto dev = setup_block(false); if (dev < 0) { - // Try NVIDIA naming scheme - strcpy(blk_info.partname, "APP"); + sprintf(blk_info.partname, "system%s", cmd->slot); dev = setup_block(false); if (dev < 0) { // We don't really know what to do at this point...