Commit graph

31158 commits

Author SHA1 Message Date
Adam Lesinski
f04daccae9 Merge "healthd: Implement scheduleUpdate" am: 6edabc75ab am: c0405200b8
am: 50094d9865

Change-Id: I75976e5d4d4a38fb0fcb9e0cb5bf33a5786b146d
2017-03-23 01:12:17 +00:00
Adam Lesinski
50094d9865 Merge "healthd: Implement scheduleUpdate" am: 6edabc75ab
am: c0405200b8

Change-Id: I46ebe99dfe4c0188cfae63db845c86efe1ec3bf3
2017-03-23 01:03:16 +00:00
Adam Lesinski
c0405200b8 Merge "healthd: Implement scheduleUpdate"
am: 6edabc75ab

Change-Id: I80082322b77cbd74b70b4d3c25e172d1c51f6072
2017-03-23 00:48:48 +00:00
Treehugger Robot
6edabc75ab Merge "healthd: Implement scheduleUpdate" 2017-03-22 23:54:02 +00:00
TreeHugger Robot
ce009490fb Merge "Deprecate system/window.h" 2017-03-22 22:23:56 +00:00
Elliott Hughes
f6d23cd1d5 Merge "Keep the ReadFileToString/ReadFdToString overhead down." am: 2af784bf20 am: 535520480a
am: d02302666f

Change-Id: I5fe24973065674d9922c62d3876f40f0f66f9c9d
2017-03-22 21:08:07 +00:00
Elliott Hughes
d02302666f Merge "Keep the ReadFileToString/ReadFdToString overhead down." am: 2af784bf20
am: 535520480a

Change-Id: I5bb373c28a66bdd15ad6fca23e9d12427cce6dbc
2017-03-22 21:06:01 +00:00
Elliott Hughes
535520480a Merge "Keep the ReadFileToString/ReadFdToString overhead down."
am: 2af784bf20

Change-Id: I4c59280af2b5d3aad0911df7696e675a86cad701
2017-03-22 21:03:31 +00:00
Treehugger Robot
2af784bf20 Merge "Keep the ReadFileToString/ReadFdToString overhead down." 2017-03-22 21:00:00 +00:00
Mathias Agopian
34c9fbb6d1 Deprecate system/window.h
Renamed it to system/window-deprecated.h and
added a comment to that effect. 
window.h now includes system/window-deprecated.h,
which should make it obvious it shouldn’t be used.

Test: compiled
Bug: 34453351
Change-Id: Ie6953fd4383ba6289bd8950c389d14d9ac41f7d5
2017-03-22 20:57:27 +00:00
Keun-young Park
02354ed37b Merge "remove emergency shutdown and improve init's reboot logic" am: 437dc91fa3 am: f803be004a
am: 9766c9ff31

Change-Id: Ifeb00b8356272e831a167e3cc7ebba30bf7134f8
2017-03-22 20:23:34 +00:00
Keun-young Park
9766c9ff31 Merge "remove emergency shutdown and improve init's reboot logic" am: 437dc91fa3
am: f803be004a

Change-Id: I8ce4ca89034b214cf867fc4b8cd2721aae4fba17
2017-03-22 20:20:58 +00:00
Keun-young Park
f803be004a Merge "remove emergency shutdown and improve init's reboot logic"
am: 437dc91fa3

Change-Id: I6d7cac831981f418562579750b3a96ec039ba677
2017-03-22 20:19:23 +00:00
Treehugger Robot
437dc91fa3 Merge "remove emergency shutdown and improve init's reboot logic" 2017-03-22 20:13:43 +00:00
Adam Lesinski
3dec1aa66d healthd: Implement scheduleUpdate
scheduleUpdate forces a healthd battery update,
which will notify all listeners.
Test: Manual (strace -p $healthd_pid)
Bug: 32645990

