Network behaviour & Play data safety
Cefrium embeds a real Chromium engine, and like Chromium it keeps some of its own data current over the network. If you publish on Google Play you have to declare what leaves the device, so here is the complete answer: what the engine contacts, what it provably does not do, how to turn it off, and what that costs you.
What the engine contacts
Besides the pages your app loads, these are the only outbound requests the engine makes on its own:
| What | Where | Default | What it carries |
|---|---|---|---|
| Component updater | update.googleapis.com (HTTPS) |
On | Component ids and versions, the platform, and a random per-component install identifier. No URL, no account, nothing the user typed. |
| Network time | http://clients2.google.com/time/1/current |
Off since 0.9.3 | Nothing identifying. |
| Widevine provisioning | www.googleapis.com/certificateprovisioning (HTTPS) |
Only when a page uses DRM, since 0.18.0 | A provisioning request from the device's Widevine module, so a page can play protected media. Up to 0.17.1 the engine made it a minute after start in every app. |
The component updater is not telemetry. It is how the engine downloads the data files it depends on to be safe: the certificate revocation list (CRLSet), Certificate Transparency log metadata, the dangerous-download file-type policy, TLS error diagnostics, Trust Token key commitments, First-Party Sets, and the subresource filtering ruleset. It is the mechanism that keeps a shipped app's trust data current between SDK releases.
The time query exists to notice that a device's clock is wrong, so that a certificate which merely looks expired can be diagnosed as a clock problem. It carries no security data, and Android devices normally get the clock from the carrier or NTP already -- so from 0.9.3 Cefrium ships it off, which is a deliberate divergence from upstream Chromium's default. That leaves the component updater as the only request the engine makes on its own, unless a page plays protected media.
Widevine provisioning is a request Chromium makes ahead of time: a minute after
start it fetches two origin IDs, so the first protected video starts sooner. An
app that plays no DRM media gains nothing from it, so from 0.18.0 Cefrium makes
the request only when a page first uses Encrypted Media Extensions.
Cefrium.setDrmPreprovisioningAtStartupEnabled(true) restores
Chromium's behaviour.
What it does not do
Each of these was checked on a device by reading the engine's persisted state, not assumed from configuration:
- No usage statistics or metrics upload. Chromium's UMA and UKM reporting is off and no consent is recorded.
- No crash-report upload. The crash reporter is never configured, so it is never started.
- No Chromium field-trial ("variations") seed fetch.
- No Google Cloud Messaging.
- No Safe Browsing store or lookups.
- No Google API keys are compiled into the SDK, so the engine's sync and optimization-guide backends are inert.
- No requests to Google of its own, since 0.16.0. Before it, every profile asked accounts.google.com which Google accounts its cookies held (for a sync metric), Chrome's AI Mode asked www.google.com whether the user was eligible, sending the locale and country, and the engine kept a connection open to www.google.com, the default search engine, for omnibox searches. All three are gone. One more remained up to 0.17.1: Widevine provisioning a minute after start (see the table), which the release check missed because it watched for only 25 seconds. Each release now watches for 90 seconds and checks that the engine contacts no host but the component updater's.
Browsing data -- history, cookies, form data, what the user types -- stays in the on-device profile. Nothing uploads it.
Changing either default
The two requests get opposite defaults because they are not comparable: one is a
security feed whose absence degrades the engine silently, the other only improves an
error message. So the data feed stays on and you opt out of it, while the time query
is off and you opt back in. Set either before the engine starts. Since 0.16.0 it
starts the first time the app uses it, so Application.onCreate is early
enough. Before 0.16.0 the SDK started it from a ContentProvider, which
Android creates between Application.attachBaseContext and
Application.onCreate, so with those versions call them from
attachBaseContext, which works with every version:
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
Cefrium.setComponentUpdatesEnabled(false); // opt OUT of the security data feed
Cefrium.setNetworkTimeQueriesEnabled(true); // opt back IN to the time query
}
Called after initialization they are ignored and log a warning. Read the current
state with Cefrium.areComponentUpdatesEnabled() and
Cefrium.areNetworkTimeQueriesEnabled(). Both are implemented with
Chromium's own command-line switches, so they keep working across engine updates.
Available from Cefrium 0.9.3.
Read this before disabling component updates. This is a security trade-off, not just a privacy setting. With component updates off, every data file listed above freezes at the state baked into the SDK version you shipped. In particular certificate revocation data stops being refreshed, so a certificate revoked after your build date will still be accepted by your app.
The failure mode is silent: nothing crashes, nothing logs an error, and no user complains. If you disable it, you are taking on the job of shipping SDK updates promptly, so pin your Cefrium version deliberately and follow releases.
Good reasons to disable it:
- an air-gapped or offline deployment, where the requests cannot succeed anyway;
- a kiosk on a metered or strictly whitelisted network;
- a compliance regime that forbids unattended third-party requests.
"I would rather not talk to Google" on a general-purpose, internet-connected app is not a good enough reason on its own. You would be trading real revocation coverage for a shorter privacy note.
Re-enabling the time query is the opposite case: it costs you one request a day and buys a better error message. Turn it on if your hardware has no dependable clock -- a device with no cellular modem and no NTP reachability, or a kiosk whose RTC has no battery -- where a clock far enough off to break HTTPS is a real support case.
Routing through a proxy (0.16.0)
A proxy is a setting of a profile: every browser of it uses it, including browsers opened later, and it applies before a browser's first navigation.
CefriumProfile.getDefault().setProxy("socks5://127.0.0.1:9050");
CefriumProfile.getDefault().setWebRtcIpHandlingPolicy(
CefriumProfile.WEBRTC_DISABLE_NON_PROXIED_UDP);
Cefrium.setComponentUpdatesEnabled(false); // in Application.attachBaseContext
- No direct fallback. When a fixed proxy cannot be reached, requests fail; they do not leave without it.
- Private browsers follow the default profile, as in
Chrome, unless the incognito profile is given its own settings
(
CefriumProfile.incognito().setProxy;followDefaultProfile()undoes that). Named profiles are separate and follow nothing. - It is saved with the profile and survives a restart until changed. If your app turns a proxy on and off, set the state you want at every start.
- Loopback is never proxied (localhost, 127.0.0.1), as in Chrome.
- WebRTC is not covered by a proxy. Without
WEBRTC_DISABLE_NON_PROXIED_UDPa page can learn the device's address through a peer connection. - Component updates do not use a profile's proxy: the engine fetches them through its own system network context. Turn them off if nothing may leave the device directly.
- The ad-block list download goes through the default profile, so it follows that profile's proxy.
- IPv6 addresses go through it too, and so do the engine's own lookups: with a proxy set, the engine sends no DNS query of its own.
Each point is covered by an on-device test in the release suite, except the one on component updates, which comes from the engine's source.
When the proxy is down
Requests fail rather than leave without it, so tell the user:
CefriumProfile.getDefault().setProxyErrorListener((browser, url, error, mainFrame) -> {
// error: -130 the proxy cannot be reached, -120 a SOCKS failure, ...
if (mainFrame) showProxyDown(browser);
});
It reports every request of the profile's browsers that failed because
of the proxy, pages and their parts, on the main thread. Private browsers
report to CefriumProfile.incognito()'s listener.
Secure DNS (0.16.0)
Without a proxy, names are looked up through the network's resolver. DNS over HTTPS keeps those lookups away from it:
Cefrium.setSecureDns(Cefrium.SECURE_DNS_SECURE,
"https://dns.example/dns-query{?dns}");
- Modes as in Chrome:
SECURE_DNS_OFF,SECURE_DNS_AUTOMATIC(Chrome's default: DNS over HTTPS when the system's resolver offers it) andSECURE_DNS_SECURE(only the servers given; if they cannot be reached, names do not resolve). - It applies to every browser of the app and is kept across runs.
- With a proxy, the proxy resolves the names of the requests it carries.
Your Play data safety form
The form asks what your app collects and sends. Data the user types into websites they chose to visit is not your collection: the browser acts on the user's behalf, to third parties the user picked. So web browsing history, form inputs and page content are not declared -- they never leave the device.
What does leave the device by your app's doing is the engine's own maintenance traffic above. The honest declaration is short:
- Device or other IDs -- shared, not collected (you operate no server and never receive it). Purpose: app functionality, and fraud prevention / security / compliance. This is the random per-component install identifier the update check carries.
- Everything else -- not collected.
Two readings are defensible for that identifier: declare it as shared with a third party, or treat it as the embedded engine contacting its own infrastructure. We recommend declaring it. Over-declaring costs you one line in your listing; under-declaring is a policy violation, and this is traffic a reviewer can observe from a packet capture on a fresh install.
If you disable component updates, revisit the answer -- with the data feed off and the time query at its default, the engine makes no requests of its own and there is nothing left to declare.
Cefrium's own browser publishes exactly this, so you can adapt the wording from our privacy policy. Note that page is written for the browser's end users; this guide is the version for you as an integrator.
Verifying it yourself
You do not have to take any of this on trust. The engine records what happened in its own profile, and a server-assigned value on disk is proof that a request was made. On a debuggable build:
adb shell run-as <your.package> cat cache/Local\\ State
Look for updateclientdata.apps (component update checks: the
server-assigned cohortname values can only come from a response) and
network_time.network_time_mapping (the time query). On the 0.9.3
defaults the time mapping never appears at all, and with component updates disabled
too, neither key does. You can also confirm the absences: no
variations_compressed_seed, no metrics
client_id, and an empty ukm.persisted_logs.
Pass the command directly to run-as;
run-as <pkg> sh -c '...' lands in a different SELinux domain and
is denied.
To see every connection, record the engine's NetLog (0.16.0). Set it before the engine starts; it lists each request, the proxy chosen for it, every DNS lookup and every socket with its address and the bytes it carried, without cookies or credentials. Open the file in the NetLog viewer.
Cefrium.setNetLogFile(new File(getFilesDir(), "netlog.json"));
The file holds every URL visited and every address connected to: treat it as browsing history. Use it on a test profile, or with the user's consent, and do not ship it off the device as it is.
To list the hosts in it, copy it off a debuggable build and run the
netlog-audit
script. It groups the engine's documented contacts, loopback and everything
else, and with --expect fails a CI job on a host you did not
list:
adb exec-out run-as <your.package> cat files/netlog.json > netlog.json
python3 netlog-hosts.py netlog.json --expect app.example.com
The network-privacy
sample reads it to prove that nothing went around its proxy: after a
normal, a private and an IPv6 visit, no socket of the engine had connected
anywhere but to the proxy. Android's per-app byte counters
(TrafficStats) cannot show this: they also count the engine's
loopback traffic to a local proxy.
Need this in writing?
If your procurement or compliance process needs a signed statement of a specific release's network behaviour, or a validated configuration for an air-gapped or kiosk deployment kept current with security updates, write to cefrium@proton.me.