Commit graph

11441 commits

Author SHA1 Message Date
Elliott Hughes
4c9d24a3ed Fix build.
Change-Id: I31fc562068ebbba5e9872ee91694feb611fc957f
2015-02-18 16:57:30 -08:00
Elliott Hughes
8e16a7e2a3 Merge "adb: add "adb unroot" to restart adb in non-root mode" 2015-02-19 00:18:38 +00:00
Dan Albert
2268788ae4 Merge "Move USB transport code to libadb." 2015-02-18 23:42:42 +00:00
Dan Pasanen
9885881d06 adb: add "adb unroot" to restart adb in non-root mode
Change-Id: Ice6b94a71a62648ac073d129914a07372411fb25
2015-02-18 12:37:11 -08:00
Yabin Cui
b703214e25 Merge "Move sprintf to snprintf." 2015-02-18 20:26:02 +00:00
Dan Albert
9449376328 Move USB transport code to libadb.
Also note that we need both a libadb and a libadbd (for now) to
differentiate between code using ADB_HOST=1 and ADB_HOST=0.

Bug: 17626262
Change-Id: I873a8fb442a8a69258fe39af17781714a8fae4f6
2015-02-18 10:55:28 -08:00
Dan Albert
1ac334ec66 Merge "Add extern "C" to all the adb headers." 2015-02-18 17:52:40 +00:00
Dan Albert
32e872caa4 Merge "Ignore useless cpplint messages in adb." 2015-02-18 17:45:26 +00:00
Dan Albert
818fb4b448 Add extern "C" to all the adb headers.
Change-Id: Iaefa3e18d6ee2e065eb97271a796613b2a8e7d6e
2015-02-18 00:21:16 -08:00
Dan Albert
54ac73aa34 Ignore useless cpplint messages in adb.
Change-Id: I6411eb3963d215b228e50cd967a2174e5036ed73
2015-02-18 00:20:37 -08:00
Yabin Cui
e2d63af002 Move sprintf to snprintf.
Bug: 19340053
Change-Id: Id0d866e6195ed4752b4be6081eeb2aab8b1dbe9a
2015-02-17 19:27:51 -08:00
Elliott Hughes
f96c15000f Merge "Fix the WriteStringToFile overload that takes mode/owner/group." 2015-02-17 18:47:01 +00:00
Elliott Hughes
9d1f515ed1 Fix the WriteStringToFile overload that takes mode/owner/group.
The actual bug is == instead of !=, but the real cause was me trying to be
too clever. This patch switches to much simpler code, and -- since the
intended use of this code is security anyway -- adds logging if anything
goes wrong.

Bug: 19361774
Change-Id: If2af07d31a5002f9010b838247b691f6b28bdfb1
2015-02-17 10:25:23 -08:00
Elliott Hughes
29576ae890 Merge "/vendor is sometimes on a separate partition now." 2015-02-14 04:56:22 +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
b0572e2566 Merge "Remove unused variable BOOTCHART_DEFAULT_TIME_SEC." 2015-02-14 00:18:16 +00:00
Elliott Hughes
0f58cb0035 Remove unused variable BOOTCHART_DEFAULT_TIME_SEC.
Change-Id: Id43c73dd32d2f9f1eee9592b55aa3fd3c02094b2
2015-02-13 16:17:42 -08:00
Elliott Hughes
bf7560f12c Merge "Further refactoring of the bootchart code." 2015-02-13 23:54:29 +00:00
Elliott Hughes
841b263fae Further refactoring of the bootchart code.
Change-Id: Ifed6ae8d481b605139fd27799574de4c2d0f5908
2015-02-13 15:15:11 -08:00
Elliott Hughes
265df6f50c Merge "bootchart: fix bootchart can not be triggered problem" 2015-02-12 20:17:50 +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
Christopher Ferris
884f194255 Merge "Do not dump maps/memory/code of sibling threads." 2015-02-11 01:19:56 +00:00
Mark Salyzyn
05a67c964b Merge "liblog: test: ARM64: Enable 32 and 64-bit liblog_benchmark" 2015-02-10 18:16:05 +00:00
Mark Salyzyn
53016d8949 liblog: test: ARM64: Enable 32 and 64-bit liblog_benchmark
- Enable build for 32 and 64 bit benchmark executables
- Fix some cosmetics issues in logd_write.c

