我有一个 Android Jelly Bean 平板电脑,它已经植根并试图运行一个应用程序,该应用程序具有隐藏系统栏的代码,但它没有被隐藏,任何人都可以帮助我解决这个问题。
在终端中获取输出: Result Parcel(00000000 '....')
public class MainActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Button hide=(Button)findViewById(R.id.button1);
Button show=(Button)findViewById(R.id.button2);
hide.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Log.v("ds", "hideSystembar");
try {
Process proc = Runtime.getRuntime().exec(new String[]{
"su","-c","service call activity 79 s16 com.android.systemui"});
proc.waitFor();
} catch (Exception e) {
e.printStackTrace();
}
}
});
show.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Log.v("f", "showSystembar");
try {
Process proc = Runtime.getRuntime().exec(new String[]{
"am","startservice","-n","com.android.systemui/.SystemUIService"});
proc.waitFor();
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
}
虽然我得到了许可:
超级用户日志截图: