summaryrefslogtreecommitdiffstats
path: root/init
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | init: make "mkdir" work even when the directory already exists.Chia-chi Yeh2011-07-081-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows us to change permissions and ownerships of directories in init scripts without adding additional commands. Change-Id: I1815d6015953035251b98f28c0f3efd3c7f25f80
* | | | init: Handle EINTR in handle_property_set_fd()Mike Lockwood2011-07-011-3/+3
| | | | | | | | | | | | | | | | | | | | Change-Id: I5a6f1791eaf11e98b1d81697112d78c99822fba5 Signed-off-by: Mike Lockwood <lockwood@android.com>
* | | | init: Add support for assigning system properties to system properties in ↵Mike Lockwood2011-06-091-3/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | init.rc For example: setprop sys.usb.config $persist.sys.usb.config Change-Id: I7b4e1ed1335906b32621bd96a341b0f94bbee7f5 Signed-off-by: Mike Lockwood <lockwood@android.com>
* | | | init: Fix the init.rc import commandMike Lockwood2011-06-093-7/+9
| | | | | | | | | | | | | | | | | | | | Change-Id: I8a91c3f7d1ca31e137d9043bb7f56e4a44fb63df Signed-off-by: Mike Lockwood <lockwood@android.com>
* | | | init: Allow wildcards in property triggers by using * for property valueMike Lockwood2011-06-091-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For example, the following trigger will fire when the sys.foo property is set to any value: on property:sys.foo=* write /data/foo hello It is also possible to refer to the property within the trigger actions: on property:sys.foo=* write /data/foo $sys.foo Change-Id: If78d20a532f77e17aa5703d53be581ad6736cbcf Signed-off-by: Mike Lockwood <lockwood@android.com>
* | | | init: Add support for writing system property value to a file in init.rcMike Lockwood2011-06-091-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The write command will write a property value if the value starts with a "$' For example: write /sys/class/android_usb/iSerial $ro.serialno Use double leading '$' if you need to write a string that starts with '$': write /data/foo $$hello to write "$hello" to /data/foo Change-Id: I55431ac7715a5347bb95c3a15aee97c575444dde
* | | | Merge "Teach the mount command in init to not consider a wiped partition to ↵Ken Sumrall2011-05-271-2/+5
|\ \ \ \ | | | | | | | | | | | | | | | be encrypted."
| * | | | Teach the mount command in init to not consider a wiped partition to be ↵Ken Sumrall2011-05-261-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | encrypted. Change-Id: I3e989f0b81ec35084baddc04e014406f4d90ce04
* | | | | rename uevent_checked_recv to uevent_kernel_multicast_recvNick Kralevich2011-05-111-1/+1
|/ / / / | | | | | | | | | | | | Change-Id: I1839627490080efcbb7269699709064856312f8b
* | | | am b0d0e260: resolved conflicts for merge of 2baeb898 to honeycomb-plus-aospNick Kralevich2011-04-271-29/+5
|\ \ \ \ | |/ / / | | | | | | | | | | | | * commit 'b0d0e260bd6118959fa0e2d3c84037b3e0178551': Fold uevent message origin checking from init into libcutils.
| * | | resolved conflicts for merge of 2baeb898 to honeycomb-plus-aospNick Kralevich2011-04-271-29/+5
| |\ \ \ | | |/ / | | | | | | | | Change-Id: Ib3169b3a36aa13ef413da624355b1737e9b76fd9
| | * | Fold uevent message origin checking from init into libcutils.Vernon Tang2011-04-281-29/+5
| | | | | | | | | | | | | | | | Change-Id: I7cbc0cb840d1b4962e6c360fdad9a9c0ce20e87b
* | | | am de35f274: am 03752be0: am 0c297f5e: Merge "Revert "Fold uevent message ↵Nick Kralevich2011-04-271-5/+29
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | origin checking from init into libcutils."" * commit 'de35f2741c4e32e331a92be99f7c04b92b94beb2': Revert "Fold uevent message origin checking from init into libcutils."
| * | | am 03752be0: am 0c297f5e: Merge "Revert "Fold uevent message origin checking ↵Nick Kralevich2011-04-271-5/+29
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | | | | | from init into libcutils."" * commit '03752be0a437d12e19ac73ebe23385fe6f756e2c': Revert "Fold uevent message origin checking from init into libcutils."
| | * | Revert "Fold uevent message origin checking from init into libcutils."Nick Kralevich2011-04-271-5/+29
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8405ec0e7562a370174d9973dd94984c47e49c36. The original change does not compile.
* | | | am e3ab4245: am a7cf7ed9: am 282c2ab4: Merge "Fold uevent message origin ↵Nick Kralevich2011-04-271-29/+5
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | checking from init into libcutils." * commit 'e3ab42457077ec2a66bac553e59a7fee08d4fa9e': Fold uevent message origin checking from init into libcutils.
| * | | am a7cf7ed9: am 282c2ab4: Merge "Fold uevent message origin checking from ↵Nick Kralevich2011-04-271-29/+5
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | | | | | init into libcutils." * commit 'a7cf7ed93486240ca48a407e67c7c3683a3b93aa': Fold uevent message origin checking from init into libcutils.
| | * | Fold uevent message origin checking from init into libcutils.Vernon Tang2011-04-271-29/+5
| | |/ | | | | | | | | | Change-Id: I1a38e611a7ad990f74306ce453740a1eeed2416d
| | * am fc0b4ff1: Merge "init: Fix parser line numbering"Jean-Baptiste Queru2011-01-072-5/+9
| | |\ | | | | | | | | | | | | | | | | * commit 'fc0b4ff1c8675be3626510a5adfbcae507ecfa43': init: Fix parser line numbering
| | | * init: Fix parser line numberingBruce Beare2011-01-022-5/+9
| | | | | | | | | | | | | | | | | | | | Change-Id: I3885dd7d631e7330d92780df822b3ee1a8d0350b Signed-off-by: Bruce Beare <brucex.j.beare@intel.com>
* | | | am 80337ffc: am 47e4ee59: am 71ead183: Close the client socket early for ↵Brad Fitzpatrick2011-04-011-5/+9
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | ctl.* properties. * commit '80337ffcf45205750b8b90cbbe28c4c8e7e2baff': Close the client socket early for ctl.* properties.
| * | | Close the client socket early for ctl.* properties.Brad Fitzpatrick2011-04-011-5/+9
| | | | | | | | | | | | | | | | | | | | Bug: 4199411 Change-Id: I3bf335e16e0df8405c538989a8f4f6db7795fa36
| * | | Close the property socket *after* updating properties.Brad Fitzpatrick2011-03-301-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also remove some dead code. Bionic update is in change I3e80cecf Bug: 4185486 Change-Id: I28e06197ff7a452c70b89b9fc5e2bcf0d9d54bbe
* | | | Merge "ueventd: track platform device uevents to parse block device names"Colin Cross2011-03-311-10/+88
|\ \ \ \
| * | | | ueventd: track platform device uevents to parse block device namesColin Cross2011-03-311-10/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mmc block devices on panda boards use a platform device called omap/omap_hsmmc.0. The number of path entries in the uevent after the platform device is unknown, and the number of path entries in the platform device is unknown, so the only way to determine how many entries make up the platform device is to compare against a list of platform devices. Add a list of platform devices that have been registered, and iterate through it to determine the platform device portion of a block device uevent. Change-Id: I1480bc6429172ca6997d548787be3863ce062472
* | | | | Merge "ueventd: refactor uevent handling"Colin Cross2011-03-311-89/+126
|\ \ \ \ \ | |/ / / /
| * | | | ueventd: refactor uevent handlingColin Cross2011-03-311-89/+126
| | | | | | | | | | | | | | | | | | | | Change-Id: I2002be3580ff87b0a55dc030a9099bf6d795011f
* | | | | Close the property socket *after* updating properties.Brad Fitzpatrick2011-03-301-10/+6
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also remove some dead code. Bionic update is in change I3e80cecf Bug: 4185486 Change-Id: I8dd685eaea1a927c1659df5a1228cc259227ad1c
* | | | defer firmware load until after filesystems are mountedBrian Swetland2011-03-253-9/+36
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | In some situations a driver could try to request firmware before /system is mounted. Previously we'd fail the request. Now we will retry the read-from-filesystem every 100ms until we find the firmware or we've finished the "fs" and "post-fs" stages of init. Change-Id: Ie32402f7d41c818bf20f3297286ed5f99705b72c
* | | Load the persistent properties after decrypting the /data partitionKen Sumrall2011-03-105-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix for bug 3415286. The persistent properties are normally read early in the boot process after /data is mounted. However, for an encrypted system, at that point /data is a tmpfs ramdisk. This change adds a new command to init (load_persist_props) to read the persistent properties, and adds an action to init.rc to load the persistent properties. This action is triggered by setting a property in vold, but that's in a different CL. Change-Id: I74b3057974ee6029c29d956b76fef5566700d471
* | | Try to unmount writable filesystems when rebootingKen Sumrall2011-03-101-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ext4 filesystems like to be unmounted before rebooting. The Android system doesn't have a traditional Linux init setup, and shutting down the system was not much more than calling sync(2) and reboot(2). This adds a new function to libcutils called android_reboot(). By default, it calls sync() and then remounts all writable filesystems as read-only and marks them clean. There is a flag parameter in which the caller can ask for sync() not to be called, or to not remount the filesystems as read-only. Then it will call reboot(2) as directed by the other parameters. This change also updates adb, init and toolbox to call the new android_reboot() function. Fixes bugs 3350709 and 3495575. Change-Id: I16d71ffce3134310d7a260f61ec6f4dd204124a7
* | | property_service: Give radio permission to set net.qmi*Amol Bhatkar2011-03-021-0/+1
| | | | | | | | | | | | Change-Id: I771ef22859799b863ab79de9d3248ef610af4dd8
* | | Fix for bug 3379244, non-eMMC devices don't start all services.Ken Sumrall2011-02-171-9/+21
| | | | | | | | | | | | | | | | | | | | | Fix for non-eMMC based devices to properly start the "on nonencrypted" action. Change-Id: I5d2966db352b02f1a1724fb105e1cefc46037e42
* | | Add the commands rm and rmdir to init.Ken Sumrall2011-01-183-0/+16
| | | | | | | | | | | | | | | | | | | | | rm only removes a single non-directory directory entry (no -r support) rmdir removes a single empty directory Change-Id: I49702b02ba98a177027b126268c2c2846f968195
* | | Set a read-only property to indicate if the device is running encrypted.Ken Sumrall2011-01-141-0/+2
| | | | | | | | | | | | | | | | | | | | | The UI needs to know if the device is running with an encrypted filesystem or now. So set a read-only property at boot to let it know. Change-Id: I753de2d606c975bcbe9946d10fd47558cf357dac
* | | init: Fix parser line numberingBruce Beare2011-01-072-5/+9
| | | | | | | | | | | | Change-Id: I1ac481a2cef749b26c73bc9e6a212e6ace7a0ae2
* | | am bf10797e: am f7ca6040: Fix infinite loop in init when debugging is turned offColin Cross2011-01-041-6/+6
|\ \ \ | |/ / | | | | | | | | | * commit 'bf10797e538f9fa252d72710bd5ecf0ef1f6f3e0': Fix infinite loop in init when debugging is turned off
| * | am f7ca6040: Fix infinite loop in init when debugging is turned offColin Cross2011-01-041-6/+6
| |\ \ | | |/ | |/| | | | | | | * commit 'f7ca6040616f672a6f0039d55e39c610b7c1cf91': Fix infinite loop in init when debugging is turned off
| | * Fix infinite loop in init when debugging is turned offColin Cross2011-01-041-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a keychord is pressed when debugging is turned off, the main event poll in init will return an event on the keychord fd, but handle_keychord never reads the data. Once this happens, the poll will always return immediately, and init enters an infinite loop. Fix it by always reading from the keychord fd, but only handling the returned keychord if debugging is enabled. Change-Id: Ie4efa98247d3cc978d275dc8a4516b32aa710278
* | | Changes to init to support encrypted filesystems.Ken Sumrall2010-12-186-8/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | These are the changes to init and init.rc necessary to support booting with and encrypted /data filesystem. A corresponding change to init.<device>.rc goes along with this change. Change-Id: I0c7e2cc39568358014a82e317735c0eae14dd683
* | | init: Allow non-root adbd to switch between TCP and USB modesMike Lockwood2010-12-101-0/+1
| | | | | | | | | | | | | | | Change-Id: I9e93ceefadfaa2a4f8ec25cfa05fa4821fd98093 Signed-off-by: Mike Lockwood <lockwood@android.com>
* | | Revert "Add "slow_start" keyword to init"Iliyan Malchev2010-12-084-10/+0
| | | | | | | | | | | | This reverts commit 50b3afd9f39619f69dc6f4efc29be88933eb3614.
* | | Add "slow_start" keyword to initPaul Eastham2010-12-044-0/+10
| | | | | | | | | | | | | | | | | | | | | This keyword will cause init to wait a few seconds before exec'ing the target binary. Maybe only useful for hacks and debugging. Change-Id: I85caa0bcbc0be7e48bd21eb9e31e039c0740c8d5
* | | Merge "Add missing headers for compilation on x86 targets"Olivier Bailly2010-11-293-0/+5
|\ \ \
| * | | Add missing headers for compilation on x86 targetsOlivier Bailly2010-11-173-0/+5
| | | | | | | | | | | | | | | | Change-Id: I5f4dc797b353a0f01fa00d38375ec303bf863254
* | | | check the return value of setuid and friendsNick Kralevich2010-11-171-3/+12
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | Under some circumstances, setuid() and family can fail, returning a non-zero value. (see "man setuid" for details). If this happens, we want to ensure that init doesn't spawn a process which has root privileges when it's not suppose to. Change-Id: Idd03f2c8f82a7eaf6e696b5bcfe308e51ea58b52
* | | init: Abort firmware transfer if firmware is missingBenoit Goby2010-11-091-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | If firmware is not found, write -1 /sys/$DEVPATH/loading to cancel the firmware load. Otherwise the driver has to wait for the 60s timeout. Change-Id: Id2787cda9b2be45b9adea41f6f161cd54cda212e Signed-off-by: Benoit Goby <benoit@android.com>
* | | am 439b4dfb: am bc57d4ce: init: support owner/permission setting for sysfs ↵Brian Swetland2010-10-264-33/+62
|\ \ \ | |/ / | | | | | | attributes of devices
| * | am bc57d4ce: init: support owner/permission setting for sysfs attributes of ↵Brian Swetland2010-10-264-33/+62
| |\ \ | | |/ | | | | | | devices
| | * init: support owner/permission setting for sysfs attributes of devicesBrian Swetland2010-10-264-33/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | This should be much nicer than peppering init.rc with chown/chmod directives. Also, remove some dead code and obsolete comments. Change-Id: I10895f10a9cf2f1226c8d12976cd3db3743da9ec