Commit Graph

2475 Commits

Author SHA1 Message Date
that
a17f175bd3 gui: reap terminal child process to avoid zombies
Change-Id: Ia46d8acb8b13075a2519df1deb91dd30a5969a48
2016-01-11 21:43:00 +01:00
that
1964d19c46 gui: add terminal emulator
Emulates enough of a VT-100 to run busybox vi.

Change-Id: I99c829c6c9de2246194ecb8b8b3cdf4ac34a0606
2016-01-07 22:30:39 +01:00
that
8834a0ffc0 gui: add keyboard support for Ctrl layer and more special keys
- rename NotifyKeyboard to NotifyCharInput
- input: handle arrow keys in NotifyKey with standard KEY_* codes
- fix page handler to return 0 from NotifyKey if key was handled
- fix GUIAction::NotifyKey to not swallow all keys
- change home button code from KEY_HOME to KEY_HOMEPAGE
  (to avoid collision with Home/End, conforms to Android 3.0+)

Change-Id: Ib138afa492df8d0c1975415e8b5334c8778ccc90
2016-01-07 22:30:39 +01:00
Ethan Yonker
4c105b9a4c Fix translation spellings
Change-Id: I3fc40c61d78cf017c6753ddd9520aa2ef2e853fc
2016-01-05 16:26:51 -06:00
dianlujitao
7d304c71f8 Generate new format /etc/fstab
* Toybox's mount can't work with the old-fashioned fstab.
 * Busybox mount is compatible with the new one.

Change-Id: I16b7d6424a4424c2a92d82846a706733bf58f8e1
Signed-off-by: dianlujitao <dianlujitao@gmail.com>
2016-01-04 07:39:49 -06:00
Andreas Blaesius
123fcd02ea partitions.hpp: some formatting
tabs > spaces for line-comments to be consistent

Change-Id: I4e859fab61c54a5ae86e719a656398a085cfd7fb
2016-01-04 15:32:59 +02:00
Greg Wallace
2d65340c0f gui: Fix partition repair message
The message was named something non-existent.  Fix the spelling error
and add the default message into the language files.

Change-Id: I4e9e10d2705b1edf75b185d3badba59eb86ffb8b
2016-01-04 07:29:15 -06:00
Greg Wallace
4b44fef5ca gui: Fix typo of formatting_using message
Change-Id: I6df4937658815350366ed3dd2cf92156f98c96c4
2016-01-04 07:26:43 -06:00
Greg Wallace
b39e6c6047 ntfs-3g: Fix cm-13 compatibility
CM-13 tree completely changes the names of the binaries that are created
for ntfs-3g.  If we are using a CM-13 tree (CM SDK 4) make sure the
dependencies and relinking are adjusted accordingly.

Also, adapt partition code so it can make use of whichever set of
binaries are present.

Change-Id: I810caafa818f18281fd29dcf8f31b3053133b5ed
2016-01-04 07:25:24 -06:00
Olivier K.
94b06502b2 Remove no-op
Change-Id: I2bb2c44dd97974fa3cc19ccb6c6c7f0c3ef9bc58
2016-01-04 15:16:19 +02:00
that
f1408b3c0f Fix Recursive_Mkdir if path doesn't end with "/"
Somewhat surprisingly, Recursive_Mkdir(TWRES "customlanguages")
did not create the "customlanguages" directory because it expected
a trailing slash. Fixed by rewriting the loop to be more like
Create_Dir_Recursive.

Also fixed error handling for the final directory, and fixed incorrect
return value handling for "mkdir" ORS command.

