Fetching Database on Mobile Devices via Terminal

Graphic illustrating data retrieval on mobile devices via a terminal, featuring a smartphone connected to various servers and laptops, symbolizing database access and data transfer
Rate this post

Last Updated on July 29, 2025 by Narendra Sahoo

One of the most common and probably the most essential operations in a data-driven application is fetching data from the database. So, at times when developing an application, we need to see the database. While Android Mobile Devices has SQLite Database and the Android Studio has no direct option to view the database. So, today we will be learning how to access Databases on an Android. The article will guide you step by step, providing you visual representation to help you efficiently fetch data from the database. This is especially useful in case you have a web server, and you wish to access data on an android application.

How to Access database on Android Mobile Devices

Rooting the mobile phone makes all applications installed on the device vulnerable. This can compromise application data as there is no wall of  Mobile Application Security. There are multiple ways to fetch the database of a mobile device and even the applications installed in there, one of them we will be using, Terminal.

To access the database of the application, it is required to check if the application has enabled ANDROID: BACKUP= True. If it is enabled, it is easy to retrieve the database of a particular application.

For this you require:

1) Rooted Device

2) Terminal Installed 

Steps: 

  • Create a Backup folder in the Mobile device.
  • open terminal and gain super user permission using “su” command
  • go to data/data folder 
  • find . –name “*.db” –type f –exec cp {} /mnt/sdcard/Backup ;
  • Open windows2 of the terminal. gain SU access 
  • locate the directory, and you got the database available the Mobile Devices

Watch the video here: