Commit Graph

1618 Commits

Author SHA1 Message Date
Dees Troy
c8f58997e2 Fix process to disable stock recovery flashing
/system/etc/install-recovery.sh no longer exists on AOSP devices
so we will stop checking for it.

Change-Id: I9074dfc443371a27b909faa8f66998683cfb6171
2014-11-20 15:29:17 +00:00
Ethan Yonker
2b556013bf Add /firmware to the mount list for L decrypt
Needed by Nexus 6 and possibly others

Change-Id: I3309e2141a21a94dce90e34cced16450b591a92c
2014-11-19 16:15:21 -06:00
Ethan Yonker
0e67837dd0 Add flag for including additional files built from source in TWRP
Some devices may need additional binaries or libs that TWRP
normally does not need included in /sbin
Use TW_RECOVERY_ADDITIONAL_RELINK_FILES to build them from source
and get them added to the recovery ramdisk.
For example, Nexus 9 needs libc++ included in order to decrypt
the data partition. The following will build it from source and
include it in TWRP:
TARGET_RECOVERY_DEVICE_MODULES := libc++
TW_RECOVERY_ADDITIONAL_RELINK_FILES := \
    out/target/product/volantis/system/lib/libc++.so

Change-Id: I147c0d5569c83514d2e50226ecc50e80bf8aac36
2014-11-18 12:17:10 -06:00
Ethan Yonker
cceebb8189 Tweak 5.0 L decrypt
Mount the vendor partition if it exists so we can use any
proprietary files we may need.
Relocate auto decrypt when default_password is in use to after all
partitions are added so that we can mount the vendor partition.

Change-Id: I93455a35695779f53ef57a82d3d45c7216c13639
2014-11-18 10:18:14 -06:00
Ethan Yonker
560e65f899 Make libmincrypttwrp a shared library
Change-Id: I8c3f084fc34b00edb4cd1b652290df8bc80ea1db
2014-11-17 11:37:20 -06:00
Ethan Yonker
03ea978f63 Clean up make flash utility make files
Change-Id: Ie396be7d9636a8b481bcf7c062f94ce51a4b1fde
2014-11-17 09:36:46 -06:00
bigbiff
85939e5a1b Thanks to _that, return null if vector is empty
Change-Id: Idc44455dd0c971c876ae283528c4367a82e145bd
2014-11-15 21:07:22 -05:00
Ethan Yonker
4eca40d7d8 Add lollipop decrypt support
Kang in cryptfs.c and cryptfs.h from vold.
Use TW_INCLUDE_L_CRYPTO := true to enable.
Ramdisk must contain the normal fstab file in the root in the
usual format of:
fstab.{ro.hardware}
For examble for Nexus 5:
fstab.hammerhead
Or on many Qualcomm devices:
fstab.qcom

Tested against Android 5.0 lollipop on Nexus 7 2012 grouper. Not
sure if or how this will work when we are dealing with a device
with a hardware keystore. Long term we need to add a GUI element
to allow entering a pattern. For now you can decrypt a pattern
unlock by converting the dots to numbers in the following format:
123
456
789

So an upper-case L would translate to 14789 as a password entered
on the keyboard.

Change-Id: I02c29e1f1c2eb29bf002c9fe0fc118357300b5b3
2014-11-12 18:07:24 +01:00
Ethan Yonker
bcc502cff9 Make TWRP compile for arm64
-Remove dosfstools for arm64 until we can make it compile
-Fix TW_USE_TOOLBOX flag to work again
-Fix symlinking and handling of sh when using mksh
-Fix legacy properties to find futex_wake function
-Fix libcrecovery to not use bsd_signal anymore
-Fix rules for building with regards to libcrecovery
-Update toolbox_recovery rules to compile tools in lollipop
-Fix a few compile errors specific to arm64

Testers report that TWRP does not boot on Nexus 9 and we fail to
get a shell for adb shell. At least it compiles without errors.

