summaryrefslogtreecommitdiffstats
path: root/toolbox
Commit message (Collapse)AuthorAgeFilesLines
* Switch md5 over to openssl rather than libc.Elliott Hughes2014-06-092-68/+66
| | | | | | | | | It doesn't make any sense for the C library to contain private stuff that's only used by toolbox. Rather than move that stuff out of bionic and into here, let's just use the same MD5 implementation the rest of the system's using. Change-Id: Ia1c73164124094b532af3453b90c4bd1ebfdaa24
* Remove unnecessary #includes of <sys/atomics.h>.Elliott Hughes2014-05-221-2/+0
| | | | | Bug: 14903517 Change-Id: I5b0a418dd982f1a2fd90609b12bd8364f7f34996
* toolbox: fix x86 buildGreg Hackmann2014-05-211-2/+2
| | | | | Change-Id: Iadedae749b31adb1310fa50a68b2dc19097c3654 Signed-off-by: Greg Hackmann <ghackmann@google.com>
* toolbox: fix buildGreg Hackmann2014-05-212-3/+3
| | | | | Change-Id: I4d37ae4ad19620f77e37b739fb1248b712b3f986 Signed-off-by: Greg Hackmann <ghackmann@google.com>
* Merge "toolbox: turn on -Werror"Mark Salyzyn2014-05-2127-84/+58
|\
| * toolbox: turn on -WerrorMark Salyzyn2014-05-1427-84/+58
| | | | | | | | | | | | | | | | | | - Deal with some signedness issues - Deal with some size issues - Deal with NULL pointer issues - Deal with some -Wunused issues Change-Id: I1479dd90d690084491bae3475f2c547833519a57
* | Merge ""stop" / "start must apply to the secondary zygote as well."Narayan Kamath2014-05-152-0/+2
|\ \
| * | "stop" / "start must apply to the secondary zygote as well.Narayan Kamath2014-05-132-0/+2
| |/ | | | | | | | | | | | | | | | | Would've been nice if we could use the sys property observer to start and stop all services in a service class but service classes do not appear to be fully supported. Change-Id: Iaf17a2dbcf913c4c646bc1e8e13adee9f952c45e
* | Merge "ps: add flag to show ABI"Kenny Root2014-05-151-4/+47
|\ \
| * | ps: add flag to show ABIKenny Root2014-05-141-4/+47
| |/ | | | | | | | | | | | | Allow us to easily identify the 32/64 bitness of the process. Yes, I know this is not technically an ABI, but it seemed close enough! Change-Id: Ia03a17fd74d61e7619911cb26b3dd7d82b62930c
* | Clean up some unnecessary system_properties cruft.Elliott Hughes2014-05-141-3/+0
|/ | | | | Bug: 14970171 Change-Id: I6f54c35e265b849be914120f795c9f8e0cec34bb
* Merge "Fix top(1) SIGPIPE behavior."Elliott Hughes2014-04-192-12/+17
|\
| * Fix top(1) SIGPIPE behavior.Elliott Hughes2014-04-182-12/+17
| | | | | | | | | | Bug: 14166609 Change-Id: I4aad1e0db2e875735405d094fb0d1a36862b5b19
* | Fix buffer overflow in syren utilitynks2014-04-131-2/+6
| | | | | | | | | | | | | | | | | | | | Patch for https://code.google.com/p/android/issues/detail?id=68268 A length check for the argv[2] was added in order to prevent buffer overflow. Also replace strcpy with strlcpy. Signed-off-by: nks <nks@sixserv.org> Change-Id: If65b83e9b658315c672e684f64e3ae00e69fac31
* | Move date off the non-portable bionic32 'strtotimeval'.Elliott Hughes2014-04-071-4/+34
|/ | | | Change-Id: Ib706d3a536c409810cfbc47270448c6375314506
* toolbox: ls: 64 bit compile warningsMark Salyzyn2014-03-141-3/+3
| | | | Change-Id: Ia538c7177f8d5cf2c1f0efb5b575da6527c13968
* toolbox: schedtop 64 bit build issueMark Salyzyn2014-03-131-15/+13
| | | | Change-Id: I77b8ca2c32b9ff33abb6acadae47f0ab47b47907
* fix: making lsof show devies and loaded .so file names correctlyDmitriy Ivanov2014-03-041-1/+1
| | | | Change-Id: I4b6f2e0015f8cfa18400fa4bd08460a07e29a51b
* Declare (and simplify) uid_from_user.Elliott Hughes2014-02-283-12/+41
| | | | | | | | | uid_from_user doesn't need to cope with numeric ids in the BSD code like it did with the old Android code; the caller now handles those. Also explain what SUPPORT_DOT is for. Change-Id: I185c9f02b7039795069aa30545563b8a6ef54cd5
* Merge "Switch to BSD chown (for -R, primarily)."Elliott Hughes2014-03-013-69/+354
|\
| * Switch to BSD chown (for -R, primarily).Elliott Hughes2014-02-283-69/+354
| | | | | | | | Change-Id: I45381b8a04f4cb651123a2d43860418e06df6e65
* | Fix grep -f.Elliott Hughes2014-02-281-2/+0
|/ | | | | | bionic has getline now. Change-Id: I5e4ee137768ab3113dbe8a07406fa39f4b6546af
* Remove unused #includes of <asm/page.h>.Elliott Hughes2014-02-243-3/+0
| | | | | | (<asm/page.h> is going away.) Change-Id: Id0d7ad0eb791cd47490c48458f9f8a6468ddf5c9
* Add -D option to restorecon for relabeling /data/data.Stephen Smalley2014-02-181-2/+5
| | | | | | | This depends on change I137588013ed1750315702c0dbe088ce3e4a29e83. Change-Id: I5a4fef9affd6cddf98d72dc9d54899be25741779 Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
* Merge "Convert all selinux_android_restorecon and _setfilecon calls to new API."Nick Kralevich2014-02-121-1/+1
|\
| * Convert all selinux_android_restorecon and _setfilecon calls to new API.Stephen Smalley2014-02-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | libselinux selinux_android_restorecon API is changing to the more general interface with flags and dropping the older variants. Also get rid of the old, no longer used selinux_android_setfilecon API and rename selinux_android_setfilecon2 to it as it is the only API in use. Change-Id: I1e71ec398ccdc24cac4ec76f1b858d0f680f4925 Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
* | Remove a pre-uapi hack from nandread.Elliott Hughes2014-02-071-4/+0
|/ | | | | | We only have uapi headers now. Change-Id: I2c02e10bb3bba4006579772f3ab2a18c2df7535d
* Unify toolbox restorecon and libselinux restorecon implementations.Stephen Smalley2014-02-061-92/+15
| | | | | | | | | | | | | | | | Extend the libselinux restorecon implementation to allow reuse by the toolbox restorecon command. This simply requires adding support for the nochange (-n) and verbose (-v) options to the libselinux functions and rewriting the toolbox restorecon command to use the libselinux functions. Also add a force (-F) option to support forcing a restorecon_recursive even if the restorecon_last attribute matches the current file_contexts hash so that we can continue to force a restorecon via the toolbox command for testing or when we know something else has changed (e.g. for when we support relabeling /data/data and package information has changed). Change-Id: I92bb3259790a7195ba56a5e9555c3b6c76ceb862 Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
* Fix 'r' for LP64.Elliott Hughes2014-01-171-25/+31
| | | | Change-Id: I8332a0a8045a70b3992fe34b0b9e334a721265a9
* Remove obsolete 'setconsole' command.Elliott Hughes2014-01-162-162/+0
| | | | Change-Id: I643a48653006b97bb10d7b996ecc003dbafad590
* system/core 64-bit cleanup.Elliott Hughes2014-01-169-28/+15
| | | | | | | | | This cleans up most of the size-related problems in system/core. There are still a few changes needed for a clean 64-bit build, but they look like they might require changes to things like the fastboot protocol. Change-Id: I1560425a289fa158e13e2e3173cc3e71976f92c0
* toolbox: Fix date tool with /dev/alarmBenoit Goby2014-01-091-1/+1
| | | | | Change-Id: I6f8ad2149244c89690d5d5caae8ec55429462210 Signed-off-by: Benoit Goby <benoit@android.com>
* SWAP_FLAG_* constants are now in <sys/swap.h>.Elliott Hughes2014-01-071-6/+0
| | | | | Bug: 9336527 Change-Id: I77e2b05cefbfb4eebda39b4079107833f4160563
* toolbox-ls: re-introduce clobbered error messageWilliam Roberts2014-01-031-0/+1
| | | | | | | commit 403b1955 clobbered the error message on lstat() calls. Change-Id: Idbd24b648e3a85079b8f8541c0798bf944485ca1
* toolbox: date: use RTC subsystem on devices without /dev/alarmGreg Hackmann2013-12-171-14/+80
| | | | | Change-Id: I48c0fd1f4cffef936afb8d48d6d93babf006004d Signed-off-by: Greg Hackmann <ghackmann@google.com>
* toolbox: date: fix parameter type warningsGreg Hackmann2013-12-171-1/+1
| | | | | Change-Id: I810a9abee8bc0061c5007fe08197384f2b85754b Signed-off-by: Greg Hackmann <ghackmann@google.com>
* toolbox: uptime: use clock_gettime() on devices without /dev/alarmGreg Hackmann2013-12-171-4/+14
| | | | | Change-Id: Id7287ca179cc0b8390c054803a25a961dd550a34 Signed-off-by: Greg Hackmann <ghackmann@google.com>
* toolbox: uptime: fix unused parameter warningsGreg Hackmann2013-12-171-1/+2
| | | | | Change-Id: Id240ce85bf09e1a81f4e2e2a7496ac7952edbf38 Signed-off-by: Greg Hackmann <ghackmann@google.com>
* Minor cleanups.Nick Kralevich2013-11-271-3/+3
| | | | | | | | | | | | Use ssize_t for handling the result of a readlink call. Fix the following compiler warning: system/core/toolbox/ls.c: In function 'listfile_maclabel': system/core/toolbox/ls.c:238:68: warning: unused parameter 'flags' [-Wunused-parameter] static int listfile_maclabel(const char *path, struct stat *s, int flags) Change-Id: Idd65f3349fb9dfb6f7a374c81f72d3169af33505
* Increase buffer size, use bounds checking functionsNick Kralevich2013-11-271-16/+16
| | | | | | | | | | | Increase the size of the user/group buffer from 16 bytes to 32 bytes. Some OEMs are creating usernames longer than 15 bytes, causing problems. Use bounds checking functions when handling user/group data, to avoid overflowing buffers. Change-Id: I4a5824b819b0c37662ba4f33573af0d0e071b444
* Merge commit '536dea9d61a032e64bbe584a97463c6638ead009' into HEADThe Android Open Source Project2013-11-2211-82/+366
|\ | | | | | | Change-Id: I5c469a4b738629d99d721cad7ded02d6c35f56d5
| * Add standard options to readlinkMichael Wright2013-08-221-8/+44
| | | | | | | | Change-Id: I4c2624d22ce879a3578d5b17440a9895b19e2f1f
| * Add basic readlink commandMichael Wright2013-08-192-1/+61
| | | | | | | | Change-Id: I693c1098e6c6d107a9e97285bf826ab153a1c8f0
| * Move liblog headers to system/core/include/logColin Cross2013-07-241-1/+1
| | | | | | | | | | | | | | | | | | Move the liblog headers to log/ instead of cutils/ to complete the separation of libcutils and liblog. cutils/log.h still exists and includes log/log.h in order to support the many existing modules that use cutils/log.h. Change-Id: I2758c9f4aedcb809ca7ba8383d0f55041dd44345
| * Merge "toolbox: swap utils"Rom Lemarchand2013-07-024-1/+192
| |\
| | * toolbox: swap utilsRom Lemarchand2013-06-254-1/+192
| | | | | | | | | | | | | | | | | | | | | Add swap utilities (mkswap, swapon, swapoff) to the toolbox Change-Id: If5ed6981670a1cdda6b528b587dbc1be7ccdf832 Signed-off-by: Rom Lemarchand <romlem@google.com>
| * | Merge "Do not exit early on errors when -f is specified"Ken Sumrall2013-06-281-4/+11
| |\ \
| | * | Do not exit early on errors when -f is specifiedKen Sumrall2013-06-261-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running with the -f option, do not stop recursion or proccessing command line args if an error occurs. Continue trying to remove all the items specified on the command line. However, still return an error status if some files could not be removed. Change-Id: I83d66babe833da8a68aad68248647ba0601c5d32
| * | | Merge "Update the touch command to take a human readable timestamp"Ken Sumrall2013-06-281-4/+31
| |\ \ \ | | |/ / | | | / | | |/ | |/|
| | * Update the touch command to take a human readable timestampKen Sumrall2013-06-261-4/+31
| | | | | | | | | | | | | | | | | | | | | Now the -t option to the toolbox touch command takes a timestamp in the form of YYYYMMDD.hhmmss Change-Id: I3812700edaa1a06590a07c15b050721b49e9b7e0