While creating application with database and shared preferences sometimes a programmer wants to directly edit the data for testing purpose to make your testing easy. Thats why Android Studio has Android Device Monitor which opens the file system of your currently active Android Virtual Device (AVD) or the connected Android Mobile Phone. In the case of AVD it’s easy as you have all the rights to that so you can easily tamper with data but thats not the case with connected android device.

If you are testing your app directly on your android phone the it become somewhat tedious as the you are not allowed to access the data of your android application. So what to do in this case? In this post you will learn this thing.

Let’s start. Follow these steps:

  • Root your android phone to get root access
  • Now open the ADB shell in your computer
  • type su
  • Now you are super user means the admin and you have all the privilages so type
    chmod 777 /data
  • The Data folder is all yours