Commit graph

764 commits

Author SHA1 Message Date
Nick Kralevich
1450586ffd create /data/misc/gatekeeper
Change-Id: I7631401ac21b60a22f6fd4052814186bf3bc2b05
2015-04-20 08:55:12 -07:00
Neil Fuller
08913228e1 Executable to run on boot that removes old tzdata if needed
tzdatacheck is exec'd from init.rc early in boot just after /data is
mounted. It checks to make sure that the tz rule data in /data
is newer than the version in /system. If the data is older it is
deleted. This is to address problems with earlier tz rule updates
that occurred: after an OTA upgrade previous updates in /data
would override newer versions in the system partition.

Includes change to init.rc neccessary to run it at boot time. Other
changes are in external/selinux.

Bug: 19941636
Bug: https://code.google.com/p/android/issues/detail?id=35730
Change-Id: I7cc61e058424c856da88f11ff9b259f34cb39dc7
2015-04-13 11:38:32 +01:00
Mark Salyzyn
124ff15bca rootfs: init start logd in post-fs
The earliest point we can start logd is after /system is mounted.
Ideally on post-fs-system (does not exist), post-fs will do.
As insurance, we will also make sure logd is started if a
logd-reinit is requested. This results in logd starting at least
4 processes earlier than it does currently, with a tighter
grouping of threads which means we are taking advantage of a
lighter CPU load at the time, rather than taking cycles during
heavy activity during core startup.

Change-Id: If4f0bd3a53bb4c47500a54d741ca635d87c0c330
2015-04-08 09:18:50 -07:00
Nick Kralevich
9c0437fba7 Create /data/system/heapdump for system_server
Bug: 20073185
Change-Id: I6fd83d33da33d048fdd6b07fa1f675ecb4f4eb2c
2015-04-07 16:44:43 -07:00
Paul Lawrence
b8c9d273a0 Revert "Revert "Adding e4crypt support""
Fix build break caused by original change

This reverts commit 84b0bab58f.

Change-Id: I99fbd7c3d1ed92db1f546033c8493bb71a327924
2015-03-31 13:02:13 -07:00
Elliott Hughes
da40c00137 Log more timing information from init.
Also make important events in init's life NOTICE rather than INFO,
and ensure that NOTICE events actually make it to the kernel log.

Also fix the logging so that if you have a printf format string
error, the compiler now catches it.

