Commit Graph

2432 Commits

Author SHA1 Message Date
Dan Pasanen
eb028c1e76 pixelflinger-twrp: don't build with clang
Change-Id: I742078841ae51fff9ce412279cd03805f4893981
2015-12-08 10:32:10 -06:00
maxwen
0cdc91100a Merge "minui: bring back custom font support" into android-6.0 2015-12-02 17:15:21 +01:00
Matt Mower
954601904a Fix short circuit on tw_mount_system_ro
Before mounting /system to check if supersu should be installed (a
feature which really needs to be stripped from TWRP), check if
tw_mount_system_ro is set to zero, not the other way around.

Change-Id: I38386b4c88fab112de5b6b752ecd4eed308efa5a
2015-12-02 06:10:40 +02:00
maxwen
39624d4e5e minui: bring back custom font support
Change-Id: I6cb97b236ff8ada46d270e99ab37656f5f1b73f8
2015-12-01 22:20:57 +01:00
Dan Pasanen
7ac17ccee6 libblkid: remove various no-op variable checks
* These cause warning errors since they will always evaluate to true

Change-Id: Iecdacc40807095893af357a962e238a3d263ca5a
2015-11-26 06:47:26 +02:00
Dan Pasanen
0ae529eb46 fuse_sideload: remove unused variables causing warnings
Change-Id: I5d7baa16df2bdecaef4f3e61db41251bc589615a
2015-11-26 06:31:34 +02:00
Dan Pasanen
8abeee19a3 twrp: fix incompatible pointer to integer conversions
Change-Id: Idb430d3e6fab88eddba57c0961923663ca981148
2015-11-26 06:23:44 +02:00
Ketut Putu Kumajaya
bfb72b062a Fix broken fsflags support
Process_FS_Flags Flags parameter is just a copy not a reference,
not get updated, Mount_Flags always 0 - fix it now.

Thanks to SHM @ XDA-Developers

Change-Id: Ib044db905febfedefee493cfc04fd1cad6f61f8e
2015-11-26 06:16:52 +02:00
Dees_Troy
00bc702566 Fix mkdosfs 2GB barrier
Change-Id: I3627b35f8bd27048647764196d7cf6d34b7bc854
2015-11-26 06:10:48 +02:00
Matt Mower
18794c820f Update dosfstools
* Version 3.0.28
* Update filenames in source
* Remove unnecessary symlink to fsck
* Commit "Recode short filenames from DOS codepage (default 437)." has
  been reverted since we do not have access to iconv
* Commits cherry-picked on top of 3.0.28:
    - mkfs.fat: fix incorrect int type
    - Prevent out of bound array read in date_dos2unix()

Change-Id: I50310235c62ec2e6bc90afcd10f2814d3afb5113
2015-11-26 06:09:55 +02:00
Matt Mower
13a8f0b294 Free some memory allocations
Change-Id: Ifb6c186e43e1eb068e8075def16924ced04bb23d
2015-11-11 19:42:27 -06:00
Ethan Yonker
e0f1f3b4d1 Move reloading of theme outside of the action thread
Reloading the GUI while the GUI is running and rendering is very
dangerous as we may be deleting GUI resources before or while we
are trying to render those same items. This change will allow us
to safely load new resources and delete the old ones.

Fixed a double free situation that was causing a crash on every
other theme reload.

Clear parsed xml documents when we are done loading the theme
instead of keeping them in memory for the life of the theme to
help save a little memory.

Store starting page so that if we request a reload, we can enter
the theme at the same starting point, which may come in handy if
we allow for language selection on alternate starting pages such
as the decrypt prompt or the system read only prompt.

Change-Id: I45a7e3fb3daeefac56d70f8d4936938eb1244b99
2015-11-09 14:57:23 -06:00
Ethan Yonker
5046857ceb Fix rules for libstlport
Change-Id: I571e906173c9e70de97e3cfefd10da5137dba4d4
2015-11-09 11:56:17 -06:00
Ethan Yonker
2c80efa0c8 Update rules for libpixelfinger_twrp
Change-Id: I40131f330e902afab033e810761bf98c07bbd03d
2015-11-07 07:57:36 -06:00
Ethan Yonker
fd52b987e5 Fix bution action position when using textplacement TEXT_ONLY_RIGHT
This makes the touch target include both the text and the image
for buttons masquerading as a check box.

