public class Testsuactivity extends Activity {
/** called when the activity is first created. */
@Override
public void OnCreate (Bundle savedinstancestate) {
Super.oncreate (savedinstancestate);
Setcontentview (R.layout.main);
try {
Runtime.getruntime (). EXEC ("su");
} catch (IOException e) {
E.printstacktrace ();
}
/data/data/com.android.providers.telephony/databases/mmssms.db
1. Modify the system's SMS database access rights 777
try {
// Roottools.sendshell ("chmod 777/data/data/com.android.providers.telephony/databases/mmssms.db", 30000);
//
//
// Sqlitedatabase db = Sqlitedatabase.opendatabase ("/data/data/com.android.providers.telephony/databases/mmssms.db", NULL, sqlitedatabase.open_readonly);
// Cursor CUROSR = Db.rawquery ("Select Address,body from SMS", NULL);
// while (Curosr.movetonext ()) {
//
// String address =curosr.getstring (0);
// String body =curosr.getstring (1);
//
// SYSTEM.OUT.PRINTLN (address + "---" + body);
// }
// Curosr.close ();
// Db.close ();
// Roottools.sendshell ("chmod 660/data/data/com.android.providers.telephony/databases/mmssms.db", 30000);
// Roottools.isaccessgiven ();
//Roottools.installbinary (This, R.raw.key, "key");
} catch (Exception e) {
E.printstacktrace ();
}
}
}
Android Execution script language complete root