OSDN Git Service

android-x86/system-extras.git
8 years agoDO NOT MERGE Update rand_emmc_perf makefile.
Joshua Schwarz [Thu, 15 Oct 2015 00:21:10 +0000 (17:21 -0700)]
DO NOT MERGE Update rand_emmc_perf makefile.

Change-Id: I4f0416508c3c144e6b44eee4a9dcc78c770dfb8e

9 years agoMerge "Add a system tool - ANRdaemon" into cw-d-mr1-dev
Zhengyin Qian [Tue, 7 Jul 2015 17:19:34 +0000 (17:19 +0000)]
Merge "Add a system tool - ANRdaemon" into cw-d-mr1-dev

9 years agoAdd a system tool - ANRdaemon
Zhengyin Qian [Fri, 19 Jun 2015 04:37:41 +0000 (21:37 -0700)]
Add a system tool - ANRdaemon

This is a daemon to help analyze ANR due to CPU starvation by logging system activity before such an event happens. The daemon uses debugfs underlying for logging.

Change-Id: I5c7c78e88e1dda9c392502f2a41d1e47f06bb89b

9 years agomksquashfsimage.sh: Add forward slash for SRC_DIR
Mohamad Ayyash [Wed, 24 Jun 2015 20:04:29 +0000 (13:04 -0700)]
mksquashfsimage.sh: Add forward slash for SRC_DIR

There is a bug in mksquashfs that fails to interpret symlink dirs unless
they have a forward slash

Change-Id: I64df07d99858a792e1d7af5d11234fe8b75f91ae
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
9 years agomksquashfsimge.sh: Support creating a sparse image
Mohamad Ayyash [Wed, 24 Jun 2015 17:36:40 +0000 (10:36 -0700)]
mksquashfsimge.sh: Support creating a sparse image

Change-Id: Idc28996028e666f929c032e5380312b7b28faa91
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
9 years agoAdd switches for compressor
Simon Wilson [Wed, 17 Jun 2015 19:36:53 +0000 (12:36 -0700)]
Add switches for compressor

Change-Id: I297321db3996d07e9eba3edc0b2837c8d221ab1a

9 years agoIntroduce squashfs-utils that includes helper functions
Mohamad Ayyash [Thu, 2 Apr 2015 02:25:28 +0000 (19:25 -0700)]
Introduce squashfs-utils that includes helper functions

For example: extracting filesystem size from superblock

Change-Id: I97c79d80ebb767a977c8ca27f7e0877b5ead8fdc
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
9 years agoIntroduce mksquashfsimage.sh
Mohamad Ayyash [Tue, 3 Mar 2015 20:33:48 +0000 (12:33 -0800)]
Introduce mksquashfsimage.sh

Change-Id: I2b916ef3ef60b40f506e1f1be59482f7b071cdb2
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
9 years agoMerge "Add a reference C implementation for verifying signatures" into lmp-mr1-dev
Paul Lawrence [Fri, 21 Nov 2014 23:38:27 +0000 (23:38 +0000)]
Merge "Add a reference C implementation for verifying signatures" into lmp-mr1-dev

9 years agoAdd a reference C implementation for verifying signatures
Sami Tolvanen [Thu, 20 Nov 2014 13:22:58 +0000 (13:22 +0000)]
Add a reference C implementation for verifying signatures

Due to OEM requests, add a reference implementation for boot/recovery
image signature verification in C. The tool uses OpenSSL for ASN.1 and
crypto routines.

Bug: 18120110
Change-Id: I9f6c59e0b338b68f35ac1c2c4d83c10d31d70cd9

9 years agoSupport [-j <journal_size>] in mkuserimg.sh
Ying Wang [Thu, 20 Nov 2014 20:22:42 +0000 (20:22 +0000)]
Support [-j <journal_size>] in mkuserimg.sh
automerge: 8f85f69

* commit '8f85f69f43dc3a2943d33d0d47740b2528a0735f':
  Support [-j <journal_size>] in mkuserimg.sh

9 years agoSupport [-j <journal_size>] in mkuserimg.sh
Ying Wang [Wed, 19 Nov 2014 02:06:56 +0000 (18:06 -0800)]
Support [-j <journal_size>] in mkuserimg.sh

Bug: 18430740

(cherry picked from commit 1ec61e7ac5fd7553b143231e8d650ef4ba432344)

Change-Id: I8704dfd4f91373261b03d7943e40cc9fdf39a0a7

9 years agoSupport [-j <journal_size>] in mkuserimg.sh
Ying Wang [Wed, 19 Nov 2014 02:06:56 +0000 (18:06 -0800)]
Support [-j <journal_size>] in mkuserimg.sh

Bug: 18430740
Change-Id: Ia76cd4ef1b35c48c60c4922d7d28b21978d56159

9 years agoAdd signature verification to keystore and verity signers
Sami Tolvanen [Fri, 14 Nov 2014 14:51:25 +0000 (14:51 +0000)]
Add signature verification to keystore and verity signers

This change adds -verify flags to keystore and verity signers for
verifying the signatures of the signed content generated by the
same tools. This allows implementers of verified boot to test and
verify the correctness of their implementations.

Bug: 15984840
Change-Id: I327de9c3a9e035cd11dc5022e978c840cd37581c

9 years agoFix comments in BootSignature.java.
Sami Tolvanen [Fri, 14 Nov 2014 11:00:18 +0000 (11:00 +0000)]
Fix comments in BootSignature.java.

Clearly mark the comment above main() as an example and fix
the parameters in the example command. Also briefly document
the arguments in the main function for clarity.

Bug: 18376609
Change-Id: I84eaf75799a8128100eb97c70e04563c609e9928

9 years agoDO NOT MERGE: Implement boot signature verification
Sami Tolvanen [Sat, 1 Nov 2014 00:18:23 +0000 (17:18 -0700)]
DO NOT MERGE: Implement boot signature verification

Adds signature verification support to BootSignature.java.

Bug: 15984840
Bug: 18120110
Change-Id: Ib1a67573bdcd0f41e2d920f518de15993c8750e0
(cherry picked from commit 7999c089cfa82d63d4a28606c78b381b74509175)

9 years agoDO NOT MERGE: Update keystore and verity metadata signers
Sami Tolvanen [Fri, 7 Nov 2014 04:29:22 +0000 (20:29 -0800)]
DO NOT MERGE: Update keystore and verity metadata signers

Use the same PKCS8 format as every other signing tool, and update
the signature format to use SHA-256 instead of SHA-1.

Bug: 15984840
Bug: 18120110
Change-Id: I6ac9e3594b5ae572f5b6763f3bd5b1bdb6ba2ad2
(cherry picked from commit 19c6bb5fe97c877976ef79762c6051223b8d2213)

9 years agoDO NOT MERGE: Support converting X.509 cert into a verity public key
Sami Tolvanen [Fri, 7 Nov 2014 04:22:49 +0000 (20:22 -0800)]
DO NOT MERGE: Support converting X.509 cert into a verity public key

fs_mgr requires an RSA public key in mincrypt format for verifying
dm-verity hash tables. Add support for extracting public keys from
existing X.509 certificates and converting it into mincrypt format
for use with fs_mgr.

Bug: 15984840
Bug: 18120110
Change-Id: Ibcdca116cdc32dfa33d8f5636ec728244cbf6fd5
(cherry picked from commit 82d824a6b5028930abd87ecd870924c72d3b3931)

9 years agoDO NOT MERGE: Add a tool for verifying verity signatures in images
Sami Tolvanen [Wed, 12 Nov 2014 15:47:53 +0000 (07:47 -0800)]
DO NOT MERGE: Add a tool for verifying verity signatures in images

This tool takes a sparse ext4 image file, reads verity metadata
from it, and verifies the signature of the verity table.

Bug: 15984840
Bug: 18120110
Change-Id: I384a9ff885a0ffcd8febf100e76f3a1e5c7bbdab
(cherry picked from commit c18aa9d69a69549b50966e322abe59cfa04edfe4)

9 years agoReinstate "Update boot image signature format to version 1"
Paul Lawrence [Thu, 13 Nov 2014 22:15:30 +0000 (22:15 +0000)]
Reinstate "Update boot image signature format to version 1"

This reverts commit 7377e002421ed9a04cc94cd808c234f48d93924d.

Change-Id: I4b1d83b62ae4d4dd6952663744b1171b3e0d0766
Signed-off-by: Iliyan Malchev <malchev@google.com>
9 years agoRevert "Update boot image signature format to version 1"
Paul Lawrence [Thu, 13 Nov 2014 22:03:31 +0000 (22:03 +0000)]
Revert "Update boot image signature format to version 1"

This reverts commit b62eabde2db40f01dfed1cef48ac2cbabdff4d03.

Change-Id: I98019b7990c5436fe6ad5ef1052729478bccbe17

9 years agoUpdate boot image signature format to version 1
Sami Tolvanen [Sat, 1 Nov 2014 00:18:23 +0000 (17:18 -0700)]
Update boot image signature format to version 1

Add the full X.509v3 certificate to the signature footer for easier
verification.

Change-Id: Ic969e9c1e4ab1a25ffdde2ab818b8edf2ad95253
(cherry picked from commit f67d3764c641e53d4a1b925b4d02fec92b7e894a)

9 years agoFix issues with appended boot signature.
Geremy Condra [Thu, 14 Aug 2014 23:44:31 +0000 (16:44 -0700)]
Fix issues with appended boot signature.

In particular this changes the OID to the SHA1 OID and
appends the full BootSignature.

This is cherry-picked from a WIP bug checked into master, but is complete.
The work in finalized by further changes from Sami Tolvanen

Bug: 15984840
Change-Id: Ic43784fc339b9aedf91363c9ec9a453c3bb53294
(cherry picked from commit 1f2ebbd57e86fb0749aeb453fb337065985ab9c6)

9 years agoksmutils: Get correct pfn from pagemap entry
Daniel Rosenberg [Wed, 3 Sep 2014 02:17:25 +0000 (19:17 -0700)]
ksmutils: Get correct pfn from pagemap entry

Bug: 17360804
Bug: 17332389
Change-Id: I1bc5441eec9fcfb61d4ba41bd74e895fc5978a4f
Signed-off-by: Daniel Rosenberg <drosen@google.com>
9 years agoRevert "libpagemap: Mask off page shift to get page frame number"
Daniel Rosenberg [Wed, 3 Sep 2014 00:37:45 +0000 (00:37 +0000)]
Revert "libpagemap: Mask off page shift to get page frame number"

