Configuration File Information
Cosmog requires a config file, placed at /data/local/tmp/cosmog.json
.
An example of this file is as follows
{
"device_id": "cosmog_device_name",
"rotom_worker_endpoint": "wss://my_rotom.com:7070",
"rotom_device_endpoint": "wss://my_rotom.com:7070/control",
"use_local_safetynet": true,
"public_ip": "36.21.50.90",
"workers": 8,
"token": "dQw4w9WgXcQ",
"rotom_secret": "very secure secret",
"injection_delay_ms": 5000,
"pogo_heartbeat_timeout_ms": 30000,
"concurrent_login_override": 0,
"worker_spawn_delay_override": 12500,
"disable_attest_delay": false
}
Config Explanation
Each of these configuration values has specific uses, and their optimal values will change between devices and use cases, and will likely require fine-tuning to work properly. An explanation of each config option is as follows.
device_id
is a string containing the name of your device, as it will appear in Rotom. This needs to be unique per device, or else Rotom won't work properly. Cosmog doesn't check this, so it's on you to make sure no devices share an ID.rotom_worker_endpoint
is the base Rotom websocket URL that each Cosmog worker will attempt to connect to. This needs to be the full URL and contain the protocol type (ws:// or wss://) and port number.use_local_safetynet
determines whether or not the device will attempt to solve SafetyNet and Play Integrity attestation challenges locally, or whether they will try to forward to another device. Real, physical devices that pass Play Integrity should always have this setting set totrue
. Setting this value tofalse
will only work for users that have special permissions, and unless you know what you're doing you should leave it set totrue
.public_ip
is a field that Rotom requests for a reason that's beyond my understanding. As far as I can tell, it doesn't matter what value you put here.workers
is an integer representing how many Cosmog workers a device will attempt to create. When authenticating with Klefki, the device will check this number against the user's maximum allowed workers-per-device, and pick whichever value is lowest. On my cheap S905W ATVs, it's safe to run about 8-10 workers per device with close to the same speeds as 1 worker. On my Pixel 5, I've gotten upwards of 40 working at once with no noticeable slowdown.token
is your Klefki authentication token.rotom_secret
contains your Rotom secret.injection_delay_ms
is the time between launching Pokemon GO and injecting the worker script into it. On my ATVs,5000
is about the right number, and on my Pixel 5,1000
is closer to optimal. The more powerful your device, the lower this number should be.pogo_heartbeat_timeout_ms
is used to determine how long to wait without hearing back from the PoGo worker script before killing the game and trying again. This delay is also used between launching the game the first time and spawning the first worker. On most ATVs, I suggest a value between30000
and45000
Optional Settings
The following settings are optional and not required. The defaults will work for most configurations.
rotom_device_endpoint
should in almost all cases be the same as the worker endpoint, but with/control
appended to the end. This is the endpoint for the device control channel, over which memory telemetry requests and restart commands are made from Rotom. The default is therotom_device_endpoint
+/control
concurrent_login_override
can be used to change how many workers Cosmog will attempt to spawn while there are already other workers running but not logged in or active. It is not recommended to move this value above 1 on an ATV, and the default is0
. On a more powerful phone, around5
is safe.worker_spawn_delay_override
is used to control the minimum delay between creating Cosmog workers. The default is12500
, which should be correct for almost all devices. Don't change this setting unless you know what you're doing.disable_attest_delay
disables the default setting where Cosmog will pause all RPC traffic while a worker is attempting to make a Play Integrity attestation. Unless you have a particularly powerful device such as a Pixel, it is strongly suggested to keep thisfalse
. The massive amount of RPC traffic Cosmog generates can often prevent the attestation result from completing within the time limit the game requires otherwise.verbose_logging
when set totrue
will print out an alert any time an RPC response isn't successful.no_magisk
is a config option that allows Cosmog to run (poorly) on magisk-less redroid containers on Apple silicon devices. Most people shouldn't touch this.