• Home
  • History
  • Annotate
  • only in /system/extras/ext4_utils/
History log of /system/extras/ext4_utils/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
88833a6277f305b6a03ff29d8e9ffe717ddb4045 14-Jul-2011 Ken Sumrall <ksumrall@android.com> Round down the filesystem size to a multiple of the block size

If it's not a multiple of the block size, then errors are generated
when making sparse images. This doesn't change the size of the generated
filesystem, because partial blocks are not included in the filesystem.

Change-Id: Ifc00ef7961f651ce22c6400759eadce2775d7811
ake_ext4fs.c
dba332410528d11474ae9f878b6984755d55e299 30-Jun-2011 Ken Sumrall <ksumrall@android.com> Update simg2img to handle CHUNK_TYPE_FILL.

Change-Id: Ia4d178b535e1c154cf2b8e826ea1fba342b05658
img2img.c
107a9f161babc20daf915311146b0e864d3b4157 30-Jun-2011 Ken Sumrall <ksumrall@android.com> Bug fixes to make_ext4fs

Fix definition of uuid struct.
Properly set the block_group number in each backup copy of the superblock.
Adjust the info.total_inodes field after rounding up the inodes per block group.
Add the option -t to initialize all the inode tables. If also specified with
the -s option, use the CHUNK_TYPE_FILL sparse records to initialize them.

Change-Id: Idd8bcee1b9bde3e82ad8da89ef974fbc12d7a6c6
llocate.c
llocate.h
acked_block.c
acked_block.h
xt4_utils.c
xt4_utils.h
ake_ext4fs.c
ake_ext4fs.h
ake_ext4fs_main.c
utput_file.c
utput_file.h
uid.c
7e5ff13c55eb29748c07768bd7134819cbcbd4b0 23-Jun-2011 Ken Sumrall <ksumrall@android.com> Add test/debugging code to ext4fixup

Add debugging test code to specify where to bail partway through
Add a script to drive the test code for automated testing. This
found 4 bugs!

Change-Id: I14dc8b1e2c9d2d2f332346958d488feaf768d396
xt4fixup.c
xt4fixup.h
xt4fixup_main.c
est_ext4fixup
97fc910ce0e05862888fd1d9e1938feba40f7539 23-Jun-2011 Ken Sumrall <ksumrall@android.com> Fixes for ext4fixup.

Add check for filesystem that needs the journal run
Fix check for a cleanly unmounted filesystem.
Fix computation of new inode number
Fix check in two places for high bit being set on inode num
Only run sanity check pass if filesystem fixup state is unset
(i.e. not partway through the conversion)

Change-Id: Ib5521e7f3c04d32c02d9890644a99378e3a3659e
xt4_utils.c
xt4fixup.c
671cd2188e2f224aaeac4955785199f228235719 10-Jun-2011 Ken Sumrall <ksumrall@android.com> ext4fixup tool to fix wonky filesystems made by old version of make_ext4fs

The filesystems made by make_ext4fs for the Gingerbread and initial Honeycomb
releases did not round up the number of inodes/block_group to use all the
space available. This worked, but newer kernels have additional code that
refuses to write to these filesystems. There is a kernel patch available
to fix the problem in the kernel, but this tool was also written to fixup
the filesystems to be compliant with the new kernels.

Change-Id: I317b02ee2132ce6a0daeb4d1b40ad5ef57a0fb32
ndroid.mk
xt4fixup.c
xt4fixup.h
xt4fixup_main.c
a0b154fab1f1dd3fd11c63de18d375412cdfd1c7 06-Jun-2011 Ken Sumrall <ksumrall@android.com> A few small cleanups to setup_fs.c

Based on code review comments when the code was moved from
crespo specific code to ext4 generic code.

Change-Id: Ia09261563863f6db1d5eadb5a3677b0b38382b93
etup_fs.c
337847a149d956ed6d5990f84006f7340475f715 03-Jun-2011 Ken Sumrall <ksumrall@android.com> Move the setup_fs program from device/samsung/crespo to ext4_utils.

Prime also uses this, so it's no longer crespo specfic.

