1. 16 May, 2017 1 commit
    • that's avatar
      etc: remove "." from LD_LIBRARY_PATH · 9c3b7e99
      that authored
      We shouldn't load libraries from some random working directory.
      For example it breaks busybox when you're in /system/lib.
      Change-Id: Ia1f8f4fda9e6182c0cd8c5ac727c2b1eb09c84a2
  2. 18 Apr, 2017 1 commit
    • Tom Cherry's avatar
      init.rc: Remove sys.powerctl action · 37ac9497
      Tom Cherry authored
      Init now handles this property change directly.
      Bug: 37209359
      Bug: 37415192
      Test: Init reboots normally.
      Change-Id: I9a4925897fb83bed180d12c871d9a71126fa4aa8
      (cherry picked from commit 4608daf0)
  3. 06 Mar, 2017 1 commit
    • nkk71's avatar
      crypto: Use system's vold for decryption · 71c6c50d
      nkk71 authored
        If TWRP crypto fails to decrypt partition, mount the system
        partition and use system's own vold to attempt decryption.
        This provides a fallback for proprietary OEM encryption as well as
        encryption methods which TWRP hasn't been updated for.
        Requirements in device tree:
        * fstab.{ro.hardware} in device/recovery/root
          The fstab does not need to be complete, but it does need the
          data partition and the encryption entries.
        * 'TW_CRYPTO_USE_SYSTEM_VOLD := true' in BoardConfig
        * 'TW_CRYPTO_USE_SYSTEM_VOLD := <list of services>'
        * Setting the flag to 'true' will just use system's vdc+vold
        * Setting the flag with additional services, will also start them
          prior to attempting vdc+vold decryption, eg: for qualcomm based
          devices you usually need 'TW_CRYPTO_USE_SYSTEM_VOLD := qseecomd'
        * For each service listed an additional import will be automatically
          added to the vold_decrypt.rc file in the form of
          You will need to add any not already existing .rc files in
          your device/recovery/root folder.
        * The service names specified in the vold_decrypt.{service}.rc files
          have to be named 'sys_{service}'
          eg: 'service sys_qseecomd /system/bin/qseecomd'
        * Any service already existing in TWRP as {service} or sbin{service} will
          be stopped and restarted as needed.
        * You can override the default init.recovery.vold_decrypt.rc file(s)
          by placing same named ones in your device/recovery/root folder.
          If you do, you'll need to manually add the needed imports.
        * If /vendor and /firmware folders are temporarily moved and symlinked
          to the folders and files in the system partition, the properties
          'vold_decrypt.symlinked_vendor' and 'vold_decrypt.symlinked_firmware'
          will be set to 1.
          This allows for additional control in the .rc files for any extra
          actions (symlinks, cp files, etc) that may be needed for decryption
          by using: on property:vold_decrypt.symlinked_vendor=1 and/or
          on property:vold_decrypt.symlinked_firmware=1 triggers.
        Debug mode: 'TW_CRYPTO_SYSTEM_VOLD_DEBUG := true' in BoardConfig
        * Specifying this flag, will enable strace on init and vdc, which will
          create separate log files in /tmp for every process created, allowing
          for detailed analysis of which services and files are being accessed.
        * Note that enabling strace will expose the password in the logs!!
        * You need to manually add strace to your build.
      Thanks to @Captain_Throwback for co-authoring and testing.
      Tested successfully on HTC devices:
      M8 (KK through MM), M9 (MM and N), A9 (N), 10 (N), Bolt (N),
      Desire 626s (MM), U Ultra (N)
      HTC One X9 (MTK device)
      And by Nikolay Jeliazkov on: Xiaomi Mi Max
      Change-Id: I4d22ab55baf6a2a50adde2e4c1c510c142714227
  4. 23 Feb, 2017 2 commits
    • Captain Throwback's avatar
      logd: add seclabel so that service runs in 7.1 tree builds · 1b3fa22d
      Captain Throwback authored
      Change-Id: If9bfcf6bdeac91e82e9615b671acbee5acffe0cc
    • Matt Mower's avatar
      Only change USB mode to mtp when ready for MTP · 84830ce0
      Matt Mower authored
      Commit 'Do not toggle USB ID during MTP startup if not needed' changed
      the default USB mode to 'mtp,adb'. Depending on the device, this can
      result in an unfortunate side effect of crashing an ORS sideload
      midway through the process (it's not clear to me whether the kernel or
      the connected computer is responsible). Only put USB into mtp mode
      when MTP storage is starting-up.
      The hack to change the USB mode to adb when a user compiles TWRP
      without MTP support is no longer necessary now that 'adb' is the
      startup mode.
      Change-Id: I8ed13d6ab8e85621533997b8c37ef7ebec0fcf85
  5. 18 Jan, 2017 1 commit
  6. 04 Jan, 2017 3 commits
    • Jerry Zhang's avatar
      Write aliases before ffs mount in recovery · 1d2d8cae
      Jerry Zhang authored
      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
      (cherry picked from commit e66f861a)
    • Jerry Zhang's avatar
      Write aliases before ffs mount in recovery · a61a6726
      Jerry Zhang authored
      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
    • Jerry Zhang's avatar
      Write aliases before ffs mount in recovery · e66f861a
      Jerry Zhang authored
      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
  7. 01 Nov, 2016 1 commit
    • Sandeep Patil's avatar
      healthd: change how charger is launched in recovery. · c4b381c4
      Sandeep Patil authored
      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: default avatarSandeep Patil <sspatil@google.com>
  8. 25 Oct, 2016 1 commit
    • Andriy Naborskyy's avatar
      DO NOT MERGE ANYWHERE init: move healthd to late-init · 195ff7f7
      Andriy Naborskyy authored
      Starting healthd in early-init can cause SELinux denials if healthd
      or any device-specific libraries try to log.
      Now healthd is starting at boot as usual service.
      Bug: 30292927
      Change-Id: I367d022f5885122da49181db3db536012e83f564
  9. 11 Oct, 2016 1 commit
    • Andriy Naborskyy's avatar
      init: move healthd to late-init · 544a1562
      Andriy Naborskyy authored
      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
  10. 29 Aug, 2016 1 commit
  11. 25 Aug, 2016 1 commit
  12. 15 Jun, 2016 1 commit
  13. 10 Jun, 2016 1 commit
  14. 04 Mar, 2016 1 commit
  15. 02 Mar, 2016 1 commit
  16. 15 Feb, 2016 1 commit
    • Ethan Yonker's avatar
      Fix up logd make file rules · e5a288c9
      Ethan Yonker authored
      logd, the init.recovery.logd.rc, and other related files were
      included by default if your device configs specified
      TARGET_USES_LOGD := true which would be the case for any device
      that has a full ROM tree instead of a minimal TWRP tree.
      Change-Id: Ia1e55703631f0f22beab2f4d4479599b88539e1a
  17. 04 Feb, 2016 1 commit
    • Captain Throwback's avatar
      Add TWRP flags to enable logd and/or logcat in recovery · 1f127757
      Captain Throwback authored
      Developers and device maintainers may find it useful to have access
      to logcat in recovery. This patch set adds the following build flags:
      TARGET_USES_LOGD - This is an Android build flag that enables logd
      support. Devices that don't have built in kernel logging to dev/log/*
      will need this flag for logcat. We'll also use this to include the
      necessary support files for logd in TWRP.
      TWRP_INCLUDE_LOGCAT - This enables logcat support in recovery.
      I pulled the init entries from my HTC One M8 GPE boot.img,
      so I'm not certain whether these will work for all devices
      or if they're all necessary.
      Feedback is welcome.
      PS2: Use "TARGET_USES_LOGD" instead as this flag already exists, and
      previous flag was named incorrectly (logd isn't kernel logging)
      PS3: Start logd service on load_persist_props action, needed for 6.0+
      PS4: More info on "TARGET_USES_LOGD" flag as related to liblog
      compilation can be found at the below links:
      Whether or not this flag is needed for logcat in TWRP is dependent
      on whether liblog was compiled with this flag.
      PS5: Update commit message to better describe "TARGET_USES_LOGD" flag
      PS6: Another commit message update
      Change-Id: Iaac6c6c822dc93fbe4b6eadcf24eef6995dd6b50
  18. 23 Dec, 2015 1 commit
    • Matt Mower's avatar
      init: Add new props triggers · 4251a9bc
      Matt Mower authored
      Both Omni and CM split props loading into load_system_props_action and
      load_persist_props_actions in Android 6.0 instead of all_props action.
      Add these triggers. Unrecognized triggers do not cause failures in init
      for versions of Android which do not have these.
      Change-Id: I9682690ff7d378dc0d5e1598754f7a29600c1c2d
  19. 26 Oct, 2015 1 commit
    • Ethan Yonker's avatar
      Fix SELinux issues for some devices · 58b09f1a
      Ethan Yonker authored
      Reinstate some SELinux stuff in the default init.rc (noticed by
      Add permissive.sh script to dependencies list for CM trees.
      Change-Id: I36ade54378c413081d202002488309af35486d5f
  20. 15 Oct, 2015 1 commit
    • HandyMenny's avatar
      Properly set sys.usb.config when ums is enabled. · 37d42994
      HandyMenny authored
      Use sys.usb.config also for ums, but leave sys.storage.ums.enabled for compatibility with custom init.rc that use it.
      PS2: Rebased - moved updates to init.recovery.usb.rc
      Change-Id: Iad3441d23ac37612e58f63e4038d05c5c1a37b25
  21. 14 Jul, 2015 1 commit
    • Matt Mower's avatar
      Allow devices to override USB init · ec009e8c
      Matt Mower authored
      This enables devices to provide their own USB configuration. The
      contents of init.recovery.usb.rc can most simply be modified and
      included in a device's init.recovery.${ro.hardware}.rc.
      Use option:
      Rationale: Some devices handle USB pid switching in the kernel. In this
      case, USB init provides switching functions which differ from the
      standard on property:sys.usb.config=xyz. Other devices should not see
      USB attempt mtp,adb mode when TW_EXCLUDE_MTP is set.
      Cherry-picked from android-5.0
      Change-Id: Ief0fcaf46a1782102166fc1b733a34b1a1ba0802
  22. 07 Jul, 2015 3 commits
  23. 06 Jul, 2015 1 commit
    • Paul Lawrence's avatar
      Change init sequence to support file level encryption · 98c1a3de
      Paul Lawrence authored
      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
  24. 17 Jun, 2015 1 commit
  25. 12 May, 2015 1 commit
  26. 24 Apr, 2015 3 commits
  27. 11 Mar, 2015 1 commit
  28. 25 Feb, 2015 1 commit
  29. 09 Jan, 2015 1 commit
  30. 02 Jan, 2015 1 commit
    • Ethan Yonker's avatar
      Do not toggle USB ID during MTP startup if not needed · df7abac1
      Ethan Yonker authored
      In most cases MTP is enabled so it is better to start our init.rc
      with MTP enabled and try not to toggle USB IDs during TWRP boot so
      that we can keep adb running to make debugging easier.
      Change-Id: Idf122c5ad4deeef7e1ed775d495989c502ddfb19
  31. 19 Dec, 2014 1 commit
  32. 02 Dec, 2014 1 commit
    • Ethan Yonker's avatar
      Make the android-5.0 branch compile in 4.4 to 4.1 · 75bf041a
      Ethan Yonker authored
      Migrate previous minzip to minzipold replacing the existing
      minzipold. This will break compatibility with trees that do not
      support selinux (ICS and older). Migrate former verifier files to
      Add fuse.h to recovery source because older trees do not have it.
      Add LOCAL_MODULE_TAGS where needed for 4.1 tree.
      Change-Id: Iade57cb2b0115af7fce9f56aa98636b1744a1ef4
  33. 21 Oct, 2014 1 commit
    • JP Abgrall's avatar
      init.rc: Inidicate that booting is complete wrt firwmare requests · 9eb8c8bd
      JP Abgrall authored
      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