Change-Id: I286be8628defb60cc527b8a548c0bdfcb0ebb574
2014-11-12 11:03:50 -06:00
bigbiff
4e36d50b06 update theme thanks to Alexey71 on xda.
Change-Id: Id5a0d40d05b0d7e56fb3e8f0578c201957508b70
2014-11-11 20:28:39 -05:00
Ethan Yonker
6c41bfd2f3 Fix openaes
timeb was removed from bionic so include the necessary code in
libopenaes as needed to make it work again.

Change-Id: Idf9eea4e09c7f149a53ed3e952feea0c6674cea6
2014-11-08 15:12:28 -06:00
Ethan Yonker
a2dc2f22d0 Make custom themes work again
Change-Id: Ib9ad011428603979f7dd8a2708989feb9b13e075
2014-11-08 08:13:40 -06:00
Ethan Yonker
f9796a4a5f Release map after zip install
Change-Id: I4ae145669786ad0932297ae0ae095cbc6f3f696b
2014-11-08 07:28:03 -06:00
Ethan Yonker
c30edd12c5 Fix potential tree conflicts with scrypt
Change-Id: Iac40957e40cb9c10795dd6a1f67ca902c95dd9bc
2014-11-08 07:05:47 -06:00
Ethan Yonker
24813426b9 Update adb sideload feature
Change-Id: Ib503d0e87434e1a28430779302d6565211c26592
2014-11-07 17:25:46 -06:00
Ethan Yonker
57e3587b8e Fix zip install
We never used the feature for running a custom theme during zip
install. We can re-implement this later if we like. For now, we
will remove this feature until we are ready to make it work.

Change-Id: Ice71b0b863c7ef17376e3f973d48b810be567c33
2014-11-07 14:54:20 -06:00
Ethan Yonker
5a95c3ff41 Disable custom theme and fix png loading
We will have to update the zip handling later. Now at least TWRP
boots up to the GUI.

Change-Id: I4182896eb095cab52fb0f1c9c20b6605e35677b9
2014-11-07 13:33:07 -06:00
Ethan Yonker
67eb72ae4d Add new needed libs for 5.0 recovery
Change-Id: I9444e50b32517aebeca5ff3644c1c2f0dfff9d29
2014-11-07 10:44:37 -06:00
Ethan Yonker
f96087e68f Fix up install functions
Change-Id: I62110806f60cd923fb761f5e5f2544da3d5b68b1
2014-11-07 10:38:51 -06:00
Ethan Yonker
d7f2092ea0 Fix up tw_reboot function
Change-Id: I53d329e493f4bcb3fe9ed177e7b2dede30ccf490
2014-11-07 10:33:08 -06:00
Ethan Yonker
c376ac8d9c Fix merge derp in main Android.mk file
Change-Id: Id6fcae7b7b8d9a03ff09711844e987084bd001ac
2014-11-07 10:23:52 -06:00
Ethan Yonker
bad4e5f50d Fix up libminadbd make file
Change-Id: I216d59abf9a2e3d074bcbce9ad10f9dd84a2d463
2014-11-07 10:19:20 -06:00
Ethan Yonker
304f32fa98 Fix up old libminui to compile
Implement some needed updates to libminui to make it compile for
healthd. Note that res_create_multi_display_surface is not fully
implemented so healthd may still have issues with displaying some
graphics. Will update later when we are able to test these changes.

Change-Id: Ic1095a998f5dfe7e36a08384c86da28e0524a03f
2014-11-07 10:14:08 -06:00
Dees Troy
f171e103a8 Revert "Make libminuitwrp compile"
This reverts commit a27d02fab9.