Change-Id: Idd35ee85599717a06902f696a73e5a4bd6522ac6
ndroid.mk
etup_fs.c
06c35f935a7adadceb9ee326b3231f952f6ad203 01-May-2011 Colin Cross <ccross@android.com> Merge "Make inodes per group a multiple of inodes per block"
96cc54a9bbc788673b7a38c23160d137211fd983 30-Apr-2011 Colin Cross <ccross@android.com> Make inodes per group a multiple of inodes per block

Kernel version 2.6.37 and later refuse to write to filesystems
for which inodes per group is not divisible by inodes per block.
Round the inodes per group up.

Change-Id: I9eb4fb5dd616a8abfd2f1fdc4b7d05538a2fc8fe
ake_ext4fs.c
7c81ec40f5f466b23c2ebacabe1e4e9ac6932bd5 01-Apr-2011 Ken Sumrall <ksumrall@android.com> Properly compute the size of a directory

When computing the size of a directory that is being created,
make sure to include the size of the null entry at the end of
the list of entries in that directory.

Change-Id: I7deb05a170911cd0cc8517600c9747f64915606f
ontents.c
c12588ca8b1f4f38f55745a30656a5576aa4b6f9 25-Mar-2011 Ken Sumrall <ksumrall@android.com> am 2ae7663e: Implement poor man\'s exception handling to prevent errors from killling recovery

* commit '2ae7663e1e064000356ee9e49ebd08bdddc545f9':
Implement poor man's exception handling to prevent errors from killling recovery
2ae7663e1e064000356ee9e49ebd08bdddc545f9 24-Mar-2011 Ken Sumrall <ksumrall@android.com> Implement poor man's exception handling to prevent errors from killling recovery

make_ext4fs was originally designed to be a standalone program, and the
error() macro calls exit() after printing a diagnostic. However, when
it was turned into a library that recovery links against, calling exit()
kills the entire recovery process, which the kernel starts back up,
which dies, and the cycle continues.

This changes make_ext4fs to use setjmp() early, and changes error to
use longjmp to return to that point. When longjmp is called, the
error handler just returns an error. If it was invoked as a standalone
program, this causes the program to exit with an error. If it was
invoked as a library function, the error return is gracefully handled
by recovery.

Change-Id: Iad50f46cac0ac399b5cdfd083d5712f88a10e48e
xt4_utils.c
xt4_utils.h
ake_ext4fs.c
ef4b5b05af0506dfdb13028fb7167123ea1ec1eb 23-Mar-2011 Ken Sumrall <ksumrall@android.com> am 8c00dae6: am 427c3a21: Make a failure of the BLKDISCARD ioctl non-fatal.

* commit '8c00dae657ce7941121ec218d07adeab9ee3d8a1':
Make a failure of the BLKDISCARD ioctl non-fatal.
427c3a2177eb4d34c88406bb86107548737168cc 23-Mar-2011 Ken Sumrall <ksumrall@android.com> Make a failure of the BLKDISCARD ioctl non-fatal.

Failure to erase the partition before making a new filesystem
should not be fatal, especially since this is called from recovery,
and if make_ext4fs() dies, recovery dies.

Change-Id: I1b50b8c486d403a5d9cbd5e9de73cf752d8ef8f7
ipe.c
3e620597671c7efa678c1cd804202cff513bc751 12-Feb-2011 Ken Sumrall <ksumrall@android.com> Fix to properly wipe filesystems larger than 4 gigabytes.

Pass the wipe size to the wipe function in a 64 bit int.

Change-Id: Ia6a0c70c8ddacaae35d17732d61b126219e5c158
ipe.c
ipe.h
c72ab98be7288d86980797b4f6295d73de5ca56f 14-Mar-2011 Iliyan Malchev <malchev@google.com> system/extras: remove LOCAL_PRELINK_MODULE

Change-Id: Iafd936bcb30e3fcc18c522a701d567dd744f2fa3
Signed-off-by: Iliyan Malchev <malchev@google.com>
ndroid.mk
61d6591c827dbea6db9bd29b17a5679d6e2c0d50 12-Feb-2011 Ken Sumrall <ksumrall@android.com> Fix to properly wipe filesystems larger than 4 gigabytes.

Pass the wipe size to the wipe function in a 64 bit int.

