Ola Alex,
Em alguns tutoriais encontrei a seguinte solução:
public bancoDeDados(Context context) throws Exception {
try{
db = context.openOrCreateDatabase(enderecoBanco,Context.MODE_WORLD_WRITEABLE , null);
Log.d("BANCO DADOS", "Conexão com o banco de dados OK");
}catch (SQLiteDatabaseCorruptException e) {
// TODO: handle exception
REPARAR BD CORROMPIDO
String strExeCmd = "sqlite3 "+enderecoBanco+" .dump | sqlite3 "+enderecoBanco;
Process process = Runtime.getRuntime().exec(strExeCmd);
process.waitFor();
}
catch (Exception e) {
throw new Exception("BancoDeDados_Exception:"+e.getMessage());
}
}
Porem estou achando que o problema pode estar na linha de comando "strExeCmd"...
--
Att,
Felipe Costa