Firefly Open Source Community

Title: Rk3399 multi users on Android 7 Image [Print This Page]

Author: dbe_dev    Time: 8/15/2017 19:53
Title: Rk3399 multi users on Android 7 Image
Have tried setup a multi user environment for the Android 7 image for the rk3399. I want to make sure there is a locked administrator user and a user that is only allowed to run a few apps.

I can add users and set restrictive rights in the settings app but I cannot activate the lock screen for any of the user to become effective nor limit the apps they access.

Also setting a different wallpaper does not seem to work.

Any advice tricks on what to install or configure for a build ?

Also the battery always indicates 50% which prohibits file system encryption to be initiated. Where can this be changed ?
Author: isle    Time: 8/17/2017 09:39
have no  experience with that
Author: dbe_dev    Time: 9/1/2017 19:59
This is what I found so far:

The lock screen is apparently bypassed by default for box configurations as used by the firefly AOSP build. App limiting does work  for some apps but not for the pre-installed rk apps.

Locally did the following to get the lock screen (re)enabled.

{{{
diff --git a/frameworks/base/services/core/java/com/android/server/am/ActivityRecord.java b/frameworks/base/services/core/java/com/android/server/am/ActivityRecord.java
index bbf7dc8..4c758c7 100644
--- a/frameworks/base/services/core/java/com/android/server/am/ActivityRecord.java
+++ b/frameworks/base/services/core/java/com/android/server/am/ActivityRecord.java
@@ -1249,16 +1249,18 @@ final class ActivityRecord {
     }

     void windowsDrawnLocked() {
+// revert to stock android to have keyguard
        //Launcher is drawn completed,box can exit bootanim, other product  wait for keygurad drawn
-        if(shortComponentName!=null && !shortComponentName.contains(".FallbackHome") && !"1".equals(SystemProperties.get("service.bootanim.exit")))
-        {
-                if(!"tablet".equals(SystemProperties.get("ro.target.product")))
-                {
-                        SystemProperties.set("service.bootanim.exit", "1");       
-                        SystemService.stop("bootanim");
-                        Log.d("xzj","----not tablet,launcher drawn done,exit bootanim----");
-                }
-        }
+//        if(shortComponentName!=null && !shortComponentName.contains(".FallbackHome") && !"1".equals(SystemProperties.get("service.bootanim.exit")))
+//        {
+//
+//                if(!"tablet".equals(SystemProperties.get("ro.target.product")))
+//                {
+//                        SystemProperties.set("service.bootanim.exit", "1");       
+//                        SystemService.stop("bootanim");
+//                        Log.d("xzj","----not tablet,launcher drawn done,exit bootanim----");
+//                }
+//        }
         mStackSupervisor.mActivityMetricsLogger.notifyWindowsDrawn();
         if (displayStartTime != 0) {
             reportLaunchTimeLocked(SystemClock.uptimeMillis());
diff --git a/frameworks/base/services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java b/frameworks/base/services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java
index da8c591..a5d1513 100644
--- a/frameworks/base/services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java
+++ b/frameworks/base/services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java
@@ -144,8 +144,8 @@ public class KeyguardServiceDelegate {
                 resources.getString(com.android.internal.R.string.config_keyguardComponent));
         intent.addFlags(Intent.FLAG_DEBUG_TRIAGED_MISSING);
         intent.setComponent(keyguardComponent);
-
-        boolean isBox = isBox();
+        // Revert to default android as want the lock screen
+        boolean isBox = false;//isBox();

         if (isBox || !context.bindServiceAsUser(intent, mKeyguardConnection,
                 Context.BIND_AUTO_CREATE, mScrimHandler, UserHandle.SYSTEM)) {
}}}

The ro.rk.install_non_market_apps being set to true result in an restricted profile always being allowed to install apk's

Setting a different wallpaper only seems to work through modifing the wallpaper file with adb for now.

Battery level can be adjusted using adb  "adb shell dumpsys battery set level 99"
Author: kurtcla914    Time: 6 day before
Itexamdump는 유일하게 여러분이 원하는EXIN인증CITM시험관련자료를 해결해드릴 수 잇는 사이트입니다. 여러분이 다른 사이트에서도 관련덤프자료를 보셨을경우 페이지 아래를 보면 자료출처는 당연히 Itexamdump 일 것입니다. Itexamdump의 자료만의 제일 전면적이고 또 최신 업데이트일 것입니다.
Author: chrisfi764    Time: 4 day before
This article is brilliant, thank you for this incredible share. The Study HPE0-J68 Material content is very helpful, and you don¡¯t need to pay for it.




Welcome Firefly Open Source Community (https://bbs.t-firefly.com/) Powered by Discuz! X3.1