There is a file located in /data/user/0/com.uniquestudio.android.iemoji/files/yibaiwan.txt
.
I want to read the file in JNI.
ifstream in.open(in_file_name, ios::binary);
LOGD("%d", in.good() ? 1 : 0);
However in.good()
is always false
. What's wrong?
Can anyone help me? Thanks in advance.
As you know, INTERNAL_STORAGE does not require permission.
The file is encrypted
file. When I use above code to read normal file, everything works well. Now I want to read the encrypted
file then decrypt
it.
If anyone meets same issue, you maybe create file as root
role. If you edit file or create file under root
, you can not visit it anymore with normal user role.