summaryrefslogtreecommitdiffstats
path: root/cmds
Commit message (Collapse)AuthorAgeFilesLines
* Installd: Take boot status as dexopt parameterAndreas Gampe2015-09-213-16/+7
| | | | | | | | | Expect the boot status explicitly as a parameter so that we do not have to rely on dev.bootcomplete, which isn't meaningfully set when the device needs the decryption screen on boot. Bug: 23898216 Change-Id: I9b34298caf70b1e5d40970cc0d04c469016a80a7
* Merge "Installd: Allow different behavior before bootcomplete" into mnc-dr-devAndreas Gampe2015-09-161-12/+43
|\
| * Installd: Allow different behavior before bootcompleteAndreas Gampe2015-09-161-12/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check dev.bootcomplete in dex2oat(). Use the information for two changes. Only switch to the background when we're post bootcomplete. This will ensure better utilization after upgrades. Add a second dex2oat-threads property that is used pre bootcomplete. A separation of these phases allows using less cores when the device is up, freeing up resources for other purposes, e.g., avoid jank. The precedence during boot is the boot property, or the image property if the former doesn't exist, or the default property as a fallback. Bug: 23898216 Bug: 24004256 Change-Id: I5063f3fc4b437cbe88c4e94584e01c1c78eccc4d
* | Dump the ND offload status and address table in bugreports.Lorenzo Colitti2015-09-091-13/+15
|/ | | | | | | | | Also, move NetworkDiagnostics between the two runs of getting the wifi counters, so we can see the effect on the counters of sending our probe packets. Bug: 23661687 Change-Id: I3f81c003a35f50ac1cb8e77d0a8c73dae4fd91f3
* Map realtime to clock_monotonic.Martijn Coenen2015-08-311-3/+21
| | | | | | | | | | | | | | This maps a monotonic timestamp to the corresponding real-time timestamp, which can be used to match up the traces with other logs that use real-time. Also write clock_sync records first instead of at the end, to avoid not being to write it due to the buffer being full. Bug: 23668823 Change-Id: I644aeea496197e194ec30f808f754e3e043d905f
* dumpstate: add logcat -b all -SMark Salyzyn2015-08-111-0/+2
| | | | | | | | | | | | | | | | | | (cherry pick from commit e3c4df96083231b519dad919fd0ed6624100b368) - For those that are proud to call themselves logspam police - Every time someone declares that something is too chatty, or that they lost their logs because they were declared too chatty and their associated logs were aggresively pruned we generally ask them to report the logger statistics to pinpoint what software product that is the elephant in the room. - Every time we want to spawn a new 'stop being so spammy' bug spawned off a bugreport collected for another purpose, we *wish* we had the logger statistics to help add gravitas to the claim that some piece of software is the top, or near the top, polluter. Bug: 22351810 Change-Id: Ifae33cd21d0ae2917a3b4381502d723725b1701c
* Only restorecon_data once for all users.Jeff Sharkey2015-07-201-4/+4
| | | | | | | | | | restorecon_data already iterates across all found users internally, so we don't need to call it for each UID moved. In fact, this was a bug that caused data for the owner to be relabeled when moving apps back to internal storage. Bug: 21813384 Change-Id: I5ba76d4f30d129365864c8a25b665f344b99a6b4
* Installd: Add a swap override flagAndreas Gampe2015-07-161-7/+36
| | | | | | | | Add dalvik.vm.dex2oat-swap system property to override a default decision. Bug: 20658562 Change-Id: I34368c6e435d1a9ceec20a0bf1c8c6213e527f5e
* Split app move into separate copy/delete steps.Jeff Sharkey2015-07-073-18/+8
| | | | | | | | | | | App movement now has three distinct stages: copying, scanning, and cleanup. Previously, a battery pull late in the move process would end up with packages.xml pointing at the old location which had been torn down. Now, we update packages.xml to point at the new location as the "source of truth" before we start deleting the old location. Bug: 21831336 Change-Id: I62b8916c673265c240e2574ea968cdce5a7a0074
* Fix directory path of codecache.Daichi Hirono2015-06-241-1/+1
| | | | | | | | | Previously installd removed the normal cache directory when delete_code_cache is called. It should delete the code cache directory. BUG=21206499 Change-Id: I5774430e389e22805fa7984b4c83420c3677ca75
* Rename --include-cfi to --generate-debug-info.David Srbecky2015-06-191-4/+4
| | | | | | | | | This follows a change in dex2oat. (cherry picked from commit 741a6ff2e264b96edbca3ac95e720b21c8e39382) Bug: 21924613 Change-Id: I6b2df1668fdd09d82cfe86e6e51360b954b6c8a9
* Installd: Add debug.gencfi to run_dex2oatAndreas Gampe2015-06-191-3/+15
| | | | | | | | | | Add the debug.gencfi system property that forces generation of CFI data. (cherry picked from commit 816243d470bade03c264e67e39590f6852581898) Bug: 21924613 Change-Id: Ida66f8c1567634d05cfdbba1a982be3684e94369
* dumpstate: modify logcat timeout to compensate for storage speedMark Salyzyn2015-06-151-3/+118
| | | | | | | | | | | | (cherry pick from commit f989162bb89dff6387f2021101306a1be6d875f7) Discover the logcat buffer size, divide by the worst storage speed in kb/s, and multiply by ten to estimate the timeout in ms for each named buffer. If that value is less than 20 seconds, then select 20 seconds. Apply this to each logcat request. Bug: 21555259 Change-Id: Id36aebff83cb06e94350e4a84fa266b66a8444fc
* Merge "Remove Bluedroid kernel dump from dumpstate." into mnc-devSharvil Nanavati2015-06-121-1/+0
|\
| * Remove Bluedroid kernel dump from dumpstate.Sharvil Nanavati2015-06-121-1/+0
| | | | | | | | | | | | | | Bluedroid doesn't have much of a kernel component and no devices expose a bluedroid node in debugfs. Change-Id: I5600e88c543a109257d95591704a8f2a7261dfdc
* | Merge "Incorporate network diagnostics during a bugreport" into mnc-devErik Kline2015-06-091-0/+2
|\ \
| * | Incorporate network diagnostics during a bugreportErik Kline2015-06-091-0/+2
| |/ | | | | | | | | Bug: 21449922 Change-Id: I81a3774683c08f5d4ab4ea75bec45d279fb210ec
* | Add an installd command to link filesNarayan Kamath2015-06-094-9/+51
|/ | | | | | | | | | Given a pair of absolute paths {from_path, to_path} , check that they are both valid apk subpaths (eg. /data/app/package/foo) and link(2) to_path to from_path. This is required by staged installs, where we link existing apks and oat files to their staging location. bug: 20889739 Change-Id: I3b5e3b43677af68be59308121a4409caaa6a72f0
* Call selinux_status_open() prior to use of selinux_status_updated().Stephen Smalley2015-06-031-0/+1
| | | | | | | | | | | | The selinux_status_*() interfaces require calling selinux_status_open() first. Since this was not being called by servicemanager, the selinux_status_updated() call was always failing and servicemanager was not reloading service_contexts upon a policy reload. (cherrypicked from commit bea0746b241d15626cf0a56828efc1d4640dbda7) Change-Id: I6ac62e114bbca99c5f0999feb918fcde15009274 Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
* Don't use TEMP_FAILURE_RETRY on close in frameworks/native.Elliott Hughes2015-05-152-2/+2
| | | | | | Bug: http://b/20501816 Change-Id: Id13a62f02243c6c4831e2f47944dc34fa822f5b6 (cherry picked from commit 997abb668b9248c2174c6cf169a0b7c6a02fd2cb)
* Fix async_stopJohn Reck2015-05-151-1/+1
| | | | Change-Id: I68a258cf71cfcd999bbd568ab3c96255c11bec41
* Added Voltage and Current regulator ftrace events to atraceAaron Schulman2015-05-071-0/+3
| | | | | | | | | | | | | | | | | | | | Cherry-pick of c2c6ecd1195481f5813a721a7d20a73c0795c135 from AOSP Tracing the state of the voltage and current regulators enables a developer to attribute power consumption measurements to specific perhipherals and cores. Unlike other indirect methods of tracing when peripherals and cores are toggled, the regulator ftrace event indicates the exact point in time when the kernel switches on or off the device. For example, in the following trace, a developer can see exactly when the krait2 core starts receiving power, and and when the voltage is set for voltage scaling. mpdecision-2172 [000] ...1 1566.665481: regulator_enable: name=krait2 mpdecision-2172 [000] ...1 1566.665493: regulator_enable_delay: name=krait2 mpdecision-2172 [000] ...1 1566.665495: regulator_enable_complete: name=krait2 <...>-4133 [002] ...1 1566.666891: regulator_set_voltage: name=krait2 (1075000-1100000) Change-Id: Ia322206ef74496daf1d9baa03545d8e89e398487 Signed-off-by: Aaron Schulman <aschulman@google.com>
* dumpstate: report per-partition MMC performanceMark Salyzyn2015-05-013-1/+141
| | | | | | (Cherry pick from commit 540e3de99fa1baa5eaf3eb3d49f4e98fd9f5bd91) Change-Id: If5cabe186d8377056effa1c0672a90e277cd7221
* Offer to move both code and data together.Jeff Sharkey2015-04-305-98/+201
| | | | | | | | | | | | | We now move code under /data/app/com.example when a complete move is requested. This really only works for new cluster-style installs that also have native libraries and OAT contained inside. Teach measuring code about cluster-style installs when measuring app footprint. Also offer to measure private data space for all users. Bug: 19993667, 20275578 Change-Id: I6df7b947cb5cc8a4552f56f4b64a661e8512389f
* Inclide checkin format of dumpsys package in bugreport.Ashish Sharma2015-04-281-0/+1
| | | | Change-Id: I809377f80e314b358eba22fa916e53c81cac2c47
* am a36a43b3: am c200d20e: am dfc30ae3: Merge "Command to move private app ↵Jeff Sharkey2015-04-105-55/+149
|\ | | | | | | | | | | | | data between volumes." * commit 'a36a43b354b248cef9407de42fb6b87e1c7085f6': Command to move private app data between volumes.
| * 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
* | am 8571e647: am 997eb5dd: am 44a38d93: Merge "Start accepting volume UUIDs ↵Jeff Sharkey2015-04-093-31/+38
|\ \ | |/ | | | | | | | | | | from framework." * commit '8571e647da1e9c2227d22034ba6462235273cb02': Start accepting volume UUIDs from framework.
| * 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
* | am ad6f4996: am 25327881: am 066fadb9: Merge "More volume UUID awareness."Jeff Sharkey2015-04-097-148/+115
|\ \ | |/ | | | | | | * commit 'ad6f4996dc909dcb8e6e369bf41be514077fb142': More volume UUID awareness.
| * 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
* | am 6930a29a: am cae83eca: am f9ab2ad2: Merge "Installd: Fix Clang build"Andreas Gampe2015-04-091-5/+2
|\ \ | |/ | | | | | | * commit '6930a29af13f4a958fa7cba544233d2febe4040b': Installd: Fix Clang build
| * Installd: Fix Clang buildAndreas Gampe2015-04-091-5/+2
| | | | | | | | | | | | Remove some unused parameters and variables. Change-Id: I507ae48fe1744b800ceb29192d463fd26c2ccda7
* | am 65fe5dfd: am cbde9b92: am d107c305: Merge "Plumb through volume UUID when ↵Jeff Sharkey2015-04-097-243/+132
|\ \ | |/ | | | | | | | | | | building paths." * commit '65fe5dfdcd08650e0dfbb39f4a716567fb910cab': Plumb through volume UUID when building paths.
| * 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
* | | am b8d1ee37: am 19db8c88: am ab91d03b: Merge "installd: Add support for ↵Richard Uhler2015-04-093-26/+40
|\ \ \ | |/ / | | | | | | | | | | | | | | | SELF_PATCHOAT_NEEDED." * commit 'b8d1ee37c4a6897442f5d381d5eb7162e04fcebd': installd: Add support for SELF_PATCHOAT_NEEDED.
| * | 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
* | | am d029e95a: am 1b0a8702: am ad436ab5: Merge "dumpstate: scrub APANIC"Mark Salyzyn2015-04-081-3/+0
|\ \ \ | |/ / | | | | | | | | | * commit 'd029e95a58ea0927ebd3431d9991cd316e568002': dumpstate: scrub APANIC
| * | dumpstate: scrub APANICMark Salyzyn2015-04-081-3/+0
| |/ | | | | | | | | Bug: 19525200 Change-Id: Ia2d2857cac953fb4ceafb66ddf775d89d7a777b1
* | am eb3704a5: am 9e99fce8: am 1cd030be: Merge "Switch installd to compile as ↵Jeff Sharkey2015-04-076-41/+43
|\ \ | |/ | | | | | | | | | | C++." * commit 'eb3704a58e62c0f85cfea776df1040b677263c80': Switch installd to compile as C++.
| * 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
* | am b58e6cbf: am 4914f85f: am 8f43f77d: Merge "Use AID_SYSTEM as uid when ↵Fyodor Kupolov2015-04-071-12/+2
|\ \ | |/ | | | | | | | | | | creating oat dir" * commit 'b58e6cbfa726add05bbe5e31e8ca13815ccf2049': Use AID_SYSTEM as uid when creating oat dir
| * 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 "Valid APK paths now include expanded storage."Jeff Sharkey2015-04-074-5/+16
|\ \
| * | Valid APK paths now include expanded storage.Jeff Sharkey2015-04-064-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
* | | Merge "Add support for int64, float, double types to service command."Jeff Brown2015-04-071-2/+32
|\ \ \
| * | | Add support for int64, float, double types to service command.Jeff Brown2015-04-061-2/+32
| | | | | | | | | | | | | | | | | | | | | | | | Comes in handy for invoking transactions that require these types. Change-Id: I8f14519a2531ab2ec7f3218ecda6d1868f6dd7b3