Change-Id: If8432c5863de136b1a215dabb3e06109ccce4410
2015-11-06 15:24:35 -06:00
Ethan Yonker
a1de1496a9 Minor update to decrypt device routine for Nexus 6P decrypt
Move property setting of ro.crypto.state to after mounting any
needed partitions so that we can use this property as a trigger
for running services in init. Check to see if the property is
already set so that we do not set it and sleep multiple times if
the user enters an incorrect password.

Change-Id: I55558c5e227377381101b6305569d9eb31040790
2015-11-05 21:08:02 +02:00
Ethan Yonker
1673e3d4ea Treat /vendor like /system for read only
The vendor partition is verity checked just like system so we
should treat vendor as read only same as system.

Change-Id: Ida65c9f44d8610e52fcdcef0b4a50faf5c7110d2
2015-11-05 21:07:21 +02:00
Iftekhar Rifat
0543f06679 twrp: fb2png: do not pack relocations for executables
According to f55c5a52ac%5E%21/#F0

Change-Id: I593ba16cabd59dc3bb690aa12f855113b3e9983f
2015-11-05 21:04:24 +02:00
Andrea Mennillo
f591c87993 Fixup union sepolicy
This change solve two issue:
1) Policies related to recovery should be only included in recovery
policy
2) In CM trees the sepolicy dir was always bootable/recovery-
twrp/sepolicy, even if recovery path was bootable/recovery

Change-Id: I9466d22293074ba5f5240abe8b97a5d1bf30982d
2015-11-05 20:58:39 +02:00
that
54e9c839bc gui: fix default styles if object type is in element name
Change-Id: I4bc46d1772fee2ec77d95732fa3f69c267c2c34e
2015-11-05 20:52:46 +02:00
that
35f17402e4 gui: fix initial state of checkboxes in listbox
The GUI is initialized before DataManager loads the settings file,
so we need to update the checkboxes on page change too.

Change-Id: If4c694872608ec4014220364bd759c1399502994
2015-11-05 20:48:24 +02:00
Dees Troy
6299d2edc4 Merge "Revert :Force sync files written by minzip" into android-6.0 2015-11-05 19:45:31 +01:00
Ethan Yonker
25474e45b8 Fix screen timeout text placement
Change-Id: I7b020c7048f9bbb550e9f5100c604c01809e4fbd
2015-10-26 21:44:22 -05:00
Ethan Yonker
58b09f1a36 Fix SELinux issues for some devices
Reinstate some SELinux stuff in the default init.rc (noticed by
Kra1o5)

Add permissive.sh script to dependencies list for CM trees.

Change-Id: I36ade54378c413081d202002488309af35486d5f
2015-10-26 12:42:26 -05:00
Ethan Yonker
44925ad190 GUI TextBox
Allows the GUI to create a scrollable text box for long text that
may not all fit on the screen. Also includes code to allow the
console to wrap on spaces and other such characters instead of
wrapping in the middle of a word.

To see an example of how to add a text box to the XML, see:
https://gerrit.omnirom.org/#/c/14183/

Change-Id: Ifd139172ede290046b58ea3fe526e2e06da1d4ef
2015-10-26 11:54:16 -05:00
maxwen
c3540a96ec Revert :Force sync files written by minzip
forward port from 5.x
https://gerrit.omnirom.org/#/c/12524/

Change-Id: I303662cf28278bd9dd3799b3d0b5a07f96169416
2015-10-25 22:22:10 +01:00
Ethan Yonker
7dad625926 Add nulls during reading of settings and info files
Change-Id: Ie6202a8cc709d8593768f447ef95b4a815605d6b
2015-10-25 00:38:44 +02:00
Ethan Yonker
d0514ba806 Fix a bunch of warnings
Mostly adding __unused where needed.

Change-Id: Ia4f675b9b360782728c361ed1699db0cc277c3a5
2015-10-24 17:36:24 -05:00
that
8e213fdf08 fix build in Omni 4.4
Change-Id: Ida3984a6b774c2da12342d48d8644cd18de7396c
2015-10-22 08:10:38 -05:00
Ethan Yonker
b7a54a3016 Allow text to scale to fit
Change-Id: Iacd4bb78f551b51d092ecde09521b5541e7dadcd
2015-10-16 22:57:35 +02:00
Ethan Yonker
11309e912d Union sepolicy within TWRP to make SELinux permissive
This patch set should make it easier to build TWRP in non-Omni
trees as it allows TWRP to modify the sepolicy instead of having
to merge a patch in external/sepolicy to meet TWRP's needs.

Change-Id: I73205343556abb0852ff4c5f8cbf293d840b95d9
2015-10-16 22:49:19 +02:00
that
8ab5c13428 gui: support conditions for listbox items
Change-Id: Iea189ac53ec3d7c1bea83da7b77684778b1c0f46
2015-10-16 15:40:31 -05:00
that
20fb95d0a7 gui: extract methods for condition list handling
This is a preparation for list item conditions.

Change-Id: Iec731d1986a53b0362c534adf504dfe8db87d3f0
2015-10-16 22:33:15 +02:00
Ethan Yonker
56ce332315 Allow listbox to have a list of check boxes
For an example of how to implement a list of check boxes, see:

http://bit.ly/1Giacw2
https://gerrit.omnirom.org/#/c/14284/2/

Change-Id: I0752a084625f4a0ef8cc6d99597f2fb9aa2ab9e0
2015-10-16 15:30:51 -05:00
Ethan Yonker
561c58de19 Use unified LoadFileToBuffer function
Create a single function for loading xml files to a memory buffer
to reduce code duplication.

Change-Id: I0ff64463072118f61a2eb8052f74019715020253
2015-10-16 15:23:56 -05:00
Ethan Yonker
88037f476f Remove support for non-TTF fonts
This patch set removes support in TWRP for the old .dat file
format as well as support for the AOSP style fonts in header
files. We need TTF for scaling.

Note that the old AOSP style header font is still supported in
minui which is not used by TWRP.

Change-Id: I6124a3333d479f1fc668138f7e32c4be9b519552
2015-10-15 09:23:39 -05:00
Ethan Yonker
068c76888b Fix up twrpTar
Change-Id: I11a8f77b39a6f12aca6157c9aa76c34ef48c4b9f
2015-10-15 16:15:09 +02:00
that
5064048ec3 Improve error handling for zip install
- minzip: don't crash with corrupted zips (e.g. 4096 null bytes)
- twinstall: output error when zip doesn't contain update-binary
- twinstall: add strerror(errno) to system-level errors
- twinstall: correct message if /file_contexts could not be extracted
- twinstall: use TWFunc::Wait_For_Child for better waitpid errors
- twinstall: minor code cleanup

Change-Id: I53b156b0ec08755af2742bb71d1523ae38f4a82e
2015-10-15 16:10:53 +02:00
Ketut Putu Kumajaya
f13b893c2c Unicode for temperature
Change-Id: Ie86dc63f83ae51e9947debc7191fd91d61b83008
2015-10-15 16:10:26 +02:00
Captain Throwback
999219d763 Update CUSTOM_LUN_FILE from AOSP USB config
AOSP has used a standard USB config for the last 3 years.
Time to update TWRP for devices that still use UMS.

Reference: https://android.googlesource.com/platform/system/core/+/master/rootdir/init.usb.rc

Change-Id: I59690f955a7d6db9ae9d607d46299652b52fe8b8
2015-10-15 16:09:02 +02:00
HandyMenny
37d42994cd Properly set sys.usb.config when ums is enabled.
Use sys.usb.config also for ums, but leave sys.storage.ums.enabled for compatibility with custom init.rc that use it.