This reverts commit 4bf06a51869f49d7ee3fb0163a2517ec5e33ba1f.

Bug: 17360804
Bug: 17332389
Change-Id: I7e4d55215f391f5b3f71388943e9d95e5eff6f81

9 years agolibpagemap: Mask off page shift to get page frame number
Daniel Rosenberg [Fri, 29 Aug 2014 21:21:12 +0000 (14:21 -0700)]
libpagemap: Mask off page shift to get page frame number

see comment above pagemap_read() from the kernel

Bug: 17332389
Change-Id: Iaec9a2c8d2783f5c1e7ba06d9c7156305abe0453
Signed-off-by: Daniel Rosenberg <drosen@google.com>
10 years agof2fs_sparseblock: Fixed handling of journaled sit entries
Daniel Rosenberg [Tue, 19 Aug 2014 07:13:10 +0000 (00:13 -0700)]
f2fs_sparseblock: Fixed handling of journaled sit entries

Bug: 15749466
Change-Id: I3f7f13698e88efd7ffeb00c1ba3a070527a3f6a0
Signed-off-by: Daniel Rosenberg <drosen@google.com>
10 years agof2fs_sparseblock: Correctly handle f2fs checkpoint flags
Daniel Rosenberg [Sat, 16 Aug 2014 02:20:33 +0000 (19:20 -0700)]
f2fs_sparseblock: Correctly handle f2fs checkpoint flags

Bug: 15749466
Change-Id: I31ecefc0cf2ebfba1652a8b87fd70b045624ffa4
Signed-off-by: Daniel Rosenberg <drosen@google.com>
10 years agoAndroid.mk: Remove false dependency on host os
Daniel Rosenberg [Fri, 15 Aug 2014 20:13:41 +0000 (13:13 -0700)]
Android.mk: Remove false dependency on host os

Bug: 15749466
Change-Id: Idca63cf0ddc84462485cdd266d473a32833fed74
Signed-off-by: Daniel Rosenberg <drosen@google.com>
10 years agof2fsutils: Added support for sparse f2fs representations
Daniel Rosenberg [Wed, 13 Aug 2014 08:52:54 +0000 (01:52 -0700)]
f2fsutils: Added support for sparse f2fs representations

Bug: 15749466
Change-Id: I27b386e708e04d449fe460d1f9be553b438c9156
Signed-off-by: Daniel Rosenberg <drosen@google.com>
10 years agofix build
Doug Zongker [Tue, 12 Aug 2014 23:55:56 +0000 (16:55 -0700)]
fix build

inode_allocate_file_extents should return NULL if allocation fails.

Bug: 16984795
Change-Id: I7d2b9d61ca81f8e1869dbac3d8bde79bb5799fa9

10 years agoadd option to make_ext4fs to record blocks for each file
Doug Zongker [Tue, 12 Aug 2014 18:35:37 +0000 (11:35 -0700)]
add option to make_ext4fs to record blocks for each file

Add the -B option to make_ext4fs, which causes it to record the block
ranges used for each (regular) file in the image.  We can use this
information to construct more efficient block-based incremental OTAs.

Bug: 16984795
Change-Id: I2a5325bb89948f63c76e93fdfa84c51f9b050104

10 years agoRename micro bench 32 bit
Eric Rowe [Thu, 24 Jul 2014 19:48:38 +0000 (12:48 -0700)]
Rename micro bench 32 bit

Rename micro_bench32 to micro_bench for backwards compatibility.

Change-Id: I130f281967cffc3e337d27e84c4caa66d39d1385

10 years agoverity: fix makefile mixup.
Geremy Condra [Thu, 10 Jul 2014 20:21:45 +0000 (13:21 -0700)]
verity: fix makefile mixup.

BootSigner -> BootSignature mixup.

Change-Id: Ifae0f5d69540996f8b71dfccf4df0db7349269c4

10 years agoverity: Add tools to help OEMs generate signed boot images.
Geremy Condra [Wed, 11 Jun 2014 20:38:45 +0000 (13:38 -0700)]
verity: Add tools to help OEMs generate signed boot images.

Change-Id: Iea200def2fdd8a0d366888bb7b1ae401297063f1

10 years agopuncture_fs: A new utility that is used with fs benchmarking tools.
Mohamad Ayyash [Wed, 25 Jun 2014 23:18:19 +0000 (16:18 -0700)]
puncture_fs: A new utility that is used with fs benchmarking tools.

The tools fills up the filesystem completely then removes a set of files
of predefined size to free up some predefined non-contiguous free space.
It is used with benchmarking tools like fio to collect metrics on a used filesystem with sparse free space.

Change-Id: Ieb1d38c0f95c51462060e541a662c378b79d81fb

10 years agoam f4fca2d5: am 2dd33a8f: Merge "f2fs_utils: make Mac builds happy (copy out mkf2fsus...
JP Abgrall [Wed, 25 Jun 2014 18:46:56 +0000 (18:46 +0000)]
am f4fca2d5: am 2dd33a8f: Merge "f2fs_utils: make Mac builds happy (copy out mkf2fsuserimg.sh)"

* commit 'f4fca2d557337f739fdc1617816a3f7d45c0a124':
  f2fs_utils: make Mac builds happy (copy out mkf2fsuserimg.sh)

