code: static public void createDbFromSqlStatements(
              Context context, String dbName, int dbVersion, String sqlStatements) {
  
          File f = context.getDatabasePath(dbName);
          f.getParentFile().mkdirs();
          SQLiteDatabase db = SQLiteDatabase.openOrCreateDatabase(f, null);
  
          // TODO: this is not quite safe since it assumes that all semicolons at the end of a line
          // terminate statements. It is possible that a text field contains ;\n. We will have to fix
          // this if that turns out to be a problem.
          String[] statements = TextUtils.split(sqlStatements, ";\n");
          for (String statement : statements) {
              if (TextUtils.isEmpty(statement)) continue;
              db.execSQL(statement);
          }
          db.setVersion(dbVersion);
          db.close();
      }
docs: Creates a db and populates it with the sql statements in sqlStatements.
  
  @param context the context to use to create the db
  @param dbName the name of the db to create
  @param dbVersion the version to set on the db
  @param sqlStatements the statements to use to populate the db. This should be a single string
  of the form returned by sqlite3's <tt>.dump</tt> command (statements separated by
  semicolons)