Change-Id: I544446e5116607d7fec89171135f6e1eff6aebd8
2015-02-10 18:15:51 +00:00
Narayan Kamath
0d385d1c62 Merge "Track renaming of initUnchangeableSystemProperty." 2015-02-10 15:43:54 +00:00
Narayan Kamath
484c55b37f Track renaming of initUnchangeableSystemProperty.
It's now setUnchangeableSystemProperty.

Change-Id: Ib42f8ac9f074230dfb7af2eb633e0a536ab7d4b7
2015-02-10 15:43:41 +00:00
Christopher Ferris
ab9e7dcef6 Do not dump maps/memory/code of sibling threads.
Modifies the code so that if the unwind fails, the code still prints
as much data as possible.

Also, for sibling threads, skip printing the maps and memory/code
since it's not likely to be very relevant.

Fix a few cases where extra space is at the end of lines.

Fix an inverted if statement that was checking the wrong condition.

Bug: 18816322
Change-Id: Ic659e0c34489bf2c65c5a23e2b83e31653b927e4
2015-02-09 19:22:33 -08:00
Andreas Gampe
ed318bff41 Merge "log.h: Fix typo" 2015-02-10 00:17:42 +00:00
Andreas Gampe
f45bbe496f log.h: Fix typo
Change-Id: I6b5e9bc9d40e5e5ecf9f50f7392675391e6f18e6
2015-02-09 16:13:33 -08:00
Mark Salyzyn
fd86730386 Merge changes I420b5b8a,Ica23fe41
* changes:
  log.h: wrap android_testLog around __android_log_is_loggable
  log.h: deprecate CONDITION
2015-02-09 23:59:11 +00:00
Mark Salyzyn
1df92e523e log.h: wrap android_testLog around __android_log_is_loggable
- take android_testLog from the bonepile and resurrect
- android_testLog is used, and makes sense in its current context
  as a holder for Android Logging policy.
- Default level when not specified is ANDROID_LOG_VERBOSE for
  eng and userdebug, and ANDROID_LOG_DEBUG for user.

NB: Properties, which are associated with __android_log_is_loggable are
not to be adjusted in user release; it would be useful at that juncture to
return a constant of (0) for VERBOSE, and a (1) for others on user builds.
Or default level to drop to ANDROID_LOG_DEBUG for all in future.

Bug: 17760225
Change-Id: I420b5b8a94d53d664c6a8b13546ebc424a147923
2015-02-09 15:37:32 -08:00
Mark Salyzyn
f5af82edf3 log.h: deprecate CONDITION
- replace CONDITION with __predict_false to match with bionic

Change-Id: Ica23fe41cf9a7ea5eaf1b8552780af9ec7827808
2015-02-09 15:25:48 -08:00
Elliott Hughes
830914a4b6 Merge "Lose touch to toybox." 2015-02-09 22:15:39 +00:00
Mark Salyzyn
95f7ecbd38 Merge "liblog: add __android_log_is_loggable()" 2015-02-09 22:13:47 +00:00
Mark Salyzyn
956870518e liblog: add __android_log_is_loggable()
- Add new liblog API __android_log_is_loggable(prio, tag, def)
- future plan to integrate this into the runtime checks and into
  the logd daemon for filtration. Inert for now.

