aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* bootable: Read all asserts in case there are more than onelineage-16.0Hernán Castañón2020-05-051-1/+10
| | | | | | | | | | | In A/B, the device check isn´t done by the updater script, but using metadata for it. Let´s search if the device codename/assert is included in the string. Change-Id: Ie856ac699aaa83de2b364bc85a510a037d36edf9 Signed-off-by: Hernán Castañón <herna@paranoidandroid.co> Signed-off-by: theimpulson <aayushgupta219@gmail.com>
* recovery: volmgr: fixup `EmulatedVolume creating`voodik2020-04-201-6/+8
| | | | | | * Avoid dangling pointer. Instead of pointing to fstab_rec create copy. Change-Id: I41685dd9a2e5cc8ba1c49f63115368868279e6c4
* recovery: make /etc/fstab only include entries that match the detected fs typeAlessandro Astone2020-03-251-8/+18
| | | | | | | | | | | | | * toybox's `mount` does not support multiple entries like we do, so if we can detect the filesystem of an fstab enrtry print that and only that one to /etc/fstab, so that mounting via toybox has a better chance of succeding. * as a bonus, this patch also gets rid of duplicates in /etc/fstab caused by the fact that ReadDefaultFstab() combines entries from DT and from recovery.fstab Change-Id: Iec4ab38044054555d2a33da6f5d53de7716e7bee
* recovery: increase free memory for sideload cacheTom Marshall2020-03-251-1/+1
| | | | | | | | | | | * Too low of a value causes out of memory exceptions when sideloading big files (compared to the device's available ram) * 400MB was determined by increasingly trying different values, 100MB at a time, on a 2GB device when sideloading 1.9GB of data. Change-Id: I8faac2deb7b1c2ddbd9dcb21914e34d6cd672575
* recovery: Show slot indicator for A/B devicesTom Marshall2019-12-053-5/+22
| | | | | | | | | When running on an A/B device, split the top version line horizontally to show the Android version on the left and the boot slot on the right. When not running on A/B device, center the Android version. Change-Id: Ica18af5e46dadf1088fdfd6d23d96db090195a6a
* recovery: calibrate touchscreenTom Marshall2019-08-112-2/+26
| | | | Change-Id: I5a32a59691dea5fa2aa867e6594cec15b1b24ccf
* recovery: fix unused parameter build error on user buildsshagbag9132019-08-061-0/+1
| | | | | | | Cast device parameter to void to shut up the compiler. Change-Id: Ifc6496345d02e83f6bacb8308c4714e1f8b46bf3 Signed-off-by: shagbag913 <sh4gbag913@gmail.com>
* Make adb sideload work properlyLuca Stefani2019-07-281-0/+5
| | | | | | | * Let's show our logo during install and dialog to ask to continue unverified install Change-Id: Idd362a25efa185a2c46c764557758f3d15d60b39
* recovery: hide option to mount emulated storage after wiping dataAlessandro Astone2019-07-261-3/+14
| | | | | | | | | | | | | | | | | * If userdata is initially unencrypted and user performs a wipe, the option to install from emulated storage would still be shown as available. * This patch sets userdata_mountable = false after wiping data. * That alone though is not enough, because if we reboot straight into recovery after wiping data, userdata_mountable will be true since "mounting" would indeed succeed, but no media/0 folder would be available. That is only created after booting system. To solve this we just add a check for mountability via the volume manager, which fails if it cannot bind-mount media/0 to /storage/emulated/0. Change-Id: Ia4a6f12db89bfbf21bbec38cc2f7b9598c8157a5
* recovery: Extend mountable check to all volumes and fix volume selectionTom Marshall2019-07-255-5/+21
| | | | | | | | | | | * In volume manager, check if new volumes are mountable. * Check volumes for mountable for inclusion into update list. * Erase unmountable volumes from volumes vector for consistency with the item array. Change-Id: I89ff6cc05a93afffe5e46b24d70fc368bccaf020
* Merge remote-tracking branch 'aosp/pie-gsi' into lineage-16.0-pie-gsiLuca Stefani2019-07-130-0/+0
|\ | | | | | | | | | | | | | | | | | | * aosp/pie-gsi: uncrypt: write permission for f2fs_pin_file uncrypt: fix f2fs ioctl argument for pin_file f2fs: support f2fs by setting unmovable bit for package file Revert "f2fs: support f2fs by setting unmovable bit for package file" Change-Id: I458ebf8f58e5dbe0f43685909d5e2c85018be9c4
| * Merge "Snap for 5450365 from bd8ed91d04de07e5e1d8ec391e27279137713804 to ↵Android Merger2019-05-131-5/+5
| |\ | | | | | | | | | pi-platform-release am: 94baa21254" into pie-gsi
| | * Snap for 5450365 from bd8ed91d04de07e5e1d8ec391e27279137713804 to ↵android-build-team Robot2019-05-131-5/+5
| |/| | | | | | | | | | | | | | | | | | | | | | pi-platform-release am: 94baa21254 Change-Id: I4877ebcdca81b329cf7b61d4e61c81afc696f24a
| | * Snap for 5450365 from bd8ed91d04de07e5e1d8ec391e27279137713804 to ↵android-build-team Robot2019-05-071-5/+5
| | |\ | | | | | | | | | | | | | | | | | | | | pi-platform-release Change-Id: I02180574c059ce8af1f031195ee497540a82cd65
| * | \ Merge "Snap for 5180536 from 8b508c984d6e516bf20318173aa001f0906672e5 to ↵Android Merger2019-02-110-0/+0
| |\ \ \ | | | | | | | | | | | | | | | pi-platform-release am: 96f7786965" into pie-gsi
| | * | | Snap for 5180536 from 8b508c984d6e516bf20318173aa001f0906672e5 to ↵android-build-team Robot2019-02-110-0/+0
| |/| | | | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | pi-platform-release am: 96f7786965 Change-Id: I785deaa02b405efa21abf5f8713a1bccc8fd0829
| | * | Snap for 5180536 from 8b508c984d6e516bf20318173aa001f0906672e5 to ↵android-build-team Robot2019-02-090-0/+0
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | pi-platform-release Change-Id: I18ffadbdab03199e33f4476135b95da658880541
| * | \ \ Merge "uncrypt: write permission for f2fs_pin_file" into pie-gsiTreehugger Robot2018-12-051-1/+1
| |\ \ \ \
| | * | | | uncrypt: write permission for f2fs_pin_fileJaegeuk Kim2018-12-051-1/+1
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need a write permission to set a flag in the file. Bug: None Test: pre-submit Change-Id: I4896ecbe0fc04374e01d006b1c8acdb932e5d16d Merged-In: I4896ecbe0fc04374e01d006b1c8acdb932e5d16d Signed-off-by: Jaegeuk Kim <jaegeuk@google.com> (cherry picked from commit 051b9d87e2bf1550ab6495493b9a2cfab2aa54f1)
| * | | | Merge "uncrypt: fix f2fs ioctl argument for pin_file" into pie-gsiTreehugger Robot2018-10-121-1/+2
| |\ \ \ \
| | * | | | uncrypt: fix f2fs ioctl argument for pin_fileJaegeuk Kim2018-09-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes missing f2fs ioctl call. Change-Id: Id840b76b9d5c580041aaee4501ac8e69fc3fb818 Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
| * | | | | Merge "f2fs: support f2fs by setting unmovable bit for package file" into ↵Treehugger Robot2018-10-121-4/+38
| |\| | | | | | | | | | | | | | | | | | | | | | pie-gsi
| | * | | | f2fs: support f2fs by setting unmovable bit for package fileJaegeuk Kim2018-09-121-4/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This enables to use uncrypt for f2fs update-on-reboot. It requires kernel patch named: "f2fs: add an ioctl to disable GC for specific file" If any operation fails during uncrypt, please delete package file as soon as possible, and create the file again to move forward. IOWs, don't leave the package file for a long time. Bug: 70309376 Bug: 30170612 Change-Id: I3b4233e7da756f107be35364521699deaf2e7139 Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
| * | | | | Merge "Revert "f2fs: support f2fs by setting unmovable bit for package ↵Treehugger Robot2018-10-121-22/+4
| |\| | | | | | |/ / / | |/| | | | | | | | file"" into pie-gsi
| | * | | Revert "f2fs: support f2fs by setting unmovable bit for package file"Luca Stefani2018-09-121-22/+4
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Replaced with upstream aosp/master version * With this change flashing fails if either one of the following cases are met: 1) Kernel f2fs stack doesn't support the ioctl ( errno isn't checked for ENOTSUP ) 2) If the device has multiple userdata entries in fstab ( f2fs and ext4 in this order ) and userdata is formatted as ext4, recovery will attempt to send the ioctl without checking if it's supported ( same as 1, errno isn't checked for ENOTSUP ) 3) The ioctl, when supported, needs an extra argument ( __u32 set ) This reverts commit 848f227eea524a48208bdd4181f90fb63a31ed2b. Change-Id: I5871d3da4594f7da44546a2979e72dd87434f821
* | | | OMGRainbowsCEnnis912019-07-134-9/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No longer will we get bad reviews on CWM recovery for its lack of rainbows! Originally design by gweedo767, this patch brings back the wrap count mechanism from v2.0.2.4 to toggle Rainbow Mode for the user. In the original design, every character has a different color, but that method requires modifying graphics.c which will cause breakage in devices with custom graphics.c. This Rainbow Mode has a different color for each line, instead. The wrap_count has been set to 5 instead of the previous 3 so the toggle won't occur as often, if on accident. (port to CM12.1 by cyanogen) Change-Id: Ie9f6f1b6ed94ee69d4d8d9fe27f9a5417cc3f212 improve Rainbow Mode * Require 5 consecutive menu "wraps" in the same direction to help prevent accidental toggling * Align colors into stripes (i.e. columns) a) less prone to induce dizziness in some people when they change b) better resembles a rainbow * Move the stripes to the right when the selection moves up and move the stripes to the left when the selection moves down [yodevil] * Offset different rows by 1 color, so that colorss are diagonally aligned instead of vertically. * Refractor SelectMenu code to avoid clogging it and preserve readability Change-Id: I3feae173b22f5703c554ca33e634881749ff54cf
* | | | recovery: wipe bootloader message from index 0 when using custom offsetsAlessandro Astone2019-06-251-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * We may use a custom offset to: a) preserve data that oem wrote to the first bytes of misc b) skip recovery flags written by the bootloader (e.g. --wipe_data) For case a) one should set the offset 'x' to be at least greater than the size of bootloader_message struct (2048 bytes). If this is the case, then we zero out bytes x ~ x + 2047 For case b) one should set the offset to be strictly smaller than the size of bootloader_message struct. If this is the case, then we zero out bytes 0 ~ 2047. This allows to clear any additional flag set by the bootloader, that would otherwise be forgotten in misc. This also guarantees that we do not involountarily wipe any data that the oem may have written starting at byte 2048 (coff coff LG) Change-Id: I2d4e0702a2d8cbbef6274a87ce9499b0f69310dd
* | | | recovery: Blank screen on initMichael Bestas2019-05-142-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fixes touch on some devices like chiron/sagit * Some other devices (e.g. most MTK) need this because their kernel driver implementations do not perform as expected (initial unblank is only happening when altering the panel brightness x -> 0 -> y). In regular Android, that "unblanking" is done on boot when the lights HAL loads and sets the initial brightness. Change-Id: I2fffac508d09d07355a7a7f087805b0dceb5f97e
* | | | Merge tag 'android-9.0.0_r37' into staging/lineage-16.0_merge-android-9.0.0_r37Kevin F. Haggerty2019-05-061-5/+5
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Android 9.0.0 Release 37 (PQ3A.190505.002) * tag 'android-9.0.0_r37': Import translations. DO NOT MERGE Change-Id: Id5f82253387da4dde498a1498e91d6500b02b0e8
| * | | Snap for 5322077 from fc8af23e97cc29d4af5f3d4df05ffb339e34b08e to ↵android-build-team Robot2019-02-201-5/+5
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | pi-qpr3-release Change-Id: I341bfa4c39eee9f4e21387e2e6f0af2c75d19364
| | * | | Import translations. DO NOT MERGEBill Yi2019-02-161-5/+5
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | Auto-generated-cl: translation import Bug: 64712476 Change-Id: Ie357c8e7a6445223a5a657cd0e96ded4689837f6
* | | | recovery: Set SELinux to permissive for non-release buildsTom Marshall2019-04-301-0/+5
| | | | | | | | | | | | | | | | Change-Id: Iad020439a007a28351719774b641038b076601a2
* | | | recovery: show text during installAlessandro Astone2019-04-115-7/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * The text array will be handled by always writing to the last row, and will be moved up on a new line. * Update the screen at each print. * N.B. This does not show text on OTA updates, but rather only on updates launched from the menu. Change-Id: Ia62c361da17c5e24af508c29a04f045e81306e1c
* | | | recovery: always create emulated volume if we fail to detect fsAlessandro Astone2019-04-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * the first fstab entry for data will be used. * this also prevents strcmp to be called on a null parameter, which ended up crashing some devices Change-Id: I1df70d9df462ab30c857e834152b75d083d77652
* | | | recovery: Default to /storage/emulated/0 for emulated install choiceNolen Johnson2019-04-053-7/+23
| | | | | | | | | | | | | | | | Change-Id: Ib1928acfb598803b4dbc676d9f6d666b0f7e2881
* | | | recovery: ignore refresh events while on browsing menusAlessandro Astone2019-04-052-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Also avoid generating a refresh event when mounting a storage volume to browse it, it would end up being ignored anyways. Thanks to @tdm Change-Id: Idabce4e90b484f34f83d310abdb345778cfc3bf0
* | | | recovery: only show tests in eng buildAlessandro Astone2019-04-052-0/+8
| | | | | | | | | | | | | | | | Change-Id: If783711ecd0d20728ec27ebc572b57e6d9bee760
* | | | recovery: setup a threshold to ignore touch release events after a swipeAlessandro Astone2019-04-052-3/+14
| | | | | | | | | | | | | | | | Change-Id: I42bb91a83c44a4da92c1e85bcea9849e046253dd
* | | | recovery: implement natural touch scrollingAlessandro Astone2019-04-058-1/+45
| | | | | | | | | | | | | | | | Change-Id: Ieedfc3a56cd341583700bfad31993879eb312ba6
* | | | recovery: prevent drawing the last item of a menu offscreenAlessandro Astone2019-04-051-1/+4
| | | | | | | | | | | | | | | | Change-Id: If6b5b91cdcc36003a17ed24e58b820d44a810070
* | | | recovery: always begin showing menu from the startAlessandro Astone2019-04-051-3/+1
| | | | | | | | | | | | | | | | Change-Id: I45775c1ebbd4a84e0d67d0f573b9aae97ab55a8b
* | | | recovery: account for scrolling when selecting item with touchAlessandro Astone2019-04-051-1/+1
| | | | | | | | | | | | | | | | Change-Id: I4c7623004fc45e936c73bbcf0f818c5fc4e11bea
* | | | recovery: VolumeManager: support for multiple /data fs entriesAlessandro Astone2019-04-051-1/+6
| | | | | | | | | | | | | | | | Change-Id: I0ec2c9f3c44b3aa69e07aa97e45a0ee3214ffd05
* | | | recovery: Fix mounting f2fs partitionsTom Marshall2019-04-041-1/+1
| | | | | | | | | | | | | | | | Change-Id: I9d94b611ab9a873b6b57a6d22bf78de131e3c8e5
* | | | recovery: add reboot to recovery optionjrior0012019-04-043-5/+13
| | | | | | | | | | | | | | | | Change-Id: I8684e188577fa16073723e0093e221b767a3826d
* | | | recovery: Support configfs usb configurationHridya Valsaraju2019-04-042-15/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Backported from upstream I7891bb84427ec734a21a872036629b95ab3fb13c "Add fastboot mode to recovery" Change-Id: I252f99f0e44f6be53c5b7577c19c8c1f0f616ad8
* | | | minui: Support input device hotplug in recovery mode.Xihua Chen2019-04-041-0/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the old code, the recovery only enumerated the input devices at the startup, and read the input events from these devices. So if a USB input device is probed after the recovery startup, then the recovery can't read the events from this device. This patch use inotify to monitor /dev/input for new added input device, then support input device hotplug in recovery mode. Bug: 111847510 Test: can use USB keyboard hotplugged in recovery mode Change-Id: I7e7dcbd619d3c66a2f40a43418f5dac6a50c859e Signed-off-by: Liu Shuo A <shuo.a.liu@intel.com> Signed-off-by: Ming Tan <ming.tan@intel.com>
* | | | minui: Fix the wrong move of the callback.Tao Bao2019-04-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The input_cb in ev_init() should be shared among the detected input devices. Test: Boot into recovery. Check key inputs. Change-Id: I0315f6a23625bacedd333fefacbf4ac6797bc1fd
* | | | recovery: autodetect filesystem typeDan Pasanen2019-04-046-3/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Multiple fstab lines (supported in android) cause recovery to fail to mount partitions if the fs type is not the same as the first fstab entry. So when we attempt to find an fstab entry that matches a path for an f2fs, ext4 or vfat type, check it against blkid's determination of what filesystem type it is. If there is a discrepancy, query fs_mgr for the next possible entry that matches that path until either we find one that is good, or run out of fstab entries. * Also attempt to autodetect the filesystem type for mounting from update.zips. Change-Id: Ib6f4535dd88ef714ae1ca6fb0ffae1c7dac0f7ce
* | | | recovery: Add runtime checks for A/B vs traditional updatesChristopher N. Hesse2019-04-041-16/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows A/B devices to install legacy (non-payload) style update.zip packages like our addonsu or gapps. Change-Id: I907a92732470b947de007dde11fb71db64d94c9b