10 years agoam e36eaf9d: am a5dc6a8e: Merge "f2fs utils: set correct dependency on dynamic libf2fs"
JP Abgrall [Wed, 25 Jun 2014 18:46:56 +0000 (18:46 +0000)]
am e36eaf9d: am a5dc6a8e: Merge "f2fs utils: set correct dependency on dynamic libf2fs"

* commit 'e36eaf9d3c84b381d3d6556efc00a454eb0d69e8':
  f2fs utils: set correct dependency on dynamic libf2fs

10 years agoam 8cfc86f4: (-s ours) am d2f07839: Merge topic \'f2fs\'
JP Abgrall [Wed, 25 Jun 2014 18:46:55 +0000 (18:46 +0000)]
am 8cfc86f4: (-s ours) am d2f07839: Merge topic \'f2fs\'

* commit '8cfc86f43db78ad9ce72c6bbb40b980b2aab0a3c':
  f2fs utils: Add mkf2fsuserimg.sh and make_f2fs
  f2fs_utils: support new f2fs-tools f2fs_finalize_device API.
  f2fs_utils: provide sparse io and dynamic load.

10 years agoam 2dd33a8f: Merge "f2fs_utils: make Mac builds happy (copy out mkf2fsuserimg.sh)"
JP Abgrall [Wed, 25 Jun 2014 15:05:37 +0000 (15:05 +0000)]
am 2dd33a8f: Merge "f2fs_utils: make Mac builds happy (copy out mkf2fsuserimg.sh)"

* commit '2dd33a8f11b320fc5decd5de57730ab4a1d3aaa4':
  f2fs_utils: make Mac builds happy (copy out mkf2fsuserimg.sh)

10 years agoam a5dc6a8e: Merge "f2fs utils: set correct dependency on dynamic libf2fs"
JP Abgrall [Wed, 25 Jun 2014 15:02:13 +0000 (15:02 +0000)]
am a5dc6a8e: Merge "f2fs utils: set correct dependency on dynamic libf2fs"

* commit 'a5dc6a8e3ca30e815d59cab72e7b0abf9a147e30':
  f2fs utils: set correct dependency on dynamic libf2fs

10 years agoam d2f07839: Merge topic \'f2fs\'
JP Abgrall [Wed, 25 Jun 2014 15:02:12 +0000 (15:02 +0000)]
am d2f07839: Merge topic \'f2fs\'

* commit 'd2f07839cb85ad5b78665892deb12d2d353daab0':
  f2fs utils: Add mkf2fsuserimg.sh and make_f2fs
  f2fs_utils: support new f2fs-tools f2fs_finalize_device API.
  f2fs_utils: provide sparse io and dynamic load.

10 years agoMerge "f2fs_utils: make Mac builds happy (copy out mkf2fsuserimg.sh)"
JP Abgrall [Wed, 25 Jun 2014 14:57:30 +0000 (14:57 +0000)]
Merge "f2fs_utils: make Mac builds happy (copy out mkf2fsuserimg.sh)"

10 years agof2fs_utils: make Mac builds happy (copy out mkf2fsuserimg.sh)
JP Abgrall [Wed, 25 Jun 2014 14:56:32 +0000 (07:56 -0700)]
f2fs_utils: make Mac builds happy (copy out mkf2fsuserimg.sh)

Change-Id: I8f911f2d084aee08f3f53da984d5c3d2a252cb05
Signed-off-by: JP Abgrall <jpa@google.com>
10 years agoMerge topic 'f2fs'
JP Abgrall [Wed, 25 Jun 2014 14:52:38 +0000 (14:52 +0000)]
Merge topic 'f2fs'

* changes:
  f2fs utils: Add mkf2fsuserimg.sh and make_f2fs
  f2fs_utils: support new f2fs-tools f2fs_finalize_device API.
  f2fs_utils: provide sparse io and dynamic load.

10 years agof2fs utils: Add mkf2fsuserimg.sh and make_f2fs
JP Abgrall [Mon, 16 Jun 2014 18:08:45 +0000 (11:08 -0700)]
f2fs utils: Add mkf2fsuserimg.sh and make_f2fs

This is used to generate empty userdata.img files.
Normally, "fastboot format userdata" should be used.

Caveats:
 - It only builds an empty sparse image.
 - windows/mac unsupported

Change-Id: I5fbd9724fdd3f4513e7c91f123fc5fffcb475012
Signed-off-by: JP Abgrall <jpa@google.com>
10 years agof2fs_utils: support new f2fs-tools f2fs_finalize_device API.
JP Abgrall [Fri, 13 Jun 2014 23:10:51 +0000 (16:10 -0700)]
f2fs_utils: support new f2fs-tools f2fs_finalize_device API.

Change-Id: Id5a6a7edc7871a6c0eb452ad7136732b9a730e6a
Signed-off-by: JP Abgrall <jpa@google.com>
10 years agof2fs_utils: provide sparse io and dynamic load.
JP Abgrall [Thu, 12 Jun 2014 06:46:42 +0000 (23:46 -0700)]
f2fs_utils: provide sparse io and dynamic load.

This uses
  external/f2fs-tools LGPL v2.1

It provides low-level IO functions that f2fs-tools/mkfs expects
for writing to the media. In this case we use the sparse lib.

