Commit graph

1282 commits

Author SHA1 Message Date
Ryan Campbell
0b36473272 Add global GCOV_PREFIX option.
When native coverage is enabled, add a global GCOV_PREFIX
environment variable specifying that gcda files be output
with path prefix /data/local/tmp.

Bug: 35635587
Test: make NATIVE_COVERAGE=true; check init.environ.rc
Change-Id: I40972aea3ca3168d0687bdc93e9d4b7b3a1071b9
2017-02-27 15:00:18 -08:00
Michael Wright
14667c19cd Revert "Only allow system to write to existing input nodes."
This reverts commit 344e929e6d.

Bug: 35301292
Change-Id: Ib6805c986c0aa88d14652de59ad4602b1cce8b56
2017-02-21 17:12:59 +00:00
Narayan Kamath
eeabbeba16 Reapply 1339871138: Only apply schedTune boost to top-app tasks
Parts of this change were accidentally reverted by an incorrect
manual merge conflict resolution.

Bug: 35306127
Test: manual
Change-Id: I8e6d6b07dcaa548775213dd42ba9def7431c62d3
2017-02-13 17:34:51 +00:00
Todd Poynor
44ee2b0ef8 init.rc: create /data/misc/reboot for storing reboot reason
Create /data/misc/reboot if not already.

Bug: 30994946
Test: manual: reboot command; modified thermal-engine.conf
Change-Id: I66418beba539f76759b44742af7700f26a2c1f87
2017-02-10 19:26:13 +00:00
Michael Wright
344e929e6d Only allow system to write to existing input nodes.
This prevents the shell user from injecting input as if it were coming
from an existing input device, which in turn makes it easier for malware
/ abuse analysis to detect when someone is injecting input via the
command line vs a real user using a device.

(cherrypick of 95637eb2a332b9a09914b1bf32c10fccfba4a175.)

