Commit Graph

2450 Commits

Author SHA1 Message Date
Matt Mower
231daef285 minzip: Fixup libselinux includes
Change-Id: Ic68f307a33e36437b9d21c442265c506b592129c
2015-12-22 14:34:13 -06:00
Ethan Yonker
3aa66be4f2 Append AOSP recovery commands inline
Appending the AOSP recovery commands to the ORS command file as
we process the commands will allow us to do things such as install
multiple zip files, wipe cache, etc and do the actions in the
order that those actions were originally requested.

Change-Id: I375c1ccd3976123b818f1f492e971e615ec28c91
2015-12-22 12:30:21 -06:00
xiaolu
38c3aa78ca openrecoveryscript: really append ORS command to ORS script file.
for example, in "/cache/recovery/command" :
--wipe_data
--update-package=/sdcard/1.zip

Change-Id: I70c92a868372dca48024e303a0778f9409ab0dc9
2015-12-22 12:19:12 -06:00
Matt Mower
047723c5aa selinux: Only union sepolicy in SDKs 21,22
Manual union is not needed in Android 6.0+.

Change-Id: I7e321fb90b4333da349cc8ad8d2d78d990258b65
2015-12-22 11:59:27 -06:00
Matt Mower
666d151d6e twrpTar: Remove redundant -g CFLAG
Change-Id: Ifefd159b1bc25cd0f54220ae1bd7407c08ca9cfb
2015-12-22 11:53:10 -06:00
Matt Mower
1777cdc93c Remove unnecessary quoting from twres path
The C flag defines already use -DVAR=\"..\", so stripping these extra quotes
should not affect those defines.

The makefile does not need the quoting at all.

Makefile example output...
before: mkdir -p (omitted)/recovery/root"/twres/"
after:  mkdir -p (omitted)/recovery/root/twres/

Change-Id: I8f557662eb18b5ea40b63bc055d12be4440251e6
2015-12-22 11:46:04 -06:00
Ethan Yonker
ceb1e8a5fc Fix CLANG error in cryptfs.c
Change-Id: If5af8f634bc016160aebaf7d4e6cda6c5650a077
2015-12-22 11:41:40 -06:00
Matt Mower
72cf09d617 mtp: Address clang compilation errors
* Move default value of debug_enabled to declaration
* Set more-correct fake values for MtpProperty sets

Change-Id: Ife3c15ac6c908848c16a609e8e505336e53c19d8
2015-12-22 11:37:30 -06:00
Matt Mower
582949125c f2fs: Update make rules for CM compatibility
* Make sure fsck.f2fs and mkfs.f2fs are built for CM12.1/13.0
* Add CM13.0 rule for relinking mkfs.f2fs
* Minor cleanup of nested if/else in prebuilts

Note on CM SDKs: 3=cm-12.1, 4=cm-13.0
I'm not yet sure whether it is possible that the CMSDK increments
within the same branch of CM.

Change-Id: I7b521159a8b5d0e0ea639f5e0fdd885100612df0
2015-12-22 11:25:34 -06:00
Ethan Yonker
ab7955d874 Improve string resource lookup in twmsg
Change-Id: Iaac7d3df0bd12a4d817d4ad273254662865b775a
2015-12-21 10:18:03 -06:00
Ethan Yonker
9ce9591cfb twmsg: fix notfound detection
Change-Id: Ie95fdfaed7011994ac11202d070edeb95032b805
2015-12-20 22:50:23 -06:00
Ethan Yonker
56db1c4e7f Fix gui_msg %s to {1} call
Change-Id: I39f032e0cad5d482d11e0e8d1c4c7c3e7ec6d041
2015-12-20 22:49:00 -06:00
that
d62d886d9c twmsg: fix build error (isdigit not declared)
Change-Id: I3101d15e5d94241cf8e583d1e06e09f3bc8b31f7
2015-12-20 20:40:15 +01:00
that
58a413380c dosfstools: restore buildability with Android 4.4
Bionic in Android 4.4 don't have setmntent

Change-Id: I8f9f03c084bd9c853b566fd94f6208566330cdc8
2015-12-19 16:45:33 +02:00
Ethan Yonker
d18a821e00 Use ioctl to get block device size
AMLogic based device uses paths like /dev/block/recovery and the
stock init binary either deletes or does not create mmcblk0p12
which breaks TWRP because TWRP cannot match up the path / name.
The ioctl method is probably more reliable anyway and certainly
should be faster.

Change-Id: I73f981dcec637cdf5b189bdefa00ea15b924b500
2015-12-19 08:38:12 -06:00
Ethan Yonker
74db157b94 Multiple Language Support
This is similar to https://gerrit.omnirom.org/#/c/14014

A lot of the features built in the older patch set have been split
out into separate patches, most of which have already been merged.
The remaining functionality here should all be directly related to
language selection and loading. We always load English as a base
before loading other languages over the top of the base. The idea
is that if another language is missing a translation, then we will
still display the English.

Maybe still to do: read the /cache/recovery/last_locale file and
load a language based on that. For me, this file contains just:
en_US
We probably won't bother with region specific translations so we
would have to look at either trimming off the _US or using some
other method like perhaps a symlink or a combination of the two.

Thanks to _that for twmsg.cpp class

Change-Id: I9647a22e47883a3ddd2de1da51f64aab7c328f74
2015-12-19 08:31:01 -06:00
z31s1g
28f0a92bb2 gui: stock theme rework
Tries to combine the current theme with a touch of material.
Page structure is untouched for the most part.
Layout grid is changed to achieve a "less random" placement of
objects on a page.

Change-Id: Icaf796be410431b17d5be6ccc1134d40912bef0b
2015-12-19 08:28:11 -06:00
Ethan Yonker
dc3bc46a82 Rename libexfat target to prevent conflicts
Change-Id: I5d2774c273a90c1f02c074f3c947c13b265972b3
2015-12-08 15:13:35 -06:00
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