From 2a3d4ce3ca74e5cf5ea5c85f2152083cf7393f95 Mon Sep 17 00:00:00 2001 From: codelover Date: Sat, 14 Mar 2015 20:26:49 +0800 Subject: Fix TWRP not mounting /data/media type storage if built with toolbox utils * ONLY Applicable when building with 'TW_USE_TOOLBOX := true' * toolbox's 'mount' expects the first argument to be a block device, but /data/media is a dir. * Technically we don't 'mount' a dir to another, we 'bind' it instead. * So we define the mount option explicitly with '-o bind'. (supported by busybox 'mount' too) Change-Id: If97c9096167fb723150b949f4336005b3313a174 --- partition.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'partition.cpp') diff --git a/partition.cpp b/partition.cpp index 87a605bce..ef29bb6b3 100644 --- a/partition.cpp +++ b/partition.cpp @@ -1029,7 +1029,7 @@ bool TWPartition::Mount(bool Display_Error) { Update_Size(Display_Error); if (!Symlink_Mount_Point.empty()) { - string Command = "mount '" + Symlink_Path + "' '" + Symlink_Mount_Point + "'"; + string Command = "mount -o bind '" + Symlink_Path + "' '" + Symlink_Mount_Point + "'"; TWFunc::Exec_Cmd(Command); } return true; -- cgit v1.2.3