1306 Commits

Author SHA1 Message Date
Dmitriy Ivanov
7f05e9118b am d1e735ef: am ed583f5e: Merge "Link sigchain to main executable"
* commit 'd1e735ef547c1720aa5bb56a446afbb7a8652599':
  Link sigchain to main executable
2014-10-14 18:21:49 +00:00
Dmitriy Ivanov
26d75a9e00 am d1e735ef: am ed583f5e: Merge "Link sigchain to main executable"
* commit 'd1e735ef547c1720aa5bb56a446afbb7a8652599':
  Link sigchain to main executable
2014-10-14 18:21:31 +00:00
Dianne Hackborn
5457d5ccb6 am 8f6928f1: am e61e68d0: am 18d2d51e: am 7ea69880: Merge "Improve some docs, fix some debugging." into lmp-dev
* commit '8f6928f1399620ce432b82d046912e2030d6511c':
  Improve some docs, fix some debugging.
2014-10-10 21:06:48 +00:00
Dianne Hackborn
4ee6658e19 am 7ea69880: Merge "Improve some docs, fix some debugging." into lmp-dev
* commit '7ea69880bdbf2c51140460dcfd063dc015c3ce26':
  Improve some docs, fix some debugging.
2014-10-10 14:34:41 +00:00
Mike Lockwood
253ad526c1 am 500913ee: am cf1e5c39: am cf61b3f6: am 3910f53c: Merge "bootanimation: Tweak parameters for pcm_open for playing boot sounds." into lmp-dev
* commit '500913ee002eb8a6a418732f3a6d7549ac046eaf':
  bootanimation: Tweak parameters for pcm_open for playing boot sounds.
2014-10-10 04:26:55 +00:00
Dianne Hackborn
ab4a81b3c6 Improve some docs, fix some debugging.
- Add docs to Binder, Messenger, ResultReceier to explain their
  relation (or lack there-of) to process lifecycle.
- Clarify some aspects of process lifecycle for services.
- Fix help text of am command.
- Fix per-package dumping of battery stats to not include history.
- Fix per-package dumping of proc stats to only include aggregated
  and current stats and fix some formatting.
- Fix per-process dumping of meminfo to have an option to interpret
  the input as a package, so including all processes that are
  running code of that package.
- Fix top-level per-package debug output to correctly include all
  of these improvements and give them a little more time (10s) to
  complete for timing out.

Change-Id: I2a04c0f862bd47b08329443d722345a13ad9b6e2
2014-10-09 18:21:59 -07:00
Dmitriy Ivanov
96e0cfa721 Link sigchain to main executable
Also export necessary symbols to preempt calls from
 libart.so

Bug: 15345057
Bug: 15426766
Change-Id: If0b7f59a59824e30aa0c33dad76c7a44932180de
2014-10-09 15:03:07 -07:00
Mike Lockwood
22466960ee am 3910f53c: Merge "bootanimation: Tweak parameters for pcm_open for playing boot sounds." into lmp-dev
* commit '3910f53c5ebccbe64ab768591dc7c377f1eb0153':
  bootanimation: Tweak parameters for pcm_open for playing boot sounds.
2014-10-08 22:49:14 +00:00
Mike Lockwood
28138587ef bootanimation: Tweak parameters for pcm_open for playing boot sounds.
Set start_threshold and avail_min to 1/4th period size and stop_threshold to INT_MAX

Change-Id: I0a3aac18533709daa86a024cdd6a32086410723a
2014-10-07 14:47:26 -07:00
Mike Lockwood
73c35e27d3 am 66c009eb: am bb68c263: am 3df6b76c: am 56b7d562: Merge "Add support for playing audio during bootanimation" into lmp-dev
* commit '66c009ebfe5b31aa1f176d4856d95f5daad6079d':
  Add support for playing audio during bootanimation
2014-10-07 00:13:18 +00:00
Mike Lockwood
e4e5780420 am 56b7d562: Merge "Add support for playing audio during bootanimation" into lmp-dev
* commit '56b7d562af4dd0e7bd04163fe9a86a801fcff1fe':
  Add support for playing audio during bootanimation
2014-10-06 22:34:27 +00:00
Mike Lockwood
ebf9a0d8a8 Add support for playing audio during bootanimation
The bootanimation daemon will play 16 bit WAV files contained in bootanimation.zip
For this to work, the bootanimation.zip must contain an audio_conf.txt file,
which contains parameters to be used for the tinyalsa pcm_open call
as well as mixer parameters to set before attempting to play the sound.

