Access Skype db from data/app location

10,578

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.

Share:
10,578
Noman
Author by

Noman

Senior Android Engineer (Android Apps) with an experience of 9 years. Email me @ [email protected]

Updated on June 16, 2022

Comments

  • Noman
    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
    Sunny about 10 years
    datbase will be in /data/data/<app_package_name>/databases/main.db
  • Noman
    Noman about 10 years
    Thanks 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
    Noman about 10 years
    @sunny... there is not database folder ... :/ My device is rooted and i am checking it in root explorer...
  • Larry Schiefer
    Larry Schiefer about 10 years
    It's a silly question, but has the Skype app actually been loaded and run on that device?
  • Larry Schiefer
    Larry Schiefer about 10 years
    It'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.