root - data directory not accessible android -


i have rooted device , trying write file on /data/data folder, "parent directory of file not writable: /data/data/test.txt" exception occur when control going create file. code:

runtime runtime = runtime.getruntime(); process process = runtime.exec("chmod 777 /data/data"); process.waitfor(); resultfile = new file(environment.getdatadirectory()+ "/data/test.txt"); if (!resultfile.exists()) { resultfile.createnewfile(); } 

please me wrong.

change directory /data/data/your_package_name/test.txt


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -