Commit Graph

29 Commits

Author SHA1 Message Date
Sashidhar Ganiga f242f3a078 Change to read return value from new ReadArgs API
ReadArgs now returns a boolean value instead of
integer. Hence the condition check needs to be
negated to keep same behaviour as N

Change-Id: I53887822231075657220479f0e773797ad4c9935
2017-08-02 02:02:34 -07:00
Arun Padma 9691b5dd03 Update to new ReadArgs API
Updating the parameters of ReadArgs and ErrorAbort APIs

Change-Id: Ia306cd13a65aa5b01da4ee7decbbc3b0c3551d7c
2017-07-26 11:34:31 +05:30
Vara Prasad A V S G 27d423f0b6 Move power.qcom and librecovery_updater_msm to /vendor
Change-Id: Ifb8ab8dee48b7aa19892349a942c90fb9812811a
2017-06-11 06:13:17 +05:30
padarshr ff0d22ae64 oem-recovery: Update emmc dev block path in gpt-utils
Update the emmc dev block path that is being used
in gpt-utils with correct path - /dev/block/mmcblk0.

Change-Id: Ie8f459ea5f8d913cc34fe7a64b651bb3016b9883
2017-05-30 07:04:52 -07:00
Ameya Thakur 05d311b01f gpt-utils: Add xbl_config to the list of A/B partitions
xbl_config is a ota upgradable partition. We now add it to the list
of A/B partitions.

Change-Id: Id6ddeb28b19d4f9d93ade282894b88189d3f59d9
2017-05-11 13:41:50 -07:00
Linux Build Service Account 33ebc3c84f Merge "gpt-utils: Update list of A/B partitions" 2017-05-06 13:51:11 -07:00
Bruce Levy 759cb35ecb gpt-utils: Update list of A/B partitions
Updated PTN_SWAP_LIST to add addtitional A/B partitions.

Change-Id: I57bf6e6b6017a9822d2ddd8089f60340adaf7871
2017-05-05 14:46:23 -07:00
padarshr db18a6a9b1 oem-recovery: Fix an interger overflow issue on 32-bit architecture.
On 64 bit architecture, off_t is 'long long', whereas on 32 bit
architecture off_t is just 'long', i.e. 4 bytes less. Due to this,
integer overflow is seen, and gpt-utils was not able to mark bootup as
successful, causing the device to be slot switched after 7 reboots by
the bootloader. Use off64_t instead.

Change-Id: I4c568188dc1b9076b282ba66d1ec45a81861a2a0
2017-05-05 05:53:44 -07:00
Ameya Thakur 6a20b5de13 oem-updater: Build module when AB_OTA_UPDATER is set
We now compile the oem-updater if either AB_OTA_UPDATER is set to true or
if TARGET_RECOVERY_UPDATER_LIBS contains librecovery_updater_msm.This is to
ensure that the library is built in both A/B and non A/B build configurations.

Change-Id: I0b93ee8fc513cd4b3f657753700bfec95beb1265
2017-02-01 14:26:40 -08:00
David Ng bb129e2bde Initial bring-up changes
Numerous changes for initial bring-up:
- Add pure AOSP handling to libhealthd.msm
- Update to new ReadArgs() API in librecovery_updater_msm
- Temporarily disable common device overlay
- Switch qcom_diag AID to diag

Change-Id: I76892dfa6da6cf3e9ce6e96733f1f1057b5c1f83
2016-12-09 20:17:17 -08:00
Ameya Thakur 64368e56c6 common: Changes requied for A/B support
- Makefile change to add support for builds that do not have a recovery
  partition
- Updated the list of A/B partitions
- Fixed the order of writes in the gpt_disk_commit function
- Added a function to get the layout of a set of partitions on a disk

Change-Id: Icef65178f42cbb01727fe046640602d4cdfd339b
2016-09-13 17:30:43 -07:00
Lalit Kansara 5f9fdde402 KW warning fix: possible access of an array by out of index range
KW throws warning about possible access of an array by out of index
range. Size of the placeholder buffer for an input word has been
increased which was half of the input word's length.

Change-Id: I7c1dbb51456fcbd680fd83db947ebd3f9397a7d7
2016-07-19 15:44:01 +05:30
Ameya Thakur b7bc9b7ec6 oem-recovery: Convert librecovery_updater_msm to C++
Newer versions of the updater code in recovery require that oem-extensions
be in C++.

Change-Id: I1cd9bbdca8f2fa4f48e341b955cb81e6bde7f4b1
2016-06-24 17:03:33 -07:00
Ameya Thakur 68949132c5 oem-recovery: Add support for A/B updates
oem-recovery now has a api to work with the new A/B update mechanism.

