It tracks binder calls into the system server and reports
statistics about CPU time spent per call on multiple dimensions,
e.g. uid or call description.
Usage: dumpsys binder_calls_stats
Overhead: ~0.5% per binder call (if enabled)
Test: manual
Bug: 75318418
Change-Id: I13b854f67f8fd1c9f985b8e45f74dcba2e73b9cb
It turns out that we are still not ready to publish
DropBoxManagerService at an extremely early boot phase as we attempted
so [1]. Our best right now is to publish DropBoxManagerService
immediatelly after SettingsProvider is installed.
Otherwise, if WTF logs are generated in a too early boot phase, it is
indeed possible that two different instances of SettingsProvider can
be created.
The first SettingsProvider instance, created by the
DropBoxManagerService access to Settings, is still present, and a
reference is held in Settings.ContentProviderHolder, such that
framework API access hits this instance.
The second SettingsProvider instance, created by the SettingsService
startup, also still exists and is referenced by
SettingsService.mProvider -- this instance is hit by "settings" shell
command access via SettingsService.onShellCommand().
This creates a situation where settings modifications made via shell
command cannot be seen by the usual frameworks APIs, and vice-versa.
[1]: Ie71d53fc125ebc47fa08ef59a8b7e4f66f2e805c
d79d203b35
Bug: 72399950
Fix: 72450122
Fix: 73505784
Test: atest CtsTextTestCases:android.text.format.cts.DateFormatTest#test_is24HourFormat
Test: atest CtsInputMethodServiceHostTestCases
Test: Manually verified as follows
1. Boot a certain device that has neither /proc/wakelocks nor /d/wakeup_sources exists
2. adb shell settings get secure enabled_input_methods
-> shows non-empty result
Change-Id: I66b68e7f456c4e0e8f5933e65202c61ed862088d
- input service data needs to be in sync with window service data
- section is generated in under 20 ms well within guidelines
Bug: 74098479
Test: Take bug report and verify contents
Test: mmm -j56 frameworks/native/cmds/dumpstate && \
adb sync data && adb shell /data/nativetest64/dumpstate_smoke_test/dumpstate_smoke_test && \
printf "\n\n#### ALL TESTS PASSED ####\n"
Change-Id: Ida087fa6b0b2e1509b6d9570ab216bacbb1a1863
It's too easy for code to accidentally use loadLabel() when building
strings for security sensitive contexts, so add ability for a process
to always force loading of safe strings.
Test: builds, boots
Bug: 73657770
Change-Id: I1c7645bd7bebed0cfb6bc3e5bfd36c8cb11d4838
When a single app is responsible for more than half of the data usage
that caused us to trigger a "rapid usage" alert, name that app in the
notification. Tests to verify.
Move NPMS->NSS direct calls to "Internal" pattern, following
best-practices to avoid unnecessary AIDL exposure.
Remove 3G/4G split mobile plan support, which has been deprecated for
years and was never supported in a shipping product.
Move MultipathPolicyTracker in tree to reflect its package name.
Test: bit FrameworksNetTests:*
Test: bit FrameworksServicesTests:com.android.server.NetworkPolicyManagerServiceTest
Bug: 69263587, 64221505, 73431080, 72746951
Exempt-From-Owner-Approval: approved in previous PS
Change-Id: I3e4ec1ae2222d51b232f76f32faca93d4f8cd272
We need to start usb service in emulator even when we do not have usb
feature. It is used for adb authentication.
BUG: 73644752
Test: manual
Change-Id: I7ac6c5a20777be5ab5f286a02b73211b5e76898d
(cherry picked from commit dfe6a40d8a8d4806d77773961e137edb1fbcbb0e)
This changelist limits DisplayContent the display
container/controller creation. All other callpoints now can only
retrieve existing DisplayContents. This removes the chances of
arbitrary calls generating a DisplayContent without the related
ActivityDisplay on the ActivityManager side.
Since display creation is now driven on the ActivityManager side,
the ActivityManagerService must be initialized and associated with
the WindowManagerService before the WindowManagerService can be fully
initialized. This is reflected in changes to SystemServer.
Fixes: 72228411
Test: go/wm-smoke-auto
Change-Id: I8dddb5fc109be4363de5ba87faff9d9885009042
Remove the legacy RTT service. RTT requests are already directed to
the new API by a previous CL.
Bug: 65108579
Test: unit tests
Test: WifiRttManagerTest:test_regular_scan_then_rtt_ranging_stress
Change-Id: I436e8bcd2f4e2ba6056870d887eea141fbebae85
Move CarServiceHelperService.java and ICarServiceHelper.aidl from
frameworks/base to frameworks/opt/car/services.
Bug: 72571496
Test: Complies and runs
Change-Id: I0f09c84e25a372dab3f170bd623f25a92f9b0f73
Switch to reading limit information from NetworkPolicy, which is
typically populated from SubscriptionPlan. This lets users have
direct control over the limits we're using to trigger rapid usage
alerts, and makes the feature work without requiring that the carrier
wire up SubscriptionPlan information.
Let the user "snooze" the rapid usage alerting for a day at a time,
so we're less annoying to them. Send the snooze broadcasts as
foreground, so that we don't re-post notifications while working
through a long background broadcast queue.
Fix notifications to use the "ALERTS" channel, since these alerts
really are higher priority than simple "STATUS" updates; this also
gives us HUN behavior when in full-screen apps.
Update both service and unit tests to work directly with
NotificationManager, instead of the raw AIDL.
Test: bit FrameworksServicesTests:com.android.server.NetworkPolicyManagerServiceTest
Bug: 72444638, 72436702
Change-Id: I8d9138522a7779cc68eb9fa4777b50facb6567b7
Apps wanting to use a TextClassifier service (instead of an
in-app-process TextClassifier) bind to this service. The service
binds to and reroutes calls to a configured system TextClassifierService.
TextClassifierManagerService manages the lifecycle of the configured
TextClassifierService and binds/unbinds to preserve system health.
A configurable TextClassifierService extends TextClassifierService,
declares an android.textclassifier.TextClassifierService intent, and
requires a permission that is only granted to the system so only the
system may bind to it.
The TextClassifierManagerService implements a similar interface to
TextClassifierService (i.e. ITextClassifierService) but doesn't have to.
This is done for simplicity sake and things may change in the future.
The configuration of the default service is in config.xml.
OEMs may change this with a config overlay.
If no TextClassifierService is specified, the default in app process
TextClassifierImpl is used.
Bug: 67609167
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Test: tbd
Change-Id: I8e7bd6d12aa1a772897529c3b12f47f48757cfe6
The interface will be removed in a subsequent CL, it will be
easier to deal with merge conflicts.
Test: 1) m -j RunFrameworksServicesRoboTests
2) runtest -p com.android.server.backup frameworks-services
Bug: 65823538
Change-Id: I37c4c6758c646e1b18889ed05aa1b1d7c6129cf0
This CL adds system APIs in android.os.SystemUpdateManager. The APIs allow
system updater apps (RECOVERY permission required) to publish the pending
system update information, and allow other apps to query the info
accordingly (requiring RECOVERY or READ_SYSTEM_UPDATE_INFO permission).
Design doc in go/pi-ota-platform-api.
Bug: 67437079
Test: Use test apps to call the new APIs to query and set the update info
respectively.
Change-Id: Id54b4a48d02922d2abd906dd7e2ec80a656fc9b1
In system_server, it should be deactivated until InstallSystemProviders
is finished.
Test: SQLiteCompatibilityWalFlagsTest
Test: setting put global ... + verify that dumpsys dbinfo has the new flag
Bug: 70226732
Bug: 70517616
Change-Id: Iec6a5e61a5d7e4cc0ac602f2b630357c54bb4456
Otherwise, Wifi service could crash SystemServer;
for example, on emulator system image where wifi
feature is missing, starting wifi will cause boot
failure.
BUG: 70378659
Change-Id: I82546c2c63fb6736e8216a7942fba2d3c9affb13
The stack is truncated up to 5 lines at parcel time. When unparceling,
a separate RemoteException will be created and set as a cause of the
exception being thrown.
Performance results(in nanoseconds):
timeWriteExceptionWithStackTraceParceling 4168
timeWriteException 2201
timeReadException 15878
timeReadExceptionWithStackTraceParceling 23805
Test: manual + ParcelPerfTest
Bug: 36561158
Change-Id: I18b64a6c39c24ab067115874ddb5bd71f556a601
Network security watchlist service is a service to monitor all potential
harmful network traffic. By setting a network watchlist, any connections
that visit any site from watchlist will be logged.
Logs will be aggregated everyday and encoded using differential
privacy before exporting it from framework.
This feature is disabled now, run "setprop ro.network_watchlist_enabled true" to enable it.
All network events are handled in an async bg thread, it should not
cause any delay in netd. Also, it uses the hooks in enterprise network logging,
so we can run netd_benchmark to measure the impact to netd.
Here are the things not included in this CL:
- ConfigUpdater to get and set watchlist
- Differential privacy encoding logic and reporting
- CTS
- Memory and performance optimization for internal watchlist data structure
Test: manual - turn on the feature, hard code a watchlist xml, process
that visited that domain is being logged in sqlite.
Test: run netd_benchmark - seems no obvious performance change.
Test: bit FrameworksCoreTests:android.net.NetworkWatchlistManagerTests
Test: runtest frameworks-net
Test: runtest frameworks-services -p com.android.server.net.watchlist
Bug: 63908748
Change-Id: I09595178bac0070a867bc5e0501a7bf2c840e398
Until now, userdebug and eng builds have tracked StrictMode
violations on all system apps, including prebuilts that we have no
control over, which results in a lot of unactionable noise.
This CL narrows the set of enabled apps to only "bundled" system
apps, which gives us a much higher chance of burning these violations
down to 0 and keeping them there. We don't have a good proxy for an
app being "bundled", so we detect it based on being in the "android."
or "com.android." package namespace.
Clean up the entire flow of applying StrictMode defaults to make it
much more human-readable. This resulted in us fixing a bug where
StrictMode was never actually enabled for jank-sensitive threads in
system_server!
Relax I/O checks in a few places where we know we're interacting with
procfs or sysfs. Add internal "allow" methods that avoid object
allocation by returning raw mask.
Test: cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t android.os.cts.StrictModeTest
Bug: 68662870
Change-Id: I536e8934fbcdec14915fcb10995fc9704ea98b29
BatteryService is the first service that uses a hwbinder
call, so we need to spawn the threads for BatteryService to receive
callbacks prior to starting BatteryService.
Test: boot test
Test: manually sleep in SensorDeviceUtils, still boots
Bug: 68765551
Bug: 68217725
Change-Id: Iadd88897d4cf9e0e37af706452c15318115f2149
CTS will be in next CL.
APIs for labels/ icons of profile switching are not implemented yet.
Test: Wrote a test app to play around the APIs
Test: bit FrameworksServicesTests:com.android.server.pm.crossprofile.CrossProfileAppsServiceImplTest
BUG: 67765768
Change-Id: I27714aa4a8d61c6df398cbc5112cb4c35316a3fb
They are untested and were committed as part of a legacy refactoring
that appears incomplete.
The Wear team have added a few new config.* flags to disable services
they don't need on watches. These should probably be unified since we
don't really need this fine level of granularity.
Test: make & flash
Bug: 64052650
Change-Id: I5c8ed3f0e78c2ed0d2e733939a82e1ab8940de22
Adds new PROTO flag which requests services to dump sections in proto format. Modifies PriorityDumper helper class to parse proto arguments and set asProto flags. Registers WM and AM with proto dump supprt.
Bug: 67716082
Test: frameworks/base/services/tests/runtests.py -e class "com.android.server.utils.PriorityDumpTest"
Test: adb bugreport ~/tmp/bug.zip
Test: adb shell dumpsys window --proto
Test: adb shell dumpsys activity --proto
Change-Id: Icfc6857c8a9340110a43343734a27e48d0b5a229
Register service with HIGH and NORMAL priority suppport. Dump network diagnostics as part of the HIGH priority bucket.
Test: adb shell setprop dumpstate.version "2.0-dev-priority-dumps" && \
adb bugreport ~/tmp_new.zip
Test: adb shell dumpsys --priority HIGH
Change-Id: I1ad263efbc264c3328e70dc9f7ddeb2d31bc4d41
Introduced in ag/2837473, this stats service is not actually up and
running fully. It is creating boot time selinux denials due to lack of
permissions for system server to start the service. Since it cannot run
due to system server being unable to register it with servicemanager, the
registration code is being removed for now to clean up boot denials.
Removing this boot denial will allow boot-time presubmit tests for SELinux to be
put into place. Service definition and sepolicy for this feature can be
added when the feature is approved in the future.
Bug: 67468181
Test: servicemanager does not generate denials on boot
Change-Id: Id6a29cc6abb8ebf5a3f41da4311a555f41dd80b3
The new string resource contains class names of device specific services
and referred by SystemServer.java.
Bug: 63893131
Test: Manually added device specific service and see if it's launched
Change-Id: I0cf88de5dfcf86dad459c0909073dce7fbfa57b9
For feature type "embedded", launch IoTSystemService from
System Server.
Test: Wrote a IotSystemService and ensured that the service is
successfully started on an iot device.
Bug: 67641069
Change-Id: I5aa0408f35fb4a5b0787cf9b20454720d8ae130f
Cherry-picked and refactored from oc-iot-dev branch
Register services to be called as soon as a bug report is taken so relevant debug info can be captured.
dumpsys --priority CRITICAL times: adb shell dumpsys --priority CRITICAL | grep "was the duration"
0.005s was the duration of dumpsys SurfaceFlinger
0.002s was the duration of dumpsys cpuinfo
0.003s was the duration of dumpsys activity
0.025s was the duration of dumpsys window
Bug: 31774394
Test: adb shell setprop dumpstate.version "2.0-dev-priority-dumps" && \
adb bugreport ~/tmp_new.zip
Test: adb shell dumpsys --priority CRITICAL
Test: adb shell dumpsys --priority HIGH
Test: adb shell dumpsys --priority NORMAL
Change-Id: Ic656a05dd9a838f0b13043b4387dae7b5c691f7e
Test: reboot device - no crashes
Test: Ran privapp_permissions.py for fugu/marlin/taimen
Bug: 64693550
Change-Id: I9522ccaa75858b9a3d153c95c529eff70cd13994