Commit Graph

1223 Commits

Author SHA1 Message Date
Dees Troy 53ea0a166c MTP Fix property list for multiple storage devices
Change-Id: Ice23fef31439a6c88d0a12380688eccd8dc3a71c
2014-09-04 14:17:50 +00:00
Ethan Yonker 12055fac83 Properly set mtp enable variable if disabled during boot
Change-Id: Iedf08419a1fd46908e5b9186a769a0497ce62ca8
2014-09-04 08:06:53 -05:00
Ethan Yonker 6f49e11d8a Prevent MTP enable on startup if crash detected
Change-Id: Ie1388a8acadf714a29721dd90c7f9a8aa38a860d
2014-09-03 21:42:49 -05:00
Ethan Yonker c8743cf5d5 Allow MTP debug setting to stick through a reboot
Change-Id: I81eb5eaa2286c0ee3078e01304d65b9489f13bf2
2014-09-03 21:16:40 -05:00
Ethan Yonker 5e083dcc20 Improve MtpStorage handling when more than one storage is present
Change-Id: I02f1984d02a85d9fd42450cc3772e88a43d9e9ff
2014-09-03 15:06:00 -05:00
Ethan Yonker 6d154c4fe2 Allow toggle of MTP debug
Via command line in TWRP:
twrp set tw_mtp_debug 1

This will enable debugging for MTP. You will need to disable and
re-enable MTP in order to see the debug logging.

Change-Id: Ia7bb0c584e10a4322b65ecf80a67ed7ee836b38e
2014-09-03 14:22:50 -05:00
Ethan Yonker 20fd25c231 Improve error handling during MTP startup
Change-Id: I9395481dd8d9cbd3346fe6682557236b48b4d6cd
2014-09-03 14:04:43 -05:00
Ethan Yonker 73da42cb6e Ensure that MTP is enabled by default
Change-Id: Ibd644509935cde1e52b3d368060fdcb6e16f4a99
2014-09-03 11:30:33 -05:00
Matt Mower 81742fbcbc Only use SELinux tools from toolbox if not in busybox
If busybox has SELinux support, we don't need toolbox to provide SELinux
specific tools. Check busybox for restorecon to see if SELinux support
is present and then adjust the tools built by toolbox based on this.

Change-Id: I30a2b036b97ac3e26510d5e0498c52d7a8af36e1
2014-09-03 18:23:04 +02:00
Matt Mower 55c75cad80 Build block TWRP with RECOVERY_VARIANT
Enable TWRP to reside alongside other recoveries with the naming
convention: bootable/recovery(-flag). If TWRP resides at
bootable/recovery and a device does not specify RECOVERY_VARIANT, then
it will build like normal. If TWRP resides at bootable/recovery-twrp,
then its makefiles will only be parsed if a device specifies
'RECOVERY_VARIANT := twrp'. This prevents TWRP specific makefile
warnings/errors (notably, missing DEVICE_RESOLUTION) when another
recovery is being built.

Change-Id: I8f02fffcd79c309c7123b9428eedc69af02e126e
2014-09-03 10:53:37 -05:00
Dees Troy 298c4387f7 Refresh partition details after changing file system
Change-Id: I24f3c8587f778c4f0ef43737243c8378a3fd0e00
2014-09-03 14:42:26 +00:00
bigbiff bigbiff c7eee6fef0 add mtp responder to TWRP.
Big thanks to Dees_Troy for helping with the implementation.

Change-Id: I6c9c522b9c9de5dc139e2ecb0141008182ba07f0
2014-09-02 21:44:49 -04:00
Ethan Yonker 3c4ac3bc32 Fix derp
Change-Id: Idf41990258361e612635980700fd694b11c1c625
2014-08-14 11:15:32 -05:00
Ethan Yonker 5742a40b87 Allow blacklisting input devices by build flag
Usage:
TW_INPUT_BLACKLIST := accelerometer
TW_INPUT_BLACKLIST := "accelerometer\x0agyroscope"

