Storage Access Framework not supported by Khadas Android build

It took me a while to find out why some files are not accessible and why some apps are not starting, notably the apps which require Storage Access Framework to start.

It seems this is not enabled on the latest Android build for Khadas Edge 2. Can you please enable it?

@peerchemist Are you using the latest version of firmware to verify?

Yes, I am using the latest version.

Yes, your latest version fixes the DocumentsUI problem but Storage Access Framework is seemingly broken. I have checked this with the developer of the Spirit Cloud app, which uses the Storage Access Framework. App crashes on launch.

https://www.spiritcloud.app/

If you can’t fix that, can you at least compile the kernel with CIFS module? I would try to manually mount SMB shares.

@peerchemist Let’s modify and verify this, or send us the specific verification steps for verification.

kernel-5.10$ git diff
diff --git a/arch/arm64/configs/kedge2_defconfig b/arch/arm64/configs/kedge2_defconfig
@@ -968,6 +969,7 @@ CONFIG_PSTORE_BOOT_LOG=y
 CONFIG_CIFS=y
 CONFIG_CIFS_XATTR=y
 CONFIG_CIFS_POSIX=y
+CONFIG_SMB_FS=y
 # CONFIG_CIFS_DEBUG is not set
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ASCII=y
diff --git a/kernel/configs/android-11.config b/kernel/configs/android-11.config
index 711c8503155d..c609e01a189e 100644
--- a/kernel/configs/android-11.config
+++ b/kernel/configs/android-11.config
@@ -2,7 +2,6 @@
 # CONFIG_ANDROID_LOW_MEMORY_KILLER is not set
 # CONFIG_ANDROID_PARANOID_NETWORK is not set
 # CONFIG_BPFILTER is not set
-# CONFIG_CIFS is not set
 # CONFIG_CIFS_XATTR is not set
 # CONFIG_CIFS_POSIX is not set
1 Like

Looks good.

Include NFS while you are at it.

CONFIG_NFS_FS=y

@peerchemist We plan to add this feature in the next version. Confirm, is your final modification like this?

--- a/arch/arm64/configs/kedge2_defconfig
+++ b/arch/arm64/configs/kedge2_defconfig
@@ -968,6 +968,8 @@ CONFIG_PSTORE_BOOT_LOG=y
 CONFIG_CIFS=y
 CONFIG_CIFS_XATTR=y
 CONFIG_CIFS_POSIX=y
+CONFIG_SMB_FS=y
 # CONFIG_CIFS_DEBUG is not set
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ASCII=y
diff --git a/kernel/configs/android-11.config b/kernel/configs/android-11.config
index 711c8503155d..b66541e11500 100644
--- a/kernel/configs/android-11.config
+++ b/kernel/configs/android-11.config
@@ -2,7 +2,6 @@
 # CONFIG_ANDROID_LOW_MEMORY_KILLER is not set
 # CONFIG_ANDROID_PARANOID_NETWORK is not set
 # CONFIG_BPFILTER is not set
-# CONFIG_CIFS is not set
 # CONFIG_CIFS_XATTR is not set
 # CONFIG_CIFS_POSIX is not set
 # CONFIG_CRYPTO_MD4 is not set
@@ -12,7 +11,6 @@
 # CONFIG_IP6_NF_NAT is not set
 # CONFIG_MODULE_FORCE_UNLOAD is not set
 # CONFIG_NFSD is not set
-# CONFIG_NFS_FS is not set
 # CONFIG_PM_AUTOSLEEP is not set
 # CONFIG_RT_GROUP_SCHED is not set
1 Like

Yes, that looks good.