summaryrefslogtreecommitdiffstats
path: root/toolbox
Commit message (Collapse)AuthorAgeFilesLines
...
| * SWAP_FLAG_* constants are now in <sys/swap.h>.Elliott Hughes2014-01-071-6/+0
| | | | | | | | | | Bug: 9336527 Change-Id: I77e2b05cefbfb4eebda39b4079107833f4160563
* | am 05bfe7fb: am ceb1c5cd: am 49264407: am 7139b0c7: Merge "toolbox-ls: ↵Nick Kralevich2014-01-031-0/+1
|\ \ | |/ | | | | | | | | | | re-introduce clobbered error message" * commit '05bfe7fb95540bae6a42a745fe3bcc1d39a67a7c': toolbox-ls: re-introduce clobbered error message
| * toolbox-ls: re-introduce clobbered error messageWilliam Roberts2014-01-031-0/+1
| | | | | | | | | | | | | | commit 403b1955 clobbered the error message on lstat() calls. Change-Id: Idbd24b648e3a85079b8f8541c0798bf944485ca1
* | am 796be8f1: am b1a82bcb: am f1da46d2: am d27498cb: Merge "toolbox: date: ↵Greg Hackmann2013-12-181-14/+80
|\ \ | |/ | | | | | | | | | | use RTC subsystem on devices without /dev/alarm" * commit '796be8f1432fd02d83f2dae9dbcf11a0976df3b5': toolbox: date: use RTC subsystem on devices without /dev/alarm
| * 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>
* | am 619376f4: am e34618a2: am d2ac1d8c: am eb3e9daf: Merge "toolbox: date: ↵Greg Hackmann2013-12-181-1/+1
|\ \ | |/ | | | | | | | | | | fix parameter type warnings" * commit '619376f41fb93ceb9fa634e9ddc561b90be01e23': toolbox: date: fix parameter type warnings
| * toolbox: date: fix parameter type warningsGreg Hackmann2013-12-171-1/+1
| | | | | | | | | | Change-Id: I810a9abee8bc0061c5007fe08197384f2b85754b Signed-off-by: Greg Hackmann <ghackmann@google.com>
* | am 07dbb562: am 9d1de8a8: am 0e23a3d4: am 215f78ae: Merge "toolbox: uptime: ↵Greg Hackmann2013-12-181-4/+14
|\ \ | |/ | | | | | | | | | | use clock_gettime() on devices without /dev/alarm" * commit '07dbb562a848af658f65cd41864f31aab5f4b955': toolbox: uptime: use clock_gettime() on devices without /dev/alarm
| * 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>
* | am e75af574: am 70f22d6b: am 066a3862: am 83a76637: Merge "toolbox: uptime: ↵Greg Hackmann2013-12-181-1/+2
|\ \ | |/ | | | | | | | | | | fix unused parameter warnings" * commit 'e75af5745440eb70d1f5682168edb84eaa631982': toolbox: uptime: fix unused parameter warnings
| * toolbox: uptime: fix unused parameter warningsGreg Hackmann2013-12-171-1/+2
| | | | | | | | | | Change-Id: Id240ce85bf09e1a81f4e2e2a7496ac7952edbf38 Signed-off-by: Greg Hackmann <ghackmann@google.com>
* | am bfb1d8a2: am af9e9d97: am f0a68b54: am 8779c4ea: Merge "Minor cleanups."Nick Kralevich2013-12-111-3/+3
|\ \ | |/ | | | | | | * commit 'bfb1d8a27532180dd08fc48190aed464abbdd8b8': Minor cleanups.
| * 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
* | Merge "Getevent: make sure the monotonic timestamp is displayed; warning ↵Sasha Levitskiy2013-12-111-4/+10
|\ \ | | | | | | | | | cleanup."
| * | Getevent: make sure the monotonic timestamp is displayed; warning cleanup.Sasha Levitskiy2013-12-101-4/+10
| | | | | | | | | | | | | | | Change-Id: I6c500ab55470155ddf692fe5f655bdd575f195f5 Signed-off-by: Sasha Levitskiy <sanek@google.com>
* | | am 5e362c87: am 71e096c8: Merge "Increase buffer size, use bounds checking ↵Nick Kralevich2013-12-021-16/+16
|\ \ \ | | |/ | |/| | | | | | | | | | | | | functions" * commit '5e362c871a7b79b12e91a8737606988163f84dcf': Increase buffer size, use bounds checking functions
| * | 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
* | \ \ am 36ff3bd2: am e8c6d15b: am 59644a6c: Merge "Fix nandread to build with old ↵Elliott Hughes2013-11-111-2/+6
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | or uapi headers." * commit '36ff3bd273d9f60822104eb53f3aa1886160b360': Fix nandread to build with old or uapi headers.
| * \ \ \ am e8c6d15b: am 59644a6c: Merge "Fix nandread to build with old or uapi ↵Elliott Hughes2013-11-111-2/+6
| |\ \ \ \ | | |/ / / | | | / / | | |/ / | |/| | | | | | | | | | headers." * commit 'e8c6d15b1892ffd09dae8ac7922854140a11130d': Fix nandread to build with old or uapi headers.
| | * | Fix nandread to build with old or uapi headers.Elliott Hughes2013-11-111-2/+6
| | | | | | | | | | | | | | | | | | | | Bug: 11559337 Change-Id: I9795a16649dafdfe3df150170265157170cd5a79
| | * | am e755dfd4: Merge changes I1db3137b,I0f66144eColin Cross2013-06-191-39/+59
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'e755dfd43812ebd9a0d0d6a2106316f343ffb5a2': toolbox: reimplement watchprops using __system_property_foreach() libcutils: reimplement property_list() using __system_property_foreach()
| | | * | toolbox: reimplement watchprops using __system_property_foreach()Greg Hackmann2013-06-181-39/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Internally, replace the watchlist array with a hashmap since the array assumes properties are enumerated in a consistent order and foreach() probably won't. (find_nth() never guaranteed this either but it usually worked in practice.) Signed-off-by: Greg Hackmann <ghackmann@google.com> (cherry picked from commit 389e358017ad15485f2bd9120feebfffa489131b) Change-Id: I1db3137b130474f4bb205f01f0bdcf37cf974764
| | * | | resolved conflicts for merge of 95a41f6b to stage-aosp-masterColin Cross2013-06-171-17/+16
| | |\ \ \ | | | |/ / | | | | | | | | | | Change-Id: Icfae29edf989fb43a7f0b8bda188a9807f76a3b9
| | | * | toolbox: hide property implementation from watchpropsColin Cross2013-06-171-17/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (cherry picked from commit 91779634debc79bc75d3df4e0f59d964ad4f5f78) Change-Id: I7a2d8aa507ac61cedc5f67c563531a7d4ec8e4c2
* | | | | Add -n option to ps to print numeric uidMarco Nelissen2013-10-251-10/+13
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | and fix some whitespace issues Change-Id: Iefb6f51f5f4522ce4ab0f1ea3c996fe892715e90
* | | | Enhance the ioctl toolbox commandScott Anderson2013-10-171-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) Implement documented but unimplemented read-only option. 2) Allow standard input to be used as the <device> by passing "-". On some devices, opening the device has side effects. Allowing standard input can prevent this by using a sequence of something like: # Open the device on file descriptor 3 exec 3<> /dev/something ioctl -d - 0 0 <&3 ioctl -d - 1 0 <&3 dd if=myfile >&3 # Close file descriptor 3 exec 3>&- Change-Id: If17ac3cffa7ccb159051550724b4ce7d8efa5feb Signed-off-by: Scott Anderson <saa@android.com>
* | | | toolbox: Add nohup commandGlenn Kasten2013-09-232-1/+28
|/ / / | | | | | | | | | | | | Change-Id: I2f7d9934b54d98886d7a6205ea122d9ce91066ec Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
* | | 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
* | | | toolbox: reimplement watchprops using __system_property_foreach()Greg Hackmann2013-06-181-39/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Internally, replace the watchlist array with a hashmap since the array assumes properties are enumerated in a consistent order and foreach() probably won't. (find_nth() never guaranteed this either but it usually worked in practice.) Change-Id: I83843facdd671edd09652edf472e88ec3d1edd3b Signed-off-by: Greg Hackmann <ghackmann@google.com>
* | | | toolbox: hide property implementation from watchpropsColin Cross2013-06-171-17/+16
|/ / / | | | | | | | | | Change-Id: Ia6609116d641d3354971ca40a16ffcab38484150
* | | am 603746f0: am 59fa7e10: Merge "Fixed reversed output in netstat Recv-Q ↵Brian Carlstrom2013-06-041-2/+2
|\ \ \ | |/ / | | | | | | | | | | | | | | | Send-Q columns" * commit '603746f0e3b645954f33be36f7602cc8205cb71c': Fixed reversed output in netstat Recv-Q Send-Q columns
| * | am 59fa7e10: Merge "Fixed reversed output in netstat Recv-Q Send-Q columns"Brian Carlstrom2013-06-041-2/+2
| |\ \ | | |/ | | | | | | | | | * commit '59fa7e107d43a4ef521413ec0bb7b0c2a5525071': Fixed reversed output in netstat Recv-Q Send-Q columns
| | * Fixed reversed output in netstat Recv-Q Send-Q columnsBrian Carlstrom2013-06-031-2/+2
| | | | | | | | | | | | Change-Id: I2bc7ac6c886808910212432497f05e34596f5e85
* | | fix another misuse of strncatNick Kralevich2013-06-031-2/+2
| | | | | | | | | | | | | | | | | | | | | This has the potential to overflow "buffer" if the command line is more than 4K. Change-Id: Icdfed0d9d21804f290b75787ef3809e0475b14f0
* | | fix strncat misuseNick Kralevich2013-06-031-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The third argument of strncat() tells how much data to append from src, not the total size of the buffer. Change uses of strncat() to strlcat(), which has the buffer overflow protection behavior intended by the original author. This fixes the following compiler warning: In function 'strncat', inlined from 'print_type' at system/core/toolbox/lsof.c:76:12: bionic/libc/include/string.h:142:5: warning: call to __builtin___strncat_chk might overflow destination buffer [enabled by default] Change-Id: Id69edc641de3cb87d1867a409cd57b04b12f90a7
* | | Merge "fs_mgr: make block devices read-only"Nick Kralevich2013-04-251-0/+22
|\ \ \
| * | | fs_mgr: make block devices read-onlyNick Kralevich2013-04-241-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a filesystem is mounted read-only, make the underlying block device read-only too. This helps prevent an attacker who is able to change permissions on the files in /dev (for example, symlink attack) from modifying the block device. In particular, this change would have stopped the LG Thrill / Optimus 3D rooting exploit (http://vulnfactory.org/blog/2012/02/26/rooting-the-lg-thrill-optimus-3d/) as that exploit modified the raw block device corresponding to /system. This change also makes UID=0 less powerful. Block devices cannot be made writable again without CAP_SYS_ADMIN, so an escalation to UID=0 by itself doesn't give full root access. adb/mount: Prior to mounting something read-write, remove the read-only restrictions on the underlying block device. This avoids messing up developer workflows. Change-Id: I135098a8fe06f327336f045aab0d48ed9de33807
* | | | am 4c1840e6: am 5ea58543: Merge "mount: fix incorrect string length calculation"Nick Kralevich2013-04-241-3/+4
|\ \ \ \ | |/ / / |/| / / | |/ / | | | * commit '4c1840e6547266ba251d8c34905036d73240ff57': mount: fix incorrect string length calculation
| * | am 5ea58543: Merge "mount: fix incorrect string length calculation"Nick Kralevich2013-04-241-3/+4
| |\ \ | | |/ | | | | | | | | | * commit '5ea58543154a97c42c0b7fc58c2639a4fea64f5b': mount: fix incorrect string length calculation
| | * mount: fix incorrect string length calculationNick Kralevich2013-04-241-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix bug https://code.google.com/p/android/issues/detail?id=54192 which incorrectly calculated the length of a string. Fix compiler warning: system/core/toolbox/mount.c:59:2: warning: initializer-string for array of chars is too long [enabled by default] system/core/toolbox/mount.c:59:2: warning: (near initialization for 'options[16].str') [enabled by default] Change-Id: If8663f8311c6348a730fcf731d402b57fee10cb5
* | | am 03546553: am b73a0ef4: Merge "use lseek64 to resolve offset oveflow"Colin Cross2013-04-181-4/+4
|\ \ \ | |/ / | | | | | | | | | * commit '03546553205b56fc1ba0318b146971f43f54a155': use lseek64 to resolve offset oveflow