wutianlong
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();
}
}
}

 

分类:

技术点:

相关文章:

  • 2022-03-09
  • 2021-12-04
  • 2021-05-08
  • 2022-12-23
  • 2022-12-23
  • 2021-07-20
  • 2021-10-11
猜你喜欢
  • 2022-12-23
  • 2021-06-06
  • 2022-12-23
  • 2022-12-23
  • 2021-12-05
  • 2022-12-23
  • 2021-08-27
相关资源
相似解决方案