Commit Graph

2578 Commits

Author SHA1 Message Date
Wechy77 e9d3fc280f TWRP: hungarian translation
add more strings
and fixes my mistakes in crowdin

ps2 remove whitespace

Change-Id: If79e61fba5c1b2e54be29286b23a1b418095b07c
2016-03-31 15:01:33 +01:00
Ethan Yonker d946aa470f Add language_helper.py
This script is intended to make managing the language files a
little easier.

This script reads the English and supplied other language files and
compares the 2 and reorders and rewrites the other language to a new
XML file such that all the strings are placed in the same order as
the English file. It will place commented out string lines for items
that are not present in the new file and will not include any strings
in the new file that are no longer present in the English source.
There is also a version tag that may be compared if present between
the English and other language in case a translation string changes.

Change-Id: If49d7efbf99c033d9736af971a78ed8455ac5c6f
2016-03-31 08:57:32 -05:00
James Christopher Adduono 0de3b7ed61 Flashutils: detect /dev/block/sd* as emmc
Change-Id: I067a58e5053748b9613ea6b4ac76a1c5285abc7d
2016-03-31 14:17:41 +01:00
Ethan Yonker 4f74d14f8c Stop loading languages for the splash screen
We don't translate anything for the splash screen currently so
this will slightly reduce startup times and prevent the code from
running when it's not needed.

Change-Id: I8a8e8be5247d8e8b148db578c12bce5d370123a8
2016-03-31 08:10:40 -05:00
Ethan Yonker 86404bda2c Stop trying to load /script/ui.xml
I think this feature was used way back in the very early days of
TWRP 2.0 on the Kindle Fire and has not been used since. I see no
reason to keep it around for now and we can always reinstate it
later if for some reason we need this feature again.

Change-Id: Ie9f3e5db7190732f813ae1e152aab2d85a4ca98c
2016-03-31 08:01:12 -05:00
Ethan Yonker a5db7121ab Improve input box text handling
Change-Id: I79cfaac1adf85d1ee5514bf5266930823c1a15ff
2016-03-29 20:05:35 +01:00
Ethan Yonker 20eb0bc2d1 Detect and install custom themes as part of zip installs
Change-Id: I7ec7133e53fca92ebe49a9a41161754a9138141e
2016-03-29 19:41:48 +01:00
that 6a89459ec1 gui: rewrite theme loading code
- Reduce code duplication for parsing of include files
- Fix crash when styles and templates from included files are referenced
- Fix bug with path concatenation if more than one file is included

Change-Id: I06cd720188df272180fb359097afd73a85952fa8
2016-03-29 19:38:30 +01:00
James Christopher Adduono d6f94acc9a Allow restoring to read-only file system
This allows the restoration of firmware or modems on read-only
mounted file systems. If the user is able to make a backup of
these partitions, it would only make sense they be allowed to
restore that backup. The current handling is dangerous in that
it happily wipes, but refuses to restore. :)

Note that it would be preferable to use the backup=emmc flag
instead in most cases, added by change:
https://gerrit.omnirom.org/#/c/17183

Change-Id: I32d47c8928dee61595c15a9db16d3c5b9a6d7183
2016-03-29 19:38:02 +01:00
sndnvaps a915ec4215 Fix RELINK of toybox for twrp
Change-Id: Ia609eec928278fc63e699d42799f74b4ada82221
Signed-off-by: sndnvaps <sndnvaps@gmail.com>
2016-03-18 00:31:51 +01:00
Ethan Yonker 1e1fe4a7c6 Fix year in NOTICE
Change-Id: Iaade6424f23855b000bd282d3d00fba5d061c535
2016-03-17 16:00:20 -05:00
that b240f4a6a3 gui: fix font scaling for zip themes
All fonts were extracted to /tmp/extract.bin which was deleted after
the initial load, so reloading for scaling failed.

- extract fonts to /tmp with original name and don't delete them
- minor code cleanup

Change-Id: If8a0f657a7ef4c418fd5cc8550a24de44a38f303
2016-03-17 21:59:26 +01:00
Ethan Yonker c2dafbbba6 Change to dd for wiping crypto partitions
flash_image was spitting an error. We are also specifying a size
so that we do not risk writing beyond the partition.

Change-Id: Ie3a0d77db96e54357238595934c3df0e3b680823
2016-03-17 21:55:41 +01:00
Ethan Yonker 4745e89c04 Finally update NOTICE file to contain GPL v3
Individual files have contained the GPLv3 notice, but now the main
NOTICE file will indicate GPLv3 to better reflect the license of
the project.

