Commit graph

25 commits

Author SHA1 Message Date
Bob Badour
3c53823658 [LSC] Add LOCAL_LICENSE_KINDS to frameworks/native
Added SPDX-license-identifier-Apache-2.0 to:
  cmds/atrace/Android.bp
  cmds/bugreport/Android.bp
  cmds/bugreportz/Android.bp
  cmds/cmd/Android.bp
  cmds/dumpstate/Android.bp
  cmds/dumpsys/Android.bp
  cmds/dumpsys/tests/Android.bp
  cmds/flatland/Android.mk
  cmds/idlcli/Android.bp
  cmds/installd/Android.bp
  cmds/installd/tests/Android.bp
  cmds/ip-up-vpn/Android.mk
  cmds/lshal/Android.bp
  cmds/lshal/libprocpartition/Android.bp
  cmds/rawbu/Android.bp
  cmds/rss_hwm_reset/Android.bp
  cmds/service/Android.bp
  cmds/servicemanager/Android.bp
  cmds/surfacereplayer/Android.bp
  cmds/surfacereplayer/replayer/Android.bp
  libs/adbd_auth/Android.bp
  libs/android_runtime_lazy/Android.bp
  libs/arect/Android.bp
  libs/binder/Android.bp
  libs/binder/ndk/Android.bp
  libs/binder/ndk/tests/Android.bp
  libs/binder/parcel_fuzzer/Android.bp
  libs/binder/rust/Android.bp
  libs/binder/rust/tests/Android.bp
  libs/binder/tests/Android.bp
  libs/binder/tests/fuzzers/Android.bp
  libs/binderdebug/Android.bp
  libs/binderdebug/tests/Android.bp
  libs/binderthreadstate/1.0/Android.bp
  libs/binderthreadstate/Android.bp
  libs/bufferqueueconverter/Android.bp
  libs/cputimeinstate/Android.bp
  libs/diskusage/Android.bp
  libs/dumputils/Android.bp
  libs/fakeservicemanager/Android.bp
  libs/gralloc/types/Android.bp
  libs/gralloc/types/fuzzer/Android.bp
  libs/gralloc/types/tests/Android.bp
  libs/graphicsenv/Android.bp
  libs/gui/Android.bp
  libs/gui/sysprop/Android.bp
  libs/gui/tests/Android.bp
  libs/incidentcompanion/Android.bp
  libs/input/Android.bp
  libs/input/tests/Android.bp
  libs/math/Android.bp
  libs/math/tests/Android.bp
  libs/nativebase/Android.bp
  libs/nativedisplay/Android.bp
  libs/nativewindow/Android.bp
  libs/nativewindow/tests/Android.bp
  libs/renderengine/Android.bp
  libs/renderengine/tests/Android.bp
  libs/sensor/Android.bp
  libs/sensor/tests/Android.bp
  libs/sensorprivacy/Android.bp
  libs/ui/Android.bp
  libs/ui/tests/Android.bp
  libs/ui/tools/Android.bp
  libs/vibrator/Android.bp
  libs/vibrator/fuzzer/Android.bp
  libs/vr/libpdx/Android.bp
  libs/vr/libpdx/fuzz/Android.bp
  libs/vr/libvr_manager/Android.bp
  opengl/libs/Android.bp
  opengl/tests/EGLTest/Android.bp
  opengl/tests/fillrate/Android.bp
  opengl/tests/finish/Android.bp
  opengl/tests/gl2_basic/Android.bp
  opengl/tests/gl2_cameraeye/Android.bp
  opengl/tests/gl2_copyTexImage/Android.bp
  opengl/tests/gl2_java/Android.bp
  opengl/tests/gl2_jni/Android.bp
  opengl/tests/gl2_yuvtex/Android.bp
  opengl/tests/gl_jni/Android.bp
  opengl/tests/gl_perf/Android.bp
  opengl/tests/gl_perfapp/Android.bp
  opengl/tests/gl_yuvtex/Android.bp
  opengl/tests/gldual/Android.bp
  opengl/tests/gralloc/Android.bp
  opengl/tests/hwc/Android.bp
  opengl/tests/lib/Android.bp
  opengl/tests/lighting1709/Android.bp
  opengl/tests/linetex/Android.bp
  opengl/tests/swapinterval/Android.bp
  opengl/tests/testFramerate/Android.bp
  opengl/tests/testLatency/Android.bp
  opengl/tests/testPauseResume/Android.bp
  opengl/tests/testViewport/Android.bp
  opengl/tests/textures/Android.bp
  services/audiomanager/Android.bp
  services/automotive/display/Android.bp
  services/batteryservice/Android.bp
  services/displayservice/Android.bp
  services/gpuservice/Android.bp
  services/gpuservice/bpfprogs/Android.bp
  services/gpuservice/gpumem/Android.bp
  services/gpuservice/gpustats/Android.bp
  services/gpuservice/tests/unittests/Android.bp
  services/gpuservice/tracing/Android.bp
  services/inputflinger/Android.bp
  services/inputflinger/benchmarks/Android.bp
  services/inputflinger/dispatcher/Android.bp
  services/inputflinger/host/Android.bp
  services/inputflinger/reader/Android.bp
  services/inputflinger/reporter/Android.bp
  services/inputflinger/tests/Android.bp
  services/inputflinger/tests/fuzzers/Android.bp
  services/powermanager/Android.bp
  services/schedulerservice/Android.bp
  services/sensorservice/Android.bp
  services/sensorservice/hidl/Android.bp
  services/sensorservice/tests/Android.bp
  services/stats/Android.bp
  services/surfaceflinger/Android.bp
  services/surfaceflinger/CompositionEngine/Android.bp
  services/surfaceflinger/TimeStats/Android.bp
  services/surfaceflinger/TimeStats/timestatsproto/Android.bp
  services/surfaceflinger/layerproto/Android.bp
  services/surfaceflinger/sysprop/Android.bp
  services/surfaceflinger/tests/Android.bp
  services/surfaceflinger/tests/fakehwc/Android.bp
  services/surfaceflinger/tests/unittests/Android.bp
  services/surfaceflinger/tests/vsync/Android.bp
  services/surfaceflinger/tests/waitforvsync/Android.bp
  services/utils/Android.bp
  services/utils/tests/Android.bp
  services/vr/hardware_composer/Android.bp
  services/vr/virtual_touchpad/Android.bp
  vulkan/libvulkan/Android.bp
  vulkan/nulldrv/Android.bp
  vulkan/vkjson/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
    SPDX-license-identifier-MIT SPDX-license-identifier-Unicode-DFS
    legacy_notice
