My android is rooted device.I want to store file in root directory/data/logs
.How will I give path of the file in code.I'm writing Environment.getExternalStorageDirectory()/data/logs
,then It is saving in internal memory of device not the root directory.My app will be the system app in device so I have all the permissions.
Asked
Active
Viewed 1,164 times
0

Dhaval Parmar
- 18,812
- 8
- 82
- 177

Dhingra Priya
- 31
- 4
-
http://stackoverflow.com/questions/2079766/how-to-create-write-file-in-the-root-of-the-android-device – Dhinakaran Thennarasu Feb 12 '16 at 04:06
-
try using `data/logs` insted of `getExternalStorageDirectory()/data/logs` – Jaiprakash Soni Feb 12 '16 at 04:06
-
@JaiprakashSoni this will store the logs in internal memory I want to store it in android device root directory – Dhingra Priya Feb 12 '16 at 04:22
-
@JaiprakashSoni I tried /data/logs it is working thanks .Problem is with the permission inlogs folder i have gave it 777 permission to this directory.now it worked – Dhingra Priya Feb 12 '16 at 05:02