New issue
Advanced search Search tips

Issue 842979 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 3
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android , Chrome
Pri: 1
Type: Feature

Blocking:
issue 827366



Sign in to add a comment

When setting up ARC for a demo session, arc setup needs to be notified to install demo apps

Project Member Reported by tbarzic@chromium.org, May 15 2018

Issue description

Demo apps will be provided a part demo resources image (stored on stateful partition) that will be mounted using imageloader service during demo session setup.

During boot continue part of ARC setup, arc_setup is expected to mount the demo apps into arc container on /odm partition. Note that this is supposed to be done for demo sessions only, which means that request to continue ARC boot should contain information about whether the setup is done for demo sessions.

Additionally, it might make sense to pass the location where demo resources are mounted (to avoid arc setup dependency on imageloader service).
 
Project Member

Comment 1 by bugdroid1@chromium.org, May 24 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/system_api/+/c5a52488caeac3643ac42753715a52afcec58c5f

commit c5a52488caeac3643ac42753715a52afcec58c5f
Author: Toni Barzic <tbarzic@chromium.org>
Date: Thu May 24 07:23:11 2018

Add demo_session_apps_path to UpgradeArcContainer request

This is expected to be set by Chrome if ARC container is being upgraded
during Chrome OS demo session set up, i.e. if Chrome is being run in
demo mode. For demo sessions, ARC setup is expected to load pre-installed
demo apps during container setup. The value of demo_session_apps_path
property should be absolute path to the squashfs image that contains
preinstalled apps.

BUG= chromium:842979 
TEST=None

Change-Id: I0ecbbccdbff0719787e7b58074c96bfdb136a820
Reviewed-on: https://chromium-review.googlesource.com/1066493
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Toni Barzic <tbarzic@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>

[modify] https://crrev.com/c5a52488caeac3643ac42753715a52afcec58c5f/dbus/login_manager/arc.proto

Project Member

Comment 2 by bugdroid1@chromium.org, May 30 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/a4f9e730b3d16fbb5957b839bf19f04c5ce3e198

commit a4f9e730b3d16fbb5957b839bf19f04c5ce3e198
Author: Toni Barzic <tbarzic@chromium.org>
Date: Wed May 30 08:02:44 2018

login: Handle "demo_session_apps_path" during arc container upgrade

Adds DEMO_SESSION_APPS_PATH argument for continue arc boot upstart
impulse. The DEMO_SESSION_PATH value is set to the value of the arc
container upgrade request's "demo_session_apps_path" parameter (which
is expected to be set to the file path of the squashfs image that
contains set of Android apps that should be loaded into a demo session).

Changes continue arc boot impulse arguments matcher from ElementsAre to
ElementsAreArray because with DEMO_SESSION_APPS_PATH the number of
arguments passed to ElementsAre went over the max supported number
(which is 10).

BUG= chromium:842979 
TEST=chromeos-login unittests
CQ-DEPEND=1066493

Change-Id: I0ad350573ffe79a8a24bc64f43cb20944dfb94b7
Reviewed-on: https://chromium-review.googlesource.com/1066498
Commit-Ready: Toni Barzic <tbarzic@chromium.org>
Tested-by: Toni Barzic <tbarzic@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>

[modify] https://crrev.com/a4f9e730b3d16fbb5957b839bf19f04c5ce3e198/login_manager/session_manager_impl.cc
[modify] https://crrev.com/a4f9e730b3d16fbb5957b839bf19f04c5ce3e198/login_manager/session_manager_impl_unittest.cc

Project Member

Comment 3 by bugdroid1@chromium.org, May 31 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/da2da74f407a198182205e153d959d3fd35cbce9

commit da2da74f407a198182205e153d959d3fd35cbce9
Author: Toni Barzic <tbarzic@chromium.org>
Date: Thu May 31 23:22:59 2018

arc-setup: Mount demo apps for demo sessions

When setting up ARC container for demo sessions (during continue boot),
mount demo apps to the shared mount passed to the ARC container.
Demo apps will be part of demo mode resources image, which is a
dm-verity image kept on the devices stateful partition, and intended to
be loaded by imageloader service.
The file path from which demo apps should be loaded (which is also
expected to be a squashfs image) will be passed as demo_session_apps
parameter of the arc container upgrade request (which translates to
DEMO_SESSION_APPS env variable) - arc setup will confirm that this path
is a descendant of /run/imageloader directory.

Also, pass --mount-demo-apps to arcbootcontinue, so it knows to mount
the demo apps (the demo apps will be mounted as /odm patition).

CQ-DEPEND=CL:1066498
BUG= chromium:842979 , b:79268228

TEST=With Chrome patched to set is_demo_session for UpgradeArcContainer
request, verify that ARC container mounts demo apps on odm

Change-Id: Iaac4e1bd90635042dbe2c66c0e042a2c28299722
Reviewed-on: https://chromium-review.googlesource.com/1066284
Commit-Ready: Toni Barzic <tbarzic@chromium.org>
Tested-by: Toni Barzic <tbarzic@chromium.org>
Reviewed-by: Yusuke Sato <yusukes@chromium.org>

