Closed zhizhouzh closed 9 years ago
You need to have the APK (android application package) for Angry Birds, and you need to put it somewhere WA can find it, e.g. ~/.workload_automation/dependencies/angrybirds/ (you would need to create that directory if it doesn't exist).
Sorry, this not covered very well in documentation at the moment. I'll update the docs to rectify that.
For game workloads, such as angrybirds, you will also need to provide a recording of the gameplay that can be played back by WA. This needs to be done once per device, as recordings are device-specific; documentation covers how to do that:
https://github.com/ARM-software/workload-automation/blob/master/doc/source/revent.rst
I've updated Installation section with description of what needs to be be done for workloads such as angrybirds:
Thank you! But sorry to bother you again. I had failed to do revent replay, need I setup something else?
revent replay file
ERROR: could not open device file
By the way, I don't mean to offend you. I just don't know what's WA. I have another question. Is WA similar to LAVA? It seems LAVA also generate workload automatically.
Are you sure you're replaying as root? Could you give a bit more detail about what you're doing?
No offence taken :)
The is some overlap between functionallity offered by WA and LAVA, but they have differnt goals in what they are trying a to achive. WA is a developer tool that you install and run locally, rather than a system that you deploy and access remotely. It tries to automate device interaction in a reusable way (by spliting measurement from workload execution from result reporting, and providing a generic device interface which allows the same automation to work on different devices). WA's goal is to provide a means of collecting repeatable, reproducible measurements to facillitate data-driven development. WA is not a complete build-and-test system; it does not handle job queuing, board provisioning or centralized data storage; however you can intergate WA into such systems (e.g. you can run WA via a LAVA or a Jenkins job).
I am sure I'm replaying as root. I do record & replay as below:
# pwd
/data/tmp
# revent record -t 5 record.revent
# revent replay
ERROR: Must specify a file for recording/replaying (use -h for help).
Thank for your excellent explaining. Does WA aim to reproduce workload for research purpose about schedule? Is it another tool to generate workload rather than perf record/replay and rt-app?
As the error message says -- you need to specify the file you want to replay. So
# revent replay record.revent
WA is a tool for executing workloads and collecting measurements, not generating workloads. It allows you to define an "experiment" (i. e. "run these workloads while collecting these measurements, and configure the device that way beforehand") and execute it. It ties together workloads, measurement, result collection and processing, and device configuration.
Oh, sorry! I forget to specify the argument. Actually I had specified last time..
# revent record -t 5 record.revent
# revent replay record.revent
ERROR: could not open device file
record.revent:
cat record.revent | xxd
0000000: 0600 0000 0000 0000 1100 0000 2f64 6576 ............/dev
0000010: 2f69 6e70 7574 2f65 7665 6e74 3011 0000 /input/event0...
0000020: 002f 6465 762f 696e 7075 742f 6576 656e ./dev/input/even
0000030: 7431 1100 0000 2f64 6576 2f69 6e70 7574 t1..../dev/input
0000040: 2f65 7665 6e74 3211 0000 002f 6465 762f /event2..../dev/
0000050: 696e 7075 742f 6576 656e 7433 1100 0000 input/event3....
0000060: 2f64 6576 2f69 6e70 7574 2f65 7665 6e74 /dev/input/event
0000070: 3411 0000 002f 6465 762f 696e 7075 742f 4..../dev/input/
0000080: 6576 656e 7435 event5
My device uses cortex-a53 cpu. It runs a 64-bit OS.
Got it. I know what's WA now. Thank you!
Thanks for the info. It makes the issue clear -- this is a bug in the 64bit revent binary (we've always been using the 32bit version, so haven't ran into it ourselves). I've just pushed a fix and updated revent binaries. Please let me know if this works for you (you will need to re-record record.revent).
Thanks for reporting this issue!
Unfortunately semment fault now ... Some helpful message (maybe helpful):
# ./revent record -t 5 file
# ./revent replay file
Segmentation fault (core dumped)
# strace ./revent replay file
execve("./revent", ["./revent", "replay", "file"], [/* 28 vars */]) = 0
uname({sys="Linux", node="localhost", ...}) = 0
read(3, "\0\0\0\0~\261\2O\0\0\0\0;+\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 32) = 28
[...]
close(3) = 0
gettimeofday({1325576607, 164146}, NULL) = 0
gettimeofday({1325576607, 164250}, NULL) = 0
write(8, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\4\0\0\0", 24) = 24
gettimeofday({1325576607, 164461}, NULL) = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x1451c8578} ---
+++ killed by SIGSEGV (core dumped) +++
Segmentation fault
It looks like there are more issues with the 64bit binary that I originally thought. We're currently looking into this. Will update you once we have a fix.
Hi, we have a fix that I have now pushed, could you please give it a try and let us know if the issue is resolved for you.
Hi, it works on my phone now. It's so cool. Thank you!
Dear experts,
I want to run a android program, but failed:
wa run -f angrybirds
INFO Creating output directory. INFO Initializing CRITICAL <'s apk> could not be found
Could you help me? What should I prepare for running a android apk program?