Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void imei1() {
- try {
- Process process = Runtime.getRuntime().exec("su"); //Generic SU Command
- DataOutputStream os = new DataOutputStream(process.getOutputStream());
- os.writeBytes("echo 'AT+EGMR=1,7," + "\"" + imei1.getText() + "\"" + "' >/dev/radio/pttycmd1");
- os.close();
- Toast toast = Toast.makeText(getApplicationContext(),
- "IMEI1 изменен на " + imei1.getText(), Toast.LENGTH_SHORT);
- toast.show();
- try {
- process.waitFor();
- } catch (InterruptedException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- public void imei2() {
- try {
- Process process = Runtime.getRuntime().exec("su"); //Generic SU Command
- DataOutputStream os = new DataOutputStream(process.getOutputStream());
- os.writeBytes("echo 'AT+EGMR=1,10," + "\"" + imei2.getText() + "\"" + "' >/dev/radio/pttycmd1");
- os.close();
- Toast toast = Toast.makeText(getApplicationContext(),
- "IMEI2 изменен на " + imei2.getText(), Toast.LENGTH_SHORT);
- toast.show();
- try {
- process.waitFor();
- } catch (InterruptedException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement