Some system services (e.g. SoundTriggerMiddleware) assume that
whenever they start, the audio HAL is in its default (reset) state.
init.rc scripts tie the lifetimes of the audio HAL and system
processes, but when using stop/start this is not the case, and this
may cause spurious crashes in this case.
stop/start is apparently being relied on in some test infrastructure,
so this change is needed to avoid causing problems for those systems
or false detection of problems, which are not actually present in
production.
Bug: 154029444
Test: Manually verify that the audio HAL is stopped on
'adb shell stop', restarted on 'adb shell start' and that the
system boots correctly after.
Change-Id: I39878b978b47a169c4fe446c43d7347809d15e06
Merged-In: I39878b978b47a169c4fe446c43d7347809d15e06
Move these from toybox as they're Android specific and more easily
maintained here.
A few changes during the conversion:
* Report error in setprop if value is not a UTF8 string; this would
previously fail only after attempting to set the property
* Inform users to check dmesg for further failure messages for all
three programs
* Only start/stop zygote_secondary if the device is not single arch
Bug: 117321744
Bug: 133901248
Test: setprop works, start and stop work on single and multi-arch.
Change-Id: Id2194cf2b65221bde38aff91f0e86b33edb37f42
Like the regular fgetln(), grep_fgetln() doesn't NUL-terminate the
string, which regexec() doesn't like. ASan just gained the ability to
intercept regexec(), which is why we didn't find this previously.
Bug: http://b/129089665
Test: adb shell grep -R /system -e "abc"
Test: toybox grep tests
Change-Id: Id707cea66a873b83bd763a3dcdf726ac7d062ce0
No significant changes, but this does get rid of our local modifications.
Bug: http://b/129089665
Test: builds
Change-Id: Ie6e3cc2198c302fc998fe6fcf027661e5dca88f0
Make "r" package available for /vendor, so that we can easily add:
PRODUCT_PACKAGES_DEBUG += r.vendor
in device/google/<device>/device.mk
Change-Id: I46c23a85c95444083b8e4b68961c541d9af9b216
So that the getevent output can be redirected and still be responsive
when events occur.
A good example is when using 'adb shell getevent' command, this latter
would only display the events when the buffer is full. With this patch
as soon as an event is received/printed, it is flushed to stdout.
Change-Id: I77eee96ed1aa59bf8d82f17eab666976ce966def
Signed-off-by: Gary Bisson <gbisson@essential.com>
This reverts commit 90a018a87a.
Not a clean revert because things have changed slightly, and I'm sticking
with the egrep/fgrep shell scripts for now.
Bug: http://b/111849261
Bug: https://bugs.exim.org/show_bug.cgi?id=2294
Test: manual
Change-Id: I72ae637c84f0eb1c2b5291db73ebff1628d54110
adbd has been built as a static executable since the same binary was
copied to the recovery partition where shared library is not supported.
However, since we now support shared library in the recovery partition,
adbd is built as a dynamic executable.
In addition, the dependency from adbd to libdebuggerd_handler is removed
as debuggerd is handled by the dynamic linker.
A few more modules in /system/core are marked as recovery_available:
true as they are transitive dependencies of the dynamic linker.
This change also includes ld.config.recovery.txt which is the linker
config file for the recovery mode. It is installed to /etc/ld.config.txt
and contains linker namespace config for the dynamic binaries under
/sbin.
Bug: 63673171
Test: `adb reboot recovery; adb devices` shows the device ID
Test: Select 'mount /system' in the recovery mode, then `adb shell`.
$ lsof -p `pidof adbd` shows that libm.so, libc.so, etc. are loaded from
the /lib directory.
Change-Id: I363d5a787863f1677ee40afb5d5841321ddaae77
For potential use with build/make/tools/fat16copy.py
Bug: 63035155
Test: mmma system/core/toolbox; newfs_msdos
Change-Id: I8ad50b8c181fc4ec21e191ec9fea8e9aa11d2d9b
Just the symlink for now. If this sticks, I'll come back to remove the code.
Bug: N/A
Test: `toolbox dd --help`
Change-Id: I9b967e9246f42db0d1f48d9d147c538d57fb3bc8
Add a non-toybox version of getprop, so that we can interface with the
new C++ PropertyInfoAreaFile class to return property context
information.
Bug: 36001741
Test: Compared toolbox getprop results with toybox getprop
Change-Id: I4e90aa5b843cb5cfcbe85f05f23ae8e22729b26e
This drops the *TOOLS automated logic, though since there are only
three tools now, that seems less important. It would have been possible
to implement that logic in a Go plugin, but that seems like a lot of
overkill to fix a few duplicated entries.
See build/soong/README.md for more information.
Test: mmma system/core/toolbox
Test: List of installed files is the same
Test: input.h-labels.h and tools.h are the same
Change-Id: I9753083c3f689e689e40001b998b39ad20509598
Add a non-toybox version of getprop, so that we can interface with the
new C++ PropertyInfoAreaFile class to return property context
information.
Bug: 36001741
Test: Compared toolbox getprop results with toybox getprop
Change-Id: I5f98f9e895d0620a2d9686bc0608490e7d9c3120
This utility is always useful during device bringup, so let's bring it
back for debug builds.
This reverts commit 8a475f7e4a.
Change-Id: Ic4041afe538663f1e201ee1341dee247ab0d5ba2
Bug: 38240024
Test: Verified that grep is installed in /vendor/bin. See details in
testing done comment in https://android-review.googlesource.com/412061 .
Change-Id: I06007014779310bc24c65f7343111c5217ba6ff0
This prevents the shell user from injecting input as if it were coming
from an existing input device, which in turn makes it easier for malware
/ abuse analysis to detect when someone is injecting input via the
command line vs a real user using a device.
(cherrypick of 95637eb2a332b9a09914b1bf32c10fccfba4a175.)
Bug: 30861057
Test: ran getevent, saw correct output, played with device
Change-Id: Ib53eea1b7767f25510b5d36fe6109101a9fad8e0
/dev/mem has been turned off on all Android kernels (b/19549480). This
utility cannot be used.
Test: android compiles.
Change-Id: I500021f224febb15dd8bfe6e1f6e5c398fe6f552
Some of the less-used stuff stayed behind in input.h, so we need to
parse both files.
Change-Id: Iff2b6e3fc4f5a6584169d12f16427b4f235da21a
Test: manual inspection of the generated file.