在Root中启用Android 4.4.2中的KioskMode [英] Enabling KioskMode in Android 4.4.2 with Root

查看:84
本文介绍了在Root中启用Android 4.4.2中的KioskMode的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过杀死com.android.systemui进程,我能够在KitKat之前的版本中启用信息亭模式.无论如何,这似乎在KitKat发行版中不起作用:取消了该过程后,整个屏幕陷入了卡住,我无法按下任何按钮.

I was able to enable kiosk mode in pre-KitKat-releases by killing the com.android.systemui process. Anyhow, this seems not to work in KitKat-releases: After killing the process the whole screen got stuck and I am not able to press any buttons.

从Play商店检查了类似的应用程序后,我发现最近的更新为KitKat提供了兼容性(例如

After inspecting similar apps from the Play Store I saw recent updates providing a compatibility for KitKat (e.g. Sure lock demo link). Can somebody explain this KitKat-compatibility?

有人可以说出一种新的方法来隐藏具有特权的KitKat版本中的导航和状态栏吗?

Can somebody name a new way to hide the navigation and status bar in KitKat-releases with root priviledges?

最好的问候, 绿

推荐答案

也许您可以尝试使用以下代码片段来显示/隐藏已root的android设备上的状态栏.我已经在4.2.2上对此进行了测试, 4.4.2成功,祝你好运:)

May be you can give a try with the below code snippet to show/hide status bar on rooted android devices.I'v tested this on 4.2.2 , 4.4.2 with success.Good luck :)

隐藏:

        Process proc = null;

        String ProcID = "79"; //HONEYCOMB AND OLDER

        if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH){
            ProcID = "42"; //ICS AND NEWER
        }

        try {
            proc = Runtime.getRuntime().exec(new String[] { "su", "-c", "service call activity "+ProcID+" s16 com.android.systemui" });
        } catch (Exception e) {
            Log.w("Main","Failed to kill task bar (1).");
            e.printStackTrace();
        }
        try {
            proc.waitFor();
        } catch (Exception e) {
            Log.w("Main","Failed to kill task bar (2).");
            e.printStackTrace();
        }

显示:

        Process proc = null;
        try {
            proc = Runtime.getRuntime().exec(new String[] { "su", "-c", "am startservice -n com.android.systemui/.SystemUIService" });
        } catch (Exception e) {
            Log.w("Main","Failed to kill task bar (1).");
            e.printStackTrace();
        }
        try {
            proc.waitFor();
        } catch (Exception e) {
            Log.w("Main","Failed to kill task bar (2).");
            e.printStackTrace();
        }

这篇关于在Root中启用Android 4.4.2中的KioskMode的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