Commit Graph

1898 Commits

Author SHA1 Message Date
Ethan Yonker f2786d37af 2.8.7.0
Change-Id: I712e2d51e412ab5c6167f7c7b29ebf987cd6963c
2015-06-20 16:00:24 -05:00
Matt Mower e9260740ac Cleanup device_id retrieval
* If TW_USE_MODEL_HARDWARE_ID_FOR_DEVICE_ID is defined:
  - provide the header that defines property functions/constants
  - actually look for hardware_id before attempting to append it
* Perform string length checks rigorously.
* Only perform newline removal if string is used before sanitization.
* Copy changes to htcdumlock, but rely on cmdline only.

ps3: fix merge conflict in data.cpp includes

Change-Id: I720d3bc8416758f5f83782e8bc298b32eda1a573
2015-06-20 15:57:56 -05:00
that f256b722f4 [WIP] gui: software drawn keyboard (code only)
Change-Id: I9f05c85f8d43ab012228a78b79220a27876a299d
2015-06-20 22:35:39 +02:00
ramsudharsan f846cac378 Fix mass storage in recovery
The proper order is mass_storage,adb.

Some systems cannot recognize the mass storage otherwise.

Change-Id: I2a79ac6dfd7247032f774125c75586e45fea7633
Signed-off-by: ramsudharsan <ramsudharsanm@gmail.com>
2015-06-18 00:09:15 +02:00
Xuefer bfce504167 fix settingsstorage mark
Change-Id: I60755ca66f048d1484c3d55dc60099679ba987f6
2015-06-17 17:06:41 -05:00
Ethan Yonker 6511c4d178 Allow ORS set command to work with spaces in the value
Change-Id: I1a61ba7ad5479f8aa31a0c9c18bf228cf32104e9
2015-06-17 16:58:16 -05:00
Dees Troy 28a85d232f Make sure that adbd restarts after sideload
Change-Id: I7d82b95cd8749c6f8569739162708705faa6f1f7
2015-06-17 23:40:25 +02:00
jenkins 796991360d framebuffer: s6 edge takes a little lomger to initialize fb0
Change-Id: I48a5b25a227afb8637fcce7e4a1e2fc6bcc56b03
2015-06-17 23:39:37 +02:00
Xuefer a163f15eec add magic property.* value for accessing system property variables
Change-Id: Ic916da6e7ecbf79396febfe1e5f0b0ae8570083f
2015-06-17 16:38:08 -05:00
xiaolu 26ffa869d0 minuitwrp: fix crash when taking a screenshot.
when "gr_mem_surface.format = GGL_PIXEL_FORMAT_RGBA_8888", "gl->recti" will be crash.
this is a simple fix.

Change-Id: I39da7298286f34cdf7eae98f6b082c36695b222e
2015-06-17 23:26:24 +02:00
xiaolu 9416f4f9d6 partition: recreate tw_internal_path(/data/media/0), after wipe media from data or format /data.
Change-Id: I3671d7a5759260a4e74952168483a6816eb28f5d
2015-06-17 23:17:06 +02:00
Ethan Yonker e1abe616f2 Fix ORS scripts displaying an error after completing
Change-Id: I1329705fca870b4e3017607ad7c7875aa00d664b
2015-06-17 23:12:34 +02:00
Ethan Yonker 0e2c657cc8 Fix system read only behavior during boot
Change-Id: I90dbdd06465e2ddaaade86b930beff91991432eb
2015-06-09 21:45:07 +02:00
Xuefer 0eb2aab058 avoid possible dead loop for invalid utf8
Change-Id: Ida48b7ff119030312836aa109072ac4de7c5b9d6
2015-06-04 18:44:34 +02:00
that c7b631b7a2 gui: set tw_file to the currently flashed file name without path
To allow themes to show more of the file name on narrow displays.

Change-Id: I4962eed5e4a01f73a3cde126f2ba56428209fccc
2015-06-01 23:36:57 +02:00
Ethan Yonker 74db84e026 Fix double free crash during encrypted backups
Calling flush_libtar_buffer would inadvertantly set buffer_status
when no buffer is currently allocated. Later when we called
free_libtar_buffer, this would attempt to free the write_buffer
and cause a crash. This patch checks the value of buffer_status in
flush_libtar_buffer to prevent us from freeing the buffer when it
is not necessary.

Change-Id: Ic5b462fe5881be6e9c6fcc355b369bc90477f737
2015-06-01 09:55:04 -05:00
that 5267a21667 gui: move retainaspect handling to the resource ctors
LoadResources should only decide on the resource type,
everything else is handled by the resources themselves.

Change-Id: I30f68293960c23560979f650efc4393992cf5824
2015-06-01 03:03:28 +02:00
Agontuk a29361a8e6 Don't try to read temparature file if TW_NO_CPU_TEMP is set to true.
Otherwise, recovery log gets filled up with
"I:Cannot find file /sys/class/thermal/thermal_zone0/temp"

This also fixes build warnings due to duplicate definition of TW_NO_CPU_TEMP.

Change-Id: Ib7fdcd103d6684249c38c8b14ec85f2faba158f6
2015-06-01 02:56:19 +02:00
Ethan Yonker d6966f4426 Fix unable to uncheck the mount read only check box
Change-Id: I1bbc25df6f35f79549f1eb06feb4db9ec0475aa5
2015-05-30 14:52:21 -05:00
Xuefer 46bdc96815 remove useless memset and \n
fgets reads up to one byte less than size then with \0 at the end
adding \n after \0 is useless too

Change-Id: I7758d7a8f885bdde2b491a9cb75800f831d77c1f
2015-05-29 17:56:19 +02:00
ramsudharsan 8335324d2a minuitwrp: remove unused variable
Change-Id: I0beb3b349efd4f08491c92bb51c12caf3653cb73
Signed-off-by: ramsudharsan <ramsudharsanm@gmail.com>
2015-05-29 17:32:02 +02:00
Ethan Yonker a2719156c2 Add resize2fs and ability to run resize2fs via GUI
Note: Only works on ext2/3/4 partitions. Only tested on ext4.

We can use this in some cases to resize the data partition if an
incorrect fstab caused recovery to not reserve the 16KB for a
crypto footer.

Sometimes the BoardConfig for a custom ROM does not have the
correct size for the system partition and if the ROM flashes a
raw system image, that image will not take up the full block
device. Running resize2fs can fix the size and may allow more
room in the system partition for customizations like busybox or
a larger gapps package.

Sometimes flashing a factory image may flash userdata with an
image with a file system that does not take up the full size of
the block device (e.g. factory images for the Nexus 6 will flash
userdata with a ~24GB userdata image, wasting ~30GB of space).
Using resize2fs we can easily fix this issue without having to do
a full format data.

Change-Id: I631f5c6f567bbc6a9241e5dd95f1e435820a1b13
2015-05-28 09:47:25 -05:00
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