crouton: Google Play crashes on Crouton chroot mount

Please paste the output of the following command here: sudo edit-chroot -all

sudo edit-chroot -all name: trusty encrypted: no Entering /media/removable/Crouton/chroots/trusty… crouton: version 1-20160620130246~master:c39102d9 release: trusty architecture: amd64 xmethod: xorg targets: x11,xorg,xfce,touch,unity,extension,core,audio,xiwi host: version 8530.35.0 (Official Build) dev-channel samus kernel: Linux localhost 3.14.0 #1 SMP PREEMPT Thu Jul 28 17:43:58 PDT 2016 x86_64 x86_64 x86_64 GNU/Linux freon: yes Unmounting /media/removable/Crouton/chroots/trusty…

Please describe your issue:

Latest developer channel chromebook pixel 2 has google play support. However, when I mount a chroot (even do “sudo enter-chroot” in a terminal), google play and many android services stop.

If known, describe the steps to reproduce the issue:

  1. Update chromebook to google play support (possible with certain chromebooks like Chromebook Pixel 2).
  2. Execute “sudo enter-chroot”
  3. Google play services will all stop and there will be several error messages popping up.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 1
  • Comments: 36 (5 by maintainers)

Most upvoted comments

So, I think i have a viable fix. It is dependent on information I don’t have which is the answer to the question: “Do we depend on SELinux in the chroot?”

If we don’t, then the fix is this:

$ diff -u enter-chroot.orig enter-chroot
--- enter-chroot.orig   2016-08-18 19:08:17.410285787 -0400
+++ enter-chroot        2016-08-18 19:08:17.410285787 -0400
@@ -777,10 +777,7 @@
     mount --make-rshared /sys
     mount --rbind /sys "$CHROOT/sys"
     mount --make-rslave "$CHROOT/sys"
-    # Remount selinux as ro
-    if [ -d "$CHROOT/sys/fs/selinux" ]; then
-        mount -o remount,ro "$CHROOT/sys/fs/selinux"
-    fi
+    umount $CHROOT/sys/fs/selinux
 fi

 # Modify chroot's /sys/class/drm to avoid vgem

With the above change, I can start my chroot, and all Android apps continue on happily.

I’ll make a fork,branch,pull-request shortly. If in the interim, feedback could be given on the sense of this, I’d appreciate it. I use SELinux wittingly all of never.

I’ve done some sleuthing into this. I’m currently running Beta channel, and crouton for a delicious and usable Emacs environment.

Commenting out the /sys/fs/selinux remount-as-RO section in enter-chroot allows me to get into a terminal chroot, with some complaints from dbus. Android apps (Settings, Play) seem to work, persist, survive suspends, and survive crouton usage. (I seemingly cannot use startxiwi like this, but didn’t look into it much.)

Turning that section back on (remounting the slaved,shared /sys/fs/selinux as RO), causes the Android crashes quite readily.

I don’t understand the ramifications of an rshared->rbind+rslave setup with a RO remount on the slave. But that seems to be the trouble spot.