Change-Id: I8d141a0d4d14df9fe84d3b131484e9696fcd8870
Signed-off-by: JP Abgrall <jpa@google.com>
10 years agoMerge "f2fs utils: set correct dependency on dynamic libf2fs"
JP Abgrall [Wed, 25 Jun 2014 14:52:40 +0000 (14:52 +0000)]
Merge "f2fs utils: set correct dependency on dynamic libf2fs"

10 years agof2fs utils: set correct dependency on dynamic libf2fs
JP Abgrall [Wed, 18 Jun 2014 18:55:28 +0000 (11:55 -0700)]
f2fs utils: set correct dependency on dynamic libf2fs

Don't link against it anymore.
Just let dlopen() deal with it correctly.
The "config" struct will come from the f2fs_ioutils
and libf2fs_fmt_host expects to have it global, so let
link with -rdynamic and let dlopen() resolve it.

Be more aggressive with linux-only builds.

Bug: 15717498
Change-Id: I03ebebed1fc652170b44f809df42c1f8595216eb
Signed-off-by: JP Abgrall <jpa@google.com>
10 years agoam ab3233be: am 6aa75175: Merge "Create 32 bit and 64 bit versions of exes."
Christopher Ferris [Wed, 25 Jun 2014 00:28:13 +0000 (00:28 +0000)]
am ab3233be: am 6aa75175: Merge "Create 32 bit and 64 bit versions of exes."

* commit 'ab3233befb8381bd1a15f81f3261fa81dd55f297':
  Create 32 bit and 64 bit versions of exes.

10 years agoam 6aa75175: Merge "Create 32 bit and 64 bit versions of exes."
Christopher Ferris [Tue, 24 Jun 2014 21:39:17 +0000 (21:39 +0000)]
am 6aa75175: Merge "Create 32 bit and 64 bit versions of exes."

* commit '6aa751752e36c570415919990d1ca35d564f09b9':
  Create 32 bit and 64 bit versions of exes.

10 years agoMerge "Create 32 bit and 64 bit versions of exes."
Christopher Ferris [Tue, 24 Jun 2014 21:29:20 +0000 (21:29 +0000)]
Merge "Create 32 bit and 64 bit versions of exes."

10 years agoCreate 32 bit and 64 bit versions of exes.
Christopher Ferris [Tue, 24 Jun 2014 21:27:16 +0000 (14:27 -0700)]
Create 32 bit and 64 bit versions of exes.

Change-Id: Ifc639b7ed97c75faf0ce52475e7c3ec0dc2dd9b9

10 years agoam 676880b9: am 0795553f: Merge "Remove a useless so-called test for arc4random."
Elliott Hughes [Sat, 21 Jun 2014 10:36:54 +0000 (10:36 +0000)]
am 676880b9: am 0795553f: Merge "Remove a useless so-called test for arc4random."

* commit '676880b973daa4f0b214b51596e138a3702e5f17':
  Remove a useless so-called test for arc4random.

10 years agoam 0795553f: Merge "Remove a useless so-called test for arc4random."
Elliott Hughes [Sat, 21 Jun 2014 09:47:22 +0000 (09:47 +0000)]
am 0795553f: Merge "Remove a useless so-called test for arc4random."

* commit '0795553f0c913f3a9086aff42b9ee483c09cf18e':
  Remove a useless so-called test for arc4random.

10 years agoMerge "Remove a useless so-called test for arc4random."
Elliott Hughes [Sat, 21 Jun 2014 07:24:56 +0000 (07:24 +0000)]
Merge "Remove a useless so-called test for arc4random."

10 years agoRemove a useless so-called test for arc4random.
Elliott Hughes [Sat, 21 Jun 2014 05:34:23 +0000 (22:34 -0700)]
Remove a useless so-called test for arc4random.

Bug: 14499627
Change-Id: I01308d022da007f814f3fd8927341dfb3bf7e4cd

10 years agof2fs utils: set correct dependency on dynamic libf2fs
JP Abgrall [Wed, 18 Jun 2014 18:55:28 +0000 (11:55 -0700)]
f2fs utils: set correct dependency on dynamic libf2fs

Don't link against it anymore.
Just let dlopen() deal with it correctly.
The "config" struct will come from the f2fs_ioutils
and libf2fs_fmt_host expects to have it global, so let
link with -rdynamic and let dlopen() resolve it.

Be more aggressive with linux-only builds.

Bug: 15717498
Change-Id: I03ebebed1fc652170b44f809df42c1f8595216eb
Signed-off-by: JP Abgrall <jpa@google.com>
10 years agoam 53ea786b: Merge changes Ic686b4cb,Ie4b6c7ef
Colin Cross [Tue, 17 Jun 2014 23:07:29 +0000 (23:07 +0000)]
am 53ea786b: Merge changes Ic686b4cb,Ie4b6c7ef

* commit '53ea786b38f0e394b0b57e5deb0f8f262cea7819':
  procrank: support >4GB of memory from 32-bit procrank
  libpagemap: support 64-bit kernel from 32-bit libpagemap

10 years agoMerge topic 'f2fs'
JP Abgrall [Wed, 18 Jun 2014 00:48:40 +0000 (00:48 +0000)]
Merge topic 'f2fs'