This can be used to fix touch input on devices where an input
device is breaking touch processing in TWRP.

We are using new line chars to separate multiple devices and in
the make file you specify the new line character with \x0a which
is the hex code in ASCII for a new line.

The new line character might be a bit of a pain to use as a
delimeter, but it is highly unlikely that an OEM will ever name
an input device with a new line character in the name.

Change-Id: I255136b7a686909a23e649918c661843153c2853
2014-08-14 10:05:40 -05:00
xNUTx e85f02dd91 Support reading since_epoch and secondary brightness files
TWFunc::Fixup_Time_On_Boot: Will now try to read
/sys/class/rtc/rtc0/since_epoch to correct time, if that fails
it will try to use the ats files to correct time.

TWFunc::Set_Brightness: One single function to set brightness
from both the automated functions and the gui actions. It is
able to set a second brightness path if present, it will set
them both the same value. Many Sony devices have 2 brightness
files in the sysfs that must be set to properly set the
brightness.

Change-Id: I7ca582109085dfbcb46b8de73ad031e4b7903fca
2014-08-10 08:57:14 -05:00
xNUTx cd56f8cb29 TW_SCREEN_BLANK_ON_BOOT will jolt the screen/touch driver.
If on the default settings the screen will only kick in to action
AFTER it has gone to sleep once and has been woken up again with a
key press, this will be needed to set to 'true' in the
BoardConfig.mk

The code was already there, Dees_Troy and I thought it would be
nice to make it a switch to control at compile time.

Change-Id: I5116a27afe9cba57122761c192ea3ee153d98162
2014-08-10 07:59:35 -05:00
Ethan Yonker 03a42f6c6a Add command line capabilities
Allows sending openrecoveryscript commands to TWRP via shell.
This may be handy for visually impaired users, for various one
click utilities to drive TWRP commands from a computer, for using
TWRP when a catastrophic hardware failure like a shattered screen
prevents you from being able to use touch, or even on devices like
a TV stick where touch and USB mouse input is unavailable.

This patch also includes a few minor changes to openrecoveryscript
including proper support for rebooting via the script and for
decrypting the device via the command line.

Change-Id: I796ad168efdd2da9c25334ac93d1079daaa7b0bc
2014-08-09 07:49:35 -05:00
Ethan Yonker b24caab14c Set font based on resolution if not set already
Change-Id: I6efaeb1c508c06513ac9ace7aa72a2eefa0cb1bb
2014-08-07 09:28:04 -05:00
Adam Outler 6f6a1d6dc7 removing logging test file
updating gitignores to keep file from coming back
adding gedit backups to gitignores

Change-Id: I36d55983b34d47763cb56abf784381c06d951302
2014-08-07 15:48:16 +02:00
Adam Outler 7f9906d0b6 remove stray test file
exfatfsck: ELF 64-bit LSB  executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=c91c3e4c1e542e4a40bcad47ac747f62fb7312f9, not stripped

Change-Id: I32472d460a8f03776e1d215810c537b029789220
2014-08-07 15:47:47 +02:00
Vojtech Bocek 18d7c98688 Add possibility to use images as background or handle of slidevalue
* Add tag <resource background="x" handle="y" handlehover="z" />
  to the slidervalue object.
* All images are optional, e.g. you can use just handle or just
  background image or no images whatsoever

Change-Id: Ie0fee92965c6e883c4e532732756008dcc9e385e
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
2014-08-07 15:37:43 +02:00
bigbiff bigbiff 13baad223d update 1440x2560 keyboard mapping
Change-Id: I9777e92ca26967d41625e726383ae6aa5406161d
2014-08-07 15:37:25 +02:00
Ethan Yonker 96acb3d14d Allow using variables and addition/subtraction in variables
Change-Id: I1acba95302e414e1a471d27474508a7c48df0328
2014-08-07 15:37:01 +02:00
Dees Troy 05d18c9a74 Stop memory management on blanking overlay graphics
This prevents a crash in TWRP when trying to blank
the screen on devices that are using overlay graphics.

