<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Flutter Guard</title>
    <description>The latest articles on DEV Community by Flutter Guard (@flutterguard).</description>
    <link>https://dev.to/flutterguard</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3686109%2Fb1d912c0-102a-4d5e-95a3-3f00c26b8358.png</url>
      <title>DEV Community: Flutter Guard</title>
      <link>https://dev.to/flutterguard</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/flutterguard"/>
    <language>en</language>
    <item>
      <title>Reading a Flutter release APK from the terminal</title>
      <dc:creator>Flutter Guard</dc:creator>
      <pubDate>Sat, 21 Nov 2026 19:17:16 +0000</pubDate>
      <link>https://dev.to/flutterguard/reading-a-flutter-release-apk-from-the-terminal-1li9</link>
      <guid>https://dev.to/flutterguard/reading-a-flutter-release-apk-from-the-terminal-1li9</guid>
      <description>&lt;p&gt;A Flutter release looks like a normal Android package until you open it and find&lt;br&gt;
that most of the application is not in &lt;code&gt;classes.dex&lt;/code&gt;. The Dart code is compiled&lt;br&gt;
ahead of time into a native library, and the strings your app ships live there.&lt;/p&gt;

&lt;p&gt;This is a read-only walkthrough on a real, public release APK: LocalSend 1.18.2&lt;br&gt;
for &lt;code&gt;arm64-v8a&lt;/code&gt;, an open-source Flutter app. Every number below came from that&lt;br&gt;
file. Nothing was executed, nothing was uploaded, and no values that could be&lt;br&gt;
mistaken for credentials are reproduced here.&lt;/p&gt;

&lt;p&gt;Use it on an app you own or have written permission to test. Read-only is not the&lt;br&gt;
same as authorised.&lt;/p&gt;
&lt;h2&gt;
  
  
  1. Get the artifact and fix its identity
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gh release download v1.18.2 -R localsend/localsend -p &lt;span class="s1"&gt;'*arm64v8.apk'&lt;/span&gt;
sha256sum LocalSend-1.18.2-android-arm64v8.apk &lt;span class="o"&gt;|&lt;/span&gt; cut -c1-16
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;82ec3568fba2aa52
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Record the digest and the version together. A finding without the artifact digest&lt;br&gt;
is a rumour; the same package can be rebuilt with different content.&lt;/p&gt;

&lt;p&gt;Then look at the shape of the archive before reading any of it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;unzip -l app.apk &lt;span class="o"&gt;|&lt;/span&gt; awk &lt;span class="s1"&gt;'
  /lib\/[a-z0-9_-]+\/libapp\.so/ { app++; bytes=$1 }
  /flutter_assets\//              { assets++ }
  /classes[0-9]*\.dex$/           { dex++; dbytes+=$1 }
  END { printf "libapp.so entries: %d (largest %s bytes)\nflutter_assets entries: %d\nDEX files: %d (%d bytes)\n",
        app+0, bytes, assets+0, dex+0, dbytes }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On this APK:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;libapp.so entries: 1 (largest 14549936 bytes)
flutter_assets entries: 29
DEX files: 1 (3179884 bytes)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That ratio is the whole story of Flutter packaging: a 14.5 MB compiled Dart&lt;br&gt;
library next to a 3.2 MB DEX that holds the Android shell, the embedding and the&lt;br&gt;
plugins. If you audit only &lt;code&gt;classes.dex&lt;/code&gt;, you have read a small fraction of the&lt;br&gt;
application.&lt;/p&gt;
&lt;h2&gt;
  
  
  2. Know what &lt;code&gt;libapp.so&lt;/code&gt; is before you grep it
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;libapp.so&lt;/code&gt; is the AOT snapshot of your Dart code. It is machine code. It is not&lt;br&gt;
recoverable Dart source, and tools that promise to give you the original classes&lt;br&gt;
are usually pattern-matching symbol names, not decompiling them.&lt;/p&gt;

