Commit Graph

1876 Commits

Author SHA1 Message Date
Ethan Yonker eb32b1ff00 Mount system as read-only by default
Mounting system as rw can prevent future OTA updates. The purpose
of this patch set is to prevent TWRP from mounting sytem as rw on
the first boot. Device maintainers should update their twrp.fstab
files on these devices to include an additional line:
/system_image emmc /dev/block/../system

This line will allow TWRP to create a raw system image backup to
ensure that the user can return to an original state for future
OTA updates.

Change-Id: I8929d85bc3a5b96cc564bc7f734b58d5612ec833
2015-05-27 09:22:49 -05:00
Matt Mower f746dbb054 Only include uncrypt if not in system/core
Some android trees have uncrypt in system/core (cm-11.0). This breaks
building recovery since two modules of the same name conflict. Only
include the local copy of uncrypt if it doesn't already exist in
system/core.

Change-Id: Ie2d7cdedf0d4c9ad148c43b317d1f22d1e50e1f7
2015-05-19 21:08:46 +02:00
Tom Marshall 56fe5e71e5 recovery: Add lz4 libs if available
* Required by transparent compresssion in make_ext4fs.

Change-Id: I566c9e1281cc0dd725e96db32da0a1c3c000030e
2015-05-19 21:06:12 +02:00
that 203bcc97f7 partitionmanager: remove broken and unused progress calculation code
img_bps and file_bps were uninitialized (the values are only calculated
at the end of the backup), and occasionally could be 0.

Don't divide by zero, it's bad for the program's health.

Change-Id: I3f6f5a144c24f32508ca25de49491261c7f6e674
2015-05-19 20:54:43 +02:00
that c7572eb87a partition: support texfat module
Change-Id: I21d0498fc16fdb29d09d6e6fe715e57d1f35e72b
2015-05-19 20:50:00 +02:00
codelover 352b75eddb Backup: fix 'out of memory' issue when backing up large partition as image
Restore: improve image restoration speed

* Workaround for devices that need to backup partition as image, eg: dm-verity
* Increased block size used for partition restore, now using 8M instead of 4K

Change-Id: Ie7e7ff3283d71a7e459d76f72caea9f57e71c628
2015-05-19 20:43:53 +02:00
that 4e0e3fcfdb bootloader: align with AOSP code
- Define a minimal Volume structure so that AOSP code for handling /misc
  works in TWRP without major changes.
- Remove set/get_bootloader_message_*_name

Change-Id: Ifcee59568141a184adebb94b8ef8beca072a7942
2015-05-18 21:02:47 +02:00
Matt Mower d411f8da8e GUI: Prevent duplicate page overlays
If a page is requested for overlay, ensure it doesn't already exist in
the stack of existing overlays. If it does, erase the existing page
and push_back the new one.

Change-Id: I9feeea06cf7aad2e08a8c3bc567aaa761db2c3bc
2015-05-18 18:51:49 +02:00
Matt Mower cf94db1d5b TZ: Update default time zone string
The strings were updated in https://gerrit.omnirom.org/12827 but the
default values where accidentally forgotten.

Change-Id: I423f315cd9509fc61f14bfe4c13a28fbc2722315
2015-05-18 15:25:46 +02:00
Dees Troy c657cc0037 Support Qualcomm hardware decrypt
Change-Id: I121ef0f5da209be48f6d87559d539c7fc6d85336
2015-05-15 10:52:46 -05:00
Kra1o5 de50c5f552 Add option to use new heap_id_mask instead of old heap_mask
Use TW_NEW_ION_HEAP := true to use it

Change-Id: I2ad105fa6d122b460ed4b5dc78563077b7904567
2015-04-23 21:49:57 +02:00
that 2252d24c96 twrpTar: fix segfault after encrypted backups
also use unsigned int for core_count instead of unsigned long long.
I'll change it back when 4-billion-core devices are common.

PS2
- cast return value via intptr_t (may be important for 64 bit platforms)
- output errors from TWFunc::Wait_For_Child to console

Change-Id: I04158daa0b64e44d68e179d626a83d81cf5d49f7
2015-04-03 22:33:04 +02:00
that 9eadc51fd5 bootloader: fix crash with empty lines in /cache/recovery/command
original fix from commit 93ffa7579c
copied to our code.

