Commit Graph

8808 Commits

Author SHA1 Message Date
Nicolas Geoffray
2c426bc3f4 Merge "Refactor runtime hidden API flag from negative to positive" am: 46b4862d20
am: d0f327cc60

Change-Id: Iaa313ddff5b22ed22baa916d931befc7a59090ba
2018-02-14 14:07:55 +00:00
David Brazdil
b3a4aab310 Refactor runtime hidden API flag from negative to positive
There are only two situations in which we want to enable hidden API
access flag checks. Turning the flag from DISABLE_ to ENABLE_
simplifies logic in ART and reduces the number places where the flag
had to be passed down to ART.

Bug: 64382372
Test: boot device, install and run apps, check log messages

(cherry picked from commit f7e31c0a2b)

Change-Id: Ib2f70696d98c6e1500d1d419d6acf0a8d0487213
2018-02-14 10:13:06 +00:00
hansson
927afd1edf Merge "fix misleading FATAL EXCEPTION IN SYSTEM PROCESS log" am: c0c9f53175
am: 78d15fd15a

Change-Id: Ie90bccf5aa5fb67e1b4769fcbb1013b1fae71063
2018-02-13 16:39:33 +00:00
yuanhuihui
e669ac2520 fix misleading FATAL EXCEPTION IN SYSTEM PROCESS log
There will be the following situations about mApplicationObject:

1) fork app process will invoke ActivityThread.main(),
then set mApplicationObject.

2) fork system_server, don't set mApplicationObject value.

3) using app_process fork process except zygote, will inovke RuntimeInit,
don't set mApplicationObject value。

For example using command as below:
app_process /system/bin com.android.commands.am.Am "$@",

if this process throw uncaught exception,will output FATAL EXCEPTION IN SYSTEM PROCESS log,
it's not in system process but in normal process。

so should add condition: Process.SYSTEM_UID == Process.myUid()

BUG: 72759350
Test: manual

Change-Id: Ie8d769e4149cd9b938577058de871c4f8db9efe5
Signed-off-by: yuanhuihui <yuanhuihui@xiaomi.com>
2018-02-13 12:52:38 +00:00
Rubin Xu
0cc5170801 [automerger] Fix VerifyCredentialResponse parcelling code am: 54813e9888 am: 0231bc4d6d am: 83cb35453f am: 4405b0ced2 am: b3012285e2 am: ab36ba8483 am: 4af59f1c97 am: f097744926 am: 469065ccb7 am: bf1ecab901 am: 7ac2108ed3
am: a7483c90c1

Change-Id: I04733e3924d0530300106f5897771adf8a4db391
2018-02-07 22:31:21 +00:00
Rubin Xu
a7483c90c1 [automerger] Fix VerifyCredentialResponse parcelling code am: 54813e9888 am: 0231bc4d6d am: 83cb35453f am: 4405b0ced2 am: b3012285e2 am: ab36ba8483 am: 4af59f1c97 am: f097744926 am: 469065ccb7 am: bf1ecab901
am: 7ac2108ed3

Change-Id: Ibae4cb0462cfcbc2296e71849387d0c0035d3cce
2018-02-07 22:14:48 +00:00
Rubin Xu
7ac2108ed3 [automerger] Fix VerifyCredentialResponse parcelling code am: 54813e9888 am: 0231bc4d6d am: 83cb35453f am: 4405b0ced2 am: b3012285e2 am: ab36ba8483 am: 4af59f1c97 am: f097744926 am: 469065ccb7
am: bf1ecab901

