Merge "uncrypt: write permission for f2fs_pin_file" am: d65cde7c5a
am: 04630e738e
Change-Id: I5af87342ca9b9f6e1d604de661a3b96f6aca80ca
diff --git a/uncrypt/uncrypt.cpp b/uncrypt/uncrypt.cpp
index cf068ba..d1970e5 100644
--- a/uncrypt/uncrypt.cpp
+++ b/uncrypt/uncrypt.cpp
@@ -300,7 +300,7 @@
int head_block = 0;
int head = 0, tail = 0;
- android::base::unique_fd fd(open(path, O_RDONLY));
+ android::base::unique_fd fd(open(path, O_RDWR));
if (fd == -1) {
PLOG(ERROR) << "failed to open " << path << " for reading";
return kUncryptFileOpenError;