to:
  Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
    SPDX-license-identifier-MIT legacy_notice
to:
  opengl/Android.bp
  opengl/tests/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
    legacy_notice
to:
  libs/vr/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-MIT
to:
  headers/Android.bp
  services/vr/Android.bp
  vulkan/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-MIT
    SPDX-license-identifier-Unicode-DFS
to:
  cmds/surfacereplayer/proto/Android.bp
  libs/vr/libbroadcastring/Android.bp
  libs/vr/libbufferhub/Android.bp
  libs/vr/libbufferhubqueue/Android.bp
  libs/vr/libbufferhubqueue/benchmarks/Android.bp
  libs/vr/libbufferhubqueue/tests/Android.bp
  libs/vr/libdisplay/Android.bp
  libs/vr/libdvr/Android.bp
  libs/vr/libdvr/tests/Android.bp
  libs/vr/libdvrcommon/Android.bp
  libs/vr/libpdx_default_transport/Android.bp
  libs/vr/libpdx_uds/Android.bp
  libs/vr/libperformance/Android.bp
  libs/vr/libvrflinger/Android.bp
  libs/vr/libvrflinger/tests/Android.bp
  libs/vr/libvrsensor/Android.bp
  opengl/tests/configdump/Android.bp
  opengl/tests/filter/Android.bp
  opengl/tests/gl_basic/Android.bp
  opengl/tests/tritex/Android.bp
  services/vr/bufferhubd/Android.bp
  services/vr/hardware_composer/aidl/Android.bp

Added SPDX-license-identifier-BSD SPDX-license-identifier-MIT
    legacy_notice
to:
  opengl/tests/angeles/Android.bp

Added SPDX-license-identifier-MIT
to:
  services/vr/performanced/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work

Change-Id: Ib1de8cd7b87446de45d79db15cd90b93a591846d
Merged-in: I61e7702e6b36f218bebc7c87853001861a92741e
Merged-in: I9d9d5fb32033c08cfb517f6cfc0ecb4cf1eee2fe
Merged-in: I10f45547b1161e3768a134b38bf40d77a3a82f09
2021-02-15 19:24:54 -08:00
Devin Moore
c03e3aa3cd Add libbinderdebug
Allows lshal and dumpsys to share the code to get Binder PID info.