Change-Id: Ibf8e444ab8e66a068174c30985e3056443db99fe
2018-02-07 21:59:55 +00:00
Android Build Merger (Role)
bf1ecab901 [automerger] Fix VerifyCredentialResponse parcelling code am: 54813e9888 am: 0231bc4d6d am: 83cb35453f am: 4405b0ced2 am: b3012285e2 am: ab36ba8483 am: 4af59f1c97 am: f097744926 am: 469065ccb7
Change-Id: I9af74b6a8fd17dbc9c8c1edebc0db81a07d2e8dc
2018-02-07 08:19:03 +00:00
Android Build Merger (Role)
469065ccb7 [automerger] Fix VerifyCredentialResponse parcelling code am: 54813e9888 am: 0231bc4d6d am: 83cb35453f am: 4405b0ced2 am: b3012285e2 am: ab36ba8483 am: 4af59f1c97 am: f097744926
Change-Id: Ic3e36a94f5c7b3cf33b8c7972fc1bd254be9a31c
2018-02-07 08:18:57 +00:00
Android Build Merger (Role)
f097744926 [automerger] Fix VerifyCredentialResponse parcelling code am: 54813e9888 am: 0231bc4d6d am: 83cb35453f am: 4405b0ced2 am: b3012285e2 am: ab36ba8483 am: 4af59f1c97
Change-Id: Ic3b71eb297425e9ff6d40c542aa67027317dffea
2018-02-07 08:18:50 +00:00
Android Build Merger (Role)
4af59f1c97 [automerger] Fix VerifyCredentialResponse parcelling code am: 54813e9888 am: 0231bc4d6d am: 83cb35453f am: 4405b0ced2 am: b3012285e2 am: ab36ba8483
Change-Id: Ie3d39f4c402d3385f45aca01059f03ef4025855f
2018-02-07 08:18:44 +00:00
Android Build Merger (Role)
ab36ba8483 [automerger] Fix VerifyCredentialResponse parcelling code am: 54813e9888 am: 0231bc4d6d am: 83cb35453f am: 4405b0ced2 am: b3012285e2
Change-Id: I76a950ed4296cad67230c36ee9edc0b7cc905c60
2018-02-07 08:18:37 +00:00
Android Build Merger (Role)
b3012285e2 [automerger] Fix VerifyCredentialResponse parcelling code am: 54813e9888 am: 0231bc4d6d am: 83cb35453f am: 4405b0ced2
Change-Id: I7c984a83858ee5bb0b84d122dac27e0273f0a177
2018-02-07 08:18:22 +00:00
Android Build Merger (Role)
4405b0ced2 [automerger] Fix VerifyCredentialResponse parcelling code am: 54813e9888 am: 0231bc4d6d am: 83cb35453f
Change-Id: Ib6d585953a35d3d00ab51144af7639c851ac3d72
2018-02-07 08:18:15 +00:00
Android Build Merger (Role)
83cb35453f [automerger] Fix VerifyCredentialResponse parcelling code am: 54813e9888 am: 0231bc4d6d
Change-Id: I060b6306f3f53b4497b6a19d7221aa1938e66f55
2018-02-07 08:18:09 +00:00
Android Build Merger (Role)
0231bc4d6d [automerger] Fix VerifyCredentialResponse parcelling code am: 54813e9888
Change-Id: Ib1b60818cddeefe3031cf6c9880f5b790775aa62
2018-02-07 08:18:02 +00:00
Rubin Xu
54813e9888 Fix VerifyCredentialResponse parcelling code
There was an asymmetry between parcelling and unparcelling of
VerifyCredentialResponse that could lead to type confusion if
packed with other objects in a Parcel.

Test: none
Bug: 71714464
Change-Id: Icff68879e249422ccca49f2bb7db85c35b4cb353
2018-02-07 08:17:06 +00:00
Siyuan Zhou
11942417b2 Merge "BootReceiver: changed deprecated Build.RADIO to Build.getRadioVerison to get non-empty radio firmware version in SYSTEM_LAST_KMSG." am: 1a535ba4b9
am: 1801988051

Change-Id: I6c9e33ae9fbec647ade9f4258aedfdf73f2883a2
2018-02-07 04:03:26 +00:00
Treehugger Robot
1a535ba4b9 Merge "BootReceiver: changed deprecated Build.RADIO to Build.getRadioVerison to get non-empty radio firmware version in SYSTEM_LAST_KMSG." 2018-02-07 01:24:36 +00:00
Hugo Benichi
9a70530107 Merge "Update OWNER files for connectivity" am: 771e229a23
am: ce0c31d392