Also fixed a whitespace issue in the same code block.

Change-Id: I6396803659c6880cde4f2b2ef08efab5721c215d
2015-03-27 00:06:51 +01:00
Ethan Yonker 0e9dec8758 2.8.6.0
Change-Id: Ibab69893bee968cfac8e25a4f166acf7cc8b4fc9
2015-03-24 21:56:13 -05:00
Ethan Yonker bc2bc6bb67 Fix reboot for some devices
Change-Id: I06caac2e80bd7eb311778796f974846e9ce844fa
2015-03-25 03:54:12 +01:00
that 202e51b1c2 gui: add DST rules to time zones for USA and Europe
This should fix daylight saving time display for most users.
For fully correct time zones we need the tzdata database.

Change-Id: I7b7693ab0abaf20be217bd06d525f03fb89b7217
2015-03-25 03:45:05 +01:00
Vojtech Bocek 0fdcbec65a Fix TWFunc::Wait_For_Child reporting success when child segfaults
Change-Id: Ic17624b32ca4aea43c72aea0c3d6dec0441ddee4
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
2015-03-20 21:16:03 +01:00
Vojtech Bocek 78ab0c5807 libtar: fix handling of files bigger than 2 GiB
Change-Id: I96dc1b52b2e4edf366e70a927b263a9aab3e85b7
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
2015-03-20 15:34:45 +01:00
Ethan Yonker 7e1b986a31 updater: only include tune2fs support when libtune2fs is available
Change-Id: Iebf965bb7f5352115be4039aa6ca5be5a6a6d219
2015-03-19 14:10:01 -05:00
Ethan Yonker 1c273318c7 Allow multiple overlays
This effectively allows us to support popup dialogs and the like.

Change-Id: Iafb3fa60ed635287cb59dce118f74dc8f2a4e60a
2015-03-19 12:32:39 -05:00
Ethan Yonker 96bc6dddc6 Ingore touch events for 0,0
Change-Id: I63eb29d7a39956d92cb5da81c5cb4405930d43ae
2015-03-19 17:53:12 +01:00
codelover 27b0aee5f1 Fix non-working "Do Not Install" button on "installsu" page.
* Applicable to non-rooted devices running portrait mode only.
* Touching the button has no effect, supposed to reboot/poweroff.

Change-Id: If67649c4c83ddf549c833f94c66829e0877969c5
2015-03-19 17:49:46 +01:00
codelover 2a3d4ce3ca Fix TWRP not mounting /data/media type storage if built with toolbox utils
* ONLY Applicable when building with 'TW_USE_TOOLBOX := true'
* toolbox's 'mount' expects the first argument to be a block device, but /data/media is a dir.
* Technically we don't 'mount' a dir to another, we 'bind' it instead.
* So we define the mount option explicitly with '-o bind'. (supported by busybox 'mount' too)

Change-Id: If97c9096167fb723150b949f4336005b3313a174
2015-03-19 17:43:09 +01:00
Andrea Mennillo 7d66ce57b6 toolbox: Include setenforce into tools.h
setenforce was filtered out of toolbox tools too early. Only filter it
out just before symlinking (and only if busybox provides it).

Change-Id: Id8c77d12b440416bfc21bf52705f2387ffd897cf
2015-03-19 17:17:28 +01:00
Vojtech Bocek 54cf108c84 Fix invalid memory access when rendering a ttf glyph with 'left' < 0
* Fixes for example 'j' in Roboto-Regular

Change-Id: I0cf778c99f391900e164be743165cf8aad891020
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
2015-03-19 16:50:08 +01:00
Vojtech Bocek a482f25345 Fix deadlock in gr_ttf_measureEx if called before the height is cached
Change-Id: I2691e2ee4b272e7425d318b05404360598e2ea92
2015-03-19 16:46:13 +01:00
Vojtech Bocek e8c3927461 Fix GUIPatternPassword when the pattern crosses already visited dots
Change-Id: I59b3f8c5604c036dbc74c020ee21aeeef28132d3
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
2015-03-19 16:41:47 +01:00
Andrew Dodd 89d90e2b9a Merge "Revert "Force sync files written by minzip."" into android-5.1 2015-03-19 16:28:30 +01:00
that d86f49d3f7 gui: keyboard: introduce struct Layout and simplify caps handling
Also minor cleanups:
- move array limits from #defines to a protected enum
- zero fill layouts in ctor

