933 Commits

Author SHA1 Message Date
Diego Torres Milano
2ac9d8d0f0 input: added support for multiple keyevents
- Multiple keyevents can now be send from the command line:

    input keyevent <key code number or name> ...

  Sometimes invoking 'input' repeatedly does not send the events fast
  enough, this change solves the problem by allowing multiple key code
  number or names be added to the command line.

Change-Id: I0d0f34bddd99e0195c9badff2f8b3e2aa9a51737
2013-04-29 22:05:24 +00:00
Nick Kralevich
fc17dc2548 Don't set ADDR_COMPAT_LAYOUT on the emulator
Don't work around third party app bugs on the emulator.

Change-Id: I4440fcd56b72e3a74881ddec2a469f037a060525
2013-04-23 15:40:03 -07:00
Kenny Root
3864aa3944 Merge "Add interrupter library to simulate EINTR" 2013-03-28 00:16:31 +00:00
rpcraig
1e0c8e6989 Proper security labeling of multi-user data directories.
This patch covers 2 cases. When an app is installed
and the resulting data directory is created for all
existing users. And when a new user is created and
all existing app data directories are created for
the new user.

Change-Id: Iacaba6d9d18d5337e65713960d14efe32006b330
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
2013-03-25 14:35:00 +00:00
Robert Craig
d3f8d0333c Add seinfo parsing to PackageManagerService.
This patch set allows the PMS to parse the
mac_permissions.xml file which contains the
seinfo values. Each package that is installed
on the device will be assigned an seinfo value
based on policy. This seinfo value will help label
the app process and data directory.  Modifications
include adjustments to ApplicationInfo.java
to store the seinfo tag per package as well as
adjustments to installd to communicate the seinfo
tag to libselinux.

Change-Id: I61ad1ea12fb6a9a6d0b108ec163bc4bf4c954b58
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
2013-03-25 06:33:03 -04:00
Nick Kralevich
9a9350550a app_process: don't pollute the environment
Give a hoot — don't pollute!

Change-Id: I30d6c05cecab483f0e9d8063907f7bc0ef2bb104
2013-03-15 13:14:52 -07:00
Nick Kralevich
1fe21bd1b6 Never call app_main more than once
Different kernels seem to handle ADDR_COMPAT_LAYOUT differently,
sometimes passing it to its children, sometimes not. If it's not
passed to its child successfully, we can end up in a restart loop.

Instead of testing for the presence of ADDR_COMPAT_LAYOUT, use an
environment variable instead, which is handled more predictably.

Bug: 8392487
Change-Id: Ia531dd2abb4e1cd46f3430d844e644f53581f530
2013-03-15 11:59:03 -07:00
Nick Kralevich
5fa1ee779e Don't use ADDR_COMPAT_LAYOUT on the emulator
For the emulator, we want people to see memory as it
actually is, not how we're hacking around buggy apps. Don't
set ADDR_COMPAT_LAYOUT on the emulator.

For reasons that I don't understand, personality(ADDR_COMPAT_LAYOUT)
does not persist across an exec on the emulator. app_main gets
into a tight loop restarting itself because of this. This change
also works around that bug.

Change-Id: Ia73a7d2d623c25cf39d248145d97307945d554da
2013-03-14 16:31:34 -07:00
Nick Kralevich
8a0a929422 Respawn app_main if ADDR_COMPAT_LAYOUT is not set
Bug: 8358800
Change-Id: Id81aa26d74dfd16a49f0ee5926ea2cdb3c2106d8
2013-03-14 15:21:12 -07:00
Nick Kralevich
848b4c9a97 installd: use correct header file.
Change-Id: I035524b857a04f8400e96468310d88abf247e582
2013-02-28 16:43:23 -08:00
Martin Olsson
64d0b3f918 Fix spelling error s/SORT_OREDER/SORT_ORDER/ in "content --help"
Change-Id: I8f869c9d2243ae8ff414399b7d6835c7ca74d500
Signed-off-by: Martin Olsson <martin@minimum.se>
2013-02-26 17:54:39 +01:00
Kenny Root
6b77645aa9 Switch keystore to binder
Change-Id: I9fa1fc05068bee1eed3f618fb32f70cf3d4c05d4
2012-11-14 08:45:52 -08:00
rpcraig
2e59369dca Bug fix on installd with SELinux enabled kernel.
setfilecon is not required on libsymlinks when target
doesn't exist. A bootloop is caused without this
change.

