Changes for January 2023
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
From c4f1b9d1e0fecc819f41781aab3e5251b0bd0bb1 Mon Sep 17 00:00:00 2001
|
||||
From 86ce5c90c9ad63295c84bce4c8371585f28639a7 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/7] Allow deletion of symlink
|
||||
Subject: [PATCH 1/5] Allow deletion of symlink
|
||||
|
||||
Change-Id: I9731895f88729072297f753088583aabbe6990f4
|
||||
---
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 75a4589a6a6bbde9b1273c64dce37ab80d5342a0 Mon Sep 17 00:00:00 2001
|
||||
From 273ea129c9879f3761dbc1f1775351796795742d 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 4/7] Failing to create facedata shouldn't be fatal
|
||||
Subject: [PATCH 2/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
|
||||
@@ -1,44 +0,0 @@
|
||||
From cc8870fbad8382da092438af78381fac9bbee251 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/7] 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 7782dd3b..91a4c50d 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 aecee9a897b803b4e65fcd21357c76226e8c4e4c Mon Sep 17 00:00:00 2001
|
||||
From 640654f5ab326cfaa2389933148a6abf13ae2703 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Mon, 29 Nov 2021 17:49:13 -0500
|
||||
Subject: [PATCH 7/7] Don't unmount rw-system.sh binds
|
||||
Subject: [PATCH 3/5] Don't unmount rw-system.sh binds
|
||||
|
||||
Change-Id: If9132c21defa8b09879b79a70794c5275d6852d0
|
||||
---
|
||||
@@ -1,38 +0,0 @@
|
||||
From abc668333338ec0ee2c8a4042551eea0a924eccc 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 3/7] 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 91a4c50d..6c49c10c 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
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
From 144b6510babc101562bb3f9033bb6fecba81fb69 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 65e78871..a22cd67f 100644
|
||||
--- a/Utils.cpp
|
||||
+++ b/Utils.cpp
|
||||
@@ -1007,6 +1007,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 7782dd3b..f2d5754e 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.25.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From d414bcc51b7527764055b20776cb71ec85580106 Mon Sep 17 00:00:00 2001
|
||||
From 389facf897f8c8c493c340cb2b4bf532abed23d7 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 5/7] Every voldmanaged storage is adoptable
|
||||
Subject: [PATCH 5/5] Every voldmanaged storage is adoptable
|
||||
|
||||
---
|
||||
main.cpp | 2 +-
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
From 968689281ef36e9de7743419137eba72c3472803 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Wed, 24 Nov 2021 15:50:30 -0500
|
||||
Subject: [PATCH 6/7] Log support for exfat/texfat FS driver names
|
||||
|
||||
Change-Id: I5ae38741374b25b84595a9eae9bdda7afe2cac05
|
||||
---
|
||||
main.cpp | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/main.cpp b/main.cpp
|
||||
index 3af0dcf3..05b2db62 100644
|
||||
--- a/main.cpp
|
||||
+++ b/main.cpp
|
||||
@@ -71,7 +71,8 @@ int main(int argc, char** argv) {
|
||||
<< (android::vold::IsFilesystemSupported("ext4") ? " ext4" : "")
|
||||
<< (android::vold::IsFilesystemSupported("f2fs") ? " f2fs" : "")
|
||||
<< (android::vold::IsFilesystemSupported("ntfs") ? " ntfs" : "")
|
||||
- << (android::vold::IsFilesystemSupported("vfat") ? " vfat" : "");
|
||||
+ << (android::vold::IsFilesystemSupported("vfat") ? " vfat" : "")
|
||||
+ << (android::vold::IsFilesystemSupported("texfat") ? " texfat" : "");
|
||||
|
||||
VolumeManager* vm;
|
||||
NetlinkManager* nm;
|
||||
--
|
||||
2.25.1
|
||||
|
||||
Reference in New Issue
Block a user