Bug: 17760225
Change-Id: I16395b4d42acc08f0209f55a1cbf87b0b2112898
2015-02-09 22:12:59 +00:00
Elliott Hughes
c6fa276515 Lose touch to toybox.
Change-Id: Id9646ff10870425fc4013aab6621a5f6a0c6e98e
2015-02-09 14:10:44 -08:00
Elliott Hughes
3bc8ae63ce Merge "Use mkstemp for host ashmem." 2015-02-09 21:53:13 +00:00
Elliott Hughes
2004a863dc Use mkstemp for host ashmem.
Bug: 19310167
Change-Id: Ic4e32b3924a9aa0b0d095d445108cbcf2231cd91
2015-02-09 12:49:53 -08:00
Elliott Hughes
3f27558e29 Merge "fix bug that passing invalid fd to fstats on win32 builds" 2015-02-09 19:50:01 +00:00
eric.yan
a859219fec fix bug that passing invalid fd to fstats on win32 builds
lfd returned by adb_open is not the actual file desc.
on win32 builds. calling through fstat with invalid fd
will lead to crash, using stat instead.

Change-Id: I7fdc8b825162eaa42efe8755265842c300b00e39
Signed-off-by: eric.yan <eric.yan@yulong.com>
Signed-off-by: severecold <severecold@gmail.com>
2015-02-09 13:41:27 +00:00
Elliott Hughes
5ac8b917de Merge "Bump do_write buffer size" 2015-02-07 17:07:01 +00:00
Johan Redestig
7e952f41f1 Bump do_write buffer size
In the case of do_write (write to generic file) there
is really no relation to the PROP_VALUE_MAX limitation
of system properties. The current value, 92, is not so
much for writing to files so bump it a bit.

Ideally there should not be any low hard limit in this
case. Either expand_props should allocate the output
buffer or take the output fd and to streaming write.
Such a change is rather invasive though and at this
point in time it seems reasonable that one dont want
more than 256 character strings in the init files.

Change-Id: I846a282ae4e747e6171eef38b302b46287951451
2015-02-07 10:57:10 +01:00
Christopher Ferris
c9c401e64b Merge "Move map data into backtrace data proper." 2015-02-06 23:29:00 +00:00
Christopher Ferris
12385e3ad0 Move map data into backtrace data proper.
The backtrace structure used to include a pointer to a backtrace_map_t
that represented the map data for a particular pc. This introduced a
race condition where the pointer could be discarded, but the backtrace
structure still contained a pointer to garbage memory. Now all of the map
information is right in the structure.

Bug: 19028453
Change-Id: If7088a73f3c6bf1f3bc8cdd2bb4b62e7cab831c0
2015-02-06 15:00:09 -08:00
Elliott Hughes
5e753100c3 Merge "Clean up reading and writing in init." 2015-02-06 22:22:30 +00:00
Elliott Hughes
f682b4786a Clean up reading and writing in init.
This isn't particularly useful in and of itself, but it does introduce the
first (trivial) unit test, improves the documentation (including details
about how to debug init crashes), and made me aware of how unpleasant the
existing parser is.

I also fixed a bug in passing --- unless you thought the "peboot" and "pm"
commands were features...

Bug: 19217569
Change-Id: I6ab76129a543ce3ed3dab52ef2c638009874c3de
2015-02-06 14:20:30 -08:00
Nick Kralevich
17b5b35200 Merge "fs_mgr: error check umount calls / add retry logic" 2015-02-06 20:27:12 +00:00
Nick Kralevich
7294eb6cae fs_mgr: error check umount calls / add retry logic
Don't silently ignore umount errors. At a minimum, log them.

Add strerror(errno) to another umount call, to make sure we get
some actionable data.

check_fs: try 5 times umounting the filesystem. It appears that
the umount is failing, perhaps because some service is opening
the file on the device or other error. Try unmounting it multiple
times in case it's a transient problem and we can recover.

Bug: 19199624
Bug: 19156134
Change-Id: I7213eb52d55116fb2419a36494d26d5e159981a7
2015-02-05 20:50:22 -08:00
Christopher Ferris
6289412222 Merge "Remove link to gccdemangle." 2015-02-06 04:11:47 +00:00
Christopher Ferris
2a176a89c2 Remove link to gccdemangle.
Bug: 18930951
Change-Id: Ib7fd332b6e02241c0676ef33d2fa210a72efe1b1
2015-02-05 19:33:11 -08:00