Accessing “data” folder in real devices with root access

Posted on Updated on

In this post I am going to demonstrate how to access system folder ie “data” folder in real android devices using DDMS. At times it is necessary to view the contents of  ‘data’ folder which contains all the files such as shared preferences, database or text file of a particular application. By default data folder is accessible while using an emulator but while using real devices the folder is private and it is not accessible by using DDMS. The hierarchy of data folder is shown 

(Image courtesy: Xplore File Explorer for Android)

So inorder to get access use the following steps

  • Connect your device. Make sure that device has ROOT access.
  • Open command prompt (For windows).
  • Set path for android platform tools ie set path=”C:\Program Files\Android\android-sdk\platform-tools” and type enter.
  • Type adb devices and make sure that the phone is listed after executing the command.
  • Type adb shell.
  • Type su.
  • Type chmod  777  /data  /data/data  /data/data/<packagename>/*
  • For example chmod  777  /data  /data/data  /data/data/*
  • Now goto DDMS and check whether the data folder is accessible.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s