assuming I have a (stock) android 4.x tablet connected to a microcontroller board via USB. The board is able to access the SD-card as USB mass storage and reads/writes to a file on the card. Now there should be an app on the tablet, which reads/writes the same file like the board does. So there is simultaneous read/write file-access from the board and the app.
To avoid inconsistent data etc. I would use exclusive FileLock when the app reads/writes to the file. Now my question is, if FileLock "is low-level enough" to also work in this case and prevent inconsistent data?
THX