Change-Id: I8fe0f8465ebc646ad3bf3cc3f8490dbdd384f43d
2015-03-15 00:56:57 +01:00
that e79878b7b6 gui: keyboard: add HitTestKey method, minor simplifications
Change-Id: I6cd0251dd9d933e6ebef977a553be7473e2d7034
2015-03-14 23:07:23 +01:00
that 7cec6361a8 gui: fix 1920x1200 keyboard "_", ":", "!" and "?"
"_" was broken due to a bad XML attribute name, and the others
didn't produce the highlighted character in shift mode.

Change-Id: I271fbf4e083ccdb69c469cbdae44101afed4fd1e
2015-03-14 22:52:15 +01:00
that 6db855e1c0 gui: keyboard doesn't need its own action
This was questionable design and is unused anyway.
Also reduced a few redundant #includes.

Change-Id: I65bb01120e6072c5695755920242f6f9d73c816e
2015-03-14 21:31:43 +01:00
Andrew Dodd de72a98328 Revert "Force sync files written by minzip."
This has been causing significant performance degradation when flashing updates
for the entirety of 5.0.

I was originally hesitant to do this since we don't want unsynced files on an update,
however - Our updater-script unmounts /system at the end of installation, which
will force a sync.  As a result the issue Google was trying to fix won't be present
for our ZIPs.

This reverts commit a6c142f2a5.

Change-Id: I89b22e2677c4eda4d3e6338adc0046bf754d43b2
2015-03-13 19:49:29 +01:00
Ethan Yonker f5c2d6ce24 Merge tag 'android-5.1.0_r1' of https://android.googlesource.com/platform/bootable/recovery into aosp
Android 5.1.0 release 1

Conflicts:
	minui/graphics_fbdev.c
	recovery.cpp

Change-Id: Iff8a34fa59d93fb1165e06fef1fafd50292324f0
2015-03-13 13:44:21 -05:00
Vojtech Bocek 7e11ac5d3c Add UI for entering pattern for device decryption
Change-Id: Ia2d3268a96423e9ca3846500c57e674c4f8fa60b
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
2015-03-13 12:12:58 -05:00
Ethan Yonker 30fa335a85 Allow touch to use a key code to sync touch events
This is needed to make touch work on the x86-64 emulator target
though I have seen the key code used on other devices as a way to
synchronize touch events.

Change-Id: I31a3cc56e6470f2c707641b537140e44f5e686aa
2015-03-13 11:37:03 -05:00
Ethan Yonker 4f6a976212 Make TWRP compile for x86-64 CPU target
Also add a short while loop to wait for fb0 to be created as was
needed on the x86-64 target for the Android emulator.

Change-Id: Ib1b87bea028ac3eac0541283334a0157cdfbce11
2015-03-13 17:20:57 +01:00
Matt Mower 989709a514 GUI: Add monospace TTF
Change-Id: I287722719c1f73cc8f7214549f9a890f03d4a586
2015-03-13 03:59:12 +01:00
Ethan Yonker 591b920536 Reduce themes to 5 and rely on scaling
This will significantly reduce theme maintainence and should be a
lot more sustainable over time. Eliminate most themes leaving only
5 remaining in 3 categores:
 * watch_mdpi: 320x320
 * portrait_mdpi: 480x800
 * portrait_hdpi: 1080x1920
 * landscape_mdpi: 800x480
 * landscape_hdpi: 1920x1200

Add handling to map the old DEVICE RESOLUTION to the new TW_THEME
build flag. New devices should specify a theme using the new
TW_THEME build flag using one of the 5 values from the list above.
Long term we will eliminate the use of the DEVICE_RESOLUTION flag
in favor of the new flag.

Change the way sliders render so that they completely follow the
placement="5". This will probably break some custom themes but is
necessary so that we can retain the aspect ratio on slider images
and still have them rendered at the center of the screen.

Add code to the console slideout button so that it can be centered.
Centering the slideout button allows us to keep the button at the
center of the screen when retaining aspect ratios on the image.