Change-Id: I277b88e5853b7a7fc64f2305a5d4a3fff4e88e7d
2016-03-16 14:55:17 -05:00
James Christopher Adduono fddbdfa45f Don't add subpartitions to restore list
Their parents will take care of them.
Good parents.

Fixes double restoration of subpartitions when they are
also set to backup in the recovery fstab.

Change-Id: I876c179135e0cb00754e9a8cfc8eac164c4b7fd4
2016-03-03 18:05:46 +01:00
James Christopher Adduono 6f57f7c601 Merge code from upstream libtar + bug fixes
All updates and fixes applied from upstream libtar as of
March 1, 2016.

Debug flag is disabled, however non-debug output now
provides 1 line of useful output per object extracted.

I've also merged some fixes from CyanogenMod's
fork of libtar:

From: Tom Marshall <tdm@cyngn.com>
Date: Thu, 11 Feb 2016 16:24:40 -0800
Subject: libtar: Cleanup, secure, and extend numeric fields
Commit: e18b457ea1cbf6be1adc3b75450ed1c737cd82ea

From: Tom Marshall <tdm@cyngn.com>
Date: Thu, 11 Feb 2016 12:49:30 -0800
Subject: libtar: Make file sizes 64-bit clean
Commit: e628c2025549a24018bc568351465130a05daafb

From: Tom Marshall <tdm@cyngn.com>
Date: Thu, 17 Apr 2014 09:39:25 -0700
Subject: libtar: Add methods for in-memory files
Commit: 8ec5627a8ff0a91724c6d5b344f0e887da922527

From: Tom Marshall <tdm@cyngn.com>
Date: Wed, 2 Jul 2014 09:34:40 -0700
Subject: libtar: Fix hardlink extract
Commit: 166d83a51e0c51abcea37694dbd7df92d03c1f56

From: philz-cwm6 <phytowardt@gmail.com>
Date: Sat, 26 Apr 2014 01:11:35 +0200
Subject: libtar: Various bug fixes and enhancements
Commit: a271d763e94235ccee9ecaabdb52bf4b9b2f8c06
(Some of this was not merged in, as better solutions were
available from upstream libtar)

From: Tom Marshall <tdm@cyngn.com>
Date: Wed, 9 Apr 2014 09:35:54 -0700
Subject: libtar: Add const qualifiers to reduce compile warnings
Commit: 0600afa19fe827d06d3fcf24a7aabd52dbf487b4

Change-Id: I6d008cb6fdf950f835bbed63aeb8727cc5c86083
2016-03-02 13:04:11 -06:00
Matt Mower 64ffe730a6 Unix file endings and remove execute permission
Change-Id: Iceaae3f7f20c3c6f23da807786b4cf4739c887c9
2016-02-29 17:14:17 +01:00
that b9d8f62c26 minuitwrp: retry opening fb0 if it failed
On some devices TWRP tries to access the framebuffer before all
device nodes have been created. Retry opening instead of crashing later.

Change-Id: I189a8fe80a8906b46fb6cece53c0bf83c00c0e09
2016-02-29 17:10:00 +01:00
Ethan Yonker 98ebdafe52 Fix verifier_test build
Some people insist on running make without specifying any target
like recoveryimage or otapackage, which triggers a build of
verifier_test, so this fix will keep people from asking about
this build error anymore.

Change-Id: Ic955b7a3fb2599894e712fd8b418227da240d288
2016-02-29 15:24:45 +01:00
Ethan Yonker a60c78602d Remove busybox modprobe to fix slow performance for some devices
bionic process initialization calls personality
(specifically personality-8)
personality wants to load a kernel module
loading a kernel module calls /sbin/modprobe
loading /sbin/modprobe is a bionic process initialization
bionic process initialization calls personality
personality wants to load a kernel module
loading a kernel module calls /sbin/modprobe . . .

Before you know it, it takes 0.5 seconds to do anything.
Note: modprobe is still technically available, but the symlink
has been removed, so you can still call it directly by running
busybox modprobe if you like.

From what I can tell, this issue only affects 32 bit devices
with CONFIG_MODULES=y in the defconfig. The problem can be also
patched out of the kernel by commenting or otherwise removing
the block of code in kernel/exec_domain.c inside the CONFIG_MODULES
ifdef block

It is also possible to patch the problem in bionic libc by commenting
out or otherwise removing the __initialize_personality in bionic/libc/
bionic/libc_init_common.cpp file.

