bootanim: introduce new property type and permission

<3>[   58.921827] init: sys_prop: permission denied uid:1003  name:service.bootanim.exit

Signed-off-by: Humberto Borba <humberos@gmail.com>
Change-Id: I98d4c79bc021381ee30d47d056522db248ff679b
adb: Fix backup fallback

 * Check for existence of binary first

Conflicts:
	adb/backup_service.c

Change-Id: I5c1884655ae031f51cb935221ae7870b016e259d
adb: configure /system file permission with fs_config

adbd changes the permissions of files uploaded by copying
owner's permission to group and other. This causes kernel
load failure if any changes are made to kernel modules
followed by ``adb push'' or ``adb sync'' because file mode
644 would become 666.

The change uses fs_config to get the target mode of files.

In addition, the SELinux file label is set incorrectly
on synced files. Set the label properly.

Change-Id: I354db848f39adfbf189d7e8d3b028e8d763c772f
Signed-off-by: Liang Cheng <licheng@nvidia.com>
Bug: 12264775
sdcard: fix usage for -w and -s options

Change-Id: I0ef4299d2ccf99a18970f02d4bd4e7c28dc5335e
sdcard: Allow building as a static library

 * Split main() out in order to allow linking with a multi-call
   executable such as recovery.

Conflicts:
	sdcard/Android.mk

Change-Id: I3325135e47e4dd5af3912f5ce67ec64007d54a63
Do not add default route during ifc_configure

Avoid duplicate default routes.
Remove adding of default routes during interface configuration as
route add/remove operation is managed by ConnectivityService via netd.
(cherry picked from commit 4a48635c72d91cf8decb7653948fe0c76de46098)

Change-Id: I982b95a44bf91d3850ca7752e307c1b1b6a66ecf
init: fix cache permissions

required fo dexopt

Signed-off-by: Humberto Borba <humberos@gmail.com>
Change-Id: I299509b68e82a2b3c60eabec1998eaa12c60bc71
system: core: increase the polling time for remount_ro to 3600

eMMC4.5 introduces an addition of cache on the device.
We experienced long flush durations in some of the devices,
and therefore the adb reboot resets the target before the flush
completes.
Latest tests show that increasing it to 2400 wasn't enough thus
it was increased to 3600.

Conflicts:
	libcutils/android_reboot.c

Change-Id: Ifbe7af16aa1861d0d57c808b0240361c0317d5c5
init: Fix queue_all_property_triggers with nonexistent properties

Don't queue actions for "on property=*" if the property does not exist.
This fixes these errors on boot:

    init: property 'sys.powerctl' doesn't exist while
    expanding '${sys.powerctl}'
    init: powerctl: cannot expand '${sys.powerctl}

Change-Id: I3bd354d73a860f856be5df2c654f940445f9efd9
toolbox: Add levelFromUid categorization support to restorecon

This is necessary for the app data relabeling on migrated devices
to include the proper app context. Freshly installed apps get this
done automagically, as do newly created files.

Change-Id: If7421dac01c6ae8bd78e66f71e69298ed850a7ab
init: set permissions on governors

1. interactive
2. ondemand

Signed-off-by: Humberto Borba <humberos@gmail.com>
Change-Id: Ic609ba53981fa0156c1d0d1decf32bbc61a38df9