Test: atest libbinderdebug_test lshal_test
Test: diff output of lshal before and after this CL
Bug: 140639610
Change-Id: I04dbe2509673502502ac849ef4ae74147404fc43
2020-12-15 14:16:39 -08:00
Yifan Hong
43101a4f34 lshal_test uses static libvintf.
Test: forrest on 64 bit cuttlefish x86
Fixes: 174494015
Change-Id: I33f98cd913dc5122babd0290e156ac394522bbca
2020-12-01 11:14:39 -08:00
Yifan Hong
5cceea8d0b lshal: Add test for debug -E
Test: lshal_test
Change-Id: Ib34d291fe94e7a0b0e21088b741d844c09f1a8a8
2020-07-10 11:14:59 -07:00
Steven Moreland
7a10a4f543 Remove libhwbinder/libhidltransport deps
Since these were combined into libhidlbase.

Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: Iec1802ce9226570d3a02cc5242f7ca72e1370635
2019-09-09 10:46:17 -07:00
Steven Moreland
392c8417d9 Merge "lshal: add wait command" 2019-07-12 16:47:44 +00:00
Steven Moreland
552e407f8e lshal: add wait command
Waits for an interface to start (e.g. for scripting certain tests).

Fixes: 135956088
Test: the following
$ adb shell lshal wait android.hardware.nfc@1.0::INfc/foo
Service not found (missing permissions or not in VINTF manifest?).
$ echo $?
128
$ adb shell lshal wait android.hardware.nfc@1.0::INfc/default
$ echo $?
0
Test: lshal_test

Change-Id: I355fc33f9e46bac573a38425205e8db81f19a36e
2019-07-12 00:44:27 +00:00
Steven Moreland
eae1a0bd30 Fix lshal_test after updated defaults.
Also add TEST_MAPPING so that this doesn't happen again.

Bug: N/A
Test: N/A
Change-Id: Idd99b34e8e634b9f93652b756eabcf9f62256e7e
2019-06-26 18:20:28 -07:00
Steven Moreland
b8745de570 liblshal: make static
- reduce number of files on device
- allow testing lshal w/o flashing
- no need for dynamic linking (static lib will be more compact)

Bug: N/A
Test: lshal, lshal_test
Change-Id: I9b41e78f7e6a469505cd530eb578df6855f45a1f
2019-06-25 11:40:37 -07:00
Yifan Hong
f31aa05f9c lshal --init-vintf: can specify manifest partition
lshal --init-vintf [--init-vintf-partition=vendor] generates
device manifest.

lshal --init-vintf --init-vintf-partition=system generates
framework manifest.

lshal --init-vintf --init-vintf-partition=odm generates odm manifest.

Test: the above commands
      health/backup is in system manifest
      IBase is not in any manifest
      graphics.composer/vr is in system manifest

Test: lshal_test

Fixes: 71802285
Change-Id: Ie16c8914218ece5c3cd698c93f2bada1be3ee29f
2018-02-05 15:34:56 -08:00
Chih-Hung Hsieh
734e378a73 Use -Werror in frameworks/native/cmds
* Remove or comment out unused variables/functions.

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I15a463eb9a20bc12787c104f671063ceeafaa1cc
2017-10-09 15:16:59 -07:00
Yifan Hong
fee209dda2 lshal: add Released column.
Example output:

$ lshal --neat -lis
...
Y android.hardware.configstore@1.0::ISurfaceFlingerConfigs/default 7f5fe8f4f8a24037153c504d8b4d3313c2ce33d81c8c69fe5194ddd2d4080e72
  android.hardware.configstore@1.1::ISurfaceFlingerConfigs/default 0000000000000000000000000000000000000000000000000000000000000000
...

Bug: 65123158
Test: lshal_test
Test: lshal
Test: lshal -ils
Test: lshal --help

Change-Id: I18e52eb977461d68909057583be8223d53f6748b
2017-09-15 12:36:50 -07:00
Yifan Hong
a8bedc6ae3 lshal: add HelpCommand
Add *Command::usage() function for each Command and let
Lshal class to call them.

Suppress output from getopt_long and write our own
error message to customized error stream (for testing).

Test: lshal_test
Test: lshal --help

Change-Id: I8f5847c84a3e01af29fa85871479cab3baeb5312
2017-09-14 13:40:27 -07:00
Yifan Hong
8bf7316ebc lshal: add tests for ListCommand::fetch* and dumpVintf
Test: lshal_test
Change-Id: I9e519ec93709ba4dfa7f95e4c5fff60cbda36134
2017-09-11 13:44:32 -07:00
Yifan Hong
d4a77e8a1a lshal: remove ListCommand addLine
Remove obnoxious addLine(...) in ListCommand.cpp by moving
the feature of selecting columns into the "Table" class.