Change-Id: I024e050f891761c92fc15d3291ff16035e5028ac
2016-06-24 17:02:45 -07:00
Ameya Thakur 0f8b938b91 recovery: gpt-utils: Add support for failsafe update of xbl
We now support the failsafe update of the xbl partition on UFS based
devices. UFS does not support having a backup GPT for it's 'boot'
partition(xbl), so the failsafe update of this partition requires
special handling

Change-Id: Iabf4ee5ba51f68cfc1e921ebcf9e169ccb35eb7d
2016-06-24 16:58:43 -07:00
Maunik Shah d021fed59c Added partitions to backed-up partitions list
Added partitions to the list the names of the
backed-up partitions to be swapped

Change-Id: I70a2a3d5e73bf5878c93d1ac03ab07bc49bc09f1
2015-12-02 15:23:24 +05:30
Ameya Thakur 7e89c2377c recovery: gpt-utils: Add support for failsafe backup of UFS partitions
We now support the failsafe backup of UFS based devices

Change-Id: Id965602071811541050b0b64ef5fe1b2bc6a9f0e
2015-10-25 00:11:15 -07:00
David Ng 15d23cab60 recovery: Update recovery library to handle reboot reason
Remove obsolete recovery handling and add reboot reason
for handling wipe data keys clear.

Switch to "msm" file naming convention.

Change-Id: I39928eab66b86c0f058f5bd2d11ec0fb16ef464d
2015-09-14 15:22:56 -07:00
Ameya Thakur 2b8425eb92 oem-recovery: Fix for compilation issue
The oem-recovery module now compiles correctly.

Change-Id: Ic366dd20e739119919e27d55dcc73a646e42a658
2015-08-19 11:22:19 -07:00
Ameya Thakur 8d7917de0d recovery: gpt-utils: Swap complete filesystem entry block
We now swap the complete primary and backup filesystem entry instead
of only the guid field.

CRs-Fixed: 777204
Change-Id: I2fbc8a045452d6160ca12ce1baac085b0e0e1bb7
2015-01-13 11:07:42 -08:00
Ameya Thakur 427b76cdf8 recovery: Fix bug where the module would not get compiled in some cases
We now correctly check the entire TARGET_RECOVERY_UPDATER_LIBS list for
librecovery_updater_msm.

Change-Id: Ief2bde02b432537ded80ab563e41b82142e15955
2014-07-21 17:32:13 -07:00
Mitchel Humpherys 6aa3ad4182 rename heap_mask -> heap_id_mask
The Ion API is changing yet again. heap_mask has been renamed in Ion to
heap_id_mask. Rename ours.

Change-Id: I5fbf5d08a1a3ad28f17accb8b4b521586420a8fe
2014-05-23 18:49:01 -07:00
Pavel Nedev 5aaef42ece librecovery_updater_msm: Properly free allocated memory
Free updater ReadArgs allocated memory.

CRs-Fixed: 553376

Change-Id: Id92723a51a82830b8ba845df96a246a5708c7c3c
2014-02-26 11:44:09 -08:00
Stanimir Varbanov cd3c0279da device: qcom: recovery: Change ION heap used for buffer allocations
Current ION heap is smaller that the biggest modem image on some
devices. Using PIL1 heap looks resonable cause it is used to load
firmwares. The fact that this heap is defined for most of platforms
and the size is bigger than biggest modem image makes it good
candidate for usage.

Change-Id: Ia86a08d911ff1744f4c8a2dbb5b3c3618debfbda
2013-08-28 08:59:55 -07:00
Pavel Nedev 2daf758190 device: qcom: common: librecovery: Do not abort boot update
Do not abort update on missing backup boot partition/s.
Instead simply skip boot chain swap and return without error

Change-Id: I08fb4548d91258afcdb0828aa1bbadc95b0dbdd8
2013-08-14 14:18:16 +03:00
Stanimir Varbanov 0ac020a05a recovery: Add librecovery_updater_msm library
This library is charged with:
 - decrypting firmware radio images during recovery update
 - preventing device boot break on main/backup bootloaders update failure

Those features are implemented by registering device specific updater
script commands used by update mechanism. The library is statically
linked to Android updater executable during Android build. The commands
implemented in the library will be called by updater-script during OTA
update.

Change-Id: Ia93901ba83efd4aed833250c5d52bd18cab0a740
2013-08-10 02:44:10 +03:00
Duy Truong 0c0744e022 Update copyright to The Linux Foundation
Change-Id: Id084b09bf3a083ea5c0389900bbeb5ef149b3108
2013-02-10 06:35:11 -08:00
Shashank Mittal 9f7fc50fe7 qcom/recovery: Compile ui lib based on TARGET_RECOVERY_UI_LIB flag.
Change-Id: I2eb7dc712fd79165a110907a18092beeae895bbb
2012-06-21 15:34:15 -07:00
Shashank Mittal 336621388a recovery: Add miniui code for qcom devices.
Change-Id: Ib137b6bc63aa192b9c35629cda019ee4f613e24d
2011-12-08 11:33:17 -08:00