Change-Id: I5a995856aa347874b534312212ca73ffff0193c0
2018-02-05 00:39:54 +00:00
Hugo Benichi
771e229a23 Merge "Update OWNER files for connectivity" 2018-02-04 23:18:52 +00:00
Hugo Benichi
1c8756154a Update OWNER files for connectivity
Test: no functional change
Change-Id: I25276c769468c37970cb1915660fee29e589008c
2018-02-02 12:49:45 +09:00
David Srbecky
2eaaf25218 Merge "Propagate the "dalvik.vm.minidebuginfo" property to ART run-time." am: ddd440b8a2
am: 8df431a8ef

Change-Id: Ib2c08bb7bcf5d85c15db9ec16eca1ae9c7930eb6
2018-02-01 19:25:40 +00:00
Siyuan Zhou
4b1e6c3b2f BootReceiver: changed deprecated Build.RADIO to Build.getRadioVerison to get non-empty radio firmware version in SYSTEM_LAST_KMSG.
Test: Manually verified on Pixel 2 XL, Nexus 5X and 6P devices.
BUG:70934228
Change-Id: I40da7e659619e06587409c6b83c655b46bcbd5b2
2018-01-31 16:17:12 -08:00
David Srbecky
156ed92c94 Propagate the "dalvik.vm.minidebuginfo" property to ART run-time.
Change-Id: I27e230fe91490defde4cc38ca8cbc3aa0765fed1
2018-01-30 14:37:37 +00:00
David Brazdil
5fab14313b Merge "Set Zygote.DISABLE_HIDDEN_API_CHECKS for system apps" am: 50cfaa40ca
am: 97a970e56b

Change-Id: I73eaa052597d225aa673dd479977b0ce7a7d6d64
2018-01-25 01:12:33 +00:00
David Brazdil
2a21a9c997 Merge "Set DEXOPT_DISABLE_HIDDEN_API_CHECKS for system apps" am: 2a8c24be18
am: 6dea42ae0f

Change-Id: I6376e610c575cd7c3f7bf8a72ca4c1a92d9023cc
2018-01-24 21:43:47 +00:00
David Brazdil
071bcaa906 Set Zygote.DISABLE_HIDDEN_API_CHECKS for system apps
When forking a process for a system app, pass a flag to ART that
will disable enforcement of hidden API access checks.

Test: manual
Bug: 64382372
Change-Id: I5ba81d84a44c9467613f060428b11e1d9d725bd3
2018-01-24 21:42:28 +00:00
David Brazdil
7c48e0e074 Set DEXOPT_DISABLE_HIDDEN_API_CHECKS for system apps
For now, system apps will be exempt from hidden API access checks.
Pass the appropriate flag to dexopt.

Test: manual
Bug: 64382372
Bug: 72305689
Merged-In: I5676ffa3a5ba680bf5f6bab0b62f0acf4a933097
Change-Id: Idc3067d2c6040f15fe0f051090ba45efe591ebae
2018-01-24 14:12:33 +00:00
Chenbo Feng
cf4b551fb7 Merge changes from topic "bpfStats" am: 6e03224697
am: e041f38289

Change-Id: Ib4790159fd331858ce9f3343a44ccec66fae638c
2018-01-24 05:39:54 +00:00
Chenbo Feng
93afbf258f Use /proc/net/dev to get stats summary
If the qtaguid proc file is no longer exist, the device is running new
eBPF module to do traffic accounting. So the NetworkStatsFactory need to
use the proc/net/dev interface to get the per interface traffic stats
summary. Also, adding a test to verify the helper function work properly

