Commit Graph

29218 Commits

Author SHA1 Message Date
Mark Salyzyn e1d2e3436e Merge "libcutils: fs_config() add check /odm/etc/fs_config_*"
am: 1e62880f70

Change-Id: Iad391f827bcb33cc03cb6fb8f602c48f1102d431
2017-03-23 19:59:45 +00:00
Treehugger Robot 1e62880f70 Merge "libcutils: fs_config() add check /odm/etc/fs_config_*" 2017-03-23 19:54:14 +00:00
Jeff Vander Stoep bfc4da8369 Merge "Create dir in /data for vendor customization"
am: c39a31f002

Change-Id: Icc41ac9e849afd0250944ff8cc3b00e3b78ed52b
2017-03-23 19:43:21 +00:00
Treehugger Robot c39a31f002 Merge "Create dir in /data for vendor customization" 2017-03-23 19:36:52 +00:00
Adam Lesinski b02d690336 libziparchive: fix mac os breakage
Add ftruncate64 to utils/Compat.h definitions for mac.

Change-Id: I82cb46927be911e867b606f4f4429a5e1b1987f7
Test: builds on mac
2017-03-23 12:02:09 -07:00
Brian Carlstrom 6d1da7c607 Fix spelling error in warning
Test: m -j32 -k
Bug: 36450628
Change-Id: I0f6463f3de3dcf45f396c7f406f8c1d6b79bf7f9
2017-03-23 11:29:57 -07:00
Adam Lesinski a41597ba0e Merge "libziparchive: Add ability to backup in ZipWriter"
am: 0e19795a62

Change-Id: Id15ab4bf8bd40640d2a301f0464230b620e8b603
2017-03-23 18:07:27 +00:00
Treehugger Robot 0e19795a62 Merge "libziparchive: Add ability to backup in ZipWriter" 2017-03-23 17:59:47 +00:00
Jeff Vander Stoep 61efb0dab8 Create dir in /data for vendor customization
Vendor owns /data/vendor.

HAL data must go in /data/vendor/hardware/.

Bug: 34980020
Test: build and boot AOSP Marlin. Observe /data/vendor and
      /data/vendor/hardware exist and are empty.
Change-Id: I6fe96e3c76a10a5eb480ba10e10d4d006de56c12
2017-03-23 10:30:34 -07:00
Fernando Lugo 69482cc127 Merge changes I0ad349f2,I0f528cf1
am: 27a091d4a1

Change-Id: Ifac25d45d429da636dbcac608b865163effffc93
2017-03-23 16:55:45 +00:00
Fernando Lugo 27a091d4a1 Merge changes I0ad349f2,I0f528cf1
* changes:
  fs_mgr: allow using legacy A/B suffix
  fs_mgr: adapt to new A/B support
2017-03-23 16:52:51 +00:00
Christopher Ferris ab481277f1 Merge "Initialize si_code in siginfo."
am: 446538b5ad

Change-Id: I0b51f6d4351f0f918ac4f78ba24400271505b74e
2017-03-23 16:45:42 +00:00
Christopher Ferris 446538b5ad Merge "Initialize si_code in siginfo." 2017-03-23 16:38:11 +00:00
Narayan Kamath 99e39e845b Merge "logwrapper: add a benchmark for android_fork_execvp_ext"
am: 1620c51f75

Change-Id: Ib0e80fda748782f52deedcdf699304a268002096
2017-03-23 11:59:56 +00:00
Treehugger Robot 1620c51f75 Merge "logwrapper: add a benchmark for android_fork_execvp_ext" 2017-03-23 11:56:10 +00:00
Narayan Kamath 1e7180f598 Merge "Logwrapper: Remove unused support for input / output processing."
am: fa339a4f5c

Change-Id: I118a761301df851ae21618a5097904ba84d654a1
2017-03-23 10:07:20 +00:00
Narayan Kamath fa339a4f5c Merge "Logwrapper: Remove unused support for input / output processing." 2017-03-23 10:04:26 +00:00
Narayan Kamath f704193384 logwrapper: add a benchmark for android_fork_execvp_ext
Current results on an aosp_angler (32 bit) :

Benchmark                           Time           CPU Iterations
-----------------------------------------------------------------
BM_android_fork_execvp_ext   15019207 ns    1002131 ns        700

Test: android_fork_execvp_ext_benchmark

Change-Id: I3d4339ff5cbb9a641cbb14f0b55d2b5fc18cdfde
2017-03-23 10:02:21 +00:00
Steven Moreland 0a85db775e Merge "Start hwservicemanager earlier."
am: fcd509298d

Change-Id: I3abfc8e790b57f97503e507702aa184ae9fe0dca
2017-03-23 03:47:01 +00:00
Treehugger Robot fcd509298d Merge "Start hwservicemanager earlier." 2017-03-23 03:39:40 +00:00
Fernando Lugo ce9d7db979 fs_mgr: allow using legacy A/B suffix
Right now all platforms supporting A/B have not fixed
androidboot.slot_suffix kernel command line parameter. To avoid breaking
all those platform allow using legacy support bootloaders get fixed.

Bug: 36533366
Test: boot
Change-Id: I0ad349f262d0b7f4897f3e184cb053b1440b2d5b
Signed-off-by: Fernando Lugo <flugo@google.com>
2017-03-22 19:22:25 -07:00
Fernando Lugo d1dcedd3fb fs_mgr: adapt to new A/B support
In the new A/B partition support suffixes don't have "_". So, fix fs_mgr
code that assumes it has "_"

