Add support of multiple class names in service, so that related services
can be grouped together. By doing this, we can start/stop some services
for special purpose. For example, early zygote, early boot animation
and etc.
Bug: 36535312
Test: marlin boots with defined classes
Change-Id: Ifeaaf034fd836816e24f3775bece53ea83faada6
fs_mgr_get_boot_config() returns true/false but the return value check
in current fs_mgr_avb is for 0/1. This was introduced during a refactoring.
Check true/false for the return value.
Bug: 33254008
Test: manual test AVB on bullhead
Change-Id: I72c366627214df4a99c4d9cf1eb577e94f7afb31
This reverts commit 5011270225.
Now starting even earlier.
Reason for revert: Needed change, reverted b/c broken device.
Bug: 36278706
Test: original DOA device boots
Test: angler, bullhead, fugu, marlin, ryu
Test: all these devices boot with wipe
Test: all these devices boot with w/o wipe
Test: lshal shows all included services
Change-Id: Ic639aedf7834b1bd3a26d23d109727f5559317e9
androidboot.slot_suffix is being deprecated for a androidboot.slot.
Bootloader must pass slot used to boot into the androidboot.slot which
does not include the '_' character
Test: boot android
Bug: 36533366
Change-Id: I6137bd08418f67a88120c8609eda10b2ada4607d
Signed-off-by: Fernando Lugo <flugo@google.com>
This just means we were asked to dump, not that something necessarily went
wrong.
Bug: http://b/36191903
Test: builds
Change-Id: I5638b38f3a13081b1e971512f43238010febb59c
- If it is explicitly set to 0, active processes can block
umount completely. Safe to kill all processes and umount.
- also add additional sync after emulated partition umount
as that can change /data partition files
bug: 36004738
Test: many reboots
Change-Id: I6c9b07b6fdece44b9caec4e45ecf26a20d0eb96e
this will make the implementation more cleaner,
and has error message output when failed on some operations
also add the O_TRUNC flag explicitly for the open function
called in write_file.
And add more test on read_file and write_file functions
Test: manual with hikey
Change-Id: Ifc1086a20e85db6980b497b1150a8a7952e672d6
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
Currently, when we are waiting for an exec service or a property, if
there are either any services to be restarted or any more commands to
be run, we set the epoll_timeout to handle these events. However, we
don't actually restart and processes or execute any commands while
waiting, so this essentially turns this waiting into a spin loop,
particularly in the common case of having more commands to execute,
where epoll_timeout is set to 0.
The change only sets epoll_timeout if we're not waiting.
Note that the only way to stop waiting for an exec service or a
property is for a signal or property to be delivered to init, which
happens through the epoll fds, so it's safe to indefinitely wait for
epoll to return.
Test: Boot bullhead
Change-Id: Iae3b217eb28182038b464fd39df8e7d27b5e23ff
Also make backtrace_testlib.c C++.
Bug: 34468756
Test: Ran new unit test on host x86, host x86_64, angler (32 bit, 64 bit),
Test: fugu.
Change-Id: Ia810f596c2df56cd56e8ab17e6c19be0c48d737f
Realloc can return null pointer which
will cause a crash then. Patch introduces
check for controlled 'die' in case memory is
not available
Change-Id: I279028339b1fe756d8a511834e164e59d4cab110
Vendor owns /data/vendor.
HAL data must go in /data/vendor/hardware/.
Bug: 34980020
Test: build and boot AOSP Marlin. Observe /data/vendor and
/data/vendor/hardware exist and are empty.
Change-Id: I6fe96e3c76a10a5eb480ba10e10d4d006de56c12
Current results on an aosp_angler (32 bit) :
Benchmark Time CPU Iterations
-----------------------------------------------------------------
BM_android_fork_execvp_ext 15019207 ns 1002131 ns 700
Test: android_fork_execvp_ext_benchmark
Change-Id: I3d4339ff5cbb9a641cbb14f0b55d2b5fc18cdfde
Right now all platforms supporting A/B have not fixed
androidboot.slot_suffix kernel command line parameter. To avoid breaking
all those platform allow using legacy support bootloaders get fixed.
Bug: 36533366
Test: boot
Change-Id: I0ad349f262d0b7f4897f3e184cb053b1440b2d5b
Signed-off-by: Fernando Lugo <flugo@google.com>
In the new A/B partition support suffixes don't have "_". So, fix fs_mgr
code that assumes it has "_"
Bug: 36533366
Test: boot
Change-Id: I0f528cf1e8fecacb1b4ae34f6dc42e18ebe777bb
Signed-off-by: Fernando Lugo <flugo@google.com>
There was at least one failure due to si_code being unitialized
and then examined.
Test: Run the 32 bit and 64 bit version of the unit tests on angler.
Change-Id: I5455a2cd29afafcd26a49f696e61141bb48478dc
Based on the compressed size of a file entry,
the decision needs to be made to instead store the file
uncompressed. This adds support to ZipWriter to backup
its last file entry.
The file is now always truncated when the EOCD is written out,
to account for the case where a file entry is backed-up and the
resulting file written is much smaller, leaving garbage data at
the end of the file.
This change also includes a rename of FileInfo -> FileEntry.
This struct was private (now public), so it shouldn't affect any
clients.
Bug: 35461578
Test: make ziparchive-tests
Change-Id: I23dc584406274ab7b8ce62b3fbc3562ca4c2603e