title: How to access database on Android app without root
body: <p>I'm developing a small app with a database of 100 elements. I import the database but only in one emulator (of 3 witch I have) runs correctly. I found that it runs without problems because the "Songs.db" database exists in data/data/myapppackage/databases/ folder witch I can't have access without rooting the device.</p>
  
  <p>I search through internet for different approaches and solutions to this problem but nothing is working. I am new to android programming and for this kind of problem there isn't any tutorial.</p>
  
  <pre><code>public class DatabaseHelper extends SQLiteOpenHelper {
      public static final String DATABASE_NAME = "Songs.db";
      public static final String TABLE_NAME = "songs_table";
      public static final String COL_1 = "ID";
      public static final String COL_2 = "TITLE";
  
      public DatabaseHelper (Context context) {
          super( context, DATABASE_NAME, null, 1 );
          SQLiteDatabase db = this.getWritableDatabase();
      }
  
      public Cursor getData(int id) {
          SQLiteDatabase db = this.getReadableDatabase();
          Cursor res =  db.rawQuery( "select TITLE from songs_table where ID="+id+"", null );
          return res;
      }
  }
  
  </code></pre>
  
  <p>and on PlayerTurn class</p>
  
  <pre><code>myDb = new DatabaseHelper( this );
  Cursor rs = db.getData( b );
  rs.moveToFirst();
  tit = rs.getString( rs.getColumnIndex( db.COL_2 ) );
  </code></pre>
  
  <p>The error message I get most of the times is <code>android.database.sqlite.SQLiteException: no such table: songs_table (code 1):</code>
  Can anyone help me? I spend almost 15 hours about that...</p>