Change-Id: Iebac314616080ac18320d73b087980ac1b98b951
2016-02-29 15:22:48 +01:00
Matt Mower 9a561dd2b3 partitions: Fix path based Find_Next_Storage
If a path is specified for Find_Next_Storage() and datamedia is
excluded, the function currently runs to the end of available
partitions and reports no other storage is available. Fix this by
restoring the original mount_point == search_path check to break the
loop. The subsequent partitions loop will skip data-media storage as
needed.

Change-Id: I92baed866cd36f13d851bd58ba5346e47edb142e
2016-02-24 15:03:25 -06:00
Ethan Yonker eadfd2eb68 Fix storage selection with adopted storage
Change-Id: Ifcba4e668579c3684df9e47e1c3faf5f4d1f3e83
2016-02-18 22:04:18 -06:00
that 506fc803bf minuitwrp: fix and hopefully speed up fbdev screen flipping
Fix: use row_bytes instead of xres (should help on Shield tablet)
Speed: Moving the calculations out of the inner loop

Change-Id: Ie43ae5e94ae88822360900c7b4d852b7aab4379b
2016-02-19 04:03:01 +01:00
AdrianDC 2948b6f393 twrp: Add support for TW_SECONDARY_BRIGHTNESS_PATH
* Required for devices like Sony Huashan (dual backlighting paths)

Change-Id: I0f84623431aec91fafee6617c1d4c542e4566caf
2016-02-19 04:01:57 +01:00
Ethan Yonker 07926a3845 Fix OEM compile
Change-Id: I39218f2485a2c2c95f0e400c31356bedc4973f6c
2016-02-19 03:58:06 +01:00
Ethan Yonker fcf3f24856 Fix adopted storage when andsec flag is present
Change-Id: If903d838abc920f952f243482338188c15bb1dbf
2016-02-18 11:38:33 -06:00
Sultan Qasim Khan 7a48a664fd patternpassword: update large grid password scheme
CM13 and up no longer use the two method scheme.

Change-Id: I21154becb5d7e77a54a5a07e649fe64829173a01
2016-02-17 22:45:21 +01:00
Ethan Yonker d3e96ff43e Restore some old decrypt functionality
Some of the convoluted convert_hex_ascii_to_key code is needed to
properly decrypt CM 12.1 patterns where grid size is larger than
3x3.

Change-Id: I497e17980046c60d2c69ba56e4b83c8b64b0b80e
2016-02-17 13:36:54 -06:00
Sultan Qasim Khan a7e63a28c8 cryptfs: major overhaul and cleanup
- Don't upgrade HW encrypted Lollipop devices to Marshmallow crypto
- Fix support for passwords and patterns with an odd number of elements
- Remove unused code
- Fix build warnings

Change-Id: I25f015085e5c859d0353f42f6a2fbc7ccecd48ed
2016-02-16 13:32:22 -05:00
James Christopher Adduono 09f380dbcd Remove inexplicable checks for enabling/disabled UMS support
Removing these lines allows UMS to be enabled for devices with storage lun.
The checks don't seem to make sense as they are referencing always defined strings.

Change-Id: I75df9b7db5a790807fc2b5c946b271b103326b39
2016-02-15 21:47:41 +01:00
Ethan Yonker e5a288c96b Fix up logd make file rules
logd, the init.recovery.logd.rc, and other related files were
included by default if your device configs specified
TARGET_USES_LOGD := true which would be the case for any device
that has a full ROM tree instead of a minimal TWRP tree.

Change-Id: Ia1e55703631f0f22beab2f4d4479599b88539e1a
2016-02-15 09:27:02 -06:00
Ethan Yonker 34741d9cef Fix no exfat-fuse rules
If we set TW_NO_EXFAT then we should not try to build exfat-fuse

Change-Id: I836ed6082cfbfb51bfb862b79c0182f36de88a9c
2016-02-06 13:22:53 -06:00
Ethan Yonker b7e8b98ce6 3.0.0-0
For better or worse, here we go...

Change-Id: Ic1150b59e4ebf34f06c689b2a1b10ae691a027bd
2016-02-05 14:16:43 -06:00
Andreas Blaesius 455a0ede03 twrp: translations: formatting and fix Turkish language file
Change-Id: I3159a2a0c37589f9472aba83b699840356da33a7
2016-02-05 20:55:56 +01:00
Matt Mower b26c1167fc GUI: Set brightness after gr_init()
On at least one device I've tested (htc msm8960), setting the
brightness after gr_init() is necessary for the splash to show.

