5.10.1, 5.11.0, 5.11.1
Qt 5.11.1 android
Google Nexus 7 (android 6.0)
The QStorageInfo dos not return correct info, bytesFree(), bytesTotal(), bytesAvailable() all returns 0.
This is the same issue as
As I explained in
QTBUG-69173, the main cause is QStorageInfo is using
_PATH_MOUNTED by include <paths.h>, but the value is defined differently in NDK r10e and more recent NDK.
in <NDK-r10e>/platforms/android-16/arch-arm/usr/include/paths.h (all other api levels has the same value)
Since qt installer binary is built with NDK r10e, we are stuck with "/etc/mtab".
The problem is most android devices do not have "/etc/mtab", I have tested this with Google's Nexus 7, and it certainly does not have /etc/mtab.
QStorageInfo used to work normally, but suddenly failed with newer Qt release. The fix should be simple, just hardcode _PATH_MOUNTED to "/proc/mounts", something like:
But since the developer keep resist making the changes, maybe it is time to move NDK to a more recent release?