Commit Graph

2504 Commits

Author SHA1 Message Date
Ethan Yonker
090751af9d Fix bracket in watch theme
Change-Id: Ic30b56840f32215c2f171e043c99e679d33957fd
2016-01-25 23:54:07 +01:00
that
235c648a68 gui: use XML-based page for splash screen instead of a static jpg
For devices with an unusual aspect ratio, stretching a bitmap to
the screen resolution is sub-optimal. So let's reuse our XML engine
that allows assembling the splash screen from individual parts.

The splash page is loaded from a separate XML file for quick loading.

Change-Id: I2d3dad26e42fcefaf563dacdf0ffa61f209dada1
2016-01-25 19:25:34 +01:00
Ethan Yonker
afde0983df Update mStartPage to make language selection work on other pages
We should offer language selection on any start page such as
decrypt or system read only. However, if the mStartPage variable
was not being updated properly so selecting a different language
was dumping the user back on either the decrypt prompt or the
system read only page. This patch set fixes the problem and places
the user back on the proper page when they choose a new language.

Change-Id: I5153d3b9525d8c93d3863f4b17ecf55b5209e3c7
2016-01-23 08:56:07 -06:00
z31s1g
608d7ff8ad gui: add language selection to several pages
Language selection for decrypt, decrypt_pattern and system_readonly pages.

Done:

portrait
landscape
watch

Change-Id: I5fd595cadcdebdd06e9dbb164d0736c84426ff1b
Signed-off-by: z31s1g <z31s1g@googlemail.com>
2016-01-23 08:17:00 -06:00
Ethan Yonker
4adc33ebff Fix (Auto Generate) handling for backup names
Change-Id: I29f3823d03c005fb55a0e0a98818d40bd1eb039d
2016-01-22 16:08:07 -06:00
z31s1g
6193e73a16 gui: language EN fixes
-swipe to reboot added
-added comment regarding "type yes to confirm format data"
-Remove the word "Settings" from the from some header subheadings (some had it, some don't)


Change-Id: Id3810c4f3aa5c02e94d854118805da7e51d309f3
Signed-off-by: z31s1g <z31s1g@googlemail.com>
2016-01-22 18:51:21 +01:00
Xuefer
579e907d60 Android 6.0 needs permission +x to create screenshot files
Change-Id: Id4a6c04712238b86787696337874239591082d39
Signed-off-by: Xuefer <xuefer@gmail.com>
2016-01-22 18:50:07 +01:00
Ethan Yonker
72a8520369 Make new brightness code compatible with older trees
libstlport does not support ifstream with std::string
libstlport does not implement stoi

Change-Id: I2ae3b6ee1b2a28fe4305471133f40543bd0c9746
2016-01-22 11:45:13 -06:00
Ethan Yonker
916cae8fa3 Fix toolbox build issue when using TW_USE_TOOLBOX=true
Change-Id: I643873b495318d4886b9f8cfaf1b75555d3166c3
2016-01-22 11:34:10 -06:00
dianlujitao
ce608ab7d2 Add zip and unzip when using toybox
Change-Id: I75500bfe4e7adf66c5538597d79ed0539e7bb551
Signed-off-by: dianlujitao <dianlujitao@gmail.com>
2016-01-22 11:30:22 -06:00
Tatsuyuki Ishi
548a175182 Improve max brightness handling
If we can detect the directory, why don't we detect maximum as well?

Additional patch by: Matt Mower
Replace clunky /nobrightness handling

Cleanup TWFunc::Set_Brightness() and blanktimer::getBrightness() a
bit, primarily for the purpose of relying on the value in
tw_has_brightnesss_file instead of checking for a phony brightness
path.

Change-Id: Ib22595df53cefa8db7a1172a581984c42ad461c6
2016-01-22 18:06:00 +01:00
nkk71
6069a793ea minzip: Add support for >2GB zipfile
normal zip limit is 4GB, but due to signed variables it will only
access 2GB (32bit signed integer is from -2GB to +2GB).

these changes allow for a theoretical limit of 4GB zips to be flashed.
RAM restrictions still apply, and on a 32bit system it's likely to max
out at approx 2.8GB flashable zip, above that mmap will probably fail.

Note: the flashable zip also needs a compatible update-binary which
include these changes.
(this also applies to both aroma installer if it's being used).

Change-Id: Ib3af2945c9bd4890a2e6dc45acfc2b80ec55473b
2016-01-22 17:45:46 +01:00
Matt Mower
3c36697b2d Fix a bunch of messages
* Find and rename/remove duplicate string variable names
* Add missing string variables to en language file
* Fix display of some strings missing @ in front of variable name
* Fix several %s --> {1}
* Be consistent in usage of cancelled vs. canceled (both spellings
  acceptable)

Tip for finding strings missing from language files:

1) Find all messages:
egrep -hr "gui_msg.+=" > /tmp/msgs.txt

2) Regex replace to trim them down
WHAT: ^\s+gui_msg(?:[^"]+)"([a-zA-Z0-9_]+)=([^"]+).+
WITH: $1
Note that $2 can be used to retain the message

3) Find missing strings:
for i in $(cat /tmp/msgs.txt); do
    if ! grep -q $i gui/theme/common/languages/en.xml; then
        echo $i;
    fi
done

Change-Id: Ic193162e4b5468bf027472928a370be39840ea1d
2016-01-22 05:29:04 +01:00
Ethan Yonker
8e5692ffe0 Ensure that a base language is loaded before custom theme
Main goal of this patch is to improve error handling when a custom
theme does not contain a valid theme version. We were getting a
message saying that the theme_ver_err resource did not exist as
well as an error saying that the package had failed to load. Now
we properly get a single error message about the theme version.

Change-Id: I361ef2d139220bbeaf2e856be919dc3a50ae4299
2016-01-21 11:21:12 -06:00
Ethan Yonker
b82422a6c3 Fix SuperSU local dependencies
Change-Id: Ia5fadd8254340b21a54565e2c7d2b54aa70f19f3
2016-01-20 08:48:49 -06:00
that
8436fc99fa libblkid: fix compiler warnings about duplicate macros
Change-Id: I1b6e8d9b760dfd93312d32c9f66ec57d1fb9d9b6
2016-01-19 23:28:40 +01:00
Andrey Alekseenko
f510988cf4 exfat regression fix (64-bit)
After upgrading libexfat to a new version, 64-bit I/O was lost, here is
the fix.

Change-Id: I27382cbf474ce32297dfa0f7bd8036371ccfaef2
2016-01-19 23:24:47 +01:00
Ethan Yonker
ba95ad18ac Update qcom hardware crypto code
Change-Id: I4608c45b3f71b53e0988ca0248d3438110a40149
2016-01-19 23:13:17 +01:00
that
d4725ca147 gui: fix return value of NotifyKey
Only the last action got its keys and ate all of them (om nom nom).
This fixes the power button action that activates the lock screen.

Change-Id: Ia724568b159090c2c14a282cf3927915b2dc70e7
2016-01-19 00:15:21 +01:00
z31s1g
faa4377e40 gui: make tw_show_kb non-persistent
Change-Id: Icb3dd2342cc3bdc349aaf933d306b9f5315d1e98
Signed-off-by: z31s1g <z31s1g@googlemail.com>
2016-01-18 09:57:45 -06:00
Ethan Yonker
051f47601b Check sdk version for M before offering to root
Change-Id: I269618510d2e6e360c1e9f72ed371729a1f2a76b
2016-01-18 16:47:35 +01:00
Ethan Yonker
dedbb7f782 Make listbox translation work
Change-Id: I446f4499a43e6348a2b95846f3e5ea86967abbdc
2016-01-18 16:46:18 +01:00
that
1cc7fed32e Delete leading spaces after word wrapping in console
Change-Id: I11887ebc1a3afd8f9acb1e85a212e2fe6299441c
2016-01-18 09:44:05 -06:00
Ethan Yonker
9598c07d40 Do not require mounting during zip flashing if path exists
Change-Id: Ideb4bb39b5e864a43b62e807c38b6395c56a8466
2016-01-18 16:16:01 +01:00
Ethan Yonker
b78fbdfabc Improve flash image handling of mounting
Flashing an image does not always require storage to be mounted.

Change-Id: I9d2a69cee9053f7829e51486d727e2e0b522c5da
2016-01-18 16:15:26 +01:00
Ethan Yonker
1308d53e24 Add theme version checking
Add a themeversion value to the ui.xml details section. Check this
value against a define during early theme loading. If we are
loading a custom theme, then reject the custom theme if the
version does not match (or not defined) and load the stock theme.
If it is the stock theme, show a warning but continue loading.

Also fix an issue with changing overlays. Not sure how it ever
worked before, but it works now.

TLDR: Use the stock theme if the custom theme version does not
match.

Change-Id: I0277cbe035cbec7e16b6327500762dadf9c1c5c8
2016-01-16 08:19:51 -06:00
Ethan Yonker
6bb26b5f14 Add toybox getprop and setprop for M trees
Change-Id: I5827b3545f3f0118bd0d9407f812bd62fd26d97c
2016-01-15 01:27:45 +01:00
Ethan Yonker
483e9f45b7 Improve sdcard partitioning process
-Improve code for partitioning sdcards
-Allow user to select a device for partitioning (must be removable)
-Use sgdisk to partition sdcards
-Set default sizes for ext and swap to 0
-Change increments for ext to 256MB and swap to 64MB

Note: sgdisk is included in 6.0. I have included a static prebuilt
sgdisk for trees that do not have sgdisk, however the prebuilt
sgdisk is a decent bit larger than the old parted binary. The old
parted binary is quite old at this point and we only have it for
armv7a. sgdisk should be maintained by AOSP and can be built from
source so it should work across architectures.

Change-Id: Ib80882d9b5776e5e9358b11340fba392e6f1ae09
2016-01-14 17:40:43 +01:00
z31s1g
5618952043 gui: theme changes for terminal
Done:

Portrait HDPI, MDPI
Landscape HDPI, MDPI
Watch

Also still includes ugly changes for the old portrait theme to test the
terminal emulator.

Change-Id: If32af1c69b85417522a8a2fb9c20be515b4d70fc
2016-01-13 22:38:54 +01:00
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