Three kinds of secret, told apart by how they behave
The word secret covers several different things in a mobile app, and the difference matters more than the label.
An embedded credential is a fixed string compiled into the application. An app-level API key or client identifier can be embedded. Follow its source before classifying it: the same field can also hold a server-issued or device-derived value.
A derived credential is computed at run time from data the app already holds. A signing key assembled from several constants, or a value produced by a key derivation function over a device value, belongs here. Recovering the inputs is necessary, but the raw inputs alone do not give a client a working value unless the derivation is reproduced as well.
A session credential is issued by the server during a login or a handshake and expires. It appears in memory and in traffic but is not part of the application at all.
Compare values across launches, installs and sessions, then trace their source. A persisted server token can stay fixed, a local random value can change and remote configuration can be shared across devices. Those observations guide the trace; they do not identify the source on their own.
Where embedded values sit in a compiled Flutter build
A release Flutter app compiles its Dart code ahead of time, and the constants that code uses live in the compiled snapshot inside the application's shared library. A literal string is not stored as a language-level constant with a name attached. It is data placed where the code can load it, which means the string is present in the library as bytes.
That makes a byte-oriented search the most productive first step. Values worth looking for include host names, path fragments that look like a versioned API, header names, JSON field names, and strings in the shapes that credentials commonly take: long base64 blocks, hexadecimal runs of fixed length, PEM blocks, and the UUID form that many client identifiers use.
Search results include strings from compiled dependencies as well as the app. Check which library each value came from before following its references. Filtering by context helps. Use references and data flow to connect candidate strings to header construction and signing calls. File proximity alone does not establish that connection.
Values that only exist in memory
Some credentials never appear as a complete literal because the app assembles them at run time. The stored form is fragments plus the code that joins them, and the assembled value exists only in the heap while the app runs.
Observe the input to the operation that uses the value. For Android Keystore-backed keys, trace the key handle and cryptographic operation; key material can remain outside the app process. The observable moments are the same as in any client: the request builder, an HTTP interceptor, or the transport layer. Reading the value at one of those points gives you the assembled credential along with the surrounding state that produced it, which is often more useful than the string on its own.
This is also the moment to check whether the value is bound to anything else. A token that is valid only when particular headers match, or only from the device that requested it, will fail outside the app even when the string is copied exactly. The relevant checks are described in device farm isolation and in token generation from an APK.
Whether the extracted value keeps working
An embedded credential that a server can revoke is a temporary asset. Before building a client around one, establish whether the server can rotate it and how the app would learn about a new value. If the app fetches its configuration at start-up, the credential is effectively delivered at run time and may already be rotating. A fixed build value changes with a new artifact, but the server can revoke it or change its policy independently. Record both the value's source and the server behavior.
The stable parts of a reconstructed client are the protocol and the request shape. Credentials should sit in configuration rather than in code, so a change on the server side does not require changing the client. Runtime derived keys covers the case where the credential is produced rather than stored, and Flutter API reverse engineering covers the wider task of turning a Flutter app into a callable client.
SReverse turns the full APK's API into Python, JavaScript/TypeScript, Postman and complete documentation, including the credential and session flows needed by the client.
Related work
Reviewed 19 October 2026 · SReverse research desk