views:

182

answers:

1

I created a database via javascript using Google Gears on Android 1.5 and I'd like to access directy the sqlite file to look inside it whitout using Gears. I found several "File Browser" but they only browse the SD card. Is there a way to fetch it from the phone file system?

I have an HTC Dream running Androis 1.5.

Thank you!

+1  A: 

Permissions on the phone filesystem are on a per application basis usually. Sure you can mess with them to give access to multiple applications but this is not the supported scenario. On the other hand, the filesystem mounted at /sdcard is open to everyone and apps can share the same folder/file with ease. If you only want to push/pull from the local storage, use the adb 'pull' and 'push' commands to get the files from the phone onto your computer and then mess with them locally. ADB is part of the Android SDK tools.

See: http://developer.android.com/guide/topics/security/security.html#userid

Still, I'm not sure you could really get the browser generated sqlite database easily if at all. Good luck!

mathieuc
thanks! can `adb` list folders and files before fetching them?
Sirber
Not really. Well, I could be wrong but I really should be saying NO.But the files you are looking for should be under /data/data/com.android.browser/ so you could 'cd' there and then 'ls' no problem.
mathieuc
nice! looks like I can get a shell on the device with `adb -d shell`
Sirber
in data: ls `opendir failed, Permission denied`
Sirber
I can `ls` in `/data/data/com.android.browser/` though
Sirber
I can't get into `gears` and I can't `ls` `databases` :(
Sirber
this was why I was saying "Still, I'm not sure you could really get the browser generated sqlite database easily if at all. Good luck!". You would need a rooted phone to be able to go there. Not sure what user the adb shell is running but it is surely not root.
mathieuc
I cannot know which user is the shell runs on since I don't even have permission to run `who` :)
Sirber
Use the 'id' command. But this is not the point anyway ;) Either that or echo $USER / $USERNAME it seems.
mathieuc
ok, thanks for the help!
Sirber