1633 Commits

Author SHA1 Message Date
Chris Tate
0f101342e1 Merge "Let bmgr inspect the set of whitelisted transports" into nyc-dev 2016-06-20 17:19:55 +00:00
Sudheer Shanka
bf0a9a7445 Add pm operation to set user restrictions.
Bug: 29189712
Change-Id: I6fdb3b68dfe3f51119e5ce8008880fc7d9c793df
2016-06-16 09:43:29 -07:00
Christopher Tate
e227ec61c2 Let bmgr inspect the set of whitelisted transports
Needed for compliance testing.

Bug 29072466

Change-Id: I025058ab9197f9e2db062bf0074e79f1cd04b443
2016-06-15 17:40:31 -07:00
Allen Hair
3fb03313e9 Deprecate shell-based UI Automator.
Change-Id: I15aee7a6aba551b737d2c41b4fafd5b0ced9a4b7
2016-05-24 11:10:44 -07:00
Dianne Hackborn
0c4e6a8da3 Fix issue #27532364: Security Vulnerability in IIntentSender.send
We need to make IIntentSender oneway...  but when the system is
calling that for itself, it needs to be able to return a result code.

Solution: instead of directly calling the interface, we have a new
IPC through the activity manager.  If the thing being used is the
activity manager impl, it can do the synchronous send and return
the result directly in place.  If not, you only get asynchronous
sending and thus never a failure result back (too bad for you!).

Change-Id: I4096e5b00063e8dba66230585a2dfe67e35e8092
2016-05-13 17:37:08 -07:00
Christopher Tate
27d92e4e39 Move the 'pretend idle jobs can run now' broadcast into AMS
It's a protected broadcast, so sending it directly from 'am' is
no longer an option.  This is needed for CTS as well as being
generally useful during app development.

Bug 28406044

Change-Id: I101915a8c6f19454330a8db2079a75023c112582
2016-05-06 11:25:11 -07:00
Dimitry Ivanov
3088ff85a5 zygote: Remove NativeLoader initialization step
This now done by art Runtime::Start()

Bug: http://b/28320913
Change-Id: Icf9b11954b732c9f953e02bba9ae52eb91117457
(cherry picked from commit 6a850b3f11cff546c962fc87ffc961a267973cd4)
2016-04-27 13:40:43 -07:00
Andrii Kulian
a4ab6a0683 Merge "Allow setting fullscreen stack as target via adb shell" into nyc-dev 2016-04-27 02:13:12 +00:00
Todd Kennedy
b107271813 Don't override pre-release target sdk
If a package targets a pre-release SDK [eg a letter version] it should not
be allowed to be upgraded by a release SDK [eg a number version]. If one
absolutely must upgrade to a release SDK, use the "--force-sdk" option
during install.

Bug: 28345311
Change-Id: Ic9fb209968e7c5da2c80c5ca4c0f44f5125f610a
2016-04-26 16:25:43 -07:00
Andrii Kulian
435ce5ff1c Allow setting fullscreen stack as target via adb shell
Bug: 27906038
Change-Id: Ie6feede3f7c412bc51550626a008cb0729e5e0e0
2016-04-26 00:00:01 -07:00
Todd Kennedy
47763629fe Add "do not kill" install option
Passing the "--dont-kill" argument to pm install-create can be used to
install a feature split without killing the contianing application.
Use with caution.

Bug: 27780548
Change-Id: I743ac4f640c9c4251d1b3bc70ddf428bd79e07bf
2016-04-21 15:21:20 -07:00
Kenny Guy
38dcca51a7 Add test method to remove admins.
Add test method to remove admins that declare
FLAG_TEST_APP without informing them.
The method will also remove the device and profile
owner status of the admin.

Bug: 28027468
Change-Id: Idb4d3299a9c6595c94bfb424546cd8a384131835
2016-04-19 20:10:56 +01:00
Narayan Kamath
a09b4d2a61 Remove unnecessary allocation+unboxing of objects.
Transforming String->int can be done with 0 allocations
using Integer.parseInt.

bug: 28078871
Change-Id: I8d9f322d7154728849dde61ef282046032858d60
2016-04-18 09:55:59 +01:00
Jeff Sharkey
33dd156ed0 Give users and devices control over sdcardfs.
Instead of relying only on kernel support for sdcardfs, give each
device the ability to quickly toggle between sdcardfs and FUSE.  Also
add the ability to users to explicitly enable/disable the behavior
for testing and debugging purposes.

