Test: change pin and immediately crash the kernel with
adb shell 'su root sh -c "echo c >/proc/sysrq-trigger"' and boot
Bug: 112175067
Change-Id: Ia5f43f3118e2297fbea43c805ef2f4577bf8a9bf
(cherry picked from commit 50e00c8dc48849280410e38bb05a1f11ce24ef01)
Merged-in: Ia5f43f3118e2297fbea43c805ef2f4577bf8a9bf
ag/3915086 modified AccountManagerService to use the PackageManagerInternal returned from
LocalServices. However when AccountManagerServiceTest runs tests against AccountManagerService
it is using a local instance of the object which does not have access to system's local
PackageManagerInternal. To resolve this a mock PackageManagerInternal is added to the LocalServices
with a mocked hasSignatureCapability that returns an appropriate response based on the test. This
fix also exposed an issue that appears to be introduced by ag/2959363; with the change in
checkKeyIntent to no longer throw a SecurityException the expected return code for error paths
is now AccountManager.ERROR_CODE_REMOTE_EXCEPTION.
A small change was also added to AccountsDbTest to skip testCeNotAvailableInitially on eng builds
as the Log.wtf would crash the test process when invoked on eng builds.
Test: adb shell am instrument -w -e package com.android.server.accounts \
com.android.frameworks.servicestests/\
android.support.test.runner.AndroidJUnitRunner
Bug: 80380639
Change-Id: I9438550d1c19cc86ec56991da766d71e068784ab
Merged-In: I9438550d1c19cc86ec56991da766d71e068784ab
In P the PHONE_STATE broadcast behavior changed due to new permission
requirements. Updating the API docs for this broadcast to make it more
clear to developers how the broadcast will work given different permission
scenarios.
Also, made a minor change to how the "EXTRA_INCOMING_NUMBER" is populated
on the phone state broadcast. Originally we opted to remove
EXTRA_INCOMING_NUMBER when the number is empty. Developer feedback reveals
it is difficult to know for an unknown caller (where numer is empty)
whether the broadcast they're receiving is the one associated with the
broadcast for receivers with READ_CALL_LOG, or the one for receivers
without it. This minor change eliminates the need to count broadcasts and
instead allows the developer to just focus on whether the extra is present
or not.
Test: make docs and verify the javadoc appears as expected.
Test: Used test app to confirm functionality.
Bug: 110190165
Merged-In: I55e3519fcbad4dcb7da041d0194bf4e1c7d38949
Change-Id: I35967d53274b99d66b63f4ff5acb60a689745f9d
* there will be an endless loop to call doBind and cause many connectionRecords of HeadsetService while binding HeadsetService in BLE_ON state.
* allow to bind HeadsetService only when BT state is ON
Bug: 111730478
Test: Keep device in BLE_ON state -> kill com.android.phone process
-> As time goes on, adb shell dumpsys activity services to check the connectionRecords of HeadsetService will not become more and more
Change-Id: I5f66d015b8aa3c94c7e887ef033213af74235b4a
There are, confusingly, two seInfo strings used to determine how
processes and files are labeled. "seInfo" was the original string, and
https://android.googlesource.com/platform/frameworks/base/+/be0b8896d1bc%5E%21/#F3
added "seInfoUser" to support instant apps (with a TODO to merge the two
fields).
"seInfoUser" is only intended to label instant app processes, not files.
So, when we need to label files, we should be using "seInfo", not
"seInfoUser". Otherwise, files will get labeled incorrectly.
Steps to reproduce:
1) Revert system/sepolicy commit cdc6649acc43d3a38753e22790f372290c1189c1
2) Rebuild and factory reset the device ("fastboot -w flashall")
3) Wait for the device to boot.
4) "adb root"
5) "adb shell"
6) "cmd package compile -r bg-dexopt --secondary-dex com.google.android.gms"
7) Examine the files in /data/user_de/0/com.google.android.gms using
"ls -laZR /data/user_de/0/com.google.android.gms"
Expected:
All files in /data/user_de/0/com.google.android.gms should have the
SELinux label "privapp_data_file"
Actual:
Secondary dex files produced by installd have the incorrect label
"app_data_file"
Bug: 112357170
Test: Verified labels of files in /data/user_de/0/com.google.android.gms
are correct
Change-Id: If028dcb4742731acab2855d4eec8f314964bb09a
Implementations of HIDL interfaces are intended to extend
from the Stub class, not the core interface class.
Test: m FrameworksServicesTests
Test: frameworks/base/services/tests/runtests.py -e package "com.android.server.locksettings"
OK (454 tests)
Bug: 112334405
Change-Id: Ib060560fd74f0092544096210f52e1f7fcba6c06
LocalServices.addService in NetworkStatsService is currently failing
with IllegalStateException "Overriding service registration". Setting up
LocalServices in the test to avoid this issue might be possible, but
moving the registration to the only non-test caller of that constructor
as done here solves the issue and avoids side-effects from a constructor.
Test: atest FrameworksNetTests does not choke on this test
Bug: b/78487385
Bug: b/80082746
Change-Id: I5dba98fc79aec0800c8b71e6c7e23d1cfbcae852
Merged-In: I884a7a8bd7db3fcd220b785ba9914ac8c77720f0
(Clean cherry-pick of go/ag/4061255)
With each SystemUI crash don't create new DeathRecipient
Object during registration of Status Bar
BUG: 111051603
Test: manual -Device booted up and running
Change-Id: Ie9219400c87722cd9e9fc13f106a052d692400ea
|Boolean| object is not parcelable and hences crashes when the binder call
crosses a process boundary. Using a primitive integer instead to
represent the boolean value.
Bug: 112358948
Test: Device boots up and able to make wifi connection.
Change-Id: Iac69fd302e1f1338ed0da1446105ffc5855451cc
|Integer| is not parcelable and hences crashes when the binder call
crosses a process boundary. Using a primitive integer should suffice
for sending the value to the server. There are no other usage of
|EVENT_NETWORK_SCORE_CHANGED| in the codebase.
Bug: 112358948
Test: Device boots up and able to make wifi connection.
Change-Id: I4c8fc17f4b803f69a4d882c71a8ce014a194d1ba
Plumb through the error code from cryptfs_check_password to
decryptStorage that was lost in the switch to Binder, so that a wrong
password (+ve return value) is not treated like a bad state (-ve
return value).
Bug: 110976442
Test: Switch walleye fstab to FDE, and test wrong password by hand
Change-Id: Ic2d58483a230ab4520e3a0e6af08d2fac5e8156f
system_server crashed because the system_error "resource_deadlock_would_occur"
occurred while calling thread::join(). It is caused by the value of thread is same
with the calling thread. Correct it using std::this_thread::get_id() to check
whether it is the same thread with the calling thread.
Bug: 70603039
Test step:
Step 1 : Flash DUT and boot it.
Step 2 : Connect with PC via USB.
Step 3 : Run the following adb command and check the DUT:
adb shell
su
ps -A | grep broadcastradio
kill xxx(the process id of android.hardware.broadcastradio@intel-service)
Change-Id: Ia21282c4cc631a0788496081b1821be28929fae6
Signed-off-by: Lei,RayX <rayx.lei@intel.com>
When we fixed proper handling of location permisison gating
sensitive telephony calls we stopped throwing a security
exception when the permission is not held by the caller.
While this is not a security issue there is no reason to
change this behavior which is checked by CTS. This CL starts
throwing a security exception if the permission is not held.
Test: atest android.permission.cts.NoLocationPermissionTest
bug: 74074103
Merged-In: Ic891d62b408c692f84a345f24503f7f25d583e35
Change-Id: Ic891d62b408c692f84a345f24503f7f25d583e35
(cherry picked from commit 33b150937522ccda37567c1303117ac8f1bb6f7f)
To debug power drain due to modem wakeups,
one of the signals we'd like to track is
requests for bandwidth estimate to see which
apps are making requests and how often. This
patch keeps a simple count per-UID when an
app requests a bandwidth update, and that
count is made available in dumpsys.
Bug: 77498849
Test: runtest frameworks-net
Change-Id: I30d2ce85f9fa6747030cf4039d1080113a32e386
The previous profile contained only a few methods and classes
due to an error during processing.
(cherry-picked from commit 0161eaf5666fbb523b68dc77b965b96a0fab8cdd)
Test: build & flash & boot
Bug: 111820715
Merged-In: I4caac335941e2cc84c153652c5206fefdc03596b
Change-Id: I4caac335941e2cc84c153652c5206fefdc03596b
After applies issue 78613232 patch (create symlink in init.rc),
we found device boots to home screen fail.
When device is FDE (Full Disk Encryption) and user sets the
Password/Pattern/PIN to lock phone and then reboot the device,
data partition will be mounted as tmpfs (256MB) until device
is unlocked after user inputs Password/Pattern/PIN.
During device boot-up process, PMS (Package Manager Service) will
execute requestCopyPreoptedFiles when device first boots, and it
may cause device fails to boot to home screen because PMS copies
larger system_b (about 500MB) to smaller tmpfs (tmpfs is only 256MB)
before device is decrypted.
We suggest that PMS doesn't execute requestCopyPreoptedFiles when
device is undecrypted during first boot.
Bug: 78613232
Test: Device boot up to launcher normally.
Test: APPs work normally after A/B upgrade.
Change-Id: I893e0e217a59577299e97adfbf5dc7762dffda7c