summaryrefslogtreecommitdiffstats
path: root/cmds
Commit message (Collapse)AuthorAgeFilesLines
* Help for the debugging help for issue #8734824.Dianne Hackborn2013-05-061-0/+23
| | | | | | | Add a new "hang" am command that lets you hang the system process. Useful for testing. Change-Id: Ice0fc52b49d80e5189f016108b03f9fd549b58a7
* Debugging help for issue #8734824: WATCHDOG KILLING SYSTEM PROCESSDianne Hackborn2013-05-061-0/+12
| | | | | | | | | | | | | | IActivityController has a new callback which the Watchdog calls when it detects that the system process is hung. This may be use full monkey. All hail the monkey! Also add a new private feature to Binder to be able to turn off all incoming dump() calls to a process. The watchdog uses this when it reports it is hung, so that if someone, say, wants to collect a bug report at this point they won't get stuck waiting for things that are all busted. Change-Id: Ib514d97451cf3b93f29e194c1954e29f948c13b1
* Don't set ADDR_COMPAT_LAYOUT on the emulatorNick Kralevich2013-04-251-1/+5
| | | | | | | | Don't work around third party app bugs on the emulator. (cherry picked from commit fc17dc2548234461eb43ff83539ede4c9893a825) Change-Id: I35246c447de65ad4649b9aa3eb67194234fd6378
* Disable tracing from ZygoteJamie Gennis2013-04-161-0/+4
| | | | | | | | | This change disables all atrace tracing in Zygote immediately after it is initialized. This is necessary because Zygote has no way to receive notifications that the enabled trace tags have been changed. Tracing is re-enabled when other processes fork from Zygote. Change-Id: If2983858fb0c4890ba9ab041849b1c4d98f66c13
* Add touchnavigation to input debugging command.Jeff Brown2013-04-101-3/+7
| | | | | Bug: 8583760 Change-Id: I9b150133e3d9ca9fe970550f5c0d7c18e6c7b558
* Add liblogYing Wang2013-04-094-4/+8
| | | | | Bug: 8580410 Change-Id: I746aa8258866508c3a725d0773faf4518096548f
* Have audio service clean up new receivers in crashing processes.Dianne Hackborn2013-04-087-308/+598
| | | | | | | | | | | | | | | | | | | | The new media button receiver with only a pending intent (no component name) could be left hanging if the process that registered it went away. These semantically need to be tied to the calling process's lifetime; we now clean them up when the calling process goes away. Also added some additional cleanup of media button receivers when packages change (updated, cleared). And on top of that, a new "media" command for doing media things. Currently lets you send media keys and monitor remote display data. Oh and finally added a new BaseCommand base class for implementing these command line utilities. Change-Id: Iba1d56f10bab1eec4a94a7bb1d1c2ae614c8bcf5
* am 4224a4ca: am 3864aa39: Merge "Add interrupter library to simulate EINTR"Kenny Root2013-03-273-0/+153
|\ | | | | | | | | * commit '4224a4ca85a4e7ba3f4e543ee52c643405464164': Add interrupter library to simulate EINTR
| * Merge "Add interrupter library to simulate EINTR"Kenny Root2013-03-283-0/+153
| |\
| | * Add interrupter library to simulate EINTRKenny Root2012-10-153-0/+153
| | | | | | | | | | | | | | | | | | | | | To check for robustness against EINTR from syscalls, add an interrupter library that can be preloaded with LD_PRELOAD. Change-Id: I0a6cd8702ec5bc6b2927a5e223ee3cdc033860a2
| * | Proper security labeling of multi-user data directories.rpcraig2013-03-253-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Add seinfo parsing to PackageManagerService.Robert Craig2013-03-253-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Keep track of who has disabled applications.Dianne Hackborn2013-03-271-1/+2
| | | | | | | | | | | | Change-Id: I2640d3dc2200b589e2beb42a43cc93efd090f06e
* | | Change wm commands to return size and density info.Dianne Hackborn2013-03-261-5/+30
| | | | | | | | | | | | Change-Id: Id25722fe5f0cd9470d04d657f067e5ad29927c98
* | | use the bitmap stride when encoding a screenshot as PNGMathias Agopian2013-03-211-1/+1
| | | | | | | | | | | | | | | Bug: 8444808 Change-Id: I47b74c22c940b40bd02634e9cd9dbff39b29a99f
* | | make sure screencap's data stream matches what adb expectsMathias Agopian2013-03-201-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | adb assumes the stride is always equal to the width, so we make sure it's actually the case (screenshot don't always have this guarantee). Change-Id: I643b909f6542b7493a611afc6e3c86955b984352
* | | make sure to start the binder thread poolMathias Agopian2013-03-191-1/+4
| | | | | | | | | | | | Change-Id: I5c125a001936797489ebdcd0d4ccbde23adba282
* | | add reboot and shutdown to `svc power` commandGuang Zhu2013-03-181-3/+27
| | | | | | | | | | | | | | | | | | | | | a runtime shutdown will be performed first, then device will reboot with the provided reason or power off. Change-Id: I44cfbae19626c46147fad3bc8e91434970daa5d5
* | | am 57eed5b4: am 38bfb5a7: Merge "app_process: don\'t pollute the environment"Nick Kralevich2013-03-151-0/+1
|\ \ \ | |/ / | | | | | | | | | * commit '57eed5b416bd72d4111a0aead2f5c71f24fde07b': app_process: don't pollute the environment
| * | app_process: don't pollute the environmentNick Kralevich2013-03-151-0/+1
| | | | | | | | | | | | | | | | | | Give a hoot — don't pollute! Change-Id: I30d6c05cecab483f0e9d8063907f7bc0ef2bb104
* | | am 9c322c75: am f7ec4e61: Merge "Never call app_main more than once"Nick Kralevich2013-03-151-4/+3
|\ \ \ | |/ / | | | | | | | | | * commit '9c322c756276a9b22b05fd9c8bd67f2edfb50324': Never call app_main more than once
| * | Never call app_main more than onceNick Kralevich2013-03-151-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | am 6098579a: am 1ae6ae20: Merge "Don\'t use ADDR_COMPAT_LAYOUT on the emulator"Nick Kralevich2013-03-141-5/+10
|\ \ \ | |/ / | | | | | | | | | * commit '6098579a205848339cf6886f5c6d476ccf40e6fe': Don't use ADDR_COMPAT_LAYOUT on the emulator
| * | Don't use ADDR_COMPAT_LAYOUT on the emulatorNick Kralevich2013-03-141-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | Respawn app_main if ADDR_COMPAT_LAYOUT is not setNick Kralevich2013-03-141-1/+22
| | | | | | | | | | | | | | | Bug: 8358800 Change-Id: Id81aa26d74dfd16a49f0ee5926ea2cdb3c2106d8
| * | installd: use correct header file.Nick Kralevich2013-02-282-2/+2
| | | | | | | | | | | | Change-Id: I035524b857a04f8400e96468310d88abf247e582
* | | Merge "Respawn app_main if ADDR_COMPAT_LAYOUT is not set" into jb-mr2-devNick Kralevich2013-03-141-1/+22
|\ \ \
| * | | Respawn app_main if ADDR_COMPAT_LAYOUT is not setNick Kralevich2013-03-141-1/+22
| | | | | | | | | | | | | | | | | | | | Bug: 8358800 Change-Id: Id81aa26d74dfd16a49f0ee5926ea2cdb3c2106d8
* | | | Handle finished bugreports, share from private.Jeff Sharkey2013-03-131-1/+5
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Show notification when a bugreport is finished, letting the user launch a SEND_MULTIPLE intent to share them. Add dialog that warns user about contents before sharing. Since bugreports are now stored in private app data of the Shell app, use FileProvider to build Uris that we can grant others access to. Define BUGREPORT_FINISHED as being a protected broadcast. Delete older bugreports automatically to reclaim disk space. Migrate any Intent extras to ClipData when building PendingIntents. Add --receiver-permission support to am shell command. Bug: 7005318 Change-Id: If6c607dbcf137362d5887eac482ff7391563890f
* | | DO NOT MERGE - Full backup/restore now handles OBBs sensiblyChristopher Tate2013-03-081-4/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OBB backup/ restore is no longer handled within the target app process. This is done to avoid having to require that OBB-using apps have full read/write permission for external storage. The new OBB backup service is a new component running in the same app as the already-existing shared storage backup agent. The backup infrastructure delegates backup/restore of apps' OBB contents to this component (because the system process may not itself read/write external storage). From the command line, OBB backup is enabled by using new -obb / -noobb flags with adb backup. The default is noobb. Finally, a couple of nit fixes: - buffer-size mismatch between the writer and reader of chunked file data has been corrected; now the reading side won't be issuing an extra pipe read per chunk. - bu now explicitly closes the transport socket fd after adopting it. This was benign but triggered a logged warning about leaked fds. (Cherrypicked) Change-Id: I471f6348abcccb7bf1e1710b7beda9f23de53e14
* | | Do not hang in pm clear on an invalid package nameChristopher Tate2013-03-071-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The Activity Manager was not properly informing the observer that the operation had concluded (unsuccessfully). Bug 8222595 Change-Id: I8234e32d8edf4112c8c7a5e20e341d0b41e23014
* | | Shared accounts and sharing of appsAmith Yamasani2013-03-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | API and preliminary implementation for sharing primary user accounts with a secondary user. AbstractAccountAuthenticator has new methods to retrieve and apply a bundle of credentials to clone an account from the primary to a restricted secondary user. The AccountManagerService initiates the account clone when it starts up the user and detects that the user has a shared account registered that hasn't been converted to a real account. AccountManager also has new hidden APIs to add/remove/get shared accounts. There might be further improvements to this API to make shared accounts hidden/visible to select apps. AccountManagerService has a new table to store the shared account information. Added ability in PackageManager to install and uninstall packages for a secondary user. This is required when the primary user selects a few apps to share with a restricted user. Remove shared accounts from secondary users when primary user removes the account. Change-Id: I9378ed0d8c1cc66baf150a4bec0ede56f6f8b06b
* | | am f7497c9e: am 755205ad: Merge "Fix spelling error ↵Kenny Root2013-02-261-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | s/SORT_OREDER/SORT_ORDER/ in "content --help"" * commit 'f7497c9e551dd3bcbb7438211f5022cc6341c527': Fix spelling error s/SORT_OREDER/SORT_ORDER/ in "content --help"
| * | Fix spelling error s/SORT_OREDER/SORT_ORDER/ in "content --help"Martin Olsson2013-02-261-1/+1
| | | | | | | | | | | | | | | Change-Id: I8f869c9d2243ae8ff414399b7d6835c7ca74d500 Signed-off-by: Martin Olsson <martin@minimum.se>
| * | Switch keystore to binderKenny Root2012-11-141-0/+1
| | | | | | | | | | | | Change-Id: I9fa1fc05068bee1eed3f618fb32f70cf3d4c05d4
| * | Bug fix on installd with SELinux enabled kernel.rpcraig2012-11-141-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Use BUILD_PREBUILT to install the shell scriptYing Wang2013-02-193-65/+18
| | | | | | | | | | | | | | | | | | NOTICE files will be picked up automatically. Change-Id: Ia4938aff013f1c010cbbfceacf5685722c86c39a
* | | Implement display overscan support.Dianne Hackborn2013-02-196-89/+466
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The window manager now keeps track of the overscan of each display, with an API to set it. The overscan impacts how it positions windows in the display. There is a new set of APIs for windows to say they would like to go into the overscan region. There is a call into the window manager to set the overscan region for a display, and it now has a concept of display settings that it stores presistently. Also added a new "wm" command, moving the window manager specific commands from the "am" command to there and adding a new now to set the overscan region. Change-Id: Id2c8092db64fd0a982274fedac7658d82f30f9ff
* | | Fix issue #8133857: Tracking ANR in GalleryDianne Hackborn2013-02-081-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reworking the locking in resources so that we never hold the state lock while calling in to potential long running operations. This means the mTmpValue can no longer be final (since we need to use it while the lock isn't held), so a new field needs to be added as the lock and everything that touches mTmpValue must deal with it being null, restoring the value in there when possible, etc. Change-Id: Ie5ffd0f66e5f2d0e869a62d72e7a55b1c74fe872
* | | App ops: new operations for SMS.Dianne Hackborn2013-02-051-2/+2
| | | | | | | | | | | | | | | | | | | | | Implementation required a new framework feature to associate an app op with a broadcast. Change-Id: I4ff41a52f7ad4ee8fd80cbf7b394f04d6c4315b3
* | | App ops: vibration, neighboring cells, dialing, etc.Dianne Hackborn2013-02-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve handling of vibration op, so that apps are better blamed (there is now a hidden vibrator API that supplies the app to blame, and the system now uses this when vibrating on behalf of an app). Add operation for retrieving neighboring cell information. Add a new op for calling a phone number. This required plumbing information about the launching package name through the activity manager, which required changing the internal startActivity class, which required hitting a ton of code that uses those internal APIs. Change-Id: I3f8015634fdb296558f07fe654fb8d53e5c94d07
* | | Merge "Implement support for method calls in the `content` tool."Daniel Sandler2013-01-291-0/+82
|\ \ \
| * | | Implement support for method calls in the `content` tool.Daniel Sandler2013-01-291-0/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $ content call --uri content://com.example --method methodname [--arg optional_string_arg] [--extra name:s:foo --extra value:i:0] The URI is just used to resolve the provider. --extra has the same syntax as --bind. Change-Id: I98cb89f0174a00e7c29ca0d8c8d809d453de3623
* | | | Merge "Adding UI test automation APIs."Svetoslav Ganov2013-01-291-1/+5
|\ \ \ \ | |/ / / |/| | |
| * | | Adding UI test automation APIs.Svetoslav Ganov2013-01-221-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds APIs support for implementing UI tests. Such tests do not rely on internal application structure and can span across application boundaries. UI automation APIs are encapsulated in the UiAutomation object that is provided by an Instrumentation object. It is initialized by the system and can be used for both introspecting the screen and performing interactions simulating a user. UI test are normal instrumentation tests and are executed on the device. UiAutomation uses the accessibility APIs to introspect the screen and a special delegate object to perform privileged operations such as injecting input events. Since instrumentation tests are invoked by a shell command, the shell program launching the tests creates a delegate object and passes it as an argument to started instrumentation. This delegate allows the APK that runs the tests to access some privileged operations protected by a signature level permissions which are explicitly granted to the shell user. The UiAutomation object also supports running tests in the legacy way where the tests are run as a Java shell program. This enables existing UiAutomator tests to keep working while the new ones should be implemented using the new APIs. The UiAutomation object exposes lower level APIs which allow simulation of arbitrary user interactions and writing complete UI test cases. Clients, such as UiAutomator, are encouraged to implement higher- level APIs which minimize development effort and can be used as a helper library by the test developer. The benefit of this change is decoupling UiAutomator from the system since the former was calling hidden APIs which required that it is bundled in the system image. This prevented UiAutomator from being evolved separately from the system. Also UiAutomator was creating additional API surface in the system image. Another benefit of the new design is that now test cases have access to a context and can use public platform APIs in addition to the UiAutomator ones. Further, third-parties can develop their own higher level test APIs on top of the lower level ones exposes by UiAutomation. bug:8028258 Also this change adds the fully qualified resource name of the view's id in the emitted AccessibilityNodeInfo if a special flag is set while configuring the accessibility service. Also added is API for looking up node infos by this id. The id resource name is relatively more stable compared to the generaed id number which may change from one build to another. This API facilitate reuing the already defined ids for UI automation. bug:7678973 Change-Id: I589ad14790320dec8a33095953926c2a2dd0228b
* | | | Add new disabled state for "optional" built-in apps.Dianne Hackborn2013-01-221-0/+8
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The disabled state allows you to make an app disabled except for whatever parts of the system still want to provide access to them and automatically enable them if the user want to use it. Currently the input method manager service is the only part of the system that supports this, so you can put an IME in this state and it will generally look disabled but still be available in the IME list and once selected switched to the enabled state. Change-Id: I77f01c70610d82ce9070d4aabbadec8ae2cff2a3
* | | Rework ParceledListSlice to be much easier to use.Dianne Hackborn2013-01-181-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Take advantage of this to return better information about packages filtered by permissions -- include the permissions they have in the requested array. Also fix issue #8026793 (Contact picture shows default pic while searching for a contact in qsb) by using the base package name of the Context when reporting the app name of an operation. Otherwise you could make a resource-only context for another application and do calls through that and get reported as the wrong app. Change-Id: I5e0488bf773acea5a3d22f245641828e1a106fb8
* | | More work on App Ops service.Dianne Hackborn2013-01-162-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implemented reading and writing state to retain information across boots, API to retrieve state from it, improved location manager interaction to monitor both coarse and fine access and only note operations when location data is being delivered back to app (not when it is just registering to get the data at some time in the future). Also implement tracking of read/write ops on contacts and the call log. This involved tweaking the content provider protocol to pass over the name of the calling package, and some infrastructure in the ContentProvider transport to note incoming calls with the app ops service. The contacts provider and call log provider turn this on for themselves. This also implements some of the mechanics of being able to ignore incoming provider calls... all that is left are some new APIs for the real content provider implementation to be involved with providing the correct behavior for query() (return an empty cursor with the right columns) and insert() (need to figure out what URI to return). Change-Id: I36ebbcd63dee58264a480f3d3786891ca7cbdb4c
* | | am 58ed5d74: am 768d9e1a: Merge "Correct executable bit for source files"Kenny Root2012-11-071-0/+0
|\ \ \ | |/ / | | | | | | | | | * commit '58ed5d748c0b9b64845975ef5844ad313de7c3f6': Correct executable bit for source files
| * | am 768d9e1a: Merge "Correct executable bit for source files"Kenny Root2012-11-071-0/+0
| |\ \ | | | | | | | | | | | | | | | | * commit '768d9e1a72ceee7d4a5f608776b87b62d6ce4a04': Correct executable bit for source files