kiwix / kiwix-android

Kiwix for Android
https://android.kiwix.org
GNU General Public License v3.0
868 stars 443 forks source link

Kiwix does not allow downloading large files on exfat SD cards #2354

Closed LaurentBonnaud closed 4 years ago

LaurentBonnaud commented 4 years ago

Describe the bug

I am trying to download large (>4GB) files to a SD card with an exfat filesystem with Kiwix, but Kiwix does not allow me to do it.

Expected behavior

Kiwix should be able to download and use large files on SD cards with exfat filesystems. Other applications are able to do it on the same device.

Steps to reproduce the behavior:

  1. Insert an SD card in your device and make sure it has an exfat filesystem
  2. In Kiwix, go to the Settings and select "External Storage"
  3. Try to download ZIM files
  4. Files larger than 4GB are grayed out

Screenshots

Upcoming...

Environment

LaurentBonnaud commented 4 years ago

Here is a screenshot: Screenshot_20200901-135458_Kiwix

kelson42 commented 4 years ago

@LaurentBonnaud Thank you for your quality bug report. Would you be able to test now with 3.4 which is currently in beta. Click on https://play.google.com/apps/testing/org.kiwix.kiwixmobile to join the beta testing and secure you reinstall the version 3.4. I believe this bug is fixed in that version (See #2282).

LaurentBonnaud commented 4 years ago

I upgraded Kiwix to version 3.4.0 from the beta channel. Unfortunately the problem remains the same: large files are still grayed out.

kelson42 commented 4 years ago

@macgills What is next to do? Ask for a diagnostic per email?

macgills commented 4 years ago

Yes, if you can send a diagnostic report that would be very helpful, you can do so from the Help section of the app. Also if you long click on the grayed out items a toast should appear which will tell you if the detection process is still ongoing. I believe your sd card is not reporting as exfat even though it is how it has been formatted

LaurentBonnaud commented 4 years ago

Here is the log file: Kiwix-log.txt

LaurentBonnaud commented 4 years ago

A long press on grayed out items does indeed display: "Your file system doesn't support files over 4GB"

macgills commented 4 years ago

Can you send the email from the diagnostic report? Or post the MountPoints here?

LaurentBonnaud commented 4 years ago

I don't see any e-mail, sorry.

Here are mount points:

$ adb shell 
gts6lwifi:/ $ mount | grep /mnt/media_rw
/dev/block/vold/public:179,1 on /mnt/media_rw/6138-3963 type sdfat (rw,nosuid,nodev,noexec,noatime,fs=exfat,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,utf8,namecase=0,adj_req,symlink=0,bps=512,errors=remount-ro)
/mnt/media_rw/6138-3963 on /mnt/runtime/default/6138-3963 type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,mask=6,nocache)
/mnt/media_rw/6138-3963 on /storage/6138-3963 type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,mask=6,nocache)
/mnt/media_rw/6138-3963 on /mnt/runtime/read/6138-3963 type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,mask=18,nocache)
/mnt/media_rw/6138-3963 on /mnt/runtime/write/6138-3963 type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,mask=18,nocache)
/mnt/media_rw/6138-3963 on /mnt/runtime/full/6138-3963 type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,mask=7,nocache)
macgills commented 4 years ago

in the list of apps after you click send on the diagnostic report an email client should be available from the list?

anyway /dev/block/vold/public:179,1 on /mnt/media_rw/6138-3963 type sdfat

your card is reporting as sdfat, there is a fix for this on our nightly builds but it is not live on beta or prod yet

LaurentBonnaud commented 4 years ago

in the list of apps after you click send on the diagnostic report an email client should be available from the list?

Indeed, I had not imagined that the content would be different depending on the sharing methid.

Here is the content of the mail:

Curent Zim File:
null

All Zim Files in DB:

Current Locale:
en_US

Device Details:
Device:[gts6lwifi]
Model:[SM-T860]
Manufacturer:[samsung]
Time:[1594414157000]
Android Version:[10]
App Version:[3.4.0 6230400]