Bug: 36533366
Test: boot
Change-Id: I0f528cf1e8fecacb1b4ae34f6dc42e18ebe777bb
Signed-off-by: Fernando Lugo <flugo@google.com>
2017-03-22 19:21:56 -07:00
Christopher Ferris 9642232f13 Initialize si_code in siginfo.
There was at least one failure due to si_code being unitialized
and then examined.

Test: Run the 32 bit and 64 bit version of the unit tests on angler.
Change-Id: I5455a2cd29afafcd26a49f696e61141bb48478dc
2017-03-22 18:06:57 -07:00
Christopher Ferris cc99ba7ff5 Merge "Do not access device maps."
am: a06e1c9eef

Change-Id: Id30b71a301953d8450bd66552a020437c5e91b94
2017-03-23 00:53:18 +00:00
Adam Lesinski c0405200b8 Merge "healthd: Implement scheduleUpdate"
am: 6edabc75ab

Change-Id: I80082322b77cbd74b70b4d3c25e172d1c51f6072
2017-03-23 00:48:48 +00:00
Christopher Ferris a06e1c9eef Merge "Do not access device maps." 2017-03-23 00:32:40 +00:00
Treehugger Robot 6edabc75ab Merge "healthd: Implement scheduleUpdate" 2017-03-22 23:54:02 +00:00
Adam Lesinski 537713bace libziparchive: Add ability to backup in ZipWriter
Based on the compressed size of a file entry,
the decision needs to be made to instead store the file
uncompressed. This adds support to ZipWriter to backup
its last file entry.

The file is now always truncated when the EOCD is written out,
to account for the case where a file entry is backed-up and the
resulting file written is much smaller, leaving garbage data at
the end of the file.

This change also includes a rename of FileInfo -> FileEntry.
This struct was private (now public), so it shouldn't affect any
clients.

Bug: 35461578
Test: make ziparchive-tests
Change-Id: I23dc584406274ab7b8ce62b3fbc3562ca4c2603e
2017-03-22 16:46:42 -07:00
Mark Salyzyn 2b616cea9e libcutils: fs_config() add check /odm/etc/fs_config_*
Add reading of vendor file-system config files
/odm/etc/fs_config_dirs and /odm/etc/fs_config_files.

Order of interpretation (for dirs and files respectively):
- /system/etc/fs_config_dirs or /system/etc/fs_config_files
- /vendor/etc/fs_config_dirs or /vendor/etc/fs_config_files
- /oem/etc/fs_config_dirs or /oem/etc/fs_config_files
- /odm/etc/fs_config_dirs or /odm/etc/fs_config_files
- internal android_dirs[] or android_files[] structures.

No restrictions are placed on the odm file-system config files,
although the developer is advised to restrict the scope to the /odm
file-system since the intent is to provide support only for
customized portions of odm.img.

Test: full build and install smoke test and inspection
Bug: 36071012
Change-Id: Ic3afb5bb4ea20b15bd5df728be9f16045bf5b039
2017-03-22 15:28:40 -07:00
Christopher Ferris f5e568e653 Do not access device maps.
It's possible that a device map has memory controlled by a single entry
device driver. Thus, you can deadlock if a process is touching that
device memory and we try to unwind it and also touch that device memory.
Simply skip any attempts to step through, or get function names from
device memory maps.

Bug: 36130325

Test: Ran new unit tests, ran bionic unit tests, ran art ThreadStress.
Change-Id: Ibc62d7ec8106c619ee08968f05e04aea55d7cbfa
2017-03-22 14:55:05 -07:00
Elliott Hughes ee1ac710cd Switch "adb sideload" over to lseek/read.
This made no difference to the time taken to sideload an AOSP marlin
update (1m24s), but does reduce the memory requirements to 64KiB.

Bug: https://code.google.com/p/android/issues/detail?id=258500
Bug: http://b/36046324
Test: "time adb sideload update.zip"
Change-Id: Ib0a4daeb5fe798a9bb9c9e0e5fbcff0ed46f20df
2017-03-22 14:34:16 -07: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
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 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
Steven Moreland 9e36331174 Start hwservicemanager earlier.
Also start hals where hwservicemanager was started before.

Bug: 36278706
Test: internal marlin+angler boots
Change-Id: Ia55d2ef747fcbd086a09e1bb856824b14343118b
2017-03-22 11:19:31 -07: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
Narayan Kamath abd4613f05 Logwrapper: Remove unused support for input / output processing.
Should make it easier to switch callers over to posix_spawn once
that's available.

NOTE: The (now) unused arguments will be removed in a followup (multi-project)c
hange once we empirically confirm that there aren't any prebuilt blobs
using this function. I did readelf all currently checked in prebuilts to look
for a reference to this method, but one can never be too paranoid.

Test: make checkbuild
Change-Id: I454d80c52f269c31846133cc54375decd702fe71
2017-03-22 11:00:43 +00:00
Lorenzo Colitti 5e801e7bd5 Make the xtables lock readable only by AID_RADIO and root.
Anyone who can read this file can call flock(..., LOCK_EX) on it,
thereby blocking any future iptables commands from running.
Restrict it to user AID_RADIO, which includes device-specific
network management daemons, and group root.

Bug: 36108349
Test: see https://android-review.googlesource.com/#/c/348939/
Change-Id: I4dae4b5a835fabdc1a61a330e0446b39651f8156
2017-03-22 17:03:19 +09: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
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 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 f0cb60083e Merge "init: reboot to bootloader on crash for development builds"
am: ac8a3bd283

Change-Id: Ieb55ec65e908410eb5dadc1cd0f25a9bbf37fd4a
2017-03-21 23:01:28 +00:00