Change-Id: I96dbd4b1f47a752bfcaf6016c81fd43083c4a6e1
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
2012-11-14 10:16:03 -05:00
Kenny Root
58ed5d748c am 768d9e1a: Merge "Correct executable bit for source files"
* commit '768d9e1a72ceee7d4a5f608776b87b62d6ce4a04':
  Correct executable bit for source files
2012-11-07 11:52:12 -08:00
Kenny Root
3a084af2e9 Correct executable bit for source files
Many media files and source code files were marked as executable in Git.
Remove those.

Also a shell script and python script were not marked as executable.

Change-Id: Ieb51bafb46c895a21d2e83696f5a901ba752b2c5
2012-11-07 10:27:31 -08:00
Dave Burke
aea7b6903b am da2f2e51: am 799916e6: Merge "Revert "Check non-primary user dirs during package scan"" into jb-mr1-dev
* commit 'da2f2e51c71b5ebc50fe76c3cd5a920c81a5ee92':
  Revert "Check non-primary user dirs during package scan"
2012-10-23 23:19:01 -07:00
Dave Burke
da2f2e51c7 am 799916e6: Merge "Revert "Check non-primary user dirs during package scan"" into jb-mr1-dev
* commit '799916e6ac706921e43a3382e5d9e06e13f87525':
  Revert "Check non-primary user dirs during package scan"
2012-10-23 23:17:23 -07:00
Dave Burke
799916e6ac Merge "Revert "Check non-primary user dirs during package scan"" into jb-mr1-dev 2012-10-23 23:14:15 -07:00
Dave Burke
383fa18b51 Revert "Check non-primary user dirs during package scan"
This reverts commit 4525f5b69cb44a9a0c92f9c525fc47541f456621

Change-Id: I31b7a0860972532478ab3420556b806bfa78739a
2012-10-23 23:12:19 -07:00
Kenny Root
5e24b92f04 am f461d3f6: am da2509c4: Merge "Check non-primary user dirs during package scan" into jb-mr1-dev
* commit 'f461d3f69f4533045167b4dc1f7445ad6ae47af3':
  Check non-primary user dirs during package scan
2012-10-23 17:10:24 -07:00
Kenny Root
f461d3f69f am da2509c4: Merge "Check non-primary user dirs during package scan" into jb-mr1-dev
* commit 'da2509c434ebb2a5a0da1bc270cae7f007cbb0f9':
  Check non-primary user dirs during package scan
2012-10-23 17:06:24 -07:00
Kenny Root
da2509c434 Merge "Check non-primary user dirs during package scan" into jb-mr1-dev 2012-10-23 17:03:09 -07:00
Kenny Root
4525f5b69c Check non-primary user dirs during package scan
During package scan, only the primary user data directories were
checked. If the secondary user didn't have an application directory, it
would happily ignore it. The app would then crash upon startup.

Bug: 7391882
Change-Id: I1fa92aa27386104d4ac6bc5dc92bfbf2e7dfac9f
2012-10-22 18:48:24 -07:00
Kenny Root
3ce8eb4eb2 am 55708a9d: am e03c0244: Merge "Clear data deletes too much" into jb-mr1-dev
* commit '55708a9dce5be627f68e388d4ad355595ad5fef5':
  Clear data deletes too much
2012-10-22 16:17:17 -07:00
Kenny Root
55708a9dce am e03c0244: Merge "Clear data deletes too much" into jb-mr1-dev
* commit 'e03c0244717093e0fbc9b05073d3ae3dbd8fcea5':
  Clear data deletes too much