&lt;p&gt;What it does keep is real: string literals, symbol metadata, type names, and the&lt;br&gt;
URLs your code was compiled with. That is usually enough to answer the question a&lt;br&gt;
release review actually asks — what does this build contact, and what does it&lt;br&gt;
carry?&lt;/p&gt;
&lt;h2&gt;
  
  
  3. Read the assets, not just the code
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;unzip -l app.apk &lt;span class="o"&gt;|&lt;/span&gt; awk &lt;span class="s1"&gt;'/flutter_assets\//{print $4}'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; sed &lt;span class="s1"&gt;'s|flutter_assets/||'&lt;/span&gt; \
  &lt;span class="o"&gt;|&lt;/span&gt; cut -d/ -f1 &lt;span class="o"&gt;|&lt;/span&gt; sort &lt;span class="o"&gt;|&lt;/span&gt; uniq -c &lt;span class="o"&gt;|&lt;/span&gt; sort -rn
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This build keeps all 29 entries under a single &lt;code&gt;assets/&lt;/code&gt; subtree. Bundled&lt;br&gt;
configuration is public configuration: anything you put in &lt;code&gt;flutter_assets&lt;/code&gt; ships&lt;br&gt;
to every user and is readable with &lt;code&gt;unzip&lt;/code&gt;. If a value would be embarrassing in a&lt;br&gt;
zip listing, it should not be in the package.&lt;/p&gt;
&lt;h2&gt;
  
  
  4. Extract hosts with a count first, values second
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;unzip -p app.apk &lt;span class="s1"&gt;'lib/arm64-v8a/libapp.so'&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; libapp.so
strings libapp.so &lt;span class="o"&gt;|&lt;/span&gt; grep -oE &lt;span class="s1"&gt;'https?://[a-zA-Z0-9.-]+'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; sort -u &lt;span class="o"&gt;|&lt;/span&gt; wc -l
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Ten distinct hosts in this build. The first useful discipline is to count before&lt;br&gt;
you read: a release with forty hosts deserves a slower review than one with&lt;br&gt;
three, and the count is stable enough to compare across versions.&lt;/p&gt;

&lt;p&gt;Then read them — privately. A hostname in a binary is evidence that a string was&lt;br&gt;
compiled in. It is not evidence that the endpoint is live, reachable, or that any&lt;br&gt;
credential is valid. Those are three different claims, and only the first one is&lt;br&gt;
something &lt;code&gt;strings&lt;/code&gt; can support.&lt;/p&gt;
&lt;h2&gt;
  
  
  5. Dependencies and obfuscation are heuristics
&lt;/h2&gt;

&lt;p&gt;Dart package references survive compilation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;strings libapp.so &lt;span class="o"&gt;|&lt;/span&gt; grep -oE &lt;span class="s1"&gt;'^package:[a-z0-9_]+'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; sort -u
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package:archive
package:async
package:characters
package:collection
package:connectivity_plus
package:connectivity_plus_platform_interface
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This tells you which packages are in the build. It rarely tells you the version,&lt;br&gt;
so record a confidence with each entry rather than a fact.&lt;/p&gt;

&lt;p&gt;Obfuscation is similar. Counting long identifiers is a signal, not a verdict:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;strings libapp.so &lt;span class="o"&gt;|&lt;/span&gt; grep -cE &lt;span class="s1"&gt;'^_?[A-Za-z][A-Za-z0-9_]{20,}$'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;2167
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A build compiled with &lt;code&gt;--obfuscate&lt;/code&gt; keeps more of this than people expect, because&lt;br&gt;
string literals are not renamed. Symbol readability tells you something about the&lt;br&gt;
build flags. It does not tell you whether the app is safe.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. The manifest needs a decoder, so use one
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;AndroidManifest.xml&lt;/code&gt; inside an APK is binary XML. &lt;code&gt;strings&lt;/code&gt; will hand you&lt;br&gt;
fragments and call it a day. Use &lt;code&gt;aapt2 dump&lt;/code&gt; or &lt;code&gt;apkanalyzer manifest print&lt;/code&gt;,&lt;br&gt;
and check policy in this order: package identity, &lt;code&gt;uses-permission&lt;/code&gt;, exported&lt;br&gt;
components and their intent filters, &lt;code&gt;allowBackup&lt;/code&gt;, &lt;code&gt;debuggable&lt;/code&gt;, cleartext&lt;br&gt;
traffic and any network security config.&lt;/p&gt;