Change-Id: I8b19f79b633ca8988f0e3dd5be14757f6421ddcb
2017-03-22 12:15:11 -07:00
Vijay Venkatraman
39958cb6e8 Merge "Moved include/android_filesystem_*.h and canned_fs_config.h to libcutils" am: a4bc98941a am: c0c4aeb556
am: 3286d2d0d2

Change-Id: I203baad63ece6cb9b223018a8664d625a6a5046d
2017-03-22 18:36:06 +00:00
Vijay Venkatraman
3286d2d0d2 Merge "Moved include/android_filesystem_*.h and canned_fs_config.h to libcutils" am: a4bc98941a
am: c0c4aeb556

Change-Id: If0fc49e213e094fca5a2b94218ab1fa767f742ca
2017-03-22 18:33:34 +00:00
Vijay Venkatraman
c0c4aeb556 Merge "Moved include/android_filesystem_*.h and canned_fs_config.h to libcutils"
am: a4bc98941a

Change-Id: Ib90d711895c8a75f5abec2284ff66723c4f5b35e
2017-03-22 18:31:55 +00:00
Keun-young Park
8d01f63f50 remove emergency shutdown and improve init's reboot logic
- Emergency shutdown just marks the fs as clean while leaving fs
  in the middle of any state. Do not use it anymore.

- Changed android_reboot to set sys.powerctl property so that
  all shutdown can be done by init.

- Normal reboot sequence changed to
    1. Terminate processes (give time to clean up). And wait for
      completion based on ro.build.shutdown_timeout.
        Default value (when not set) is changed to 3 secs. If it is 0, do not
        terminate processes.
    2. Kill all remaining services except critical services for shutdown.
    3. Shutdown vold using "vdc volume shutdown"
    4. umount all emulated partitions. If it fails, just detach.
       Wait in step 5 can handle it.
    5. Try umounting R/W block devices for up to max timeout.
      If it fails, try DETACH.
      If umount fails to complete before reboot, it can be detected when
      system reboots.
    6. Reboot

- Log shutdown time and umount stat to log so that it can be collected after reboot

- To umount emulated partitions, all pending writes inside kernel should
  be completed.
- To umount /data partition, all emulated partitions on top of /data should
  be umounted and all pending writes should be completed.
- umount retry will only wait up to timeout. If there are too many pending
  writes, reboot will discard them and e2fsck after reboot will fix any file system
  issues.

bug: 36004738
bug: 32246772

Test: many reboots combining reboot from UI and adb reboot. Check last_kmsg and
      fs_stat after reboot.

Change-Id: I6e74d6c68a21e76e08cc0438573d1586fd9aaee2
2017-03-22 11:23:31 -07:00
Vijay Venkatraman
a4bc98941a Merge "Moved include/android_filesystem_*.h and canned_fs_config.h to libcutils" 2017-03-22 18:21:44 +00:00
Christopher Ferris
bc12cd8b09 Merge "Allow calling GetFunctionName before unwinding." am: 435fc45103 am: 6f4175fefc
am: 69a9cab72a

Change-Id: I43e7d4677dd3e4987bc303b65c9c50aca0daf5b9
2017-03-22 17:41:01 +00:00
Christopher Ferris
69a9cab72a Merge "Allow calling GetFunctionName before unwinding." am: 435fc45103
am: 6f4175fefc

Change-Id: Id60e3b5dd8ceeb02e6edb93f07dea624041726b0
2017-03-22 17:38:58 +00:00
Christopher Ferris
6f4175fefc Merge "Allow calling GetFunctionName before unwinding."
am: 435fc45103

Change-Id: Id3ffdd9623b7109d9133fe2f5bfbb733d782eb71
2017-03-22 17:37:26 +00:00
Christopher Ferris
435fc45103 Merge "Allow calling GetFunctionName before unwinding." 2017-03-22 17:30:34 +00:00
Mark Salyzyn
17e220f6e1 Merge "liblog: tests: liblog.__security property failure" am: 2a54ae97eb am: 1bc4b39bef
am: 82bfcca2ae

