Best practice for services that reside on the system, vendor, and odm
partitions is to have a corresponding init .rc file in the
/{system,vendor,odm}/etc/init directory, which contains its service
entry and any related actions.
Change-Id: I26204f9a0f09ce8069f3791ccd9ee61d164a048f
Mix the contents of /proc/cmdline and /default.prop
into /dev/urandom. /proc/cmdline often contains
androidboot.serialno, a device-specific unique
identifier. Similarly, /default.prop contains the
build fingerprint and timestamp, which vary between
device families.
Change-Id: I8803b38c7089b2a1217b99a7c1808b29a3b138cf
This CL adds two more checks:
* When populating a closed log with the metadata, make sure the
SystemProfileSetter is not null.
* When using the update engine client library, check if the update
engine client object was created correctly. The returning object can
be null if update engine's binder service is not running.
Bug: 26731548
Change-Id: I8a615c87f33e15a163d56ccfa3a932a0908aac5f
Previously GetFeatureSet() on an invalid target would just return an
empty feature set, leading to some invalid assumptions, e.g. if there
isn't exactly one device connected this happens:
$ adb shell -t
error: target doesn't support PTY args -Tt
This CL adds a success/failure return value to GetFeatureSet(), and
also adds an option to print errors to stderr since that's the most
common behavior.
This will cause a slight difference in behavior for install/uninstall.
Previously they would block until the device was available, now they
print an error and quit immediately, which seems to be the more common
behavior for adb functions.
Bug: http://b/26387641
Change-Id: I0ea6ffaec922e04b9946e84f05c3870e5b549fde
This CL moves the network address parsing function from adb to libbase
so that it can be used by fastboot as well as adb.
libbase seemed like the right choice because:
1. It already has some parsing functions (parseint)
2. The net address parsing function uses the libbase string
functions so we have a libbase dependency anyway.
The parsing function has been modified slightly to make the canonical
address optional, and debug logging on success has been removed.
For adb the only functional difference is that parsing a network
address will no longer print the result to the debug log, which seemed
unnecessary.
Bug: http://b/26236380
Change-Id: Ife6df02937225fc66de87884d3572d79c092c522
Now that cutils has cross-platform socket functionality, we can
restructure fastboot to remove platform-dependent networking code.
This CL adds socket_set_receive_timeout() to libcutils and combines the
fastboot socket code into a single implementation. It also adds TCP
functionality to fastboot sockets, but nothing uses it yet except for
the unit tests. A future CL will add the TCP protocol which will use
this TCP socket implementation.
Bug: http://b/26558551
Change-Id: If613fb348f9332b31fa2c88d67fb1e839923768a
In current implementation, the mount_all command imports all .rc files
under /{system,vendor,odm}/etc/init/ after mouting filesystems is complete.
There's a need from ODMs to import different .rc files under different boot
modes (e.g., factory mode). Without this support, they will have to fiddle
around the init implementation.
This commit makes mount_all import the .rc files/directories specified
as additional arguments. If no path is given, the original ones are applied
the same way as the current implementation.
BUG: 26549689
Change-Id: Ie67ce13dde4c440ff8bf534826bc392c882a433f
Some of the unit tests manually create their own temp
directories from a relative path. This creates a temp folder
in the folder that the test is run from. This is a problem
when using test_droid or a non-interactive ADB shell command,
since the root directory is not writable. Instead use a
ScopedTempDir to handle temporary folders.
Bug: 26671657
Change-Id: Iaf71d345565dcb4393e80426784a864f7f8b5929
Test: Unit tests pass when running brillo_WhitelistedGtests
Allow _one_ empty line to get through before evaluating
further. Add __android_log_bswrite testing for content
and contentless cases; checking for propagation and for
expected printing. As for printing which is fixed here,
security variants cover the same code paths as the events.
Bug: 26646213
Change-Id: I484718aa604e0a00afde4c34a00e87468ea93aa5
The new libchrome has been ported from Chromium and some APIs have
changed. Make necessary changes at call sites.
Change-Id: I9e45975cdef43913270b82e3fca2c027e614a464
* Clarify the README.md that the logs data may be utilized by anyone.
* Fix a whitespace issue.
Bug: 21724738
Change-Id: Id472485f505afb14588ccd645844a3f4a728abc2
Add crash_reporter_tests to debug builds, so that they can be
run by test_droid.
Bug: 26663796
Change-Id: Iddaa14ab55474875a45b0e8482bac310fbe8cff2
Test: /data/nativetest/crash_reporter_tests exists on eng build
This will allow the tests to be run by the continuous builder.
Bug: 26571398
Change-Id: I7eae2761603e83e3d1f003cb3b06582abc4ed24f
Test: Build an eng build. The tests are installed.