Bug: 27991427
Change-Id: Ia57f12f6ead888ab85101004bdd8c8003537b116
2016-04-07 11:30:55 -06:00
Philip P. Moltmann
01ee1b7eb6 Allow to provide only a component name prefix to 'am instrument'
Bug: 27831862
Change-Id: I1d57e416c47fc7d9ea212f0002986932663081b8
2016-04-04 16:37:37 -07:00
Jeff Sharkey
b5e89c6deb Support direct-boot tests.
Add shell commands to check on current FBE status and system ready
status.  Mark variables without first-class locking as volatile.

Fix bug where UI automation would crash while device was locked by
marking it as forced direct-boot aware.

Bug: 26498834
Change-Id: Ib4dfb9350925e5413f93a09baacf84c62f2ba0ea
2016-04-02 19:31:19 -06:00
Fyodor Kupolov
4d709f998d Fixed arguments order for addSharedAccountsFromParentUser
Bug: 27900775
Change-Id: I8c48fabddb778bfd94333d4dcdd296fef87cb59a
2016-03-29 11:20:19 -07:00
Jeff Sharkey
bd91e2f3f6 Update PRE_BOOT_COMPLETED for FBE.
Now that CE data isn't available until after a user is unlocked, we
need to delay the PRE_BOOT_COMPLETED broadcasts.  This is done by
adding a new RUNNING_UNLOCKING user state to the UserController
lifecycle.

We now track the last fingerprint a user was logged in under, and we
dispatch PRE_BOOT receivers when that fingerprint changes.  To work
around battery pull issues, we only persist the updated fingerprint
once all PRE_BOOT receivers have finished.  This is less granular
than the original solution, but it's still correct.  We only consider
a user as "logged in" once it transitions into the RUNNING_UNLOCKED
state.

When starting a process, track if the user was "unlocked" when
started, so that we only spin up unaware providers in processes
started before user unlock.

Add generic IProgressListener to communicate PRE_BOOT progress and
strings up to lock screen.  For now, LockSettingsService just blocks
until finished, but it could display these strings in the future.

Bug: 27220885
Change-Id: I349439776b885acd32f6a578d8951ffd95640be2
2016-03-27 10:56:48 -06:00
Andriy Naborskyy
815e51d76c resolve merge conflicts of 0c7535b to nyc-dev
Change-Id: I49fa42e0d78aeaa8127cefc5cc5122cf37fce878
2016-03-24 17:14:52 -07:00
Andriy Naborskyy
39218ba26d bootanimation: implement split packaging of animation
Animation package zip can be separated into OEM and SYSTEM
OEM desc.txt can use new command "$SYSTEM" to invoke animation
from SYSTEM package

Changes to animation structure:
1. animation can refer other animation
2. animation contains zip file reference
3. BootAnimation has name of root of animation Zip; processing desc.txt we
need filename of container zip and we can't access it from ZipFileRO instance

movie() changes:
1. Split movie() into loading Zip and playing part
2. load parses desc.txt and if needed referred Zip
3. play can descend animations tree

Change-Id: I600d02c84d537df7b3e32a84f84a294b26e319e0
Signed-off-by: Andriy Naborskyy <andriyn@google.com>
2016-03-22 20:18:11 -07:00
Wale Ogunwale
e75a9adfbd Added support to specify animation duration when resizing stack
Needed for sys-ui to control the duration of various Pip transitions.

Bug: 27674339
Change-Id: I7bad27aaa19755a73c594e88b88b56db033e1a45
2016-03-21 11:17:19 -07:00
Dimitry Ivanov
bf1082e9a1 Renamed the function initialing nativeloader
Bug: http://b/27546414
Change-Id: Ia0b65540772ca4bd1cdab391973325b18cd278a0
2016-03-16 14:15:11 -07:00
Prathmesh Prabhu
bf89ae53c3 screencap: Nix deprecated direct read of framebuffer.
screencap command had a fallback path that tried to read the framebuffer
directly. This is no longer supported (and is blocked by selinux
policy), so delete said path.

BUG:27598623
Change-Id: I1b002d4a68ad93f75b150029d01b5f0c500be56c
2016-03-10 15:23:34 -08:00
Damien Bargiacchi
4259500ff2 Merge "Draw a clock on top of the Android boot animation" into nyc-dev 2016-03-08 00:44:35 +00:00
Damien Bargiacchi
a704b7d344 Draw a clock on top of the Android boot animation
Don't draw on top of vendor specific animations/logos since we can't
make it look good.

