How can I use O_DIRECT or O_SYNC on an external SD card with Android KitKat

陌路散爱 提交于 2019-12-03 20:52:19

If you have root-access to your phone you can write a 1 to /proc/sys/vm/drop_caches to clear the page cache (see http://linux-mm.org/Drop_Caches). After that command the next read on the sdcard will return the non-cached data.

For stock-devices (where you have no permission to /proc/sys/vm/drop_caches) there is a issue in the AOSP (you may star it): https://code.google.com/p/android/issues/detail?id=67406

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!