The database for an app won't be in /data/app/<app_package_name>
, that's where the downloaded or pre-bundled APKs are located. The runtime data directory for an app is at /data/data/<app_package_name>
. Also, be sure to include the stack trace from your exception catch or from the crash itself, otherwise it is a lot harder for people to help.
Access Skype db from data/app location
Question
I want to get the Skype db file, which is called main.db and is not encrypted like WhatsApp etc. and copy that file to my custom folder.
What I am trying to do is the following: (my device is rooted and I am giving my app SuperUser access)
public void getSkypeDB() throws InterruptedException
{
Process sh;
try
{
sh = Runtime.getRuntime().exec("su", null, null);
File skypeDir= new File("/data/app", "/com.skype.raider");
Toast.makeText(getApplicationContext(), skypeDir.toString(), 0).show();
sh.waitFor();
}
catch (IOException e)
{
e.printStackTrace();
}
}
After doing this, my app crashed!
How can I get access to its database or access to the location of the database in the /data/app
folder?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow