3633 Commits

Author SHA1 Message Date
faust93
a4e1e39be0 fix build 2016-12-18 14:00:03 +03:00
faust93
de807fbdae Implementing separate DTB support & other PRO5 specific fixes 2016-12-18 13:59:34 +03:00
faust93
5bf60f0f0f Fixing build and implementing own framebuffer 2016-12-18 13:56:42 +03:00
Dan Cartier
19d1ac2f9e TWRP MultiROM Recovery
* Generalize the header strings
2016-12-09 10:25:41 -05:00
Dan Cartier
162d0de412 Revert "Martin's MR recovery ;-)"
This reverts commit c3a3f8a8ae.
2016-12-09 10:25:41 -05:00
Martinusbe
01150faab0 Merge remote-tracking branch 'nkk/android-7.0-mrom' into mr-7.0 2016-11-26 11:02:24 +01:00
Martinusbe
c3a3f8a8ae Martin's MR recovery ;-)
Signed-off-by: Martinusbe <martinusbe@gmail.com>
2016-11-25 13:21:16 +01:00
nkk71
ed46e0922a MultiROM: Skip 2 loop devices for block_image_update installers
* Some versions of SuperSU use only loop0 or loop1, so let's skip those
  and create the fake system.img (needed for block_image_update) at the
  next free loop device.

Change-Id: Ie4a9e1679a11c75b95411dfe7c0e048b0215fa4e
2016-11-23 13:35:15 +02:00
nkk71
f8772bc436 MultiROM: Create real block device for fake boot.img
* Using a real block device for the fake boot.img improves compatibility
  with scripts/mods/etc that directly manipulate the boot partition, so
  boot.img truncation as well as 'dd if=/dev/zero of=$BOOTIMAGE' overflows
  will be avoided.

Change-Id: I9b93ac5df829db713bc81c3ce3b34f7c2fbee27f
2016-11-23 13:12:10 +02:00
nkk71
86b0d34cad MultiROM: Fail 'changeMounts' if real data can't be unmounted
Change-Id: I619935e364d65891cda563bed2c7373df3e97ce9
2016-11-22 18:22:21 +02:00
nkk71
a85c7e13af MultiROM: Update (u)mount_shim.sh to disallow system, data, cache
Change-Id: I22f82c63a64f45742a177d10a0d838b753185567
2016-11-22 18:18:27 +02:00
nkk71
8d97072f29 MultiROM: Add failed boot.img injection warning
Change-Id: I1166e56d82aebecd90503a93fa3b802e304c5eda
2016-11-16 22:10:09 +02:00
nkk71
6c22dd3285 Merge remote-tracking branch 'upstream/android-7.0' into android-7.0-mrom 2016-11-11 15:48:37 +02:00
nkk71
c9f93c7280 MultiROM: Fix restorecon to use ROM's own binary
* MultiROM uses restorecon -D which is only available in toolbox, which is
  now deprecated in toolbox and moved to toybox.

* Furthermore the existence of file_contexts and file_contexts.bin
  has made recovery based restorecon unreliable for secondary ROMs
  so instead opt for using the secondary ROM's own restorecon.

* This may need to tested for backward compatibility.

* Alternative: consider building our own restorcon which should be capable
  of handling both text and binary formats of filecontexts.

Change-Id: I836cd9a2a72487b9211f9ffe1703118c50ef44fd
2016-11-11 15:45:51 +02:00
big biff
bb0da94f40 Merge "MD5 verification sanity" into android-7.0 2016-11-08 00:54:28 +01:00
James Christopher Adduono
5c3950716e MD5 verification sanity
We can use switches and enums to make things more understandable
and work with results in a more sensible manner.

PS2: Move file MD5 verification and error handling into
     a separate function to reduce code.

PS3: Default to false in Check_Restore_File_MD5 function

Change-Id: Id3ee0bb444cf13be67bb5dec2c43f7c26a86b954
2016-11-05 15:48:43 -04:00
nkk71
b2ad8eb7b1 MultiROM: NO_KEXEC use Flash_Image function
Change-Id: Ifa055106d31940cd5631001aa069e3fc44b38dbc
2016-11-03 13:40:46 +02:00
nkk71
869751b3ed MultiROM: Fix installation of zip files missing updater-script
* Zip files containing only an update-binary as a shell script, without
  the accompanying updater-script (which would just be a dummy file), such
  as some gapps installers would fail.
  Since they lack the dummy updater-script file, normally including in zips
  that rely on shell-script formatted update-binary.

* Since MultiROM tries to adjust the updater-script for anything that may
  interfere with secondary ROM installation, it fails to, if it cannot find
  an updater-script.

* This patch will react as normal zip installation would, it won't parse or edify
  any offending command and simply pass it on to normal TWRP zip flash.

