Unable to write file?
const path = RNFS.DocumentDirectoryPath + '/test.txt';
Alert.alert(path);
RNFS.writeFile(path, 'yoyo', 'utf8').then((success) => {
// Alert.alert('DEBUG::done!');
});
If I use RNFS.DocumentDirectoryPath, it gives me a url
/data/user/0/com.manager/files/test.txt.
But from my android device's internal storage, the path appears to be
My Files > Android > data > com.manager
I've tried the following too but getting file not found error:
const path = '/data/com.manager/files/test.txt';
After some studies seems like data/user/0/com.manager... is a valid path which needed root access in order to view the file.
how did you solved this @isaaclem ? I also have issues because of not having root rights.. could you give me a piece of demo code?
@cristianonescu
you can read the files in your device as so
adb shell
run-as com.your.packagename
cp /data/data/com.your.packagename/
How did you solved it? I am also facing same issue.
I am also facing the same issue . Is it solved?