Changes for January 2024
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
From fdfa781b28c22610fc2cc26a2820da5d0fda4c32 Mon Sep 17 00:00:00 2001
|
||||
From 6c2471e81fd226bcb4e0314b996f13aeb51738f1 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Sat, 17 Feb 2018 19:39:38 +0100
|
||||
Subject: [PATCH 1/6] Allow deletion of symlink
|
||||
Subject: [PATCH 1/5] Allow deletion of symlink
|
||||
|
||||
Change-Id: I9731895f88729072297f753088583aabbe6990f4
|
||||
---
|
||||
@@ -21,5 +21,5 @@ index fd42cbe..230fdf6 100644
|
||||
return false;
|
||||
}
|
||||
--
|
||||
2.25.1
|
||||
2.34.1
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From e46c9b776cef6a26dceb5e447a7efbe14608df93 Mon Sep 17 00:00:00 2001
|
||||
From 3d68d6ddc26b0b60b36f1697dd162967fb99af19 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Mon, 16 Sep 2019 13:49:05 +0200
|
||||
Subject: [PATCH 3/6] Check needsCheckpoint only if checkpoint is supported
|
||||
Subject: [PATCH 2/5] Check needsCheckpoint only if checkpoint is supported
|
||||
|
||||
This is needed because some devices (Xiaomi MiPad 4, uncertified)
|
||||
declares a bootctrl HAL in manifest, but doesn't have it.
|
||||
@@ -28,5 +28,5 @@ index 3c6ed15..4188797 100644
|
||||
while ((mount_rc = fs_mgr_do_mount(&fstab_default, DATA_MNT_POINT, blkdev.data(), 0,
|
||||
needs_cp, false)) != 0) {
|
||||
--
|
||||
2.25.1
|
||||
2.34.1
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
From 42c27d00edd1a7cf52b7fa33cc16395e05e37d3c Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Mon, 20 Aug 2018 22:37:54 +0200
|
||||
Subject: [PATCH 2/6] Support Samsung's implementation of exfat, called sdfat
|
||||
|
||||
---
|
||||
fs/Exfat.cpp | 9 ++++++---
|
||||
1 file changed, 6 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/fs/Exfat.cpp b/fs/Exfat.cpp
|
||||
index 34f1024..3aa9494 100644
|
||||
--- a/fs/Exfat.cpp
|
||||
+++ b/fs/Exfat.cpp
|
||||
@@ -35,7 +35,7 @@ static const char* kFsckPath = "/system/bin/fsck.exfat";
|
||||
|
||||
bool IsSupported() {
|
||||
return access(kMkfsPath, X_OK) == 0 && access(kFsckPath, X_OK) == 0 &&
|
||||
- IsFilesystemSupported("exfat");
|
||||
+ (IsFilesystemSupported("exfat") || IsFilesystemSupported("sdfat"));
|
||||
}
|
||||
|
||||
status_t Check(const std::string& source) {
|
||||
@@ -61,13 +61,16 @@ status_t Mount(const std::string& source, const std::string& target, int ownerUi
|
||||
auto mountData = android::base::StringPrintf("uid=%d,gid=%d,fmask=%o,dmask=%o", ownerUid,
|
||||
ownerGid, permMask, permMask);
|
||||
|
||||
- if (mount(source.c_str(), target.c_str(), "exfat", mountFlags, mountData.c_str()) == 0) {
|
||||
+ const char *fs = "exfat";
|
||||
+ if(IsFilesystemSupported("sdfat"))
|
||||
+ fs = "sdfat";
|
||||
+ if (mount(source.c_str(), target.c_str(), fs, mountFlags, mountData.c_str()) == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
PLOG(ERROR) << "Mount failed; attempting read-only";
|
||||
mountFlags |= MS_RDONLY;
|
||||
- if (mount(source.c_str(), target.c_str(), "exfat", mountFlags, mountData.c_str()) == 0) {
|
||||
+ if (mount(source.c_str(), target.c_str(), fs, mountFlags, mountData.c_str()) == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 4d463aa11eeaddc24542fe35da764b0194cf2701 Mon Sep 17 00:00:00 2001
|
||||
From 32a61bdac378c17fa0b0e21b9e543eac58b26039 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Sat, 7 Mar 2020 14:49:09 +0100
|
||||
Subject: [PATCH 5/6] Failing to create facedata shouldn't be fatal
|
||||
Subject: [PATCH 3/5] Failing to create facedata shouldn't be fatal
|
||||
|
||||
Some Pie vendors create it on their own, so SELinux would deny that
|
||||
Also not all devices have face unlock anyway
|
||||
@@ -34,5 +34,5 @@ index d624d73..60056f3 100644
|
||||
}
|
||||
}
|
||||
--
|
||||
2.25.1
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
From 8ca8ebf6f8b5842abfa6943a1773a529e1def310 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Tue, 18 Oct 2022 16:08:09 -0400
|
||||
Subject: [PATCH 4/5] Exfat can be mounted with "exfat" kernel fs driver, or
|
||||
"sdfat" or "texfat" (Samsung and Sony variants)
|
||||
|
||||
@AndyCGYan: Adapt to LineageOS vold
|
||||
|
||||
Change-Id: I331e66d8cb37664adbd493b9190123e29f01fd9d
|
||||
---
|
||||
Utils.cpp | 5 +++++
|
||||
fs/Exfat.cpp | 11 +++++++++--
|
||||
2 files changed, 14 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Utils.cpp b/Utils.cpp
|
||||
index 8ce1370..d6c10a5 100644
|
||||
--- a/Utils.cpp
|
||||
+++ b/Utils.cpp
|
||||
@@ -1004,6 +1004,11 @@ bool IsFilesystemSupported(const std::string& fsType) {
|
||||
/* fuse filesystems */
|
||||
supported.append("fuse\tntfs\n");
|
||||
|
||||
+ /* treat sdfat/texfat as exfat */
|
||||
+ if (supported.find("sdfat\n") != std::string::npos || supported.find("texfat\n") != std::string::npos) {
|
||||
+ supported.append("\texfat\n");
|
||||
+ }
|
||||
+
|
||||
return supported.find(fsType + "\n") != std::string::npos;
|
||||
}
|
||||
|
||||
diff --git a/fs/Exfat.cpp b/fs/Exfat.cpp
|
||||
index 34f1024..2f13e69 100644
|
||||
--- a/fs/Exfat.cpp
|
||||
+++ b/fs/Exfat.cpp
|
||||
@@ -61,13 +61,20 @@ status_t Mount(const std::string& source, const std::string& target, int ownerUi
|
||||
auto mountData = android::base::StringPrintf("uid=%d,gid=%d,fmask=%o,dmask=%o", ownerUid,
|
||||
ownerGid, permMask, permMask);
|
||||
|
||||
- if (mount(source.c_str(), target.c_str(), "exfat", mountFlags, mountData.c_str()) == 0) {
|
||||
+ const char *fs = "exfat";
|
||||
+ if (IsFilesystemSupported("sdfat")) {
|
||||
+ fs = "sdfat";
|
||||
+ } else if (IsFilesystemSupported("texfat")) {
|
||||
+ fs = "texfat";
|
||||
+ }
|
||||
+
|
||||
+ if (mount(source.c_str(), target.c_str(), fs, mountFlags, mountData.c_str()) == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
PLOG(ERROR) << "Mount failed; attempting read-only";
|
||||
mountFlags |= MS_RDONLY;
|
||||
- if (mount(source.c_str(), target.c_str(), "exfat", mountFlags, mountData.c_str()) == 0) {
|
||||
+ if (mount(source.c_str(), target.c_str(), fs, mountFlags, mountData.c_str()) == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
From 719cfde8ee01af3d1d9304bad2337466876a5af4 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Tue, 28 Jan 2020 00:27:17 +0100
|
||||
Subject: [PATCH 4/6] Sony has `texfat` exfat fs
|
||||
|
||||
---
|
||||
fs/Exfat.cpp | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/fs/Exfat.cpp b/fs/Exfat.cpp
|
||||
index 3aa9494..03ad649 100644
|
||||
--- a/fs/Exfat.cpp
|
||||
+++ b/fs/Exfat.cpp
|
||||
@@ -35,7 +35,11 @@ static const char* kFsckPath = "/system/bin/fsck.exfat";
|
||||
|
||||
bool IsSupported() {
|
||||
return access(kMkfsPath, X_OK) == 0 && access(kFsckPath, X_OK) == 0 &&
|
||||
- (IsFilesystemSupported("exfat") || IsFilesystemSupported("sdfat"));
|
||||
+ (
|
||||
+ IsFilesystemSupported("exfat") ||
|
||||
+ IsFilesystemSupported("sdfat") ||
|
||||
+ IsFilesystemSupported("texfat")
|
||||
+ );
|
||||
}
|
||||
|
||||
status_t Check(const std::string& source) {
|
||||
@@ -64,6 +68,8 @@ status_t Mount(const std::string& source, const std::string& target, int ownerUi
|
||||
const char *fs = "exfat";
|
||||
if(IsFilesystemSupported("sdfat"))
|
||||
fs = "sdfat";
|
||||
+ if(IsFilesystemSupported("texfat"))
|
||||
+ fs = "texfat";
|
||||
if (mount(source.c_str(), target.c_str(), fs, mountFlags, mountData.c_str()) == 0) {
|
||||
return 0;
|
||||
}
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 1cbbd5e59bad038231806c4ae9b04cbb2f0208da Mon Sep 17 00:00:00 2001
|
||||
From 09b7b2dba0978730e7dd25da499b9ff9cb497933 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Wed, 11 Mar 2020 14:02:35 +0100
|
||||
Subject: [PATCH 6/6] Every voldmanaged storage is adoptable
|
||||
Subject: [PATCH 5/5] Every voldmanaged storage is adoptable
|
||||
|
||||
---
|
||||
main.cpp | 2 +-
|
||||
@@ -21,5 +21,5 @@ index 2ddb958..77c8ab5 100644
|
||||
*has_adoptable = true;
|
||||
}
|
||||
--
|
||||
2.25.1
|
||||
2.34.1
|
||||
|
||||
Reference in New Issue
Block a user