Change-Id: I4a66d2bc35a0d4d47b0ffe838db2dcbada632dd1
2017-03-22 00:40:39 +00:00
Alex Vakulenko
213222fbb4 Merge "Add 'ro.cpuset.default' system property for default cpusets." am: 2fdcf37af1 am: 16b3d261bd
am: 0d3e083f2b

Change-Id: I3f25a532bd33c40c4d554047097b1609a44381c2
2017-03-22 00:40:22 +00:00
Tom Cherry
fc65725cc7 Merge "init: reboot to bootloader on crash for development builds" am: ac8a3bd283 am: f0cb60083e
am: 2b3d157af5

Change-Id: If1dd58050d5dce62df33d5527c5be2739600bb74
2017-03-22 00:40:04 +00:00
Vijay Venkatraman
d4e2386057 Moved include/android_filesystem_*.h and canned_fs_config.h to libcutils
Bug: 33241851
Test: No changes needed for modules not using VNDK.
For VNDK, enable BOARD_VNDK_VERSION in BoardConfig.mk
and add libcutils to modules that need these headers.

Change-Id: I6102778aab35ed26a5ddde11230502dcd4edc852
2017-03-21 17:34:58 -07:00
Wei Wang
c0049c073b Merge changes from topic 'remove_bg_cgroup' am: e941c5fa41 am: 857e716f3e
am: 5e06a34e03

Change-Id: I5ec71f69c6629ad24a8f26be58a85c299c2491dd
2017-03-22 00:34:43 +00:00
Wei Wang
33a55b3d52 init.rc: remove bg_non_interactive cgroup am: a27a91a5fd am: 20943abad0
am: 7d4d63ca18

Change-Id: I5c1d3a860c64dae63be5edcc91734805863d6f85
2017-03-22 00:34:33 +00:00
Mark Salyzyn
82bfcca2ae Merge "liblog: tests: liblog.__security property failure" am: 2a54ae97eb
am: 1bc4b39bef

Change-Id: I8d5c15b9cfe005336fef456f865b83d2525f514e
2017-03-22 00:17:42 +00:00
Mark Salyzyn
1bc4b39bef Merge "liblog: tests: liblog.__security property failure"
am: 2a54ae97eb

Change-Id: I32ae5a9cfa1be0a50ac4b1847a550464146c6644
2017-03-22 00:15:42 +00:00
Mark Salyzyn
2a54ae97eb Merge "liblog: tests: liblog.__security property failure" 2017-03-22 00:10:04 +00:00
Alex Vakulenko
0d3e083f2b Merge "Add 'ro.cpuset.default' system property for default cpusets." am: 2fdcf37af1
am: 16b3d261bd

Change-Id: Ie44a46511b3ccc3f819542b91a9bab8180bff0a4
2017-03-21 23:58:06 +00:00
Alex Vakulenko
16b3d261bd Merge "Add 'ro.cpuset.default' system property for default cpusets."
am: 2fdcf37af1

Change-Id: I5b977b1f34a8009963d7aab708b1a97d4f569451
2017-03-21 23:54:03 +00:00
Treehugger Robot
2fdcf37af1 Merge "Add 'ro.cpuset.default' system property for default cpusets." 2017-03-21 23:46:56 +00:00
Tom Cherry
2b3d157af5 Merge "init: reboot to bootloader on crash for development builds" am: ac8a3bd283
am: f0cb60083e

Change-Id: I48e0edec7eb951bfbd368096be3d1fd4a1aec6af
2017-03-21 23:05:26 +00:00
Tom Cherry
f0cb60083e Merge "init: reboot to bootloader on crash for development builds"
am: ac8a3bd283