Change-Id: Iac95693efa2d9cadbe77aa83b5ff01d7fc8d8b70
ipe.c
ipe.h
bb079ff767d5dd76be2d8753a3aef192b75b5664 29-Jan-2011 Colin Cross <ccross@android.com> ext4_utils: Fix non-linux builds

Change-Id: I5a22083645055abc36a3addc4eae45b40a7a6b2b
ipe.c
c2470654d4b4db09a7052fc5fa108ac21f1b1948 27-Jan-2011 Colin Cross <ccross@android.com> ext4_utils: Add support for wipe option, and wipe by default in recovery

Adds a -w option to make_ext4fs, which will attempt to use the
BLKSECDISCARD ioctl to erase the partition in order to avoid
leaving old data where it could be recovered, and to improve
wear levelling after a reformat.

Also causes factory reset through recovery to do a wipe.

Change-Id: Ibe34bbd84552e526be6bd041024a950806aca6b4
ndroid.mk
xt2simg.c
xt4_utils.c
xt4_utils.h
ake_ext4fs.c
ake_ext4fs.h
ake_ext4fs_main.c
utput_file.c
utput_file.h
ipe.c
ipe.h
442985bad72adb119aa29dbe1b8c903fa834e089 26-Jan-2011 Colin Cross <ccross@android.com> Merge "ext4_utils: Fix off-by-one bug in dentry size calculation" into honeycomb
2ff1c5b6e8c1457dbb65fb8305db92c74e95dd42 26-Jan-2011 Colin Cross <ccross@android.com> ext4_utils: Fix off-by-one bug in dentry size calculation

Change-Id: I1a1833dfd5d896acd1d823f8dbe925b8ff1fd5da
ontents.c
983fb19d83d2391b19b289fc150495d8642378c4 20-Jan-2011 Ken Sumrall <ksumrall@android.com> Change the API for make_ext4fs() to better match the user's needs

The current make_ext4fs() is renamed make_ext4fs_internal(), and a new
make_ext4fs() has a simplified interface that supports the needs of
recovery and updater packages that call it.

Change-Id: I9e897f1f442c7f5060f8623ea74c3cf6a9c023e4
ake_ext4fs.c
ake_ext4fs.h
ake_ext4fs_main.c
435a8b61e925e3efb22fce08612efe210e83f791 15-Jan-2011 Ken Sumrall <ksumrall@android.com> Add the ability to specify a reserved space size when making filesystems.

If you specify a negative length when making a filesystem, then the
filesystem size is the size of the partiton (or image file) minus
the absolute value of the negative length specified.

Change-Id: I53e3b6de2ea692f4678682c3f49ff36429d9ad31
xt4_utils.c
xt4_utils.h
ake_ext4fs.c
utput_file.c
39e01fc213f81eb7366324d04d449fb9a07e6e55 06-Jan-2011 Ken Sumrall <ksumrall@android.com> Add a mode to the open(2) call when creating the output file.

Without this, the mode of the created file is pulled from
garbage on the stack.

Change-Id: Idc5d2bdcaf66a4a70d37ff48e3f9d127542ad860
img2img.c
fe4a03182b5b17d333511c72406f926a791345d3 06-Jan-2011 Colin Cross <ccross@android.com> ext4_utils: Fix OSX build

Change-Id: I8e70081c75148638edaeb0cb3d376accb3bf3965
xt4_utils.h
img2img.c
2e905e5f2a3df605c68cb8633580c918e9f4ba71 29-Dec-2010 Colin Cross <ccross@android.com> ext4_utils: Fix warnings

Change-Id: Ibeb2001a1ac8cfedd9fced11b17afba4940b6bd5
ontents.c
ake_ext4fs.c
f27036726a039f516f59df79351c2717b0fb4aad 29-Dec-2010 Colin Cross <ccross@android.com> ext4_utils: Allow unknown block types in simg2img

Change-Id: I0440171a34f8aa42036840b9f25fec3097d13d00
img2img.c
106235b5f4bace8051e4bbb9e40d198c9e066f44 25-Dec-2010 Colin Cross <ccross@android.com> ext4_utils: Build simg2img for target

Change-Id: I406674de131460394ae8ed1594c186398e28cf9d
ndroid.mk
0b7cb80f7bcd8ef3fa0c79d2cb5e9c5f78a93250 25-Dec-2010 Colin Cross <ccross@android.com> ext4_utils: Convert simg2img from stdio to fds