If the bootanimation finds an audio_conf.txt file, then it will look for a file named
"audio.wav" in each of the part subdirectories. If audio.wav is found, it will play that
WAV file starting at the beginning of that part.

The code for this is based on the tinyplay utility in tinyalsa.

The audio_conf.txt and must begin with the following header:

card=<ALSA card number>
device=<ALSA device number>
period_size=<period size>
period_count=<period count>

This header is followed by zero or more mixer settings, each with the format:
mixer "<name>" = <value list>
Since mixer names can contain spaces, the name must be enclosed in double quotes.
The values in the value list can be integers, booleans (represented by 0 or 1)
or strings for enum values.

Finally I should mention that this change is not the right approach.
Instead of going straight to ALSA we should be using the mediaserver instead.
But mediaserver isn't ready in time due to interactions with the system server, and there
isn't time to fix this for the current release. We need to fix that for the next one.

Bug: 17674304

Change-Id: Ic391ade61c941d0a24f4d64fe005ac9375a23fa9
2014-10-03 15:38:15 -07:00
Alexandra Gherghina
58499d61f8 am 8292b033: am a266670a: am d7275ae2: am 75c33d9d: Merge "Adds the ability to start a user in background" into lmp-dev
* commit '8292b0331e21af8786791067e92009e949448f3f':
  Adds the ability to start a user in background
2014-10-01 17:09:34 +00:00
Alexandra Gherghina
671d26e909 am 75c33d9d: Merge "Adds the ability to start a user in background" into lmp-dev
* commit '75c33d9d04d8c0a9884a70077681261b57c7833c':
  Adds the ability to start a user in background
2014-09-30 17:04:00 +00:00
Alexandra Gherghina
979e40e9ba Adds the ability to start a user in background
Bug: 15900074
Change-Id: I03b278f8e7a4618ea56a5f1935cfba34beb45981
2014-09-29 12:35:03 +00:00
Jesse Hall
66474027c2 am f295b675: am 9a2eafc1: am 12297705: am 7fa90f6a: Merge "bootanimation: allow animation to specify background color" into lmp-dev
* commit 'f295b675239892c8637d3ad48777226314be2de1':
  bootanimation: allow animation to specify background color
2014-09-26 05:04:11 +00:00
Jesse Hall
9b80323a7a am 7fa90f6a: Merge "bootanimation: allow animation to specify background color" into lmp-dev
* commit '7fa90f6ae5c04d96b3210a45898d1e7a8f5ef8e6':
  bootanimation: allow animation to specify background color
2014-09-26 01:51:01 +00:00
RoboErik
00bbe915de am 5e8f023d: am a59c7f03: am dff59b8b: am 23df1c46: Merge "Allow null queues to be set in MediaSession" into lmp-dev
* commit '5e8f023dc17788a18bc5640a42baaf2bec609745':
  Allow null queues to be set in MediaSession
2014-09-26 00:23:43 +00:00
Jesse Hall
083b84cf88 bootanimation: allow animation to specify background color
Some OEMs want to have a bootanimation (or parts of it) displayed on a
color other than black. They currently just use full-screen frames for
that, which wastes lots of memory and bandwidth. This change allows
each part of the animation to specify a background color that will be
applied outside of the frame images; if unspecified the background
will be black as it is now.

Bug: 16635599
Change-Id: Ibf008fc75c5aad891c86ba9e4ec0879b7a61b8bd
2014-09-25 23:37:12 +00:00
RoboErik
96900279f5 am 23df1c46: Merge "Allow null queues to be set in MediaSession" into lmp-dev
* commit '23df1c46b768bb2a1363b6f671b0d0c4879538b7':
  Allow null queues to be set in MediaSession
2014-09-25 18:46:09 +00:00
RoboErik
03fce072ca Allow null queues to be set in MediaSession
Also add some test code for it to OneMedia.

bug:17593962
Change-Id: I074e2bb0329d9a97f623e4309bb7dada157b8324
2014-09-24 14:35:32 -07:00
Marco Nelissen
dfc44eab3e am c840e31d: am fa436298: Merge "Broadcast an intent to mediascanner after executing screencap"
* commit 'c840e31d0ee772373b1be7469b7bfbe28715d52e':
  Broadcast an intent to mediascanner after executing screencap
2014-09-22 14:57:14 +00:00
Marco Nelissen
f8820f3f53 am c840e31d: am fa436298: Merge "Broadcast an intent to mediascanner after executing screencap"
* commit 'c840e31d0ee772373b1be7469b7bfbe28715d52e':
  Broadcast an intent to mediascanner after executing screencap
