summaryrefslogtreecommitdiffstats
path: root/etc (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Make recovery/fastbootd USB VID/PID configurable.Josh Gao2022-08-251-8/+8
| | | | | | | | | | | | | | Vendors are assigned their own USB vendor/product IDs for products by the USB Implementers Forum. When booting from system, these are set by the USB gadget HAL, but recovery has its USB gadgets configured via init.rc, so there's no good way to configure these without copy/pasting the init.rc and having to check whether it changed in every new Android release. Add system properties to let vendors customize the recovery USB IDs to make this easier. Test: `adb reboot fastboot && fastboot wait-for-device && lsusb -d 18d1:` Change-Id: I015a4c13c956b76972785fb38d45611bed27d4f4
* on boot class_start halYifan Hong2021-11-171-0/+1
| | | | | | | | | Now that we have HALs in recovery, class_start hal on boot trigger. Test: manual Bug: 170338625 Change-Id: Ibfaabb3573252b681279cf05bbf07f8776bd9063
* Start servicemanager on init in recovery mode.Yifan Hong2021-11-171-0/+3
| | | | | | | | | This aligns with the behavior in normal boot, where servicemanager is started on init. Test: manual in recovery mode Bug: 170338625 Change-Id: I91d322da9f6eaef21c7ee969375e63751b61513c
* Mount binderfs and add /dev/binder in recovery.Yifan Hong2021-11-171-0/+8
| | | | | | Test: recovery mode Bug: 170338625 Change-Id: I6c64039b4139a48f739a62e15a26e624566d252c
* recovery: don't mount acctMarco Ballesio2021-02-121-3/+0
| | | | | | | | | /acct is not necessary anymore for process group creation (it migrated to /sys/fs/cgroup and is automatically mounted by libprocessgroup) Bug: 168907513 Test: booted in remote mode and tested adb sideload Change-Id: Iaa455df65f393ac1f67ae81c6e78d8f4934d88a2
* Do not execute linkerconfig from recoveryKiyoung Kim2019-12-171-2/+2
| | | | | | | | | | | | | | Linkerconfig binary itself should be built as static, so size of executable is hard to be reduced. However, this used lots of space from recovery so only small space left in it. To avoid this linker config from recovery should be generated within build time and use prebuilt one. Prebuilt ld.config.txt will be located under /system/etc as before, and init will copy the file into /linkerconfig so we can use same location for both recovery and normal boot. Bug: 146384333 Test: m -j passed && crosshatch bootloader worked with this change Change-Id: I96300f1c8301167234787274820086a4c6ea0e6e
* Generate linker config from recovery initKiyoung Kim2019-12-121-0/+4
| | | | | | | | | Generate linker config from recovery init to be used from recovery processes. Bug: 139638519 Test: Tested from crosshatch Change-Id: I777a8baf08254b07375b8039bb252864637e29e7
* Merge "Fixed typo during stopping fastboot"Tom Cherry2019-11-131-1/+1
|\
| * Fixed typo during stopping fastbootDmytro Prokopchuk2019-11-131-1/+1
| | | | | | | | | | Change-Id: I0a589d068807e255654c7e62831423f944b5cdc3 Signed-off-by: Dmytro Prokopchuk <dmytro.prokopchuk@globallogic.com>
* | Move init and ueventd scripts from / to /system/etcTom Cherry2019-11-071-9/+0
|/ | | | | | | | | | | | | There is no reason for these scripts to continue to exist in /, when they are better suited for /system/etc. There are problems keeping them at / as well, particularly that they cannot be updated with overlayfs. Bug: 131087886 Bug: 140313207 Test: build/boot + boot to recovery Merged-In: I1fb6690d4302a1884d8521c21a9754b2ca710d5a Change-Id: I1fb6690d4302a1884d8521c21a9754b2ca710d5a
* Stop setting usb config from recovery init scriptTom Cherry2019-11-071-8/+0
| | | | | | | | | We used to set sys.usb.config to adb in the init script. And the purpose is to start adbd. This is a duplicate of code because we always check and reset the usb config in recovery_main. Test: check adbd starts Change-Id: I6e2842ff8aebf6ccf3bd3f2ae85323899a2b9de4
* Start adbd in user mode if bootloader is unlockedTianjie Xu2019-10-301-0/+4
| | | | | | | | | | | | | | | During automatic tests, we sometimes want to reboot the device out of the rescue party remotely. And per http://go/recovery-adb-access, one option is to start adbd in user build if the device has an unlocked bootloader. This should not add more surface of attack. Because verified boot is off with the unlocked bootloader, and the user can always flash a custom recovery image that always starts adbd. Bug: 141247819 Test: check adbd doesn't start in user build, unlock bootloader, and check adbd starts. Change-Id: I851746245f862cb4dfb01e6c3ad035f2c9f9ccec
* Start charger at /system/bin/charger.Tao Bao2018-09-151-1/+1
| | | | | | | Bug: 114042635 Test: Boot into recovery mode on walleye. Check that charger keeps working. Change-Id: I818536a6d261c860dd6f6c08774c2355e14f4236
* Fix sideload for user devices by adding a new sideload configHridya Valsaraju2018-09-081-4/+17
| | | | | | | | Bug: 113563995 Test: Tested the 'adb sideload' command on marlin user/userdebug builds and walleye user/userdebug builds Change-Id: I00d565547b85f2db87012e4a08316609e03395ac
* Add /dev/stdin, /dev/stdout, and /dev/stderr in recovery too.Elliott Hughes2018-08-231-0/+4
| | | | | | | | | | Now these are in the main image, there's some chance of code assuming they're present in recovery too (or command-line users using them out of habit). Bug: http://b/31824379 Test: builds Change-Id: Ia19272cd1959685765099f3e15d1d1e63babd279
* Add fastboot mode to recoveryHridya Valsaraju2018-08-141-19/+84
| | | | | | | | | | | | | | | | | Add a fastboot mode to recovery that can be entered with command line args or with the ui. Add usb property triggers to switch between fastboot and adb configurations. Allow switching between fastboot and adb through usb commands by opening a unix socket. adbd/fastbootd writes to this socket, which interrupts the ui and switches to the new mode. Test: Use fastboot mode Bug: 78793464 Change-Id: I7891bb84427ec734a21a872036629b95ab3fb13c
* Merge "ueventd is now at /system/bin/ueventd"Tom Cherry2018-08-071-1/+1
|\
| * ueventd is now at /system/bin/ueventdTom Cherry2018-07-251-1/+1
| | | | | | | | | | | | Bug: 79758715 Test: boot into recovery Change-Id: I9bf47b2487993e275419befdc9718cc0ac8d3ea7
* | Move recovery from /sbin to /system/binHridya Valsaraju2018-07-271-1/+1
|/ | | | | | | | | Executables should be in /system/bin rather than sbin. Bug: 78793464 Test: boot into recovery, try adb sideload Change-Id: I194589119a099d29e56b0648f0906a5ae2aa6770
* Recovery image is self-containedJiyong Park2018-06-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | Now recovery mode is self-contained, which means we don't need to mount system.img to run shell, etc. What is needed in recovery mode is all in the recovery ramdisk image. Since we no longer use /system as the mount point for the system.img, this allows us to have identical filesystem layout as the system.img. Executables and libs are installed to /system/bin and /system/lib. Right now, we only have adbd, sh, toybox in /system/bin but will move static executables from /sbin to /system/bin as soon as they are converted to dynamic executables. system.img is mounted to /mnt/system instead. Bug: 63673171 Test: `adb reboot recovery; adb devices` shows the device ID Test: `adb root && adb shell` and then $ lsof -p `pidof adbd` shows that libm.so, libc.so, etc. are loaded from the /lib directory. Change-Id: I801ebd18f3e0a112db3d9a11e4fbb4e49181652a
* Add a /bin symlink for consistency.Elliott Hughes2017-12-061-0/+1
| | | | | | Bug: http://b/63142920 Test: builds Change-Id: I1f96935daca4d79f753e172067e07f8e27ea819e
* Merge "init.rc: Remove sys.powerctl action" am: 9848209088 am: 9fcc7c8253Tom Cherry2017-04-181-3/+0
|\ | | | | | | | | | | am: 6e575ccd0f Change-Id: Iec1eb05ea5ec85c035d6ae7e232699ab3a6f6878
| * init.rc: Remove sys.powerctl actionTom Cherry2017-04-181-3/+0
| | | | | | | | | | | | | | | | | | | | Init now handles this property change directly. Bug: 37209359 Bug: 37415192 Test: Init reboots normally. Change-Id: I9a4925897fb83bed180d12c871d9a71126fa4aa8
| * Write aliases before ffs mount in recoveryJerry Zhang2017-01-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | This is necessary to support kernel changes that allow for multiple ffs functions. Some kernels require aliases in order to name function instances before mount time. Test: Reboot into recovery, verify adb works Bug: 34070894 Change-Id: I8376304d92af9b3e8c734fdb8cc77f0dc8bc4850
* | Write aliases before ffs mount in recoveryJerry Zhang2017-01-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | This is necessary to support kernel changes that allow for multiple ffs functions. Some kernels require aliases in order to name function instances before mount time. Test: Reboot into recovery, verify adb works Bug: 34070894 Change-Id: I8376304d92af9b3e8c734fdb8cc77f0dc8bc4850
* | healthd: change how charger is launched in recovery.Sandeep Patil2016-11-011-2/+2
|/ | | | | | | | | | | | | | This is triggered by changes in healthd which spits out 2 binaries. Recovery needs to use static binary which is now renamed to 'charger'. So, change the .rc file to match the rename. Update the seclable according to new healthd-charger split Test: Tested recovery on angler using 'reboot recovery' to ensure healthd is working as before Change-Id: I9e6018156e677e7224dd2e5894941ed2a7cac1d0 Signed-off-by: Sandeep Patil <sspatil@google.com>
* init: move healthd to late-initAndriy Naborskyy2016-10-111-1/+0
| | | | | | | | | | Starting healthd in early-init is not needed and can delay coldboot done Now healthd is starting at boot as usual service. Test: check kmsg that healthd starting after /dev/.coldboot_done Bug: 30292927 Change-Id: I367d022f5885122da49181db3db536012e83f564
* init now uses libprocessgroup, so set up /acct.Elliott Hughes2016-06-161-0/+3
| | | | Change-Id: Iec1492dfaf2ceae6f4d8618dd725d07316ee960b
* Remove etc/META-INF/com/google/android/update-script.Elliott Hughes2016-06-101-8/+0
| | | | | Bug: http://b/29250988 Change-Id: I61f8c6717b38de2242e4ea8e0913237c1ce5bfea
* Restore labels on /postinstall during recovery.Alex Deymo2016-03-021-0/+3
| | | | | | | | | This patch mirrors what was done in the main init.rc to relabel /postinstall. Bug: 27178350 Bug: 27177071 Change-Id: I39cd03f3c55a42c03367957e8c259c9a3155203c
* am 90c75b0b: Change init sequence to support file level encryptionPaul Lawrence2015-07-131-3/+3
|\ | | | | | | | | * commit '90c75b0beb375b8d261e2df92292e9b542470f6e': Change init sequence to support file level encryption
| * Change init sequence to support file level encryptionPaul Lawrence2015-07-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | File level encryption must get the key between mounting userdata and calling post_fs_data when the directories are created. This requires access to keymaster, which in turn is found from a system property. Split property loaded into system and data, and load in right order. Bug: 22233063 Change-Id: I409c12e3f4a8cef474eb48818e96760fe292cc49
* | am 10cf0942: Merge "Revert "Change init sequence to support file level encryption"" into mnc-devPaul Lawrence2015-07-071-3/+3
|\| | | | | | | | | * commit '10cf0942a7f4b2bfd539416e4767aaaf866a6527': Revert "Change init sequence to support file level encryption"
| * Revert "Change init sequence to support file level encryption"Paul Lawrence2015-07-071-3/+3
| | | | | | | | | | | | This reverts commit 98c1a3de23ae8b589c36e74939193c44d25cac65. Change-Id: I524060418de18f97c3865ebc4435f501015e92ee
* | am d6b2b65d: Merge "Change init sequence to support file level encryption" into mnc-devPaul Lawrence2015-07-061-3/+3
|\| | | | | | | | | * commit 'd6b2b65dc40c5af7feecf634b8ae55bf14fe8e6c': Change init sequence to support file level encryption
| * Change init sequence to support file level encryptionPaul Lawrence2015-07-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | File level encryption must get the key between mounting userdata and calling post_fs_data when the directories are created. This requires access to keymaster, which in turn is found from a system property. Split property loaded into system and data, and load in right order. Bug: 22233063 Change-Id: I409c12e3f4a8cef474eb48818e96760fe292cc49
* | init sets the default PATH itself, better.Elliott Hughes2015-05-121-1/+0
|/ | | | | | This fixes 'su' and 'strace' in the recovery image. Change-Id: I83c2664d32a15da92bb6092fbdfc772184013c88
* Revert "Revert "init re-execs to set its security context now.""Elliott Hughes2015-04-241-7/+0
| | | | | | | This reverts commit c819dbe95bf80645178b0180f519ab2983da01a0. Bug: http://b/19702273 Change-Id: I5c75b148a12e644dd247a4df4f67dc9b4b9ff8cf
* Revert "init re-execs to set its security context now."Nick Kralevich2015-04-241-0/+7
| | | | | | | | shamu isn't booting now This reverts commit c57453d5377a13445c4b1d3f73c0e0ab19aa0c1e. Change-Id: I8efbf6260f5fcf983e5056fac6d03916415b944e
* init re-execs to set its security context now.Elliott Hughes2015-04-241-7/+0
| | | | Change-Id: I0a014f8dddfe775159903b5d6fa632733fef692c
* Bump up max_map_count value.Jesse Zhao2015-01-091-0/+1
| | | | | Change-Id: Id3e2c0795b817db9a85bc84cba2aa05d20179d39 Bug: 18503789
* init.rc: Inidicate that booting is complete wrt firwmare requestsJP Abgrall2014-10-211-1/+6
| | | | | | | | | | ueventd will wait for /dev/.booting to go away before giving up on loading firmware. The issue was introduced in Ifdd5dd1e95d7e064dde5c80b70198882d949a710 which forgot to update recovery's init.rc Bug: 17993625 Change-Id: I91205fe6eea50aaef9b401d650ec8d6843a92a57
* sideload without holding the whole package in RAMDoug Zongker2014-07-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement a new method of sideloading over ADB that does not require the entire package to be held in RAM (useful for low-RAM devices and devices using block OTA where we'd rather have more RAM available for binary patching). We communicate with the host using a new adb service called "sideload-host", which makes the host act as a server, sending us different parts of the package file on request. We create a FUSE filesystem that creates a virtual file "/sideload/package.zip" that is backed by the ADB connection -- users see a normal file, but when they read from the file we're actually fetching the data from the adb host. This file is then passed to the verification and installation systems like any other. To prevent a malicious adb host implementation from serving different data to the verification and installation phases of sideloading, the FUSE filesystem verifies that the contents of the file don't change between reads -- every time we fetch a block from the host we compare its hash to the previous hash for that block (if it was read before) and cause the read to fail if it changes. One necessary change is that the minadbd started by recovery in sideload mode no longer drops its root privileges (they're needed to mount the FUSE filesystem). We rely on SELinux enforcement to restrict the set of things that can be accessed. Change-Id: Ida7dbd3b04c1d4e27a2779d88c1da0c7c81fb114
* am 3e0fc39e: am 974fe112: Merge "Fix recovery mode."Riley Andrews2014-06-251-1/+19
|\ | | | | | | | | * commit '3e0fc39ec27c0ed96ffd2a617f1841fe3bf3c8f6': Fix recovery mode.
| * Fix recovery mode.Riley Andrews2014-06-251-1/+19
| | | | | | | | | | | | | | | | | | Duplicate changes made to init.rc for https://android-review.googlesource.com/98852 in the init.rc used for recovery mode. Bug 15849856 Change-Id: Ia376ddf6373a28718653f7fb1435bf7ecb33d813
* | recovery: enable panic_on_oopsColin Cross2014-06-241-0/+2
| | | | | | | | | | | | Set panic_on_oops=1 to reboot if the kernel panics. Change-Id: Id9e8689a570229db2ea2a3d72b52784f8a1ed107
* | am ed75be6d: am ac189bf6: Merge "recovery: Fix adb with linux 3.10"Benoit Goby2014-02-211-0/+6
|\| | | | | | | | | * commit 'ed75be6de9d883a2524065940d732593fa26ac19': recovery: Fix adb with linux 3.10
| * recovery: Fix adb with linux 3.10Benoit Goby2014-02-201-0/+6
| | | | | | | | | | | | | | | | In kernel 3.10, f_adb has been removed and adbd can use functionfs instead. Mount functionfs on boot for adbd. On older kernels, mount will fail silently and adbd will revert to f_adb. Change-Id: I5db57aaf35b35859ea88c7d0e0661d8c553e5811
* | am f4641299: am 295e74aa: Merge "adbd: switch to su domain when running as root"Nick Kralevich2014-01-241-1/+1
|\| | | | | | | | | * commit 'f464129950eaea49b1234fdcfd04ec8723e3c672': adbd: switch to su domain when running as root
| * adbd: switch to su domain when running as rootNick Kralevich2014-01-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | When adbd runs as root, it should transition into the su domain. This is needed to run the adbd and shell domains in enforcing on userdebug / eng devices without breaking developer workflows. Use the new device_banner command line option. Change-Id: Ib33c0dd2dd6172035230514ac84fcaed2ecf44d6
* | am a01b6467: am 772f6e2a: Merge "correctly mount tmpfs as /tmp in recovery"Doug Zongker2014-01-141-2/+2
|\| | | | | | | | | * commit 'a01b646794fc207da657d7b8ef779c9d842acfde': correctly mount tmpfs as /tmp in recovery
| * correctly mount tmpfs as /tmp in recoveryDoug Zongker2014-01-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | The syntax of init's mount command changed in April 2008 but recovery's init.rc was never updated, so recovery's /tmp has been on the root fs all this time. Fix. Also add /system/bin to the PATH in recovery, which is handy for debugging. Change-Id: I39f7ae435a8ce3bad691e4b7c307db0bd8de1302
* | am 7e0d3066: am fc729512: Merge "Set SELinux security contexts correctly for init and services."Nick Kralevich2014-01-131-0/+11
|\| | | | | | | | | * commit '7e0d30667cf53a182525f87dd0c8cb0e2628a1ed': Set SELinux security contexts correctly for init and services.
| * Set SELinux security contexts correctly for init and services.Stephen Smalley2014-01-131-0/+11
| | | | | | | | | | | | | | | | Otherwise everything is left running in the kernel domain when booting recovery. Change-Id: Ie3d86547d5be0b68dd1875a97afe1e00fc3e4da1 Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
* | start healthd in recovery modeTodd Poynor2013-09-141-1/+1
|/ | | | Change-Id: I431ece69b6856fd1ea6079c38cdeb593c15d7385
* fix secure adb in recoveryDoug Zongker2013-09-111-0/+1
| | | | | | | | Recovery's init.rc was missing a line (added to the main system's init.rc in change Ic97fd464440ff4a29fc9da7ad15949ac5215ade3) is required for secure adb to work. Change-Id: Id79b94d2abb4cbe3cca7cabeb4bc5faf7205e56b
* recovery: fix rebootingDoug Zongker2013-08-301-0/+3
| | | | | | | | Change I84c0513acb549720cb0e8c9fcbda0050f5c396f5 moved reboot functionality into init but did not update the recovery partition; so "adb reboot" and /system/bin/reboot in recovery are both broken. Change-Id: Ie2d14627a686ffb5064256b6c399723636dff116
* start healthd in recoveryTodd Poynor2013-06-191-0/+4
| | | | Change-Id: I16e3e0ddb8ca062431deb4be83c5be5eb786d76f
* recovery: import init.recovery.${ro.hardware}.rcColin Cross2012-08-081-0/+2
| | | | | | | | | Some devices need hardware specific services started in recovery, for example watchdogd. Import init.recovery.${ro.hardware}.rc from the recovery init.rc. Bug: 6953625 Change-Id: I4a4cee210238150ffaabe774a44340ec3c8ff78c
* run minadbd as shell userDoug Zongker2012-03-201-0/+3
| | | | | | | | Make minadbd drop its root privileges after initializing. We need to make the /tmp directory writable by the shell group so that it can drop the sideloaded file there. Change-Id: I67b292cf769383f0f67fb934e5a80d408a4c131d
* always initialize usb product, vendor, etc. for adb in recoveryDoug Zongker2012-01-101-7/+9
| | | | | | | Set these values even on non-debuggable builds, so that the mini-adb now in recovery can work. Change-Id: If4c915403e6f43bfe922aa347e350a8982443106
* recovery: convert all usages of $prop to ${prop}Dima Zavin2012-01-101-3/+3
| | | | | Change-Id: I9451b8350d33806097598fb9e575b28fd8b292ad Signed-off-by: Dima Zavin <dima@android.com>
* Add missing commands to recovery init.rcMichael Ward2011-07-071-0/+3
| | | | | | Wrote some missing items in recovery, most notably the serial number so that it shows up correctly on adb. Change-Id: If430c0b78191c8d77f781aa605b5081571451775
* init.rc: Simplify logic for starting adbd in recoveryMike Lockwood2011-06-291-25/+6
| | | | | | | | | | Always start adbd if ro.debuggable=1 rather than basing it on user preference in persistent system properties. Use new D001 product ID, which I just allocated for "android recovery mode" Change-Id: I6f1eac5257eaad2e538c0a8dd549ad89219efa3e Signed-off-by: Mike Lockwood <lockwood@android.com>
* fix adb root in recoveryDoug Zongker2011-06-241-0/+4
| | | | | | recovery's init.rc was missing lines that made adb root work. Change-Id: I300e6997e3b5cb9c7b542b2012eed61deb2550f1
* Fix starting adb in recovery modeMike Lockwood2011-06-191-3/+27
| | | | | Change-Id: I8444f44d3194ff16ce54121633d5b255231393f5 Signed-off-by: Mike Lockwood <lockwood@android.com>
* am ecc76ba5: Set adbd to be disabled by default in recoveryKenny Root2010-06-281-0/+1
|\ | | | | | | | | | | | | Merge commit 'ecc76ba5516d62a886f9c290906e0ca50702c9ab' into gingerbread * commit 'ecc76ba5516d62a886f9c290906e0ca50702c9ab': Set adbd to be disabled by default in recovery
| * Set adbd to be disabled by default in recoveryKenny Root2010-06-281-0/+1
| | | | | | | | Change-Id: I74fa6edc4b001247b20be52e8301d18407fede2c
* | recovery: Add ueventd serviceColin Cross2010-05-141-0/+4
|/ | | | Change-Id: Iad448bc1608f88c5db2108475f35b88ea2877b07
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-042-0/+41
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-042-41/+0
|
* Initial ContributionThe Android Open Source Project2008-10-212-0/+41