Bug: 30950746
Test: run NetworkStatsFactoryTest
Change-Id: Ia36808bf02f1637dd41a3e7c50917b91b1a77524
2018-01-23 00:35:02 -08:00
Chenbo Feng
828f1b45fb Add bpf support for NetworkStatsFactory
Add the native method used to read the detail information of network
stats from bpf maps. The native method of NetworkStatsFactory should
choose the correct implementation to get the stats detail depending on
the kernel version. Currently the bpf result is printed as a reference
and the actual behavior of NetworkStatsFactory should not change.

Test: NetworkStatsFactory related cts test should not fail.
Bug: 30950746
Change-Id: I4715a23559b5b2306bd556cea0431f0ed172a993
2018-01-23 00:34:53 -08:00
Lorenzo Colitti
cfbf873dd1 Merge changes Id8776d14,Ifa291c62,I5ea9d200 am: c48f4cb7f1
am: b36b423230

Change-Id: I1ac9d349850d607c5fbf4a47760bc09de1c18043
2018-01-19 16:37:44 +00:00
Lorenzo Colitti
ada23ed56a Add the default network to NetworkStats and NetworkStatsCollection.
This allows us to maintain NetworkStats entries that track
whether the traffic was on the default network.

At the moment, the stats collection code always passes in
DEFAULT_NETWORK_NO. However, this value is a no-op, since it is
not persisted to disk. Only the ident, the uid/set/tag, and the
packet/byte/operation counters are persisted.

A future change will add defaultNetwork to the ident and start
persisting it.

Bug: 35142602
Test: runtest frameworks-net
Change-Id: Ifa291c62c0fa389b88e5561086a29dcd7cee2253
2018-01-19 19:49:16 +09:00
Victor Hsieh
dec688691d Merge "Reland: Move zygote's seccomp setup to post-fork" am: 7839672e22
am: 4249466562

Change-Id: Idbf4d7add5e41d2d01f4a3c2ff6e8f1b1735faeb
2018-01-18 01:23:32 +00:00
Victor Hsieh
c8176efe2e Reland: Move zygote's seccomp setup to post-fork
Before this change, seccomp filter setup is as early as in zygote's main
function.  To make it possible to split app and system server's filter,
this postpone the setup to after fork.  It also starts to call app
specific and system server specific setup function.

The filter setup is done in Zygote's ForkAndSpecializeCommon.  This is
because adding a seccomp filter must be done when either the caller has
CAP_SYS_ADMIN or after the PR_SET_NO_NEW_PRIVS bit is set.  Given that
setting PR_SET_NO_NEW_PRIVS breaks SELinux domain transition
(b/71859146), this must be done after Zygote forks but before
CAP_SYS_ADMIN is droppped.

Test: (cts) -m CtsSecurityTestCases -t android.security.cts.SeccompTest
Test: no selinux denial flood in dmesg with selinux enforced
Test: debuggerd -b `pidof com.android.phone`  # logcat shows tombstoned
      received crash request
Bug: 63944145
Bug: 71859146

Change-Id: I8215c8530d3d0de504a270488f8e29635805e8b0
2018-01-17 09:30:44 -08:00
David Brazdil
4bf5b7c59e Merge "Pass targetSdkVersion to installd" am: 106a915256
am: 77ba6baab5

Change-Id: Ic0b3323ee46e0bacffd62bd763da15e3256da783
2018-01-17 14:17:59 +00:00
David Brazdil
3d44ed0dfe Pass targetSdkVersion to installd
Dex2oat now accepts targetSdkVersion as a parameter to determine
whether ART should treat the app as "legacy" and allow or restrict
access to private APIs.

We also bump arguments of otapreopt to v4 to accommodate the new value.

Bug: 64382372
Test: manual
Change-Id: Iae3867325dfaf8deaba51626ab04b97ad797d3b6
2018-01-16 22:36:41 +00:00
Victor Hsieh
5e1a526cf4 Merge "Revert "Move zygote's seccomp setup to post-fork"" am: 54da93b981
am: 8fffe22ab1