Test: lshal
Test: lshal -m
Test: lshal -d (shows debug info for context hub)
Test: lshal_test
Bug: 35389839
Change-Id: Ieb4a6e544ef39c9f1a63b046a44b6a8e1416ea62
2017-09-11 13:44:32 -07:00
Yifan Hong
1bc1e9ffe2 lshal: pretty print table.
Table column length is not hardcoded, but computed
from length of each cell.

Without --neat, table column length varies for each
table.

As an effect, --neat does not emit debug info. Update
warning messages to reflect this.

Test: lshal
Test: lshal_test
Test: lshal --neat

Bug: 35389839

Change-Id: Id1d626a10ba58e20d2799854432dba74cfeaae6f
2017-08-30 10:45:42 -07:00
Yifan Hong
9881df9717 Add tests to lshal.
Test: lshal_test
Bug: 37954458
Change-Id: I1914e6274974ed5eb0ce2d655f1333d2344b49f5
2017-05-12 12:47:43 -07:00
Yifan Hong
48dc9f8586 Add lshal debug command.
Supported command:
    lshal debug android.hardware.foo@1.0::IFoo option option

Test: adb unroot && lshal --debug ; echo $?
Test: adb unroot && lshal debug android.hardware.nfc@1.0::INfc ; echo $?
Test: adb root && lshal --debug ; echo $?
Test: adb root && lshal debug android.hardware.nfc@1.0::INfc ; echo $?

Bug: 37954458
Change-Id: Ia2f4c9c0d3fb0a7bb26e76f01d02f49dc426e7f8
2017-05-12 12:47:43 -07:00
Yifan Hong
443df7932c Lshal: support commands.
Support the following commands:
  lshal list
  lshal list -itrpc
  lshal help
  lshal help list
  lshal list -h
  lshal list --help

Test: run these commands
Bug: 37725279
Change-Id: I970fbc8d250d43f57e92f783229e0645d7e8df4e
2017-05-12 12:47:43 -07:00
Steven Moreland
8f72688c45 Remove redundant dependencies
android.hidl.base@1.0 and android.hidlmanager@1.0 are built into libhidltransport.

Test: links
Bug: 33276472
Change-Id: Ia22e134d3882f2e503e540dda332fc17213b6bb0
2017-05-01 10:19:17 -07:00
Andreas Huber
28d35913d5 Enable --debug option for "lshal" command.
This calls into live binderized services and logs their "IBase::debug(...)"
output.

Bug: 36520620
Test: make, adb shell lshal, adb shell bugreport
Change-Id: Ida3b0c61eafd9f3de562a5df3af24bbaf383de22
2017-03-24 13:15:05 -07:00
Yifan Hong
4b86549b14 lshal --vintf to create a skeleton hal manifest.
Run it as follows:
lshal --init-vintf=/data/a.xml
lshal --init-vintf > /data/a.xml

Test: lshal --init-vintf with and without path argument
Bug: 35852743
Change-Id: Ief9385fc2764a487d1a70644699e01133bdc8a8e
2017-02-28 20:30:30 -08:00
Yifan Hong
b0dde932ad lshal: Refactor lshal to use an Lshal class; combined instance column with interface column
We need to be able to select columns, sort columns,
and do IPC calls fault-tolerently.
Refactoring lshal.cpp into an Lshal class for more
objective-oriented programming, so that global variables
can be avoided and less parameters will need
to be passed around.

Test: lshal outputs identical output as without this CL, except
with the column merged.

Change-Id: I9668c998da692222aef96ae67bbab8066172543d
2017-02-14 19:25:27 -08:00
Yifan Hong
f4bee84912 lshal: print pids of client processes.
Bug: 34777099
Bug: 34861460

Test: lshal
Test: NFC / light / audio with and without persistent.hal.binderized;
      run lshal to reflect this.

Change-Id: I50aa5d99fb14957b1e40a405836e68c235a22006
2017-02-01 16:10:16 -08:00
Yifan Hong
85dd3ad89f Add an lshal command.
lshal lists services registered to the binderized
IServiceManager and all services available to the
passthrough IServiceManager as *.so libraries. It
also dumps the reference count for each service.

Bug: 34712252
Test: adb shell lshal
Change-Id: I9436a033cf736b8a8c307a2e87549c9db6379f3f
2017-01-25 23:08:49 -08:00