<?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: orange black</title>
    <description>The latest articles on DEV Community by orange black (@orange_black_1c98182920bb).</description>
    <link>https://dev.to/orange_black_1c98182920bb</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3931265%2Fb0dcbd27-545e-462a-bde1-32888cfa1a63.jpg</url>
      <title>DEV Community: orange black</title>
      <link>https://dev.to/orange_black_1c98182920bb</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/orange_black_1c98182920bb"/>
    <language>en</language>
    <item>
      <title>What Ad Networks Does CamScanner Use? I Decompiled the APK to Find Out</title>
      <dc:creator>orange black</dc:creator>
      <pubDate>Thu, 14 May 2026 12:47:03 +0000</pubDate>
      <link>https://dev.to/orange_black_1c98182920bb/i-reverse-engineered-camscanner-heres-whats-inside-3nec</link>
      <guid>https://dev.to/orange_black_1c98182920bb/i-reverse-engineered-camscanner-heres-whats-inside-3nec</guid>
      <description>&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
      &lt;div class="c-embed__body"&gt;
        &lt;h2 class="fs-xl lh-tight"&gt;
          &lt;a href="https://appxray.blackorange.org/" rel="noopener noreferrer" class="c-link"&gt;
            AppXray — One Link In, Full Report Out | Black Orange
          &lt;/a&gt;
        &lt;/h2&gt;
          &lt;p class="truncate-at-3"&gt;
            Send a Google Play link, get a full reverse-engineering report — architecture, APIs, SDKs, ad networks, permissions. Delivered in 2 hours.
          &lt;/p&gt;
        &lt;div class="color-secondary fs-s flex items-center"&gt;
          appxray.blackorange.org
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;I wanted to know what ad networks CamScanner uses and how they monetize a 100M+ download scanning app. So I reverse-engineered the APK.&lt;/p&gt;

&lt;p&gt;Here's what I found inside CamScanner v7.16.5 (306 MB, 12 DEX files, 369 activities).&lt;/p&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;6 ad networks&lt;/strong&gt; running at the same time&lt;/li&gt;
&lt;li&gt;Header bidding + waterfall hybrid — not just AdMob&lt;/li&gt;
&lt;li&gt;Facebook Audience Network loaded as a &lt;strong&gt;hidden DEX file&lt;/strong&gt; at runtime&lt;/li&gt;
&lt;li&gt;6 staging/test servers &lt;strong&gt;exposed in the production build&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Hybrid Flutter + Native architecture using Alibaba's FlutterBoost&lt;/li&gt;
&lt;li&gt;34 third-party SDKs total&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Ad Stack: 6 Networks Running Simultaneously
&lt;/h2&gt;

&lt;p&gt;Most indie apps use AdMob alone. CamScanner runs &lt;strong&gt;six ad networks in parallel&lt;/strong&gt;:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Network&lt;/th&gt;
&lt;th&gt;Role&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Google AdMob&lt;/td&gt;
&lt;td&gt;Primary SDK, all ad formats&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pangle (ByteDance/TikTok)&lt;/td&gt;
&lt;td&gt;Secondary — 14 Activity classes registered, big in Asia&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Facebook Audience Network&lt;/td&gt;
&lt;td&gt;Loaded dynamically as a separate DEX at runtime&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PubMatic OpenBid&lt;/td&gt;
&lt;td&gt;Header bidding via OpenRTB 2.5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Vungle&lt;/td&gt;
&lt;td&gt;Video ads (rewarded + interstitial)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Google Ad Manager&lt;/td&gt;
&lt;td&gt;DoubleClick — for premium/direct-sold inventory&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The interesting part isn't the list — it's &lt;strong&gt;how they combine them&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Header Bidding + Waterfall Hybrid
&lt;/h3&gt;

&lt;p&gt;PubMatic runs real-time auctions (OpenRTB 2.5) &lt;strong&gt;in parallel&lt;/strong&gt; with AdMob's waterfall. This means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AdMob waterfall handles most impressions&lt;/li&gt;
&lt;li&gt;PubMatic bids in real-time, winning when its CPM beats the waterfall floor&lt;/li&gt;
&lt;li&gt;Result: higher effective eCPM than either method alone&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're only running AdMob, you're leaving 30-50% of ad revenue on the table.&lt;/p&gt;