&lt;p&gt;Those are decisions someone made, which makes them easier to grade than a random&lt;br&gt;
string. A debug certificate on a distributed release, or a backup flag on an app&lt;br&gt;
that stores reports, is a process failure you can state plainly.&lt;/p&gt;

&lt;p&gt;I did not decode the binary manifest for this walkthrough; the numbers above all&lt;br&gt;
come from archive structure and &lt;code&gt;libapp.so&lt;/code&gt;, which need no Android SDK.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Repeat it per release, or it is a one-off
&lt;/h2&gt;

&lt;p&gt;The value comes from the diff, not the snapshot. Save each report next to the&lt;br&gt;
commit and the digest, then compare: a new host, a new package, a permission that&lt;br&gt;
appeared, a signing certificate that changed. A release that grew three endpoints&lt;br&gt;
is worth a conversation. A single scan is worth one paragraph.&lt;/p&gt;

&lt;h2&gt;
  
  
  Doing it on a phone, or in CI
&lt;/h2&gt;

&lt;p&gt;The same five passes work without a terminal. &lt;a href="https://flutterguard.dev/" rel="noopener noreferrer"&gt;FlutterGuard&lt;/a&gt;&lt;br&gt;
does the reading on the device, keeps the report local, and has no INTERNET&lt;br&gt;
permission — so no cloud lookup, no reputation service, and no automatic CVE&lt;br&gt;
matching. A source-built CLI runs the same JVM engine in a pipeline with JSON and&lt;br&gt;
optional SARIF output when you need a record.&lt;/p&gt;

&lt;p&gt;Neither one turns a static match into a vulnerability. They shorten the distance&lt;br&gt;
between a released artifact and a decision you can defend.&lt;/p&gt;

&lt;p&gt;The full workflow, including the desktop commands and the triage order, is at&lt;br&gt;
&lt;a href="https://flutterguard.dev/flutter-apk-inspection/" rel="noopener noreferrer"&gt;flutterguard.dev/flutter-apk-inspection&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;Scan only artifacts you are authorised to inspect. A string in a binary is a&lt;br&gt;
lead; a validated behaviour is a finding.&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>android</category>
      <category>security</category>
      <category>mobile</category>
    </item>
    <item>
      <title>What Your Flutter App Leaks After Release (And How to Catch It Before Launch)</title>
      <dc:creator>Flutter Guard</dc:creator>
      <pubDate>Tue, 30 Dec 2025 13:09:21 +0000</pubDate>
      <link>https://dev.to/flutterguard/i-shipped-my-firebase-key-heres-the-tool-i-built-so-you-dont-40p8</link>
      <guid>https://dev.to/flutterguard/i-shipped-my-firebase-key-heres-the-tool-i-built-so-you-dont-40p8</guid>
      <description>&lt;p&gt;You spent months building your Flutter app. QA passed. Users love it. You ship to production.&lt;/p&gt;

&lt;p&gt;Then you ask what the release APK actually carries. The answer is usually more than the source repository shows.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Ships in a Built Flutter App
&lt;/h2&gt;