Bionic stdio does not support 64 bit file offsets

Change-Id: Ic7f2d12ea2007e55c9787e9c4bf2f4d4635f94f5
img2img.c
a7ed433f2dc0116627a93b18fbb260f0665ca0cb 23-Dec-2010 Colin Cross <ccross@android.com> ext4_utils: Add ext2simg

Change-Id: I6c0d71d737be588d03018efdaed378349caa4f7a
ndroid.mk
xt2simg.c
xt4_utils.c
xt4_utils.h
757ace516d8e4350616b5fd10da0c982d3d5ec74 29-Dec-2010 Colin Cross <ccross@android.com> ext4_utils: Add an optional CRC chunk at the end of sparse files

Change-Id: Ibfcf1cdeab47ca13870350184abf83e530acbc07
xt4_utils.c
xt4_utils.h
ake_ext4fs.c
ake_ext4fs.h
ake_ext4fs_main.c
utput_file.c
utput_file.h
img2img.c
parse_format.h
b781330b1acae2e5706bbda8d81e5f7575f40e2a 23-Dec-2010 Colin Cross <ccross@android.com> ext4_utils: Get rid of CRC in sparse file header

Also removes the need to seek in the output file, allowing
stdin and stdout to be used for input and output.

Change-Id: I93cbe335d9cc83a6d21daa696af2cb54952dcc9f
acked_block.c
acked_block.h
xt4_utils.c
xt4_utils.h
ake_ext4fs.c
utput_file.c
utput_file.h
33f96c66e9a1f2e266a75e5e84c091dffa6ef118 23-Dec-2010 Colin Cross <ccross@android.com> ext4_utils: Add support for >2G input files

Change-Id: I6af69d676610099d3912e90fcab3cbdc27ace4e2
llocate.c
llocate.h
acked_block.c
acked_block.h
xt4_utils.c
xt4_utils.h
xtent.c
ndirect.c
ake_ext4fs.c
utput_file.c
utput_file.h
img2img.c
22742ce739a046a079b2e1b03342a25472dfa352 23-Dec-2010 Colin Cross <ccross@android.com> ext4_utils: Move bg_desc_reserved_blocks from aux_info to info

Change-Id: Ic635afbb8819a00ca23ba2f93413fe707e2eec87
llocate.c
xt4_utils.c
xt4_utils.h
ndirect.c
ake_ext4fs.c
c22117cb003f7a00071bbbaa3bbbf6e530a54b9a 18-Nov-2010 Ying Wang <wangying@google.com> Optional "-s" to enable sparse ext4 image.

Change-Id: Ib4f8bf9bf54607eacc01dd11f92def640ff32b5c
kuserimg.sh
5c11d911dc8923d735e34eae4ec80b39c108ab9d 29-Sep-2010 Ying Wang <wangying@google.com> resolved conflicts for merge of 8bdbbe2d to master

Change-Id: I347c58f62c4d9b6bcfa6745a47d5dd96c60661eb
8bdbbe2de23a8a8fc26b7f3a4b7dfdbe1112ac9f 28-Sep-2010 Ying Wang <wangying@google.com> Rename parameter LABEL to MOUNT_POINT

"make_ext4fs -a" accepts the mount point, in fact.

Change-Id: I126f5d3a9628d30bdd27cb0e7f6879e479ae5de2
kuserimg.sh
8534c95431291f7c445cea7516922477c12489ad 24-Sep-2010 Brian Swetland <swetland@google.com> am 4b8b59a7: zero the entire journal instead of just the first block

Merge commit '4b8b59a7cd0e1413dcf9973c4bbd7eb65a444c4c'

* commit '4b8b59a7cd0e1413dcf9973c4bbd7eb65a444c4c':
zero the entire journal instead of just the first block
4b8b59a7cd0e1413dcf9973c4bbd7eb65a444c4c 24-Sep-2010 Brian Swetland <swetland@google.com> zero the entire journal instead of just the first block

I'm seeing some weeeeird stuff with sparse ext4 images where
files sometimes seem to come back from the dead after reflashing,
etc. My crazy theory is they are hiding in the journal.

Colin humored me and pointed out how to ensure it's entirely
zero'd.

Change-Id: I4d14a2d4879c10540ef3c677ceb523bc061c1ec1
xt4_utils.c
cd23be01be219a927cb4eb9edc088eaec260cdba 16-Sep-2010 Brian Swetland <swetland@google.com> do not merge - create sparse ext4 images

master is not ready for the awesome that is sparse filesystem imagery!

Change-Id: I52f76ed6da715e63786d36a3294a2e63d600a637
kuserimg.sh
9c842adc177c1bcd22c2038d8d237bfb70654dca 17-Aug-2010 Ken Sumrall <ksumrall@android.com> Add support for IEEE 802.c stylc CRC32 computation to the sparse image tools

Add support for computing the CRC32 of the data when we make a sparse image,
and storing that CRC in the header. Also update the simg2img tool that reads
sparse images to compute the CRC32 as it writes the image, and check to make
sure it matches what's in the header.

Change-Id: Id49b25bf820acb46ff981f3046fba5b24fd82c8d
ndroid.mk
utput_file.c
img2img.c
parse_crc32.c
parse_crc32.h
5a6181798de5c2d882c79b27406c330a6fa7da3e 17-Aug-2010 Ken Sumrall <ksumrall@android.com> Add support for IEEE 802.c stylc CRC32 computation to the sparse image tools

Add support for computing the CRC32 of the data when we make a sparse image,
and storing that CRC in the header. Also update the simg2img tool that reads
sparse images to compute the CRC32 as it writes the image, and check to make
sure it matches what's in the header.

Change-Id: Iadea3a760f91fa9b1efd22a3580dd1943b1ff52e
ndroid.mk
utput_file.c
img2img.c
parse_crc32.c
parse_crc32.h
8642b7fba54727a38f751516bcdc452fb09ef610 14-Aug-2010 Brian Swetland <swetland@google.com> ext4_utils: brought over from master
ndroid.mk
ODULE_LICENSE_APACHE2
OTICE
llocate.c
llocate.h
acked_block.c
acked_block.h
ontents.c
ontents.h
xt4.h
xt4_extents.h
xt4_jbd2.h
xt4_utils.c
xt4_utils.h
xtent.c
xtent.h
ndirect.c
ndirect.h
bd2.h
ake_ext4fs.c
ake_ext4fs.h
ake_ext4fs_main.c
kuserimg.sh
utput_file.c
utput_file.h
ha1.c
ha1.h
img2img.c
parse_format.h
uid.c
uid.h
75249edab0b22ea9aae9c7278b9f2c196c7d25d4 14-Aug-2010 Ken Sumrall <ksumrall@android.com> Add support for sparse ext4 image creation.

This adds the -s option to the make_ext4fs tool, which now creates
"sparse" filesystem images, which is very useful for the large 32 Gbyte
filesystems we are now building.
This check-in also fixes make_ext4fs to properly create filesystems
larger thatn 4 Gbytes on 64-bit Linux, 32-bit android and Macs.

Change-Id: Ie5838492fcf944f5c875481693c0dbd7013deae4
ndroid.mk
acked_block.c
xt4_utils.c
xt4_utils.h
ake_ext4fs.c
ake_ext4fs.h
ake_ext4fs_main.c
utput_file.c
utput_file.h
img2img.c
parse_format.h
6bd2b5d80db5630cb73e3e5a4be3b38afa241c5a 05-Aug-2010 Colin Cross <ccross@android.com> Fix calculation of dentry size

The PAD_TO function was incorrectly handling values that were already
aligned, which could lead to overruns of the dentry block. Fix the
function, rename it to ALIGN, move it to ext4_utils.h, and use it
everywhere the dentry size is calculated.

Change-Id: Ie9778d2c6f72d3db9a3162e52882377a71b8420a
ontents.c
xt4_utils.h
cf5c39c1851f8826264822414dbab31c1aeaeec6 05-Aug-2010 Colin Cross <ccross@android.com> Fix zero length files

Zero length files should just skip the block allocation so the
inode extent fields are empty.

Change-Id: I40a6ba32b0a7f842e5d752e8cd70dfda878b8998
ontents.c
de61f980c7b034eefac6e0ace718b3c1eb3f6252 05-Aug-2010 Colin Cross <ccross@android.com> Set timestamps on files based on source files

Use the modification time of the source files to set the modification
time, access time, and creation times in the filesystem image.

Change-Id: I720acba5ec435ceae92bb1653e3cc7545327b6ef
ontents.c
ontents.h
ake_ext4fs.c
e4b5ae8ab07e698b95f004c9226000b02f853abc 03-Aug-2010 Colin Cross <ccross@android.com> Create a journal by default

Change-Id: I7ab4e502ba4a0f1f3ae85d6d25f3936f4b66e5e8
xt4_utils.h
ake_ext4fs.c
ake_ext4fs_main.c
3c977822a4f3023d2717130caca74d0318433f4a 03-Aug-2010 Colin Cross <ccross@android.com> Add mkuserimg.sh script for the build system

Change-Id: I74b41e5d783646b51203423a7deabbdb28b32b7b
ndroid.mk
kuserimg.sh
263eefd9fb9608432636c903423e43848e69f39d 30-Jun-2010 Doug Zongker <dougz@android.com> add make_ext4fs to the libext4_utils

Move the bulk of make_ext4fs into libext4_utils, leaving a main() that
does only option parsing. Add reset functionality so that
make_ext4fs() can be called multiple times within a process.

Change-Id: Ia09a2385eab32bf3ca9eb9257c4f9df2c85e55be
ndroid.mk
acked_block.c
ake_ext4fs.c
ake_ext4fs.h
ake_ext4fs_main.c
9b93cf45edfdd7f443fa2eedc4bb97b9b88504bf 29-Jun-2010 Colin Cross <ccross@android.com> Add static libext4_utils

Change-Id: Ic3493fc8d35ee81c9f4c0d471d900a6680997b65
ndroid.mk
881cca2f88ddcce86483b3ba95546b5641de8c0e 21-Jun-2010 Colin Cross <ccross@android.com> Split out libext4_utils

Change-Id: I12aa52b75607379add2669fddba4cd7dc2bb527f
ndroid.mk
llocate.c
xt4_utils.c
xt4_utils.h
xt_utils.c
xt_utils.h
ake_ext4fs.c
8aef66d2125af8de7672a12895276802fcc1948f 21-Jun-2010 Colin Cross <ccross@android.com> Fix whitespace

Change-Id: I37da6c38cd33ae22a0578ed8e91650e35972bf6a
llocate.c
llocate.h
acked_block.c
acked_block.h
ontents.c
ontents.h
xtent.c
xtent.h
ndirect.c
ndirect.h
ake_ext4fs.c
uid.c
7a8bee7653c393d8da0e28668cb51d3ccab793e8 20-Jun-2010 Colin Cross <ccross@android.com> Add support for writing a gzip compressed image

Change-Id: Ica2ff90060f6a4ced2c671084205b58eede66cdf
ndroid.mk
acked_block.c
acked_block.h
ake_ext4fs.c
utput_file.c
utput_file.h
4b83b8acdcc4dad375adaf0f3b41fc41b22ee742 18-Jun-2010 Colin Cross <ccross@android.com> Fix ifdefs for linux

Change-Id: Iaf6fcd0f691e14edc82c9d1286c3d1b8ebeb1237
ake_ext4fs.c
a1a175aef60677ed877bcb52db553705a8e8c20f 18-Jun-2010 Colin Cross <ccross@android.com> Fix zero-length files

Change-Id: I35812aa7a992d30ec84da57ddb1dccba7b1adf60
llocate.c
ec0a2e83dc66d67addeb90e83144187691852a3e 11-Jun-2010 Colin Cross <ccross@android.com> Initial commit of ext4_utils

Change-Id: I911d5b7fd7170ec81d544850717d8e69976e272b
ndroid.mk
ODULE_LICENSE_APACHE2
OTICE
llocate.c
llocate.h
acked_block.c
acked_block.h
ontents.c
ontents.h
xt4.h
xt4_extents.h
xt4_jbd2.h
xt4_utils.h
xt_utils.c
xt_utils.h
xtent.c
xtent.h
ndirect.c
ndirect.h
bd2.h
ake_ext4fs.c
ake_ext4fs.h
ha1.c
ha1.h
uid.c
uid.h