summaryrefslogtreecommitdiffstats
path: root/mtdutils/mtdutils.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge up to AOSP marshmallow-releaseEthan Yonker2015-10-091-21/+26
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to maintain compatibility with older trees, we now have minadbd.old and minui.old. I had to use a TARGET_GLOBAL_CFLAG to handle ifdef issues in minui/minui.d because healthd includes minui/minui.h and there was no other alternative to make minui.h compatible with older trees without having to modify healthd rules which is outside of TWRP. Note that the new minui does not currently have support for qcom overlay graphics. Support for this graphics mode will likely be added in a later patch set. If you are building in a 6.0 tree and have a device that needs qcom overlay graphics, be warned, as off mode charging may not work properly. A dead battery in this case could potentially brick your device if it is unable to charge as healthd handles charging duties. Update rules for building toolbox and add rules for making toybox Use permissive.sh in init.rc which will follow symlinks so we do not have to worry about what binary is supplying the setenforce functionality (toolbox, toybox, or busybox). Fix a few warnings in the main recovery binary source code. Fix a few includes that were missing that prevented compiling in 6.0 Change-Id: Ia67aa2107d260883da5e365475a19bea538e8b97
| * Check all lseek calls succeed.Elliott Hughes2015-04-301-32/+22
| | | | | | | | | | | | | | | | Also add missing TEMP_FAILURE_RETRYs on read, write, and lseek. Bug: http://b/20625546 Change-Id: I03b198e11c1921b35518ee2dd005a7cfcf4fd94b (cherry picked from commit 7bad7c4646ee8fd8d6e6ed0ffd3ddbb0c1b41a2f)
| * Always use strerror to report errno in recovery.Elliott Hughes2015-03-231-4/+4
| | | | | | | | Change-Id: I7009959043150fabf5853a43ee2448c7fbea176e
* | Changes in rk30hackKra1o52014-06-301-5/+5
| | | | | | | | | | This works on rk3188 based devices too so rename it to rk3xhack. Change-Id: Ia3d9d52d99205057f8bece735a938986491b7522
* | Fix merge conflicts and update for 4.4 kitkatDees Troy2013-11-021-13/+14
|\| | | | | | | | | | | | | | | Make a copy of libmincrypt in TWRP source so we do not have to ifdef verifier.cpp for various versions of mincrypt. Remove reboot tool from toolbox (it was removed from 4.4 and did not compile properly on some devices in older trees)
| * recovery: move log output to stdoutDoug Zongker2013-07-091-13/+13
| | | | | | | | | | | | | | | | Recovery currently has a random mix of messages printed to stdout and messages printed to stderr, which can make logs hard to read. Move everything to stdout. Change-Id: Ie33bd4a9e1272e731302569cdec918e0534c48a6
* | Work around MEMERASE ioctl for rk3066 compatibilitySergey 'Jin' Bostandzhyan2013-01-051-0/+22
| | | | | | | | | | | | | | | | | | | | | | Due to a kernel bug and no available sources we have to work around the MEMERASE ioctl - if used, it hangs and never returns. I straced the original recovery executable and could see that it is simply calling write() with a bunch of zeroes instead of using MEMERASE. Added a hack that does the same and now the resulting TWRP recovery image works. Change-Id: I1b1c1c9e870e350776346bdca5d442c7ef565aa0
* | TWRP-ify AOSP codeDees_Troy2012-09-051-12/+211
|/ | | | | | | 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
* Fixed warnings in libmtdutilsEdwin Vane2012-08-211-4/+4
| | | | | | | | | A few signed/unsigned comparison warnings were all that stood in the way of a clean clang build. Change-Id: Id8c47fcfa500a6ac164bddb855831cdc17d99847 Author: Edwin Vane <edwin.vane@intel.com> Reviewed-by: Tareq A Siraj <tareq.a.siraj@intel.com>
* Free allocated struct after freeing fieldChristian Lindeberg2011-01-191-1/+1
| | | | | | | Free allocated MtdReadContext after freeing buffer field in struct, not before. Change-Id: I237920dc36115389cd2d6948e7a962dbec22fe56
* fix comparison of ECC stats before and after mtd readsDoug Zongker2010-11-031-0/+2
| | | | | | | | | | | | ECC errors are found by comparing the result of ioctl(ECCGETSTATS) before and after the read. But if an error was found causing us to go to the next block, we'd compare the stats before the *first* read to the stats after the second (third, fourth, etc.) reads, so we'd read to the end of the partition without ever succeeding. Fix logic so we compare the values before and after each read independently. Bug: 3162777 Change-Id: I5a13abd7243d2afd1d21bd98cbb233e5124b2e80
* close update package before installing; allow remountDoug Zongker2010-09-151-1/+1
| | | | | | | | Close the update package before invoking the binary, to allow the installer to unmount /cache if it wants to. Add a function to allow remounting of a mount as read-only. Change-Id: Idfcc96c3da66083295177f729263560be58034e4
* add the ability to seek to a raw location while reading MTD partitionDoug Zongker2010-09-151-0/+7
| | | | Change-Id: Id1563ca667c50e61cf1bb15d2cf783a50937eece
* stop treating all-zero blocks as badDoug Zongker2010-09-121-8/+1
| | | | Change-Id: If49fa6485f66598d16a7e44fce3129de55fab422
* block is bad if ioctl() returns nonzeroDoug Zongker2010-09-101-2/+5
| | | | Change-Id: I6fc4ce796bc663d05035927c0af0ce7ab6d07218
* make offsets in firmware update header not point to bad blocksDoug Zongker2010-01-131-4/+42
| | | | | | | | | | | | | hboot will apparently fail to install if the first block of the image (the one pointed to by the offset in the block 0 header) is a bad block. (Hopefully it handles subsequent bad blocks.) This change makes the MTD write code keep track of the bad blocks it has skipped over, so that the offset in the header can be adjusted to be the address of the first successfully written block. Change-Id: I45d58e32a36d0c1dbc0a7f871bd5985b6c8ff524 http://b/2358012 - passion: failure to flash hboot (bad blocks?)
* use MEMGETBADBLOCK to look for bad blocks when reading MTD partitionsDoug Zongker2009-12-151-5/+12
|
* skip over all-zero blocks when reading MTD partitionDoug Zongker2009-07-011-1/+12
| | | | | | | | | | | We fail to detect certain bad blocks (marked in the factory as bad, I think?) when reading mtd partitions. These come back as a block of all zeros. Since it's fairly unlikely a legitimate boot or recovery block will contain 128k of zeros, change mtdutils to skip over such blocks. Arve says https://review.source.android.com/10535 may be a long-term fix for this, but he isn't yet sure.
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-041-0/+510
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-041-510/+0
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+510