package com.venscor.helloworld;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Helloworld {
public static void main(String[]args){
System.out.println("Hello, I am started by app_process!");
String cmd1="settings put secure enabled_accessibility_services com.qihoo.appstore/com.qihoo.appstore.accessibility.AppstoreAccessibility";
String cmd2="settings put secure accessibility_enabled 1";
execShell(cmd1);
execShell(cmd2);
}
private static void execShell(String cmd){
try {
Process p=Runtime.getRuntime().exec(cmd);
BufferedReader br=new BufferedReader(new InputStreamReader(p.getInputStream()));
String readLine=br.readLine();
while(readLine!=null){
System.out.println(readLine);
readLine=br.readLine();
}
if(br!=null){
br.close();
}
p.destroy();
p=null;
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}