| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* /persist can be mounted early while TWRP is parsing the fstab so
as soon as the partition is parsed, mount and adjust the time
accordingly.
* Store a backup settings file on /persist. Having a 2nd copy of
the settings file in the /persist partition allows for early
reading of the file and adjust timezone and brightness to user
preference while still on TWRP splash.
* Add the qcom ats time offset in TWRP settings file and use it
if no better ats file is found. This will also allow devices
with a persist partition, but no ats files in it, to adjust
the time offset during early boot.
* Use /persist/time/ as Qualcomm time fix source, based on
Xuefer <xuefer@gmail.com> patch:
https://gerrit.omnirom.org/c/27265/
https://gerrit.omnirom.org/c/24384/
Change-Id: I6c21538eec58d87edfb639d9ce3871f33b886c1d
|
|
|
|
|
|
|
|
|
|
|
|
| |
Includes various minor fixes for building in Android 8 trees with r23+ tag
Update FBE extended header in libtar to version 2 and include the entire
ext4_encryption_policy structure now after translating the policy.
See this post for more details:
https://plus.google.com/u/1/+DeesTroy/posts/i33ygUi7tiu
Change-Id: I2af981e51f459b17fcd895fb8c2d3f6c8200e24b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Auto detect and support both the v1 and v2 fstab formats
Support putting TWRP style flags in a separate /etc/twrp.flags file
twrp.flags format is the same as twrp.fstab (v1 with TWRP flags)
Support using a wildcard in a block device and find all partitions:
/usb-otg vfat /dev/block/sda*
Support using sysfs entries (voldmanaged) and read uevents and scan for
wildcard partitions from uevent data. (twvold?)
May not be complete for some of the newer flags found in fstabs in newer
build trees and there is a slim chance of a crash if the user removes a
removable device while TWRP is performing actions. May need to add some
kind of mutex to prevent the 2 threads from causing this crash. We need
to start somewhere though and this change is pretty innocuous when not
using a v2 fstab.
Change-Id: I617d97c7db332cbe671a9d2b8ad98b3d9c4f03cc
|
|
|
|
|
|
|
|
|
| |
Restore adb backup files that TWRP made to your PC.
Put files in your backup directory to see them.
e.g. /sdcard/TWRP/BACKUPS/<sn>
Change-Id: I2c57970d77b64c39a302159041456e761c185259
|
|
|
|
| |
Change-Id: I29fe722b4eb9718765327902779046840a01433e
|
|
|
|
| |
Change-Id: I430f6bb21a5fd87e0422420463e8bb96c4a612e1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch is to refactor twrpDigest using polymorphism
and inheritance to use the same call patterns for creating and
reading a digest. Now a library.
Use SHA2 from libcrypto. SHA2 is default if device has libcrypto.
Change string MD5 everywhere to use digest or Digest instead. Updated
string tags to digest. Translation will be required.
Switch out digest code into a driver class from partitionmanager.
SHA2 is better for digest creation due to decreased collision space
compared to MD5 and SHA1.
See https://en.wikipedia.org/wiki/SHA-2
Change-Id: I74b5546789990b12aa4ce2e389d25f80a3fe213f
|
|
|
|
| |
Change-Id: I545a32848ee686ecfacd13604ae3f18f5d206dfc
|
|
|
|
|
|
|
|
|
|
|
| |
Set Backup_FileName on adb backup to fix restore.
Set read_from_adb after EOF to return properly
from newer adb client prompt.
Create setter and getter for Backup_FileName
for openrecoveryscript.cpp which is not a
friend class.
Fix condition for twrpTar::Get_Size() and adb backup.
Change-Id: I7eb8168fa3416366b996e220cecbc0e1bcec5e8e
|
|
|
|
|
|
|
|
|
|
| |
* It is not necessary to Remove_MTP_Storage() for a partition if an
MTP_Storage_ID has not been assigned.
* The hack to force-set tw_mtp_enabled=1 should no longer be necessary
now that we're checking whether MTP really needs to be disabled for
a volume before running Disable_MTP().
Change-Id: I1b7233eedd9da7c6be0c67fc60243f3837105173
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-Change backup display name to say that we are excluding storage
-Add warning message during backup of any partition with data media
-Also eliminate unused variable from twrpTar class
Maybe this will make the people in issue 276 happy, but probably not because
they already lost their data, or because the warning text is yellow instead of
red.
https://github.com/TeamWin/Team-Win-Recovery-Project/issues/276
Change-Id: I98303fe7f6b7a25fea029637c90145258d41ee46
|
|
|
|
| |
Change-Id: I7154a022833a5e092facd7c5df776719b9fcc929
|
|
|
|
| |
Change-Id: I7410a0c8e439eec90a955ee9201efd9a92bb9635
|
|
|
|
| |
Change-Id: I2b961a75f500c657ff7a82698957060f85e95ab8
|
|
|
|
| |
Change-Id: I2397d0bd221dcf5c9d0f971ba157519bcf014a70
|
|
|
|
| |
Change-Id: Ie0b97da2cce7bb93307ed49b1138bc2f36df34d0
|
|
|
|
| |
Change-Id: I93c65973679894bb8587da4b38b410d38036b8bd
|
|
|
|
|
|
|
|
| |
- Set the correct owner on binary backup files to flash storage.
Solve https://github.com/TeamWin/Team-Win-Recovery-Project/issues/749
Change-Id: I5526494c77232f524cf02a482de070b44248c4a0
|
|
|
|
| |
Change-Id: Iba8ef20f57b0fb57bb9406c53148a806441d0b59
|
|
|
|
| |
Change-Id: Ib688ddd0c32d3999590cacd86b6d9b18eac336e9
|
|
|
|
| |
Change-Id: I7eaf80e327985f53791f90fbdebad022a9650d31
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename twrpDU.* to exclude.*
Remove global variable for du and replace with partition specific
variables.
Use separate exclusion lists for backups and wiping.
Clean up some includes
Fix some parenthesis in twrp.cpp that I messed up.
Note: twrpTarMain command line utility compiles but probably does
not work correctly yet due to not properly setting part_settings
Change-Id: Idec9c3e6a8782ba53f3420fa79ba33394f4f85fb
|
|
|
|
|
|
|
|
| |
7.0 trees tend to create a /vendor symlink in the root of the
ramdisk. TWRP needs to delete the symlink and mkdir to be able to
mount the partition properly.
Change-Id: Ia338739e07ca16ccd2492ea1fec2f5e99cfc08eb
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We can use switches and enums to make things more understandable
and work with results in a more sensible manner.
PS2: Move file MD5 verification and error handling into
a separate function to reduce code.
PS3: Default to false in Check_Restore_File_MD5 function
Change-Id: Id3ee0bb444cf13be67bb5dec2c43f7c26a86b954
(cherry picked from commit 5c3950716e5c7c6279efd5f3f338d6d22e5215e2)
|
|
|
|
|
|
|
|
|
|
| |
PS2: full_filename is not a dir
PS3: use a consistent format of always assuming directory
is missing the trailing / + fix whitespace alignment
Change-Id: Ib963473ae10571b3d069b326d024ca04c7224dda
(cherry picked from commit fa4ff144374474c541351d153549ad11d4396614)
|
|
|
|
|
|
|
|
|
|
|
|
| |
The PartitionSettings struct contains some data elements that are duplicates
of data elements in the TWPartition class that is contained within the
PartitionsSettings.Part element. We will eliminate this duplication to help
reduce the chances for programming bugs.
Specifically, this fixes problems where the current file system does not
match the backed up file system.
Change-Id: I02f236e72093362050556a2e53a09d1dbb9a269d
|
|
|
|
|
|
|
| |
This patchset will fix issues with creating and checking
md5 checksums with single partitions and subpartitions.
Change-Id: Iddfaf46412e95635af958094726cf9e3eb5a4cc8
|
|
|
|
|
|
|
|
|
|
|
| |
this is to prevent a race condition to occur when mounting an adopted
storage volume just after it was decrypted. After setting up the
decrypted volume using cryptfs_setup_ext_volume(), Decrypt_Adopted()
immediately calls Mount(), which will call Check_FS_Type(), which will
fail in blkid_new_probe_from_filename, as the device node was not
created yet.
Change-Id: Ic5a274c2066ab278c9b7f1c8b83b820e552ca344
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Functionality for client side to backup
tar and image streams over adbd to the client under backup.ab.
Using adb backup on the client side you can backup the partitions
TWRP knows about.
On the client side you can do the following:
adb backup -f <filename> --twrp <options> where options are
--compress: compress data
system: backup system
cache: backup cache
data: backup data
boot: backup boot
etc for each partition.
You can string multiple options,
i.e. adb backup -f <filename> --twrp --compress cache system data
adb backup in TWRP will take any option corresponding
to TWRP fstab partitions, e.g. efs boot as well.
If you do not specify the filename with the -f option,
adb will backup your data to a filename backup.ab on the client.
You can then rename the file and encrypt it with desktop tools.
If you don't want to use command line arguments:
adb backup --twrp
will bring up the gui and allow you to choose partitions
from the backup page.
To restore the backup use the following convention:
adb restore <filename>
Structures are used to store metadata in binary inside
of the file itself. If the metadata structure is modified,
update the adb version so that it will invalidate older
backups and not cause issues on restore. When restoring,
we currently do not support picking specific partitions.
It's all or nothing.
Change-Id: Idb92c37fc9801dc8d89ed2a4570e9d12e76facf8
|
|
|
|
|
|
|
|
| |
The necessity to process fstab twice stems from mounting partitions
while still processing. Instead, wait to finish setup of /data, /cache
and storage parameters until after fstab has been processed (once).
Change-Id: Id77e1edbab5eb68a7cd4a1f34953d819a043d47a
|
|
|
|
|
|
|
|
| |
There a few char->string conversions between functions which handle
different parts of fstab line processing, but there are no uses of
string functions. Pass char arrays/pointers around instead.
Change-Id: I976a9a54ee8dcfb6194cadcac6a34e467602003b
|
|
|
|
|
|
|
|
|
|
| |
* If 'ro' fsflag detected, set Mount_Read_Only = true
* Only output human readable Mount_Options to log
* Match fsflags identically (not just first n chars) since there are
no fs_flags which take arguments
* Match new processing method introduced in TW fstab flag processing
Change-Id: Iefdb76016be90a131b0d627d0cd3f18d2eb1a008
|
|
|
|
|
|
|
|
|
|
| |
* Do not flip/flop between std::string and char* when no std::string
specific functions are applied.
* Remove the need to manually count flag string lengths
* Move checks for Display_Name, Storage_Name, and Backup_Display_Name
out of flag processing
Change-Id: I24d432c222124012b2a98d27598e42d0944f7da2
|
|
|
|
|
|
|
|
| |
fix parsing when using storagename=, backupname= and userdataencryptbackup= in twrp.fstab
also split encryptable= and forceencrypt= into seperate blocks
and make storage=Y working
Change-Id: I674f7ffe7f9e4ff121c4dccf79096360e044535c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The progress bar will now be updated during image backups, restores
and during image flashing (except for sparse images which will require
significant changes to libsparse, and except for mtd nand using
flash_utils).
The progress bar will now be updated mid-file for file systems (tar) so
the user will see changes even during large file backup / restore.
Add a new progress tracking class to simplify handling of progress bar
updates. The class will only update the progress bar 5 times a second to
reduce the CPU load from updating the GUI frequently which does affect
backup times.
Change-Id: Iff382faef3df1f86604af336c1a8ce8993cd12c5
|
|
|
|
|
|
|
| |
The goal of this change is to make DataManager use InfoManager to reduce
code duplication.
Change-Id: Ia4f4c4324453a192995e0f442db0a03628c13e46
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change-Id: If903d838abc920f952f243482338188c15bb1dbf
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change-Id: I5b4c3b90d579573536e9de2df5127160cdc9a10f
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-Improve code for partitioning sdcards
-Allow user to select a device for partitioning (must be removable)
-Use sgdisk to partition sdcards
-Set default sizes for ext and swap to 0
-Change increments for ext to 256MB and swap to 64MB
Note: sgdisk is included in 6.0. I have included a static prebuilt
sgdisk for trees that do not have sgdisk, however the prebuilt
sgdisk is a decent bit larger than the old parted binary. The old
parted binary is quite old at this point and we only have it for
armv7a. sgdisk should be maintained by AOSP and can be built from
source so it should work across architectures.
Change-Id: Ib80882d9b5776e5e9358b11340fba392e6f1ae09
|
|
|
|
|
|
|
| |
The message was named something non-existent. Fix the spelling error
and add the default message into the language files.
Change-Id: I4e9e10d2705b1edf75b185d3badba59eb86ffb8b
|
|
|
|
| |
Change-Id: I6df4937658815350366ed3dd2cf92156f98c96c4
|
|
|
|
|
|
|
|
|
|
|
| |
CM-13 tree completely changes the names of the binaries that are created
for ntfs-3g. If we are using a CM-13 tree (CM SDK 4) make sure the
dependencies and relinking are adjusted accordingly.
Also, adapt partition code so it can make use of whichever set of
binaries are present.
Change-Id: I810caafa818f18281fd29dcf8f31b3053133b5ed
|
|
|
|
|
|
|
|
|
|
| |
AMLogic based device uses paths like /dev/block/recovery and the
stock init binary either deletes or does not create mmcblk0p12
which breaks TWRP because TWRP cannot match up the path / name.
The ioctl method is probably more reliable anyway and certainly
should be faster.
Change-Id: I73f981dcec637cdf5b189bdefa00ea15b924b500
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is similar to https://gerrit.omnirom.org/#/c/14014
A lot of the features built in the older patch set have been split
out into separate patches, most of which have already been merged.
The remaining functionality here should all be directly related to
language selection and loading. We always load English as a base
before loading other languages over the top of the base. The idea
is that if another language is missing a translation, then we will
still display the English.
Maybe still to do: read the /cache/recovery/last_locale file and
load a language based on that. For me, this file contains just:
en_US
We probably won't bother with region specific translations so we
would have to look at either trimming off the _US or using some
other method like perhaps a symlink or a combination of the two.
Thanks to _that for twmsg.cpp class
Change-Id: I9647a22e47883a3ddd2de1da51f64aab7c328f74
|
|
|
|
|
|
|
|
|
| |
Process_FS_Flags Flags parameter is just a copy not a reference,
not get updated, Mount_Flags always 0 - fix it now.
Thanks to SHM @ XDA-Developers
Change-Id: Ib044db905febfedefee493cfc04fd1cad6f61f8e
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Version 3.0.28
* Update filenames in source
* Remove unnecessary symlink to fsck
* Commit "Recode short filenames from DOS codepage (default 437)." has
been reverted since we do not have access to iconv
* Commits cherry-picked on top of 3.0.28:
- mkfs.fat: fix incorrect int type
- Prevent out of bound array read in date_dos2unix()
Change-Id: I50310235c62ec2e6bc90afcd10f2814d3afb5113
|
|
|
|
| |
Change-Id: Ifb6c186e43e1eb068e8075def16924ced04bb23d
|
|
|
|
|
|
|
| |
The vendor partition is verity checked just like system so we
should treat vendor as read only same as system.
Change-Id: Ida65c9f44d8610e52fcdcef0b4a50faf5c7110d2
|
|
|
|
|
|
| |
Mostly adding __unused where needed.
Change-Id: Ia4f675b9b360782728c361ed1699db0cc277c3a5
|
|
|
|
| |
Change-Id: I032fabb383b4063e3b31b6044ce39966b8c617d0
|
|
|
|
|
|
|
| |
Add support for mounting ntfs via ntfs-3g and support for wiping
and repairing ntfs partitions.
Change-Id: I82dc4626f459bb93b86eb9ebba64ad3a6560781b
|
|
|
|
| |
Change-Id: I60755ca66f048d1484c3d55dc60099679ba987f6
|
|
|
|
| |
Change-Id: I3671d7a5759260a4e74952168483a6816eb28f5d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change-Id: I21d0498fc16fdb29d09d6e6fe715e57d1f35e72b
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change-Id: I121ef0f5da209be48f6d87559d539c7fc6d85336
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
| |
Change-Id: Ia2d3268a96423e9ca3846500c57e674c4f8fa60b
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
|
|
|
|
| |
Change-Id: I6e063fba8d58c8c53da6bca6292c84e3392aee50
|
|
|
|
|
|
|
|
| |
We will convert a -16384 to 16384 if needed because mkfs.f2fs
does not like negative numbers like make_ext4fs does. Also enable
trim by default on f2fs.
Change-Id: I8b41e65d1ff894433665c65d0569a51803c67891
|
|
|
|
|
|
|
|
|
|
|
| |
This will stop the iteration of the partition objects, kill the
current twrpTar thread and remove the backup directory.
Implement TWAtomicInt class to give us a wrapper that automatically
uses mutexes before the read and write to help ensure that the
reads and writes will be atomic based on documentation.
Change-Id: I645b22bc980a292e9c7202acb24ffd22ebe68c63
|
|
|
|
| |
Change-Id: I843ddf7a5bca3ca7670dd6f19644b37cf017e5b1
|
|
|
|
|
|
|
|
|
|
|
| |
- Use the Images... button in the lower right of the zip install
page
- Unify image flashing functions between restore and image flash
- boot and recovery partitions are flashable by default
- use fstab flag flashimg=1 or 0 to override defaults
- file system partitions are currently not flashable
Change-Id: I822dc446030543c55d2153e219d67a1292374ffc
|
|
|
|
|
|
|
|
| |
Break libblkid into 4 libraries: libblkid, libuuid, libutil-linux and libfdisk.
This should help in later patch updates.
Change-Id: I680d9a7feb031e5c29a603e9c58aff4b65826262
|
|
|
|
| |
Change-Id: Iac7852a4fb2add5744d5ea424d6ad5a82828f102
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- avoid parsing permission strings
- fix memory leaks, a fix new/free mismatch and a compiler warning
- fix that only first updated-package was processed
- fix a potential stack overflow if packages.xml is huge
- minor refactoring for reducing duplicated code
- don't process packages without codePath
- fix path for deleting app data (currently unused anyway)
- fix file ownership on libs
- try not to mess up Android 5.0 app permissions
Patch set 4
- make fixing SELinux contexts an option with a check box
- add some notes / text to the themes
Patch set 6
- decouple "fix permissions" from "fix contexts"
Change-Id: Icc77ecc581befc5ce6e419b1f3b8ca189208c234
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With 5.0 L, we decrypt automatically if the default_password is
used. Non datamedia devices do not get the format data button so
they cannot wipe encryption off the device. This patch add a wipe
encryption button where the format data button would normally be
located on the Wipe page.
This patch also attempts to remove / delete the dm-crypt block
device before formatting.
Change-Id: I100d5d154d6c49254fd48e23279df973db5f23ae
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement a pipe between TWRP and MTP to allow TWRP to tell MTP
to remove storage partitions as they become unavailable (e.g.
during a wipe, unmount, etc) instead of disabling MTP completely.
This includes some fixes and improvements in destructors to
properly remove / delete various items. This also means that we
will not be toggling adb off and on quite as often.
I do not like that we had to add another thread, but we were
unable to use select() on the mtp_usb character device because
this device does not support polling. Select always returned
indicating that the mtp file descriptor was ready to be read and
the resulting read would block. The read block prevented us from
being able to include reading of the pipe between TWRP and MTP in
the main MTP thread.
We might want to add a return pipe letting TWRP know if the
removal of the storage device was successful, but I am not sure
how we want to implement this. It would invovle timeouts in both
TWRP and MTP to ensure that we returned a failure indicator in a
timely manner to TWRP and prevent deleting the storage device in
the case of a failure. Right now we make no attempt to ensure that
an MTP operation is underway like a large file transfer, but we
were not doing anything like this in the past. In some respects we
have limited control over what happens. If the user installs a
zip that unmounts a storage partition, we will not know about the
change in storage status anyway. Regular Android does not have
these troubles because partitions rarely get unmounted like in
recovery. At some point, we have to hold the user accountable for
performing actions that may remove a storage partition while they
are using MTP anyway.
Ideally we do not want to toggle the USB IDs and thus toggle adb
off and on during early boot, but I am not sure what the best way
to handle that at this time.
Change-Id: I9343e5396bf6023d3b994de1bf01ed91d129bc14
|
|
|
|
|
|
|
|
|
|
| |
Files and folders that we create during backups, copy log, or MTP
operations often do not have the proper uid/gid/contexts assigned.
We will attempt to read the proper contexts from the settings
storage path and assign those same contexts to any files or dirs
that we create.
Change-Id: I769f9479854122b49b499de2175e6e2d026f8afd
|
|
|
|
|
|
|
|
|
| |
This is mostly kang from AOSP resources.c for loading png files
into RAM, but for ease of compatibility we retained the older
gr_surface data types throughout and ensured that we retain
support for alpha blended png files.
Change-Id: Ieea552173d3bfe885460407be73088bbad75663f
|
|
|
|
| |
Change-Id: If8114b5eac741db6c512fb35cb48e3825c2ff098
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Trim cryptfs.c to remove functions that TWRP does not use for
decrypt and remove the need for libfs_mgr from cryptfs.c by
passing some items to cryptfs.c from the partition manager.
Add support for new fstab flags:
encryptable and forceencrypt=/path/to/cryptokey
For example:
flags=forceencrypt=/dev/block/platform/sdhci-tegra.3/by-name/MD1
Note that "footer" is the default, so you do not need to set this
flag on devices that use the footer for the crypto key.
Also add mounttodecrypt if you need to mount a partition during
the decrypt cycle for firmware of proprietary libs.
Clean up decrypt and only support one version
Android 5.0 lollipop decrypt should be backwards compatible with
older versions so we will only support one version, 1.3 that came
with 5.0 lollipop.
Remove support for Samsung TouchWiz decrypt. It does not work with
the latest versions of Samsung encryption anyway and it has not
been updated to work with any AOSP decryption higher than 1.1
Change-Id: I2d9c6e31df50268c91ee642c2fa090f901d9d5c9
|
|
|
|
|
|
|
|
|
| |
Mount the vendor partition if it exists so we can use any
proprietary files we may need.
Relocate auto decrypt when default_password is in use to after all
partitions are added so that we can mount the vendor partition.
Change-Id: I93455a35695779f53ef57a82d3d45c7216c13639
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Kang in cryptfs.c and cryptfs.h from vold.
Use TW_INCLUDE_L_CRYPTO := true to enable.
Ramdisk must contain the normal fstab file in the root in the
usual format of:
fstab.{ro.hardware}
For examble for Nexus 5:
fstab.hammerhead
Or on many Qualcomm devices:
fstab.qcom
Tested against Android 5.0 lollipop on Nexus 7 2012 grouper. Not
sure if or how this will work when we are dealing with a device
with a hardware keystore. Long term we need to add a GUI element
to allow entering a pattern. For now you can decrypt a pattern
unlock by converting the dots to numbers in the following format:
123
456
789
So an upper-case L would translate to 14789 as a password entered
on the keyboard.
Change-Id: I02c29e1f1c2eb29bf002c9fe0fc118357300b5b3
|
|
|
|
| |
Change-Id: I23c490e6228b0fcf656c76ac314c69508ba2329d
|
|
|
|
|
|
|
|
| |
We should not need to set or change the contexts of the media
folder when doing a factory reset. We should only do this when
we need to recreate the media folder.
Change-Id: I9f9918743d687b0aa0eb1e50747677f883037047
|
|
|
|
|
|
|
|
| |
Especially with /sd-ext, trying to wipe when the device is not
present causes a seg fault in the make_ext4fs function. Check to
make sure that the block device is present before trying to wipe.
Change-Id: I91973b5b832c9edbce81d61a271e84363c19e6c5
|
|
|
|
|
|
|
|
|
|
|
| |
- use std::map instead of linked list
- read directories on demand
- fix writing zip files to storage root
- fix creating directories
- lots of minor fixes
- simplify generation of storage IDs and make them spec compliant
Change-Id: I2137c27549ddbdc58466f2e3aeda464fac70a3c5
|
|
|
|
|
|
| |
thanks @bigbiff for the suggestion
Change-Id: Ie9b55537b7fa300461b015d2b9523d4250e755a9
|
|
|
|
| |
Change-Id: Ia3007fbced9ce3bc94efdb3dacc582a5e68a49a4
|
|
|
|
|
|
| |
Big thanks to Dees_Troy for helping with the implementation.
Change-Id: I6c9c522b9c9de5dc139e2ecb0141008182ba07f0
|
|
|
|
|
|
|
|
| |
Track backup and restore progress based on the sizes of the files
as they are being added to the tar backup file. Update the
progress bar based on the sizes of the files.
Change-Id: Idf649efa1db3e91830b4b2add86203a3f30042ff
|
|
|
|
| |
Change-Id: I600e7e9ce89621400531bceb472387aafc0d6ed8
|
|
|
|
|
|
| |
This is by no means comprehensive, but is quite a bit better already.
Change-Id: Ibc8654a5dfb0eec39cbd0b64bdb52bb4fbfe2f7e
|
|
|
|
| |
Change-Id: I9043e98e1e1ed4722f05c13a60b43d2d0bf739f6
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some devices (jewel, m8) have .android_secure at a non-standard
location. Allow a different partition to be specified as the home of
.android_secure using the fstab flag 'andsec'.
Using the /data/media variant of jewel as an example, recovery.fstab or
twrp.fstab could be edited like follows:
/external_sd vfat /dev/block/mmcblk1p1 flags=display="MicroSD";andsec
Note, this is NOT a method to move .android_secure in your ROM. Your ROM
must already write to this alternative location.
Change-Id: I3a6e4e63aaddb35870b79e80938b0f9c2c902443
|
|
|
|
|
|
|
|
| |
Disable theming
Disable creating the TWRP folder for the settings file
Change factory reset on data/media devices to a full wipe
Change-Id: I3104282b5dd3f55dfff7c8cf39c72750af08563d
|
|
|
|
|
|
| |
recovery.log
Change-Id: I19e3df2e977e09e222733f13324051334982b05d
|
|
|
|
|
|
|
|
|
| |
twrpDU::check_skip_dirs() handles skipped folders now. Everywhere
twrpTar::setexcl() is being used to exclude files eventually calls
createTarFork(), which in turn calls Generate_TarList(), which checks
check_skip_dirs().
Change-Id: Ibbc4eb2eb89863ccb2a15f5a3b5092fb10fcbcc0
|
|
|
|
|
|
|
|
| |
/data/*/media directories are mistakenly being excluded from the size
calculation. Change to absolute dir exclude so that only /data/media is
excluded.
Change-Id: I6e97604d44e6ea2bdf7dfd8c68a2f90ba6d44415
|
|
|
|
| |
Change-Id: I6de4c5db3e3183229d7029fc72b957c7ef61f23a
|
|
|
|
| |
Change-Id: I9e2b8e9b69c94b94c57143c04b950530490ec33e
|
|
|
|
|
|
|
|
|
| |
Verify that we have a valid footer with proper magic before
setting things up for decryption to help prevent user confusion
when dealing with data partitions that fail to mount. Also check
to make sure that the block device for /data is present.
Change-Id: Ie87818fe4505a8bf71df7d3934c114e7328ef3ca
|
|
|
|
| |
Change-Id: I5c7d104689ed2b578b463a6be55b3688dcc4c01a
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I943318afe787ff4ede724fa0bc77ebc6a3ba0c8b
|
|/
|
|
| |
Change-Id: I900f42892d47f54b573cc1dbfb551ed2a8f9e8b9
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Example: f2fs on Moto G needs fsflags="inline_xattr" in the stock
ROM but the Google Edition uses ext4 which fails to mount with that
option.
Change-Id: I01bce214e7f15e43e66ac35729fd3521609ffad3
|
|/
|
|
|
|
| |
Do a restore of loaded file contexts to /data/media directory. This will help denials to be prevented when internal storage is wiped.
Change-Id: Ie49bbfa48d2f3ee4f08376d9c1877b92c051017c
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I9e1c7f4a8353b7be51e1a54bf5d506c9dce70da2
|
|/
|
|
| |
Change-Id: I9effd57c2b4d28c3bd9ca1045a0bb0ac8c958245
|
|
|
|
|
|
|
|
| |
Eliminate the use of tarDirs and Generate_MultipleArcives in
favor of Generate_TarList so that we have one method for backup
creation instead of three.
Change-Id: I267937b6e40b32d43fbac8b4cca82f7468d4f94c
|
|
|
|
| |
Change-Id: Ib62af6ad8596aa18bf48cb750e2ecf442dadc627
|
|
|
|
| |
Change-Id: I46b94d55fc649a2abf27569ccf99aabb2822d663
|
|
|
|
| |
Change-Id: I11a7e441f7fe4e556a5349822150493de90095f1
|
|
|
|
|
|
| |
Moved Get_Folder_Size to this new class.
Change-Id: If0a0220f900eb109581f2eeaf7b76e3f7d6886f1
|
|
|
|
|
|
|
|
|
| |
example userdata line (as needed by MotoX):
/data f2fs /dev/block/platform/msm_sdcc.1/by-name/userdata flags=fsflags="inline_xattr"
Code for parsing flags/options originally based on AOSP fs_mgr sources.
Change-Id: I5fb2b5d5cdd08137e6bf71f0085a3f8aebd889a8
|
| |
|
| |
|
|
|
|
|
|
| |
recreate lost+found with selinux contexts
Change-Id: I19e8696d47319dfb641520956c8a27c2a796a0c3
|
|
|
|
|
|
| |
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
Change-Id: Id8acff1ac9b3c7e4b562c80562a8ff42a1d132b9
|
| |
|
|
|
|
| |
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
|
|
|
|
| |
Change-Id: I58f4a8cedf31e6b6efd88f96a43ed525603ae311
|
| |
|
|
|
|
|
|
|
| |
Need to add this to your source tree:
https://github.com/razrqcom-dev-team/android_external_f2fs-tools
Change-Id: I3ee9ebbb617259655518f8ea356ce7b8c246cd4d
|
|
|
|
|
|
| |
skip google music cache
Change-Id: I75d6fd0e17140d12cb2c6d335e8ff73a6f871aa2
|
|
|
|
| |
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
|
|
|
|
| |
Change-Id: I11e1a3d018d921d96ba08915925b14bf633be6ed
|
| |
|
|
|
|
| |
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
|
|
|
|
|
|
|
| |
Pulled part of change from kokotas in this patch set:
http://review.teamw.in/#/c/586/
Change-Id: If1c5b1563df16f9c561c94f61010f6a99f36efa0
|
|
|
|
| |
Change-Id: Ie7d5878faf86b8fa824b72211be7fd3596b471d7
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also includes features merged from:
Update twrpTar by kokotas
Revised function entryExists().
Added function to get archive's uncompressed size.
Added option to exclude item(s) from the archive.
Revised forks()
http://review.teamw.in/#/c/590/
Change-Id: I01fa2c81643161984eff2625247af75990684bd9
|
| |
|
| |
|
|
|
|
|
|
| |
Improves license compatibility between GPL and Apache
Change-Id: I2b165aa575bb6213af6b07936f99610c113443f0
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add partition list GUI element and update backup, restore, mount,
storage selection, and wipe sections of GUI and partition manager
code to reflect the new GUI element. Update ORS engine to handle
new backup and restore setup.
Fix a bug with decrypt.
Add 1080x1920 layout.
Change-Id: Iaa2f44cb707167e66f935452f076ba00e68a2aa4
|
|
|
|
| |
Change-Id: I4ec037f76aa965bc818afe924942adbe9a080b36
|
|
|
|
|
|
| |
create a framework for computing digests and reading digests in TWRP
add space for backwards compatibility with bb md5sum
Change-Id: Ia18e3f430eed5eba22e5052d39b9b8d88ecd4536
|
|
|
|
| |
we can now use libblkid to detect exfat
|
|
|
|
|
|
|
|
| |
taken from https://github.com/mrjavum/Team-Win-Recovery-Project/commit/140ff0cde8ad2236caf7bcd480d257d74d8b85bc
"sorocean.gor@gmail.com"
Change-Id: I1a97160c73c7a0bab0535e938d6b35dc09585037
|
|
|
|
|
|
| |
Conflicts:
twrpTar.cpp
|
|
|
|
|
|
|
| |
update fuse to 2.9.2
catch return from unlink so that we don't print error messages when things work
Change-Id: I1115039a0fa5d9d73f78ef1abd79755d7ffd9d96
|
|
|
|
|
|
|
| |
Fix issues with MD5 checking using chdir and leaving the working
dir in a subfolder that prevented unmounting sometimes.
Change-Id: I01a563d722f474297ed3f7a30064c3a61748ade3
|
|
|
|
|
|
|
|
|
| |
Move Exec_Cmd to libcrecovery __popen
Provide opt out build flag for exFAT
Default fstype to exfat on external storage if exfat support is
present and fstype is vfat or auto
Fix invalid unmount errors
Improve handling of unencrypted sdcards on Samsung devices
|
| |
|
|
|
|
| |
Change-Id: I5a33d207ec6683de20da37e6f4f174c67785fc52
|
| |
|
|
|
|
|
| |
Fixed handling of blkid output when the output spans multiple
lines and the TYPE field ended up on next line.
|
| |
|
|
|
|
|
|
|
|
| |
Fix backup to not error when a non-existant partition is given.
Fix restore to run when no partition parameters are given.
Ensure that ORS runs after decryption and that zips install.
Fix a problem with the fake internal sdcard not mounting to
/sdcard on data media devices.
|
|
|
|
|
|
|
| |
Needed on Sony mint (Xperia T) as the /data/media folder is a
separate partition and normal data media wiping is not appropriate
for this device but the layout version file needs to be retained
for Android 4.2 multi-user.
|
| |
|
| |
|
|
|
|
|
|
| |
Fix problems with the wiping of data/media devices
Save and restore the ecryptfs key for external sdcard on Samsung
encrypted devices.
|
| |
|
|
|
|
|
|
|
| |
Add proper mkdosfs tool
Add fuse to TWRP
Add experimental exfat-fuse to TWRP
Convert all system() functions to use new Exec_Cmd function
|
|
|
|
|
|
|
|
|
|
| |
- Until the encrypted partition is decrypted, treat it as a disk image
instead of a filesystem so that it is properly backed up using dd.
- Make Partition::Wipe() use the filesystem from fstab for disk images
so that wiping an undecrypted /data makes it a plain unencrypted
partition again.
Change-Id: I78db977d6348cfa66b0cfbc492fb5776f84db48d
|
|
|
|
| |
Change-Id: I6c4cee5b038fd0c39c8723412dd8f421f7794a00
|
|
|
|
| |
Change-Id: I206d34936388c1b072eaaec50e0492710cb80f2e
|
| |
|
|
|
|
| |
Change-Id: I8f2b5b68a8c3ede74858d53002efab997174ee65
|
| |
|
|
|
|
| |
Change-Id: Ie44958a148d00cadd2ba3c51255f7fd9d8a651e7
|
|
|
|
|
|
| |
Also fixed inability to delete backups with a space in the name.
Change-Id: I2f6639d33caa3c4542960f76adbd59b25ab64f5d
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
and leave it mounted or unmount based on prior mounting status
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Also improve handling of MTD names
|
|
|
|
|
| |
Converted bootloader.cpp to TWRP and removed AOSP fstab parsing
from startup
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Modify AOSP mount and wipe functions to use Partition Manager.
Update wipe code to reset the log file index when wiping cache.
Add ADB sideload to 540x960 theme.
|
| |
|
|
|
|
| |
Add in archive splitting support
|
|
|
|
|
|
|
| |
Fixed a problem with using make_ext4fs by making its lib
a dynamic lib.
Added ADB sideload zip install feature - no way to cancel it yet.
Improve backup and restore code.
|
|
|
|
|
|
|
|
| |
Zip install works, had to move mincrypt code into TWRP to prevent
a crash when checking the zip signature.
Added wipe functions
Made it compile in CM7
Made text show up in console and logging
|
| |
|
| |
|
|
|
|
| |
Add flag parsing from recovery.fstab
|
| |
|
|
Pull in most TWRP sources
Stub out partition management code
Make it compile -- probably will not boot
Kind of a mess but have to start somewhere
|