2014-09-22 14:56:30 +00:00
Marco Nelissen
fa4362982c Merge "Broadcast an intent to mediascanner after executing screencap" 2014-09-22 14:34:03 +00:00
Esteban Talavera
c5bf65aa96 Merge "Make dpm command output more test friendly" into lmp-dev 2014-09-18 18:15:49 +00:00
Esteban Talavera
c48bca50fa Make dpm command output more test friendly
Added 'Success' at the beginning of the command output every time
it didn't fail, so that we can easily check the output in tests.
The command is brand new, only used by us on CTS tests, so this
shouldn't break anybody.

Bug: 17312478
Change-Id: Ie67bf5b2f44e658e7009e5bd87f8cb81be515584
2014-09-18 18:32:45 +01:00
Dianne Hackborn
88924b62fc Merge "Fix issue #17536024: The am start's wait option doesn't..." into lmp-dev 2014-09-17 23:07:17 +00:00
Dianne Hackborn
6cfbb71890 Fix issue #17536024: The am start's wait option doesn't...
...give time in some cases

This switch to multiple stacks broke the check to determine if it
should actually wait for a new activity to be shown.  The new check
now also requires that the top activity be resumed, which means
we may get some false positives where we decide to wait and shouldn't,
but that is better than consistently not deciding to wait in some
cases when we should.  (And we will always finish waiting then next
time something becomes visible).

Also add another time, which is how long it took from the startActivity
call to return with the result.  And fix when we decide to report that
we are done so that, in the case where we are bringing an existing
activity to the foreground, we don't wait until its animation is complete.

Change-Id: Id38ca0070f04e7bf8c73e131fb055808553a0e2f
2014-09-17 12:47:35 -07:00
Esteban Talavera
41de9bb6fd Add 'adb dpm' subcommand to set profile owner
Required for GTS tests. Needed to relax the restriction that
only root user can run 'pm create-user' as GTS tests can't
get root permissions.

Bug: 17312478
Change-Id: I1841286ddf51756c73018c087a5f29afeb5b9f15
2014-09-16 10:24:58 +01:00
Jeff Sharkey
8246e815ac Merge "Whoops, wait around for pm result." into lmp-dev 2014-09-15 22:55:53 +00:00
Jeff Sharkey
5ab6e0bac2 Whoops, wait around for pm result.
poll() returns immediately; we want to take() to wait for the result
to actually arrive.

Bug: 17510699
Change-Id: I87669e79e9941480fed33e4cc8a38de793d59e90
2014-09-15 14:50:41 -07:00
Esteban Talavera
9c17388cff Set device admin on dpm set-device-owner command
Bug: 17312478
Change-Id: I4ef730a97d603352eda77f04a2b00fa97c2be662
2014-09-15 11:42:34 +01:00
Jeff Sharkey
71ac935526 Merge "Bring install and install-multiple into parity." into lmp-dev 2014-09-12 18:16:52 +00:00
Esteban Talavera
d09fbafa92 Merge "Add new adb dpm (= DevicePolicyManager) command" into lmp-dev 2014-09-12 10:35:44 +00:00
Esteban Talavera
b5ef162129 Add new adb dpm (= DevicePolicyManager) command
Adds new adb command to execute DevicePolicyManager tasks. First subcommand
allows us to set a device owner on a provisioned device (provided no accounts
are associated with the device). This is required as GTS tests run on provisioned
devices. We plan to add more subcomands required for new GTS tests, such as the
ability to create a managed profile.

Bug: 17312478, 17316711
Change-Id: I2613178ea82a6c6268e7f8012e74c4a852fea0d4
2014-09-12 11:33:59 +01:00
Jeff Sharkey
e980804df1 Bring install and install-multiple into parity.
This ensures that both are using (almost) identical logic when
deciding what installs to proceed with.  Installs from "pm" for all
users now run as OWNER, and rely solely on INSTALL_ALL_USERS to
express intent.  This keeps install session notifications simple.

Since installer UID can vary from installer package name, start
persisting the UID.  Also parse some missing flags for install
sessions.

Bug: 17469392
Change-Id: I6d89b1a787aa2024cc4bebf6b9c29317c358e147
2014-09-11 21:24:00 -07:00
Jeff Brown
c46cd62b5c Merge "Clean entire arg block when setting process name." into lmp-dev 2014-09-11 22:28:43 +00:00
Jeff Brown
00c0cd4a24 Clean entire arg block when setting process name.
When Android processes fork from Zygote, we rewrite the command line
with a new name, eg. "system_server".  When we do this, we should
fill the entire block with zeros to remove corrupted argument
information that may otherwise remain in the /proc/<pid>/cmdline buffer
and be seen in tools and stack dumps.