&lt;h3&gt;
  
  
  Hidden DEX Loading for Facebook Ads
&lt;/h3&gt;

&lt;p&gt;This one surprised me. Facebook Audience Network isn't bundled in the main APK. Instead, there's a file called &lt;code&gt;audience_network.dex&lt;/code&gt; (5 MB) sitting in the &lt;code&gt;assets/&lt;/code&gt; folder, loaded at runtime via DexClassLoader.&lt;/p&gt;

&lt;p&gt;Why? Cold start optimization. CamScanner avoids loading 5 MB of Facebook ad code on every app launch — it only loads when a Facebook ad placement is triggered.&lt;/p&gt;

&lt;h3&gt;
  
  
  Server-Controlled Ad Config
&lt;/h3&gt;

&lt;p&gt;Two remote config sources control ad behavior:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;cs8.intsig.net/ad&lt;/code&gt; — likely controls placement logic and frequency&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ScannerRewardRatio.xml&lt;/code&gt; hosted remotely — controls rewarded ad payout ratios&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This means they can A/B test ad strategies, change placements, and adjust frequency caps &lt;strong&gt;without shipping an app update&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's CamScanner Built With?
&lt;/h2&gt;

&lt;p&gt;The tech stack is a hybrid:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Core app&lt;/strong&gt;: Native Android (Java/Kotlin) — scanning, document management&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;New features&lt;/strong&gt;: Flutter via Alibaba's FlutterBoost — AI chat, document processing&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OCR&lt;/strong&gt;: Google ML Kit (on-device)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Crash monitoring&lt;/strong&gt;: Sentry + ByteDance APMPlus (dual monitoring for global + China)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Attribution&lt;/strong&gt;: AppsFlyer (they're running paid user acquisition)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Analytics&lt;/strong&gt;: Firebase Analytics&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The Flutter + Native hybrid with FlutterBoost is worth noting — it's Alibaba's framework that lets you mix Flutter screens with native Activities seamlessly. If you're considering adding Flutter to an existing native app, this is a proven pattern at scale.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Security Mistake: Staging Servers in Production
&lt;/h2&gt;

&lt;p&gt;I found &lt;strong&gt;6 staging/sandbox API endpoints hardcoded in the release build&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;api-cs-sandbox.intsig.net&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;api-center-sandbox.intsig.net&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;api-algo-sandbox.camscanner.com&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ai-cn-sandbox.camscanner.com&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cs1-sandbox.intsig.net&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;b103-sandbox.camscanner.com&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are internal test servers that should have been stripped from the production build. They could potentially expose debug interfaces or less-secured services. Don't make this mistake in your own app.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Numbers
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Total size&lt;/td&gt;
&lt;td&gt;306 MB (27 split APKs)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DEX files&lt;/td&gt;
&lt;td&gt;12 (85.5 MB bytecode)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Activities&lt;/td&gt;
&lt;td&gt;369&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Third-party SDKs&lt;/td&gt;
&lt;td&gt;34&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ad networks&lt;/td&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Auth providers&lt;/td&gt;
&lt;td&gt;7+&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Permissions&lt;/td&gt;
&lt;td&gt;35&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Supported languages&lt;/td&gt;
&lt;td&gt;27&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  What I Didn't Include Here
&lt;/h2&gt;

&lt;p&gt;The full report goes deeper: complete API endpoint list (18 first-party + 14 third-party), full SDK breakdown by category, permission-by-permission analysis with risk levels, build configuration details, and technical implementation specifics like the dynamic DEX loading mechanism.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;I do this as a service.&lt;/strong&gt; Send me any Google Play link and I'll send you a full reverse-engineering report (PDF + Markdown) within 2 hours. $29 for one app, $19/each for 3-10 apps.&lt;/p&gt;

&lt;p&gt;Free sample report (CamScanner full version): &lt;a href="https://appxray.blackorange.org" rel="noopener noreferrer"&gt;appxray.blackorange.org&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Have questions about what I found? Drop a comment — happy to discuss.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>android</category>
      <category>mobile</category>
      <category>security</category>
      <category>adtech</category>
    </item>
  </channel>
</rss>
