2012-09-14 9 views
-1

나는 현재 내 안드로이드 기기를 재부팅이 코드를 사용하고 있습니다 :프로그래밍 HotBoot (핫 재부팅) 안드로이드 장치

try { 
    Process proc = Runtime.getRuntime() 
        .exec(new String[]{ "su", "-c", "reboot" }); 
    proc.waitFor(); 
} catch (Exception ex) { 
    ex.printStackTrace(); 
} 

지금, 내가 자바를 사용하여 내 안드로이드 전화를 HotBoot (or "Hot Reboot") 싶다. 누구든지이 일을하는 방법을 알고 있습니까?

(당신이 HotBoot이 무엇인지 알 수없는 경우, refer to this link는)

답변

4

당신은 뿌리 전화를해야합니다.

su 
busybox killall system_server 

(그냥 경우) 또는 코드와

try { 
Process proc = Runtime.getRuntime() 
      .exec(new String[]{ "su", "-c", "busybox killall system_server"}); 
    proc.waitFor(); 
} catch (Exception ex) { 
    ex.printStackTrace(); 
}