Also give messages from init, ueventd, and watchdogd distinct tags.
(Previously they'd all call themselves "init", and dmesg doesn't
include pids, so you couldn't untangle them.)

Also include the tag in SELinux messages.

Bug: 19544788
Change-Id: Ica6daea065bfdb80155c52c0b06f346a7df208fe
2015-03-28 00:25:22 -07:00
Elliott Hughes
cc86fb2b29 Switch init over to _PATH_DEFPATH.
Bug: 19564110
Change-Id: I343b4a360b10319dca13ab01f2d411ff940e9052
2015-03-17 20:01:13 -07:00
Mark Salyzyn
48d06069a8 init.rc: logd --reinit on changes to persistent properties
Bug: 19681572
Change-Id: I3187aa348dae79fa5822ffb7ee9566919a7a04e6
2015-03-12 12:24:53 -07:00
Mark Salyzyn
1dd71ae12e am f33c3bc9: Merge "init: drop dontpanic & apanic initialization"
* commit 'f33c3bc9602e4a369c4cc5d28357b8f73a3eed6c':
  init: drop dontpanic & apanic initialization
2015-02-27 19:34:33 +00:00
Mark Salyzyn
1eaba37aae init: drop dontpanic & apanic initialization
Bug: 19050686
Bug: 19525200
Change-Id: Id81abe3b44283b439390b42db7a9da23748dee0a
2015-02-27 07:03:01 -08:00
Nick Kralevich
398ade817b am 7bb72b73: Merge "seclabel use on services out of system partition"
* commit '7bb72b73b0291636721d83a45adad175163361ec':
  seclabel use on services out of system partition
2015-02-26 01:07:12 +00:00
William Roberts
6889007627 seclabel use on services out of system partition
These services can make use of type transitions already
present in the base policy.

Change-Id: Id785c39c4ea44598c64dc499bd943c73bc55ca85
2015-02-23 13:50:37 -08:00
Elliott Hughes
9c1bc6bbc8 am 29576ae8: Merge "/vendor is sometimes on a separate partition now."
* commit '29576ae8901eb95d4c8a34f242a282b2fb73d35f':
  /vendor is sometimes on a separate partition now.
2015-02-14 05:08:42 +00:00
Elliott Hughes
3a5d71ac60 /vendor is sometimes on a separate partition now.
Change-Id: I3217c272ea38ab8212056e0432d0ededacd362f6
2015-02-13 16:59:00 -08:00
Elliott Hughes
0903c13ade am 265df6f5: Merge "bootchart: fix bootchart can not be triggered problem"
* commit '265df6f50c508710f0b717d67650732baa906976':
  bootchart: fix bootchart can not be triggered problem
2015-02-12 20:32:33 +00:00
Yongqin Liu
a197ff12dd bootchart: fix bootchart can not be triggered problem
bootchart uses a file on the data partition to decide if it should collect
data for bootchart, but the data partition will be mounted by the mount_all
command in the "on fs" section, and it will be only added into the action
queue when command "trigger fs" is executed, but that's after the
bootchart_init action (late_init).

This change makes bootchart_init a builtin command of init,
and make it executed as the first command of "on post-fs" section
which will be triggered after the "on fs" section.

This change also refactors the bootchart code to all be in bootchart.cpp.

Change-Id: Ia74aa34ca5b785f51fcffdd383075a549b2a99d9
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
2015-02-12 12:13:24 -08:00
Paul Lawrence
a173891532 am 317b4024: Revert "Make encryption configurable"
* commit '317b4024a2a46b8c57abfa08f2a649df13572bd3':
  Revert "Make encryption configurable"
2015-02-07 00:11:12 +00:00
Paul Lawrence
317b4024a2 Revert "Make encryption configurable"
This reverts commit bda6272446.

The original fix seems to have led to boot failures in QA. Rather than
risk shipping, revert the change. Bug 18764230 reopened.

Requires change
    https://googleplex-android-review.git.corp.google.com/#/c/629764/

Bug: 19278390
Bug: 19199624

Change-Id: I8b6ab585666f2b0f585ffb2a5f61ac2e3462e06e
2015-02-06 17:32:09 +00:00
Greg Hackmann
86cdce1aab am f52338fe: Merge "rootdir: enable armv8_deprecated swp hook"
* commit 'f52338fe1e8f74123a895db591d6a2a53061a2b1':
  rootdir: enable armv8_deprecated swp hook
2015-02-05 23:21:19 +00:00
Greg Hackmann
cee8757f92 rootdir: enable armv8_deprecated swp hook
The upstream kernel now includes support for emulating legacy AArch32
instructions on ARMv8 devices.  By default this framework emulates
deprecated instructions but not obsolete instructions.

Android requires support for the obsolete SWP and SWPB instructions on
all ARM devices, so override this default for the swp emulation hook.

Change-Id: I82b9bdb564413ec7c1a101da75a9928aebe1606b
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2015-02-05 13:38:58 -08:00
Nick Kralevich
e1f62802f6 am d07555db: Merge "ensure /data/tombstones exists on all Android devices"
* commit 'd07555dba01d64011b0d611dd6d3b197b216c163':
  ensure /data/tombstones exists on all Android devices
2015-01-31 07:49:28 +00:00
Nick Kralevich
0359d778a5 ensure /data/tombstones exists on all Android devices
/data/tombstones is referenced by core platform code, but is not
guaranteed to exist on all Android devices. Move the directory
creation out of device specific files and into the core
init.rc file.

Bug: https://code.google.com/p/android/issues/detail?id=93207
Change-Id: I94ae5199a6a32c4fe555ca994fc4a8345e0c9690
2015-01-30 17:38:06 -08:00
Paul Lawrence
36d0eaecd7 Make encryption configurable
Delay mounting encryptable but unencrypted volumes until we can
check the ro.vold.forceencrypt flag, then optionally encrypt.

Requires matching vold change from
    https://googleplex-android-review.git.corp.google.com/#/c/615309/

Bug: 18764230
Change-Id: If22008be8de6a4f3216b349f81ace49be1730314
2015-01-28 11:41:53 -08:00
Paul Lawrence
7e890a4d32 am bda62724: Make encryption configurable
* commit 'bda6272446454886339841a62daaa1b66c07ad60':
  Make encryption configurable
2015-01-26 16:22:49 +00:00
Paul Lawrence
bda6272446 Make encryption configurable
Delay mounting encryptable but unencrypted volumes until we can
check the ro.vold.forceencrypt flag, then optionally encrypt.

Requires matching vold change from
    https://googleplex-android-review.git.corp.google.com/#/c/615309/

Bug: 18764230
Change-Id: If22008be8de6a4f3216b349f81ace49be1730314
2015-01-21 10:03:29 -08:00
Mark Salyzyn
8c7380b476 am 3802b5d4: Merge "rootdir: add pstore"
* commit '3802b5d4c5cb14864dcdd8820e9140b81a2d7d78':
  rootdir: add pstore
2015-01-14 17:46:46 +00:00
Mark Salyzyn
4b0313e4d3 rootdir: add pstore
/dev/pmsg0 used to record the Android log messages, then
on reboot /sys/fs/pstore/pmsg-ramoops-0 provides a means
to pull and triage user-space activities leading
up to a panic. A companion to the pstore console logs.

Change-Id: Id92cacb8a30339ae10b8bf9e5d46bb0bd4a284c4
2015-01-14 17:15:39 +00:00
Yabin Cui
2cd0563c53 am d3119b19: Merge "Add ip6-localhost to /system/etc/hosts."
* commit 'd3119b1962ef5c0d15b9cc22beb9ded040b44dcb':
  Add ip6-localhost to /system/etc/hosts.
2015-01-13 23:39:26 +00:00
Yabin Cui
25147416bb Add ip6-localhost to /system/etc/hosts.
Bug: 18791191
Change-Id: Id7cad8cfccadeb319f0dc7dcba8148a457f9f87d
2015-01-13 14:38:21 -08:00
Elliott Hughes
a0959e90f5 am 8eb770d3: Merge "Remove long-dead readtty."
* commit '8eb770d37cd9470630fdbe496f22b7a04549fef7':
  Remove long-dead readtty.
2014-11-25 19:03:12 +00:00
Elliott Hughes
b120134bd1 Remove long-dead readtty.
Change-Id: I15ae14542214a3802d43892da0d03cfb33e63c96
2014-11-24 12:01:21 -08:00
Nick Kralevich
ac12f25004 Ensure /data/adb exists
automerge: 6672300

* commit '667230074b6e4e306a50d84a88a57bf4f1ec0291':
  Ensure /data/adb exists
2014-11-05 19:18:32 +00:00
Nick Kralevich
667230074b Ensure /data/adb exists
Ensure that /data/adb always exists. This directory is used
for writing adb debugging information when persist.adb.trace_mask
is set.

Bug: https://code.google.com/p/android/issues/detail?id=72895

(cherry picked from commit 89252ce31a)

Change-Id: I44e01bee50125f4e6e5fff6e74c53bb2022ce355
2014-11-05 10:17:39 -08:00
Bill Yi
aad358fbc1 Merge commit 'b2042f7263c7bbacc5115de4a42c5a96b64a06f2' into HEAD 2014-10-22 08:49:05 -07:00
Nick Kralevich
147de7e147 am 37d70f53: am c0b4b8b0: Merge "Ensure /data/adb exists"
* commit '37d70f53672c8878a5ce5506d6d89b851400f8e6':
  Ensure /data/adb exists
2014-10-21 17:10:47 +00:00
Nick Kralevich
89252ce31a Ensure /data/adb exists
Ensure that /data/adb always exists. This directory is used
for writing adb debugging information when persist.adb.trace_mask
is set.

Bug: https://code.google.com/p/android/issues/detail?id=72895
Change-Id: I9cee2a0202417ff72a5ede7742e25877f51732dd
2014-10-21 16:16:39 +00:00
Arve Hjønnevåg
b50d0cd53f Merge "rootdir: Make trusty version readable by dumpstate" into lmp-mr1-dev 2014-10-20 21:53:59 +00:00
Arve Hjønnevåg
7770252a84 rootdir: Make trusty version readable by dumpstate
Change-Id: I761650d286b454f1fe01a585e7cd6ec769bfc527
2014-10-16 16:11:37 -07:00
Dmitriy Ivanov
976e1b6431 Remove libsigchain from LD_PRELOADs
Bug: 15345057
Bug: 15426766

(cherry picked from commit c9f9f35efa)

Change-Id: If54e1aeaa1e2abe061ac19666af4f4e058b81df2
2014-10-16 11:45:16 -07:00
Dmitriy Ivanov
1e2bec489c resolved conflicts for merge of 3f95c89d to lmp-dev-plus-aosp
Change-Id: I5184dcfa91a11a210c60e60a4fffc26d2c9f116f
2014-10-14 10:50:59 -07:00
Dmitriy Ivanov
c9f9f35efa Remove libsigchain from LD_PRELOADs
Bug: 15345057
Bug: 15426766
Change-Id: If0b7f59a59824e30aa0c33dad76c7a44932180de
2014-10-07 13:39:02 -07:00
Riley Andrews
522d72b702 Make the default cgroup, the foreground cgroup.
All kernel services will now be in the same cgroup as
foreground applications. This will now make kernel threads
not implicitly higher priority than android foreground
services.

Bug 17681097

Change-Id: I28e81c7aade50428d5395df86f00ce01c1e7af02
2014-10-07 19:24:54 +00:00
Mike Lockwood
7569b7b39f Merge "Add bootanimation to audio group so it can play boot sound" into lmp-dev 2014-10-06 18:40:46 +00:00
Mike Lockwood
7e58899bcf Add bootanimation to audio group so it can play boot sound
Bug: 17674304

Change-Id: I5d31bc024fa36fedac2c0ba5c4a8b100937183ad
2014-10-02 16:22:43 -07:00
Fred Fettinger
331a939bf8 init.trace.rc: fix race condition with class_start core
The systrace permissions from init.trace.rc and the "class_start core"
which launches surfaceflinger are both in an "on boot" section. However,
the init.trace.rc commands are parsed after all commands in init.rc.
This means that "class_start core" is executed before the chmod command
which allows processes to write to trace_marker. If any services
execute their first trace command before the chmod occurs, then that
service won't be able to write traces until the service is restarted.

To fix this, run all of the init.trace.rc commands in the "early-boot"
section to ensure they are completed first.

Bug: 17612265
Change-Id: Ibf544762173d5ba98272c66ef485d8eab7d70bf3
2014-10-01 12:29:29 -07:00
Badhri Jagan Sridharan
97b536f1fb init.usb.rc: Change product id to for add only config
Change product id from D002 to 4EE7 when adb is the
only supported function

Change-Id: I8f6bcb9a1dc5ea6da0493a2dd730f9ac1f0bed24
2014-09-05 12:33:46 -07:00
Alex Light
c692410e16 Change /dalvik-cache to be owned by root.
Bug: 16875245

(cherry picked from commit 3878ebd724)

Change-Id: I29a70215a2207bc4e0db02ab751d32a68edf4b66
2014-08-28 16:56:36 -07:00
Alex Light
3878ebd724 Change /dalvik-cache to be owned by root.
Bug: 16875245

Change-Id: I29a70215a2207bc4e0db02ab751d32a68edf4b66
2014-08-27 15:42:19 -07:00
Andres Morales
314313a991 Move bootanim and surfaceflinger to class core
They have no dependencies on /data so can be started early.
This permits us to unmount /data while bootanimation is running,
allowing an uninterrupted first boot encryption sequence.

Bug: 17260550
Change-Id: I323fe23e8cf488d8bc136387efdd9fcea96625eb
2014-08-26 20:09:10 +00:00
Paul Lawrence
a005e7795e Merge "Enable not rebooting during default encryption" into lmp-dev 2014-08-25 20:28:36 +00:00