Extracting Android data files of our Android app from Non-Rooted Device

Mohammed Rampurawala
2 min readAug 4, 2017

--

source: Google Images

Hello Readers,

I am working as a Android developer from past 3 years and We all know when working with SQLite Database, Shared Preferences, storing files in the data directory. We often face an issue that “How to check if data is written correctly in it (Database,Shared Preference, ect)”

There are many steps to extract data of your android app (Debuggable):

  1. Use emulator/rooted device using which you can view the files inside data folder of your app.
  2. For Non Rooted device, there are bunch of adb shell commands you need to execute and with which you will be extract a single data file/directory.

I preferred second option because I have got couple of android devices and they NON ROOTED, So I was all time need to execute these commands to look that data is getting inserted properly. Duhhh!!!!!

So to make it more easy and more comprehensive I have came with a idea to create a utility that will extract all the files of your Android debuggable app from Non Rooted device.

Now Journey Starts….

Created a utility in JAVA where you just need to enter the package name of your app and it will extract all the data of your application in the directory where you executing the command.

How It Works:

  1. Enter package name.
  2. It will identify all files in the android package name folder and create the directory in device’s sdcard.
  3. Files will be extracted into the android device sdcard. For Example: “/sdcard/com.example.myapp”
  4. It will create a directory where .bat/.sh file is executed with same name as package entered and will pull all files into that respective directory.

For more details on the library you can contact me at mohom.007@gmail.com

Any comments and suggestions are highly appreciated.

Thanks for reading this article. If you like please hit❤ below and feel free recommend this article if you found it helpful.

--

--