First, I create a database called "mydb" in my Android application:
DBHelper dbHelper = new DBHelper(context, "mydb", null, 1);//DBHelper is my custom class
And write some data in the table:
SQLiteDatabase db = dbHelper.getReadableDatabase();
db.execSQL("insert into mytable(name, text) values ('allen','hello')");
Everything is in order here. But then I delete this database manually, without programming, with the software "RE expl" (Of course, on the root device).
Then in my code I read this database table. What is surprising is that I can still get the saved data.
Cursor cursor = db.query("mytable", new String[]{"name","text"}, null, null, null, null, null);
Why?
source
share