Very few clients of libbinder use PackageManagerNative service, as such
it's a waste to couple them together. Now, user of PackageManagerNative
service need to add the corresponding aidl files as shared library.
Bug: 183654927
Test: builds + presubmit
Change-Id: Ieca32fc3c970f2b720d76071651e85459d082f02
Merged-In: Ieca32fc3c970f2b720d76071651e85459d082f02
(cherry picked from commit 47a5f43202)
writepid command usage to join a cgroup has been deprecated in favor
of a more flexible approach using task_profiles. This way cgroup path
is not hardcoded and cgroup changes can be easily made. Replace
writepid with task_profiles command to migrate between cgroups.
Bug: 191283136
Test: build and boot
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I945c634dfa7621437d8ea3981bce370d680b7371
proto_loaded is not thread safe, so we must protect it with
a mutex proto_lock.
Signed-off-by: hanhongli@360.cn
Signed-off-by: gongguang@360.cn
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 170732441
Test: compile
Change-Id: I93416598b6047e890c66b922b360093aa42db8c5
(cherry picked from commit d179cbcdc2)
It is possible for storaged to terminate due to SIGPIPE if its clients
have terminated. This is not a fatal condition from storaged's
perspective, so we ignore SIGPIPE instead.
Bug: 151581751
Test: build
Merged-In: I633780ed20908be02e5e1dea9504e140932afc8c
Change-Id: I633780ed20908be02e5e1dea9504e140932afc8c
(cherry picked from commit 3f3b1708d9)
if other process binder calls dumpPerfHistory when storaged is started, there will be a problem with the storage_sp null pointer
Test: Manual
Bug: 149251684
Change-Id: I9bf61ceb7c34326e95f2355129714d28153a994c
Signed-off-by: shaozhongqi <shaozhongqi@xiaomi.com>
Storaged always writes to the SYSTEM log, so instead of using
LOG_TO(), it can use the normal LOG() macros as long as it calls
InitLogging() with a default to the SYSTEM log.
Test: storaged writes to the SYSTEM log still
Change-Id: I47e63bc92d55f9b1262a67e3508601ddbd9edc87
Since these were combined into libhidlbase.
Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: I0bdffced6af52695c0ef98c9dd659348e56f7aa6
Starting from Android R, platform code cannot access files in debugfs
since it does not guarantee ABI stability. This CL removes the code in
storaged that accesses the EMMC's ext_csd register from debugfs as a
backup if it is unable to obtain the information from Health HAL.
Test: build and boot.
Bug: 134669095
Change-Id: I3bfeb3963de5fb5e6bb3eaa9df43baacad164816
After a few years of being available, there only ended up being one
user of this, so it is clear that logd's duplicate message mechanism
is the favored solution.
The one user of this rate limiting is questionable as is, since due to
the nature of storaged, the mainloop only runs once per minute by
default as is, so there is essentially nothing to be gained by rate
limiting any further.
Test: build
Change-Id: I0610d11efda1ce8b581b939bad11ff295cb2daa6
If recent_perf contains existing content, overwrite in method
load_perf_history_proto. If proto of recent_perf contains a lot of
history, the content would have grown with system_server crashes.
Test: setprop ro.storaged.flush_proto.interval 60
while true;do sleep 5;stop;sleep 1;start;ps -A|grep storaged;done
and look at value for rss should remain about 4MB over long term.
Bug: 119798824
Change-Id: I50aae7d61eb791a8fcddbbd829254baf8f708186
In order for the build system to track updates to the header files
during incremental builds, always specify the src files using the same
path as the package for C++ compilations.
Bug: 112114177
Test: m
Change-Id: Iec355bf4c11204a09bb164bbf14eaa1a148c5f36
Devices that does not implement getDiskStats and getStorageInfo
returns NOT_SUPPORTED as a value. Do not log to error stream in
this case.
Fixes: 114475810
Test: boots
Change-Id: I95e9ebe23b4dee451cb8f6e8dc0b60a224006600
Similar to add_record_locked, load_uid_io_proto should respect the
maximum number of records.
Bug: 111578975
Test: storaged_test.load_uid_io_proto
Change-Id: Ic3c5095cdd09d2184f436813b5ab50d3ee0007b2
Merged-In: Ic3c5095cdd09d2184f436813b5ab50d3ee0007b2
It is possible for storaged to load the same saved proto file multiple
times, for example, if system_server crashes. In this case we do not
want to fill io_history with duplicate entries. This patch elides
records for which an app+userid record already exists for the same
timestamp.
Bug: 111578975
Test: gtest storaged_test.load_uid_io_proto
Change-Id: I87bc3e37d6464079cece03b5852285d79067b935
Merged-In: I87bc3e37d6464079cece03b5852285d79067b935
Add missing libbatteryservice_headers dependency.
It used to use global header include dirs, which is bad.
Add old transitive dependency from libbatteryservice_headers
as well.
Test: builds
Bug: 68724651
Change-Id: Idcc4452160dce70b4f8b48e2d809dcd5744b93b4
Merged-In: Idcc4452160dce70b4f8b48e2d809dcd5744b93b4
(cherry picked from commit 0b31908912)
Lower storaged's capabilities to DAC_READ_SEARCH as an initial step
toward running it non-root.
Bug: 77634061
Test: storaged still runs and its /proc/pid/status has lower CapPrms
Change-Id: Ibfe0349fc059e2f37efba33f587176e8ce6be9fe
Added salyzyn@ for final owner review on adjustments to storaged.
Test: none
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Change-Id: Iac73403ea416a4820f72689f5860aa88931def06
storaged_t has more fields that depend on the health service;
they should be initialized in the new init() function.
Test: storaged unit tests
Change-Id: I70d41e5d0a0ef20c39c41c7539a284937bd21ad5
Put AIDL files into a filegroup so they can be imported as sources
for framework.jar.
Test: m checkbuild
Change-Id: I1a5335384e9291af1f26e7418f15fcfa082ee356
protobuf is only needed when serializing/deserializing data. Instead of
maintaining a permanent buffer in storaged object, move the container to
stack so that the buffer is released when we don't need it. In addition,
we don't need to clear the buffer before updating it.
Also added a function to clear user io history when the user is removed.
Bug: 63740245
Change-Id: Ia5d19b9a0c3f92a93b061a56be89bb0b958a2a29