Mount Points
MountInfo(device=/dev/root, mountPoint=/, fileSystem=ext4)
MountInfo(device=tmpfs, mountPoint=/dev, fileSystem=tmpfs)
MountInfo(device=devpts, mountPoint=/dev/pts, fileSystem=devpts)
MountInfo(device=none, mountPoint=/dev/memcg, fileSystem=cgroup)
MountInfo(device=none, mountPoint=/dev/blkio, fileSystem=cgroup)
MountInfo(device=none, mountPoint=/dev/cg2_bpf, fileSystem=cgroup2)
MountInfo(device=none, mountPoint=/dev/cpuctl, fileSystem=cgroup)
MountInfo(device=none, mountPoint=/dev/cpuset, fileSystem=cgroup)
MountInfo(device=none, mountPoint=/dev/stune, fileSystem=cgroup)
MountInfo(device=none, mountPoint=/dev/freezer, fileSystem=cgroup)
MountInfo(device=adb, mountPoint=/dev/usb-ffs/adb, fileSystem=functionfs)
MountInfo(device=proc, mountPoint=/proc, fileSystem=proc)
MountInfo(device=sysfs, mountPoint=/sys, fileSystem=sysfs)
MountInfo(device=selinuxfs, mountPoint=/sys/fs/selinux, fileSystem=selinuxfs)
MountInfo(device=debugfs, mountPoint=/sys/kernel/debug, fileSystem=debugfs)
MountInfo(device=tracefs, mountPoint=/sys/kernel/debug/tracing, fileSystem=tracefs)
MountInfo(device=bpf, mountPoint=/sys/fs/bpf, fileSystem=bpf)
MountInfo(device=pstore, mountPoint=/sys/fs/pstore, fileSystem=pstore)
MountInfo(device=tmpfs, mountPoint=/mnt, fileSystem=tmpfs)
MountInfo(device=tmpfs, mountPoint=/mnt/sde, fileSystem=tmpfs)
MountInfo(device=/dev/block/bootdevice/by-name/persist, mountPoint=/mnt/vendor/persist, fileSystem=ext4)
MountInfo(device=/dev/block/bootdevice/by-name/efs, mountPoint=/mnt/vendor/efs, fileSystem=ext4)
MountInfo(device=/data/knox/secure_fs/enc_media, mountPoint=/mnt/shell/enc_emulated, fileSystem=sdcardfs)
MountInfo(device=/data/media, mountPoint=/mnt/runtime/default/emulated, fileSystem=sdcardfs)
MountInfo(device=/data/media, mountPoint=/mnt/runtime/read/emulated, fileSystem=sdcardfs)
MountInfo(device=/data/media, mountPoint=/mnt/runtime/write/emulated, fileSystem=sdcardfs)
MountInfo(device=/data/media, mountPoint=/mnt/runtime/full/emulated, fileSystem=sdcardfs)
MountInfo(device=/dev/block/vold/public:179,1, mountPoint=/mnt/media_rw/6138-3963, fileSystem=sdfat)
MountInfo(device=/dev/block/vold/public:179,1, mountPoint=/mnt/secure/asec, fileSystem=sdfat)
MountInfo(device=/mnt/media_rw/6138-3963, mountPoint=/mnt/runtime/default/6138-3963, fileSystem=sdcardfs)
MountInfo(device=/mnt/media_rw/6138-3963, mountPoint=/mnt/runtime/read/6138-3963, fileSystem=sdcardfs)
MountInfo(device=/mnt/media_rw/6138-3963, mountPoint=/mnt/runtime/write/6138-3963, fileSystem=sdcardfs)
MountInfo(device=/mnt/media_rw/6138-3963, mountPoint=/mnt/runtime/full/6138-3963, fileSystem=sdcardfs)
MountInfo(device=tmpfs, mountPoint=/apex, fileSystem=tmpfs)
MountInfo(device=/dev/root, mountPoint=/apex/com.android.runtime@1, fileSystem=ext4)
MountInfo(device=/dev/root, mountPoint=/apex/com.android.runtime, fileSystem=ext4)
MountInfo(device=/dev/root, mountPoint=/apex/com.android.tzdata@290000000, fileSystem=ext4)
MountInfo(device=/dev/root, mountPoint=/apex/com.android.tzdata, fileSystem=ext4)
MountInfo(device=/dev/root, mountPoint=/apex/com.android.resolv@290000000, fileSystem=ext4)
MountInfo(device=/dev/root, mountPoint=/apex/com.android.resolv, fileSystem=ext4)
MountInfo(device=/dev/root, mountPoint=/apex/com.android.media@290000000, fileSystem=ext4)
MountInfo(device=/dev/root, mountPoint=/apex/com.android.media, fileSystem=ext4)
MountInfo(device=/dev/root, mountPoint=/apex/com.android.conscrypt@290000000, fileSystem=ext4)
MountInfo(device=/dev/root, mountPoint=/apex/com.android.conscrypt, fileSystem=ext4)
MountInfo(device=/dev/root, mountPoint=/apex/com.android.media.swcodec@290000000, fileSystem=ext4)
MountInfo(device=/dev/root, mountPoint=/apex/com.android.media.swcodec, fileSystem=ext4)
MountInfo(device=/dev/block/dm-1, mountPoint=/product, fileSystem=ext4)
MountInfo(device=/dev/block/dm-1, mountPoint=/product/etc/permissions, fileSystem=ext4)
MountInfo(device=/dev/block/dm-1, mountPoint=/product/etc/sysconfig, fileSystem=ext4)
MountInfo(device=/dev/block/dm-2, mountPoint=/vendor, fileSystem=ext4)
MountInfo(device=/dev/block/bootdevice/by-name/apnhlos, mountPoint=/vendor/firmware_mnt, fileSystem=vfat)
MountInfo(device=/dev/block/bootdevice/by-name/modem, mountPoint=/vendor/firmware-modem, fileSystem=vfat)
MountInfo(device=/dev/block/bootdevice/by-name/dsp, mountPoint=/vendor/dsp, fileSystem=ext4)
MountInfo(device=none, mountPoint=/acct, fileSystem=cgroup)
MountInfo(device=none, mountPoint=/config, fileSystem=configfs)
MountInfo(device=/dev/block/bootdevice/by-name/cache, mountPoint=/cache, fileSystem=ext4)
MountInfo(device=/dev/block/bootdevice/by-name/sec_efs, mountPoint=/efs, fileSystem=ext4)
MountInfo(device=/dev/block/bootdevice/by-name/dqmdbg, mountPoint=/dqmdbg, fileSystem=ext4)
MountInfo(device=/dev/block/bootdevice/by-name/keydata, mountPoint=/keydata, fileSystem=ext4)
MountInfo(device=/dev/block/bootdevice/by-name/keyrefuge, mountPoint=/keyrefuge, fileSystem=ext4)
MountInfo(device=/dev/block/bootdevice/by-name/omr, mountPoint=/omr, fileSystem=ext4)
MountInfo(device=/dev/block/bootdevice/by-name/userdata, mountPoint=/data, fileSystem=f2fs)
MountInfo(device=tmpfs, mountPoint=/storage, fileSystem=tmpfs)
MountInfo(device=/data/media, mountPoint=/storage/emulated, fileSystem=sdcardfs)
MountInfo(device=/mnt/media_rw/6138-3963, mountPoint=/storage/6138-3963, fileSystem=sdcardfs)
MountInfo(device=tmpfs, mountPoint=/storage/self, fileSystem=tmpfs)

External Directories
/storage/emulated/0/Android/data/org.kiwix.kiwixmobile/files
/storage/6138-3963/Android/data/org.kiwix.kiwixmobile/files
LaurentBonnaud commented 4 years ago

there is a fix for this on our nightly builds but it is not live on beta or prod yet

Thanks a lot! I am looking forward to seeing this fix in the beta or prod version...

macgills commented 4 years ago

I'll close this issue for now. We can re-open it if the problem persists

LaurentBonnaud commented 4 years ago

I'll close this issue for now. We can re-open it if the problem persists

Leaving this bug open till the fix is released in a stable version would help avoid duplicate bug reports. In fact this bug has been reported multiple times but I did not see it in my search.

macgills commented 4 years ago

The fix has been implemented, we close tickets when it is on develop, not released. https://github.com/kiwix/kiwix-android/issues/2282 it should have come up in similar issues but this is at the mercy of github search.

For the moment this ticket is not actionable and hopefully never will be so I will keep it closed.

You can see if your problem is resolved with our nightly apk but it is a debug apk intended for developers and I wouldn't recommend for general usage