PS2: Rebased - moved updates to init.recovery.usb.rc

Change-Id: Iad3441d23ac37612e58f63e4038d05c5c1a37b25
2015-10-15 16:04:16 +02:00
Davis Mosenkovs
b909aae78f Fix minor interface bug: No-SU prompt after no-OS prompt
When /system is wiped in TWRP and afterwards Reboot -> Recovery is selected the "No OS is installed, are you sure you want to reboot?" prompt appears. After swiping to "Reboot anyway" the "Current ROM is not rooted, do you wish to install SuperSU?" prompt appears.
This change removes "Do you wish to install SuperSU" prompt after "No OS installed" prompt.

Change-Id: Ie1157afdf5cf1cb81d6647269172d6e63af9f4b0
2015-10-14 21:19:08 +02:00
Kra1o5
7756859abe Add support for RGBA_8888 pixel format
Change-Id: Ia15d49e51cad5bc8a3291975e1ff515a2b1c419c
2015-10-14 13:32:03 -05:00
Ethan Yonker
a59da09dd8 Add qcom overlay graphics support to minui
graphics_overlay.cpp is based on a mix of AOSP code for
graphics_fbdev.cpp along with overlay graphics code from CAF that
was brought into earlier versions of TWRP and then further adapted
and improved before being brought into this patch set.

Also added a rule to build a minuitest binary for testing the
minui engine to ensure proper operation on a device.

Change-Id: I3972d3a6baa7002615319421ac07d9299c3cec69
2015-10-14 20:16:12 +02:00
Ethan Yonker
e96182e052 Add 16bpp support to minui
Change-Id: I9a9ba6ccbef999b1a4b122e45f862bd3672b5047
2015-10-13 19:33:16 -05:00
Hashcode
7246b5d9e3 mtdutils: add include to fix implicit function warning
Including unistd.h fixes implicit function warning for "read" and "close"
in mtdutils/mounts.c

Change-Id: I72c3a52de035600cdd794ed5e2d4cae0da26f428
2015-10-13 12:47:13 -07:00
that
0579114c33 fix build in Android 4.4 (tested with Omni)
Change-Id: I781928483585052741fe1396bd9b136e61ca6538
2015-10-10 16:02:06 +02:00
that
8a1080e9e6 Revert "Use getmntent when accessing /proc/mounts."
This reverts commit a382e2bdb2.

getmntent is not implemented in older Bionic versions.

Change-Id: I277dae9e4fd83f08de8099e856e8d8f45e39239d
2015-10-10 16:01:57 +02:00
Ethan Yonker
5235f5550b Fix mkfs.f2fs error in 6.0 trees
Change-Id: I1217094f0e336445eb4dd5f46242d9719525ffbd
2015-10-09 14:46:47 -05:00
Ethan Yonker
c798c9cd24 Merge up to AOSP marshmallow-release
In order to maintain compatibility with older trees, we now have
minadbd.old and minui.old. I had to use a TARGET_GLOBAL_CFLAG to
handle ifdef issues in minui/minui.d because healthd includes
minui/minui.h and there was no other alternative to make minui.h
compatible with older trees without having to modify healthd rules
which is outside of TWRP.

Note that the new minui does not currently have support for qcom
overlay graphics. Support for this graphics mode will likely be
added in a later patch set. If you are building in a 6.0 tree and
have a device that needs qcom overlay graphics, be warned, as off
mode charging may not work properly. A dead battery in this case
could potentially brick your device if it is unable to charge as
healthd handles charging duties.

Update rules for building toolbox and add rules for making toybox

Use permissive.sh in init.rc which will follow symlinks so we do
not have to worry about what binary is supplying the setenforce
functionality (toolbox, toybox, or busybox).

Fix a few warnings in the main recovery binary source code.

Fix a few includes that were missing that prevented compiling in
6.0

Change-Id: Ia67aa2107d260883da5e365475a19bea538e8b97
2015-10-09 11:15:29 -05:00