Age | Commit message (Collapse) | Author |
|
am: 2946762690
Change-Id: I4eaba8276e2f6fb0e1a0a935c869ce0de63cf304
|
|
* Add explicit keyword to conversion constructors.
Bug: 28341362
* Use const reference type for read-only parameters.
Bug: 30407689
Test: build with WITH_TIDY=1
Change-Id: I601f6d5ebeada385d1a8c5c664007dae0c156c40
|
|
am: b93f1b54e9
Change-Id: Ibd5ff54327296709daf8a2a895a3c6e54246d750
|
|
Replaced with PRODUCT_PACKAGES_ENG in brillo_base.mk
Change-Id: I3efe9526bf8e4357e0a442ada9f1d70125d12d34
|
|
am: c754716aa5
* commit 'c754716aa50db403034f1aaea961fa1ff1e030ad':
apmanager: Update libchrome APIs to r395517
Change-Id: I1bf6a9d0d435d743ca48cbfdde62b50f50761b55
|
|
am: b83e33fb60
* commit 'b83e33fb609e6fd0559857620f6a7b6ff4d85979':
apmanager: Update libchrome APIs to r395517
Change-Id: I07dea3838109f8257138a336db09be205c8477de
|
|
The new libchrome has been ported from Chromium and some APIs have
changed. Make necessary changes at call sites.
Change-Id: I3c50a00168917ec943fdfe816893b91894569888
|
|
am: 57188eeae6
* commit '57188eeae6e36334e15f2cec96f68fec330b0f34':
Don't use GID-based capabilities for 'apmanager'.
|
|
The two daemons launched by 'apmanager', 'hostapd' and 'dnsmasq',
already use file capabilities. This means groups |net_admin| and
|net_raw| are not needed.
Group |inet| is needed for now because current kernels enable Android
paranoid networking settings. Once that setting is removed, the group
will not be needed anymore but will also be harmless.
Bug: 27548062
Change-Id: Ic91cc4d989f4e6961cd54428ce004b17e291b085
|
|
am: 9da6074419
* commit '9da60744196c3ac74758bea36131d183294f8343':
Stop using BUILD_STATIC_TEST_LIBRARY
|
|
This isn't a library for a test, use BUILD_STATIC_LIBRARY instead.
Change-Id: If3a10e6fbaae4347b25f002862240136ac937de4
|
|
am: 66cf1b18c0
* commit '66cf1b18c0a5b62a3beb5b3a165d6ff492afb1c6':
apmanager_test: Compile only on 'eng' builds.
|
|
Bug: 26967770
Change-Id: I656080fc329ca70c9239ccaf71fa6e90b665dc4f
|
|
am: 33a54245a6
* commit '33a54245a627a89089cd470b2564d04dbe9833ff':
apmanager: Update libchrome APIs to r369476
|
|
The new libchrome has been ported from Chromium and some APIs have
changed. Make necessary changes at call sites.
(cherry picked from commit 33a54245a627a89089cd470b2564d04dbe9833ff)
Change-Id: Ie449b7b706bfcef332a4306e93d7d1b1bd5ccf52
|
|
The new libchrome has been ported from Chromium and some APIs have
changed. Make necessary changes at call sites.
Change-Id: Iff1bdd4bdbded1a4f5f81fdb3a0b5b43a8c43020
|
|
There is no longer a reliance on RTTI in libbrillo, so disable RTTI
in the rest of Brillo codebase.
BUG: 26292405
Change-Id: I97dc70bb7cfb17ace734c06025393ced34f7bbd3
|
|
Here are the main changes:
1. Cleanup Manager::CreateService and Manager::RemoveService API
to remove D-Bus dependency.
1. Use refptr for Service since it will be maintained by both
Manager and its adaptor.
2. Move the monitoring of the service creator/owner to the adaptor,
since the DBusServiceWatcher is D-Bus specific.
Bug: 24194427
TEST=Start AP service on Brillo board, stop weaved, verify service
is destroyed and removed from apmanager.
TEST=Verify device setup works on Brillo board.
TEST=Verify apmanager does not crash on restart.
TEST=Run unittests on both Brillo and Chrome OS.
Change-Id: I33fd4eec2c1adf12830484ca087bd9dd56767288
|
|
D-Bus implementation of the interface is also included.
Bug: 24194427
TEST=Build apmanager for both Brillo and Chrome OS
Change-Id: Id2478673cbca36279fb9e5e87a203a4eb021d1db
|
|
Here are the main changes:
1. Update service to use ServiceAdaptorInterface instead of using
D-Bus adaptor directly.
2. Update D-Bus object registration for Service and Config to be
synchronous, to remove unnecessary complexity. This also
eliminates the need for Manager::CreateService handler to be
asynchronous.
3. Update Service APIs to use the internal Error instead of brillo::Error.
4. Use MockServiceAdaptor for testing, fake version is not needed
since the adaptor properties for Service are not being used in test.
Bug: 24194427
TEST=Start AP service on both Brillo and Chrome OS devices
TEST=Run unittests on both Brillo and Chrome OS
Change-Id: Ib94a4b91ef402415470e0131afdeeef5105817e4
|
|
This interface will be used by Service to communicate with
the adaptor that exposes its functionality over IPC.
The D-Bus implementation of this interface is included, and
integrated to the D-Bus control interface.
Bug: 24194427
TEST=Build apmanager for both Brillo and Chrome OS
Change-Id: Ib87e13247cb4fbff53081b2e5cbad61bb499ce31
|
|
This is achieved by using a generic ConfigAdaptorInterface to communicate
with the adaptor.
Use FakeConfigAdaptor for testing, which provides the storage for
the property variables.
While there, update the Config APIs to use the generic internal Error type
instead of brillo::Error (which is tailored more towards D-Bus). The D-Bus
adaptor will convert it to brillo::Error when returning from D-Bus method
calls.
Bug: 24194427
TEST=Setup AP on Chrome OS and Brillo device
TEST=Run unittests
Change-Id: I5aa8ffd0805bcbb0125224f4f430245b70f56b6a
|
|
Currently, we're using brillo::Error for internal error reporting.
However, brillo::Error is more tailored for D-Bus.
Instead, implement a new Error class (trimmed down version of
shill::Error) for internal error reporting, and provide
functions for converting it to RPC specific error object.
Bug: None
TEST=Run newly added unit tests
Change-Id: I2b518fae6eccb8dc9f9f0e96b941289c3846a9af
|
|
This interface will be used by Config to communicate with
the adaptor that exposes its functionality over IPC.
The D-Bus implementation of this interface is included, and
integrated to the D-Bus control interface.
An upcoming CL will integrate this AdaptorInterface to the
Config class, to decouple Config class from the underlying
RPC implementation.
Bug: 24194427
TEST=Build apmanager for both Brillo and Chrome OS
Change-Id: I61d46c37bac875ce4a196dcc4abb752f5880ec50
|
|
This removes the RPC specific dependencies out of the Device class.
Device adaptors will now be created through the ControlInterface.
While there, make the D-Bus object registration for Device object to
be synchronous instead of asynchronous. Since the daemon will not
be doing anything anyway besides waiting for the registration to
complete. This avoids unnecessary complexity with the object
registration.
Currently for D-Bus, the property variables are being created/stored
in the generated adaptor code. This means that the property variables
will be stored in the adaptor instead of the Device class itself.
Even though this is not ideal, there is no good way around it. In the
ideal world, the Device would maintain its property variables, and
register them with the RPC specific adaptor.
So for the unittest, we will use FakeDeviceAdaptor, which provides the
storage for the property variables.
Also currently gmock doesn't support mocking of a function that returns
a unique_ptr, since it only supports copyable return value and unique_ptr
is not copyable. To work around this issue, I've created mock functions
that return a raw pointer, and override the proxy/adaptor creation
functions to use the mock function in MockControl.
Bug: 24194427
TEST=Start AP service on both Brillo and Chrome OS
TEST=Run unittests on both Brillo and Chrome OS
Change-Id: I8e9f736bb27fe6736f616dd752a37b9cc1be8dfe
|
|
This moves the RPC specific initialization out of the Daemon class,
which makes it agnostic of the underlying RPC implementation.
Also move the ownership of Manager from Daemon to the ControlInterface
implementation. So the ControlInterface is now responsible for
creating Manager and exposing it through the underlying RPC interface.
This makes it easier to maintain the relevant objects (e.g. Manager,
ObjectManager), and avoids possible confusion during cleanup.
Bug: 25654681
TEST=Verify device setup works on Brillo device
Change-Id: Id2eb8d08346841e294f8286fe191708caa2cbc24
|
|
This avoids a possible race condition where the interface gets enumerated
by shill before it is setup as station mode, resulting in the interface
being ignored by shill.
Bug: 25704767
TEST=Verify device setup on Edison board
Change-Id: If1ef2840273d84ba39d2796ac9b09a5707b319e7
|
|
Bug: 24194427
TEST=Build for both Brillo and Chrome OS
Change-Id: Ic2b87900b1fd8f71a0f2c0ee5d642f14cd40a7ca
|
|
Bug: 24194427
Change-Id: I0317e5c376a1feeaacfe4352491ccf7406e11d84
|
|
/data is not guaranteed to be mounted when 'boot' triggers.
'post-fs-data' guarantees that. Also, move the daemon to class
'late_start', since post-fs-data will not happen in time for class
'main'.
Bug: 25373880
Change-Id: I524f0a3e20696f502e534669aebb4d388c6822ea
|
|
For Brillo devices, it is required to use the AP mode interface
that's setup using the HAL API. So explicitly setup an AP mode
interface using the HAL API, and wait for the interface to
enumerated before starting the AP service.
This is achieved by handling the Start request asynchronously.
Also explicitly update the AP Config to use the newly created
AP interface, to avoid the Config from auto selecting a wrong
interface in the case when multiple AP-capable interfaces are
presented.
Bug: 25113165
TEST=Device setup works on both Brillo boards
Change-Id: Icdee32e8bab9cf41a467058aef5ea081562a3442
|
|
This allows us to handle this D-Bus call asynchronously for Brillo
devices. Since we want to wait for the newly created AP interface
to be enumerated before starting the service.
For now, this handler will return synchronously on both Chrome OS
and Brillo. A separate CL (CL:178864) will update this handler to
return asynchronously on Brillo.
While there, remove the unnecessary mock function for Service.Start
and Service.Stop, since these are D-Bus method handlers. Even though
the MockService class is now empty, we might still need it when we
remove the D-Bus dependency from the Service class (b/24194427),
so keep it for now.
Bug: 25113165
TEST=Unittest on both Chrome OS and Brillo
TEST=Manual test on both Chrome OS and Brillo
Change-Id: If0ba13ae89a25bdf9207803d7d6b008e9ad6165e
|
|
This avoids a race condition where weaved tries to start an AP service
before WiFi driver is initialized.
Bug: 25341872
TEST=Device setup on both Brillo boards
Change-Id: Iadaa7a6b18dab5adb21ba02d12d7704dabb40332
|
|
|
|
BUG: 24872993
Change-Id: I750c137a9dab339a9ec9629fb906eddd1109e4b7
|
|
Android complains about memory leakage when using singleton
for mock objects, and it is not really necessary to use
singleton for mock objects either. So remove the singleton
from those objects.
While there, update the binary path for "sleep" on Android,
which is used for starting a dummy process in the test.
Bug: 25186794
TEST=Run apmanager_test on Brillo board
TEST=Run unittests for Chrome OS
Change-Id: Ifb5a5c6876aa67a94411d823109c14a209a46d86
|
|
This is needed to allow apmanager to setup an AP/station mode
interface when starting/stopping an AP service.
Bug: 25113165
TEST=Device setup on Brillo boards
Change-Id: I2b5b708409fe1c59e0333b1e4347d46ba0162847
|
|
This removes the IPC specific (D-Bus) dependencies from FirewallManager
and ShillManager.
Bug: 24194427
TEST=Verify wifi bootstrapping on both dragonboard (Android) and wolf
TEST=(Chrome OS)
Change-Id: Iac3b91300f938e8080d6ab4513fe84dea2880693
|
|
Only define/implement APIs for creating proxies for now.
Bug: 24194427
TEST=Compile for both Android and Chrome OS
Change-Id: I55d387abd0104ab808343f244be5acaa8a4c8549
|
|
libchromeos is transitioning to libbrillo and chromeos namespaces
and include directory is changing to brillo.
Bug: 24872993
TEST=built for aosp and brillo, all unit tests pass on dragonboard
Change-Id: I4c6efbc5bbf80d251e5d91bc3db49f02bc0e4732
|
|
We're using different user/group and file path on Android, so update
these expectations in unittest for Android.
While there, rename apmanager_unittest to apmanager_test, which seems
to be the convention for unittest target name on Android.
Bug: 24707201
TEST=Run unittest on dragonboard
TEST=Run unittest for Chrome OS
Change-Id: Ibd6880a713117578b68c814edc7e1cefe9170c75
|
|
Bug: None
Change-Id: I28500105c27014c7bfd490bfa84faf83bc5580d1
|
|
Bug:24575517
TEST=Verify apmanager is running after dragonboard started
Change-Id: I43070b3dcb5e03dfc54bc54c05859f0af25b71ad
|
|
Switch to use ShillDBusProxy now that libshill-client is ready.
Bug: None
TEST=Start AP service with shill running
Change-Id: I53eb12c80badb8855684caa25cdd1a3bd9f2f493
|
|
dnsmasq normally creates a pid file in /var/run/dnsmasq.pid, which
doesn't exist on Android. So specify the pid file to a valid file
path on Android.
Bug: 22828115
TEST=Manual test on dragonboard
Change-Id: Ibd1db2d4df71d2693204307ad6886132da4187b7
|
|
We currently do not have a dedicated user/group for apmanager on
Android. So update the code to use "system" user/group for now.
Bug: 22828115
TEST=Manual test on dragonboard
Change-Id: I5d327f3d42ff9fe8895e4e9f4fb8477c904d43df
|
|
Android is using <service>.rc instead of init.<service>.rc.
While there, include the init file in the build target and
remove the seclabel from the init file.
Bug: 22828115
TEST=Manual test on dragonboard
Change-Id: Ia29cb197ec1ebca5d3003d62e9f24060bffd073a
|
|
When starting apmanager through Android's init system, the daemon
will be started under "system" user, and that's currently targeted
user for running apmanager. So there is no need to use minijail to
drop the user privileges to "system" user" again.
So skip this for now until we create a new user/group to run apmanager
under.
Bug: 22828115
TEST=Manual test on dragonboard
Change-Id: Ib37553126f9a9a4024a16f68d91d240ca855f55c
|
|
Logger utility doesn't exist on Android, so do not run it on Android.
Bug: 24451556
TEST=Manual test on dragonboard
TEST=Test AP setup on Chrome OS device
Change-Id: I4014f5ca3ab91b348a98169cb355c6841d6530fd
|
|
When starting the daemon using an init system, the environment setup
is already being handled by the init system, so there is no need
to daemonize the daemon process create such setup.
By daemonizing the daemon process, it spawns off a new process to
run the daemon and terminates the current process. This causes
a problem with the init system, where it thinks that the daemon
failed to start. We were able to work around it on Chrome OS's
upstart script by adding the forking expectation in the init
scritp ("expect fork"), but there is not such workaround on
Android's init system.
Fix it by removing the daemonize call (daemon()) and remove the
the forking expectation on Chrome OS's init script.
Bug: 24412675
TEST=Manual test on dragonboard
TEST=start/stop apmanager on Chrome OS device
Change-Id: I4dff678946801310982c3af366ab6182f5864a81
|