Change-Id: If1c96c7e8be32288e532dd6ce20dcafb7ae251ab
2016-11-02 17:20:25 +02:00
nkk71
3ed697ec7b Merge remote-tracking branch 'upstream/android-7.0' into android-7.0-mrom 2016-11-02 17:10:19 +02:00
James Christopher Adduono
e9a3ee2693 Fix image flashing: attempt 2
We missed a spot!

Change-Id: Ic838f4a23107b4d52d3fb1d7a875e265726c4516
2016-10-25 00:52:18 -04:00
Ethan Yonker
fa4ff14437 Fix image flashing
PS2: full_filename is not a dir

PS3: use a consistent format of always assuming directory
     is missing the trailing / + fix whitespace alignment

Change-Id: Ib963473ae10571b3d069b326d024ca04c7224dda
2016-10-24 07:17:32 -04:00
nkk71
cfd98ce4cf MultiROM: Cleanup NO_KEXEC code
Change-Id: Id904eb791086bc809aacee0534f788f543f60781
2016-10-10 17:16:33 +03:00
nkk71
6c3bc29080 MultiROM: Fix NO_KEXEC primary_boot.img restore on encrypted devices
Change-Id: I88d3047d56d5671b0836b0119cfa929761921fde
2016-10-10 17:11:09 +03:00
nkk71
7f0b128769 MultiROM: Use Raw_Read_Write until image flashing is fixed
Change-Id: Ib001eedba3e5c933c4863645f939d9747f355e7e
2016-10-10 17:09:52 +03:00
nkk71
dee8e3a0a9 MultiROM: Fix edify for N block_image_updates
Change-Id: Ie9c4f21ba69530e0459681546aef33b496fc4b04
2016-09-23 19:57:22 +03:00
nkk71
ce2db36c54 MultiROM: Fix build for updated PartitionSettings
Change-Id: I00bacbcfb16276c7169959df128644822ec82def
2016-09-21 18:55:00 +03:00
nkk71
4025a71399 MultiROM: Fix build
Change-Id: I91de572629a5535d9e6184538272d7c0b3f253aa
2016-09-21 18:53:35 +03:00
nkk71
8153c96cf1 Merge remote-tracking branch 'upstream/android-7.0' into android-7.0-mrom
Conflicts:
	Android.mk
	twrp.cpp

Change-Id: Ic15343d7a7d1a118fc81f98ad585324c04b2c9f2
2016-09-21 17:44:48 +03:00
nkk71
997274b3d3 Fix: Unblank screen before ZIP flash
* Fixes issue when flashing a ZIP with AROMA Installer and the screen is off
  AROMA Installer takes over screen and button input, so there's no way to
  wake the device.

Change-Id: I3c0dd3cdba5aae3c7a91f0141f29ddd02dd84b35
2016-09-20 14:38:17 +03:00
nkk71
0380d7be5c MultiROM: NO_KEXEC v4
No-kexec workaround version 4 for no kexec-hardboot kernels

* MultiROM support for no kexec-hardboot enabled kernels.
  It has been tested on the HTC One M7, M8, M9 and HTC 10
  as well as other devices successfully.

* This commit is the TWRP recovery portion, which adds
  (1) various settings in TWRP->MultiROM-Settings
  (2) properly restores primary kernel if needed
  the real code is in multirom https://github.com/multirom-htc/multirom

Note:
* The following build flag needs to be added in BoardConfig:

  MR_NO_KEXEC := <value>  where value is:
  - 1 true allowed
       -> No-Kexec is built but not enabled by default
  - 2 enabled
       -> No-Kexec is set to "only when needed"
  - 3 ui_confirm
       -> No-Kexec is set to "ask for confirmation"
  - 4 ui_choice
       -> No-Kexec is set to "choose boot method"
  - 5 forced
       -> No-Kexec is set to "force using no-kexec"

please see http://forum.xda-developers.com/showpost.php?p=68738134&postcount=4 for a description of these options

Change-Id: I8b7958cb2d7759933875ef82b2fa8f60bb514f00
2016-09-18 16:12:00 +03:00
Ethan Yonker
99af766668 Fix libcrypto dependency in 6.0 trees
Change-Id: Ie230ed5f3db38a62305e03e4f9819e4aca816e16
2016-09-15 14:57:39 -05:00
Ethan Yonker
dcf2b674c4 Clean up PartitionSettings
The PartitionSettings struct contains some data elements that are duplicates
of data elements in the TWPartition class that is contained within the
PartitionsSettings.Part element. We will eliminate this duplication to help
reduce the chances for programming bugs.

Specifically, this fixes problems where the current file system does not
match the backed up file system.

Change-Id: I02f236e72093362050556a2e53a09d1dbb9a269d
2016-09-13 14:53:37 -05:00
Ethan Yonker
ea2fcf0179 Fix compressed backups with split archives
Change-Id: I8b9197a18cd83c304e5d4ed29ef55ba67e4e42f7
2016-09-12 16:07:19 -05:00
Adrian DC
e78fcfcd97 recovery: multirom: Support symlinked init in ramdisk
* Allows the usage of symlinks on /init for ramdisk
    using this method to call the real binary or script

