If you are using Internet Explorer, please remove blackberry.com from your compatibility view settings.

Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
bbdevguy
Posts: 102
Registered: ‎11-19-2008
My Device: Not Specified

Location of SQLite DB files on physical device?

Does anyone know where to find the SQLite DB files on an actual device?

 

I am debugging a physical device and can't seem to find the location where the SQLite database file for my app is. I thought the files should be under accounts/1000/appdata however when I go there using the Target File System Navigator I only see a cryptic-looking filename starting with my apps package. However there is no directory, e.g. no accounts/1000/appdata/<myapps package name>.

 

I am using Z10 OS 10.2 and Momentics IDE 2.0.

 

 

Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Location of SQLite DB files on physical device?


bbdevguy wrote:

Does anyone know where to find the SQLite DB files on an actual device?

 

I am debugging a physical device and can't seem to find the location where the SQLite database file for my app is. I thought the files should be under accounts/1000/appdata however when I go there using the Target File System Navigator I only see a cryptic-looking filename starting with my apps package. However there is no directory, e.g. no accounts/1000/appdata/<myapps package name>.

 


There's nothing special about SQLite data files compared to any other data files in your app. They should be where you would normally find any of your app's data, although if you've done something odd with the path then maybe you'll find them elsewhere. There are few places they could be though... pretty much only in your app's data folder or under a subfolder of /accounts/1000/shared/ (and even then, only if you gave your app the access_shared permission).

 

You say the folder you found is cryptic?  Crypticness aside, did you look inside it?

 

As an example, my app White Noise would put its files (if it wrote any) under /accounts/1000/appdata/ca.engenuity.WhiteNoise.testDev__WhiteNoise37c0882f/data, at least for the devmode version. The "package name" is only the first part (before .testDev), but that's still the app's correct folder.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Developer
bbdevguy
Posts: 102
Registered: ‎11-19-2008
My Device: Not Specified

Re: Location of SQLite DB files on physical device?

The problem is that I don't see a folder under accounts/1000/appdata but just a cryptic file the name of which starts with my app's package name. I can't even copy that file to my computer's file system: when connected via USB and in development mode i get "Permission denied" error.

 

If memory serves me, I think I was I was able to access the SQLite db file on a device in the past prior to upgrading my device to OS 10.2 although I could be thinking of using a Dev Alpha a while back. On my current OS 10.2 I do see a folder for another app that I installed prior to the upgrade to 10.2. However all other apps I installed since appear only as a cryptic file.

 

Could 10.2 have something to do with this?

 

 

Please use plain text.
BlackBerry Development Advisor
PBernhardt
Posts: 749
Registered: ‎12-16-2008
My Device: BlackBerry Z30
My Carrier: Bell

Re: Location of SQLite DB files on physical device?

Is the app deployed in development mode or release mode? You can't inspect the file system of an app that's been deployed in release mode. If it's in development mode, don't bother trying to find it from the root file system, just use the sandboxes folder from the target file system navigator in Momentics.

Paul Bernhardt
Application Development Consultant
BlackBerry
@PBernhardt

Did this answer your question? Please accept this post as the solution.
Found a bug? Report it to the Developer Issue Tracker
Please use plain text.
New Developer
como28
Posts: 45
Registered: ‎04-11-2014
My Device: Z10
My Carrier: Indosat

Re: Location of SQLite DB files on physical device?

i think "yes" DB files on physical device, i was try with sample apps "quotes"

Please use plain text.