Change-Id: Ic6b927ab28f75fb46f60dd77d5ae4ccf98c0b329
2018-01-10 19:57:17 +00:00
Treehugger Robot
54da93b981 Merge "Revert "Move zygote's seccomp setup to post-fork"" 2018-01-10 18:46:36 +00:00
Victor Hsieh
fe6a51fcb5 Revert "Move zygote's seccomp setup to post-fork"
This reverts commit 6a4a339832.

Reason for revert: caused some SELinux error

Bug: 71768585
Change-Id: I0ef270ec6fed1d5d96b4257ec1a2dd6a55a816ed
Merged-In: Ic1b81e146b52b68445ba634de39657f199107da3
2018-01-10 17:22:55 +00:00
Victor Hsieh
dacb02bf5a Merge "Move zygote's seccomp setup to post-fork" am: 5d33c10a96
am: b629f9e12c

Change-Id: I7d4c6b22c70955a9f594b0e55149a203df56f6fc
2018-01-09 21:58:58 +00:00
Treehugger Robot
5d33c10a96 Merge "Move zygote's seccomp setup to post-fork" 2018-01-09 21:41:19 +00:00
gaochong
0a0a49a022 Merge "Fix ResolverActivity don't show items" am: e251bb72ed
am: 7fd3a8d08b

Change-Id: Ia76b696bcd1ec5763ec3da41fae4c8c2bce9b820
2018-01-09 20:47:22 +00:00
Victor Hsieh
6a4a339832 Move zygote's seccomp setup to post-fork
Before this change, seccomp filter setup is as early as in zygote's main
function.  To make it possible to split app and system server's filter,
this postpone the setup to after fork.  It also starts to call app
specific and system server specific setup function.

In terms of performance since this happens at fork, the measure shows
the overhead is negligible.  Assuming 130 instruction in the BPF, on
walleye, even when running on little core with fixed low frequency, each
setup took about 60.9us on average.  When it runs on big core with
higher frequency, it took about 39.3us.

Test: (cts) -m CtsSecurityTestCases -t android.security.cts.SeccompTest
Bug: 63944145

Change-Id: I748735b478405098beac1e200d911c13ea60e380
Merged-In: I748735b478405098beac1e200d911c13ea60e380
2018-01-09 20:16:01 +00:00
gaochong
cbe2c55a69 Fix ResolverActivity don't show items
ResolverActivity sort the list resolved intent with AsyncTask.
The method sort hold CountDownLatch to wait the time-consuming
operation. In some case, the operation doesn't end and the
CountDownLatch can't be released.The default excutor of AsyncTask
is serial. There should release CountDownLatch in destroy()
to avoid this case.

Change-Id: Ie10126f735d9f511dfe086c21f3f5ffaeb831086
Signed-off-by: gaochong <gaochong@xiaomi.com>
Test: manual - repeatedly test ResolverActivity show correctly
Bug: 71730061
2018-01-09 14:02:23 +08:00
Lucas Dupin
555e680089 Turn default gradient into solid black
am: 12dad0c4fc

Change-Id: I6f5c702487f46395bd1930d943782d1a9b6bac5d
2018-01-06 03:34:46 +00:00
Lucas Dupin
12dad0c4fc Turn default gradient into solid black
Test: visual
Bug: 66957450
Change-Id: I6a34a35912e4dd4594565f88636ce89689d26f2f
(cherry picked from commit e7476addec)
2018-01-05 22:59:49 +00:00
Hugo Benichi
e3f872cf06 Merge "Extend connectivity OWNERS" am: 64c2488056
am: 3304263594

Change-Id: I816a15beedcfc9f200d00da7282e54992a096555
2017-12-14 03:25:36 +00:00
Hugo Benichi
959ee4a7b1 Extend connectivity OWNERS
Also remove 'build.master@android.com' which is deprecated, not
declared by anybody else, and makes the linter unhappy.

Bug: 70394432
Test: built
Merged-In: I9c0ba41386129379f82259fcc5e745562b014fae

(cherry pick from commit 626eed2ac8)

Change-Id: Ie802113d61f693d73f7234b44ac2a9bd462b3fbf
2017-12-14 09:56:56 +09:00