* changes:
  f2fs utils: Add mkf2fsuserimg.sh and make_f2fs
  f2fs_utils: support new f2fs-tools f2fs_finalize_device API.
  f2fs_utils: provide sparse io and dynamic load.

10 years agoam ef2ec0be: am 53ea786b: Merge changes Ic686b4cb,Ie4b6c7ef
Colin Cross [Tue, 17 Jun 2014 23:12:00 +0000 (23:12 +0000)]
am ef2ec0be: am 53ea786b: Merge changes Ic686b4cb,Ie4b6c7ef

* commit 'ef2ec0beea13ae7de6ec2050e535fc360b4105be':
  procrank: support >4GB of memory from 32-bit procrank
  libpagemap: support 64-bit kernel from 32-bit libpagemap

10 years agoMerge changes Ic686b4cb,Ie4b6c7ef
Colin Cross [Tue, 17 Jun 2014 22:58:58 +0000 (22:58 +0000)]
Merge changes Ic686b4cb,Ie4b6c7ef

* changes:
  procrank: support >4GB of memory from 32-bit procrank
  libpagemap: support 64-bit kernel from 32-bit libpagemap

10 years agoprocrank: support >4GB of memory from 32-bit procrank
Colin Cross [Tue, 17 Jun 2014 21:38:34 +0000 (14:38 -0700)]
procrank: support >4GB of memory from 32-bit procrank

Use uint64_t for sizes.

Change-Id: Ic686b4cbf4406aec1e9b01810924488bff63722e

10 years agolibpagemap: support 64-bit kernel from 32-bit libpagemap
Colin Cross [Tue, 17 Jun 2014 21:37:06 +0000 (14:37 -0700)]
libpagemap: support 64-bit kernel from 32-bit libpagemap

Use uint64_t and lseek64 to handle 64-bit virtual addresses
when libpagemap is compiled as a 32-bit library.

Change-Id: Ie4b6c7ef05aac604011f3ee28b059d9dfcd63edb

10 years agof2fs utils: Add mkf2fsuserimg.sh and make_f2fs
JP Abgrall [Mon, 16 Jun 2014 18:08:45 +0000 (11:08 -0700)]
f2fs utils: Add mkf2fsuserimg.sh and make_f2fs

This is used to generate empty userdata.img files.
Normally, "fastboot format userdata" should be used.

Caveats:
 - It only builds an empty sparse image.
 - windows/mac unsupported

Change-Id: I5fbd9724fdd3f4513e7c91f123fc5fffcb475012
Signed-off-by: JP Abgrall <jpa@google.com>
10 years agof2fs_utils: support new f2fs-tools f2fs_finalize_device API.
JP Abgrall [Fri, 13 Jun 2014 23:10:51 +0000 (16:10 -0700)]
f2fs_utils: support new f2fs-tools f2fs_finalize_device API.

Change-Id: Id5a6a7edc7871a6c0eb452ad7136732b9a730e6a
Signed-off-by: JP Abgrall <jpa@google.com>
10 years agof2fs_utils: provide sparse io and dynamic load.
JP Abgrall [Thu, 12 Jun 2014 06:46:42 +0000 (23:46 -0700)]
f2fs_utils: provide sparse io and dynamic load.

This uses
  external/f2fs-tools LGPL v2.1

It provides low-level IO functions that f2fs-tools/mkfs expects
for writing to the media. In this case we use the sparse lib.

Change-Id: I8d141a0d4d14df9fe84d3b131484e9696fcd8870
Signed-off-by: JP Abgrall <jpa@google.com>
10 years agoam 6d8d16e5: am 1adb147c: Merge "fix libpagemap for x86_64"
Colin Cross [Tue, 17 Jun 2014 19:50:10 +0000 (19:50 +0000)]
am 6d8d16e5: am 1adb147c: Merge "fix libpagemap for x86_64"

* commit '6d8d16e5fe2c94cae49798c7efbeaf53c783a994':
  fix libpagemap for x86_64

10 years agoam 1adb147c: Merge "fix libpagemap for x86_64"
Colin Cross [Tue, 17 Jun 2014 19:46:27 +0000 (19:46 +0000)]
am 1adb147c: Merge "fix libpagemap for x86_64"

* commit '1adb147ca6795eb67c298f60b2e8d7732bc10d6d':
  fix libpagemap for x86_64

10 years agoreduce mkuserimg.sh chattiness
Doug Zongker [Tue, 17 Jun 2014 16:32:14 +0000 (09:32 -0700)]
reduce mkuserimg.sh chattiness

Also improve the log message from the -C option to make_ext4fs.

Change-Id: I22ee4fd51c29995b2e772dcd929e1916eef22aeb

10 years agoMerge "fix libpagemap for x86_64"
Colin Cross [Tue, 17 Jun 2014 19:37:16 +0000 (19:37 +0000)]
Merge "fix libpagemap for x86_64"

10 years agofix libpagemap for x86_64
Colin Cross [Tue, 17 Jun 2014 01:52:47 +0000 (18:52 -0700)]
fix libpagemap for x86_64

libpagemap was storing a virtual pfn in an int, which works on arm64
with 39 bits of virtual address space but fails on x86_64.  Use an
unsigned long instead.

Fixes errors when running procrank on x86_64:
warning: could not read usage for 1

