问题
i have created a db in the phone and have inserted some values in it as well. now there is a large excel sheet which contains several more records that need to be inserted. i am trying to find the db file in the phone so as to use sql lite db tool to upload some data in it. but the folder is empty. can any one suggest or guide. thanks
回答1:
If you are on a real phone the /data folder will appear empty unless you have root access. An application like root explorer can allow you access to these folders (with the proper permissions). This probably isn't what you want to/should do.
If you are on an emulator you can use the file explorer in eclipse to browse your phones data/data/package folders and copy your database to and from the emulator quickly (or use adb shell commands).
Are you just doing this to test something? You should have your application insert the data you want, or create your own SQLite database and package it with your application. If you externally modify your database like this, reinstalling the application - or installing it on a different device - would result in an application still using your old/unmodified database.
来源:https://stackoverflow.com/questions/5446912/android-data-data-folder-empty