Change-Id: I1ab418ddda695cbb595a9db2817f00fc7b171f51
2016-01-04 15:13:40 +02:00
Aleksa Sarai
b25a18395e gui: PatternPassword: allow any N*N grid
Rather than only supporting a 3x3 grid, allow for multiple grid sizes
(using the CyanogenMod method of generating passphrases for non-3x3
grids). Also fix the detection of touches, as the old code was far too
sensitive for larger grids (and also didn't make much sense).

Change-Id: I343ef654e6d29ce0cb790a28281be7c7c9b171d9
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2016-01-02 19:44:48 +01:00
Andreas Blaesius
54f34fc393 twrp: fix a typo and remove whitespace
Change-Id: I783e2bbc15ad8e10aab81d14d140a995681e860f
2015-12-29 23:47:07 +02:00
that
677b13f74b gui: fix screenshot_saved message
Change-Id: I7d047fe3436100dbe7c7515860a143a97f7ef0d4
2015-12-29 23:46:19 +02:00
that
10ae24ff94 get rid of console thread for OpenRecoveryScript
- CLI commands run in a threaded action "twcmd"
- Console is displayed via "singleaction_page"
- move ORS execution code from GUI action to OpenRecoveryScript class
- remove unused function gui_changePackage
- don't change PageManager package in home action
- fix that /tmp/openrecoveryscript was not deleted after execution

Change-Id: Ic688c0b04647ce09e9db979b0bc5123f47cf4f70
2015-12-29 15:39:57 -06:00
Xing
0af1ac13d1 do not include stlport headers unless link to it
Change-Id: I8344d270ddb601694b5fef0fa7b22ea437030728
2015-12-23 22:36:41 +02:00
Matt Mower
4251a9bcff init: Add new props triggers
Both Omni and CM split props loading into load_system_props_action and
load_persist_props_actions in Android 6.0 instead of all_props action.
Add these triggers. Unrecognized triggers do not cause failures in init
for versions of Android which do not have these.

Change-Id: I9682690ff7d378dc0d5e1598754f7a29600c1c2d
2015-12-23 22:34:32 +02:00
LuK1337
62326f4107 Set twrp.action_complete after completing action
Change-Id: I078f0659696cc57564b5db0076a0ed9aaea822d4
2015-12-23 20:32:19 +02:00
Greg Wallace
36ade45b1b Add default brightness control
This lets user set the default brightness so user doesn't cook
their phone on first boot or loss of settings file, while
still maintaining the ability to turn brightness to max if
desired.

Change-Id: Ia801fba46014335148ec573a0b0bbdf0a3ca60ae
2015-12-23 12:30:24 -06:00
Spegelius
d69ac2b18b Changed off_t to loff_t
- off_t is long, loff_t is long long (32bit vs. 64bit)
- exfat requites 64 bit to support larger than 2GB fs

Change-Id: I70293e45d7d6686317edc759092e738a2ebdd860
2015-12-23 11:50:35 -06:00
Matt Mower
523a059fb7 fuse: Update to 2.9.4
Change-Id: I0877c624531286f47da29a7ab16c7ff3cfac0090
2015-12-23 09:58:04 -06:00
Matt Mower
09ef1e4109 exfat: Update to 1.2.2
Change-Id: I160389afa074270c398aeb771845500f2445838a
2015-12-23 09:56:56 -06:00
Matt Mower
80f7b361f0 exfat: Build fsck and update path to mkfs
* Usage of fsck.exfat is already included in partition.cpp, but the
  tool is missing.
* Update the path to mkexfatfs so the button is available when changing
  filesystem.

Change-Id: I5f4e27357c6b5a8606043d1bdc2488cc83e55d90
2015-12-22 15:26:01 -06:00
Matt Mower
2d50cada06 Remove dead code: TW_HAS_DUAL_STORAGE
Nothing sets TW_HAS_DUAL_STORAGE. Remove this dead code.

Change-Id: Id5d10c9ee3883dad6beef69e09d16b0f1350c91d
2015-12-22 15:15:54 -06:00
Matt Mower
9a5b8b7feb pixelflinger: Fix local src arch includes
Automatic handling of LOCAL_SRC_FILES_(ARCH) was introduced in Android
5.0. Lower the SDK version check so these source files don't get
doubly included.

Change-Id: I8ebc7e3e687f2805f6ecb56499cbf39fc31e9545
Reference: see build/core/binary.mk and the handling of my_src_files
2015-12-22 15:01:05 -06:00
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