Change-Id: I171c8ee49faa51accf3c1bb69059d549aee04979

10 years agoam fb0c6296: am 9c82554e: Merge "Ignore wipe operation on non-block devices."
David 'Digit' Turner [Mon, 16 Jun 2014 20:51:45 +0000 (20:51 +0000)]
am fb0c6296: am 9c82554e: Merge "Ignore wipe operation on non-block devices."

* commit 'fb0c62963b5fe1b4f36e281c4c02d98d737d08ee':
  Ignore wipe operation on non-block devices.

10 years agoam 9c82554e: Merge "Ignore wipe operation on non-block devices."
David 'Digit' Turner [Mon, 16 Jun 2014 18:02:59 +0000 (18:02 +0000)]
am 9c82554e: Merge "Ignore wipe operation on non-block devices."

* commit '9c82554ee3284b57df9d8dfdf11467066ab0877a':
  Ignore wipe operation on non-block devices.

10 years agooptionally use a canned fs_config when building ext4 fs
Doug Zongker [Mon, 16 Jun 2014 16:07:44 +0000 (09:07 -0700)]
optionally use a canned fs_config when building ext4 fs

In order to accurately re-create old images after changes to
android_filesystem_config.h, we need make_ext4fs and mkuserimg.sh to
be able to take a file containing the desired
uid/gid/mode/capabilities for each path in the filesystem, and use
that instead of the fs_config function that is built in to the binary.

The target_files already contains this file, which is created at the
time of the original build by running the binary fs_config for each
path in the build.

Change-Id: I501dc9544de37a592c1e831b6bf785c086cb6912

10 years agoMerge "Ignore wipe operation on non-block devices."
David 'Digit' Turner [Mon, 16 Jun 2014 17:49:36 +0000 (17:49 +0000)]
Merge "Ignore wipe operation on non-block devices."

10 years agoIgnore wipe operation on non-block devices.
David 'Digit' Turner [Thu, 12 Jun 2014 18:54:50 +0000 (20:54 +0200)]
Ignore wipe operation on non-block devices.

The implementation of make_ext4fs() calls make_ext4fs_internal() by
forcing the |wipe| parameter to true, which is problematic when the
library is used within the emulator (the wipe operation will always
fail on non-Linux platforms).

This patch does the following:

- Add a 'is_block_device_fd()' function to check that a file descriptor
  points to a real block device.

- Modify the implementation of wipe_block_device() uses it to return
  silently when trying to wipe a non-block-device file.

- Add a WIPE_IS_SUPPORTED flag in wipe.h that indicates whether
  block device wiping is supported on the current platform
  (for now, this is only the case on Linux).

BUG=NONE

Change-Id: I62b62b7c3e99b465c3b876154231e7c2fe541b23

10 years agoam b31b4cc0: am 13e929c1: Merge "Don\'t set LOCAL_MODULE_PATH for native test."
Ying Wang [Wed, 11 Jun 2014 17:58:41 +0000 (17:58 +0000)]
am b31b4cc0: am 13e929c1: Merge "Don\'t set LOCAL_MODULE_PATH for native test."

* commit 'b31b4cc07debb0a987f7c20d18b6cef059932d3e':
  Don't set LOCAL_MODULE_PATH for native test.

10 years agoMerge "don't use sun's base64 encoders"
Doug Zongker [Tue, 10 Jun 2014 21:01:19 +0000 (21:01 +0000)]
Merge "don't use sun's base64 encoders"

10 years agodon't use sun's base64 encoders
Doug Zongker [Tue, 10 Jun 2014 20:45:24 +0000 (13:45 -0700)]
don't use sun's base64 encoders

Use of sun.misc.BASE64Decoder considered harmful.  Use Bouncy Castle's
instead, which come from the platform source tree.

Change-Id: I7cc0d489854b9b33ddfc90501d064fa1142d9eee

10 years agoam 13e929c1: Merge "Don\'t set LOCAL_MODULE_PATH for native test."
Ying Wang [Mon, 9 Jun 2014 22:56:35 +0000 (22:56 +0000)]
am 13e929c1: Merge "Don\'t set LOCAL_MODULE_PATH for native test."

* commit '13e929c11c07e5cbae5db0d5887845ec6c6d08a4':
  Don't set LOCAL_MODULE_PATH for native test.

10 years agoadd suspend stress tester
Colin Cross [Fri, 6 Jun 2014 01:45:44 +0000 (18:45 -0700)]
add suspend stress tester

Add a command line tool that will fire an alarm every few seconds
to stress test going in and out of suspend.

Change-Id: Iaea31fe2bc8cdc8e5ce3e55fe56aed85680a5adc

10 years agoMerge "Don't set LOCAL_MODULE_PATH for native test."
Ying Wang [Mon, 9 Jun 2014 22:52:33 +0000 (22:52 +0000)]
Merge "Don't set LOCAL_MODULE_PATH for native test."

10 years agoDon't set LOCAL_MODULE_PATH for native test.
Ying Wang [Mon, 9 Jun 2014 22:22:47 +0000 (15:22 -0700)]
Don't set LOCAL_MODULE_PATH for native test.

The build system will set it up automatically.

Change-Id: I528aa6c296f2ca8ffe8c74beca2cd49117b229e3

