I have data from an app I would like to be synced. It writes into a directory, and and has no settings for what dir. I would like it to write to a different dir, one that is synced.
I’m on a nexus 5x, running stock 8.1.0 fully updated. I have root. I’m trying to make things written to /storage/self/primary/sleep-data
go to /storage/self/primary/sync/phone/sleep-data
ln -s
doesn’t work, I’m thinking a filesystem issue, though looking through the output of mount
it wasn’t clear what the filesystem actually is. /storage/self
is mounted as tmpfs
.
mount -o bind /storage/self/primary/sync/phone/sleep-data /storage/self/primary/sleep-data
This looks like it works, but the app says it wrote a file successfully but there is no file. Changes are propagated from the sync app.
I did try mount -o bind,shared
as suggested by Rob W
I suspect it’s related to this: How to "mount –bind" directories in Android 4.4?
That does have a workaround, but it’s looking like I’m approaching this the wrong way. What is the android way to solve this problem?