[modify] https://crrev.com/da2da74f407a198182205e153d959d3fd35cbce9/arc/setup/arc_setup.cc
[modify] https://crrev.com/da2da74f407a198182205e153d959d3fd35cbce9/arc/setup/arc_setup.h
[modify] https://crrev.com/da2da74f407a198182205e153d959d3fd35cbce9/arc/setup/etc/arc-boot-continue.conf

Labels: -Type-Bug Type-Feature
Project Member

Comment 5 by bugdroid1@chromium.org, Jun 12 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/94be77fd914c441129573424731696114bd4ebde

commit 94be77fd914c441129573424731696114bd4ebde
Author: Toni Barzic <tbarzic@chromium.org>
Date: Tue Jun 12 04:16:43 2018

Introduce chromeos::DemoSession, to track demo mode state

Used to track whether demo user session has started, and to request
load of offline demo resources (which are loaded from the stateful
partition using image loader service).

The session is marked started when starting user session on devices
that are in demo mode (logic to determine this yet to be implemented).
User session start is delayed until the offline resources are loaded,
to simplify the class usage within the session (to avoid need for
ensuring resources load after the user session starts).

To minimize delay in starting demo user session, request resources load
when chrome session starts (for devices that are in demo mode).

chromeos::DemoSession will, for example, be used during during ARC
session setup to pass the set of preloaded demo apps to the ARC
container (CL:1095541).

BUG= 842979 

Change-Id: Ic1ecd94dab6aedd2ce3454f1df0a4dcd83874a73
Reviewed-on: https://chromium-review.googlesource.com/1090224
Commit-Queue: Toni Barzic <tbarzic@chromium.org>
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Reviewed-by: Aga Wronska <agawronska@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566296}
[modify] https://crrev.com/94be77fd914c441129573424731696114bd4ebde/chrome/browser/chromeos/BUILD.gn
[modify] https://crrev.com/94be77fd914c441129573424731696114bd4ebde/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
[add] https://crrev.com/94be77fd914c441129573424731696114bd4ebde/chrome/browser/chromeos/login/demo_mode/demo_session.cc
[add] https://crrev.com/94be77fd914c441129573424731696114bd4ebde/chrome/browser/chromeos/login/demo_mode/demo_session.h
[add] https://crrev.com/94be77fd914c441129573424731696114bd4ebde/chrome/browser/chromeos/login/demo_mode/demo_session_unittest.cc
[modify] https://crrev.com/94be77fd914c441129573424731696114bd4ebde/chrome/browser/chromeos/login/session/chrome_session_manager.cc
[modify] https://crrev.com/94be77fd914c441129573424731696114bd4ebde/chrome/browser/chromeos/login/session/user_session_manager.cc
[modify] https://crrev.com/94be77fd914c441129573424731696114bd4ebde/chrome/browser/chromeos/login/session/user_session_manager.h

Project Member

Comment 6 by bugdroid1@chromium.org, Jun 12 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b921fe573c2d7e2c91ecba1e7231c797b518a6d9

commit b921fe573c2d7e2c91ecba1e7231c797b518a6d9
Author: Toni Barzic <tbarzic@chromium.org>
Date: Tue Jun 12 17:53:49 2018

Pass demo apps path with ARC upgrade request for demo sessions

BUG= 842979 

Change-Id: I489be916e8dbe042ae93dced9abea3bdfe378842
Reviewed-on: https://chromium-review.googlesource.com/1095541
Commit-Queue: Toni Barzic <tbarzic@chromium.org>
Reviewed-by: Yusuke Sato <yusukes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566498}
[modify] https://crrev.com/b921fe573c2d7e2c91ecba1e7231c797b518a6d9/chrome/browser/chromeos/arc/arc_session_manager.cc
[modify] https://crrev.com/b921fe573c2d7e2c91ecba1e7231c797b518a6d9/components/arc/arc_session.h
[modify] https://crrev.com/b921fe573c2d7e2c91ecba1e7231c797b518a6d9/components/arc/arc_session_impl.cc
[modify] https://crrev.com/b921fe573c2d7e2c91ecba1e7231c797b518a6d9/components/arc/arc_session_impl.h
[modify] https://crrev.com/b921fe573c2d7e2c91ecba1e7231c797b518a6d9/components/arc/arc_session_impl_unittest.cc
[modify] https://crrev.com/b921fe573c2d7e2c91ecba1e7231c797b518a6d9/components/arc/arc_session_runner.cc
[modify] https://crrev.com/b921fe573c2d7e2c91ecba1e7231c797b518a6d9/components/arc/arc_session_runner.h
[modify] https://crrev.com/b921fe573c2d7e2c91ecba1e7231c797b518a6d9/components/arc/arc_session_runner_unittest.cc
[modify] https://crrev.com/b921fe573c2d7e2c91ecba1e7231c797b518a6d9/components/arc/test/fake_arc_session.cc
[modify] https://crrev.com/b921fe573c2d7e2c91ecba1e7231c797b518a6d9/components/arc/test/fake_arc_session.h

Status: Fixed (was: Assigned)

Sign in to add a comment