summaryrefslogtreecommitdiff
path: root/mobicore/README.android
blob: 1e117c41ea3c0001605e28954b2537eafe955513 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
MobiCore Daemon in Android
---

Command line
--
The MobiCore Daemon supports 4 command line options. It also displays them with the help option:

# ./mcDriverDaemon -h
usage: ./mcDriverDaemon [-mdsbh]
Start MobiCore Daemon

-h              show this help
-b              fork to background
-m IMAGE        load mobicore from IMAGE to DDR
-s              disable daemon scheduler(default enabled)
-d SIZE         donate SIZE bytes to mobicore(disabled on most platforms)
-r DRIVER       load dyamic driver

-b Forks the daemon to background

# ./mcDriverDaemon -b

Makes the daemon run in background and returns immediate control to the shell. No need to use shell forking with &

-m Loads a mobicore image to DDR

# ./mcDriverDaemon -m /data/app/mobicore.img

Loads the mobicore.img to DDR and starts executing it.

-s Disables NQ IRQ scheduler

# ./mcDriverDaemon -s

-d Sets how much RAM is donated to Mobicore in bytes

# ./mcDriverDaemon -d 1048576

If no -d is specified then the daemon donates 1Mb. The Value 0 disables RAM donation.

-r Loads dynamic driver at startup. The full path of the driver binary must be given, eg. /data/app/driver.drbin

# ./mcDriverDaemon -r /data/app/driver.drbin

Custom registry locations
--
Registry fallback

In case of a Device wipe in Android the /data/app/mcRegistry folder will be deleted with all it's contents. To overcome 
this the daemon supports a fallback location(eg /system/app/mcRegistry): it first tries to load the trustlet 
from /data/app/mcRegistry/[uuid].tlbin and if it fails then it tries to read the trustlet from /system/app/mcRegistry/[uuid].tlb

Both paths are completely configurable for the Daemon using 2 environment variables:MC_REGISTRY_PATH and MC_REGISTRY_FALLBACK_PATH

For example if you want to use /data/app/mcRegistry as the default path and /system/app/mcRegistry as the fallback path:

$ export MC_REGISTRY_PATH=/data/app/mcRegistry
$ export MC_REGISTRY_FALLBACK_PATH=/system/app/mcRegistry
$ /data/app/mcDriverDaemon

Custom authtoken path
--

The authtoken file is created at provisioning and is by default located in /data/app/mcRegistry/00000.authtoken

Because a device wipe could delete this file and make MobiCore unusable a new environment variable has been added to change the 
default behaviour: MC_AUTH_TOKEN_PATH

$ export MC_AUTH_TOKEN_PATH=/efs
$ /data/app/mcDriverDaemon

This would change the location of the authtoken file to /efs