Change-Id: I62d143044749f101cd70fef048057f896e46c208
2014-11-06 22:20:20 +01:00
Rob
12f1187e7f Recovery: Fix my-dir must be called before including any other makefile
Change-Id: I70c867961ae779bd99839e4ce7cb1dc8d154158f
2014-11-06 22:16:31 +01:00
Ethan Yonker
a33161b020 Revert to old libminui and fix up
We will wait for CAF to give us a new libminui that supports
qualcomm overlay before moving up to the new format if possible.
Attempt to fix up old libminui to work with new libpng.

Change-Id: I494b7287b347f4730aa8f9d27d4cc17b6e93919a
2014-11-06 15:11:23 -06:00
Ethan Yonker
a27d02fab9 Make libminuitwrp compile
Odds are this is horribly broken, but we are not able to work on
it just yet.

Change-Id: I8cd12a6dba7957b1ccc1275b8d72c24797856db0
2014-11-06 10:24:42 -06:00
Ethan Yonker
26860098e8 Fix up libaosprecovery
Change-Id: I5a6d0c3c5f9a3a474464c0f06d6b09045459eebb
2014-11-06 09:49:25 -06:00
Ethan Yonker
6029e934f4 Fix some includes that are not longer present
Change-Id: Ic9509b0dc7f71ae64f64cc891868a2543eee4321
2014-11-06 09:31:48 -06:00
Ethan Yonker
1702eb44fc More make file tweaks
Change-Id: I26fa571b151c50d133b550395576d4e0246e18bd
2014-11-06 09:16:16 -06:00
Ethan Yonker
c5717479dc Remove libcorkscrew
Change-Id: Ib93b934c6154a0a8955eb66c1bb0eed8aff10e34
2014-11-06 09:07:40 -06:00
Ethan Yonker
1e4a1994ce Update libmincrypttwrp
Change-Id: I90370cd8ef6d9f1be16adba51f51342827a04415
2014-11-06 09:05:01 -06:00
Ethan Yonker
0558775264 Fix some make file duplicates
Change-Id: Id226b2cde93cf0f81a6dd33fbdf70f8f954cade8
2014-11-06 08:54:25 -06:00
Ethan Yonker
a167416289 Merge in lollipop and attempt to fix merge conflicts
This will probably not compile and may need additional work.
For tracking purposes so we know what might still need looking at
as none of this has been compiled and tested, here is a list of
the merge conflicts that I attempted to fix before pushing this
set of changes:

git pull aosp lollipop-release
remote: Finding sources: 100% (992/992)
remote: Total 992 (delta 473), reused 992 (delta 473)
Receiving objects: 100% (992/992), 1.51 MiB | 516.00 KiB/s, done.
Resolving deltas: 100% (473/473), completed with 42 local objects.
From https://android.googlesource.com/platform/bootable/recovery
 * branch            lollipop-release -> FETCH_HEAD
 * [new branch]      lollipop-release -> aosp/lollipop-release