Add more retain aspect ratios for home, back, slideout, folder,
file, and lock screen images.

Change the way we build the top bar in TWRP. It is now mostly
drawn using fill objects and the TWRP logo is a separate image so
that we can retain its aspect ratio during scaling. Thanks to Mark
Norelus for providing the TWRP logo.

Change-Id: I801a7b3163cad9ef353461f4c327690a9ccbb3aa
2015-03-12 18:41:34 -05:00
mar-v-in 4142408225 Handle sdk version 22 as lollipop
Change-Id: I87c17715d7acdf6ae15f8a39e3e316715bade6f3
2015-03-11 09:50:45 -05:00
Matt Mower 92084af6e8 toolbox: Cleanup Makefile
* Do not split the makefile in two to support pre-lollipop trees. Go
  through and mark sections with PLATFORM_SDK_VERSION.
* setenforce: Correct the handling to prevent build warnings -- if
  busybox provides this tool, then still allow it to be built, but do
  not write a symlink.
* Correct indentation throughout
* Remove dead code (LOCAL_STATIC_LIBRARIES)

Change-Id: I1b13a0e0be78ea862f7d418d683407ff79d17e4f
2015-03-11 15:46:02 +01:00
Vojtech Bocek 05ec1d470d Mount pstore filesystem while in recovery
* pstore filesystem is evolution of ram_console and contains
  kmsg from previous boot (previously in /proc/last_kmsg).
* Lollipop init.rc does this. If device doesn't have
  pstore fs, it will simply be ignored

Change-Id: Id3bf8763ccde54f87fde5cdf2db511649c376aa4
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
2015-03-11 08:03:45 -05:00
Vojtech Bocek 3041c887f1 Properly disable GGL_TEXTURE_2D after using it in minuitwrp
Change-Id: Ib100ccf3c8f6c622beb40b37ba3f61aad69d7d93
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
2015-03-11 08:01:30 -05:00
Vojtech Bocek db378b6cbb Implement gr_line() and gr_render_circle()
Change-Id: I63c8dcfa276bbeb550ca051a3a1a0646a2d07dc6
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
2015-03-11 07:59:15 -05:00
that b2e8f672f3 gui: support string resources
storing strings in a map (for fast lookup) in resource manager

To define a string resource in <resources>:
<string name="foo">Hello</string>

To use a string, e.g.:
<text>%@foo%</text>

Not yet done: language-specific resources (should be solved not only for
strings, but for all kinds of resources - e.g. for localized images)

Change-Id: I3ba5cf5298c09e0d28a83973e9662f179271b33f
2015-03-11 07:38:37 -05:00
that 0f425069dc gui: allow specifying resource type in element name
e.g. '<image ...>' instead of '<resource type="image" ...>'

Change-Id: I5ce04ae0845351c8a4640d12e36f1aaf32e1ebc9
2015-03-11 07:31:40 -05:00
that 74ac6060cc gui: type safe resources part 2
- separate collections for fonts, images, animations
- no more ugly casts
- fix crash if main ui.xml did not define any resources but include did
- don't stop loading resources if one "type" attribute is missing

Change-Id: I70c1c9ca66ca65d9fba1ba3eded34f3d8a07488e
2015-03-11 07:21:37 -05:00
that 18e13a9063 gui: make scroll bars smaller and transparent
Not all themes tested.

To center the scrollbar horizontally on the line, the width must be
fastscroll_linew + 2 * something.

Change-Id: I3c2878734ffbd2e8ef3bc7c64b2f16d4f61aeda5
2015-03-06 05:18:18 +01:00
that 8d46c09ccf gui: kinetic scrolling for console
- Rebase console on ScrollList
- Add fastscroll bar to console
- ScrollList now has a mode that ignores selections
- Increase kinetic scrolling speed for lists showing many items

Change-Id: I6298d717d2e403f3e85e2c633d53c4284a066012
2015-03-05 04:50:33 +01:00
that 0af7795690 gui: introduce virtual RenderItem method in ScrollList
- so derived lists can draw whatever they want (multi-line etc.)
- replace GetListItem with RenderItem
- minor cleanup

Change-Id: I062e0a354f1c18ce0a5232b7542c4987b480e232
2015-03-05 04:46:10 +01:00