10 years agoMerge "verity: Move build_verity_tree.cpp to use BN_* for hex conversion."
Geremy Condra [Sat, 17 May 2014 05:16:12 +0000 (05:16 +0000)]
Merge "verity: Move build_verity_tree.cpp to use BN_* for hex conversion."

10 years agoverity: Move build_verity_tree.cpp to use BN_* for hex conversion.
Geremy Condra [Sat, 17 May 2014 02:11:10 +0000 (19:11 -0700)]
verity: Move build_verity_tree.cpp to use BN_* for hex conversion.

This fixes an issue where hexlified salts  weren't being properly
consumed by moving to OpenSSL's BN_* functions.

Bug: 15018770
Change-Id: Iece1f2991d3b23d4ae7ff66b5fb02abc388cfa80

10 years agoam 14119df1: am b733b3c7: Merge "The situation len = 0 and absolute = false need...
Colin Cross [Fri, 16 May 2014 00:16:39 +0000 (00:16 +0000)]
am 14119df1: am b733b3c7: Merge "The situation len = 0 and absolute = false need to be handled"

* commit '14119df19e45b968774fc7242df780b87d93fef4':
  The situation len = 0 and absolute = false need to be handled

10 years agoam b733b3c7: Merge "The situation len = 0 and absolute = false need to be handled"
Colin Cross [Fri, 16 May 2014 00:13:38 +0000 (00:13 +0000)]
am b733b3c7: Merge "The situation len = 0 and absolute = false need to be handled"

* commit 'b733b3c7b0601326801d43f548aa139ca0be721e':
  The situation len = 0 and absolute = false need to be handled

10 years agoMerge "The situation len = 0 and absolute = false need to be handled"
Colin Cross [Fri, 16 May 2014 00:07:06 +0000 (00:07 +0000)]
Merge "The situation len = 0 and absolute = false need to be handled"

10 years agoam f72ab135: am cb8ac609: Merge "libpagemap: handle zero length memory regions"
Colin Cross [Thu, 15 May 2014 01:39:05 +0000 (01:39 +0000)]
am f72ab135: am cb8ac609: Merge "libpagemap: handle zero length memory regions"

* commit 'f72ab1352b7161c6d339b1ee7b766fa9e7459959':
  libpagemap: handle zero length memory regions

10 years agoam cb8ac609: Merge "libpagemap: handle zero length memory regions"
Colin Cross [Thu, 15 May 2014 01:35:06 +0000 (01:35 +0000)]
am cb8ac609: Merge "libpagemap: handle zero length memory regions"

* commit 'cb8ac609ee27a9e5e6e13bc30447ed3a13964ccd':
  libpagemap: handle zero length memory regions

10 years agoMerge "libpagemap: handle zero length memory regions"
Colin Cross [Thu, 15 May 2014 01:29:02 +0000 (01:29 +0000)]
Merge "libpagemap: handle zero length memory regions"

10 years agolibpagemap: handle zero length memory regions
Colin Cross [Thu, 15 May 2014 01:20:38 +0000 (18:20 -0700)]
libpagemap: handle zero length memory regions

/proc/pid/maps may report a zero-length memory region for a 4kB
PROT_GROWSDOWN region because it subtracts 4kB for the guard page.
Return 0 instead of -1 when this occurs, and set range_out to NULL
and len to 0.  All existing callers of pm_process_pagemap_range
will not dereference range_out if len is 0.

Bug: 14683277
Change-Id: If405651ad034dda780b93fab2dc616e177a0b917

10 years agoam fc8da790: am 676e964d: Merge "Remove a test for dead code."
Elliott Hughes [Wed, 14 May 2014 01:34:04 +0000 (01:34 +0000)]
am fc8da790: am 676e964d: Merge "Remove a test for dead code."

* commit 'fc8da7901a17f5bf064d39e6d9327c2094851428':
  Remove a test for dead code.

10 years agoam 676e964d: Merge "Remove a test for dead code."
Elliott Hughes [Wed, 14 May 2014 01:29:24 +0000 (01:29 +0000)]
am 676e964d: Merge "Remove a test for dead code."

* commit '676e964d0be749b9899511f5f7212c3765c8f38a':
  Remove a test for dead code.

10 years agoMerge "Remove a test for dead code."
Elliott Hughes [Wed, 14 May 2014 01:19:18 +0000 (01:19 +0000)]
Merge "Remove a test for dead code."

10 years agoRemove a test for dead code.
Elliott Hughes [Wed, 14 May 2014 01:17:25 +0000 (18:17 -0700)]
Remove a test for dead code.

Bug: 14903517
Change-Id: I139ae922c6c9468606d3145f0c74361ed789d949

10 years agoMerge "verity: remove old python version"
Colin Cross [Tue, 6 May 2014 18:15:22 +0000 (18:15 +0000)]
Merge "verity: remove old python version"

10 years agoam 22e96e4d: am 63a3cc14: Merge "Add {BEGIN,END}_DECLS to header file."
Torne (Richard Coles) [Tue, 6 May 2014 10:44:20 +0000 (10:44 +0000)]
am 22e96e4d: am 63a3cc14: Merge "Add {BEGIN,END}_DECLS to header file."

* commit '22e96e4d8449bbb1bad5a5b0a546882997d38148':
  Add {BEGIN,END}_DECLS to header file.