Auto-merging verifier_test.cpp
CONFLICT (content): Merge conflict in verifier_test.cpp
Auto-merging verifier.h
CONFLICT (content): Merge conflict in verifier.h
Auto-merging verifier.cpp
CONFLICT (content): Merge conflict in verifier.cpp
Auto-merging updater/updater.c
Auto-merging updater/install.c
CONFLICT (content): Merge conflict in updater/install.c
Auto-merging updater/Android.mk
CONFLICT (content): Merge conflict in updater/Android.mk
Auto-merging uncrypt/Android.mk
CONFLICT (content): Merge conflict in uncrypt/Android.mk
Auto-merging ui.cpp
CONFLICT (content): Merge conflict in ui.cpp
Auto-merging screen_ui.cpp
Auto-merging roots.cpp
CONFLICT (content): Merge conflict in roots.cpp
CONFLICT (rename/delete): res-hdpi/images/progress_fill.png deleted
in HEAD and renamed in cddb68b5ea.
Version cddb68b5ea of
res-hdpi/images/progress_fill.png left in tree.
CONFLICT (rename/delete): res-hdpi/images/progress_empty.png deleted
in HEAD and renamed in cddb68b5ea.
Version cddb68b5ea of
res-hdpi/images/progress_empty.png left in tree.
CONFLICT (rename/delete): res-hdpi/images/icon_error.png deleted
in HEAD and renamed in cddb68b5ea.
Version cddb68b5ea of
res-hdpi/images/icon_error.png left in tree.
Auto-merging recovery.cpp
CONFLICT (content): Merge conflict in recovery.cpp
Auto-merging minui/resources.c
CONFLICT (content): Merge conflict in minui/resources.c
Auto-merging minui/minui.h
CONFLICT (content): Merge conflict in minui/minui.h
Auto-merging minui/graphics.c
CONFLICT (content): Merge conflict in minui/graphics.c
Auto-merging minui/Android.mk
CONFLICT (content): Merge conflict in minui/Android.mk
Removing minelf/Retouch.h
Removing minelf/Retouch.c
Auto-merging minadbd/usb_linux_client.c
CONFLICT (content): Merge conflict in minadbd/usb_linux_client.c
Auto-merging minadbd/adb.h
CONFLICT (content): Merge conflict in minadbd/adb.h
Auto-merging minadbd/adb.c
CONFLICT (content): Merge conflict in minadbd/adb.c
Auto-merging minadbd/Android.mk
CONFLICT (content): Merge conflict in minadbd/Android.mk
Removing make-overlay.py
Auto-merging install.h
CONFLICT (content): Merge conflict in install.h
Auto-merging etc/init.rc
CONFLICT (content): Merge conflict in etc/init.rc
Auto-merging bootloader.h
Auto-merging applypatch/applypatch.c
Auto-merging applypatch/Android.mk
CONFLICT (content): Merge conflict in applypatch/Android.mk
Auto-merging adb_install.cpp
CONFLICT (content): Merge conflict in adb_install.cpp
Auto-merging Android.mk
CONFLICT (content): Merge conflict in Android.mk
Automatic merge failed; fix conflicts and then commit the result.

Change-Id: I3e0e03e48ad8550912111c7a5c9a140ed0267e2c
2014-11-06 08:35:13 -06:00
Ethan Yonker
9fdd034170 2.8.2.0
Change-Id: I8d689db9c8bf5ff6c5175ee9185e89ab72a1a2fd
2014-11-06 07:55:24 -06:00
Matt Mower
db22044901 Fix some module tags
There is no LOCAL_MODULES_TAGS. Fix by combining with LOCAL_MODULE_TAGS.

Change-Id: I1cacef2f8123af3632ff6a52aa62c2f2e15ac37d
2014-11-04 08:49:09 -06:00
Ethan Yonker
9eb1cd4752 Fix USB Mass Storage on some devices
On some devices we need to set the sys.storage.ums_enabled
property before we write to the lun file. Also sleep for a bit
after setting the propery before writing to the lun file.

Change-Id: I77ac853fde14ffc3adf20571c132f91ed85196df
2014-11-04 15:40:05 +01:00
bigbiff
c40c1c52d6 This patchset causes issues with backups.
Revert "update exfat from current head"

This reverts commit 2e33c5ee0b.

Change-Id: I00d19d98f721bb50aa937ca15b11fe3491132fcd
2014-11-04 15:37:42 +01:00
that
39b7c16d28 add "done" after "Updating partition details..."
This addresses a usability problem. Some users are confused when they
switch to the console and see this message, thinking they have to wait.

Examples:
http://forum.xda-developers.com/showthread.php?t=2498492
http://androidforums.com/verizon-galaxy-s3-all-things-root/718376-twrp-recovery-update-question.html