2012-10-22 16:14:14 -07:00
Kenny Root
9157d3f3b7 Clear data deletes too much
Bug: 7389445
Change-Id: Ic12d7a8e37747dc1a9b71ec5f881b5e440e0a75e
2012-10-22 15:20:52 -07:00
Kenny Root
9396f183c2 resolved conflicts for merge of a5d29b2c to jb-mr1-dev-plus-aosp
Change-Id: I21512d61b5c08cee5fed69b34c3275ba5c3fc0d8
2012-10-19 17:16:41 -07:00
Kenny Root
a5d29b2c14 am 9bef3294: Merge changes Ie3c8ca8d,Ia175b36d into jb-mr1-dev
* commit '9bef3294d3660a85442829a25c9777e25d3c3cc8':
  Try to free cache before giving up on install
  Robustly add symlink and add for non-primary users
2012-10-19 16:40:07 -07:00
Kenny Root
a3e90798b7 Robustly add symlink and add for non-primary users
Amazingly, some apps still don't use the nativeLibraryPath. So add a lib
symlink for non-primary users to fix that.

Also, there was an error when the symlink existed that it would give up.
This shouldn't really happen, but in that case, just remove it and
create a new one to be safe.

Also, move the downgrade code to the appropriate place. This downgrade
case triggered the above symlink existing bug.

Bug: 7318366
Bug: 7371571
Change-Id: Ia175b36d98f00bdc2f2433b909aafd524eb34d15
2012-10-18 15:12:09 -07:00
Kenny Root
367400491a resolved conflicts for merge of 40f2f751 to jb-mr1-dev-plus-aosp
Change-Id: I6075e2bf98b0f8310c93fac649c34cbbbd89707f
2012-10-17 10:50:14 -07:00
Kenny Root
ed3ce513a6 Fix bad merge
Change-Id: I9f05f96e3607b994368a8d4e1e454af8fe84424d
2012-10-17 10:06:17 -07:00
Kenny Root
ad0090e7b8 resolved conflicts for merge of 85f9ba9e to jb-mr1-dev-plus-aosp
Change-Id: I9ae49075935f0e9ec432ce9d828ee26a4fcdb44c
2012-10-17 10:02:22 -07:00
Kenny Root
57c63d8f9b Fix mistaken removal of setfilecon
Previous commit attempted to move setfilecon above chown, but mistakenly
squashed libdir and pkgdir setfilcon into one incorrect setfilecon.

Change-Id: I1ad00eae8a0e69ae88ce47cd5571558ce1ad2145
2012-10-17 09:50:37 -07:00
Kenny Root
c9a1aabc49 Remove HAVE_SELINUX guards
Change-Id: I6c2161471f657aa1645695ffd56ff434b0c2b426
2012-10-16 23:32:31 -07:00
Jeff Sharkey
a1fda2e388 am 77ce60a5: am 7789c9bb: Merge "Support pm clear as --user." into jb-mr1-dev
* commit '77ce60a59330d6059011d737142bd210db845d85':
  Support pm clear as --user.
2012-10-15 20:19:04 -07:00
Jeff Sharkey
77ce60a593 am 7789c9bb: Merge "Support pm clear as --user." into jb-mr1-dev
* commit '7789c9bbfca079655e9285173d6175b94bc774b0':
  Support pm clear as --user.
2012-10-15 18:29:51 -07:00
Jeff Sharkey
a3e9ff7deb Support pm clear as --user.
Bug: 7352703
Change-Id: I0e9cc4f2313e5424d234c3cb051004c0321d9dac
2012-10-15 16:16:39 -07:00
Kenny Root
0054cbd4db Add interrupter library to simulate EINTR
To check for robustness against EINTR from syscalls, add an
interrupter library that can be preloaded with LD_PRELOAD.

Change-Id: I0a6cd8702ec5bc6b2927a5e223ee3cdc033860a2
2012-10-15 08:53:46 -07:00
Jeff Sharkey
1e8f7262fe am a00ffa53: am 1016b288: Merge "Pm command to get maximum users." into jb-mr1-dev
* commit 'a00ffa53fbe7ced0147451242232f47d117d5e2d':
  Pm command to get maximum users.
