1

I have a rooted device and I want to change the permission to the folder 'com.android.mms'. My app is system app. Is there a way to do it? I have already tried using process and checked this link as well. How to get File Permission Mode programmatically in Java

They don't throw any error but doesn't do the job as well. Can someone help? Thanks!

Community
  • 1
  • 1
Ekta
  • 338
  • 2
  • 9
  • 26
  • 1
    http://stackoverflow.com/questions/14559068/android-how-to-set-rw-r-r-permissions-programmatically – Zohra Khan Apr 15 '14 at 11:27
  • You cannot use standard Java APIs for file manipulation. Being on a rooted device does not mean you are running as root (you are not). It generally means there is a "su" command which you can invoke in order to perform shell commands as root. The link @ZohraKhan provided has an example of doing that. – mah Apr 15 '14 at 11:29
  • I have seen that link. This works fine if the file is in my package but here I want to manipulate 'com.android.mms' package. – Ekta Apr 15 '14 at 11:50
  • Probably it is not working for you as your device lacks a hacked su, or has one that works differently. The stock Android one will not work for this. – Chris Stratton Apr 15 '14 at 11:59

0 Answers0