Commit Graph

7523 Commits

Author SHA1 Message Date
notsyncing c7c78d2fea minuitwrp: Support haptics drivers registered with LED class framework
This type of vibrator is found on newer kernel versions (4.9+) and
registers with LED class framework (located at /sys/class/leds/vibrator).

Change-Id: I85e93fdac17b3f4b6f2ae689bbbd490806b5c29b
2019-01-16 16:43:42 +08:00
notsyncing 8e4e8ec2f9 minuitwrp: Respect TARGET_RECOVERY_PIXEL_FORMAT config.
Respect TARGET_RECOVERY_PIXEL_FORMAT config in screenshot, graphics.
This fixes other wrong theme color in minuitwrp on Xiaomi MIX 2S.

Change-Id: Ieb8480c411e2f0c72cc50ffca66943ab025e2b7e
2019-01-16 16:43:30 +08:00
big biff 4d7b0e0350 Merge "vold_decrypt: use ANDROID_ROOT for additional compatibility" into android-9.0 2019-01-12 00:23:03 +01:00
big biff 635874da21 Merge "Include weaver library in 9.0 trees" into android-9.0 2019-01-06 19:30:20 +01:00
Ethan Yonker 66bcd499e5 Fix building in Lineage 16.0
Change-Id: Ia7c66d469c69d9c4e9263feae7b48d40c09af155
2019-01-03 20:28:16 -05:00
Captain Throwback 6ac30afd69 vold_decrypt: use ANDROID_ROOT for additional compatibility
Rather than using hard-coded system, use ANDROID_ROOT
environment variable to allow AB devices to mount
system_root at a custom path. This allows the /system
path to be bind mounted from $ANDROID_ROOT/system
so that the vold_decrypt paths can remain unchanged.

Change-Id: I9a7b13385e43f169f1df4c75b2a003fc6913952c
2018-12-25 17:57:47 +01:00
big biff 09ee3ea422 Merge "twrp: use ANDROID_ROOT environment variable" into android-9.0 2018-12-24 16:08:07 +01:00
big biff cbd8cc5e06 Merge "Add option to use ro.serialno for generating device id" into android-9.0 2018-12-24 01:45:46 +01:00
Vladimir Oltean 4780286346 prebuilt: resolve libext2_misc.so dependency for mke2fs
* Following error while running mke2fs in TWRP compiled in 8.1+ tree:
   libc: CANNOT LINK EXECUTABLE "mke2fs": library "libext2_misc.so" not found

Change-Id: I786f325229167dbd0d1d5f2a1ea95e9fe15a227e
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
2018-12-23 05:57:20 +01:00
Ethan Yonker 6b3bdfd6fa Include weaver library in 9.0 trees
Change-Id: I0e05e29b43c748d7746dc70428a4eb7664b7d2d4
2018-12-21 11:54:57 -06:00
big biff 16badcea76 Merge "Fix sha2 generation persistence." into android-9.0 2018-11-30 00:32:22 +01:00
Andreas Schneider e14fb93f08 minui: Don't include errno.h twice
Change-Id: Id119ca2f34fb072e70037dbb6858799e94c74043
2018-11-14 00:21:42 +01:00
lambdadroid fc0b16df8b Add option to use ro.serialno for generating device id
On some devices (e.g. ASUS Zenfone) the serial number of the device
is stored in a file in the /factory partition. Consequently, the only
way to load it is using a user space application during the init
process, and to update the ro.serialno system property.

In most places, TWRP already uses the system property to get the
serial number of the device. However, when generating the device ID
used for the backup folder name it checks the boot command line
directly. On these devices, the serialno is not included on the
command line.

Add a TW_USE_SERIALNO_PROPERTY_FOR_DEVICE_ID option that enables
usage of ro.serialno for generating the device id. It is disabled
by default to avoid changing the device id on existing ports.

