1585 Commits

Author SHA1 Message Date
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
Todd Kennedy
9619d049bf Temporarily stop proxying to cmd
Unless the APK is streamed, proxying pm install commands to the cmd command
will generally not work on any system that has SElinux enforcement. This
is due to the system sever [where cmd commands are run] not having access
to the directories where files are uploaded to. We'll re-enable the proxy
once we determine an appropriate, safe location for uploaded APKs.

Bug: 25769800
Change-Id: I73b2da0b03fe8bd9ce29e20b37cb4eeff9b491b4
2015-12-07 13:26:08 -08:00
Fyodor Kupolov
a9d492d7ff Merge "Allow --user current in dpm command" 2015-12-07 18:38:04 +00:00
Felipe Leme
21d4b20f23 Merge "Changed ActivityManager.requestBugreport() to take a 'progress' parameter." 2015-12-07 18:02:40 +00:00
Todd Kennedy
c72b3101ee Merge "Add ephemeral installs" 2015-12-07 15:33:05 +00:00
Felipe Leme
4cc863338d Changed ActivityManager.requestBugreport() to take a 'progress' parameter.
When progress is set to 'true', it calls the new, enhanced
'bugreportplus' service, while when 'false' it calls the regular
'bugreport' service.

'bugreportplus' is more user-friendly (it shows a system notification
with the progress, allow user to cancel, etc...), at the cost of
consuming more resources. As such, the "Take Bug Report" UI will be
changed to offer the user a combo with these 2 options, but for now it's
always going to be 'bugreportplus'

BUG: 26034608
Change-Id: I21a6b5b092a85614e91d523b8f4df1fb00e49b3b
2015-12-05 10:30:18 -08:00
Fyodor Kupolov
6bccb76a64 Allow --user current in dpm command
dpm command now accepts current user as an argument.

Bug: 25974105
Change-Id: I5335a2fc2159f9574e319697dcf5e0485233d8f2
2015-12-04 14:28:46 -08:00
Todd Kennedy
2699f06555 Add ephemeral installs
* Add a new --ephemeral argument to 'adb install'
* Add plumbing to internally track ephemeralness
* Create new app directory for ephemeral installs

Bug: 25119046
Change-Id: I1d379f5ccd42e9444c9051eef2d025a37bd824fe
2015-12-03 14:47:01 -08:00
Fyodor Kupolov
633e837db6 Merge "Allow current user in settings command" 2015-12-03 00:57:51 +00:00
Fyodor Kupolov
9571b3365b Allow current user in settings command
settings command now accepts current user as an argument.

Bug: 25950700
Change-Id: Ia0cee8e956efe7bc341d87e5a7c7ec57678313bc
2015-12-02 16:29:05 -08:00
Fyodor Kupolov
9cbfc9e212 Added DISALLOW_RUN_IN_BACKGROUND user restriction
It forces the user to stop instead of going into the background. Also
changed behavior of stopUser method. Now it also attempts to stop related
users along with the specified userId.

Based on ag/807976, with the only difference that it's now a user restriction.

Bug: 24579258
Bug: 24708668
Change-Id: I357298908816fc58feeed83b7e9979fc33d25da6
2015-12-02 10:22:23 -08:00
Dianne Hackborn
b9e2803384 Merge "Move appops command to the service." 2015-11-19 18:47:53 +00:00
Jeff Sharkey
ba51235ef5 More file-based encryption work.
Add new "am unlock-user" command so we can trigger changes from the
command line.

Move FBE check to static method so it can safely be called early
during boot before the mount service is ready.  Move FBE emulation
to persisted system property, and start reading/writing that value.

Change default permission grants to ignore current encryption-aware
flags, since many of the target apps aren't crypto aware.

Always prepare package data directories, which is how we create the
new "user_de" paths during boot.

Bug: 22358539
Change-Id: I6f58ea2d34b3a466d3775d614f8a13de92272621
2015-11-19 11:02:30 -07:00
Dianne Hackborn
268e4e3d00 Move appops command to the service.
The "appops" shell command is now just a wrapper around doing
"cmd appops", no more need to launch a Java VM!

Change-Id: I06fc68762d0ab95a016fb24db0affb0d91197588
2015-11-18 16:29:56 -08:00
Xiaohui Chen
60c2e34543 cmds: fix settings command help msg
There is a missing white space.

Change-Id: I7e7f4783464a7be02a3b2e1a30a629ed1ebdc913
2015-11-18 14:10:42 -08:00
Dianne Hackborn
354c3bc394 Merge "Some debugging improvements." 2015-11-17 00:41:07 +00:00
Dianne Hackborn
3cdb56efea Some debugging improvements.
- Fix dumping of package manager intent filters so the option
  to print the filter detail works again.
- Extend dump resolvers to allow you to specify the specific
  types of resolvers you'd like to dump.
- Add new package manager commands for querying activities,
  services, receivers.
- Move the code for parsing a command line into an intent to
  the framework, so it can be used by the new package manager
  commands and later elsewhere.