Change-Id: I155868616ffa1b211e97be97e4abe8b03dad7ca0
2014-08-07 15:36:33 +02:00
Ethan Yonker 3d49ea7cca Add 280x280 theme
Change-Id: Iea2fac2f1b300c312819ea2d83e1762669d357b6
2014-08-04 09:14:59 -05:00
Ethan Yonker e2b2902cd7 Minor tweaks to watch ui.xml files
Change-Id: I9448eed41e43c4fce575b7ed12b5270a1d75f99b
2014-07-30 09:32:59 -05:00
Ethan Yonker d9b7200824 Add 320x320 theme and split out watch.xml for square watch layout
Change-Id: I7fe38b20913a981942105637a527a2d26ed035a5
2014-07-30 08:46:38 -05:00
Ethan Yonker c49a3669a1 Update 240x240 theme
Change-Id: I1a50fa0bb750b229220c217d24253b65f24d2920
2014-07-29 11:40:07 -05:00
big biff ba535e3b6c add 1440x2560 theme to TWRP
Based on work by Chris Phelps <cphelps76@droidconcepts.com>
https://github.com/TEAM-Gummy/android_bootable_recovery_TWRP/commit/58963336b81ea8bcc03b8d7e4dfe4598f5afc972
https://github.com/TEAM-Gummy/android_bootable_recovery_TWRP/commit/4ec10303cb76592044c3aa449dc68a33356a6e09
https://github.com/TEAM-Gummy/android_bootable_recovery_TWRP/commit/c48bd2412332916eafd0db727d923c8c16cd35ed
https://github.com/TEAM-Gummy/android_bootable_recovery_TWRP/commit/f0944ded30e98917ca85db0185add1207ea5f4b6
But with other original changes too.

Change-Id: I809a37a3983187e62568a1e2403b6637a692220d
2014-07-29 00:44:51 +00:00
Dees Troy 7d4cedc1d8 Revert "add 1440x2560 theme to TWRP"
This reverts commit c45181db09.

Change-Id: I9dfb2733d9eb30c32bc1e307e382ee8e4e47a0b6
2014-07-29 02:27:14 +02:00
bigbiff bigbiff c45181db09 add 1440x2560 theme to TWRP
Change-Id: I9e54d2bcfe89e1e0e3205ce2f4156cfd22dca5b5
2014-07-28 09:00:36 -05:00
Ethan Yonker 780cd39e42 Allow ui.xml to include additional xml files to read
Use common portrait and landscape xml files based on resolution
defined by the device.

Change-Id: Iec528f9d846d49857ff98de1ac201e25dbb60339
2014-07-28 08:50:59 -05:00
dhacker29 30f100e3bc Only disable recovery flash if it is truly "stock" recovery
Some roms need the recovery-from-boot.p for auto update
 of recovery. Typically the use install-[romname]-recovery.sh.
 So only disable if install-recovery.sh is present.

Change-Id: I01f89afc87b9d375d67b44b8b5e9228868a47d69
2014-07-25 23:54:10 +02:00
Matt Mower fb60a94f0a Allow custom bootloader msg offset in block misc
Use board define BOARD_RECOVERY_BLDRMSG_OFFSET with a decimal integer
to define a custom offset where the bootloader message should be
read/written.

Change-Id: Id13a23dd41bb7d907b96d657b8e21eb839dfeaa9
2014-07-16 16:09:51 +02:00
Matt Mower 2fec60a5dc Do not wipe block misc on bootloader msg update
When set_bootloader_message_block() is called, it fopens /misc in write
binary mode, wiping all contents other than what is being written. The
bootloader msg structure is only 1024+32+32 bytes, so some manufacturers
store more than just a bootloader msg on /misc. fopen in read+append
mode so that only the bootloader msg is written and the rest of the
partition is left untouched.

