Commit Graph

2560 Commits

Author SHA1 Message Date
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
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