Bug: 30861057
Test: ran getevent, saw correct output, played with device
Change-Id: Ib53eea1b7767f25510b5d36fe6109101a9fad8e0
2017-02-09 14:45:25 -08:00
Steven Moreland
f38aab4621 init.rc, typo: fs-post-data -> post-fs-data
Test: pass
Change-Id: Icafdb7ec61935b35db85096b49e7f232a456f620
2017-01-25 10:52:40 -08:00
Josh Gao
0ad5107e51 Actually don't start tombstoned until /data is mounted.
Bug: http://b/34461270
Test: boot is actually faster
Test: tombstoned still started by init
Change-Id: I4976abef108bbb6fad264f9b68cbc1fba711085b
2017-01-23 16:01:14 -08:00
Treehugger Robot
b479a5002e Merge "init: don't start tombstoned until /data is mounted." 2017-01-20 22:13:38 +00:00
Josh Gao
42a0fed78b init: don't start tombstoned until /data is mounted.
When vold mounts the encrypted /data partition, it first checks for and
kills processes that have open fds to the tmpfs placeholder at /data.
This resulted in a 20 second boot-time regression (vold's timeout period)
when tombstoned was started before vold.

Bug: http://b/34461270
Test: boot is faster, no messages from vold in console spew
Test: tombstoned still started by init
Change-Id: Ib5e9ddb05f40c9da852f00e103861c6ff2d94888
2017-01-20 13:18:51 -08:00
Dave Weinstein
44f7e4f421 Move the kptr_restrict setting from init.rc to init.cpp.
Also ensure that it uses the highest supported value, and
abort if the value is not above a minimum threshold.

Test: Tested against the curent kernel (maximum value of 2,
      set to 0 by the kernel initially) and against a
      modified kernel (maximum value of 4, set to 4 by the
      kernel initially)

Bug: 30368199
Change-Id: I608db577258b68b390ffe96f452e1f7c0bc9ad8a
2017-01-20 09:40:43 -08:00
Winter Wang
60c763ed52 init: usb: fix audio_source function typo
for audio_source function instance, there exist 2 function name here:
    "audio_source.gs2" and "audio_source.gs3"
I believe this usb accessory audio name "audio_source.gs2" is a typo,
as there is no need to create another audio_source instance.

Test: Manual

Change-Id: I70b513db474632eb990131c285c8d5105c17970f
Signed-off-by: Winter Wang <wente.wang@nxp.com>
2017-01-17 14:27:34 -08:00
Josh Gao
72d4c42cd5 Merge "adb: remove support for legacy f_adb interface." 2017-01-12 21:24:34 +00:00
Paul Lawrence
3d8ade3f24 Set right attributes on tracing folder
Since splitting tracefs out from debugfs, we now need to set the
attributes explicitly on tracing folder.

Test: Run adb shell atrace -c -b 16000 -t 5 gfx
Bug: 34197733
Change-Id: If2a962332b6d1ec227e289bdf952213756e26186
2017-01-11 15:51:25 -08:00
Josh Gao
183b73e665 adb: remove support for legacy f_adb interface.
Everything should be using the functionfs interface instead by now.

Bug: http://b/34228376
Test: grepping for f_adb, android_adb in source tree
Test: m
Change-Id: I6bc41049c49a867499832588dac8ed108c636c11
2017-01-11 15:00:03 -08:00
Wei Wang
38fcd33e46 Restart wificond when zygote died
This helps to avoid tearDownInterfaces call from WiFiStateMachine's
constructor.

Bug: 33752168
Test: on device

(cherry picked from commit 0db195d0757e36c73b9da5a95d9b9986386f0f2e)

Change-Id: I55f56dd8daa5089073ff8dd424e92d09326c7d00
2017-01-07 19:45:42 -08:00
Elliott Hughes
4ee7861ee1 Merge "Improve init bootcharting." 2016-12-16 17:32:27 +00:00
Sandeep Patil
5fee496e62 socket: uevent: use SO_RCVBUF instead of SO_RCVBUFFORCE
The SO_RCVBUFFORCE option requires the caller of uevent_create_socket()
to have net_admin capabilities.

Set platform default rcv/snd buffer sizes to 256kb that will always be
overridden by the device/target. However, it will allow
ueventd / healthd to use the uevent_create_socket() API w/o requiring
the net_admin capability.

Note: All devices override the buffer sizes according to the technology
maximum to at least ~8MB. So, the init.rc change here is to make sure
platform code can work w/o any overrides.

Test: no SELinux failures for healthd with 'net_admin' removed.

Bug: https://b/32733887

Change-Id: Ida346468cd550ad07901bf3a78ad508939849906
Signed-off-by: Sandeep Patil <sspatil@google.com>
2016-12-09 15:16:28 -08:00
Elliott Hughes
a3641af22f Improve init bootcharting.
Most notably, there's no longer any need to guess an end time.

Bug: http://b/23478578
Bug: http://b/33450491
Test: rebooted with bootcharting on/off
Change-Id: Icb7d6859581da5526d77dfc5aa4d57c9bfbfd7e2
2016-12-08 17:35:45 -08:00
Nick Kralevich
5fae86b5fa Merge "change /data/bugreports to /bugreports"
am: 1b2e6abf3b

Change-Id: I7de15de91a688f8fe4a203a84b54e7dcfa106782
2016-11-23 00:11:13 +00:00
Nick Kralevich
c4084c6694 change /data/bugreports to /bugreports
It's 5 characters shorter, has no runtime costs, can be stored on a
read-only partition, and avoids problems like b/27262109 and b/27204904.
It allows makes some security hardening easier.

Bug: 27262109
Bug: 27204904
Bug: 32799236
Test: verified new symlink created and old one not present
Change-Id: Ief362e13569ad9c868a7f0f9c4dbd6a328c96c6b
2016-11-22 08:57:25 -08:00
Nick Kralevich
715e33452e init.rc: delete extra whitespace
causes merge conflicts.

Test: none
Change-Id: Ic83db2b3e2f972955efadfc8df8fe8ec918a7609
2016-11-19 16:07:40 -08:00
Paul Lawrence
ffa3689107 Merge "Add flags to restorecon_recursive to traverse filesystems"
am: 5fbd1cfd34

Change-Id: I539d7e9d441c7bb3f5602b892408a85436b857e8
2016-11-17 17:55:06 +00:00
Paul Lawrence
a8d8434c42 Add flags to restorecon_recursive to traverse filesystems
Use to solve the problem of tracefs conditionally being mounted
under debugfs and needing restorecon'd without boot performance
penalty.

Also move skip-ce to a flag for consistency.

Test: Check that trace_mount has correct attributes after boot
Bug: 32849675
Change-Id: Ib6731f502b6afc393ea5ada96fa95b339f14da49
2016-11-16 22:27:45 +00:00
Tianjie Xu
c488087aa0 Start update_verifier in cache group
Start update_verifier in cache group to avoid dac_override

Bug: 30020920
Change-Id: I227b4a0e1c07e7b9bf209b432e9db02275ffe660
Test: mma
(cherry picked from commit 1e4635f0a8)
2016-11-09 11:57:26 -08:00
Paul Lawrence
3915012a46 Merge "Fix selinux warning on tracefs systems"
am: 0ad600bdc6

Change-Id: Ibaab6580caf0fe216cfae72bf5d2560fec02afdf
2016-11-07 15:07:22 +00:00
Paul Lawrence
d2abcbd0ab Fix selinux warning on tracefs systems
restorecon_recursive doesn't traverse filesystem boundaries. On
tracefs systems, tracing is a separate filesystem, so restorecon
this as well

Bug: 30963384
Test: Boot hikey, and check that there are no debugfs_tracing denials in dmesg
Change-Id: I24abd3ad80d2cfdab4f64fecee799fc0c24ed238
2016-11-04 10:56:06 -07:00
Nick Kralevich
d3a2573eea Merge "give zygote AID_READPROC"
am: 3a724a8f5d

Change-Id: Ie877330cba17a429ec3cd26eafaaeca3df66cc59
2016-11-03 18:15:04 +00:00
Treehugger Robot
3a724a8f5d Merge "give zygote AID_READPROC" 2016-11-03 18:08:55 +00:00
Steven Moreland
82c67f5662 Merge "Update for hidlized hwservicemanager."
am: 480af3f633

Change-Id: I2c11b0249ab77e9dc22a76f6aa66026ebf3ed00d
2016-11-02 22:23:56 +00:00
Nick Kralevich
c21169c59f give zygote AID_READPROC
In zygote wrapping mode, ZygoteConnection does a check to see if the pid
reported by the wrapped process is either child process that was
forked, or a decendent of it. This requires read access to other
processes /proc files. Grant zygote AID_READPROC to allow this access.

Bug: 32610632
Test: manual inspection of /proc files to verify group.
Test: manual inspection of zygote's children to make sure they do not
      inherit AID_READPROC

Change-Id: I3619a9ae33c8077e068e8024f7c7d44cfca6fb76
2016-11-02 13:48:32 -07:00
Steven Moreland
ba825ac33f Update for hidlized hwservicemanager.
Bug: 32313592
Test: end to end
Change-Id: I76a7ee01413b28e95e9f19fcde90f6372502ec67
2016-11-02 13:29:34 -07:00
Iliyan Malchev
121fe849e8 init.rc: have hwservicemanager start the HAL class am: 57d66b8447 am: ad0cbcf21c
am: f0099ccb23

Change-Id: I5c24ecbf89d723c478a02bcab8cffc4e9e4385e9
2016-09-27 00:16:50 +00:00
Martijn Coenen
ac129cbaa2 Add hwbinder dev node permissions. am: f5110ea029 am: a2249bc1bd
am: 2008af6af5

Change-Id: I18c7c1b8b372f59f609e12a2532bd9e435e1ba81
2016-09-27 00:16:46 +00:00
Iliyan Malchev
57d66b8447 init.rc: have hwservicemanager start the HAL class
b/31458381
Test: passing build and runtime tests

Change-Id: I1d26af5ca1d0e9c7bbd97cfd88d0b432b50b7216
Signed-off-by: Iliyan Malchev <malchev@google.com>
2016-09-26 00:23:51 -07:00
Martijn Coenen
f5110ea029 Add hwbinder dev node permissions.
b/31458381
Test: pass

Change-Id: I8ec92a29287b17636c363c55a8565dacab19043d
Signed-off-by: Iliyan Malchev <malchev@google.com>
2016-09-26 00:23:51 -07:00
Ajay Panicker
531b201eb6 Merge "Remove net_bt_stack group and replace it with bluetooth" am: 7875407bb7 am: f924c252bd
am: b0db9714bb

Change-Id: I025c5301fecf0566d8184efce099a195fdbfc460
2016-09-22 21:58:27 +00:00
Ajay Panicker
604208e957 Remove net_bt_stack group and replace it with bluetooth
Bug: 31549206
Change-Id: I667963e5f9fd1a5dc9ad74378b318e3b782e6883
2016-09-20 12:01:33 -07:00
Ajay Panicker
bf2b7a93b2 Merge "Allow bluetooth service to access bluetooth directory and add /logs (1/6)" am: 2c2a3f7a95 am: 3a9a16ee79
am: f5ffb20e6f

Change-Id: Ied3f4a26681d0c1e3bd72d4f1d0de77fa9e7803a
2016-09-19 20:26:21 +00:00
Ajay Panicker
59d6a8cf8a Allow bluetooth service to access bluetooth directory and add /logs (1/6)
Bug: 31466840
Change-Id: I2c2766a2366600def81708d97cf3f3f13e0eb655
2016-09-19 17:50:56 +00:00
Todd Kjos
9453ea8ba9 resolve merge conflicts of c6937f2 to nyc-mr1-dev-plus-aosp
Change-Id: I82638b0dab5e1b5117f4ed4752fd2cbdaf8c47b1
2016-09-13 12:40:32 -07:00
TuHailong
d90a55c4bf Fix zygote energy-aware scheduler tuning bug
Change-Id: Ib612e99f7b115c2fbd1503e0994948fd0b0a2dec
2016-09-08 21:45:41 +08:00
Wei Wang
d61a7e2da4 Split fstab mount into 2 phases
This will make it possible to start some key services before mounting
data partition

Bug: 30118894
Change-Id: Ia9f8cc035de6cc0df9a61605864915efa0266d7f
(cherry picked from commit abfbec342f)
2016-09-06 21:04:26 +00:00
Wei Wang
254f44363b Split fstab mount into 2 phases
This will make it possible to start some key services before mounting
data partition

(cherry picked from commit abfbec342f)

Bug: 30118894
Change-Id: Ia9f8cc035de6cc0df9a61605864915efa0266d7f
2016-09-06 11:39:05 -07:00
Andreas Gampe
bdbe675fa1 Asan.options: Use abort_on_error am: 67b7e85b18
am: 4f31cff93b

Change-Id: I8c06aea3ede9f93493aa905ceb0c363e8abc3c1f
2016-08-17 19:05:56 +00:00
Andreas Gampe
67b7e85b18 Asan.options: Use abort_on_error
Use abort to have debuggerd act and create a tombstone.

Bug: 30775464
Change-Id: I359c7c7c094880b7b55304cd2aa3f4b360b729d8
2016-08-16 15:45:56 -07:00
Badhri Jagan Sridharan
9306e7c17a Remove redundant action triggers on persist.sys.usb.config am: 05e04a134e
am: ab5c247b0d

Change-Id: I470da113930539b5ae0ad4a706c8dfe080a52ee2
2016-08-10 22:25:58 +00:00
Badhri Jagan Sridharan
05e04a134e Remove redundant action triggers on persist.sys.usb.config
persist.sys.usb.config stores the usb functions which need to be enabled
when the phone boots up. When the phone is actually booted, setting this
would also activate the following action trigger on sys.usb.config

From init.usb.rc:
Used to set USB configuration at boot and to switch the configuration
when changing the default configuration
on property:persist.sys.usb.config=*
    setprop sys.usb.config ${persist.sys.usb.config}

sys.usb.config is anyways set to the actual functions by UsbDeviceManager
once it is set to none. Therefore add "on boot" condition to the above
action trigger so that persist.sys.usb.config does not race with
sys.usb.config.

BUG: 30440213
Change-Id: I3333d0b8334fb627469c7faad250bf3151bb1ebf
2016-08-01 21:56:23 +00:00
Amit Pundir
9c23e55189 Merge \\\"init: usb: delete rndis func to unregister n/w interface\\\" am: 060b15e20a am: 6d287b3de7
am: e2f4d9e770

Change-Id: I10e03cad4cb026c86ce5882f6c25829830bf8d9f
2016-07-29 17:06:43 +00:00
Amit Pundir
6d287b3de7 Merge \"init: usb: delete rndis func to unregister n/w interface\"
am: 060b15e20a

Change-Id: I26e6e414f81fdee55fdfeb017ac0c4f5b0941eea
2016-07-29 17:01:15 +00:00
Amit Pundir
aae7b4984c init: usb: delete rndis func to unregister n/w interface
Rndis n/w interface "usb0" registration/deregistration is broken. If a
user try to switch to other functions or disable usb tethering or unplug
the usb cable then it doesn't kill "usb0" interface.

Fix is to delete Rndis function to unregister tethering interface when
switching from tethering to other functions or disable/unplug the
tethering cable. If we don't do that then the rndis netdev interface
will never be freed or unregistered.

This also means the rndis function has to be created everytime user
enable tethering function from Settings instead of creating it at
"on boot" in init.$hardware.usb.rc like we do currently. A relevant fix,
Change-Id: Icb49020d624fb21ef2607d473948cbbf3b9cc469, for reference has
already been submitted for device/linaro/hikey

Change-Id: If1f922e02277cccdc8c0b263be63989ee102cc80
Reported-by: Winter Wang <wente.wang@nxp.com>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
2016-07-19 13:11:50 +05:30