summaryrefslogtreecommitdiffstats
path: root/cmds
Commit message (Collapse)AuthorAgeFilesLines
* Allow debugging only for apps forked from zygoteHEADmasterSebastien Hertz2015-10-191-2/+4
| | | | | | | | | | | | | | When starting the runtime from app_process, we only pass JDWP options if starting zygote. It prevents from opening a JDWP connection in non-zygote programs while Android apps (forked from zygote) remain debuggable. Bug: 23050463 (cherry picked from commit 7a09b8322cab26d6e3da1362d3c74964ae66b5d4) Change-Id: Ib5b6d3bc4d45389993c3c54226df5a7b72479d19 Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
* Proper security labeling of multi-user data directories.rpcraig2013-07-183-11/+12
| | | | | | | | | | | | 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. Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil> Change-Id: I01f2a9084dfe7886087b1497070b0d7f2ad8478e
* Add seinfo parsing to PackageManagerService.rpcraig2013-07-183-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 also include, adjustments to ApplicationInfo.java to store the seinfo tag per package, adjustments to installd to communicate the seinfo tag to libselinux, and finally a set of unit tests. Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil> Change-Id: I61ad1ea12fb6a9a6d0b108ec163bc4bf4c954b58
* input: added support for multiple keyeventsDiego Torres Milano2013-05-051-7/+9
| | | | | | | | | | | | - 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
* Correct executable bit for source filesKenny Root2013-04-131-0/+0
| | | | | | | | | | 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 Signed-off-by: Chirayu Desai <cdesai@cyanogenmod.org>
* bootanimation: performance/speedup enhancements (squashed from CM10)Prashant Somashekar2013-02-162-4/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bootanim: Don't cache textures if they're expected to use a lot of VRAM (rmcc) https://github.com/CyanogenMod/android_frameworks_base/commit/14f9eecd3f543a25c4a2053d6155a9396a777a3a#cmds/bootanimation bootanimation: performance enhancements (turl) https://github.com/CyanogenMod/android_frameworks_base/commit/e6b54405aa70d7503a114d9c90ef7518abdd7133#cmds/bootanimation bootanimation: fix usage of LOGW (intervigilium) https://github.com/CyanogenMod/android_frameworks_base/commit/e45cf7d232490f44aecf8f2447220a8b5ace4c10#cmds/bootanimation bootanimation: allow using RGB565 instead of ARGB8888 (tpruvot) https://github.com/CyanogenMod/android_frameworks_base/commit/204282870a9c69b04ad5ddecd73fafbd7996cbc0#cmds/bootanimation Change-Id: I203fa23f77d1349fb822a7662e2cd3998ba4c814 bootanim: Don't cache textures if they're expected to use a lot of VRAM bootanimation cached all the textures generated until the animation was completed. For Hi-res animations with lots of frames (like the new CM9 anim on xhdpi devices), this implied using large amounts of video RAM, more than most devices actually have available, causing the animation to stall (and in some cases, gralloc to lock up); so if an animation is expected to use a lot of RAM (rough estimation based on frame size and number of frames), disable cache entirely and generate the textures on demand Change-Id: I157e5cdde2aab1d82d980d77cbedd9f127c83a1d Conflicts: cmds/bootanimation/BootAnimation.cpp bootanimation: performance enhancements This patch implements two simple performance enhancements, which might benefit devices. They are completely opt-in by setting the following variables. * TARGET_BOOTANIMATION_PRELOAD: will preload the bootanimation zip to memory; this is handy on devices where the storage might be slow. By preloading it, we get quick access to the zip file, and the animation doesn't stutter. * TARGET_BOOTANIMATION_TEXTURE_CACHE: allows maintainers to force texture cache on/off. Also fixes the sign warnings related to int / size_t comparison Change-Id: Ie92d1b0aa90b43ba39c368a2a33657a60c3a64b5 Conflicts: cmds/bootanimation/BootAnimation.cpp bootanimation: fix usage of LOGW Change-Id: I1d59df9f44f414d80058a532644cbbb40e22c701 bootanimation: allow using RGB565 instead of ARGB8888 RGB565 uses considerably less memory, and together with texture cache, it allows us to offer a really smooth bootanimation on not so powerful devices. Change-Id: I9da8fd7e6a587b5895519dd0983ec9b8f676771b
* Merge commit 'android-4.2.2_r1' into mr1.1-stagingRicardo Cerqueira2013-02-151-3/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: core/java/android/os/Trace.java core/java/android/widget/Toast.java core/res/res/values-cs/strings.xml core/res/res/values-el/strings.xml core/res/res/values-iw/strings.xml core/res/res/values/config.xml core/res/res/values/symbols.xml media/java/android/media/AudioService.java packages/SystemUI/res/values-sv/strings.xml packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryController.java packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java policy/src/com/android/internal/policy/impl/keyguard/KeyguardMessageArea.java policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewMediator.java services/java/com/android/server/NotificationManagerService.java services/java/com/android/server/power/ElectronBeam.java Change-Id: I60b8ddf20a1d7bcf9dc7b1a4ed841aaa4d953294
| * Update the content shell command's usage instructions.Svetoslav Ganov2012-11-261-3/+3
| | | | | | | | | | | | | | | | | | | | | | The usage instructions of the content shell command were missing some excape charecters which caused the examples not to work. As a result of the incorrect instructions users are prone to constructing incorrect commands. bug:7526252 Change-Id: I2fcc4dd1fd05806fe951245651b97e40a4786d24
* | installd: Delete cache properly for devices using datadata partitionPawit Pornkitprasan2013-01-104-1/+14
| | | | | | | | | | | | | | | | The java side already checks /data/data for free space but installd still checks /data causing it to never reap the cache (because it thinks that enough free space is available.) Change-Id: I736af6ff7ea0c8ae07900168f6b8ac2f7a4dbe0b
* | DexOpt anything on /system in /cache/dalvik-cachectso2012-11-212-3/+13
| | | | | | | | | | | | | | | | Change-Id: Id41d37047f2fcb90d513ac091dfcb85492473689 Allow property to disable dexopt on /cache Change-Id: Ic74707c4bead387bbf82e4c6d5037efc2d2ebeaf
* | samsung: add support for tvout and yamahaplayer servicescodeworkx2012-11-192-0/+12
| | | | | | | | Change-Id: I653f9876b7fb83734abf3a0b9b9b5af1920b8112
* | servicemanager: Allow tegra audio to register as a serviceRicardo Cerqueira2012-11-191-0/+1
|/ | | | Change-Id: I6c792b6f5f586cf40d4a9b834e793a68c1e458a7
* Merge "Revert "Check non-primary user dirs during package scan"" into jb-mr1-devDave Burke2012-10-231-24/+9
|\
| * Revert "Check non-primary user dirs during package scan"Dave Burke2012-10-231-24/+9
| | | | | | | | | | | | This reverts commit 4525f5b69cb44a9a0c92f9c525fc47541f456621 Change-Id: I31b7a0860972532478ab3420556b806bfa78739a
* | Merge "Check non-primary user dirs during package scan" into jb-mr1-devKenny Root2012-10-231-9/+24
|\ \ | |/
| * Check non-primary user dirs during package scanKenny Root2012-10-221-9/+24
| | | | | | | | | | | | | | | | | | 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
* | Clear data deletes too muchKenny Root2012-10-221-2/+2
|/ | | | | Bug: 7389445 Change-Id: Ic12d7a8e37747dc1a9b71ec5f881b5e440e0a75e
* Robustly add symlink and add for non-primary usersKenny Root2012-10-183-45/+108
| | | | | | | | | | | | | | | | 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
* Support pm clear as --user.Jeff Sharkey2012-10-151-4/+16
| | | | | Bug: 7352703 Change-Id: I0e9cc4f2313e5424d234c3cb051004c0321d9dac
* Pm command to get maximum users.Jeff Sharkey2012-10-121-2/+16
| | | | | | | | Used to drive CTS tests. Also print success message when removing a user. Bug: 7334718 Change-Id: Ia3886ddf860cd000ce567b0fed2ef0a4e2a2295c
* Print newly generated userId.Jeff Sharkey2012-10-111-1/+4
| | | | | Bug: 7334718 Change-Id: Id4dc456b079bebbe9f2d7ea2a8343d2215f296dc
* Further work on issue #7307399: Framework needs a new pre-user-shutdown...Dianne Hackborn2012-10-091-0/+4
| | | | | | | | | | | | | | | ...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
* New command line tool: "settings"Christopher Tate2012-10-083-0/+243
| | | | | | | | | | | | | | | | | 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
* Fix cache deletion for secondary usersAmith Yamasani2012-10-013-5/+5
| | | | | | Bug: 7249419 Change-Id: Idbc0f9994508059ebf5055aea961b87e08b3673a
* Merge "Fix issue #7211769 and #7244492, thrash around on #7226656." into ↵Dianne Hackborn2012-09-281-0/+10
|\ | | | | | | jb-mr1-dev
| * Fix issue #7211769 and #7244492, thrash around on #7226656.Dianne Hackborn2012-09-281-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue #7211769: Crash dialog from background user has non-working "report" The report button now launches the issue reporter for the correct user. Also for crashes on background users, either disable the report button, or simply don't show the dialog depending on the build config. Issue #7244492: Bugreport button in Quick Settings doesn't actually do anything Now they do. Issue #7226656: second user seeing primary user's apps I haven't had any success at reproducing this. I have tried to tighten up the path where we create the user to ensure nothing could cause the user's applications to be accessed before the user it fully created and thus make them installed... but I can't convince myself that is the actual problem. Also tightened up the user switch code to use forground broadcasts for all of the updates about the switch (since this is really a foreground operation), added a facility to have BOOT_COMPELTED broadcasts not get launched for secondary users and use that on a few key system receivers, fixed some debug output. Change-Id: Iadf8f8e4878a86def2e495e9d0dc40c4fb347021
* | Merge "Fix issue #7202950: After clearing data, clear data button is still ↵Dianne Hackborn2012-09-281-8/+30
|\ \ | | | | | | | | | enabled." into jb-mr1-dev
| * | Fix issue #7202950: After clearing data, clear data button is still enabled.Dianne Hackborn2012-09-271-8/+30
| |/ | | | | | | | | | | | | | | Count the lib symlink against the app's code size. Also be sure to look at the new separate lib path for apps, and tweak the size counting to also count the size of directory entries. Change-Id: I4b0fd5771f249faa05fd72f08062df885902cc97
* | Pass the originating uid to the package verifierBen Gruver2012-09-271-1/+1
|/ | | | | Bug: 6923241 Change-Id: I85a3e0d53b469543cb0551d3a440d2663b5d0697
* Maybe fix issue #7211766: bindService() to User u0 While u10 is...Dianne Hackborn2012-09-261-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | ...Forground Sometimes Doesn't Take The main change here is a one-liner in ActiveServices to check the uid when deciding whether to remove an item from mPendingServices. This could cause the problem being seen -- if the same service for two users is starting at the same time, the second one would blow away the pending start of the first one. Unfortunately I have had trouble reproducing the bug, so I don't know if this is actually fixing it. It's a bug, anyway. The reason so much has changed here is because I spread around logging and printing of the user ID associated with operations and objects to make it easier to debug these kind of multi-user things. Also includes some tweaks to the oom manager to allow more background processes (I have seen many times in logs where we thrash through processes because the LRU list is too short), plus to compensate an additional time-based metric for when to get rid of background processes, plus some new logic to try to help things like Chrome keep around their service processes. Change-Id: Icda77fb2a1dd349969e3ff2c8fff0f19b40b31d3
* Fix issue #6926562: Ensure all multi-user cache files are managed correctlyDianne Hackborn2012-09-241-5/+24
| | | | | | | | | | Now we correctly iterate through the different user cache dirs. Also update documentation to describe the new cache pruning behavior, and deprecate the file modes for making files world readable/writable which we really don't want people using any more. Change-Id: I3708df3ddc697b1f5c511143cce7cc40a5a3d0bd
* Allow acquiring ContentProviders across users.Jeff Sharkey2012-09-211-19/+37
| | | | | | | | | | | | | Otherwise services like SystemUI will always open content://-style Uris as USER_OWNER. Surfaces through createPackageContextAsUser() which points all ContentResolver operations towards a given user. Start using in RemoteViews, so that Notifications correctly resolve image Uris to the sending user. Also add user support for "content" shell tool. Bug: 7202982 Change-Id: I8cb7fb8a812e825bb0b5833799dba87055ff8699
* Query users excluding any being removedAmith Yamasani2012-09-201-1/+1
| | | | | | | | | | Keep track of user creation and last logged-in time. adb shell dumpsys users User switcher shouldn't show users about to be removed. No need to check for singleton for activities. Bug: 7194894 Change-Id: Ic9a59ea5bd544920479e191d1a1e8a77f8b6ddcf
* Merge changes I4ad08873,If0562677,I5fe6ba32 into jb-mr1-devJeff Brown2012-09-111-15/+9
|\ | | | | | | | | | | | | * changes: Don't auto-discover peers until scan requested. Use wfdInfo to filter available sinks. Allow adb shell am display-size to use bigger sizes.
| * Allow adb shell am display-size to use bigger sizes.Jeff Brown2012-09-101-15/+9
| | | | | | | | | | | | | | | | | | | | We now support scaling the logical display to fit the physical display, whatever size it is. So we can allow adb shell am display-size to use more or less arbitrary sizes although we do enforce an upper and lower bound to protect the user. Change-Id: I5fe6ba32ad1f9e4fbcd6915f7d36850b987bbcc0
* | Remove "unlinklib" command from installdKenny Root2012-09-113-125/+30
|/ | | | | | | | | | | unlinklib is no longer necessary since libraries are now either stored in an ASEC container or in /data/app-lib Replace lib directory with a symlink to the /data/app-lib directory even if it's a dangling link. That way developers don't name something "lib" in their directory which gets blown away during an update. Change-Id: I142cf13dba9c13aafbaf0ff8d5e9872cbf1cc910
* Merge "Flesh out multi-user in am commands." into jb-mr1-devDianne Hackborn2012-09-101-35/+116
|\
| * Flesh out multi-user in am commands.Dianne Hackborn2012-09-101-35/+116
| | | | | | | | | | | | | | | | | | | | | | | | Now we default to the current user instead of user 0 for most commands (except where we can do the command for all users). Many more commands take a user argument: force-stop, kill, profile, dumpheap. Improved help text. Change-Id: I719a13b4d31b668f57ca21e51d7043ac3e0d4e1b
* | Merge "IME support for trackball and generic motion events" into jb-mr1-devVictoria Lease2012-09-101-17/+89
|\ \ | |/ |/|
| * IME support for trackball and generic motion eventsVictoria Lease2012-09-101-17/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Trackball and generic motion events now pass through the IME in case it would like to handle them before passing them on to the view hierarchy. While I was at it, I also... ...fixed the documentation on InputMethodService.onKeyUp() ...added documentation to InputMethodService.onTrackballEvent() ...added trackball and generic motion events to the "input" command ...fixed input consistency verification involving ACTION_OUTSIDE Bug: 7050005 Change-Id: I40ab68df4a9542af6df25de6ec2ec500e4c02902
* | Merge "Use correct PowerManager call to wake up screen" into jb-mr1-devGuang Zhu2012-09-091-9/+9
|\ \
| * | Use correct PowerManager call to wake up screenGuang Zhu2012-09-091-9/+9
| | | | | | | | | | | | | | | | | | The current implementation does not actually wakes up the screen. Change-Id: Ief2dca013cfe40e03b64273fe7b09822e9ad42a7
* | | Remove "protect" command from installdKenny Root2012-09-092-37/+0
|/ / | | | | | | | | | | No one uses the "protect" command anymore, so remove it from installd. Change-Id: Ia990bae6f95cd6e317496f5dd173ec15164d7164
* | More multi-user methods in PMAmith Yamasani2012-09-081-4/+8
| | | | | | | | | | | | | | | | pm can list installed packages by user now. Bug: 6926465 Change-Id: I822311bfd6e7e2d6fb315fc484739fbf953c9bb6
* | Merge "installd: fix forward locking symlink" into jb-mr1-devNick Kralevich2012-09-071-7/+7
|\ \
| * | installd: fix forward locking symlinkNick Kralevich2012-09-071-7/+7
| |/ | | | | | | | | | | | | | | installd was not creating a compatibility symlink when installing a forward locked application. Fix. Bug: 7121527 Change-Id: Ied507ab2b759d8658af563e6ac8f0dbb0d286cce
* | Merge "More multi-user stuff:" into jb-mr1-devDianne Hackborn2012-09-072-16/+49
|\ \
| * | More multi-user stuff:Dianne Hackborn2012-09-072-16/+49
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - New (hidden) isUserRunning() API. - Maintain LRU list of visited users. - New FLAG_IS_DATA_ONLY for ApplicationInfo. - Clean up pending intent records when force-stopping a user (or package). (Also fixes bug #6880627: PendingIntent.getService() returns stale intent of force stopped app) - Fix force-stopping when installing an app to do the force-stop across all users for that app. - When selecting which processes to kill during a force stop, do this based on the actual packages loaded in the process, not just process name matching. - You can now use --user option in am when starting activities, services, and instrumentation. - The am --user option accepts "current" and "all" as arguments. - The pm uninstall command now uninstalls for all users, so it matches the semantics of the install command. - PhoneWindowManager now explicitly says to start home in the current user. - Activity manager call to retrieve the MIME type from a content provider now takes a user argument, so it will direct this to the proper user. - The package manager uninstall paths are now implemented around PackageSetting, not PackageParser.Package. This allows them to work even if the application's apk has been removed (in which case it only exists as a PackageSetting, not the PackageParser.Package parsed from the apk). Change-Id: I3522f6fcf32603090bd6e01cc90ce70b6c5aae40
* | Wrapped call to notifyAll() in a synchronized blockFelipe Leme2012-09-061-2/+4
|/ | | | | Change-Id: I452caa56bef4541b53917bdd6f22034161255dd1 Bug: 7118468
* Merge "installd: reduce privileges." into jb-mr1-devNick Kralevich2012-09-042-6/+63
|\