# Get started for Kepler

- Install dependencies

```bash
git clone https://github.com/almouro/flashlight-private.git
cd flashlight-private
yarn
yarn build
```

- Run `flashlight measure`

```bash
# For firetv
PLATFORM=keplerdevice node packages/commands/measure/dist/server/bin.js measure
# For kepler simulator
PLATFORM=keplersimulator node packages/commands/measure/dist/server/bin.js measure
```

# Running local changes

- Run `yarn watch` in a separate tab
- You can test `PLATFORM=keplerdevice node packages/commands/measure/dist/server/bin.js measure` as usual with your local changes

# How does it work

- Anything Kepler specific is implemented in `packages/platforms/kepler`.
- The host machine installs a [C++ executable](https://github.com/almouro/flashlight-private/tree/kepler-secret/packages/platforms/kepler/cpp-profiler/bin) into the target device to read from system files.
- The host machine parses the results and create a JSON of measures
- JSON of measures is exploited with our web UI