Change-Id: I4a2eeca883f38fdaeb1209507fd8ebe44b1b04a0
2018-09-26 23:53:28 +02:00
bigbiff bigbiff 9ee4a8577e Fix sha2 generation persistence.
Change-Id: I8342ee36f996a0305632bdb6eb8b20ae4e93873b
2018-09-19 19:15:06 -04:00
Ethan Yonker 007de98f69 Fix header file for property_get
Change-Id: Id8a8c0e2b5a0a6d5b656fe8f517ded5df512b1a1
2018-08-31 14:24:41 -05:00
Ethan Yonker e9afc3de0f Decrypt FBE on 9.0 (backwards compatible)
Building in 9.0 may require you to add a flag to your twrp fstab
with the fileencryption details like:
fileencryption=ice:aes-256-heh

Verify this against your device's stock fstab of course.

Change-Id: If9286f5d5787280814daca9fbc8f5191ff26a839
2018-08-31 10:37:08 -05:00
Captain Throwback 9d6feb5311 twrp: use ANDROID_ROOT environment variable
instead of hard-coded /system path

I updated most of the references I found,
but there might be more

For devices that have to mount system at /system_root,
this allows system to be bind mounted to /system
and detected properly by TWRP

Change-Id: I9f142fd8cec392f5b88e95476258dab9c21a9aac
2018-08-24 12:47:45 -04:00
Ethan Yonker 58f2132bc3 Merge AOSP android-9.0.0_r3
Fix conflicts and make it build in 5.1, 6.0, 7.1, 8.1, and 9.0

Change-Id: Ida0a64c29ff27d339b7f42a18d820930964ac6e4
2018-08-24 11:17:39 -05:00
Sean hoyt 32aef7a2cf Remove remaining pieces of supersu
Change-Id: I8f92c19f9e947da29dc25f3b88f69413a13af64d
2018-07-30 10:29:46 +02:00
Ethan Yonker 840f04f7aa 3.2.3
Change-Id: I4f40c8c83e739c096f6de35b2b06b6426fbf6faf
2018-07-27 15:14:19 -05:00
steadfasterX 10d747567e enable md5sum digest verification
all (well I just checked LOS, aoscp and aicp) ROM scripts use
"md5sum" as extension but TWRP checks only for the extension
"md5".
This change will also expects md5sum as the default digest extension
and only if not found falling back to md5.

Change-Id: Ia1dd072d77d53ed6c6ff13c6db730abdcdb56bb3
2018-07-27 19:03:50 +02:00
Ethan Yonker a344ac6f26 Fix installing OTAs without decrypting
Change-Id: Ica0c4033bc7148b1313b1671e91c5b92b09064c6
2018-07-27 19:03:09 +02:00
Ethan Yonker 1ccdefab79 Fix ld.config.txt errors on Android 8.1 system root devices
Change-Id: I17dcb8a2d77519799292d1c0fb5d94de21d7e6cb
2018-07-27 19:02:21 +02:00
Humberto Borba 66ae80be89 language: italian: Fix SELinux support label
Thanks to David Viteri for this one.

Signed-off-by: Humberto Borba <humberos@omnirom.org>
Change-Id: I566179921ba1cdb3b79836eff2b78cd6289eff94
2018-07-25 08:15:41 -03:00
Ethan Yonker fa67cbf18b Remove SuperSU
Change-Id: I2ca7580bbde5a8903b9ba5c1513ddba887e8d49e
2018-07-20 13:45:16 -05:00
Ethan Yonker fac1b3835c 3.2.2
Change-Id: I45600c6af55e1316a5ec97b88b74f76779826597
2018-06-29 16:16:04 -05:00
Ivan Kutepov ff9d097a9d toolbox: prevent executing tools
Change-Id: Id3d2b15d6c0dad346282e59eb2f173da2776a905
2018-06-05 15:07:45 +02:00
nailyk-fr 73e9ae7c32 Cleanup TWRP flags
Change-Id: I402be0241ba998ad7530f5226f205581dc33e538
2018-06-05 14:58:41 +02:00
Simon Shi 25b850d652 Revert "minuitwrp: drm: wait for last page flip to complete"
See https://github.com/omnirom/android_bootable_recovery/issues/219

