Access Skype db from data/app location
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.
Noman
Senior Android Engineer (Android Apps) with an experience of 9 years. Email me @ [email protected]
Updated on June 16, 2022Comments
-
Noman almost 2 years
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? -
Sunny about 10 yearsdatbase will be in
/data/data/<app_package_name>/databases/main.db
-
Noman about 10 yearsThanks for the quick response :) I will just try it now. and in case i get any error , i will surely post logs in future.
-
Noman about 10 years@sunny... there is not database folder ... :/ My device is rooted and i am checking it in root explorer...
-
Larry Schiefer about 10 yearsIt's a silly question, but has the Skype app actually been loaded and run on that device?
-
Larry Schiefer about 10 yearsIt's actually not that silly of a question. You could have installed the app but never actually run it, so any runtime data managed by the app would not have been created. But, I hear what you are saying. It may be helpful to provide everyone with a listing of what data is actually present in the data directory. Older versions of Skype (circa 2011) would store the database in a subdirectory with the name of the user login. I'm not sure what the latest version does, but without seeing a dir listing there's no way to guess.