Elliott Hughes
422a5128dd
Merge "The "net.change" property is no longer needed."
...
am: e209ed7c44
Change-Id: I45a1ce3a1527a72e7ae974fd4dab7b77c6a899ee
2016-12-06 02:49:59 +00:00
Treehugger Robot
e209ed7c44
Merge "The "net.change" property is no longer needed."
2016-12-06 02:46:43 +00:00
Mark Salyzyn
1f22788f9e
Merge "init: service file command only opens existing files"
...
am: bd3f42016d
Change-Id: Id4c0e6b26e8b3295ebfd5387bfad2e8795531175
2016-12-05 21:37:38 +00:00
Elliott Hughes
4f9158119b
The "net.change" property is no longer needed.
...
bionic was the only listener, and it was doing nothing useful when the
property changed, so we've removed that listener.
Bug: http://b/33308258
Test: DNS still works
Change-Id: I15292e8e58e6b87cdad8f73e449ccaf334dff68b
2016-12-05 13:12:48 -08:00
Mark Salyzyn
978fd0ea25
init: service file command only opens existing files
...
Mixing open or create, along with attribute(MAC) and permissions(DAC)
is a security and confusion issue.
Fix an issue where fcntl F_SETFD was called to clear O_NONBLOCK, when
it should have been F_SETFL. Did not present a problem because the
current user of this feature does writes and control messages only.
Test: gTest logd-unit-tests and check dmesg for logd content.
Bug: 32450474
Bug: 33242020
Change-Id: I23cb9a9be5ddb7e8e9c58c79838bc07536e766e6
2016-12-05 11:26:39 -08:00
Elliott Hughes
8cf9d66486
Merge "Replace the "coldboot" timeout with a property."
...
am: e218fc673f
Change-Id: Ibaf1f7ad3a90e5216db04506288df51258e19f4b
2016-12-05 18:04:27 +00:00
Elliott Hughes
331cf2fb7c
Replace the "coldboot" timeout with a property.
...
Also rename init's existing boot-time related properties so they're
all "ro.*" properties.
Example result:
# Three properties showing when init started...
[ro.boottime.init]: [5294587604]
# ...how long it waited for ueventd...
[ro.boottime.init.cold_boot_wait]: [646956470]
# ...and how long SELinux initialization took...
[ro.boottime.init.selinux]: [45742921]
# Plus one property for each service, showing when it first started.
[ro.boottime.InputEventFind]: [10278767840]
[ro.boottime.adbd]: [8359267180]
[ro.boottime.atfwd]: [10338554773]
[ro.boottime.audioserver]: [10298157478]
[ro.boottime.bootanim]: [9323670089]
[ro.boottime.cameraserver]: [10299402321]
[ro.boottime.cnd]: [10335931856]
[ro.boottime.debuggerd]: [7001352774]
[ro.boottime.debuggerd64]: [7002261785]
[ro.boottime.drm]: [10301082113]
[ro.boottime.fingerprintd]: [10331443314]
[ro.boottime.flash-nanohub-fw]: [6995265534]
[ro.boottime.gatekeeperd]: [10340355242]
[ro.boottime.healthd]: [7856893380]
[ro.boottime.hwservicemanager]: [7856051088]
[ro.boottime.imscmservice]: [10290530758]
[ro.boottime.imsdatadaemon]: [10358136702]
[ro.boottime.imsqmidaemon]: [10289084872]
[ro.boottime.installd]: [10303296020]
[ro.boottime.irsc_util]: [10279807632]
[ro.boottime.keystore]: [10305034093]
[ro.boottime.lmkd]: [7863506714]
[ro.boottime.loc_launcher]: [10324525241]
[ro.boottime.logd]: [6526221633]
[ro.boottime.logd-reinit]: [7850662702]
[ro.boottime.mcfg-sh]: [10337268315]
[ro.boottime.media]: [10312152687]
[ro.boottime.mediacodec]: [10306852530]
[ro.boottime.mediadrm]: [10308707999]
[ro.boottime.mediaextractor]: [10310681177]
[ro.boottime.msm_irqbalance]: [7862451974]
[ro.boottime.netd]: [10313523104]
[ro.boottime.netmgrd]: [10285009351]
[ro.boottime.oem_qmi_server]: [10293329092]
[ro.boottime.per_mgr]: [7857915776]
[ro.boottime.per_proxy]: [8335121605]
[ro.boottime.perfd]: [10283443101]
[ro.boottime.qcamerasvr]: [10329644772]
[ro.boottime.qmuxd]: [10282346643]
[ro.boottime.qseecomd]: [6855708593]
[ro.boottime.qti]: [10286196851]
[ro.boottime.ril-daemon]: [10314933677]
[ro.boottime.rmt_storage]: [7859105047]
[ro.boottime.servicemanager]: [7864555881]
[ro.boottime.ss_ramdump]: [8337634938]
[ro.boottime.ssr_setup]: [8336268324]
[ro.boottime.surfaceflinger]: [7866921402]
[ro.boottime.thermal-engine]: [10281249924]
[ro.boottime.time_daemon]: [10322006542]
[ro.boottime.ueventd]: [5618663938]
[ro.boottime.vold]: [7003493920]
[ro.boottime.wificond]: [10316641073]
[ro.boottime.wpa_supplicant]: [18959816881]
[ro.boottime.zygote]: [10295295029]
[ro.boottime.zygote_secondary]: [10296637269]
Bug: http://b/31800756
Test: boots
Change-Id: I094cce0c1bab9406d950ca94212689dc2e15dba5
2016-12-03 10:54:26 -08:00
Wei Wang
c746ecbcbe
Merge "init: don't wait if we have more work to do"
...
am: 32ee9fc24a
Change-Id: Ie260a9e3d491b9108dc7681ede5a0e3ceac9ef79
2016-12-01 03:51:19 +00:00
Wei Wang
16db4346a2
init: don't wait if we have more work to do
...
Bug: 33212253
Test: On marlin
Change-Id: I8502eaa73fac6953d358af01482760b3249cfd67
2016-11-30 18:09:29 -08:00
Elliott Hughes
65016074c2
Merge "init: Fix sync issue on property trigger."
...
am: 80d2f01fbf
Change-Id: Iae57b79abeb7a372c0e483316d328d5307c66b73
2016-11-30 17:54:31 +00:00
caozhiyuan
b104c502e1
init: Fix sync issue on property trigger.
...
This issue reproduces in the following senario.
1. ("", "") is added to queue;
2. property_triggers_enabled is set to 1;
3. user defined property is triggered, like sys.usb.config=adb;
4. ("sys.usb.config", "adb") is added to queue;
5. main loop interpret ("", "") and queue all current triggers to execution,
so ("sys.usb.config", "adb") is queued for execution for the first time.
6. main loop interpret ("sys.usb.config", "adb"), it is queued for
execution for a second time.
The second time makes ASIT fail.
Bug: http://b/28218187
Change-Id: I230e175e0dca8989f1e5bd812398da90082d0ec1
Signed-off-by: caozhiyuan <cao.zhiyuan@zte.com.cn>
2016-11-29 20:19:17 +00:00
Elliott Hughes
c509c36892
Merge "Revert "init: Reworked how we wait for COLDBOOT_DONE""
...
am: a10bd47d60
Change-Id: Ibad56dbe843c16863a70552ea27aa3e7ffca0787
2016-11-29 18:14:19 +00:00
Billy Lau
6be1d976f6
Merge "init: Reworked how we wait for COLDBOOT_DONE"
...
am: 57c31d0f17
Change-Id: I40c0183e3bc22bc85977e4e8db3b4ce6ad76375e
2016-11-29 16:36:37 +00:00
Elliott Hughes
a452660d92
Revert "init: Reworked how we wait for COLDBOOT_DONE"
...
This reverts commit d36115ef2f .
Change-Id: I599b0eeebf9c062852323f2a4a986b18dd85288a
2016-11-29 16:34:56 +00:00
Billy Lau
d36115ef2f
init: Reworked how we wait for COLDBOOT_DONE
...
Bug: 31800756
Instead of strictly timing out after 1s waiting for COLDBOOT_DONE,
we wait for a considerably longer period of time, which would also
allow slower non-production heavily instrumented debug builds to
boot up.
Upon successful wait, we measure the time taken and record the
value into a system property: ro.cold_boot.duration.
If timeout is still reached, we log an error message and abandon
boot process, rebooting into recovery mode instead.
Change-Id: Ic1df80546d8721b0e8c998ff294d5c5102de4e98
2016-11-22 21:25:02 +00:00
Evgenii Stepanov
4b1a329309
Merge "Revert "Revert "init: create /dev/urandom, /dev/random in first stage."""
...
am: b6552f376c
Change-Id: I3291276426ad5e1acb457da7ad938958d7f0f461
2016-11-19 00:51:33 +00:00
Evgenii Stepanov
102daa30a3
Revert "Revert "init: create /dev/urandom, /dev/random in first stage.""
...
This reverts commit 4c8a76e250 .
Test: booted angler-userdebug
Change-Id: I2257a44b7cf624065e5653754062a117f3e44c98
2016-11-18 15:09:18 -08:00
Wei Wang
5514c50292
Merge "init: move empty string check to InitTriggers"
...
am: 9bf10ff61e
Change-Id: I7190f8bd86707b2adc4dbeffa0085ce3a190d680
2016-11-17 19:32:19 +00:00
Wei Wang
9bf10ff61e
Merge "init: move empty string check to InitTriggers"
2016-11-17 19:21:47 +00: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
Treehugger Robot
5fbd1cfd34
Merge "Add flags to restorecon_recursive to traverse filesystems"
2016-11-17 17:39:53 +00:00
Mark Salyzyn
809dee506e
Merge "libcutils: move cutils/files.h to cutils/android_get_control_file.h"
...
am: 8c41e791ed
Change-Id: Ifbc00285da734859d590153a7c6cfc8e51c014f9
2016-11-17 15:33:02 +00:00
Mark Salyzyn
8c41e791ed
Merge "libcutils: move cutils/files.h to cutils/android_get_control_file.h"
2016-11-17 15:22:14 +00:00
Wei Wang
93df4e18a2
init: move empty string check to InitTriggers
...
Test: mma
Bug: 32838381
Change-Id: I69203734ef7d3640da75f3e3cbe9254bf468d916
2016-11-16 22:24:43 -08:00
Wei Wang
279f3d593f
init: fix undefined behavior in ExecuteCommand
...
am: d67a4abc64
Change-Id: I1ecbb1d083af62dd5e69b4cff19ec411016054f3
2016-11-17 03:54:57 +00:00
Wei Wang
3567c7c9d9
Revert "Revert "init: warn slow action""
...
am: 8b1d526a72
Change-Id: Ie067e37758ae28fece1732ab7697e2a1286594dc
2016-11-17 03:54:51 +00:00
Wei Wang
2369b1eb80
Merge changes from topic 'slow_log'
...
* changes:
init: fix undefined behavior in ExecuteCommand
Revert "Revert "init: warn slow action""
2016-11-17 03:46:44 +00:00
Mark Salyzyn
52bd37e633
libcutils: move cutils/files.h to cutils/android_get_control_file.h
...
files.[h|cpp] is bound to be abused with junk, replace with
android_get_control_file.[h|cpp]. Plus some sundry cleanup.
Test: gTest libcutils-tests, logd-unit-tests, liblog-unit-tests,
logcat-unit-tests and init_tests
Bug: 32450474
Change-Id: Ibd4a7aa4624ea19a43d1f98a3c71ac37805d36b5
2016-11-16 15:56:56 -08:00
Wei Wang
d67a4abc64
init: fix undefined behavior in ExecuteCommand
...
ExecuteCommand may change command_ vector which leads undefined behavior
This bug is found when adding logs in ExecuteCommand printing our Command class fields
Bug: 32838381
Test: on emulator
Change-Id: I96468bd2192ca80013871a3a6ac4132149363fff
2016-11-16 15:46:19 -08: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
Jeff Sharkey
d1d3bdd16f
Only restorecon CE storage after unlocked.
...
On FBE devices, the filenames inside credential-encrypted directories
are mangled until the key is installed. This means the initial
restorecon at boot needs to skip these directories until the keys
are installed.
This CL changes the implementation of the "restorecon_recursive"
built-in command to use the new SKIPCE flag to avoid labeling files
in CE directories. vold will request a restorecon when the keys
are actually installed.
(cherrypicked from commit 1635afe83d )
Bug: 30126557
Test: Cherry-picked from master
Change-Id: I320584574a4d712c493b5bbd8a79b56c0c04aa58
2016-11-16 21:19:17 +00:00
Wei Wang
8b1d526a72
Revert "Revert "init: warn slow action""
...
This reverts commit 1802d11cc7 .
Test: grep init log
Bug: 32712851
2016-11-15 23:58:55 -08:00
Ting-Yuan Huang
1700a162d5
Merge "init: fix memory leaks"
...
am: a73ba879b1
Change-Id: I3375372ddc23b7440edab0107ff1cbe34d550865
2016-11-16 03:32:40 +00:00
Treehugger Robot
a73ba879b1
Merge "init: fix memory leaks"
2016-11-16 03:25:34 +00:00
Ting-Yuan Huang
09bd41d097
init: fix memory leaks
...
It's possible that node is not freed before return.
Test: make WITH_TIDY=1 mmma system/core/init
Change-Id: I648eea9dda006d2b2239e169785190817ad31352
2016-11-15 16:55:50 -08:00
Elliott Hughes
3ee9807554
Merge "Switch fastboot/init/libprocessgroup to std::this_thread::sleep_for."
...
am: f3e731b3c5
Change-Id: I2028bb8835c5e55e1bf8c88c3395253ded9d66d3
2016-11-15 18:09:46 +00:00
Elliott Hughes
f3e731b3c5
Merge "Switch fastboot/init/libprocessgroup to std::this_thread::sleep_for."
2016-11-15 18:02:30 +00:00
Wei Wang
4286801ccb
Merge "init: fix BuildTriggersString for empty string"
...
am: 9b1d5e15ef
Change-Id: Ia344bac744e767ab26d7811ceb2806cce5f28a60
2016-11-15 17:32:13 +00:00
Treehugger Robot
9b1d5e15ef
Merge "init: fix BuildTriggersString for empty string"
2016-11-15 17:23:56 +00:00
Nick Desaulniers
ea516950fb
Merge "Revert "init: warn slow action""
...
am: 431c489568
Change-Id: I570911d0940fa6819de6f07e0d88cfadbfb6bdd1
2016-11-15 07:05:12 +00:00
Treehugger Robot
431c489568
Merge "Revert "init: warn slow action""
2016-11-15 06:58:53 +00:00
Wei Wang
69b9b36c11
init: fix BuildTriggersString for empty string
...
behavior is undefined if pop_back() on empty std::string
Test: grep init log
Bug: 32712851
Bug: 32838381
Change-Id: I5bfac2fb275036abd0158b78df14019d2e82716d
2016-11-14 20:20:48 -08:00
Elliott Hughes
290a228fdc
Switch fastboot/init/libprocessgroup to std::this_thread::sleep_for.
...
Bug: http://b/32878766
Test: boots
Change-Id: Ie0ddfb7e60f2da5f6eefbb10c83a92e88c137ae3
2016-11-14 17:08:47 -08:00
Nick Desaulniers
1802d11cc7
Revert "init: warn slow action"
...
This reverts commit b1a309ac1f .
Bug: 32712851
Bug: 32838381
Change-Id: Ib4c47de5ea5b0bad765a43cbff9f73d9978729d4
2016-11-15 00:53:00 +00:00
Elliott Hughes
85599ef5de
Merge "Switch ueventd to sendfile(2)."
...
am: f77d8b0452
Change-Id: Iaf6d923bdf6f19e6c23fa6c4a80817fca59e6813
2016-11-14 21:48:38 +00:00
Elliott Hughes
f77d8b0452
Merge "Switch ueventd to sendfile(2)."
2016-11-14 21:39:25 +00:00
Elliott Hughes
eefaa1f250
Merge "init start time tracking."
...
am: 601bf9e7c9
Change-Id: Idd707d4694a4339e26884fe72b8f0c08c4100daf
2016-11-14 21:34:24 +00:00
Elliott Hughes
601bf9e7c9
Merge "init start time tracking."
2016-11-14 21:21:00 +00:00
Elliott Hughes
632e99a0d4
Switch ueventd to sendfile(2).
...
Bug: http://b/32826495
Test: booted and checked dmesg
Change-Id: Idfd813dfe6f512fdbc05b1411c7960e950e2f59b
2016-11-14 11:40:06 -08:00
Keun-young Park
ec2d5d8f04
Merge "fix swapped min / max in priority parsing"
...
am: 557359863c
Change-Id: Ie8bbb5add66b56ff8641f26a081fe185204b7cc1
2016-11-13 04:52:29 +00:00