Change-Id: I56ea2bb8c3dd0e5198ee333be8f41ad9dcdb626f
2015-11-11 12:45:44 -08:00
Jeff Sharkey
f9fc6d6cc0 More file-based encryption work.
Add granular StorageManager APIs for key creation/destruction and
unlocking/locking.  Start passing through an opaque token as part
of the unlock command, but leave it empty for now.  We now have a
separate "prepare" method that sanity checks that user directories
are correctly setup.

Define a handful of system properties used for marking devices that
should be operating in FBE mode, and if they're emulating FBE.  Wire
a command to "sm", but persisting will come later.

Start using new "encryptionAware" flag on apps previously marked with
coreApp flag, which were apps running in the legacy CryptKeeper
model.  Small tweaks to handle non-encryptionAware voice interaction
services.  Switch PackageManager to consult StorageManager about the
unlocked state of a user.

Bug: 22358539
Change-Id: Ic2865f9b81c10ea39369c441422f7427a3c3c3d6
2015-11-11 10:47:23 -08:00
Todd Kennedy
72cfcd02b8 Move 'un/install' to cmd
Move the implementation of the install variants and uninstall to the cmd
command. Additionally, make two other important changes: 1) replace calls
to the legacy PackageManager#installPackageAsUser with the PackageInstaller
2) allow streaming package bits for 'pm install'

Change-Id: I5680f57208d377daadb69b2cc09c233c02fe5016
2015-11-09 15:07:18 -08:00
Todd Kennedy
18bc3305e4 Revert "Move 'un/install' to cmd"
This reverts commit ec059d839de6d061085dcfd85ce6565dcf4d5b69.

Change-Id: Ieaa1373e96fb4cc20aa41c3159518bd9e86c572b
2015-11-09 15:36:43 +00:00
Todd Kennedy
ec059d839d Move 'un/install' to cmd
Move the implementation of the install variants and uninstall to the cmd
command. Additionally, make two other important changes: 1) replace calls
to the legacy PackageManager#installPackageAsUser with the PackageInstaller
2) allow streaming package bits for 'pm install'

Change-Id: Ia49dac0ccd6470f9d1c1964bdeb3c0b22b856075
2015-11-06 09:27:22 -08:00
Dan Albert
0881a7445f Use std::unique_ptr instead of UniquePtr.
We're deprecating UniquePtr, so we need to move to the real thing.

Bug: http://b/22403888
Change-Id: I5b7fdf4924dd8c12a8c7dba89278714ca6fdc60a
(cherry picked from commit b0624da1181276ff4caa5e57a7a4abf766902e3e)
2015-11-05 13:03:26 -08:00
Brian Carlstrom
ce8bf86d6d Merge "Fixes for sm and pm usage" am: ffb15da518 am: 671d5965f7
am: f73e78fe1c

* commit 'f73e78fe1cb6803a29f7f85b49792f4e8a7350c8':
  Fixes for sm and pm usage
2015-11-05 18:55:49 +00:00
Brian Carlstrom
ffb15da518 Merge "Fixes for sm and pm usage" 2015-11-05 18:38:56 +00:00
Brian Carlstrom
82bfca4609 Fixes for sm and pm usage
sm showed IllegalArgumentException after usage.
pm inconsistently used "return showUsage()"

Bug: 20948199
Change-Id: I5828489a9d4ef2eabfb97dd408d66e1560a5a983
2015-11-05 10:33:40 -08:00
Todd Kennedy
60459abb21 Implement shell commands for package and user services
Only implement the 'list' package service command. More will follow
in future CLs.

Change-Id: Iae225cd4ee63c7d468a4fd882d8cb4b6b76ccc09
2015-11-02 16:19:50 -08:00
Wale Ogunwale
3797c22ea1 Added StackId object for checking what features a stack supports
Helps make the code easier to follow since we are no longer checking
multiple stack ids at various decision points.

Bug: 25282299
Change-Id: Ifa6864a1ef56ce2eca4c94f87a4e0b993de987cd
2015-11-02 11:32:42 -08:00
Xiaohui Chen
6f02b865df Merge "clean up USER_OWNER in Pm command" 2015-10-27 18:43:22 +00:00
Wale Ogunwale
079a0044a3 API for moving top activity in a stack to pinned stack.
* AMS.moveTopStackActivityToPinnedStack can be used to move the top
activity in a stack to the pinned stack and also specify the bounds
the pinned stack should be sized to.
* 'am stack move-top-activity-to-pinned-stack' command for testing
AMS.moveTopStackActivityToPinnedStack API

Bug: 25006507
Change-Id: I8392b4c39d8542153e691be7a627b7f35fd44884
2015-10-26 12:07:00 -07:00
Xiaohui Chen
f5bf0de1aa clean up USER_OWNER in Pm command
Change-Id: I3092cdf1ca619b4c1ba881955b8a55b97ba10e24
2015-10-26 10:45:15 -07:00
Elliott Hughes
46a114dfcf Merge "Fix lseek argument order." am: 12dccb8a24 am: 9bbe41642a
am: 2876b1f169