Bug: 27209004
Change-Id: If4791b861ff476c23b37787ba896a3ef8d9df4fd
2016-03-07 16:15:31 -08:00
Jeff Sharkey
d5896630f6 Move more PM calls to ParceledListSlice.
Since the data returned by these calls can grow unbounded based on
various GET flags, we need to switch 'em over.

Bug: 27391893
Change-Id: Ie849ca30dbaaa91158da4c83675657715629a0ee
2016-03-04 16:31:34 -07:00
Nick Kralevich
bb8b4814df Am.java: Use write-only file descriptors
Use write only file descriptors for am commands. Having read-write
file descriptors isn't needed, and not all SELinux app domains have
read access to /data/local/tmp file descriptors.

Addresses the following denial:

  avc: denied { read } for path="/data/local/tmp/foo" dev="dm-2"
  ino=654084 scontext=u:r:system_app:s0
  tcontext=u:object_r:shell_data_file:s0 tclass=file permissive=0

Steps to reproduce:

  adb shell ps | grep settings
  adb shell am dumpheap PID_FROM_ABOVE /data/local/tmp/settings.hat

Expected:
1) command works

Actual:
1) SELinux denial and no settings.hat output.

Bug: 27472701
Change-Id: Id8df0c5a41046b405444e14c70075c986d9936c3
2016-03-03 15:24:29 -08:00
Dianne Hackborn
4a18c26609 Fix issue #27385109: control activity behavior without triggering...
...isUserAMonkey for testing purpose

Add an argument for the caller to specify if they are a poo flinging
monkey.

Change-Id: I0e149a8d78776abaf07517bd4ae886047b7f4252
2016-02-29 12:37:11 -08:00
Nicolas Geoffray
573895bbea Fix ASAN builds after app_process change.
Bug:27245894

Change-Id: Ie2fc1edcbd874e8ad3b932f8e24ef38c9817b2cd
2016-02-26 13:23:40 +00:00
Dimitry Ivanov
b0824979be zygote to preload public native libraries
Preload public native libraries when starting a zygote
This lets other users of libnativeloader (like dex2oat)
avoid unnecessary cold loads of libandroid.so which could
take up to a second.

Bug: http://b/27245894
Change-Id: I1499a7485c186b185fce8a1f8d05afcd579d59cc
2016-02-26 10:00:27 +00:00
Alex Klyubin
88b42855c9 Only debuggable packages can be downgraded.
This reflects the change in PackageManager service:
frameworks/base commit 921dd754ab49df0cd580ff96503f7616c4c85f4a.

Bug: 27327503
Change-Id: Ic13788a3850c4d1a3a566b208853de9a6d2c5237
2016-02-24 16:52:01 -08:00
Aurimas Liutikas
1c8cbb5440 Fix a set of random warnings in frameworks/base/
Bug: 26936282
Change-Id: Ic411d7a1673503d5945f952ebf5a8be964bb54a4
2016-02-19 13:44:25 -08:00
Wale Ogunwale
06e8ee0c8a Added AM API to remove a stack
Use the new API when closing Pip.

Bug: 26982752
Change-Id: I074d23b5535a4534626183ab77142d3932a803f0
2016-02-16 10:09:51 -08:00
Jeff Sharkey
115d2c189a Add feature versions for devices and apps.
We're starting to see more instances of device features that will
increment separately from the SDK API level, such as camera HAL,
GPU capabilities, Bluetooth, and other hardware standards.

This change adds the ability for device features to specify a
version, which is defined to be backwards compatible.  That is, apps
requesting an older version of a feature must continue working on
devices with a newer version of that same feature.

When a version is undefined, we assume the default version "0".

Bug: 27162500
Change-Id: If890bf3f3dbb715e8feb80e7059a0d65618482ea
2016-02-15 17:45:42 -07:00
Sergey Poromov
10f0f71249 Update bmgr tool.
Add support to QUOTA_EXCEEDED error output.
Command "backupnow --all" without parameters now starts backup of all eligible packages.

Change-Id: I563be35d575346d3dfb45a6dd254b387053c7ab7
(cherry picked from commit d5d68528bc7a7c1edb4691b5a40e37955128e73b)
2016-02-10 00:08:02 +00:00
Paul Crowley
faeb3eb0ba Password security for FBE disk encryption keys
Add the means to protect FBE keys with a combination of an auth token
from Gatekeeper, and a hash of the password. Both of these must be
passed to unlock_user_key. Keys are created unprotected, and
change_user_key changes the way they are protected.

