Firefly Open Source Community

   Login   |   Register   |
New_Topic
Print Previous Topic Next Topic

Rk3399 multi users on Android 7 Image

115

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
115

Rk3399 multi users on Android 7 Image

Posted at 8/15/2017 19:53:23      View:2803 | Replies:2        Print      Only Author   [Copy Link] 1#
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 ?
Reply

Use props Report

1821

Credits

10

Prestige

17

Contribution

super moderator

Rank: 8Rank: 8

Credits
1821
Posted at 8/17/2017 09:39:28        Only Author  2#
have no  experience with that
Reply

Use props Report

115

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
115
Posted at 9/1/2017 19:59:01        Only Author  3#
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"
Reply

Use props Report

You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list