Change-Id: Ib44773998c2ef1b8b821f3b8876218e11a7de357
2014-11-04 15:35:16 +01:00
that
7c0deaafd6 gitignore: ignore tags file
Change-Id: I78f7e51bdb0f7fd8800de4dd2d2880f0161d7b6a
2014-11-04 15:34:19 +01:00
that
d43bf2dc77 fix some compiler warnings
Change-Id: I23c490e6228b0fcf656c76ac314c69508ba2329d
2014-11-04 15:33:04 +01:00
that
78d0c5fc25 partitionmanager: remove unused By_Block and By_Name methods
Change-Id: Ia6eefd23f6671428221e35642f01534bc9fff6ad
2014-11-04 15:29:06 +01:00
Matt Mower
031163b2c6 Remove dependence on build hax in makefiles
Update makefiles to no longer rely on INTERNAL_RECOVERY_FILES. Define
LOCAL_ADDITIONAL_DEPENDENCIES instead.

Set LOCAL_LDFLAGS to properly link recovery executable.

Change-Id: I4542104c69399b5a19674b9772ab89c3709efa72
2014-11-03 13:36:03 -06:00
Michael Runge
cddb68b5ea Use more aggressive sync writing to applypatch.
We have seen cases where the boot partition is patched, but upon
recovery the partition appears to be corrupted.  Open up all
patched files/partitions with O_SYNC, and do not ignore the
errors from fsync/close operations.

Bug: 18170529
Change-Id: I392ad0a321d937c4ad02eaeea9170be384a4744b
2014-10-29 13:29:40 -07:00
Michael Runge
a6c142f2a5 Force sync files written by minzip.
Some files appear to be missing their sync to disk.

Bug: 18145574
Change-Id: Ic858624a4dd65bbfc54d30f3a13c607078270345
2014-10-29 13:29:40 -07:00
Michael Runge
f15e31edf9 Log mount/unmount errors to UI
Bug: 18092022
Change-Id: I6c42038ebeb1cfc1e7ca0d3e12310fdce1b990b0
2014-10-24 16:05:13 -07:00
Nick Kralevich
6a821fe5f0 unconditionally apply SELinux labels to symlinks
At the end of the OTA script, we walk through /system, updating
all the permissions on the filesystem, including the UID, GID,
standard UNIX permissions, capabilities, and SELinux labels.

In the case of a symbolic link, however, we want to skip most of
those operations. The UID, GID, UNIX permissions, and capabilities
don't meaningfully apply to symbolic links.

However, that's not true with SELinux labels. The SELinux label on
a symbolic link is important. We need to make sure the label on the
symbolic link is always updated, even if none of the other attributes
are updated.

This change unconditionally updates the SELinux label on the symbolic
link itself. lsetfilecon() is used, so that the link itself is updated,
not what it's pointing to.

In addition, drop the ENOTSUP special case. SELinux has been a
requirement since Android 4.4. Running without filesystem extended
attributes is no longer supported, and we shouldn't even try to handle
non-SELinux updates anymore. (Note: this could be problematic if
these scripts are ever used to produce OTA images for 4.2 devices)

Bug: 18079773
Change-Id: I87f99a1c88fe02bb2914f1884cac23ce1b385f91
2014-10-24 16:05:13 -07:00
Michael Runge
bd6138cffe Allow passing of mount args to mountFn
Bug: 18079773
Bug: 18092222

Change-Id: Ifc3f3e123de729dfbb2f49414b3207afa96268d5
2014-10-23 17:35:13 -07:00
Michael Runge
7548025bdd Log to UI any metadata setting errors
Bug: 18079773
Change-Id: Ic6fddbcbcb6ddb9e1cbd1698df98387c0033ae15
2014-10-23 17:35:13 -07:00
Nick Kralevich
b8344b6f59 Make /cache/recovery/last_log available in recovery
Create a new recovery UI option to allow the user to view
/cache/recovery/last_log for their device. This gives enhanced
debugging information which may be necessary when a failed
OTA occurs.

Bug: 18094012
Change-Id: Ic3228de96e9bfc2a0141c7aab4ce392a38140cf3
2014-10-23 17:35:13 -07:00