This is an eBPF usermap read via libmeminfo. System server
already has permissions to do so (as it already does so for the
total GPU mem stats).
Change-Id: I9e3c4dc9144708c630215e309b7ff394abbdcd76
Test: manual, statsd_testdrive 10064
Bug: 208440056
This matches behaviour described in:
https://developer.android.com/training/articles/perf-jni#extended-checking
All output from CheckJNI state was disabled as part of quietening
logspam, but now we log a message only if CheckJNI is
enabled. CheckJNI is off by default and only used as a developer
correctness tool.
Bug: N/A
Test: adb root; adb shell stop; \
adb shell setprop dalvik.vm.checkjni 1; \
adb shell start; adb logcat -d | grep CheckJNI
Change-Id: I93bc2d097a8769b7768c633b705b29fc1aac634a
* changes:
Move common audio AIDL types to audio.media.audio.common
MediaFormat: Add more audio MIME types
Add android.media.audio.common.AidlConversion class
Add a new header library, libandroid_runtime_vm_headers,
that exposes AndroidRuntimeGetJavaVM.
Test: boots
Bug: 190450693
Change-Id: I64053b56eb1290cff8ea191b1cc592fbc9702ce8
Bug: 192020504
Test: Check logcat with and without the flag.
Change-Id: Ia46a011125a6e245bbd9065d708d1f905d56e3af
Merged-In: Ia46a011125a6e245bbd9065d708d1f905d56e3af
(cherry picked from commit f2a815dcbf)
ART will refuse to load on-device generated artifacts if odsign
verification status suggests files have been tampered with.
(cherry picked from commit a8b24392a1)
Bug: 180949581
Test: manual
Merged-In: I772b5b7b191310bf7c7797161a304a1ab6f53c5e
Change-Id: Ia0e5ebf4c763678fef55139af60b169f0e6fdeee
ART will refuse to load on-device generated artifacts if odsign
verification status suggests files have been tampered with.
Bug: 180949581
Test: manual
Change-Id: I772b5b7b191310bf7c7797161a304a1ab6f53c5e
Add a new header library, libandroid_runtime_threads_headers,
that exposes javaAttachThread / javaDetachThread.
Also change the return value from int to bool, since the client
may not know about JNI_OK.
Test: boots
Bug: 190450693
Change-Id: Ifedd34a8c8a1847d89c9f2f7919ff7e4b13b7446
This reverts commit 516cb2d025.
Reason for revert: Add back after merging f2fs/f2fs-tools changes removing immutable bit stuffs
Bug: 188928405
Change-Id: I6a6fcde1190bff14abe1a67a75b8e7be95d89072
This reverts commit e41b029d85.
Reason for revert: b/189985437
com.android.tradefed.targetprep.TargetSetupError[APK_INSTALLATION_FAILED|520001|DEPENDENCY_ISSUE]: Failed to install com.android.devicehealthchecks with ...
Change-Id: I06fe7d94f6dab474c74b093de8692f08d4031b62
Attribution source is the abstraction to capture the data
flows for private data across apps. Checking permissions
for an attribution source does this for all apps in the
chain that would receive the data as well as the relevant
app ops are checked/noted/started as needed.
Teach speech recognition service about attribution
chains. If an implementation does nothing the OS
would enforce permisisons and do blame as always.
This apporach leads to double blaming and doesn't
support attribition chains where app calls into
the default recognizer which calls into the on
device recognizer (this nests recursively). If the
implementer takes advantage of the attribution chain
mechanims the permissions for the entire chain are
checked at mic access time and all apps are blamed
only once.
Fixed a few bugs around finishing ops for attribution
chains. Also ensured that any app death in a started
attribution chain would lead to finishing the op for
this app
bug: 158792096
Test: (added tests for speech reco)
atest CtsMediaTestCases
atest CtsPermissionTestCases
atest CtsPermission2TestCases
atest CtsPermission3TestCases
atest CtsPermission4TestCases
atest CtsPermission5TestCases
atest CtsAppOpsTestCases
atest CtsAppOps2TestCases
Merged-In: Ic92c7adc14bd2d135ac13b96f17a1b393dd562e4
Change-Id: Ic92c7adc14bd2d135ac13b96f17a1b393dd562e4
Modern f2fs implementations starting in S support compression
natively within the file system. The data blocks of specific
installation artifacts [eg. .apk, .so, ...] can be compressed
at the file system level, making them look and act like any
other uncompressed file, but consuming a fraction of the space.
However, the unused space is not free'd automatically. Instead,
we must manually tell the file system to release the extra
blocks [the delta between the compressed and uncompressed block
counts] back to the free pool.
Because of how compression works within the file system, once
the blocks have been released, the file becomes read-only and
cannot be modified until the free'd blocks have again been
reserved from the free pool. For these installation artifacts,
that is not a concern.
Test: atest CtsAppSecurityHostTestCases:SplitTests
Test: atest CtsAppSecurityHostTestCases:IsolatedSplitsTests
Test: atest CtsAppSecurityHostTestCases:PkgInstallSignatureVerificationTest
Test: atest CtsLibnativehelperTestCases
Test: atest PackageManagerTests
Test: Manual. Boot the device and see cblocks for stub APKs are released
Test: Manual. Disable and re-enable stub APK and see cblocks are released
Bug: 188928405
Change-Id: I4b29dab263d02a79d7b1593d35ae28101d33679a
When tunnel mode is being used (meaning when there
is a sideband stream in one of the layers in SurfaceFlinger), the
blur can't be computed over that layer. In that case, SF blurs are
disabled, which results in a translucent buffer to be drawn.
This CL introduces a listener, which is registered with the
SurfaceFlinger and receives a callback whenever the tunnel mode
enabled state changes. This way, the BlurController can properly send
updates to apps that blurs are disabled/enabled.
Bug: 171457637
Test: atest TunnelModeStateListenerTest
Test: atest TunnelModeStateReporterTest
Change-Id: I6ffba1c342352ad65a32c0efc4ecbc07811245d9
This allows us to collect Java Heap Profiler data directly without
needing to set the flag similar to PerfettoHprof.
Test: Passing Tests
Local Testing
Bug: 160214819
Change-Id: Id4888107c7b12f076de8237fd42bab49319566b5
this property is deprecated and emulator now
populates `dalvik.vm.checkjni` to use instead.
Bug: 182291166
Test: getprop dalvik.vm.checkjni
Signed-off-by: Roman Kiryanov <rkir@google.com>
Change-Id: Ie94b0d6c2e48b731d9cfe0ead380e0f52f662f37
In order to detect memory regressions caused by improper handling of
dma-buf buffers we need to measure how this memory is used.
This change:
- Introduces DmabufInfoReader which wraps libmeminfo and provides
per-process DMA-BUF stats.
- Specifically, measures buffers mapped to the process address space
(from /proc/pid/maps). This is supported on all devices.
- For devices running 5.4+ (where the system processes can query fdinfo)
also measures the total retained memory (either by mmap or an open fd).
- Introduces a statsd atom that collects this for all running managed
processes. Non-managed processes will also hold dmabufs, but the
likelihood of them causing issues (post-launch) is smaller so I am
trading them off for cheaper collection (if indeed we encounter such
problems, they will definitely be caught by the total dmabuf counters).
Test: manual
Bug: 183708249
Change-Id: I5e0ef58ac1a66ebe2d280c5733de46ba84f75a46
Instead of compiling framework-connectivity source into
frameworks-minus-apex, have the APIs loaded separately from
framework-connectivity.
Bug: 171540887
Test: device boots, has connectivity
Change-Id: I8f07ff2082c3de80821e121807e66a43a870de7b