1. Download our Official Android App: Forums for Android!

Apps How to see the sqlite DB created on the default path on the device?

Discussion in 'Android Development' started by ajitandroid26, Sep 9, 2010.

  1. ajitandroid26

    ajitandroid26 Lurker
    Thread Starter
    5

    Aug 25, 2010
    9
    0
    5
    Hi All,

    I am creating the sqlite database on the default path.
    From the emulator I am able to find the database file.
    But When I am installing in the device the database is getting created but I am not able to browse to the /data/data/<My package Name>/databases/database name folder.
    Even from the device I am not able to browse to the /data folder
    through the adb shell commnd its giving the permission denied error.

    So how to see the sqlite database file created in the default path in the device?

    Please help me...

    Thanks & Regards,
    Ajit
     

    Advertisement

  2. miXer

    miXer Android Enthusiast
    53

    Aug 12, 2010
    313
    51
    53
    Norway
    I think you have to root your phone to gain access to that folder.
     
    ajitandroid26 likes this.
  3. RNekic

    RNekic Newbie
    16

    May 25, 2010
    12
    1
    16
    Yeah, I think you are stuck either rooting the phone to adding some code to your app that copies the database to the SD card when you want to examine it.
     
    ajitandroid26 likes this.
  4. ajitandroid26

    ajitandroid26 Lurker
    Thread Starter
    5

    Aug 25, 2010
    9
    0
    5
    Thanks for your reply!!!

    But how to do rooting the phone so that I can copies the database to the SD card or to the system.

    Please help me...

    Thanks & Regards,
    Ajit
     
  5. ajitandroid26

    ajitandroid26 Lurker
    Thread Starter
    5

    Aug 25, 2010
    9
    0
    5

    Thanks for your reply!!!

    How to do that?
    Please help me through sample code or by providing some example or useful sites.

    Thanks & Regards,
    Ajit
     
  6. miXer

    miXer Android Enthusiast
    53

    Aug 12, 2010
    313
    51
    53
    Norway
  7. RNekic

    RNekic Newbie
    16

    May 25, 2010
    12
    1
    16
    You don't need to root your phone to copy your database to the SD card if you are working in the same app that created the DB. You already have access to the DB from within your app; after all, you created the file. There are many Java examples for copying a File to another File. You'll need to add SD card permissions to your app, but otherwise it's a simple Java File copy.






     

Share This Page

Loading...