Bug: 22950892
Change-Id: Ie13bc6f82059ce941b0e664a5b60355e52b45f30
2016-02-08 15:58:29 +00:00
Tamas Berghammer
25222f55f2 Merge "Add flag to "am start" to enable native debugging" 2016-02-06 13:18:58 +00:00
Filip Gruszczynski
c17d8b79af Infrastructure for animating of maximizing pip activity.
Bug: 25672053
Change-Id: Ie8a83c626680e01ff7115f40731ab9e6c13769c0
2016-02-04 09:01:05 -08:00
Filip Gruszczynski
debd9a5ed5 Allow specifying stack when starting activity in AM command.
Change-Id: I42032bdebf16b6cd2c0c87fd9aa5c261bc9fe25d
2016-02-02 16:27:18 -08:00
Tamas Berghammer
df6cb28293 Add flag to "am start" to enable native debugging
Specifying the new flag will enable several features in the runtime
required by the native debugger to debug Java and C++ code at the same
time.

The enabled features:
* Force JIT (never use the interpreter)
* Debug info generation
* Disbale some optimizations

Change-Id: Iaf5ab649715a0c274bd1b0fc64e483705da53cd0
2016-02-01 13:49:32 +00:00
Wale Ogunwale
b1faf60b89 Use resizeMode integer instead of resizeable boolean.
Changes activity manager and window manager to use resizeMode
as defined by ActivityInfo#resizeMode instead of a boolean.

Bug: 26774816
Change-Id: I8cef46d9fba6bfdd21df7da63ed5d5330ad03d4b
2016-01-29 07:44:33 -08:00
Filip Gruszczynski
84fa3351a2 Animate pinned stack resizing.
This introduces animating of stack bounds within window manager
module. It also uses this type of animation when moving an activity from
fullscreen stack to pinned stack.

Bug: 25672053
Change-Id: I75914a685d10021f8a7535b47ef12b6920b3fd5e
2016-01-28 08:47:54 -08:00
Alan Treadway
afad878369 Add explicit and persistent user provisioning state.
Add explicit modelling of provisioning state so that integration
of management provisioning flows with packages such as setup-wizard
are cleaner, and can be more direct. Previously we relied upon
USER_SETUP_COMPLETE secure setting and HOME intents to signal intent,
but this is not very clear and can be fragile.

Bug: 25858670
Change-Id: Idc56a040f710c3aee281db420f21717da3960722
2016-01-25 15:46:30 +00:00
Sergey Poromov
b998532be8 Update bmgr cmd line tool to use requestBackup() API in BackupManager
The new command works as "bmgr backupnow [list of packages]"
This change should be submitted after ag/834173

Change-Id: Ie1cdd18a38653dd71a1d499620dd2afec3cbbb24
2016-01-22 13:15:06 +01:00
Tony Mak
6390bd8d69 Telecom shell command accepts userhandle as argument of phone account
We need a sort of way to enable phone account in managed profile for
writing cts running in managed profile.

Change-Id: I2e869e792c6e145c93a314f64a5de98e2f6e315f
2016-01-19 19:32:18 +00:00
Michal Karpinski
3da5c97460 Adjusting AMN#requestBugReport() to be able to invoke 3 types
of bugreport services

ActivityManagerNative#requestBugReport() now can accept 3 types:
FULL, INTERACTIVE AND REMOTE.

Bug: 26152603
Change-Id: Ife9bbef4691e172fb56b72b256880f0d4ad4d198
2016-01-08 17:50:16 +00:00
Jorim Jaggi
52641bc309 Add am command for CTS tests for resizedDockedStack (1/2)
Bug: 25015474
Bug: 26311778
Change-Id: Ia2b1f8ffc5c777d8199409041090a0106503c2e4
2016-01-05 13:50:10 +01:00
Todd Kennedy
8d9366cfe9 Remove 2nd line from failure
In an attempt to provide more detailed information to the end-user, we
caused tests to fail [they parse the output of the 'pm' command]. Remove
the 2nd line of the output that was causing the failure.

Also took the opportunity to merge changes from the Pm command to the
Cmd command.

Bug: 26131598
Change-Id: I459f9ec8978d87dd571136222f780039e426474e
2015-12-16 13:47:14 -08:00
Todd Kennedy
1fd413f637 Merge "Temporarily stop proxying to cmd" 2015-12-08 17:07:15 +00:00
Lenka Trochtova
c4dd021322 Introduce ephemeral users.
BUG: 24883058

Change-Id: I2e1d6aa184142c2a3dc0415c0cd407573453cf41
2015-12-08 15:47:10 +01:00