&lt;p&gt;When you compile a Flutter app, you're creating a package that contains more than just your UI code. Here's what can leak:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Hardcoded Secrets
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;API keys baked into Dart code&lt;/li&gt;
&lt;li&gt;Firebase configuration (project IDs, API keys, database URLs)&lt;/li&gt;
&lt;li&gt;OAuth client IDs&lt;/li&gt;
&lt;li&gt;Third-party service tokens&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These survive compilation and end up in your final build, readable by anyone who inspects the package.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Firebase Misconfigurations
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Unrestricted database rules&lt;/li&gt;
&lt;li&gt;Public storage buckets&lt;/li&gt;
&lt;li&gt;Missing auth requirements&lt;/li&gt;
&lt;li&gt;Admin SDK credentials in client code&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Dangerous Permissions
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;INTERNET&lt;/code&gt; (required but often paired with risky perms)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;READ_EXTERNAL_STORAGE&lt;/code&gt; / &lt;code&gt;WRITE_EXTERNAL_STORAGE&lt;/code&gt; without justification&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ACCESS_FINE_LOCATION&lt;/code&gt; when unnecessary&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CAMERA&lt;/code&gt; / &lt;code&gt;MICROPHONE&lt;/code&gt; that raise privacy flags&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Debug Builds in Production
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Leaving &lt;code&gt;debuggable=true&lt;/code&gt; in AndroidManifest.xml&lt;/li&gt;
&lt;li&gt;Exposing dev endpoints&lt;/li&gt;
&lt;li&gt;Verbose error messages with stack traces&lt;/li&gt;
&lt;li&gt;Debug symbols that make reverse engineering easier&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why This Happens
&lt;/h2&gt;

&lt;p&gt;Flutter's compilation process:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Dart code → compiled native code&lt;/li&gt;
&lt;li&gt;Assets, configs, manifests → bundled as-is&lt;/li&gt;
&lt;li&gt;Strings, URLs, keys → often remain in readable form&lt;/li&gt;
&lt;li&gt;Tree-shaking doesn't remove hardcoded secrets&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You think you're safe because the code is compiled. But a static inspection of the release APK can read:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Asset files&lt;/li&gt;
&lt;li&gt;Android manifest permissions&lt;/li&gt;
&lt;li&gt;Compiled string literals&lt;/li&gt;
&lt;li&gt;Resource files and configs&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to Catch These Before Release
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Pre-release security checklist:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Keep secrets on the server: &lt;code&gt;--dart-define&lt;/code&gt; values and &lt;code&gt;.env&lt;/code&gt; files are baked into the build, not hidden&lt;/li&gt;
&lt;li&gt;Audit Firebase rules (assume your keys are public)&lt;/li&gt;
&lt;li&gt;Review AndroidManifest.xml for debug flags and excessive permissions&lt;/li&gt;
&lt;li&gt;Strip debug symbols from production builds&lt;/li&gt;
&lt;li&gt;Inspect the release artifact yourself, not just the source&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The full pre-release checklist, in the order the checks matter: &lt;a href="https://flutterguard.dev/flutter-security-checklist/" rel="noopener noreferrer"&gt;Flutter release security checklist&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;What that looks like in practice: I read 26 public Flutter release APKs and 22 matched at least one third-party SDK marker, while 9 referenced an AI provider host. Those are artifact observations, not proof of vulnerability: &lt;a href="https://flutterguard.dev/flutter-release-corpus/" rel="noopener noreferrer"&gt;what 26 public release APKs exposed&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Or inspect the artifact on your phone:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;FlutterGuard reads the installed app or a single APK on the device and reports what the release exposes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hardcoded secrets/URLs/Firebase configs&lt;/li&gt;
&lt;li&gt;Dangerous permissions and debug builds&lt;/li&gt;
&lt;li&gt;A report with the evidence, saved locally&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Scan time depends on the device and the APK; large apps can take several minutes.&lt;/p&gt;

&lt;p&gt;FlutterGuard is free and open source (MIT), with no account and no INTERNET permission: &lt;a href="https://flutterguard.dev/" rel="noopener noreferrer"&gt;flutterguard.dev&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://play.google.com/store/apps/details?id=com.flutterguard.app" rel="noopener noreferrer"&gt;Get it on Google Play&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Stay safe. Ship secure. 🔒&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>security</category>
      <category>android</category>
      <category>tooling</category>
    </item>
  </channel>
</rss>