This reverts commit 34ad728823.

Change-Id: Ia659b49af8206ba74b098aa721099a180762bab5
2018-06-05 14:55:04 +02:00
Tom Marshall bf4f24f227 Revert "updater: Remove some obsoleted functions for file-based OTA."
This reverts commit 63d786cf22.

These functions will be used for third party OTA zips, so keep them.

Change-Id: I24b67ba4c86f8f86d0a41429a395fece1a383efd
2018-05-25 18:48:06 +02:00
Tom Marshall 981118ec5f Revert "kill package_extract_dir"
This reverts commit 53c38b1538.

Change-Id: Id998923948fb51ef5640c8be8884801c4f8d90e3
2018-05-25 18:47:50 +02:00
Logan Chien 597fbc00ce Enable arm64 neon scrypt implementation
It seems that old Scrypt-config.mk is unaware of arm64 architecture.
In fact, crypto_scrypt-neon.c can be compiled into arm64 as well.  This
CL adds an arch section for arm64.

Bug: 65425184
Test: adb shell /data/nativetest64/scrypt_test/scrypt_test
Change-Id: Ib451de642c7cc4548bfdc0879781981654b21b8f
Merged-In: If40a30378b8038324aad44071107130d7722e28d
2018-05-25 18:47:28 +02:00
bigbiff bigbiff 38b83c1da4 ADB Backup: fix md5 check on restore.
Add debug capability.
Fix backup of images after tarred partitions with too much padding
Add more md5 logging.
Skip digest check if selected.
Change ADB Backup version to 3 for new fixes to image padding.
Change-Id: I0f76c0733c523717e4797d1a14c3ae47d046fc8c
2018-05-25 18:42:16 +02:00
oshmoun a82a754bbe partitionmanager: signal when Mount_To_Decrypt partitions are mounted
Enable a property when mounting partitions required for decryption, and disable when they are unmounted.
This helps init scripts to react to such an event appropriately, for example by starting services critical for decryption that reside on said partitions.

Change-Id: Ib6fa1e5c903d9c800fb145d582ced6cc7e0ab5b9
2018-05-25 18:31:44 +02:00
nailyk-fr ca3fd0c0fa TWRP: vold_crypto: Allow custom strace path
* Allow custom definition of strace path with TW_ flags.
 * `TW_CRYPTO_SYSTEM_VOLD_DEBUG := true`
    will use default path: /sbin/strace.
 * `TW_CRYPTO_SYSTEM_VOLD_DEBUG := /system/xbin/strace`
    will use the provided `/system/xbin/strace` path.

Change-Id: I5e12a10176d17a4f26487de0976a776d48c4142e
Signed-off-by: nailyk-fr <nailyk_git@nailyk.fr>
2018-05-25 18:24:09 +02:00
nkk71 37625a4488 vold_decrypt: Code cleanup
* Separate stdout and stderr buffers:
  vdc's return codes get sent to stdout, but the possible presence of
  other error messages in the output buffer will cause a valid return
  from vdc not to be parsed properly, and subsequent decryption to fail
  due to "misunderstood" return code.
  eg on the U11+ (htc_ocm) libc will generate an error to stderr due to
  a missing property area resulting a proper connection to vold being
  incorrectly parsed, and breaking decryption.

* Improve logging.

Change-Id: I57987ebe4ee6754a78e79ca177506098f8301f8f
2018-05-25 18:19:17 +02:00
Phoenix591 e444d11552 TWRP: Added TW_CLOCK_OFFSET flag to further adjust the clock.
For devices with the Qualcomm RTC fix whose clocks need further tuning
such as the LG V20 whose ats files produces the correct time except 
46 years in the future.

