Click here to Skip to main content
15,884,353 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I want to modify my viber database on my app. i use this code:
Java
File f = new File("/data/data/com.viber.voip/databases/viber_messages");
  boolean b1 = f.setExecutable(true, false);
  boolean b2 = f.setWritable(true, false);

but b1,b2 are false.How can it be done?
i use "android.permission.WRITE_EXTERNAL_STORAGE" permission
Posted

1 solution

See https://developer.android.com/reference/java/io/File.html#setExecutable(boolean, boolean)[^]; it appears you do not have permission to change these settings.
 
Share this answer
 
Comments
Kasra Ahmadi 15-Dec-14 5:34am    
so how can i access to this permission?
Richard MacCutchan 15-Dec-14 5:38am    
I don't think you are allowed to from outside the application that created the file.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900