* commit '2876b1f169e5342e46b27f3f94a8816837c9f61a':
  Fix lseek argument order.
2015-10-20 23:51:55 +00:00
Elliott Hughes
9bbe41642a Merge "Fix lseek argument order."
am: 12dccb8a24

* commit '12dccb8a2450152102b32bf4882200f6b08a5a5a':
  Fix lseek argument order.
2015-10-20 20:35:44 +00:00
Elliott Hughes
70bef1c4bd Fix lseek argument order.
Change-Id: Ibc2f98e4c26d0ac6ac7b4a73775c5213c4df4518
2015-10-20 13:23:18 -07:00
Pablo Ceballos
63afb86381 Merge "Remove GLTrace support" 2015-10-19 17:55:59 +00:00
Brian Carlstrom
80435a7fcd am bd5b6252: am b9a28ae1: am f916524f: Merge "Add support for --user to "pm path" for work profile use"
* commit 'bd5b6252a5dd068c2db30fbbd16e87a656047197':
  Add support for --user to "pm path" for work profile use
2015-10-15 16:16:07 +00:00
Brian Carlstrom
b9a28ae199 am f916524f: Merge "Add support for --user to "pm path" for work profile use"
* commit 'f916524f44c9955e7c747e5319d17c46a61a3c4c':
  Add support for --user to "pm path" for work profile use
2015-10-15 16:02:57 +00:00
Brian Carlstrom
f916524f44 Merge "Add support for --user to "pm path" for work profile use" 2015-10-15 15:55:45 +00:00
Wale Ogunwale
5247523c90 Merge "Don't set incorrect stack bounds when rotating screen in docked mode" 2015-10-13 01:58:05 +00:00
Wale Ogunwale
ffc11bb712 Don't set incorrect stack bounds when rotating screen in docked mode
Both window manager and activity manager could decide what the bounds
of other stacks should be when the docked stack exist which can get
out of sync. Now window manager does the bounds calculation and
activity manager asks window manager what the bounds should be when
it needs to resize the stack.

Bug: 24738105
Change-Id: I97356f008b676d2f58a8b54fdb08735ab51394af
2015-10-12 18:56:28 -07:00
Adam Lesinski
f5e18154b0 am b8f8ca51: am 651cb804: am fe1934e4: Merge "RRO: idmap: allow flock(2) to block"
* commit 'b8f8ca5139e3268c7447565940b63a543ebe9ed5':
  RRO: idmap: allow flock(2) to block
2015-10-13 01:24:48 +00:00
Adam Lesinski
81892b095b am 41bf75c6: am 287cd2d1: am bac309ca: Merge "RRO: idmap: fix sorting of overlays.list"
* commit '41bf75c606fa19b473bc87145f766757525ae96c':
  RRO: idmap: fix sorting of overlays.list
2015-10-13 01:24:38 +00:00
Adam Lesinski
45f704a4d0 am 89eaa06a: am 6382a950: am 2327239d: Merge "Handle \'root\' pseudo-package in the appops command"
* commit '89eaa06a10ed399ae9919de2795f76c2af932adc':
  Handle 'root' pseudo-package in the appops command
2015-10-13 01:24:29 +00:00
Adam Lesinski
4ffea4e4da am d0c806b1: am 6029dfa8: am 7caa8f14: Merge "Make \'idmap --scan\' accept more than one input directory"
* commit 'd0c806b10c8e45dcfa950adc36742b15edababea':
  Make 'idmap --scan' accept more than one input directory
2015-10-13 01:24:16 +00:00
Adam Lesinski
651cb804b1 am fe1934e4: Merge "RRO: idmap: allow flock(2) to block"
* commit 'fe1934e470681ff7ec5b8ec0609ae9fe24bd7282':
  RRO: idmap: allow flock(2) to block
2015-10-12 19:34:43 +00:00
Adam Lesinski
287cd2d1e4 am bac309ca: Merge "RRO: idmap: fix sorting of overlays.list"
* commit 'bac309ca8f4ecd1a835aa36f4be2a1fa45577eab':
  RRO: idmap: fix sorting of overlays.list
2015-10-12 19:34:37 +00:00
Adam Lesinski
6382a950cd am 2327239d: Merge "Handle \'root\' pseudo-package in the appops command"
* commit '2327239d65525d8ba2bdbedd6e59809fef447a12':
  Handle 'root' pseudo-package in the appops command
2015-10-12 19:34:28 +00:00
Adam Lesinski
fe1934e470 Merge "RRO: idmap: allow flock(2) to block" 2015-10-12 19:30:23 +00:00
Adam Lesinski
bac309ca8f Merge "RRO: idmap: fix sorting of overlays.list" 2015-10-12 19:29:39 +00:00
Adam Lesinski
2327239d65 Merge "Handle 'root' pseudo-package in the appops command" 2015-10-12 19:29:14 +00:00