unplugged-vendor/development/tools/winscope
2025-10-06 13:59:42 +00:00
..
adb_proxy Initial commit: AOSP 12 vendor with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
env Initial commit: AOSP 12 vendor with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
libs/virtualList Initial commit: AOSP 12 vendor with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
loaders Initial commit: AOSP 12 vendor with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
spec Initial commit: AOSP 12 vendor with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
src Initial commit: AOSP 12 vendor with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
static Initial commit: AOSP 12 vendor with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
tests/samples Initial commit: AOSP 12 vendor with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
.babelrc Initial commit: AOSP 12 vendor with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
.eslintrc.json Initial commit: AOSP 12 vendor with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
package.json Initial commit: AOSP 12 vendor with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
README.md Initial commit: AOSP 12 vendor with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
trace.sh Initial commit: AOSP 12 vendor with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
tsconfig.json Initial commit: AOSP 12 vendor with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
vue.config.js Initial commit: AOSP 12 vendor with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
webpack.config.common.js Initial commit: AOSP 12 vendor with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
webpack.config.dev.js Initial commit: AOSP 12 vendor with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
webpack.config.js Initial commit: AOSP 12 vendor with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
webpack.config.prod.js Initial commit: AOSP 12 vendor with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
webpack.spec.config.js Initial commit: AOSP 12 vendor with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
yarn.lock Initial commit: AOSP 12 vendor with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00

Tool for visualizing window manager traces

Developing WinScope

When the trace is enabled, Window Manager and Surface Flinger capture and save current state to a file at each point of interest. frameworks/base/core/proto/android/server/windowmanagertrace.proto and frameworks/native/services/surfaceflinger/layerproto/layerstrace.proto contain the proto definitions for their internal states.

Checking out code and setting up environment

Building & testing changes

  • Navigate to development/tools/winscope
  • Run yarn run dev

Update IntDefMapping

  • Build framework-minus-apex-intdefs module and a preprocessor will generate the latest IntDefMapping. From the ANDROID_ROOT run:
. build/envsetup.sh
m framework-minus-apex-intdefs
  • Copy the generated intDefMapping.json files to the prebuilts repo.
python3 -c 'import sys,json,collections; print(json.dumps(collections.OrderedDict(sorted(collections.ChainMap(*map(lambda x:json.load(open(x)), sys.argv[1:])).items())), indent=2))' $(find out/soong/.intermediates/frameworks/base -iname intDefMapping.json) > ./prebuilts/misc/common/winscope/intDefMapping.json
  • Upload the changes.
cd ./prebuilts/misc/common/winscope
repo start intdef-update
git commit -am "Update intdef mapping" "Test: N/A"
repo upload --cbr .

Building with internal extensions

Internal paths in vendor/ which are not available in AOSP must be replaced by stub files. See getWaylandSafePath for an example