Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid - How to access sqlite database from internal memory phone?
    primarykey
    data
    text
    <p>I've created an app using Eclipse + ADT that reads and write into a sqlite db, it works fine on Android terminal emulator, but, running from the phone itself, it does not populate the Spinners from db, which means it does not locate db in internal memory, I already checked with adb shell if the db is on the phone and it's there, so I guess I need to give root permissions to the app to allow it to use the db, how can I do this? my phone is a Motorola Defy and it's rooted, thanks in advanced, have a nice day.</p> <p>EDIT: This is my class to create the table and adds the methods onCreate and onUpdate:</p> <pre><code>public class passwordSQLiteHelper extends SQLiteOpenHelper{ String SqlCreate = "CREATE TABLE password(id INTEGER, name TEXT, password TEXT)"; public passwordSQLiteHelper(Context context, String name, CursorFactory factory, int version) { super(context, name, factory, version); // TODO Auto-generated constructor stub } @Override public void onCreate(SQLiteDatabase db) { // TODO Auto-generated method stub db.execSQL(SqlCreate); } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { // TODO Auto-generated method stub db.execSQL("DROP TABLE IF EXISTS password"); db.execSQL(SqlCreate); } } </code></pre> <p>And I'm calling it from the main class when the activity starts:</p> <pre><code>passwordSQLiteHelper passUserDb = new passwordSQLiteHelper(this, "/data/data/com.project.otto/databases/password", null, 1); </code></pre> <p>On the terminal works great, but not on the phone where seems like it can't find the db, I checked with adb and it's there, please help me out, thanks!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload