Commit Graph

2534 Commits

Author SHA1 Message Date
HashBang ed974bb87a allow flashing sparse images
if the image has the right magic bytes to be a sparse image,
use simg2img to flash the image

create a rule to make a fully dynamic simg2img which results in a
much smaller increase in gzip ramdisk size (2KB vs 40KB)

Change-Id: I1b0f6bc127da46103888b1154a9bddd8ac02c01d
2016-02-03 16:05:56 -06:00
Xuefer cac6ace1ff sort languages by display value
Change-Id: I79d58fd680dd04161b89d42fed04a86a931defd3
Signed-off-by: Xuefer <xuefer@gmail.com>
2016-02-03 05:25:50 +01:00
Max Matviychuk 16d4a1feb7 Add ru.xml to translation engine on behalf on jemmini
Change-Id: I5d2d92f0d24228de9c63640d866e087542499d9d
2016-02-03 05:16:46 +01:00
Greg Wallace ace7623306 Flag to enable jpg support
Builder using a custom theme may have need for this.  Add a flag to
easily enable jpg support.

Change-Id: Ica74f8cb1312d3193105f2201a5cf8073e2edc82
2016-02-03 05:15:10 +01:00
Eve Kane 5d0870680f Language: Update & Fix zh_TW.xml
Fix incorrect translation Again. Sync en.xml changes.

Change-Id: Icc9020095f7b795758457ba5a661c22a8ef13267
2016-02-03 04:43:18 +01:00
Xuefer 90659b4c39 update Chinese Simplified language
1. ws fix
 2. typos
 3. use double-width Chinse punct

Change-Id: I561295c2e5562c59ce005459d1f178241130c6cd
2016-02-03 04:42:35 +01:00
Ethan Yonker 4ee62fcbd7 Update some string names in Chinese (Simplified)
sync with en.xml and update translations accordingly

Change-Id: Ic67b0496145c8a450c198520d7bb667dfe31f16d
Signed-off-by: Xuefer <xuefer@gmail.com>
2016-02-03 04:38:26 +01:00
that db79f22654 gui: remove unused struct translate_later_struct
Change-Id: I663f327585b4037eba62508a1f6484ca152bf3c5
2016-02-03 04:12:27 +01:00
that 675ddaeaf9 gui: fix conditions that compare with resource strings
fixes auto-generating backup name before editing the backup name.

Change-Id: Ied1c07b7dbdec9fa7fc80b3345970d95ac0ed1bb
2016-02-03 04:10:02 +01:00
Ethan Yonker 31f855b5ad Change some graphics build flags
While not all of these old build flags are active or implemented
yet (and they may not ever be implemeted until we find a device
that needs them), we need to make sure that the old build flags
are only applied when actually needed. Since there are a lot of
device trees that probably won't get updated due to lack of device
maintainers, we will rename the build flags and fix up devices on
a case by case basis.

Also added some pixel format related build flags to the make file
from AOSP so that AOSP devices should work in TWRP without
additional build flags.

Change-Id: I11ab475297d02b6aeffe89404fe50b4799a36be3
2016-02-03 03:57:53 +01:00
z31s1g 782e1c90b4 gui: tweak storage selection
minor changes to the storage selection that was intrduced with commit 16373 (improve sdcard partitioning)


Change-Id: I50437111f45d0b7e2b78a655424daa63aea374cc
Signed-off-by: z31s1g <z31s1g@googlemail.com>
2016-02-02 21:02:44 +01:00
Ethan Yonker 871b07f7b4 graphics: reintroduce flipped screens for fbdev
Change-Id: Ide3510d2efc1c1b39c756691776938e42424b61d
2016-02-01 10:31:59 -06:00
xadro 7509bc53ca Bring back option to flip screen for overlay devices
The driver already has the capability to do so.
It needs only to be flagged, if required.

Change-Id: I1d81b00a7499e493d1dbba0a440b45fc1202f7c1
2016-02-01 17:03:23 +01:00
z31s1g 64a0e71e3b gui: fix partition list height for image flashing
list height now accomodates 4 entries


Change-Id: Ib5a5e2bad408f393abbd433b5f23a5d25711ca6c
Signed-off-by: z31s1g <z31s1g@googlemail.com>
2016-01-31 15:06:57 +01:00
Ethan Yonker 9ee045a21c Add compare xml script and move/update relink-binaries.sh
Add script to compare string values between 2 language xml files
which will make it easier to identify strings that are missing
between the 2 files.

Move relink-binaries.sh to scripts folder and update it to handle
relinking 64 bit binaries.

Change-Id: Ia7a8bdbeea02256b3b864ab77e15912795275d33
2016-01-29 22:53:48 -06:00
that da31ac481a Remove execute permissions from source files
Change-Id: I5deef665ab374491c0f498b498971abd525d1111
2016-01-29 22:11:48 +01:00
that f54e539b9c partition.cpp: fix build, add missing include
Change-Id: I5b4c3b90d579573536e9de2df5127160cdc9a10f
2016-01-29 22:04:43 +01:00
Ethan Yonker b5fab76bea Replace fix permissions with fix contexts for emulated storage
Fix permissions rarely fixed anything on more recent versions of
Android and usually made things worse. Instead we will replace it
with a more dumbed down option that should fix contexts on
/data/media with a few improvements to ensure that contexts get
fixed for multiple users and on adopted storage.

Change-Id: If5523781936a0b04196e2ad871cae767ebae2583
2016-01-29 21:58:33 +01:00
Xuefer ebc4cfae31 adds TW_ADDITIONAL_RES to TW_RES
make it easier to add aditional resource files not just complete new theme

Change-Id: I6daca75929da03031812e66f25455e189b37a780
Signed-off-by: Xuefer <xuefer@gmail.com>
2016-01-29 18:27:12 +01:00
Xuefer b6e5fd9f76 add Simplified and Tranditional Chinese language
Change-Id: I417779259b08834d0bd9ec12ce31dda8c62d669b
Signed-off-by: cofface <cofface@163.com>
Signed-off-by: 996314227@qq.com
Signed-off-by: kaneawk <kaneawk@gmail.com>
Signed-off-by: Xuefer <xuefer@gmail.com>
2016-01-29 18:23:34 +01:00
sndnvaps 793ec588a8 Fix translation spellings
Change-Id: I16f71797901ed21763b52a5cf750f383a460ce4d
Signed-off-by: sndnvaps <sndnvaps@gmail.com>
2016-01-29 18:05:02 +01:00
that c12a7f0f62 gui: move "(Up A Level)" in file selector to resource string
Doing it at display time is easier.

Change-Id: Ic0f2ca1f425f6267452157524a05b51d9324be16
2016-01-29 18:03:56 +01:00
Greg Wallace 62c188ca3d Fix minuitwrp include mistake
Change-Id: Iebb5763277eec83fd6db4fdca8b7ecfd3c78dc6b
2016-01-29 17:56:35 +01:00
Greg Wallace 558aef791b Reduce format f2fs time
Secure block discard/trim was fixed by:
https://github.com/CyanogenMod/android_external_f2fs-tools/commit/6b39b93d83ab4ccb1913ecbc7a5a3e16766a011f

Once fixed, formatting using discard/trim takes a LONG time.  Other TWRP
formatting methods are already insecure.  It doesn't make sense for this
one type of partition to have secure wipe when none of the others do.

Change-Id: Ib5ad5a722895b0e0c7aa4e3af98b705e2574b762
2016-01-29 17:55:46 +01:00
Ziyan 4fea38a1d4 twrp: default to GGL_PIXEL_FORMAT_BGRA_8888 if vi.red.offset == 16
Change-Id: I436bab6ef679168d3625d8e1837917077cf89908
2016-01-29 03:02:47 +01:00
that 7a36a8c33c data: fix setting brightness at startup
Change-Id: Ibc4c4cc209c5f5f1a332fddcb450f983dc1a666a
2016-01-29 00:01:43 +01:00
Ethan Yonker e95c4868b9 ifdef and comment out libjpeg
Chances are there are not many themes in widespread use that are
using jpeg images, but this will be easy to revert back or even
just temporarily modify if we need jpeg support in a pinch.

Change-Id: If17b05ce3ebccce724fd74b26ed8ea91b287c3cf
2016-01-27 10:58:02 -06:00
Ethan Yonker fbb4353a24 Update minuitwrp graphics in line with latest minui
Note: events.cpp is still old code renamed to cpp to make it
easier to call functions like gr_fb_width().

I had to modify AOSP fbdev code to provide a separate memory
surface for drawing to as drawing directly to the framebuffer
resulted in rendering taking about 5 times longer.

I also modified AOSP adf code to provide a separate memory surface
for drawing for the same performance reasons. The Nexus 9 supports
adf graphics.

Overlay graphics work on at least one device. Overlay provides a
separate memory buffer already so performance is good.

I do not have a drm device yet that I know of. I made some attempt
to update the drm code to determine the correct pixel format based
on the drm graphics format, but what is available in pixel flinger
and what is available in drm do not line up all that well. Reports
are that the Pixel C is using drm graphics, but performance is
slow, likely due to the use of a mmap instead of a memory buffyer.

Change-Id: Ibd45bccca6ac2cb826037aa9b2aa5065cf683eed
2016-01-27 10:53:13 -06:00
Ethan Yonker 66a1949df9 Adopted Storage support
-Detects, decrypts, and mounts an adopted SD card if a
  secondary block device is defined (usually mmcblk1)
 -Handles unified storage
 -Displays the adopted storage in MTP along with internal
 -Factory Reset - wiped just like a data media device, we
  retain the keys folder and the storage.xml during a
  factory reset
 -Backup / Restore
 -Disable mass storage when adopted storage is present
 -Read storage nickname from storage.xml and apply it to
  display names in the GUI
 -Read storage.xml and determine what storage location is in
  use for /sdcard and remap accordingly

libgpt_twrp is source code mostly kanged from an efimanager
project. It is GPL v2 or higher, so we will opt for GPL v3.

Change-Id: Ieda0030bec5155ba8d2b9167dc0016cebbf39d55
2016-01-25 23:59:17 +01:00
z31s1g 56a7a99d8e gui: add icons on settings tabs
use icons instead of text on settings tabs
portrait themes only, landscape has no problems if a translated label needs more space


Change-Id: I611ee9e34d5641c00d8894e219502a6198648339
Signed-off-by: z31s1g <z31s1g@googlemail.com>
2016-01-25 23:58:45 +01:00
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