summaryrefslogtreecommitdiffstats
path: root/cmds
Commit message (Collapse)AuthorAgeFilesLines
* Command to move private app data between volumes.Jeff Sharkey2015-04-105-55/+149
| | | | | | | | | | | | | | | New "mvuserdata" command will move all private app data from one volume UUID to another. It leverages the existing "cp" toybox command to do the heavy lifting for all known users, preserving details like timestamps and permissions. It invokes restorecon() to correctly label the new location when the copy is finished. Changes installd to no longer drop capabilities, so we run as root again. This also allows us to exec "cp" with CAP_DAC_OVERRIDE and CAP_FOWNER still in effect. Bug: 19993667 Change-Id: I1f407a7c4a1af97ca5afc27b04eb16b4936cbdef
* Start accepting volume UUIDs from framework.Jeff Sharkey2015-04-093-31/+38
| | | | | | | | | We're now parsing and passing through volume UUIDs sent across the command socket. The "!" argument value is treated as null, which means internal storage. Bug: 19993667 Change-Id: I17729a769ce687a2e94e85991a6338c77ded0b66
* More volume UUID awareness.Jeff Sharkey2015-04-097-148/+115
| | | | | | | | | | | Teach free_cache() and restorecon_data() about building per-volume paths. Also clean up restorecon_data() by using std::string when building paths. Clearer names for path building utility methods, and tests to verify. Bug: 19993667 Change-Id: Iacfbcdaa5b901cc2490bc8eba366dfdeb44f1d93
* Installd: Fix Clang buildAndreas Gampe2015-04-091-5/+2
| | | | | | Remove some unused parameters and variables. Change-Id: I507ae48fe1744b800ceb29192d463fd26c2ccda7
* Merge "Plumb through volume UUID when building paths."Jeff Sharkey2015-04-097-243/+132
|\
| * Plumb through volume UUID when building paths.Jeff Sharkey2015-04-077-243/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since app data paths can live on expanded storage devices, accept the target volume UUID when building paths. The null UUID indicates the default internal storage. To improve readability, start using std::string in several places, which throws when allocations fail. For now, perform last-second sanity checks on incoming path arguments, but we'll eventually want to check arguments as they come through installd.cpp, instead of crashing the entire daemon. Also remove "lib" symlink code from install() and make_user_data(), since we're no longer supporting /data/app-lib. The framework already uses linklib() to create the right symlink for the selected ISA-specific library dir. Bug: 19993667 Change-Id: Ib9343575ffb62bf3981e19375de8f3822fc31e28
* | Merge "installd: Add support for SELF_PATCHOAT_NEEDED."Richard Uhler2015-04-093-26/+40
|\ \
| * | installd: Add support for SELF_PATCHOAT_NEEDED.Richard Uhler2015-04-073-26/+40
| |/ | | | | | | Change-Id: Ib9a6373f98474f1242367b5285086251a9d580e5
* | dumpstate: scrub APANICMark Salyzyn2015-04-081-3/+0
|/ | | | | Bug: 19525200 Change-Id: Ia2d2857cac953fb4ceafb66ddf775d89d7a777b1
* Switch installd to compile as C++.Jeff Sharkey2015-04-076-41/+43
| | | | | | | This is the minimal change needed to switch it over to C++, which paves the way for using more robust utilities like std::string. Change-Id: I80ed6280146875eb6ddbbb340c05450388ca13f0
* Valid APK paths now include expanded storage.Jeff Sharkey2015-04-074-5/+16
| | | | | | | | Apps on expanded storage live at /mnt/expand/<uuid>/app/com.example, so we need to relax one more directory level. Bug: 19993667 Change-Id: I347ec7b92435ea69e632ed5d5fdfabe38ce0b56e
* Use AID_SYSTEM as uid when creating oat dirFyodor Kupolov2015-04-071-12/+2
| | | | | | | | | Previously AID_INSTALL was used, which was causing permission denied errors when PackageManager was trying to recursively rename staging directory Bug: 19550105 Bug: 20087446 Change-Id: I3a9e3056c1fbc1ce0077a3ce52cf77ea6b5085ee
* Merge "Remove useless 'svcmgr_handle' (which had wrong type)."Elliott Hughes2015-04-061-6/+4
|\
| * Remove useless 'svcmgr_handle' (which had wrong type).Elliott Hughes2015-04-031-6/+4
| | | | | | | | | | | | | | Also use the 'ptr' union member rather than 'handle'. Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com> Change-Id: I68e5336cd3af3bc61dbddd2b33d7e1512c0c329c
* | ServiceManager: Print kernel/userspace binder versionSerban Constantinescu2015-04-031-1/+3
|/ | | | | | | | This patch adds extra logging for the binder version in case the userspace and kernel versions differ. Change-Id: I9859b29099726cfcfe5ca23d88ed2e101a06af1a Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
* Fix errors caused by unused variablesFyodor Kupolov2015-04-021-2/+1
| | | | Change-Id: Ie52ae0e9a642504ee7b78c6bc54b61549cfb0342
* Merge "Support for storing OAT files in app directory"Fyodor Kupolov2015-04-023-27/+116
|\
| * Support for storing OAT files in app directoryFyodor Kupolov2015-03-303-27/+116
| | | | | | | | | | | | | | | | | | | | Changes to installd: - dexopt now allows oat_dir param for custom output directory - Added helper method calculate_oat_file_path for calculating oat file output location based on oat_dir and apk_path. Bug: 19550105 Change-Id: I6b079207310583adeb6dad918a58034a059e34c4
* | servicemanager: service_manager missing include for string.hMark Salyzyn2015-04-011-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | service_manager.c gets string.h inherited from private/android_filesystem_config.h it should not rely on this in the future. The intent is to move fs_config function into libcutils and thus deprecate any need for string.h in this include file. Bug: 19908228 Change-Id: Icc95ee02bf02c596463868b1330d209d1bd5c58a
* | Installd: Support dex2oat threads system propertyAndreas Gampe2015-03-301-0/+12
|/ | | | | | | Check dalvik.vm.dex2oat-threads in installd and pass to dex2oat. Bug: 19992386 Change-Id: I5e7806cf560607d31a1d6901dffb14bee538c9cc
* Add trace_event_clock_sync to atraceJohn Reck2015-03-261-0/+13
| | | | Change-Id: I8adce15210d82df09ff3a39ddd8df617aeb16a42
* Store odex files in oat/<isa>/ directory.Richard Uhler2015-03-251-14/+38
| | | | | | | | | | | | | | | Previously odex files were stored alongside the dex location as: dex location: /foo/bar/base.apk odex location: /foo/bar/<isa>/base.odex This changes where odex files are stored, adding an "oat" directory: dex location: /foo/bar/base.apk odex location: /foo/bar/oat/<isa>/base.odex See also the corresponding changes in platform/art and platform/build. Bug: 19550105 Change-Id: I4c6be4f0c41ff175904846db8e360c4af815b265
* Merge "Use verify-at-runtime if debug.usejit is true"Mathieu Chartier2015-03-211-0/+7
|\
| * Use verify-at-runtime if debug.usejit is trueMathieu Chartier2015-03-201-0/+7
| | | | | | | | | | Bug: 19735273 Change-Id: Ib65b50dbde00184544a1341f351a0fe0ef504d32
* | dumpstate: add O_CLOEXECNick Kralevich2015-03-192-11/+11
|/ | | | | | | | Add O_CLOEXEC to various file descriptor calls, to avoid leaking file descriptors to dumpstate's child processes. Bug: 18342188 Change-Id: I74c47a98dfddc29c618067ad53d879b98ed1d87a
* am 5a25a63d: Merge "Installd: Pass debuggable flag"Andreas Gampe2015-03-103-9/+23
|\ | | | | | | | | * commit '5a25a63de2693177b15817fb19b684ca7bfec582': Installd: Pass debuggable flag
| * Installd: Pass debuggable flagAndreas Gampe2015-03-093-9/+23
| | | | | | | | | | | | Pass the debuggable flag from the package manager to dex2oat. Change-Id: Id17ec72babe2ee88713a0d274eff86508de30666
* | am 5fec7915: Merge "service_manager: reorder permission checks for find"Nick Kralevich2015-03-051-16/+14
|\ \ | |/ | | | | | | * commit '5fec79156d749322dcc0376da1d6cf4d9ee9ccf4': service_manager: reorder permission checks for find
| * service_manager: reorder permission checks for findNick Kralevich2015-03-051-16/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reorder the find permission checks. This avoids generating misleading SELinux denials when a service doesn't exist, or when a service is prohibited to isolated apps. The original reason for structuring the code this way is explained in https://android-review.googlesource.com/#/c/100530/4/cmds/servicemanager/service_manager.c@172 The concern at the time was to avoid leaking a situation where a caller could probe for the existance of a service. This turns out to be unnecessary. The same return value is used for both a permission denied and a service not found. The only side effect is the generation of an SELinux audit log, which likely won't be accessible to the calling application. Change-Id: I9760e1821ed16102fa5f9bec07f8c34944565be9
* | am 9d68ed0e: Merge "Add timeout for dump_file."Christopher Ferris2015-02-263-39/+85
|\ \ | |/ | | | | | | * commit '9d68ed0ecd3a101c13a163cfe730b13b1564b442': Add timeout for dump_file.
| * Merge "Add timeout for dump_file."Christopher Ferris2015-02-263-39/+85
| |\
| | * Add timeout for dump_file.Christopher Ferris2015-02-253-39/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It turns out dump_file is used on a number of /proc and system files. In one case, the read of a file stalled and caused a bugreport to hang forever. It's still possible if there is a kernel bug that this could stall forever, but less likely. Also, change the return type of nanotime to uint64_t. Testing: - Created a named fifo and verified that dump_file fails with a timeout. - Created a large /data/anr/traces.txt to verify that large files still dump properly and that the additional NONBLOCK parameter doesn't cause a problem. - Created a dummy /data/tombstones/tombstone_00 to verify that the dump of these files still works. - Compared a dump using the old dumpstate to the new dumpstate to verify nothing obviously different. Bug: 19117030 Change-Id: I0d3dd27583c853cdaccd2fd278748cb5f9ccd4fb
* | | am bb67beca: Merge "dumpstate: add pstore read"Mark Salyzyn2015-02-261-0/+4
|\ \ \ | |/ / | | | | | | | | | * commit 'bb67beca35e7d570ede193a316a92022fbc2f810': dumpstate: add pstore read
| * | dumpstate: add pstore readMark Salyzyn2015-02-261-0/+4
| |/ | | | | | | | | | | | | | | Call logcat -L to pull any LAST Android logs. If the kernel is not configured for PSTORE and PSTORE_PMSG, the hopes are the empty content will pressure vendors to slice up and configure support. Change-Id: I5fddfa1e0f59f24fccc30b257ba68af8a8cf8640
* | Merge commit '26cc3d0b67ff4daf31eaeed0ecd87b391978aadb' into HEADBill Yi2015-02-193-12/+39
|\ \ | |/ |/|
| * am 8511b3ae: Merge "Remove -z option."Christopher Ferris2015-02-103-49/+8
| |\ | | | | | | | | | | | | * commit '8511b3ae5eb42810f97f7c3e993d7f80d3393b83': Remove -z option.
| * \ am 50ad67e4: Merge "Add better timeout mechanism for running commands."Christopher Ferris2015-02-041-18/+69
| |\ \ | | | | | | | | | | | | | | | | * commit '50ad67e4ce6b07b5f5f4649ace81ed9a8b2c2eac': Add better timeout mechanism for running commands.
| * \ \ am 51bfedd8: Merge "Add missing includes."Elliott Hughes2015-01-302-0/+2
| |\ \ \ | | | | | | | | | | | | | | | | | | | | * commit '51bfedd821c79ae34ee1caffd9ae958faa71ecec': Add missing includes.
| * \ \ \ am 0e17a265: Merge "Switch dumpstate to "ip link list"."Elliott Hughes2015-01-281-1/+2
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * commit '0e17a265f5e8bf233a3e3b74fc03ada3dc467bed': Switch dumpstate to "ip link list".
| * \ \ \ \ am 346329b7: Merge "Move atrace from the obsolete bzero to memset."Elliott Hughes2015-01-251-1/+2
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '346329b7a70b594895be0aec5dc00f9f4108b533': Move atrace from the obsolete bzero to memset.
| * \ \ \ \ \ am c0e10c6f: Merge "Refactor of the bugreport code."Christopher Ferris2015-01-233-57/+94
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'c0e10c6f03eaa126aeb745e0b209ad0b219ade6e': Refactor of the bugreport code.
| * \ \ \ \ \ \ am 457731f6: Use the timeout stack dump functions.Christopher Ferris2015-01-151-5/+13
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '457731f69e3106b5aae8fc04f9565af1d875876c': Use the timeout stack dump functions.
| | * | | | | | | Use the timeout stack dump functions.Christopher Ferris2015-01-141-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the native stack dumping functions that allows time outs. If debuggerd locks up, before a bugreport would hang forever. Now it will timeout properly and still get all of the other information. Bug: 18766581 Change-Id: I85053b8dcfe6224e2b64b4d8f7f2ef448b3cda34
| | * | | | | | | Fix message when a command times out.Christopher Ferris2015-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous version printed out the nanoseconds elapsed, not seconds. Bug: 18766581 (cherry picked from commit 67c5a8af9ed128d8bb56d4723303aef6f0a4500f) Change-Id: Icbaaee83a92767694fd98e3c790f36f4d24681b0
| | * | | | | | | Installd: Swap file for dex2oatAndreas Gampe2014-12-181-5/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add swap file support for dex2oat to installd. Only use in low-memory mode. Bug: 18596910 Change-Id: I131448f3907115054a592af73db86d2b9257ea33
| * | | | | | | | am 4f9bfffe: Merge "Fix message when a command times out."Christopher Ferris2015-01-121-1/+1
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '4f9bfffe23d40fdaabe91ea7c7691e52800edb79': Fix message when a command times out.
| * \ \ \ \ \ \ \ \ am 96e4409e: Merge "Installd: Disallow relocation for decryption"Andreas Gampe2015-01-071-15/+24
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '96e4409e8c38b1d79285eca9886d44ff850b5748': Installd: Disallow relocation for decryption
| * \ \ \ \ \ \ \ \ \ am d3255076: Merge "Installd: Swap file for dex2oat"Andreas Gampe2014-12-221-3/+59
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'd325507698d8379e431a8c8fefcfafe59956bd88': Installd: Swap file for dex2oat
| * \ \ \ \ \ \ \ \ \ \ am 1be4021c: Merge "Installd: Remove dalvik paths"Andreas Gampe2014-12-161-42/+4
| |\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '1be4021c2a867c7e067a3c5b937a054f0eb7817f': Installd: Remove dalvik paths
| * \ \ \ \ \ \ \ \ \ \ \ am e8a4dce8: Merge "Work on issue #18486438: Reduce size of bugreport ↵Dianne Hackborn2014-11-251-3/+0
| |\ \ \ \ \ \ \ \ \ \ \ \ | | | |_|_|_|/ / / / / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | output" into lmp-mr1-dev * commit 'e8a4dce8169ba5fdcd86a5fc29aa6986de1711b0': Work on issue #18486438: Reduce size of bugreport output