Fixed an issue where VM options could be overwritten after setting
the nice name if the name was too long.

Bug: 17474152
Change-Id: Ie6cf9ed7752a04300a340e26cd6812bb35c59e1b
2014-09-11 14:19:52 -07:00
Amith Yamasani
f58e532e01 Merge "Apply cross-user restrictions to Shell" into lmp-dev 2014-09-11 16:46:34 +00:00
Amith Yamasani
8cd28b57ed Apply cross-user restrictions to Shell
Even though Shell user is allowed to perform cross-user actions,
lock that path down if the target user has restrictions imposed by
the profile owner device admin that prevents access via adb.

If the profile owner has imposed DISALLOW_DEBUGGING_FEATURES, don't
allow the shell user to make the following types of calls:
start activities, make service calls, access content providers,
send broadcasts, block/unblock packages, clear user data, etc.

Bug: 15086577
Change-Id: I9669fc165953076f786ed51cbc17d20d6fa995c3
2014-09-10 17:15:06 -07:00
Adam Lesinski
65e76d1200 Output recent configs in am get-config command
Change-Id: Ic516e73d2e72ac0dc3136f7226cedd851fe22b85
2014-09-10 15:02:59 -07:00
Amith Yamasani
dda003ffa8 Clean up apks installed for a removed user
When a user is removed, enumerate through all installed packages
to see if any of them are not installed for any user. Delete the
package if no user has it "installed".

Added a pm option to install an apk for a specific user.

Fixed a crash in UserManagerService when executing the above
cleanup - dying users generate a null UserInfo.

Bug: 15426024
Change-Id: I571decde1ae1c257d0da6db153b896aad6d6bcb4
2014-08-29 10:28:38 -07:00
Alex Light
55471dcd0f Change /dalvik-cache to be owned by root.
Bug: 16875245

(cherry picked from commit 79bf4007f559e194205f632b23d2bfb6f8d1e7ba)

Change-Id: I29a70215a2207bc4e0db02ab751d32a68edf4b66
2014-08-28 17:02:37 -07:00
Alex Light
79bf4007f5 Change /dalvik-cache to be owned by root.
Bug: 16875245

Change-Id: I29a70215a2207bc4e0db02ab751d32a68edf4b66
2014-08-28 11:34:50 -07:00
Jeff Hao
1b012d302b Add sample profiling option to am.
Also bundles all profiling options into a class.

Bug: 17040932
Change-Id: I85d675ee1494bdc7308caffdf94145d27c996e9d
2014-08-26 15:54:25 -07:00
Jeff Sharkey
941a8ba1a6 Installing splits into ASECs!
Sessions can now zero-copy data directly into pre-allocated ASEC
containers.  Then at commit time, we compute the total size of the
final app, including any inherited APKs and unpacked libraries, and
resize the container in one step.

This supports both brand new ASEC installs and inheriting from
existing ASEC installs.  To keep things simple, it currently requires
copying any inherited ASEC contents, but this could be optimized in
the future.

Expose new vold resize command, and allow read-write mounting of ASEC
containers.  Move native library extraction into the installer flow,
since it needs to happen before ASEC is sealed.  Move multiArch flag
into NativeLibraryHelper, instead of making everyone pass it
around.  Migrate size calculation to shared location.

Separate "other" package name in public API, provide a path to a
storage device when relevant, and add more docs.

Bug: 16514385
Change-Id: I06c6ce588d312ee7e64cce02733895d640b88456
2014-08-22 16:25:04 -07:00
Adam Lesinski
b5cf61be7c Add Shell command to set AppOps permissions
Change-Id: I6446543b27f0d2d2e69590a2807e713c6d5ccbbc
2014-08-19 11:27:19 -07:00
Jeff Sharkey
3e3b251f46 Merge "PackageInstaller API refactoring." into lmp-dev 2014-08-15 18:56:10 +00:00
Jeff Sharkey
a0907436c0 PackageInstaller API refactoring.
Switch to using IntentSender for results to give installers easier
lifecycle management.  Move param and info objects to inner classes.

Bug: 17008440
Change-Id: I944cfc580325ccc07acf22e0c681a5542d6abc43
2014-08-15 15:57:02 -07:00
RoboErik
78c64cdbd8 Fix crash in legacy apps that register without a looper
Some legacy apps registered their media button receiver in a thread
without a looper. If this happens we need to use the main looper to
prevent a crash.

bug: 16306226
Change-Id: Idf472e649393e2a7ce2a3e1cbb3476003ab17f34
2014-08-14 18:42:54 -07:00