fix bug in usb hub initialization

Change-Id: I4dce451af970bd9dcaf4f2ac57325bc19cb69d82
Merge "Make sure less variables are been used non initialized"
Merge "fix bug in usb hub initialization"
goldfish_nand.c: Change sizes

Change page_size to 512 and extra_size to 0. This is needed
to use ext4 filesystems on goldfish.

Bug: https://code.google.com/p/android/issues/detail?id=38561
Change-Id: I9f9ea87f467e9f2fe913aa367ab1f891cbbca48f
memcheck: fix guest pc <-> host pc mapping on 64 bit arch

Currently -memcheck A and friends do not report guest PCs properly on 64-bit
hosts, because the code assumes host and guest pointer sizes match. As result,
memcheck can't figure out guest PC so it renders functionality virtually
worthless. This fix changes tpc2gpc from target_ulong to uintptr_t. This works
on both 32-bit and 64-bit hosts, as the type represents unsigned integer
matched to pointer on a given architecture.

Change-Id: Ie8515796c56ef1b3132d0b3b0dd2bee1d9ec072d
Signed-off-by: Andrey Petrov <andrey.petrov@gmail.com>
Merge "goldfish_nand.c: Change sizes"
Merge "memcheck: fix guest pc <-> host pc mapping on 64 bit arch"
Revert "goldfish_nand.c: Change sizes"

This reverts commit 53a9dc320839683c8b374220065d86f277d5843b.

Change-Id: I7505d1196d2fe95076cfafbf0a640f0683b91af7
Merge "Revert "goldfish_nand.c: Change sizes""
Change sizes for ext4 images

Change page_size to 512 and extra_size to 0. This is needed to use ext4
filesystem, which is used beyond apiLevel 18, on goldfish.  A new
hardware property has been added to specify which filesystem to use:
ext4 or yaffs2. The default for this property is to use yaffs2 if
apiLevel <= 18 and use ext4 otherwise. It can be overridden in AVD's
config.ini by specifying "hw.useext4=yes".

Bug: http://b.android.com/38561
Change-Id: I978afe0f742795beef66e7eaee59a8d9e76d4602
Merge "Change sizes for ext4 images"
Auto-detect ext4 image file.

Although the existing code can detect the usage of ext4 file
system by the API level.  However, there might be some
problem when we are building and running the emulator in
the source tree.

This CL workaround this issue by checking the magic word in
the ext4 header.  If the system.img has the magic word at
0x438, then add hw.useext4 to the hardware-qemu.ini.

Related Issue:
http://code.google.com/p/android/issues/detail?id=38561

Change-Id: I0b3606911cba5f52d92157accaaba3b2caef85c1
Merge "Auto-detect ext4 image file."
emulator: Add option to control SELinux enforcement.

This change adds the following command line
options to the emulator:

  -selinux disabled
  -selinux permissive

This configures SELinux in either permissive or disabled modes.

"disabled" completely disables userspace support for SELinux. No
policy is ever loaded, nor is the SELinux filesystem /sys/fs/selinux
ever mounted.

"permissive" loads the SELinux policy, but puts SELinux into
permissive mode. SELinux policy violations are logged, but not rejected.

Change-Id: I97974deb5b39d5caab36032e8b282281c1e478ea
Merge "emulator: Add option to control SELinux enforcement."
Set ro.config.low_ram=true when AVD has <= 512M of RAM

This is a partial fix for Issue 11377795

Change-Id: I1f1b1be527e32f25ede5c80ff960051644d9e717
Merge "Set ro.config.low_ram=true when AVD has <= 512M of RAM"
Add support for xxhdpi and xxxhdpi when injecting a skin dpi.

Change-Id: I5c89b33ac317b804abb88a7f29faf51809dda1d2
Merge "Add support for xxhdpi and xxxhdpi when injecting a skin dpi."
Handle long library search paths

Before launching the arch-specific emulator, the emulator wrapper adds
a directory to the library search path (LD_LIBRARY_PATH or PATH).
There were two problems that this change fixes:

- The new path was assembled in a 2048 byte buffer. If the assembled
  path was longer than that, it would be truncated, in effect removing
  some directories. This change dynamically allocates the buffer so
  truncation doesn't happen.

- On Windows, the new directories were appended instead of prepended
  to the existing search path. If the path was truncated due to the
  previous problem, the new directory wouldn't be added to the path,
  and the arch-specific emulator would fail to load. This isn't a real
  problem now that truncation doesn't occur, but this change makes
  the Windows version prepend the directory for consistency's sake.

Bug: http://b.android.com/33336
Change-Id: I13068c4871254f8507eea265f6a1b698e5e1e3ce