Change-Id: I2d2fbdf067282744864a19d404ca7dc12f688a98
2014-07-16 16:09:42 +02:00
Matt Mower 62ba6526b7 Remove unused twbootloader.cpp
Change-Id: I5a1d52d69662a97049fad18dc760e205c193f381
2014-07-16 15:19:27 +02:00
Vojtech Bocek 03fd6c56fe Implement "take a screenshot" feature
* Like in android - press power+volume down, screenshots are saved
  in /sdcard/Pictures/Screenshots (if /sdcard is mounted) or /tmp

Change-Id: Iaefa15b11a1d5fdfac57d77388db1621f378a8d4
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
2014-07-09 17:35:36 +02:00
Vojtech Bocek 67351dca66 Check the crash counter instead of date in TWFunc::Fixup_Time_On_Boot()
* Some devices (Sony) have RTC counting up from year 2009,

Change-Id: I2cf1928e1b05c7e8b184963f8130582e0319ddc4
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
2014-07-09 15:57:59 +02:00
Vojtech Bocek 0fc1573730 Change ro.twrp.boot boolean to twrp.crash_counter
Change-Id: If1ef25fee5a138a90ccb4f0a70b20b55698e0d0d
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
2014-07-09 15:57:09 +02:00
Ethan Yonker a18f108e84 Fix setting of brightness during startup
Change-Id: I1bd01df971857a2dd5e75ed87c488d075d765527
2014-07-09 15:55:56 +02:00
Ethan Yonker 1b7a31bd65 Track backup and restore progress
Track backup and restore progress based on the sizes of the files
as they are being added to the tar backup file. Update the
progress bar based on the sizes of the files.

Change-Id: Idf649efa1db3e91830b4b2add86203a3f30042ff
2014-07-09 08:52:18 -05:00
Ethan Yonker bf2cb1c4d8 Color in the console
Allow each gui_print command to specify a color
Change LOGERR to use the error color
Theme should specify colors for error, warning, and highlight

Change-Id: Ie8ece34111f604e25fcb79e5b731cd4e61038ff9
2014-07-09 15:46:35 +02:00
jrior001 aad03116ed Refresh after partition changes
Change-Id: Id16c84f815b1c4b8e95da142648a5a759116ee6e
2014-07-07 20:59:07 +02:00
Humberto Borba f58d0ec0f1 mtdutils: fix rk3xhack filter
Just fix filter for correct platform

Signed-off-by: Humberto Borba <humberos@gmail.com>
Change-Id: I1f0978a6b215a1967dad4a2c495777d917865b88
2014-07-05 17:24:00 +02:00
Kra1o5 3167936cf0 Changes in rk30hack
This works on rk3188 based devices too so rename it to rk3xhack.
Change-Id: Ia3d9d52d99205057f8bece735a938986491b7522
2014-06-30 19:02:47 +02:00
Flemmard 60bf94ec27 on stock android, pthread_cancel and phtread_setcancelstate doesn't exist
Change-Id: Icbe281a301004ae2bcda4821a50fb4a41088e85d
2014-06-30 19:01:33 +02:00
Flemmard 4e2ec811ba libdl should also be linked to binary
Change-Id: I98f9c90b0a7af591bdbcf646f59068f9915d49c7
2014-06-30 18:50:21 +02:00
Flemmard f4674619a2 minuitwrp: use a whitelist for the input device instead of a hardcoded ignore list
* use a whitelist for the input device to listen on, every other will be ignored

Change-Id: I1296a45ec3d5ca0bca2a9e2601b0710e2c030fde
2014-06-30 11:45:40 -05:00
Motorhead1991 75b6f66ed8 Add "include $(CLEAR_VARS)" for 4.4 ROMS (clears LOCAL_BUILT/LOCAL_INSTALLED error)
Change-Id: Ibbba0ce9c7ebadee40e42b740c83214fd1cd56ac
2014-06-30 18:37:00 +02:00
Motorhead1991 c7f2e1243b GUI: Add -fno-strict-aliasing to GUI for Vanir
Change-Id: Id772737d2856698861686671152f14bad800cd5c
2014-06-30 18:32:20 +02:00