Change-Id: I664e232e86bc8271a327bbcd62f370924cc9326f
Signed-off-by: Adrian DC <radian.dc@gmail.com>
2016-09-10 17:43:42 +03:00
nkk71
9cedf8cdae MultiROM: Fix installFromBackup
* use standard TWRP Run_Restore() for MultiROM installation
  from a backup

Change-Id: Ie2736a5dad853a8ecabc1881240f494f2b3fbc0a
2016-09-10 14:02:29 +03:00
nkk71
a52bf2b906 Merge remote-tracking branch 'upstream/android-6.0' into android-6.0-mrom
Conflicts:
	gui/action.cpp
	partitions.hpp
	twrp-functions.hpp

Change-Id: Ib0fcd4095d2e2cc57eb15037ff4f6c8052c193eb
2016-09-10 14:01:45 +03:00
nkk71
b09ad93df6 MultiROM: fix compile warnings 'invalid suffix on literal'
Change-Id: I3ff8e7bdb52b5f1df3a2dccc5cfee9fca3d8a9f7
2016-09-10 13:42:55 +03:00
nkk71
7c2756e9c2 MultiROM: fix compile warnings 'unused parameter'
Change-Id: Ie6e7f2c78a1b387a3ed0107d3e6c51816196924a
2016-09-10 13:42:55 +03:00
nkk71
9518bac8f9 MultiROM: fix compile warning mtime
Change-Id: I900b8a23b48bb7033756a744a29287a275d33159
2016-09-10 13:42:54 +03:00
nkk71
42a793a519 MultiROM: fix compile warning in twrp-functions.cpp
Change-Id: I52e428956b766c279575cf563329d18817779605
2016-09-10 13:42:54 +03:00
nkk71
96e6dcaffd MultiROM: fix compile warning MS_RELATIME
Change-Id: If4ffaf802b0f99889c2df5841f8891bb63a196fb
2016-09-10 13:42:54 +03:00
nkk71
7bf18be0b6 Revert: Workaround (v2). Newer version will follow
Workaround (v2) for no kexec-hardboot kernels

* MultiROM support for no kexec-hardboot enabled kernels.
  It has been tested on the HTC One M7, M8 and M9 successfully.

* This commit is the TWRP recovery portion, which adds
  (1) various settings in TWRP->MultiROM-Settings
  (2) properly restores primary kernel if needed
  the real code is in multirom https://github.com/nkk71/multirom

* This is an updated and more reliable version of the initial
  WIP 6ae88fe659

Note:
* The following build flag needs to be added in BoardConfig:
  MR_ALLOW_NKK71_NOKEXEC_WORKAROUND := true (reverted from commit 21ff5ee42a)

Change-Id: I27e1803b8821f01bc5d9cfd97940cbc6c6fb1334
2016-09-10 13:40:43 +03:00
Ethan Yonker
724c5148a5 Fix restore of subpartitions
Change-Id: If76cd08cdac7e2af4e0f5f00d420eed1f30897d3
2016-09-01 18:40:26 -05:00
Ethan Yonker
b8e985c6a2 Fix updater binary for 7.0
Note: updater is currently not backwards compatible with older trees. Maybe
later...

Change-Id: I3c2a5ef69cfa9005502408f7054e3096a64ba34b
2016-08-31 13:42:13 -05:00
Humberto Borba
443af214ff twrp: Use the correct lib name
Now ART uses LZ4 and the lib name should be liblz4.
https://github.com/omnirom/android_external_lz4/blob/android-7.0/lib/Android.mk

Signed-off-by: Humberto Borba <humberos@gmail.com>
Change-Id: Ifce783ecb6af10d43bbeabd614d12e8e6b3b4270
2016-08-31 20:10:45 +02:00
bigbiff bigbiff
8fd4b096c4 MD5 checking: fix issues introduced with adb backup patchset
This patchset will fix issues with creating and checking
md5 checksums with single partitions and subpartitions.

Change-Id: Iddfaf46412e95635af958094726cf9e3eb5a4cc8
2016-08-30 20:52:02 -04:00
Ethan Yonker
4bf259fab7 Make naming scheme more meaningful
Change-Id: Ifcaf00c760ff452b0e85a88b54e91ca0f2f4644a
2016-08-29 11:50:34 -05:00
Ethan Yonker
072c8d82dd Support update binary log command
Also track and log install time similar to AOSP recovery.

Change-Id: I68b41a75cf0d1fa57b693c726cccd382a16f91b1
2016-08-26 22:22:26 -05:00
Ethan Yonker
534d4e0612 Fix compatibility across the board
Change-Id: I6376920775ddabb4d4af505fffd86e404403a64a
2016-08-26 10:05:03 -05:00
Ethan Yonker
df681841e3 Fix compatibility with 5.1
Change-Id: I83704ce3a669239e0acb936e50e6eae080b28173
2016-08-25 15:49:40 -05:00