Android Forensic Application - android

I'm working on an Android Forensic application to retrieve deleted text messages, email and call history from any Android device. I managed to extract several deleted records from sqlite database using my C++ app however to get the sqlite dbs I should be connected to a rooted Android device which is practically not possible as the people who will be using this app doesn't have much technical expertise and they won't be able to root the device.
To work around this problem, I'm thinking about carving sqlites from file system images and I'm very confident of doing the same once I get access to the image files. So I tried dd and nanddump but it seems like they both need write access to the partitions to dump the images.
So I'd like to know whether there is a way to dump the userdata partition without su / root permission on the device?

Related

Accessing Android Files and Database Directly on the device if rooted?

When developing for Android I prefer just working with a real device plugged in most of the time since the Android emulators are such total garbage. The one pain point is when I want to access files and sqlite databases though. I believe with the adb shell it is possible to pull the database across, but this isn't a very convenient process.
I'm wondering if there are any tools on the market that allow you to see the database in real time, even if it requires rooting a device I'm open to it.
I am afraid that there are no tools that will let you see the db real time. You will need to get the db from the device and the see it on your system. You will have to root the phone and get SuperUser permission to access app databases. The database will (after getting root) then be available in the /data/data/com.your.application/databases folder.
Hi You don't have any tools to see the database in real times. But its achievable in rooted device. If your device is rooted just install root explorer app in it. and then browse for your package name in data/data/ location. There you will find out all the internal memory files including database files. hope this helps you.

Cannot find location of SQLite database file on Galaxy Nexus

I opened a SQLite database in my project. To see if the db was actually created I went to Data/Data to find the package name... not there. While testing I would like the ability to delet the file.
So I added data to the db, then read it out. This works fine, but still no file at either /Data/Data, or at /Android/Data/Data. Is the file hidden? Other dowloaded aps have data at /Data/Data/package/... but not the one I wrote. It does exist - I can read and write to/from it, but cannot find it.
//data/data/Your-Application-Package-Name/databases/your-database-name NOT THERE
Using a Samsung Galaxy Nexus for testing, not the emulator. The Nexus does not have external SD memory card.
SQLite databases are only accessible to the creating project, but is there a tool that can access it externally? I have sqlitebrowser (awsome) i will try if I can find the file.
I would try to Root the Nexus, but I can already see /Data/Data/ other items/Data/their data, so hopefully I do not have to go that route.
You're not able to access any contents of /data/data if you access it from adb shell without first rooting the device. Shell is considered as another app (more precisely another linux user), so it's prevented from accessing other app's data in /data/data.
Root the device or use emulator to see the data.
Personally I really recommend rooting the device for development.

Debugging Android databases on the real phone

I'm trying to debug an android application's database on a real phone. Where can i find any individual application's databases on a real android phone?
Similar to /data/databases on the emulator i tried searching under the /data on my atrix, and i don't find anything under it and i would like to debug databases on the real device.
A second question is does the contact app stores the data at google servers (right / wrong). I beleive this would be the case, but was wondering if they also cache the contact databases in every individual phone to speed up access. please correct me if i'm wrong.
I believe the databases folder is still there on your real phone, but you don't have access to it due to permissions. Database files can only be accessed by the app that owns them so you can't browse all of them unless you have root access.
The contact app stores data on your phone's internal memory so that you can access it without an internet connection. Some android devices (e.g. tabs) do not have internet access, and it's possible to query your contacts list using these devices.

Where does Android keep SqliteDB of an application runs on a tablet?

I could not find the sqlite db file of the application that I am developing runs on a tablet (not on emulator). Please anyone share with me that where does android keep db file of an application. And how do I export it to the computer? And finally is there any tool that can parse an sqlite expression even if it has no db or table? I mean it will only check the phrase and will say the phrase is available to run or not.
Unfortunately, application's database files are not available on non-rooted devices. You can either use a rooted Android device, or Android standard emulator, or Genymotion (see https://www.genymotion.com) in order to be able to access database files of your app.
It keeps it in a private embedded linux folder that's based on your application name, but that only the userid of your application can access.
There is no way for you to copy that file directly unless you root your tablet. In the emulator, that file is directly accessible, but the emulator is a special case.
That being said, there is a programmatic way to pull out the data from that database and reconstruct it on the SDcard to pull it back on your PC (that solution is not perfect, but at least it's better than nothing).
Nope, You can't access the DB of the device (eithr phone or Tablet) via ADB or any other third party Eclipse plug-in.
This was restricted because of security, but you can access it if you root your Tablet or Phone, which is again most people don't prefer to do.
or you can choose to make the db in sdcard (which recomended when the db is too huge).

Where can i store data(text and image) in android

i'm writing an application that needs to store some data,and picture. For example place's information. this information don't need to change very often. and
I have seen that databases are
stored under /data/data/package_name/databases
I decided to store my data under /data/data/package_name/files.
With the emulator i can see all these files (databases)
under the proposed directories but moving the application on a real
device and installing a file system browser i cannot see any file
under /data. i know that there are some security constrain in (not-rooted) device. However, are there any suggestion about the solution.. where can i store these data and how? because i'm quite new to android. Thanks so much for your help.
The reason you can't see it on the device is basically just as you said; the device isn't rooted, so other apps don't have access to the /data folder.
This is okay though, because you can still store your files there. Your app has access to anything under /data/data/package_name/, you just won't be able to see it in a file browser unless you root. This is normally a good thing, to keep average users from mucking around with your databases/files.
Read up more on storage methods here.

Categories

Resources