Takes adjustment in seconds and adjusts after reading the the ats file.

Boardconfig.mk
TW_CLOCK_OFFSET := -1451606400

Change-Id: I0b2d35dd0026ed18a7bbebf683517f7c0eaa53ff
2018-05-25 11:15:29 -05:00
Phoenix591 46b05f223a TWRP: Move the valid current time up to trigger fix on more devices.
For example on my device, the LG V20 (US996), the default time
comes back as 2016 which doesn't trigger the fixup code. 
The actual time I picked was pretty arbitrary, but close to
the current date, since we're checking if said date/time is reasonably
accurate without the fixup code.

Change-Id: I01db64777d7d0c5ce0710445cf88858d89656ac0
2018-05-25 18:14:32 +02:00
Gabriele M 72638b6437 Skip decryption when installing mapped zips
Decrypting userdata is not needed when installing zips if we have
a map of blocks to read, so skip the decryption. This allows to
install zips with no user interaction and, more importantly, it
allows to install zips on devices where TWRP can't properly decrypt
userdata.

Remove also the unneeded Mount_All_Storage() call, Install_Command()
already mounts the needed partition.

Change-Id: I91c69f84ecc2fe41c9567c40649e501af1cfb64a
2018-05-25 18:13:47 +02:00
Simon Shields 34ad728823 minuitwrp: drm: wait for last page flip to complete
if we try and flip pages too quickly, the kernel returns -EBUSY.
Use drmHandleEvent to wait for any previous flip to complete
before attempting a new one.

Change-Id: If3def889c0c89d7cfb8b7f13c4dae6d4b12760f9
2018-05-25 15:12:29 +02:00
Simon Shields 16d831bee5 minuitwrp: use a separate draw buffer for DRM as well
draw performance is significantly slower when drawing directly to the
mmaped buffer. Instead, draw to a userspace buffer and memcpy()
to the mmaped buffer on page flip.

Change-Id: Ibf2cd4be4f5437b445e68c572ff76ad72d506b15
2018-05-25 15:12:09 +02:00
Simon Shields 1021c5ae50 minuitwrp: drm: fix RECOVERY_BGRA pixel format
GGL_PIXEL_FORMAT_RGBA8888 seems to work in this instance.

Change-Id: I88fb3e53332f47952036ef6e617b3ea7d0b639a9
2018-05-25 15:08:59 +02:00
big biff 553966cbad Merge "external/scrypt: use proper nativehelper headers" into android-8.1 2018-05-13 17:02:02 +02:00
big biff e4bdc28049 Merge "scrypt doesn't need <machine/cpu-features.h>." into android-8.1 2018-05-13 16:57:33 +02:00
big biff 87bad59f0b Merge "scrypt: Don't hardcode gtest path." into android-8.1 2018-05-13 16:54:21 +02:00
big biff a2c4fc29f3 Merge "otafault/tests: Replace pathmap with commands_recovery_local_path" into android-8.1 2018-05-13 16:51:56 +02:00
big biff 2d5ef131d7 Merge "applypatch: Fix bad AOSP merge" into android-8.1 2018-05-13 16:42:13 +02:00
big biff 76da39ffa3 Merge "applypatch: Remove obsolete pathmap changes" into android-8.1 2018-05-13 16:33:08 +02:00
Tom Marshall 2c1a579cbb Revert "Remove the obsolete package_extract_dir() test"
This reverts commit bb7e005a79.

Change-Id: Ifcc2234ac9afd50384a6de93e828148bbd1fe077
2018-05-04 00:58:24 +02:00
bigbiff bigbiff 26503b8a0b toybox: microcom is not present in the lineage 14.1 source.
Change-Id: Ic5983498caf9a082d23fdfbc3683e77697fcaf64
2018-05-04 00:45:36 +02:00