Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. [Activity(Label = "App1", MainLauncher = true, Icon = "@drawable/icon",
  2. Theme = "@android:style/Theme.Light.NoTitleBar.Fullscreen")]
  3. [IntentFilter(new[] { Intent.ActionMain }, Categories = new[] {
  4. Intent.CategoryHome, Intent.CategoryDefault })]
  5.  
  6. public override void OnBackPressed(){}
  7.  
  8. Java.Lang.Process proc = Java.Lang.Runtime.GetRuntime().Exec(
  9. new String[] { "su", "-c", "service call activity 42 s16 com.android.systemui" });
  10. proc.Wait();
  11.  
  12. private void hideBar(){
  13. try
  14. {
  15. Process proc = Runtime.getRuntime().exec(new String[]{"su","-c","service call activity 42 s16 com.android.systemui"});
  16. proc.waitFor();
  17. }
  18. catch(Exception ex)
  19. {
  20. Toast.makeText(getApplicationContext(), ex.getMessage(), Toast.LENGTH_LONG).show();
  21. Log.e("ROOT ERROR", ex.getMessage());
  22. }
  23.  
  24. adb shell
  25. su
  26. pm disable com.android.systemui //(enable) чтобы включить обратно
  27.  
  28. @Override
  29. public boolean onKeyDown(int keyCode, KeyEvent event) {
  30. if (keyCode == KeyEvent.KEYCODE_BACK) {
  31. return true;
  32. }
  33. return false;
  34. }
  35.  
  36. @Override
  37. protected void onCreate(Bundle savedInstanceState) {
  38. super.onCreate(savedInstanceState);
  39.  
  40. getWindow().addFlags(WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY);
  41.  
  42. setContentView(R.layout.activity_main);
  43.  
  44. input swipe 0 100 0 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement