summaryrefslogtreecommitdiffstats
path: root/init
Commit message (Collapse)AuthorAgeFilesLines
* Enable not rebooting during default encryptionPaul Lawrence2014-08-251-1/+0
| | | | | | | | | | Need to not set this property) during mount, since it can't be changed later (ro property) Also no reason to start class main on encryption cycle - we'll show surfaceflinger, which is enough UI for this short cycle. Bug: 17041092 Change-Id: Ica5339c54e45716d0fe20e23c0ab857f388d23ed
* Clarify init's write command.Elliott Hughes2014-07-251-3/+3
| | | | | | | | Bug: https://code.google.com/p/android/issues/detail?id=73996 (cherry picked from commit afc08ce39235d0e3f1e63f30ee587f2a5952be44) Change-Id: Id2fb11d5259957ef23cc839fba14af8452fc69e4
* Move unlink("/dev/.booting") until after filesystems are mounted.Riley Andrews2014-07-141-15/+8
| | | | | | | Move the unlink out of init.c and into init.rc, so that the file will be removed after all the filesystems with firmware are up. Change-Id: Ifdd5dd1e95d7e064dde5c80b70198882d949a710
* am 85dfe988: am 796fccb8: Merge "Fix environment variable assignment in init"Elliott Hughes2014-07-122-8/+22
|\ | | | | | | | | * commit '85dfe98830c78f1c3d400ca7be4ac594bfcdd275': Fix environment variable assignment in init
| * Fix environment variable assignment in initJames Morrissey2014-07-102-8/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The init process allows environment variables to be specified in the rc script globally, via 'export', and for a specific process, via the 'setenv' option. However, the mechanism for assembling the environment simply appended the new variable without checking whether it was already defined, so it was not possible to overwrite an existing entry. This patch fixes that behaviour. Limitations and concerns: The limit of a maximum number of 31 variables is unchanged. Currently, most callers of "add_environment" do not check the return value, but the function now logs the failure rather than failing silently. Change-Id: Ie9a68c37a0f55c5b40e904e695cd35514f67f480
* | am 7367ecbc: am 06023134: am 8022ce1e: Merge "ueventd fixup_sys_perms: fixup ↵Nick Kralevich2014-07-071-13/+15
|\ \ | |/ | | | | | | | | | | SELinux labels unconditionally" * commit '7367ecbc4839e3a608ab9b7742c659b58065209f': ueventd fixup_sys_perms: fixup SELinux labels unconditionally
| * ueventd fixup_sys_perms: fixup SELinux labels unconditionallyNick Kralevich2014-07-071-13/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the fixup code in fixup_sys_perms() scans through all entries in uevent*.rc. If it finds a match, then it performs a fixup. If there's no match in that file, no fixup is performed. SELinux file labels are independently stored in /file_contexts, with no relationship to the files in /ueventd.rc. Even when no entries exist in ueventd.rc, we still want to fixup the SELinux file label in /sys when a uevent message occurs. Change-Id: I0ccb5395ec0be9282095b844a5022e8c0d8903ac
* | am b18d44e4: am ab7e5752: am 09117c70: Merge "ueventd: allow matching ↵Colin Cross2014-07-021-13/+38
|\ \ | |/ | | | | | | | | | | symlink names when setting permissions" * commit 'b18d44e458501f6b5b99349acc68d3d4e90e9d62': ueventd: allow matching symlink names when setting permissions
| * Merge "ueventd: allow matching symlink names when setting permissions"Colin Cross2014-07-021-13/+38
| |\
| | * ueventd: allow matching symlink names when setting permissionsColin Cross2014-07-021-13/+38
| | | | | | | | | | | | Change-Id: I5f6cc2a25f1236fbe2c7193b65363b7883b9ba2e
* | | [HACK]fs_mgr+init: Format via recovery if encryptable /data is wipedJP Abgrall2014-07-021-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the encryptable partition is wiped (4KB worth of 0 or 0xff), then reboot into recovery to format /data+/cache This is while waiting for the Mac OS support to format f2fs. The flashstation running on Mac OS will currently just erase userdata and not format it with f2fs. Bug: 15720406 Bug: 15747366 Change-Id: Ib7cca3e1701483a09573457a835750f34da71ee0
* | | fs_mrg: clean up multi-type mount_allJP Abgrall2014-07-021-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the code that attempts to mount alternative fstab entries into its own function. Clarify return codes. Suggest wipe via recovery in error messages. Bug: 15747366 Change-Id: I3634477cd4d1d73f974f3e906c53285f0d9e0eac Signed-off-by: JP Abgrall <jpa@google.com>
* | | am fac28281: am b13e4b5e: am 5a53ee05: Merge "Remove an unused #include of ↵Elliott Hughes2014-06-301-3/+0
|\ \ \ | |/ / | | | | | | | | | | | | | | | <sys/_properties.h>." * commit 'fac2828161b6b14b7e862d94f2f4ef467621c832': Remove an unused #include of <sys/_properties.h>.
| * | Remove an unused #include of <sys/_properties.h>.Elliott Hughes2014-06-301-3/+0
| | | | | | | | | | | | | | | Bug: 15704351 Change-Id: I7841da7176d0638ae6737fe719cd187892bc38e6
* | | resolved conflicts for merge of fa6f2543 to masterRiley Andrews2014-06-264-8/+39
|\ \ \ | |/ / | | | | | | Change-Id: I04ce82e5d245e90e2cc62b76d688ec902c1a471d
| * | Add ability to adjust init log level at runtime.Riley Andrews2014-06-261-4/+17
| | | | | | | | | | | | | | | | | | | | | + Add a new property, sys.init_log_level, which can be set after init bootstrap. This will control the level at which init does prints to klog. Change-Id: Ia15b2110157b5e6b713785ece9b0fb94889be6c8
| * | Improve init's debug printing.Riley Andrews2014-06-263-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + Make prints of rc commands significantly more verbose. All commands will log all arguments, file/line number of the command, return value, and parent action which triggered the command. init: command 'mount tmpfs tmpfs /mnt/obb mode=0755,gid=1000' action=init status=0 (/init.rc:89) init: command 'setprop net.tcp.default_init_rwnd 60' action=boot status=0 (/init.rc:403) Change-Id: I5498c7258e4891706be4a12546df4231d14d86c4
* | | resolved conflicts for merge of dd8e63a4 to masterNick Kralevich2014-06-261-108/+4
|\ \ \ | |/ / | | | | | | Change-Id: I5ee88d4a3846cb617ec115cb55c8192c8ecf2f4f
| * | Merge "property_service: get rid of hard coded property / control list"Nick Kralevich2014-06-251-105/+4
| |\ \
| | * | property_service: get rid of hard coded property / control listNick Kralevich2014-06-171-105/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't force people to make modifications to property_service.c when handling properties. Exclusively use the SELinux rules, which are more flexible and easily adjusted. Change-Id: Ic0bbd01b5df2eef0040286ac59c0a01e9bd14315
* | | | am 471a7034: am aadf9f11: am 4ad20e55: Merge "Redirect libselinux logging to ↵Nick Kralevich2014-06-253-1/+8
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | dmesg for ueventd." * commit '471a7034b2fca93f174c88e275d3968032730aa7': Redirect libselinux logging to dmesg for ueventd.
| * | | Redirect libselinux logging to dmesg for ueventd.Stephen Smalley2014-06-243-1/+8
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We already do this for init, but had failed to do it for ueventd and could not capture any logging from libselinux calls made by ueventd. Truly enabling non-error logging also requires uncommenting a line in Android.mk: LOCAL_CFLAGS += -DLOG_UEVENTS=1 which enables other logging and sets the default log level to INFO, or otherwise changing the klog level in the ueventd code (is not settable by init.rc loglevel). Change-Id: I00e6f9d6271f2a21d9078c96368816d74d6d2850 Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
* | | resolved conflicts for merge of 079c637f to masterRiley Andrews2014-06-236-16/+21
|\ \ \ | |/ / | | | | | | Change-Id: Iab9a857026de954d7497d6b0eaf3751d2d3904c7
| * | Add ability to boot from charger mode.Riley Andrews2014-06-206-16/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add the ability to boot up directly from charger mode, instead of forcing charger mode to initiate a full restart to launch 'full' android. This should shave a few seconds off of boot time on supported devices (just manta for now). Change-Id: Ieec4494d929e92806e039f834d78b9002afd15c4
* | | ueventd: UEVENT_MSG_LEN changed to 2048 from 1048 in compliance with theRuchi Kandoi2014-06-231-1/+1
| | | | | | | | | | | | | | | | | | BUFFER_LEN in the kobject_uevent in kernel. Change-Id: Ib98626f20a7c26e7718bbe4d5ec4513a1ae5d9b7
* | | am 105ecf71: am 72d9c0b1: am 56b1d74e: Merge "init/ueventd: adds wildcard ↵Colin Cross2014-06-213-4/+20
|\ \ \ | |/ / | | | | | | | | | | | | | | | matching for ueventd rules" * commit '105ecf71c2a7f683d34995dc290a4bf50413cf15': init/ueventd: adds wildcard matching for ueventd rules
| * | init/ueventd: adds wildcard matching for ueventd rulesDaniel Leung2014-06-203-4/+20
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sysfs nodes can change from devices to devices for a particular class of peripheral. Some of them even change after suspend/resume, e.g. rfkill for USB bluetooth adapters. This patch adds to the way how ueventd rules with wildcard are handled. In addition to matching the prefix with a trailing wildcard, now rules can have wildcard anywhere in the rule. The wildcard matching is implemented using fnmatch(), where its matching is simliar to shell pathname expansion. It suits this particular usage model well. To avoid abuse, the number of slashes has to match between path name and the rule. For example, instead of creating a rule to match: /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.3/2-1.3:1.0/bluetooth/hci0/rfkill* , this would suffice: /sys/devices/pci0000:00/0000:00:1d.0/*/*/*/*/bluetooth/hci0/rfkill* The prefix matching behavior is retained, such that those rules do not have to pay for processing penalty with fnmatch(). Change-Id: I3ae6a39c838f6d12801cb71958e481b016f731f5 Signed-off-by: Daniel Leung <daniel.leung@intel.com>
* | am 545c6599: am a029d14d: am 2af91ffb: Merge "Extend ueventd to use the ↵Nick Kralevich2014-06-171-3/+4
|\ \ | |/ | | | | | | | | | | label-by-symlink support in libselinux." * commit '545c6599fa2702a3a220f486367e9df42b20e0b6': Extend ueventd to use the label-by-symlink support in libselinux.
| * Extend ueventd to use the label-by-symlink support in libselinux.Stephen Smalley2014-06-161-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When ueventd creates a device node, it may also create one or more symlinks to the device node. These symlinks may be the only stable name for the device, e.g. if the partition is dynamically assigned. A corresponding change with the same Change-Id to external/libselinux introduces selabel_lookup_best_match() to support looking up the "best match" for a device node based on its real path (key) and any links to it (aliases). This change updates ueventd to use this new interface to find the best match for the device node when creating it. Change-Id: Id6c2597eee2b6723a5089dcf7c450f8d0a4128f4 Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
* | am 38fd5650: am 82015d4f: Merge "Only allow disabling SELinux on userdebug / ↵Nick Kralevich2014-06-032-1/+5
|\ \ | |/ | | | | | | | | | | eng builds" * commit '38fd5650ea03b1f47ead2a12a655298ef2f70a91': Only allow disabling SELinux on userdebug / eng builds
| * Only allow disabling SELinux on userdebug / eng buildsNick Kralevich2014-06-022-1/+5
| | | | | | | | | | | | | | | | Only parse and honor the kernel command line on userdebug or eng builds. On user builds, assume that selinux is always enabled and enforcing. Change-Id: I71c66e4365bdf2f226800634126a38b716d96599
* | am 4f04439f: am 6fb92bd8: am 252b0e2b: Merge "SELinux changes to check ↵Nick Kralevich2014-05-311-8/+5
|\ \ | |/ | | | | | | | | | | policy versions during a reload." * commit '4f04439f0eab481d1b7938e78d8ee316dda4d641': SELinux changes to check policy versions during a reload.
| * Merge "SELinux changes to check policy versions during a reload."Nick Kralevich2014-05-311-8/+5
| |\
| | * SELinux changes to check policy versions during a reload.Robert Craig2014-04-281-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When deciding on which property_contexts policy to load during a reload, an initial call is made to libselinux to grab the correct policy index. This policy index represents whether the /data/security or the rootfs version will be used. Change-Id: I4716039bb0f5ba1e961977a18350347a67969dca Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
* | | am c34598aa: am 55c3401b: am 08befc3a: Merge "ueventd: support by-name ↵Colin Cross2014-05-221-6/+44
|\ \ \ | |/ / | | | | | | | | | | | | | | | symlinks for PCI block devices" * commit 'c34598aa657121ed2feafdae35032e72aa1c9a80': ueventd: support by-name symlinks for PCI block devices
| * | Merge "ueventd: support by-name symlinks for PCI block devices"Colin Cross2014-05-221-6/+44
| |\ \
| | * | ueventd: support by-name symlinks for PCI block devicesAndrew Boie2014-05-131-6/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To ensure that well-crafted removable media can't spoof the internal partitions, for platform devices the controller id is inside the generated path. We now do the same for PCI devices. The generated path has two levels; the PCI domain/bus, and then the peripheral ID. This lets us get by-name symlinks for PCI media, such as the SATA controllers on PC-like hardware. The symlinks will be created under /dev/block/pci/. For example: /dev/block/pci/pci0000:00/0000:00:1f.2/by-name/ Change-Id: Icee3e86bef5569c2bbd94c26bc00d49028345e3b Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
* | | | am 7bbfb8cb: am 337f94f1: am e9a6d0a0: Merge "Remove unnecessary #includes ↵Elliott Hughes2014-05-221-1/+0
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | of <sys/atomics.h>." * commit '7bbfb8cbaf52975a2d0ef9d448d8ea0fc74a590b': Remove unnecessary #includes of <sys/atomics.h>.
| * | | Remove unnecessary #includes of <sys/atomics.h>.Elliott Hughes2014-05-221-1/+0
| | | | | | | | | | | | | | | | | | | | Bug: 14903517 Change-Id: I5b0a418dd982f1a2fd90609b12bd8364f7f34996
* | | | am f6309600: am 3277dc26: am 2d03a498: Merge "correct the setenv option ↵Colin Cross2014-05-161-1/+1
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | judging condition" * commit 'f630960088b2fbdb7f147bf9f7a137850df4c89c': correct the setenv option judging condition
| * | | correct the setenv option judging conditionGavin.Chang2014-05-161-1/+1
| | | | | | | | | | | | | | | | Change-Id: I10ed6275374f572da639f26611f607bf7607905c
* | | | am 88a98149: am 13ee94c5: am 8b2d46a5: Merge "init: logd: Allow Developer ↵Mark Salyzyn2014-05-161-0/+1
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | settings to adjust logd size" * commit '88a981497ac06046d6da8a99ba17136aa8361b34': init: logd: Allow Developer settings to adjust logd size
| * | | Merge "init: logd: Allow Developer settings to adjust logd size"Mark Salyzyn2014-05-161-0/+1
| |\ \ \
| | * | | init: logd: Allow Developer settings to adjust logd sizeMark Salyzyn2014-05-131-0/+1
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - AID_SYSTEM can set persist.logd.size - AID_SYSTEM can issue command to /dev/socket/logd to change the runtime global log sizes. - Add support for ro.logd.size.* as populated by BoardConfig.mk - Limit size to maximum ~3% of physical memory. Bug: 14563261 Bug: 14627052 Change-Id: I606420db2e9d9d032296e71149e4a5b20cbd1137
* | | | am 7c633e6f: am 233bbd9d: am ed02fbf0: Merge "Clean up some unnecessary ↵Elliott Hughes2014-05-152-3/+0
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | system_properties cruft." * commit '7c633e6fe6f69006ca4299a475230dd583da38f3': Clean up some unnecessary system_properties cruft.
| * | | Clean up some unnecessary system_properties cruft.Elliott Hughes2014-05-142-3/+0
| |/ / | | | | | | | | | | | | Bug: 14970171 Change-Id: I6f54c35e265b849be914120f795c9f8e0cec34bb
* | | am d96f05d2: am a7bf5bd1: am 3c049bbe: Merge "init: add \'enable <service>\' ↵JP Abgrall2014-05-036-2/+33
|\ \ \ | |/ / | | | | | | | | | | | | | | | to negate "service <service>... disabled"" * commit 'd96f05d2a7881dbb18fc86b765a67066560b7a1a': init: add 'enable <service>' to negate "service <service>... disabled"
| * | init: add 'enable <service>' to negate "service <service>... disabled"JP Abgrall2014-05-036-2/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | enable <servicename> Turns a disabled service into an enabled one as if the service did not specify disabled in the rc file. It will also start the service if needed. Bug: 14472973 Change-Id: Id0b49cc687a2bc74f6f92e066c617724cc94908d Signed-off-by: JP Abgrall <jpa@google.com>
| * | init: 64-bit build issueMark Salyzyn2014-05-011-1/+2
| | | | | | | | | | | | | | | | | | (cherry pick from Icc5344abc184adf4247175d85b2da08af4636e49) Change-Id: I88b0c9b20720ac62ebae8359ded4ab77b4ebcdde
* | | am 57569b3d: am 1abf4918: am c7580819: Merge "ueventd: Ueventd changes the ↵Ruchi Kandoi2014-05-011-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | permission of sysfs files for max/min cpufreq" * commit '57569b3d3cea0b2096a15e8d25b41df9f836fd08': ueventd: Ueventd changes the permission of sysfs files for max/min cpufreq