aboutsummaryrefslogtreecommitdiffstats
path: root/toolbox
Commit message (Collapse)AuthorAgeFilesLines
* toolbox: Add levelFromUid categorization support to restoreconRicardo Cerqueira2013-07-191-0/+11
| | | | | | | | This is necessary for the app data relabeling on migrated devices to include the proper app context. Freshly installed apps get this done automagically, as do newly created files. Change-Id: If7421dac01c6ae8bd78e66f71e69298ed850a7ab
* toolbox: silence some compiler warningsKenny Root2013-07-181-3/+3
| | | | | | | Comparison of signed and unsigned integers. Use parenthesis around a group of bitwise OR operations. Change-Id: Ia404380593ce2c2a291133c07c0fc7a016a3ad3f
* Change setsebool syntax to be consistent with other init built-ins.Stephen Smalley2013-07-181-24/+15
| | | | | | | | | | | | | Change setsebool syntax from name=value to name value. This is to make it consistent with setprop and similar commands. Update both the init built-in command and the toolbox command for consistency. Change-Id: I2c8e016ba26731c4a2ad4a49ae3b89362bf8f8a8 Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov> Conflicts: init/builtins.c
* Fixed reversed output in netstat Recv-Q Send-Q columnsBrian Carlstrom2013-06-081-2/+2
| | | | Change-Id: I2bc7ac6c886808910212432497f05e34596f5e85
* mount: fix incorrect string length calculationNick Kralevich2013-05-011-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
* Fixed improper size displaying in 'df' utilityMichal Frynas2012-12-031-5/+16
| | | | | | | | | | | | 'df' command used to display filesystem usage statistics as integer values, in most cases rounding the actual value down. Because of that 'df' tended to display faulty size values. This fix to 'df' utility calculates the fractional part of the size, then it rounds it when needed to the nearest one-digit integer value and displays after decimal dot. Change-Id: I9bc52635d45d3e55ce61b3b1c6b80d1267516e75 Signed-off-by: Chirayu Desai <cdesai@cyanogenmod.org>
* toolbox: new applet restartChirayu Desai2012-11-252-1/+25
| | | | | | | - stop + start - for the lazy. Change-Id: Ie0ef0e27f5b7819a5575ece6b82c5813f4e38420
* Merge branch 'jb-mr1-release' of ↵Steve Kondik2012-11-1818-71/+3516
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://android.googlesource.com/platform/system/core into mr1 Conflicts: adb/Android.mk adb/usb_vendors.c include/private/android_filesystem_config.h include/system/audio.h include/system/camera.h init/property_service.c libnetutils/ifc_utils.c mkbootimg/mkbootimg.c rootdir/init.rc Change-Id: Ie42f0c14808e9f8cabd24854bfe15b6667955229
| * Iteration on multi-user external storage.Jeff Sharkey2012-08-221-0/+5
| | | | | | | | | | | | | | | | | | | | Define /storage as top-level concept, so that we enforce permissions uniformly. Moves external storage paths from headers to per-device environment variables. Added missing mount flags, and we no longer have adb-specific external storage. Bug: 6925012 Change-Id: Ic7ca953be2f552d3f0ec9e69f89fef751daa1b29
| * am 76080925: am 52d5dfc8: Merge "vmstat: Fix -n flag"Jean-Baptiste Queru2012-08-201-2/+2
| |\ | | | | | | | | | | | | * commit '76080925410db41cfa5c70ffcffaa2b3b4d59aad': vmstat: Fix -n flag
| | * Merge "vmstat: Fix -n flag"Jean-Baptiste Queru2012-08-201-2/+2
| | |\
| | | * vmstat: Fix -n flagArun Raghavan2012-07-101-2/+2
| | | | | | | | | | | | | | | | | | | | The loop condition for the number of iterations basically caused the argument to -n to be ignored. This fixes the condition appropriately.
| * | | am 02e9f8d5: am 53dab583: Merge "Make setenforce usage function static."Kenny Root2012-08-131-1/+1
| |\ \ \ | | |/ / | | | | | | | | | | | | * commit '02e9f8d5aa390d89f79b2b3bb8630af4062b4d2c': Make setenforce usage function static.
| | * | Make setenforce usage function static.Matt Finifter2012-08-131-1/+1
| | | | | | | | | | | | | | | | Change-Id: I6de204dc072418805160a35d799b8948ecb39251
| * | | resolved conflicts for merge of 4dcd52ab to jb-mr1-devKenny Root2012-08-131-12/+7
| |\ \ \ | | |/ / | | | | | | | | Change-Id: Ibd0c03a7883a2e31adab18543c016776b7b36866
| | * | Add support for reloading policy from /data/system.Stephen Smalley2012-08-091-12/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To support runtime policy management, add support for reloading policy from /data/system. This can be triggered by setting the selinux.loadpolicy property to 1, whether from init.rc after mounting /data or from the system_server (e.g. upon invocation of a new device admin API for provisioning policy). ueventd and installd are restarted upon policy reloads to pick up the new policy configurations relevant to their operation. Change-Id: I97479aecef8cec23b32f60e09cc778cc5520b691 Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
| * | | am c5db017c: am 63b2c577: Merge "Conditionally use SIGSTKFLT"Elliott Hughes2012-08-081-0/+2
| |\ \ \ | | |/ / | | | | | | | | | | | | * commit 'c5db017cc3d30b1b15544ca9889e66890710f93c': Conditionally use SIGSTKFLT
| | * | Conditionally use SIGSTKFLTChris Dearman2012-08-011-0/+2
| | |/ | | | | | | | | | Change-Id: I555b33b5a93df332c556944a1c00fff417825247
| * | Ported "grep" from NetBSD to toolbox.Jeff Sharkey2012-07-137-2/+2099
| | | | | | | | | | | | | | | Bug: 6798417 Change-Id: I581c496a726a4814edaaa3672849c090bac8552c
| * | Ported "cp" from NetBSD to toolbox.Jeff Sharkey2012-07-134-6/+1070
| | | | | | | | | | | | | | | Bug: 6798417 Change-Id: I716ab459b9edf4c7405bf042adbee0300b6f51c9
| * | Add the du command to toolboxKen Sumrall2012-07-092-0/+323
| | | | | | | | | | | | | | | | | | | | | | | | The code is from NetBSD, with the -n and -h options removed to make porting easy. Also, removed support for the BLOCKSIZE environment variable for the same reason. Change-Id: Ib927ff3527e02802785fdd7f75bab1f05222918e
| * | Add mode when open(O_CREAT) is used.Nick Kralevich2012-06-261-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When creating a new file using open(..., O_CREAT), it is an error to fail to specify a creation mode. If a mode is not specified, a random stack provided value is used as the "mode". This will become a runtime error in a future version of Android. Change-Id: I00609f37d2ea68e21b6404d542830386be354202
| * | am 2a2e10fb: am 16d2b6ae: am 91e5551f: Merge "toolbox: rmmod: fix module ↵Jean-Baptiste Queru2012-06-111-1/+10
| |\ \ | | |/ | | | | | | | | | | | | | | | unloading" * commit '2a2e10fbb38e4f4d7759f619275fa4ebd596259a': toolbox: rmmod: fix module unloading
| | * am 16d2b6ae: am 91e5551f: Merge "toolbox: rmmod: fix module unloading"Jean-Baptiste Queru2012-06-111-1/+10
| | |\ | | | | | | | | | | | | | | | | * commit '16d2b6ae4050b1232fd164cef1dbade532fe29a4': toolbox: rmmod: fix module unloading
| | | * Merge "toolbox: rmmod: fix module unloading"Jean-Baptiste Queru2012-06-111-1/+10
| | | |\
| | | | * toolbox: rmmod: fix module unloadingVishal Bhoj2012-05-151-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace "-" with "_" in module name. This would keep rmmod compatible with module-init-tools version of rmmod Change-Id: I4470d9a98bc2f299acd94859fca4403aee279d2b Signed-off-by: Vishal Bhoj <vishal.bhoj@linaro.org>
| * | | | Enable conv=fdatasync in dd.Jeff Sharkey2012-05-292-49/+7
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | Matches behavior of coreutils dd. Also removes unsupported conversions. Change-Id: I9ed5a7d43b5b083041b261ce70f6c835b41dc7ac
| * | | am a802b837: am 1d5e7885: Merge "toolbox: implement rm -f flag"Jean-Baptiste Queru2012-05-251-13/+40
| |\ \ \ | | |/ / | | | | | | | | | | | | * commit 'a802b8374a22da9f52541e1fc286dcbdb1cfa1b4': toolbox: implement rm -f flag
| | * | toolbox: implement rm -f flagTanguy Pruvot2012-05-061-13/+40
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | this prevent compatibility errors in scripts (file "-f" not found) The force flag will not return an error if the file doesnt exist. Signed-off-by: Tanguy Pruvot <tanguy.pruvot@gmail.com> Change-Id: I3267963284ee247629da5ab299e900c6e4a4ac68
* | | toolbox/dmesg: do not hardcode KLOG_BUF_LENJames Sullins2012-10-071-6/+21
| | | | | | | | | | | | Change-Id: Ia99654a53d6adfeba5a5088b7cff45c6e47b6188
* | | toolbox: rmmod: fix module unloadingVishal Bhoj2012-07-101-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | Replace "-" with "_" in module name. This would keep rmmod compatible with module-init-tools version of rmmod Change-Id: I4470d9a98bc2f299acd94859fca4403aee279d2b Signed-off-by: Vishal Bhoj <vishal.bhoj@linaro.org>
* | | toolbox: implement rm -f flagTanguy Pruvot2012-07-101-13/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | this prevent compatibility errors in scripts (file "-f" not found) The force flag will not return an error if the file doesnt exist. Signed-off-by: Tanguy Pruvot <tanguy.pruvot@gmail.com> Change-Id: I3267963284ee247629da5ab299e900c6e4a4ac68
* | | RECOVERY_PRE_COMMAND_CLEAR_REASON and extended reboot argumentsTanguy Pruvot2012-07-101-1/+8
|/ / | | | | | | | | | | | | | | fix the 2 new warnings created by our 4-lines recovery patch ;p Allow also to override toolbox reboot applet, for bootmenu Change-Id: I975af19a8f295d1e341c7433f96f669db611f89c
* | Delete dead code.Jeff Brown2012-05-111-441/+0
| | | | | | | | | | | | | | This file is not compiled and not used. Bug: 6435382 Change-Id: I3a08690950f1c77f8b0bc57a9e5cdb6eb402ac77
* | Add signal names to killKenny Root2012-04-061-6/+117
| | | | | | | | | | | | | | | | mksh provides a kill primitive with signal names, but also offer it in our toolbox binary. This will allow anyone to use "kill -HUP <pid>" or "kill -l" to look at the name to number signal mapping. Change-Id: Id683721f4ad3f2b518b4dc54a6073510290cbe04
* | Make sure FAT32 filesystems contain a minimum of 65527 clustersKen Sumrall2012-03-291-1/+2
| | | | | | | | | | | | | | Some versions of windows cannot handle FAT32 filesystems with less than 65527 clusters, so make sure we don't create such beasts. Change-Id: Id00fb02c4f8476f7dcc0ef137bd9e4975d740591
* | Add get_sched_policy_name() and use in ps and topGlenn Kasten2012-03-152-16/+7
| | | | | | | | | | | | | | This will make it easier to add additional policies (cgroups) if needed. Also added comments to the sched_policy APIs. Change-Id: I33ce1cc4deae10983241f7391294b7a512d2c47c
* | Merge "Change "chown" to coreutils syntax."Jeff Sharkey2012-03-021-2/+4
|\ \
| * | Change "chown" to coreutils syntax.Jeff Sharkey2012-03-021-2/+4
| | | | | | | | | | | | Change-Id: I7d997b3254354908317feee54b6df9b2419718a6
* | | am 25443f80: am 1e28088f: am 5cc398ef: Merge "Toolbox implementation of ↵Jean-Baptiste Queru2012-02-281-1/+1
|\ \ \ | |/ / |/| / | |/ | | | | | | chown has a bad print" * commit '25443f80a27c6153c3406b4443fd07442e410a57': Toolbox implementation of chown has a bad print
| * Merge "Toolbox implementation of chown has a bad print"Jean-Baptiste Queru2012-02-281-1/+1
| |\
| | * Toolbox implementation of chown has a bad printJohan Norberg2012-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | When the chown program fails it prints out an error message and is describing itself as chmod. This has been corrected. Change-Id: I2c489975f09343bdf66acbf7df6e7183c2daff78 Signed-off-by: christian bejram <christian.bejram@stericsson.com>
* | | resolved conflicts for merge of 44898072 to masterJean-Baptiste Queru2012-02-2412-8/+616
|\ \ \ | |/ / | | | | | | Change-Id: Ib77a4d9161261306253a174727801526e7149621
| * | Extend toolbox with SE Android support.Stephen Smalley2012-02-0312-8/+616
| |/ | | | | | | | | | | | | | | Add -Z option to ls and ps for displaying security contexts. Modify id to display security context. Add new SELinux commands: chcon, getenforce, getsebool, load_policy, restorecon, runcon, setenforce, setsebool. Change-Id: Ia20941be4a6cd706fe392fed6e38a37d880ec5f1
* | am 82dd6af8: am e7b1f132: Merge "rmmod: fix full path syntax"Jean-Baptiste Queru2012-01-131-0/+2
|\ \ | |/ | | | | | | * commit '82dd6af84676f1ea6f67ce6fbd2c5cea7a8aa601': rmmod: fix full path syntax
| * rmmod: fix full path syntaxTanguy Pruvot2012-01-121-0/+2
| | | | | | | | | | | | | | rmmod /system/modules/multitouch.ko rmmod: delete_module '/multitouch' failed (errno 2) Signed-off-by: Tanguy Pruvot <tanguy.pruvot@gmail.com>
* | Fix hd command so it doesn't error out on EOFScott Anderson2012-01-121-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hd would error out on files that were not a multiple of its read buffer size (4096). For example: Read error on init.rc, offset 17040 len 4096, No such file or directory The fix is to stop reading on EOF instead of treating it as an error. Signed-off-by: Scott Anderson <saa@google.com> (cherry picked from commit a9fac4155f645b59d92028d56af573999051ab70) Change-Id: Ib2af725fc39e96c2f81559f61979d451604d4817
* | Add md5 command to toolbox.Scott Anderson2012-01-112-1/+81
| | | | | | | | | | | | | | | | This command outputs the MD5 for specified files. The output is in the same form as the md5sum command on Linux. Change-Id: Ie0e6faf678469ac886bba8b46d98c0e54976a1ed Signed-off-by: Scott Anderson <saa@google.com>
* | Use strlcpy instead of strncpyKenny Root2011-12-011-8/+9
| | | | | | | | | | | | Also make sure the read cmdline is terminated with a null byte. Change-Id: I6b4aa197ce9bc072a912b7163e8616a03b39c3fe
* | Make timestamps friendlier.Jeff Brown2011-11-231-1/+1
|/ | | | Change-Id: I378c3028630a7f805c3f730da02bbbfe07ec3654