Change analyze layouts to use RPC (#11536)

Change-Id: I80d39e4ce4e0576b98ad095efce03740291d3de5