diff --git a/README.md b/README.md index d12162e..8d7554e 100644 --- a/README.md +++ b/README.md @@ -107,16 +107,16 @@ $ cd DroidFS [libgocryptfs](https://forge.chapril.org/hardcoresushi/libgocryptfs) needs OpenSSL: ``` $ cd app/libgocryptfs -$ wget https://www.openssl.org/source/openssl-1.1.1m.tar.gz +$ wget https://www.openssl.org/source/openssl-1.1.1n.tar.gz ``` Verify OpenSSL signature: ``` -$ wget https://www.openssl.org/source/openssl-1.1.1m.tar.gz.asc -$ gpg --verify openssl-1.1.1m.tar.gz.asc openssl-1.1.1m.tar.gz +$ wget https://www.openssl.org/source/openssl-1.1.1n.tar.gz.asc +$ gpg --verify openssl-1.1.1n.tar.gz.asc openssl-1.1.1n.tar.gz ``` Continue **ONLY** if the signature is **VALID**. ``` -$ tar -xvzf openssl-1.1.1m.tar.gz +$ tar -xvzf openssl-1.1.1n.tar.gz ``` DroidFS also need [FFmpeg](https://ffmpeg.org) to record encrypted video: ``` @@ -134,7 +134,7 @@ $ keytool -genkey -keystore -alias -keyalg EC -validit Retrieve your Android NDK installation path, usually something like "/home/\/Android/SDK/ndk/\". Now you can build libgocryptfs: ``` $ cd DroidFS/app/libgocryptfs -$ env ANDROID_NDK_HOME="" OPENSSL_PATH="./openssl-1.1.1m" ./build.sh +$ env ANDROID_NDK_HOME="" OPENSSL_PATH="./openssl-1.1.1n" ./build.sh ``` Then FFmpeg: ``` diff --git a/app/libgocryptfs b/app/libgocryptfs index 89966b1..985d852 160000 --- a/app/libgocryptfs +++ b/app/libgocryptfs @@ -1 +1 @@ -Subproject commit 89966b1aaef93ac842f2240451ebfd50dd2bbce9 +Subproject commit 985d8523434814cd9cba61b666a1f888bdcbaded diff --git a/app/src/main/java/sushi/hardcore/droidfs/GocryptfsVolume.kt b/app/src/main/java/sushi/hardcore/droidfs/GocryptfsVolume.kt index d394a25..c2f4224 100644 --- a/app/src/main/java/sushi/hardcore/droidfs/GocryptfsVolume.kt +++ b/app/src/main/java/sushi/hardcore/droidfs/GocryptfsVolume.kt @@ -48,93 +48,63 @@ class GocryptfsVolume(val applicationContext: Context, var sessionID: Int) { } fun close() { - synchronized(applicationContext) { - native_close(sessionID) - } + native_close(sessionID) } fun isClosed(): Boolean { - synchronized(applicationContext) { - return native_is_closed(sessionID) - } + return native_is_closed(sessionID) } fun listDir(dir_path: String): MutableList { - synchronized(applicationContext) { - return native_list_dir(sessionID, dir_path) - } + return native_list_dir(sessionID, dir_path) } fun mkdir(dir_path: String): Boolean { - synchronized(applicationContext) { - return native_mkdir(sessionID, dir_path, ConstValues.DIRECTORY_MODE) - } + return native_mkdir(sessionID, dir_path, ConstValues.DIRECTORY_MODE) } fun rmdir(dir_path: String): Boolean { - synchronized(applicationContext) { - return native_rmdir(sessionID, dir_path) - } + return native_rmdir(sessionID, dir_path) } fun removeFile(file_path: String): Boolean { - synchronized(applicationContext) { - return native_remove_file(sessionID, file_path) - } + return native_remove_file(sessionID, file_path) } fun pathExists(file_path: String): Boolean { - synchronized(applicationContext) { - return native_path_exists(sessionID, file_path) - } + return native_path_exists(sessionID, file_path) } fun getSize(file_path: String): Long { - synchronized(applicationContext) { - return native_get_size(sessionID, file_path) - } + return native_get_size(sessionID, file_path) } fun closeFile(handleID: Int) { - synchronized(applicationContext) { - native_close_file(sessionID, handleID) - } + native_close_file(sessionID, handleID) } fun openReadMode(file_path: String): Int { - synchronized(applicationContext) { - return native_open_read_mode(sessionID, file_path) - } + return native_open_read_mode(sessionID, file_path) } fun openWriteMode(file_path: String): Int { - synchronized(applicationContext) { - return native_open_write_mode(sessionID, file_path, ConstValues.FILE_MODE) - } + return native_open_write_mode(sessionID, file_path, ConstValues.FILE_MODE) } fun readFile(handleID: Int, offset: Long, buff: ByteArray): Int { - synchronized(applicationContext) { - return native_read_file(sessionID, handleID, offset, buff) - } + return native_read_file(sessionID, handleID, offset, buff) } fun writeFile(handleID: Int, offset: Long, buff: ByteArray, buff_size: Int): Int { - synchronized(applicationContext) { - return native_write_file(sessionID, handleID, offset, buff, buff_size) - } + return native_write_file(sessionID, handleID, offset, buff, buff_size) } fun truncate(handleID: Int, offset: Long): Boolean { - synchronized(this) { - return native_truncate(sessionID, handleID, offset) - } + return native_truncate(sessionID, handleID, offset) } fun rename(old_path: String, new_path: String): Boolean { - synchronized(this) { - return native_rename(sessionID, old_path, new_path) - } + return native_rename(sessionID, old_path, new_path) } fun exportFile(handleID: Int, os: OutputStream): Boolean {