Change-Id: Ieb55ec65e908410eb5dadc1cd0f25a9bbf37fd4a
2017-03-21 23:01:28 +00:00
Treehugger Robot
ac8a3bd283 Merge "init: reboot to bootloader on crash for development builds" 2017-03-21 22:50:38 +00:00
Wei Wang
5e06a34e03 Merge changes from topic 'remove_bg_cgroup' am: e941c5fa41
am: 857e716f3e

Change-Id: Ic60ff334426dc5ab8ff08a2e054de59d50dfad5d
2017-03-21 22:27:10 +00:00
Wei Wang
7d4d63ca18 init.rc: remove bg_non_interactive cgroup am: a27a91a5fd
am: 20943abad0

Change-Id: Ia342b440dc049cc2f71eeff232128d3821b25914
2017-03-21 22:26:51 +00:00
Mark Salyzyn
ef5d981977 liblog: tests: liblog.__security property failure
CTS tests are failing to set ro.device_owner property.

Test: gTest liblog_unit_tests --gtest_filter=liblog.__security
Bug: 36480230
Change-Id: Icafea9f7488ce9c4ea47d42dc08505bc0cf99a3e
2017-03-21 15:22:29 -07:00
Wei Wang
857e716f3e Merge changes from topic 'remove_bg_cgroup'
am: e941c5fa41

Change-Id: Icb9b9591ffe353dfcbf782437b4f06481a8fdf3a
2017-03-21 22:20:14 +00:00
Wei Wang
20943abad0 init.rc: remove bg_non_interactive cgroup
am: a27a91a5fd

Change-Id: I795b160f56f3ff492e312ea145948a24890e9029
2017-03-21 22:19:59 +00:00
Treehugger Robot
e941c5fa41 Merge changes from topic 'remove_bg_cgroup'
* changes:
  libcutils: only change cgroup when fd is initialized
  init.rc: remove bg_non_interactive cgroup
2017-03-21 22:09:51 +00:00
TreeHugger Robot
7486e65a6c Merge "Remove retire frame event." 2017-03-21 22:07:58 +00:00
Christopher Ferris
82f3bbdc25 Allow calling GetFunctionName before unwinding.
Some extra initialization needs to occur before calling the local/remote
GetFunctioneName.

Also, cleanup the test code a bit:

- Make all local functions static.
- Create a common function to create and finish remote processes.
- Remove unused function.
- Fix the formatting a bit by making it match clang format.

Test: Ran the unit tests.
Change-Id: I998bed1378d582df59fdf9263df6f208db5d795a
2017-03-21 14:21:49 -07:00
Elliott Hughes
9bb7971ae7 Keep the ReadFileToString/ReadFdToString overhead down.
Bug: https://code.google.com/p/android/issues/detail?id=258500
Bug: http://b/36046324
Test: ran tests
Change-Id: I40e76a6dd164ea9a5e8e18159f543e1bb221dcba
2017-03-21 13:43:08 -07:00
Tom Cherry
663fdfc1b2 init: reboot to bootloader on crash for development builds
Currently, if init crashes, the kernel panics.  During development, we
would like to catch this crash before the kernel panics and reboot
into bootloader. This will prevent boot looping bad configurations,
particularly desired in test labs where manual intervention would
otherwise be required to reset the devices.

Keep the existing behavior for user builds, as init crashes should be
rare for production builds and rebooting the device is the correct
behavior for end users.

Bug: 34147472
Test: Boot bullhead userdebug, force init to crash, check that the
      device is in bootloader
Test: Boot bullhead user, force init to crash, check that the kernel
      panics and the device reboots as it did previously
Change-Id: Iab3d45ed0d1f82ffaad2a0835d9ca537c0516421
2017-03-21 13:42:17 -07:00
Tom Cherry
59e766e0a5 Merge "init: Fix leaking fd and error print" am: e87a826a1d am: ff6eb509aa
am: daa0d48e59

Change-Id: Ica32d27c59e0d4068de7a60f83604315a07bb1fd
2017-03-21 20:31:52 +00:00