For each service ${service} described in a .rc file, init creates the
property init.svc.${service}. This implies that service-name lengths
are bound by the maximum size of a property. This patch accounts for
the "init.svc." prefix and the maximum property-name length when
validating a service name.
Test: pass
Change-Id: I32dffa37363b41a8211f7644600b81973d30a3b2
Signed-off-by: Iliyan Malchev <malchev@google.com>
From the bug:
Say we run a new adb against an old device (like KitKat). Even with a new
client ADB, in this configuration, "adb shell" will create a remove tty
unconditionally. So if the user runs "adb shell -t -t", we shouldn't fail
with a message about the remote device not supporting -tT options --- the
user asked to create a tty unconditionally, and since we're going to create
a tty unconditionally, we should just succeed. (That it's going to succeed
due to protocol inadequacy instead of succeeding on purpose is irrelevant.)
That adb fails in this case makes scripts more complicated, since they can't
just pass "-t -t" unconditionally if they want a tty and to work on all
device versions, even if the script requires a new-ish adb locally.
Bug: http://b/32216152
Bug: http://b/32219151
Test: test_device.py
Change-Id: I8ab7c8dfa212209a7ab43c1f0832eeac26d2e42f
mLastWorstPidOfSystem is filled with iterator references
that are not from AID_SYSTEM to aid the performance. But
we only clear entries from the list during erase if they
are from AID_SYSTEM. Remove the filter check in erase so
the stale references will be removed.
The conditions that caused this failure are difficult to
reproduce and are rare.
Test: gTests logd-unit-tests, liblog-unit-tests and logcat-unit-tests
Bug: 32247044
Bug: 31237377
Change-Id: Ie405dd643203b816cac15eef5c97600551cee450
Host builds were compiling without -Wl,--no-undefined. Add missing
host ldlibs so that -Wl,--no-undefined can be added again.
Test: m -j host
Bug: 32305815
Change-Id: I0ceabc3f4ec74e2f737afaac58810c5d53d6ccb6
Point to log/log.h where necessary, define LOG_TAG where necessary.
Accept that private/android_logger.h is suitable replacement for
log/logger.h and android/log.h.
Correct liblog/README
Effectively a cleanup and controlled select revert of
'system/core: drop or replace log/logger.h' and
'system/core: Replace log/log.h with android/log.h'.
Test: compile
Bug: 30465923
Change-Id: Ic2ad157bad6f5efe2c6af293a73bb753300b17a2
Add private function __android_logger_get_buffer_size() to read
properties and compose the default buffer size. This interface
complements the existing android_looger_get_size() which returns
the logd setting which can differ at runtime. For use in logd
and dumpstate. Side effect is we also add the private functions
__android_logger_property_get_bool() and
__android_logger_valid_buffer_size() for reuse in logd.
Test: gTest liblog-unit-test, logd-unit-tests and logcat-unit-tests in
combination with commit 'logd: Use private interfaces for
buffer size properties'
Bug: 31750617
Change-Id: Id95cb68f775ef6b427c122e10f6f8291d336d184
* changes:
fs_mgr: use __android_log_is_debuggable()
adb: use __android_log_is_debuggable()
debuggerd: use __android_log_is_debuggable()
logd: use __android_log_is_debuggable()
libcutils: use __android_log_is_debuggable()
Add two functions libziparchive that libminzip has. And create
corresponding unit tests.
1. Open a zip archive from a memory mapped region.
2. A new writer that takes a call back function pointer.
(Used by the OTA updater to stream the data.)
Test: Unit tests passed
Bug: 19472796
Change-Id: I2b2daec71174afe221030357e39bff5faea51e72
system/core/android/log.h needs some work before it can be included in
the NDK. It defines a *lot* of macros that previously were usable
names in NDK sources that used android/log.h. As an example, the
following file defines LOG_TAG as a variable, but the variable name
gets macro replaced if we use the current android/log.h.
4adc1515f8/framework/platform/android/tcuTestLogParserJNI.cpp (41)
For now, we keep a copy of the old NDK android/log.h in
legacy-ndk-includes.
Test: make checkbuild
Bug: http://b/30465923
Change-Id: I8ce942d1ee2f8f0d4c27130802c03992a1b85ec4
Allow our own libraries to use this privately instead of
running the less efficient get_properties and doing the math.
Test: compile and boot smoke test
Bug: 27566046
Bug: 31456426
Change-Id: I2f677276d27fbcb6af01b600ac1d9891c8938d43
__android_log_pmsg_file_write() will open /dev/pmsg0 if not
already, and will close it if we opened it.
Added atomic access to the android_log_context as insurance.
Fortify and correct pmsg tests.
Test: gTest liblog-unit-tests --gtest_filter=liblog.__android_log_pmsg_file_*
Bug: 31958686
Change-Id: I2cf6f971b6968938f471fda67367efe20dae3004
Test: manual - make sure it works in both IPv4/IPv6 env.
BUG: 31537253
Change-Id: Ica492bff34a8c0441516a213d0e8b78fcdfd3282
Signed-off-by: Tao Wu <lepton@google.com>