Note that at this point in the boot process, the settings file has
not yet been read, so tw_brightness has its default value of max
brightness. When settings are finally loaded, the correct brightness
is loaded for the GUI.

Change-Id: Ifc58c1dc80ed9e6f6b2a269a9bb6764038626c84
2016-02-05 12:18:55 -06:00
Matt Mower 1fdcdb7c76 partitions: Avoid duplicate UMS mounts
If a device has several LUN but only one storage volume TWRP
recognizes (e.g. lun0 for microsd and lun1 for emulated cdrom), then
avoid mounting the same partition twice by checking the mount point.

Change-Id: Ie23b88acca1818873792e9f65b73b125a15e4a5d
2016-02-05 18:56:14 +01:00
Matt Mower 209c963575 partitions: Mount storage for MTP after wipe
Conditionally run Add_MTP_Storage() after wipe if:
1) is wiped successfully
2) is storage (already implemented)
3) mount succeeds

Previous to this commit, Add_MTP_Storage() was called before mounting
storage, which fails. Mounting storage right after wipe should not be
a problem since Update_System_Details() does it anyways (and doesn't
complain if already mounted).

Change-Id: I8a5a78d5ac9181f3a9464dfe6b77284458f9868b
2016-02-05 11:47:56 -06:00
Ethan Yonker 6168f0c9c3 More languages, some partial, from Omni crowdin
Change-Id: I05d0e8516686ba2610ea4b437c83323e84eb4595
2016-02-05 11:05:23 -06:00
Ethan Yonker 28c857d24f Add font settings to some language files
Change-Id: I949fe4bd99d2a4471fef3e3967980a6163943e71
2016-02-05 10:51:35 -06:00
Andreas Blaesius 20a01f998f Import approved translations from crowdin
- PS2: generic xml instead android xml
- PS3: formatting

Change-Id: I4c552e172d670278ab2bad1897ceb89b7ee7fec2
2016-02-05 10:44:59 -06:00
Ethan Yonker d3fb4dbe2e Fix spelling error on string name
Change-Id: I06ab906ed94b1aaea35c32494880bf85d7564d4d
2016-02-05 07:10:32 -06:00
Alexander Agura 1008ecf957 gui: imrove Russian translation
Seems that previous translator is overmind
Anyway, thanx him for initial translation

Change-Id: Ia98e344c24671cb60a0765e7c6dcb8aace6428fb
2016-02-04 21:00:53 -06:00
z31s1g 2053fe0bc9 gui: add german translation
also correct typo in all language files
also remove dummy language files for ES and FI

german translation was done on omni crowdin by multiple translators:
https://crowdin.com/project/OmniROM/de#

result was updated in line with latest changes (as of 02032016) to en.xml


Change-Id: Iddd8dbee7e050833a4dc61174288514d408267f7
Signed-off-by: z31s1g <z31s1g@googlemail.com>
2016-02-05 03:58:31 +01:00
Captain Throwback 1f12775707 Add TWRP flags to enable logd and/or logcat in recovery
Developers and device maintainers may find it useful to have access
to logcat in recovery. This patch set adds the following build flags:

TARGET_USES_LOGD - This is an Android build flag that enables logd
support. Devices that don't have built in kernel logging to dev/log/*
will need this flag for logcat. We'll also use this to include the
necessary support files for logd in TWRP.

TWRP_INCLUDE_LOGCAT - This enables logcat support in recovery.

I pulled the init entries from my HTC One M8 GPE boot.img,
so I'm not certain whether these will work for all devices
or if they're all necessary.

Feedback is welcome.

PS2: Use "TARGET_USES_LOGD" instead as this flag already exists, and
previous flag was named incorrectly (logd isn't kernel logging)

PS3: Start logd service on load_persist_props action, needed for 6.0+

PS4: More info on "TARGET_USES_LOGD" flag as related to liblog
compilation can be found at the below links:

https://android.googlesource.com/platform/system/core/+/android-6.0.1_r10/liblog/Android.mk#27
https://android.googlesource.com/platform/system/core/+/android-6.0.1_r10/liblog/Android.mk#50

Whether or not this flag is needed for logcat in TWRP is dependent
on whether liblog was compiled with this flag.

PS5: Update commit message to better describe "TARGET_USES_LOGD" flag

PS6: Another commit message update

Change-Id: Iaac6c6c822dc93fbe4b6eadcf24eef6995dd6b50
2016-02-04 15:09:58 +01:00
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