2012-10-12 12:19:34 -07:00
Jeff Sharkey
a00ffa53fb am 1016b288: Merge "Pm command to get maximum users." into jb-mr1-dev
* commit '1016b2881d2b5f5d5e142afa287bd876b6360c2b':
  Pm command to get maximum users.
2012-10-12 12:17:17 -07:00
Jeff Sharkey
4c76ea6b88 Pm command to get maximum users.
Used to drive CTS tests.  Also print success message when removing
a user.

Bug: 7334718
Change-Id: Ia3886ddf860cd000ce567b0fed2ef0a4e2a2295c
2012-10-12 10:46:01 -07:00
Jeff Sharkey
2425164835 am 9ad36ded: am 9dfca201: Merge "Print newly generated userId." into jb-mr1-dev
* commit '9ad36dedd668c3bfa906397baa3d0aa76cfe1216':
  Print newly generated userId.
2012-10-11 17:29:02 -07:00
Jeff Sharkey
9ad36dedd6 am 9dfca201: Merge "Print newly generated userId." into jb-mr1-dev
* commit '9dfca20105aa998f5767b1b330bf9307ec479906':
  Print newly generated userId.
2012-10-11 17:25:53 -07:00
Jeff Sharkey
e6d3ccc992 Print newly generated userId.
Bug: 7334718
Change-Id: Id4dc456b079bebbe9f2d7ea2a8343d2215f296dc
2012-10-11 16:44:18 -07:00
Dianne Hackborn
572286b415 am 31af905a: am 36db9d08: Merge "Further work on issue #7307399: Framework needs a new pre-user-shutdown..." into jb-mr1-dev
* commit '31af905ac5388339fd0ffd87e6f25bd2a293dc0e':
  Further work on issue #7307399: Framework needs a new pre-user-shutdown...
2012-10-09 19:14:24 -07:00
Dianne Hackborn
31af905ac5 am 36db9d08: Merge "Further work on issue #7307399: Framework needs a new pre-user-shutdown..." into jb-mr1-dev
* commit '36db9d0879640a1cb9a8723d6649068a1c4c08de':
  Further work on issue #7307399: Framework needs a new pre-user-shutdown...
2012-10-09 19:13:13 -07:00
Dianne Hackborn
c0bd747b06 Further work on issue #7307399: Framework needs a new pre-user-shutdown...
...phase & callback API

I realized there were a few things wrong with what was there.  The new
ACTION_USER_STARTING was not being sent for the first user at boot, and
there was an existing problem where ACTION_USER_STARTED was sent every
time there was a user switch.

Also improved some debug output of broadcasts to make it easier to see
what is going on in this stuff, and better reporting of why a service
couldn't be started.

Change-Id: Id8a536defbbad1f73d94a37d13762436b822fbe3
2012-10-09 17:57:14 -07:00
Christopher Tate
6e41d59665 am b17fdf7b: am af3cd21b: Merge "New command line tool: "settings"" into jb-mr1-dev
* commit 'b17fdf7b512530647037a7805c175c36db1549d8':
  New command line tool: "settings"
2012-10-09 11:48:55 -07:00
Christopher Tate
b17fdf7b51 am af3cd21b: Merge "New command line tool: "settings"" into jb-mr1-dev
* commit 'af3cd21b08dd22d6ffd747c6314fd49fed3170a0':
  New command line tool: "settings"
2012-10-09 11:46:28 -07:00
Christopher Tate
af75948cdd New command line tool: "settings"
Because the usual content provider interface doesn't allow specification of
the target user under which to perform settings reads/writes, this CL introduces
a new command line app specifically for that.

Usage:

   settings [--user num] get namespace key
   settings [--user num] put namespace key value

If a --user argument is not given, the owner user is targetted.

Bug 7299066

Change-Id: I73108bb76b04fad133cc4e0f218d64490de549f1
2012-10-08 18:39:27 -07:00