energy_model: Fix read-multiple-files helper
Created by: bjackman
This helper executes a "cat" command to read a large number of files in one go. In order to avoid this command becomind too long for ADB to cope with, it was written to use glob patterns to cat the files, instead of the explicit paths (which it knows).
However a user has reported an issue with this approach, which I
suspect is because the order of the paths returned by find
differs
from the order of the shell's expansion.
Fix the cat command to explicitly list the paths to be read. In order to avoid the command-too-long issue, write the potentially-too-long command to a file, push it, and execute it via sh.