<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Abhishek Dubey on Medium]]></title>
        <description><![CDATA[Stories by Abhishek Dubey on Medium]]></description>
        <link>https://medium.com/@abhishekdubey825?source=rss-75f95d6aaf7c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*jbBnP7lNwXmzVCC45BE_GQ.png</url>
            <title>Stories by Abhishek Dubey on Medium</title>
            <link>https://medium.com/@abhishekdubey825?source=rss-75f95d6aaf7c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 11:09:14 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@abhishekdubey825/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Deploy Any Web App to the Internet for Free — Oracle Cloud, HTTPS, and No Domain Required]]></title>
            <link>https://abhishekdubey825.medium.com/deploy-any-web-app-to-the-internet-for-free-oracle-cloud-https-and-no-domain-required-937a28d9963a?source=rss-75f95d6aaf7c------2</link>
            <guid isPermaLink="false">https://medium.com/p/937a28d9963a</guid>
            <category><![CDATA[oracle-cloud]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[https]]></category>
            <category><![CDATA[self-hosting]]></category>
            <dc:creator><![CDATA[Abhishek Dubey]]></dc:creator>
            <pubDate>Sat, 27 Jun 2026 07:34:05 GMT</pubDate>
            <atom:updated>2026-06-27T07:34:05.692Z</atom:updated>
            <content:encoded><![CDATA[<h3>A reusable runbook for getting any long-running app online on an always-free VM, with a real TLS certificate and zero dollars spent.</h3><p>There’s a frustrating gap between “my app works on localhost&quot; and &quot;my app is on the internet with a padlock in the address bar.&quot; Tutorials tend to either hand-wave the hard parts or lock you into a paid platform. This guide closes that gap with a stack that is genuinely free, survives reboots, and gives you proper HTTPS — without owning a domain name.</p><p>The example here is a Node app, but <strong>every step generalizes</strong>. Swap the runtime and the start command and the same blueprint deploys a Python (FastAPI/Django), Go, Rust, or Ruby service just as well.</p><p>Here’s what we’ll use:</p><ul><li><strong>Oracle Cloud Always-Free VM</strong> — a genuinely generous ARM (Ampere) free tier, not a 12-month trial.</li><li><strong>A managed database</strong> (Supabase, Neon, or RDS) — so your data outlives the disposable VM.</li><li><strong>nip.io</strong> — wildcard DNS that gives you a hostname for free, so you can get a certificate without buying a domain.</li><li><strong>Caddy</strong> — a reverse proxy that fetches and renews a free Let’s Encrypt certificate <em>automatically</em>.</li><li><strong>systemd</strong> — keeps the app running and restarts it on crash or reboot.</li></ul><p>By the end you’ll have something like https://68-233-97-22.nip.io serving your app over HTTPS.</p><h3>The architecture at a glance</h3><pre>Browser ──HTTPS──&gt; [ Caddy :443 ] ──proxy──&gt; [ Your app :3000 ] ──TLS──&gt; [ Managed Postgres ]<br>        &lt;ip&gt;.nip.io               (localhost)                            (managed pooler)</pre><p>Three moving parts: a public-facing proxy that terminates HTTPS, your app listening only on localhost, and a database that lives somewhere safe and permanent.</p><h3>Why each choice</h3><ul><li><strong>Oracle Ampere A1 VM</strong> — Always-free, up to 4 vCPU / 24 GB RAM. That headroom matters: the tiny 1 GB micro instances tend to run out of memory during a production build. ARM is plenty for web workloads.</li><li><strong>Managed DB, not on the VM</strong> — Treat the VM as cattle, not a pet. You should be able to destroy and rebuild it without a second thought, and that’s only true if your data lives elsewhere.</li><li><strong>nip.io</strong> — anything.&lt;your-ip&gt;.nip.io automatically resolves to &lt;your-ip&gt;. No DNS configuration, no registrar, no cost. We need a hostname because TLS certificates are issued to names, not bare IPs.</li><li><strong>Caddy</strong> — Automatic HTTPS in a single config block. It obtains <em>and renews</em> Let’s Encrypt certificates for you.</li><li><strong>systemd</strong> — Already on the box, survives reboots, restarts on crash. No extra dependency to install.</li></ul><h3>This stack vs. the popular alternatives</h3><p>None of these choices are the <em>only</em> way to do this — they’re the ones that get you to a working HTTPS deployment with the least friction. Here’s how they stack up against the tools you’ve probably heard of, so you can swap pieces in and out as your needs grow.</p><p>Layer This guide uses Common alternatives When to reach for the alternative <strong>Cloud host</strong> Oracle Cloud Always-Free (ARM) AWS EC2, GCP, DigitalOcean, Hetzner, Fly.io, Railway You want a managed PaaS, or you’ve outgrown the free tier and need more regions/support. <strong>Reverse proxy + TLS</strong> Caddy (auto HTTPS) Nginx + Certbot, Traefik, Apache You already run Nginx, need very fine-grained config, or want Traefik’s container-native routing. <strong>Process manager</strong> systemd PM2, Docker restart policies, Supervisor You want Node-specific tooling (PM2’s clustering/log UI) or you’re already containerized. <strong>Packaging</strong> Run from source on the VM Docker / docker-compose You want reproducible, isolated environments or plan to scale across machines. <strong>Hostname / DNS</strong> nip.io (no domain) A real domain via Cloudflare, Namecheap, etc. You&#39;re going to production for real users — buy a domain, it&#39;s worth it. <strong>Database</strong> Managed (Supabase/Neon/RDS) Self-hosted Postgres on the VM You want full control and don&#39;t mind owning backups, upgrades, and uptime yourself.</p><p>The biggest swap most people consider is <strong>Nginx + Certbot instead of Caddy</strong>, and <strong>Docker instead of running from source</strong>. I’ll flag both at the relevant steps so you can branch off if you prefer them — but for a single app and a fast first deploy, the choices above are hard to beat.</p><h3>Prerequisites</h3><ul><li>An Oracle Cloud account (the free tier is fine).</li><li>Your app in a Git repository.</li><li>A managed database connection string, if your app uses a database.</li></ul><h3>Step 1 — Create the VM</h3><p>In the Oracle Console: <strong>Compute → Instances → Create instance</strong>.</p><ul><li><strong>Image:</strong> Ubuntu 22.04</li><li><strong>Shape:</strong> VM.Standard.A1.Flex (the Ampere ARM shape). Allocate something like 2 OCPU / 12 GB — well within the free allowance.</li><li><strong>SSH keys:</strong> Generate or upload a key pair, and download the <strong>private</strong> key. You’ll need it to log in.</li><li><strong>Networking:</strong> Keep <em>“Assign a public IPv4 address”</em> enabled, and note the public IP once it boots.</li></ul><p>This step is entirely point-and-click. The result is a running VM with a public IP — say, 68.233.97.22.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cr4ZR8-UTBCTLId5chJLTQ.png" /></figure><h3>Step 2 — Open the firewall (two layers — the #1 gotcha)</h3><p>This is where most people get stuck. Oracle blocks inbound traffic in <strong>two independent places</strong>, and you have to open <em>both</em>. Miss one and the port is silently dead — no error, just an unreachable site.</p><h3>Layer A — the cloud firewall (VCN Security List)</h3><p>In the Console: <strong>Networking → Virtual Cloud Networks → your VCN → your subnet → Security Lists → Default Security List → Add Ingress Rules.</strong></p><p>Add two rules, one for each port. For each rule:</p><ul><li><strong>Stateless:</strong> off</li><li><strong>Source Type:</strong> CIDR</li><li><strong>Source CIDR:</strong> 0.0.0.0/0</li><li><strong>IP Protocol:</strong> TCP</li><li><strong>Source Port Range:</strong> <em>leave blank</em> (means “any”)</li><li><strong>Destination Port Range:</strong> 80 for the first rule, 443 for the second</li></ul><p>Source port is blank because clients connect <em>from</em> random ports — only the destination port matters.</p><h3>Layer B — the VM’s own firewall (iptables)</h3><p>Oracle’s Ubuntu image ships with a restrictive iptables ruleset that ends in a blanket REJECT all. The catch: <strong>iptables stops at the first matching rule</strong>, so your ACCEPT rules must sit <em>above</em> that REJECT, not below it.</p><p>First, look at the current chain and find the line number of the REJECT rule:</p><pre>sudo iptables -L INPUT -n --line-numbers</pre><p>This lists every INPUT rule with its position. <br>You’ll typically see a REJECT all ... reject-with icmp-host-prohibited around line 5.</p><p>Insert the HTTP rule <strong>above</strong> the REJECT (replace 5 with the REJECT&#39;s actual line number):</p><pre>sudo iptables -I INPUT 5 -p tcp --dport 80 -j ACCEPT</pre><p>-I INPUT 5 inserts at position 5, pushing REJECT down. Port 80 is required for the Let&#39;s Encrypt challenge and the HTTP→HTTPS redirect.</p><p>Now the HTTPS rule, the same way:</p><pre>sudo iptables -I INPUT 5 -p tcp --dport 443 -j ACCEPT</pre><p>Persist the rules so they survive a reboot:</p><pre>sudo netfilter-persistent save</pre><p>Without this, your rules vanish on the next restart and you’re back to square one.</p><p>Finally, confirm 80 and 443 now sit <em>above</em> the REJECT:</p><pre>sudo iptables -L INPUT -n --line-numbers</pre><p>The ACCEPT ... dpt:80 and dpt:443 lines must appear <em>before</em> the REJECT all line. If they&#39;re below it, delete and re-insert them higher.</p><h3>Step 3 — Connect via SSH</h3><p>Lock down your private key first — SSH refuses keys that others can read:</p><pre>chmod 600 /path/to/your-key.key</pre><p>600 means owner read/write only. Skip this and you&#39;ll get UNPROTECTED PRIVATE KEY FILE and the key gets ignored.</p><p>Now connect. On Oracle’s Ubuntu images the default user is ubuntu:</p><pre>ssh -i /path/to/your-key.key ubuntu@&lt;PUBLIC_IP&gt;</pre><p>Everything from here runs on the VM unless stated otherwise.</p><h3>Step 4 — Install the runtime</h3><p>This example installs Node 22 and Caddy. <strong>If your app isn’t Node, install your runtime here instead</strong> (e.g. python3/pip, golang, etc.) — the rest of the guide is language-agnostic.</p><p>Add the Node 22 apt repository (Ubuntu’s default Node is too old):</p><pre>curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -</pre><p>Install Node and Git:</p><pre>sudo apt-get install -y nodejs git</pre><p>Now Caddy. Add its signing key so apt trusts the package:</p><pre>curl -1sLf &#39;https://dl.cloudsmith.io/public/caddy/stable/gpg.key&#39; | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg</pre><p>Register Caddy’s apt source:</p><pre>curl -1sLf &#39;https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt&#39; | sudo tee /etc/apt/sources.list.d/caddy-stable.list</pre><p>Refresh apt and install Caddy:</p><pre>sudo apt-get update &amp;&amp; sudo apt-get install -y caddy</pre><p>Caddy installs and registers itself as a systemd service automatically.</p><blockquote><strong><em>Prefer Nginx + Certbot?</em></strong><em> This is the step where you’d </em><em>sudo apt-get install -y nginx certbot python3-certbot-nginx instead of Caddy. You&#39;d then write a server block and run </em><em>certbot --nginx to obtain the certificate, plus set up a renewal timer. It works well and is everywhere — it&#39;s just more moving parts than Caddy&#39;s &quot;point it at a hostname and you&#39;re done.&quot; We&#39;ll stick with Caddy.</em></blockquote><h3>Step 5 — Deploy the app</h3><p>Clone your repository:</p><pre>git clone https://github.com/&lt;you&gt;/&lt;repo&gt;.git<br>cd &lt;repo&gt;</pre><p>Install dependencies exactly as locked. On a server, prefer the reproducible install over a loose one:</p><pre>npm ci</pre><p>npm ci installs strictly from package-lock.json. (For other ecosystems: pip install -r requirements.txt, go build, etc.)</p><p>Create your environment file — adjust the keys to whatever your app needs:</p><pre>cat &gt; .env &lt;&lt;&#39;EOF&#39;<br>DATABASE_URL=&quot;postgresql://USER:PASS@HOST:5432/DB?connection_limit=15&amp;pool_timeout=20&quot;<br>AUTH_SECRET=&quot;REPLACE_ME&quot;<br>NODE_ENV=&quot;production&quot;<br>EOF</pre><p>.env is gitignored, so your secrets live only on the server — never in the repo.</p><p>Need a strong secret? Generate one in place:</p><pre>sed -i &quot;s|REPLACE_ME|$(openssl rand -base64 48)|&quot; .env</pre><p>This swaps the placeholder for 48 random bytes — handy for any JWT or session-signing key.</p><p>If your app uses a database, run migrations now. With Prisma that’s:</p><pre>npx prisma migrate deploy</pre><p>Use your own ORM’s equivalent (npm run migrate, alembic upgrade head, rails db:migrate, and so on). These are idempotent and safe to re-run.</p><p>Finally, build for production:</p><pre>npm run build</pre><p>This is the memory-hungry step — another reason we chose the roomier Ampere shape over a tiny instance.</p><h3>Step 6 — Keep it alive with systemd</h3><p>A long-running app needs a supervisor: something to start it on boot and restart it when it crashes. systemd is already on the box, so we’ll use it.</p><p>Create the service unit:</p><pre>sudo tee /etc/systemd/system/myapp.service &gt;/dev/null &lt;&lt;EOF<br>[Unit]<br>Description=My app<br>After=network.target</pre><pre>[Service]<br>Type=simple<br>User=ubuntu<br>WorkingDirectory=/home/ubuntu/&lt;repo&gt;<br>EnvironmentFile=/home/ubuntu/&lt;repo&gt;/.env<br>ExecStart=/usr/bin/npm run start<br>Restart=always<br>Environment=PORT=3000</pre><pre>[Install]<br>WantedBy=multi-user.target<br>EOF</pre><p>This tells systemd how to run the app: load .env, start via npm run start, restart on crash, and bind port 3000. For a non-Node app, change ExecStart to your start command (e.g. /usr/bin/python3 -m uvicorn main:app --port 3000).</p><p>Reload systemd so it picks up the new file:</p><pre>sudo systemctl daemon-reload</pre><p>Enable on boot and start it right now:</p><pre>sudo systemctl enable --now myapp</pre><p>Confirm it’s up and listening on localhost:</p><pre>curl -sS -o /dev/null -w &quot;app: %{http_code}\n&quot; http://localhost:3000</pre><p>You want app: 200. The app is now running on 127.0.0.1:3000 — alive, but not yet reachable from the internet.</p><blockquote><strong><em>Prefer PM2 or Docker?</em></strong><em> PM2 is a popular Node-native alternative (</em><em>pm2 start npm --name myapp -- start, then </em><em>pm2 startup and </em><em>pm2 save) and gives you nice log management and clustering. If you&#39;ve containerized your app, Docker&#39;s own </em><em>--restart=always policy plays the same role as systemd here. All three solve the same problem — &quot;keep the process running.&quot; systemd just needs nothing extra installed.</em></blockquote><h3>Step 7 — Reverse proxy + automatic HTTPS with Caddy</h3><p>Now we put a public face on the app and get that TLS certificate. Caddy makes this almost anticlimactic.</p><p>Write the Caddyfile, substituting your VM’s real IP into the hostname:</p><pre>echo &quot;$(curl -s ifconfig.me).nip.io {<br>    reverse_proxy 127.0.0.1:3000<br>}&quot; | sudo tee /etc/caddy/Caddyfile</pre><p>curl ifconfig.me returns your public IP. The block tells Caddy to serve &lt;ip&gt;.nip.io and proxy every request to your app on port 3000. Caddy needs the hostname both to request the right certificate and to match the incoming Host header.</p><p>Restart Caddy to load the config and fetch the certificate:</p><pre>sudo systemctl restart caddy</pre><p>Behind the scenes, Caddy contacts Let’s Encrypt, which reaches back to http://&lt;ip&gt;.nip.io/.well-known/acme-challenge/... (this is why port 80 must be open) and issues the certificate.</p><p>Watch the logs until it lands:</p><pre>sudo journalctl -u caddy -f</pre><p>Look for certificate obtained successfully, then Ctrl-C to stop tailing. If you see ACME errors here, port 80 is almost certainly still blocked — revisit Step 2.</p><blockquote><strong><em>The Nginx + Certbot equivalent</em></strong><em> would be roughly: write an Nginx server block proxying to </em><em>127.0.0.1:3000, then run </em><em>sudo certbot --nginx -d &lt;ip&gt;.nip.io. Certbot edits your Nginx config to add the certificate and installs a renewal timer. Same destination — Caddy just folds &quot;get the cert,&quot; &quot;renew the cert,&quot; and &quot;proxy the app&quot; into those four lines above.</em></blockquote><h3>Step 8 — Verify from the outside</h3><p>From your laptop, check the port is actually reachable:</p><pre>nc -zv &lt;PUBLIC_IP&gt; 443</pre><p>succeeded means both firewall layers are correct. Connection refused or a timeout means one layer is still blocking.</p><p>Then hit the site:</p><pre>curl -I https://&lt;PUBLIC_IP&gt;.nip.io</pre><p>Expect HTTP/2 200. Open the same URL in a browser, confirm the padlock — and you&#39;re live.</p><h3>Step 9 — Redeploying after code changes</h3><p>Future deploys are five commands. Your data is untouched because it lives in the managed database, not on the VM.</p><pre>git pull            # fetch the latest code<br>npm ci              # sync dependencies to the new lockfile<br>npx prisma migrate deploy   # apply new migrations (no-op if none)<br>npm run build       # rebuild the production bundle<br>sudo systemctl restart myapp   # restart on the new build</pre><p>Consider wrapping these in a small deploy.sh script so it&#39;s a single command.</p><h3>Troubleshooting — work top-down</h3><p>When something breaks, debug in this order: <strong>app → proxy → host firewall → cloud firewall → client.</strong> The layer that fails is where you stop.</p><p><strong>“Connection refused” / site unreachable.</strong> Almost always the firewall. The classic Oracle trap is ACCEPT rules for 80/443 ending up <em>below</em> the REJECT all in iptables. Check with sudo iptables -L INPUT -n --line-numbers; if dpt:80/dpt:443 appear after REJECT, re-insert them above it. And don&#39;t forget the VCN Security List — both layers are required.</p><p><strong>UNPROTECTED PRIVATE KEY FILE on SSH.</strong> Key permissions are too open. Fix with chmod 600 &lt;key&gt;.</p><p><strong>Caddy: </strong><strong>challenge failed.</strong> Let&#39;s Encrypt couldn&#39;t reach http://&lt;ip&gt;.nip.io/.well-known/... — port 80 is blocked. Fix the firewall, then sudo systemctl restart caddy.</p><p><strong>Cert won’t issue even after fixing port 80.</strong> Let’s Encrypt rate-limits failed validations (~5 per hour per hostname), so you may be throttled briefly. Caddy retries automatically and succeeds once the window resets. To avoid burning the production limit while debugging, test against staging first by adding acme_ca https://acme-staging-v02.api.letsencrypt.org/directory to the Caddyfile (staging certs are untrusted but prove the flow works), then remove it for the real one.</p><p><strong>Login works locally but fails in production.</strong> Your session cookie is marked Secure, so the browser only stores it over HTTPS. Make sure you&#39;re visiting https://&lt;ip&gt;.nip.io, not http://&lt;ip&gt;:3000. This is the entire reason we put TLS in front of the app.</p><p><strong>Can’t reach the database from the VM.</strong> If you’re on Supabase, the <strong>Direct connection</strong> host is IPv6-only — unreachable from an IPv4-only path. Use the <strong>Session pooler</strong> string instead (IPv4, port 5432). It doubles as a single URL for both migrations and runtime. (The Transaction pooler is for serverless functions, not a long-lived VM.)</p><p><strong>App won’t start under systemd.</strong> Check the logs: sudo journalctl -u myapp --no-pager | tail -40. Usual suspects: a wrong EnvironmentFile path, a missing build, the wrong WorkingDirectory, or the port already in use.</p><p><strong>Is anything even listening?</strong> Run sudo ss -tlnp | grep -E &#39;:80|:443|:3000&#39;. You should see Caddy on 80/443 and your app on 3000. Missing 3000 → app is down; missing 80/443 → Caddy is down.</p><h3>Where to go from here</h3><p>You now have a free, reboot-proof, HTTPS-secured deployment of your app. Natural next steps:</p><ul><li><strong>Buy a real domain.</strong> When you have real users, swap nip.io for a proper domain. The only change is one line in the Caddyfile — Caddy fetches the new cert automatically.</li><li><strong>Containerize with Docker.</strong> If you want reproducible environments or plan to run multiple services, wrap the app in a container and let Docker’s restart policy replace systemd. Caddy proxies to the container exactly the same way.</li><li><strong>Automate deploys.</strong> A GitHub Actions workflow that SSHes in and runs your deploy.sh turns &quot;five commands&quot; into &quot;git push.&quot;</li></ul><p>The beauty of this stack is that each piece is independently swappable. Outgrow the free tier? Move the VM to another host and the rest is unchanged. Prefer Nginx? Replace one component. The blueprint stays the same: a host, a supervisor, a proxy with TLS, and a database that lives somewhere safe.</p><p>Happy shipping.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=937a28d9963a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Spent 4Hours Flashing a Custom ROM on an Asus Zenfone Max Pro M1.]]></title>
            <link>https://abhishekdubey825.medium.com/i-spent-8-hours-flashing-a-custom-rom-on-an-asus-zenfone-max-pro-m1-42ffa6f520c7?source=rss-75f95d6aaf7c------2</link>
            <guid isPermaLink="false">https://medium.com/p/42ffa6f520c7</guid>
            <category><![CDATA[pixel-experience]]></category>
            <category><![CDATA[unlock-bootloader]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[asus-zenfone]]></category>
            <category><![CDATA[custom-rom]]></category>
            <dc:creator><![CDATA[Abhishek Dubey]]></dc:creator>
            <pubDate>Sun, 17 May 2026 10:04:12 GMT</pubDate>
            <atom:updated>2026-05-17T10:07:28.039Z</atom:updated>
            <content:encoded><![CDATA[<h3>I Spent 4Hours Flashing a Custom ROM on an Asus Zenfone Max Pro M1. Here’s Everything That Went Wrong (And How I Eventually Fixed It).</h3><p><em>The ultimate troubleshooting guide for the X00TD — covering all the failures, dead-ends, and red herrings that other guides skip.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xel0E3PeGUZT_DcYDn5zng.png" /></figure><h3>Why this guide exists</h3><p>If you’ve spent any time trying to flash a custom ROM on the Asus Zenfone Max Pro M1, you’ve probably noticed something frustrating: every guide on the internet shows you the <strong>happy path</strong>. Step 1, Step 2, Step 3, done in 30 minutes. They never tell you what to do when your phone shows “press any key to shutdown” out of nowhere, or why fastboot devices returns ???????????, or why your bootloader unlock fails even after running the official APK.</p><p>I just spent ~4 hours flashing Pixel Experience 13 on my old Zenfone Max Pro M1 (X00TD). I hit nearly every roadblock this phone is famous for. This guide documents <strong>every dead-end, misconception, and counterintuitive fix</strong> I encountered — so you don’t have to.</p><p>If you’re seeing weird symptoms and most guides just say “make sure your cable is good” — this guide is for you.</p><blockquote><strong>Note:</strong> While this guide is written specifically for the X00TD, the general approach and most troubleshooting tips also apply to the <strong>Zenfone Max Pro M2 (X01BD)</strong> and other Asus devices of the same era. The high-level steps are identical — what changes is the specific recovery image and ROM zip you need to download for your device. Use this as a template; substitute the right files for your phone.</blockquote><h3>TL;DR — The 7 things that matter most</h3><p>If you only read one section, read this:</p><ol><li><strong>The “device is corrupt” warning at boot does NOT necessarily mean the bootloader is unlocked.</strong> Always verify with fastboot oem device-info.</li><li><strong>The missing “OEM unlocking” toggle in Developer Options does NOT confirm unlock status either.</strong> It’s a Google-standard toggle that doesn’t always appear on ASUS phones.</li><li><strong>A cable that works for ADB might NOT work for fastboot.</strong> Fastboot has stricter signal requirements.</li><li><strong>The X00TD has a documented USB quirk in fastboot mode.</strong> Use a USB hub between phone and PC — this single trick fixes about 70% of fastboot connection problems.</li><li><strong>Different laptops behave very differently with X00TD’s fastboot mode.</strong> If it fails on one laptop, try another before assuming the phone is broken.</li><li><strong>ASUS has permanently shut down the bootloader unlock server for X00TD.</strong> The official unlock APK no longer works. You need an unofficial unlock script.</li><li><strong>After flashing custom recovery, NEVER reboot to system before booting into recovery first.</strong> The OS will overwrite your recovery on first boot.</li></ol><h3>Understanding the components (skip if you know this)</h3><p>Before we dive in, a quick mental model. Android isn’t one big OS — it’s a <strong>layered system</strong> with separate partitions:</p><ul><li><strong>Bootloader</strong> — Tiny program that runs first when you press power. Decides what to boot. <em>(You don’t touch this directly.)</em></li><li><strong>Recovery</strong> — Tiny mini-OS for system maintenance (factory reset, flashing). Examples: pe-recovery.img, twrp.img</li><li><strong>ROM</strong> — The actual Android OS you see and use. Example: PixelExperience.zip</li></ul><p>There’s also a <strong>firmware</strong> layer (modem, WiFi drivers, vendor partition) — some guides have you flash a separate firmware base like “firmware 087” before the ROM. <strong>In my case I did NOT flash separate firmware</strong> and everything (including WiFi) worked fine with PE 13. So that step is optional — only do it if your ROM specifically requires it or if you hit hardware issues after flashing.</p><p>When you flash a “custom ROM”, you’re actually modifying multiple partitions. That’s why the process has multiple steps.</p><h3>Misconceptions I had to unlearn the hard way</h3><h3>Misconception 1: “Device is corrupt” warning = bootloader is unlocked</h3><p><strong>Wrong.</strong> The red “device is corrupt” warning appears when <strong>verified boot</strong> detects ANY modification to the boot/system partitions. This could be:<br>- An unlocked bootloader with custom flashing (most common reason)<br>- A failed/interrupted OTA update from years ago that left partitions inconsistent<br>- A partial root attempt that didn’t complete<br>- System partition modified by something else that didn’t fully take effect</p><p><strong>On my phone, this red warning was showing for years before I even started flashing.</strong> I never rooted it, never unlocked the bootloader myself, never tried anything custom on it. So the warning was likely from a stuck/failed update at some point that left the system partition in a partially-modified state — the bootloader’s verified boot detected the inconsistency and started warning, but the phone still booted Android normally. <strong>The warning persisted on every boot for years with no actual impact.</strong></p><p>After unlocking the bootloader during this flashing process, I now see TWO warnings on boot:<br>1. <strong>Orange warning first</strong>: “The bootloader is unlocked…” — this is the standard message for unlocked bootloader. Expected after our unlock.<br>2. <strong>Red warning after</strong>: “Your device is corrupt…” — this is the SAME one that was there before. It hasn’t gone away even after a clean PE 13 install.</p><p>So if you flash a custom ROM and the red warning is still there afterward — don’t worry, it might just be a legacy artifact from a previous failed update on your stock firmware. It doesn’t affect anything functionally; it’s just an aesthetic boot warning.</p><p><strong>Lesson</strong>: Always run fastboot oem device-info BEFORE assuming unlock status. The red boot warning is not a reliable indicator of unlock status.</p><h3>Misconception 2: Missing “OEM unlocking” toggle = unlocked</h3><p><strong>Wrong on ASUS phones.</strong> The OEM unlocking toggle is a <em>Google Android standard</em>, but ASUS uses their own APK-based unlock system. On many ASUS phones, the toggle simply doesn’t appear in Developer Options regardless of lock status. So its absence proves nothing.</p><h3>Misconception 3: Working ADB = working fastboot</h3><p><strong>Wrong.</strong> ADB runs inside Android with mature USB drivers and packet retransmission. Fastboot runs inside the bootloader with a minimal, less forgiving USB stack. A cable, port, or laptop that works perfectly for ADB can completely fail for fastboot.</p><p><strong>Lesson</strong>: When fastboot devices fails, don&#39;t waste time wondering &quot;but ADB works fine?&quot; — they&#39;re entirely different systems.</p><h3>Misconception 4: One generic Android USB driver is enough</h3><p><strong>Wrong.</strong> Different USB modes on the phone use different USB IDs:<br>- Normal Android (ADB): one VID/PID combination<br>- Fastboot mode: completely different VID/PID</p><p>Windows installs separate drivers for each. The “Google USB Driver” from android.com supports many devices but might NOT include VID_0B05&amp;PID_7771 (X00TD&#39;s fastboot ID) in its INF file. Even if installed perfectly, Windows won&#39;t associate it with your phone.</p><h3>The hardware checklist (this matters more than most guides admit)</h3><h3>What you need</h3><ul><li><strong>The phone</strong> (Zenfone Max Pro M1, codename X00TD, ZB601KL or ZB602KL — works the same)</li><li><strong>A Windows PC</strong> — Mac/Linux work for ADB/fastboot but several X00TD tools are Windows-only</li><li><strong>A working micro-USB DATA cable</strong> — short (1m), reasonable quality. Not a “charging only” cable.</li><li><strong>A USB hub</strong> ⭐ — this is the <strong>most underrated tool</strong> for X00TD flashing. Even a cheap unpowered hub helps.</li><li><strong>A USB 2.0 port</strong> on the PC if possible (black inside, not blue)</li></ul><h3>Tested vs untested combinations</h3><p>In my journey, I tested:</p><ul><li><strong>Laptop A (newer, AMD)</strong> — Phone exited fastboot mode immediately on USB connect.</li><li><strong>Laptop B (different)</strong> — Phone stayed in fastboot, but fastboot devices returned ??????????.</li><li><strong>Laptop B + USB hub</strong> ✅ — Worked perfectly.</li></ul><p><strong>Lesson</strong>: If fastboot is unstable on your laptop, <strong>adding a USB hub between phone and PC</strong> is the single most effective fix. It mediates USB signaling and power in a way the X00TD’s old bootloader USB stack likes better.</p><h3>Choosing your ROM (read this before downloading anything)</h3><p>Before you commit to hours of flashing, pick the right ROM for your needs:</p><h3>Pixel Experience 13 (deprecated, but works)</h3><ul><li>✅ Smoothest reported daily-driver experience for X00TD</li><li>✅ Bundles GApps (Play Store etc.)</li><li>✅ Passes SafetyNet — banking apps work</li><li>❌ Officially deprecated (last build November 2023)</li><li>❌ No more security patches or updates</li></ul><p><strong>Best for</strong>: Secondary device, “set it and forget it”</p><h3>LineageOS 20 (Android 13)</h3><ul><li>✅ Official builds exist and were maintained for a long time</li><li>⚠️ <strong>As of 2025–2026, LineageOS officially marks X00TD as “no longer maintained”</strong> — last official build was around late 2024. Some community/unofficial signed builds (like those by rajesh@xda) may still be updated, but check the XDA thread for current status before installing.</li><li>✅ No GApps bundled (separate install needed)</li><li>✅ Slightly less polished than PE for daily use, but lighter on resources</li></ul><p><strong>Best for</strong>: People who want a recent build but accept the “frozen in time” status — similar to PE 13 in that respect, but more options for community-built updates</p><h3>LineageOS 21 (Android 14) — community builds</h3><ul><li>✅ Newest Android version</li><li>❌ Has reported bugs: fingerprint, FM radio, Settings crashes</li></ul><p><strong>Best for</strong>: Tinkerers willing to deal with bugs</p><p>I went with Pixel Experience 13 for “smoothest daily feel, accept the deprecated state.”</p><h3>The flashing process — step by step</h3><h3>Phase 0: Preparation</h3><ol><li><strong>Back up everything on the phone</strong>. Photos, contacts, WhatsApp, anything. The process wipes all data.</li><li><strong>Charge phone to 60%+</strong>.</li><li><strong>On the PC, install/prepare</strong>:<br>- <strong>Android Platform Tools</strong> (adb, fastboot) — download from https://developer.android.com/tools/releases/platform-tools. Extract to C:\platform-tools.<br>- <strong>Your chosen ROM ZIP</strong> + matching recovery IMG. For PE 13: download from <a href="https://download.pixelexperience.org/X00TD.">https://download.pixelexperience.org/X00TD.</a></li><li><strong>On the phone, enable Developer Options</strong>:<br>- Settings → System → About phone → tap “Build number” 7 times.</li><li><strong>Enable USB debugging</strong>:<br>- Settings → System → Developer options → USB debugging ON.</li><li><strong>If “OEM unlocking” toggle is visible</strong>, enable it. If not visible, don’t worry — we’ll verify lock status differently.</li></ol><h3>Phase 1: Verify bootloader state</h3><p>⚠️ <strong>This is the step every other guide skips. Don’t skip it.</strong></p><ol><li>Connect phone to PC via USB.</li><li>Open Command Prompt in C:\platform-tools (Shift+Right-click in folder → &quot;Open Terminal Here&quot;).</li><li>Confirm ADB sees the phone:<br>adb devices</li><li>Reboot to fastboot:<br>adb reboot bootloader</li><li>Wait for green “FASTBOOT” text on phone screen.</li><li>Run:<br>fastboot oem device-info</li></ol><p>You’ll see something like:</p><pre>(bootloader) Verify mode: false/true<br>(bootloader) Device unlocked: false/true<br>(bootloader) Device critical unlocked: false/true<br>(bootloader) Charger screen enabled: true</pre><p><strong>The crucial line is </strong><strong>Device unlocked:.</strong><br>- true → skip Phase 2, go directly to Phase 3<br>- false → must unlock first (Phase 2)</p><blockquote>📌 <strong>Critical note about USB and fastboot mode on X00TD</strong>: If when you enter fastboot mode the phone STAYS in fastboot just fine (green FASTBOOT text shown), but as soon as you plug the USB cable into the laptop, it immediately exits to a “press any key to shutdown” screen — <strong>this is a USB power issue</strong>, not a broken phone.</blockquote><blockquote>The X00TD’s bootloader has a quirky USB stack that can’t handle the high-current USB negotiation from modern laptops (especially USB 3.0 ports and certain AMD chipsets). The phone effectively gets “spooked” by the power signaling and exits fastboot as a safety measure.</blockquote><blockquote><strong>The fix is a USB hub.</strong> Plug a hub into your laptop, plug the phone into the hub. The hub mediates the power and signaling in a way the X00TD’s old bootloader handles cleanly. Even a cheap unpowered USB 2.0 hub works. This single fix solved hours of troubleshooting for me.</blockquote><blockquote>Don’t waste time on driver fixes, cable swaps, or laptop swaps until you’ve tried a USB hub first.</blockquote><h3>Phase 2: Unlock the bootloader (if needed)</h3><p>⚠️ <strong>As of 2024+, ASUS has permanently shut down the bootloader unlock server for X00TD.</strong> The official APK (UnlockTool_X.X.X.X.apk) will install but fail with a network error when you try to use it.</p><p><strong>Your only option is an unofficial unlock script.</strong></p><p>There are community-made unlock scripts that flash a patched aboot image to enable unlocking — bypassing ASUS’s server entirely.</p><p><strong>Sources to find the unlock RAR/ZIP package</strong>:<br>- The Zenfone_Max_M1_Pro_Unlock.zip (or similar .rar) package — find via XDA thread xdaforums.com/t/guide-unlock-relock-bootloader-unofficailly-and-flash-twrp-root.3786698/<br>- WebTrickz guide: webtrickz.com/guide-to-unlock-zenfone-max-pro-m1-bootloader/<br>- Various YouTube tutorials with download links in their descriptions (I used one of these)</p><blockquote>📌 <strong>Simplified process</strong>: When you go to these pages, you’ll see a LOT of extra steps mentioned — enabling OEM unlock in Developer Options, installing drivers, downloading firmware, etc. <strong>You can ignore most of that.</strong> The only thing you actually need is the RAR/ZIP file and its .bat/.cmd script. Everything else is either already done (drivers via our earlier steps) or unnecessary (firmware flashing is separate).</blockquote><p><strong>The actual steps you need</strong>:<br>1. Download the unlock RAR/ZIP from the source.<br>2. <strong>Scan with Windows Defender</strong> before extracting (right-click → Scan).<br>3. Extract to a folder (e.g., C:\unlock-bl).<br>4. Inside the extracted folder, find the file named unlock.bat or unlock_bl.cmd (the exact name varies by source).<br>5. Connect phone in fastboot mode (with USB hub if needed).<br>6. <strong>Double-click the </strong><strong>.bat/</strong><strong>.cmd file.</strong> A Command Prompt opens automatically and runs the unlock sequence.<br>7. Wait 1-2 minutes for it to complete.<br>8. Phone reboots automatically.<br>9. Verify with fastboot oem device-info — should now show Device unlocked: true.</p><p>That’s it. Skip any other steps the source page mentions unless you specifically need them.</p><p>⚠️ <strong>Risks</strong>: If the script fails partway, the phone state shouldn’t be worse — the bootloader just rejects the bad commands. But always download from reputable sources. Avoid random “unlock tool” downloads from sites you don’t recognize.</p><h3>Phase 3: Flash the recovery image</h3><pre>fastboot flash recovery PixelExperience_X00TD-13.0-20231126-1516-OFFICIAL.img</pre><p>Use the <strong>exact filename</strong> of your recovery image. Quote it if it has spaces.</p><p>Expected output:</p><pre>Sending &#39;recovery&#39; (24576 KB)                       OKAY<br>Writing &#39;recovery&#39;                                   OKAY<br>Finished. Total time: 0.7s</pre><h3>Phase 4: ⚠️ DO NOT reboot to system — boot DIRECTLY to recovery</h3><p>This is <strong>the most important step beginners miss</strong>. If you reboot to system normally, Android’s first-boot scripts overwrite your custom recovery with the default one. You’ll lose your work.</p><p>Either:<br>- Run fastboot reboot recovery, OR<br>- If that lands you in the wrong place (boots to system instead of recovery): you&#39;ll need to <strong>re-flash the recovery image first</strong> (fastboot flash recovery &lt;filename&gt;.img again), then <strong>immediately</strong> boot to recovery manually using the hardware key combo below.</p><p><strong>Manual recovery boot key combo</strong> (more reliable than fastboot reboot recovery):<br>1. Power off the phone completely (hold power 10s if needed).<br>2. Hold <strong>Volume Down + Power</strong> simultaneously.<br>3. Keep holding through any orange/red warning screens that appear (you&#39;ll see warning messages flash by — keep holding).<br>4. <strong>Release the buttons the moment you see the ASUS logo appear.</strong> If you release earlier (during a warning screen), you might just trigger a normal restart instead of recovery boot.<br>5. Phone proceeds into recovery.</p><p>You should see the <strong>Pixel Experience Recovery</strong> menu (or your ROM’s recovery — looks similar to Lineage Recovery: black background, white text, Reboot/Apply update/Factory reset/Advanced menu).</p><blockquote>📌 <strong>If you already booted to system and your custom recovery got overwritten</strong>: don’t panic, no permanent damage done. Just re-do the recovery flash step (Phase 3) and this time, <strong>immediately</strong> boot to recovery using the manual key combo above. Your data isn’t wiped yet, your unlock is still intact — you just need to redo this one step.</blockquote><h3>Phase 5: Wipe data + sideload ROM</h3><p>In recovery:<br>1. <strong>Factory reset → Format data/factory reset → confirm</strong>.<br>2. Back to main menu → <strong>Apply update → Apply from ADB</strong>.<br>3. The phone shows: “Now send the package you want to apply…”<br>4. From the PC Command Prompt:<br>adb sideload PixelExperience_X00TD-13.0-20231126-1516-OFFICIAL.zip<br>5. Takes 3-5 minutes. Watch progress in both terminal and phone screen.<br>6. When done, recovery returns to main menu.<br>7. <strong>Reboot system now</strong>.</p><h3>Phase 6: First boot</h3><ul><li>Takes 10–15 minutes. Don’t panic. Don’t disconnect.</li><li>Eventually you’ll see Pixel Experience setup wizard. Go through Google account setup as normal.</li><li>Test the things that matter for YOUR use case — for me, WiFi was the whole reason I flashed (my home WiFi wouldn’t stay connected on stock Android 9), so that was my first test. Other common things to verify: calls, mobile data, camera, fingerprint, speakers.</li></ul><p><strong>You’re done. Congrats.</strong></p><h3>Common issues and how to actually fix them</h3><p>This is the section I wish existed when I started.</p><h3>Issue 1: “Press any key to shutdown” appears when entering fastboot or connecting USB</h3><p><strong>Symptom</strong>: Phone enters fastboot mode (green FASTBOOT text), but exits to a “press any key to shutdown” screen as soon as you connect USB to PC, or as soon as you run any fastboot command.</p><p><strong>Cause</strong>: The X00TD’s bootloader has a documented USB negotiation quirk. Modern USB 3.0 controllers, certain AMD chipsets, and direct USB-A connections often cause this. The bootloader fails to sustain the USB session and bails to a safety screen.</p><p><strong>Fix (in order of effectiveness)</strong>:<br>1. <strong>Use a USB hub</strong> between phone and PC. Even an unpowered one helps significantly. This is the #1 fix.<br>2. <strong>Try a USB 2.0 port</strong> (black, not blue) if your PC has one.<br>3. <strong>Try a different PC</strong> if available. AMD-based PCs are reported to have more issues than Intel ones with X00TD fastboot specifically.<br>4. <strong>Disable USB selective suspend</strong> in Windows power settings.</p><h3>Issue 2: fastboot devices shows ??????????? instead of serial number</h3><p><strong>Symptom</strong>: The command finds A device but can’t read its serial number — outputs garbage.</p><p><strong>Cause</strong>: Driver is partially loaded but communication is unstable. Often a precursor to Issue 1.</p><p><strong>Fix</strong>: Same as Issue 1 — USB hub is the cure. Driver fixes alone don’t help.</p><h3>Issue 3: fastboot devices returns nothing, Device Manager shows &quot;Android&quot; with yellow warning</h3><p><strong>Symptom</strong>: Windows sees a device, but it’s stuck in “Other devices” with a yellow warning. fastboot can’t find it.</p><p><strong>Cause</strong>: Windows doesn’t have a driver that supports the X00TD’s specific fastboot mode hardware ID (VID_0B05&amp;PID_7771).</p><p><strong>What does NOT work</strong>:<br>- Just running the Google USB Driver .inf install<br>- Universal ADB Driver by Koushik Dutta (despite its name, may not include this PID)<br>- 15 Seconds ADB Installer</p><p><strong>What might work</strong>:<br>- Right-click on android_winusb.inf → Install (sometimes catches the device, sometimes not)<br>- Manual force-install via Device Manager → Update driver → &quot;Let me pick&quot; → &quot;Have Disk&quot; → point to android_winusb.inf → select &quot;Android Bootloader Interface&quot; → install anyway (ignoring compatibility warnings)</p><p><strong>What definitively works</strong>:<br>- <strong>A USB hub</strong> changes the USB enumeration in a way Windows handles better. Once the hub is in place, sometimes Windows auto-installs the right driver without any manual intervention.<br>- Manually adding VID_0B05&amp;PID_7771 to the Google INF file (requires disabling Windows driver signature enforcement)</p><h3>Issue 4: fastboot oem unlock returns &quot;FAILED (remote: unknown command)&quot;</h3><p><strong>Cause</strong>: ASUS specifically disabled the standard oem unlock and flashing unlock commands on X00TD. They require their own APK-based unlock method.</p><p><strong>Fix</strong>: Use the unofficial unlock script (Phase 2 above). The official APK no longer works because ASUS shut down their unlock server.</p><h3>Issue 5: fastboot flash recovery returns &quot;flashing not allowed in lock state&quot;</h3><p><strong>Cause</strong>: Despite indirect signs (corrupt boot warning, missing OEM toggle), your bootloader is actually LOCKED.</p><p><strong>Fix</strong>:<br>1. Verify with fastboot oem device-info — it&#39;ll say Device unlocked: false.<br>2. Go through Phase 2 (unofficial unlock script).<br>3. Verify again — Device unlocked: true.<br>4. Then re-try the flash command.</p><h3>Issue 6: Bootloader unlock APK fails / errors out / phone just restarts</h3><p><strong>Cause</strong>: ASUS’s official unlock server is permanently shut down for X00TD as of 2023+. The APK tries to phone home to register the unlock, but the server doesn’t respond.</p><p><strong>Fix</strong>: Don’t use the official APK. Use an unofficial unlock script (Phase 2).</p><h3>Issue 7: After flashing recovery, phone boots to Android instead of recovery — and now stock recovery is back</h3><p><strong>Cause</strong>: When you boot to system after flashing recovery, the OS’s first-boot scripts run install-recovery.sh which overwrites your custom recovery with the default. This is by design (so OTA updates work), not a bug.</p><p><strong>Fix</strong>: After flashing recovery, NEVER fastboot reboot to system first. Instead:<br>- Run fastboot reboot recovery, OR<br>- Hold power button to shutdown, then <strong>Volume Down + Power</strong> to boot directly to recovery (release on ASUS logo).</p><p><strong>If you already messed up and let it boot to Android</strong>: don’t worry, no permanent damage. Just:<br>1. Power off the phone.<br>2. Boot to fastboot mode (Vol Up + Power).<br>3. Re-flash the recovery image: fastboot flash recovery &lt;filename&gt;.img.<br>4. This time, <strong>immediately</strong> boot to recovery using the manual key combo (Vol Down + Power, release on ASUS logo).<br>5. Continue with Phase 5 (wipe + sideload ROM).</p><p>Your unlock state is preserved through this — you only lose ~30 seconds of having to redo the recovery flash.</p><h3>Issue 8: ROM sideload fails or hangs</h3><p><strong>Cause</strong>: Various — usually USB instability during the long transfer.</p><p><strong>Fix</strong>:<br>- Use the same USB hub setup that worked for fastboot.<br>- Re-do the wipe/format data step before sideloading again.<br>- Verify the ROM zip’s hash against the official MD5/SHA256.</p><h3>Tools and methods — what worked vs what didn’t</h3><p>After 4 hours, here’s my honest scorecard:</p><h3>❌ Didn’t help (in my case)</h3><ul><li>Google USB Driver (installed but didn’t associate with PID_7771)</li><li>Universal ADB Driver by Koushik Dutta (same issue)</li><li>15 Seconds ADB Installer (same issue)</li><li>Trying multiple USB cables (cable was fine all along)</li><li>Disabling USB selective suspend (helpful but not the root cause)</li><li>“Fix A” — plugging USB before entering fastboot</li><li>“Fix B” — booting to fastboot from inside Android via adb</li></ul><h3>✅ Actually worked</h3><ul><li><strong>USB hub between phone and PC</strong> (the biggest win)</li><li><strong>Trying a different laptop</strong> (eliminated laptop-specific USB controller issues)</li><li><strong>Unofficial bootloader unlock script</strong> (downloaded with a YouTube tutorial)</li><li><strong>Manually booting to recovery</strong> instead of relying on fastboot reboot recovery</li><li><strong>Re-flashing recovery after Android booted into stock</strong></li></ul><h3>🤔 The “official” things to avoid relying on</h3><ul><li>ASUS Unlock Device APK (server is dead)</li><li>ASUS Flash Tool (works but only for stock firmware)</li><li>TWRP recovery (older, has issues with newer Android encryption — use the ROM’s bundled recovery)</li></ul><h3>Pro tips for next time</h3><ol><li><strong>Run </strong><strong>fastboot oem device-info BEFORE anything else.</strong> This 30-second check would have saved me hours.</li><li><strong>Buy a USB hub before starting.</strong> A ₹200 unpowered hub is the cheapest insurance you can get against X00TD’s USB drama.</li><li><strong>Don’t blindly trust “device is corrupt” warnings as evidence of unlock status.</strong> Verify with fastboot.</li><li><strong>Have two laptops ready if possible.</strong> USB controller variability is real and unpredictable.</li><li><strong>Skip TWRP for modern ROMs.</strong> Use the ROM-bundled recovery (PE Recovery, Lineage Recovery, etc.).</li><li><strong>After flashing recovery, never let the phone boot to Android first.</strong> Always boot directly to recovery.</li><li><strong>Keep stock firmware files handy as a recovery plan.</strong> Asus Flash Tool can reflash stock via ADB.</li><li><strong>For X00TD specifically, ASUS’s official unlock is dead</strong> — community methods are the only path forward.</li></ol><h3>Final thoughts</h3><p>Custom ROM flashing in 2024+ is harder than it was in 2018 because OEMs increasingly abandon long-term support for older devices — including bootloader unlock servers. Combined with finicky USB stacks on older phones, what should be a 30-minute process can spiral into hours of troubleshooting.</p><p>But it’s not impossible. The X00TD is one of the most-flashed budget phones ever, and the community has solutions for nearly every issue — they’re just scattered across XDA threads, Reddit posts, and YouTube videos from different years. This guide consolidates what I learned.</p><p><strong>If you take one thing away</strong>: trust the diagnostic commands more than the visual symptoms. fastboot oem device-info tells you the truth. Boot warnings and missing toggles can lie.</p><p>If this guide helped you, share it. The next person stuck at “press any key to shutdown” deserves to find this faster than I did.</p><h3>Credits</h3><p>This guide was written collaboratively with <strong>Claude</strong> (Anthropic’s AI assistant). Claude walked me through the entire ~4-hour flashing journey in real time — making good diagnostic calls when it could, owning up to wrong diagnoses when symptoms revealed new information, and ultimately helping me piece together what worked.</p><p>Notably, Claude got some things wrong along the way (incorrectly diagnosing the bootloader as already unlocked, blaming the cable when it wasn’t, declaring the bootloader broken when it wasn’t). My pushing back with “but ADB works on the same cable” and “let me try a different laptop” and “let me try a USB hub” are what eventually got us across the finish line.</p><p>This guide is the product of that back-and-forth — my hands-on experimentation, Claude’s structured troubleshooting framework, and the synthesis of dozens of XDA threads, ASUS forum posts, and YouTube tutorials that Claude helped me cross-reference. Equal credit is owed.</p><p>If you’re tackling something similar, having a patient AI assistant to work through the diagnostics with you is genuinely useful — but bring your own instincts and skepticism too. The best results come from collaboration, not blind following.</p><p><em>Phone: Asus Zenfone Max Pro M1 (X00TD, ZB601KL, 3GB/32GB variant)</em><br><em>Stock OS: Android 9 Pie</em><br><em>Flashed to: Pixel Experience 13 (deprecated build, 2023–11–26)</em><br><em>Total time: ~4 hours (your mileage will vary — hopefully much less, now that this guide exists)</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=42ffa6f520c7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Process Same-Key Requests Sequentially Using Redis and Cloud Tasks]]></title>
            <link>https://abhishekdubey825.medium.com/how-to-process-same-key-requests-sequentially-using-redis-and-cloud-tasks-5b3967ed4643?source=rss-75f95d6aaf7c------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b3967ed4643</guid>
            <category><![CDATA[rate-limiting]]></category>
            <category><![CDATA[redis]]></category>
            <category><![CDATA[beginner]]></category>
            <category><![CDATA[system-design-concepts]]></category>
            <category><![CDATA[cloud-tasks]]></category>
            <dc:creator><![CDATA[Abhishek Dubey]]></dc:creator>
            <pubDate>Sun, 22 Jun 2025 12:23:38 GMT</pubDate>
            <atom:updated>2025-06-22T12:23:38.223Z</atom:updated>
            <content:encoded><![CDATA[<h4>Lessons from solving a real world concurrency problem</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*OO4vBVJOOLw3_L08pDCOog.jpeg" /></figure><p>Suppose you get thousands of requests of a same category which you will not be able to process in parallel because it might be trying to update the same database entity or you depend on some external API call that has some rate limit.</p><p>But, you still need to process all the requests. How would you do that?</p><p>Well, there is no one answer. Solution can differ based on your specific use-case or constraint.</p><p>For me, I recently encountered this problem in a multi-tenant architecture where each tenant could have thousands of users generating similar requests that impacted shared tenant-level resources. I needed to ensure all these requests were processed successfully, but in a controlled, sequential manner to avoid exceeding external API rate limits and risking failed or out-of-order processing.</p><h3>Finding the Solution</h3><h4>Multiple Queues</h4><p>First, it hit me that all i need to do is process one tenant’s request in a serial manner that i can do simply by creating a cloud task queue for each tenant as i get their first request, this comes with it’s own problems:</p><ol><li>Managing hundreds of thousands of queues programmatically</li><li>COST: yes, this is going to be the most important factor in anything you will build. And creating and managing thousands of queues will not be cheap on any cloud service provider.</li></ol><h4>Distributed Locking</h4><p>Second, Looks like we can’t create multiple queues now, how about creating just one and when you get the request, just create a distributed lock on your tenant and if the lock already exists, simply reschedule the other request after a minute.</p><p>But, if you are trying to solve 1000 simultaneous calls, you would be rescheduling 999 other calls, and 998 other calls the next minute, 997 after 2 minutes and so on. Doesn’t look efficient, right?</p><h4>Sequential Processing with Redis and Single Task Queue</h4><p>Finally, What if we combine the good parts of both the solutions, i.e:</p><ol><li>Ability to get sequential calls for same tenant.</li><li>Ability to manage this with a single task queue</li></ol><p>For this, we will intelligently determine when to schedule the next call for the same tenant, if we can do that, we can easily make sure that we are only scheduling once and in the same task queue. Hence, avoiding the two problems:</p><ol><li>Having multiple task queues</li><li>And a loop of endless rescheduling.</li></ol><p>To do this, we are going to use Redis not only to maintain lightweight coordination but also to keep track of the next available processing slot for each tenant, along with an accurate queue count. This allows us to determine precisely when to schedule the next request for that tenant, ensuring efficient and orderly processing without unnecessary rescheduling.</p><p>The idea is to have a stream of incoming API requests flowing through Redis, where each request is tagged by key `tenantId-productId-&lt;any-other-field&gt;, queued intelligently using Cloud Tasks, and processed one-by-one in controlled order, ensuring no race conditions and respecting external API rate limits, while maintaining high concurrency for unrelated keys.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4h9PH2nPOpw4ys9N" /></figure><p>Let’s understand this with an example</p><h4><strong>Walkthrough and the pseudo code</strong></h4><p>Thousands of requests come in. We will assume in this example that all the calls are coming for the same key serialise-tenantId-productId</p><pre>// On each incoming request (for key: serialise-tenantId-productId)<br>function handleIncomingRequest(key):<br><br>    now = current_timestamp()<br><br>    // Fetch Redis state for this key<br>    next_slot = Redis.get(key + &quot;:next_slot&quot;, default=now)<br>    queue_count = Redis.get(key + &quot;:queue_count&quot;, default=0)<br><br>    if now &gt;= next_slot:<br>        // It&#39;s time to process immediately<br>        // Update Redis state<br>        Redis.set(key + &quot;:next_slot&quot;, now + 1 minute)<br>        Redis.set(key + &quot;:queue_count&quot;, queue_count)  // no increment needed<br>        <br>        processRequest()<br><br>    else:<br>        // Need to reschedule for later<br>        my_slot = next_slot + (queue_count * 1 minute)<br><br>        // Create Cloud Task to run at my_slot<br>        scheduleCloudTask(key, my_slot)<br><br>        // Increment queue count<br>        Redis.incr(key + &quot;:queue_count&quot;)<br><br><br>// When a scheduled Cloud Task executes<br>function processScheduledTask(key):<br><br>    now = current_timestamp()<br><br>    // Fetch Redis state<br>    next_slot = Redis.get(key + &quot;:next_slot&quot;)<br>    queue_count = Redis.get(key + &quot;:queue_count&quot;)<br><br>    if now &gt;= next_slot:<br>        // Safe to process<br>        processRequest()<br><br>        // Update next_slot<br>        Redis.set(key + &quot;:next_slot&quot;, now + 1 minute)<br><br>        // Decrement queue_count (if &gt; 0)<br>        if queue_count &gt; 0:<br>            Redis.decr(key + &quot;:queue_count&quot;)<br>    else:<br>        // Not time yet (this task fired too early)<br>        // Simply reschedule<br>        scheduleCloudTask(key, next_slot)</pre><p><strong><em>T = 0: Initial State</em></strong></p><p>For each key, we set an initial state when they get created</p><ul><li>next_slot = now (available immediately)</li><li>queue_count = 0 (not yet queued any request)</li></ul><p><strong><em>T = 0: Call #1 arrives</em></strong></p><p>Check the next available slot, it’s now. We will start processing this request immediately and update the following</p><ul><li>next_slot = now + 1 min (we want to make sure we process the next request at least after 1 minute)</li><li>queue_count = 0 (we did not add anything into the queue yet)</li></ul><p><strong><em>T = 0: Call #2 arrives (simultaneously)</em></strong></p><p>Check the next available slot, it’s 1 minute from now. We will have to:</p><ul><li>add this reschedule this request to the queue for later time: my_slot = next_slot + 1 minute = T + 1 minute .</li><li>Increment the queue_count = 1 to determine the slot for next call</li></ul><p><strong><em>T = 0: Call #3 to #1000 arrives (simultaneously)</em></strong></p><p>Each call does the same as call #2</p><ul><li>Check the available slot my_slot = next_slot + (queue_count * 1 minute) and reschedules itself at my_slot</li><li>update the queue_count = queue_count + 1</li></ul><p><strong><em>Redis State after scheduling the thousand tasks</em></strong></p><ul><li>next_slot = T + 1 minute</li><li>queue_count = 999</li></ul><p><strong><em>T+1 minute: Call #2 comes again</em></strong></p><p>Now, we will check with Redis: Is it time to process any new call? Yes, it is.</p><p>we will update Redis:</p><ul><li>next_slot = now + 1 minute</li><li>queue_count = 998 (since we already know from some meta data that this request was queued, we will decrease the queue count as well)</li></ul><p>This cycle repeats until all queued requests for that tenant are processed.</p><h3>Scaling the final solution</h3><p><strong>What if i want to be able to process 2 concurrent requests for the same key at the same time?<br></strong>Yes, you can, in the real world different cases can come up which would require you to build something that suits your requirement. For example if you want to be able to process two requests or n requests at the same time. Think about the tweaks that you might need to do to scale this solution to match these requirements. We will talk about it some other day.</p><h3>Conclusion</h3><p>This simple approach helped me handle thousands of requests per key in a controlled and scalable way, without having to create separate queues for each tenant or deal with crazy rescheduling loops. By using Redis to manage the next slot and queue count, and Cloud Tasks to handle retries and timing, I was able to make sure all requests get processed in order, without hitting external rate limits.</p><p>Of course, you can tweak this further and scale based on your system and requirements. This basic idea works for any situation where you need to process related requests one at a time, but still keep your system highly concurrent. Hopefully this gives you some ideas if you run into a similar problem.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b3967ed4643" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Databases Demystified: What They Are and Why They Matter]]></title>
            <link>https://abhishekdubey825.medium.com/%EF%B8%8F-databases-demystified-what-they-are-and-why-they-matter-e6fd37c29b46?source=rss-75f95d6aaf7c------2</link>
            <guid isPermaLink="false">https://medium.com/p/e6fd37c29b46</guid>
            <category><![CDATA[database]]></category>
            <category><![CDATA[nosql]]></category>
            <category><![CDATA[beginner]]></category>
            <category><![CDATA[backend-development]]></category>
            <category><![CDATA[sql]]></category>
            <dc:creator><![CDATA[Abhishek Dubey]]></dc:creator>
            <pubDate>Sat, 14 Jun 2025 21:28:20 GMT</pubDate>
            <atom:updated>2025-06-14T21:28:56.520Z</atom:updated>
            <content:encoded><![CDATA[<h3>📌 Introduction</h3><p>Whether you’re building a personal blog, launching a startup, or designing enterprise software, there’s one common foundation: <strong>data</strong>. And wherever there’s data, there’s a <strong>database</strong> behind the scenes making sure it’s stored, retrieved, and organised efficiently.</p><p>In this post, we’ll break down:</p><ul><li>What a database actually is</li><li>Types of databases (with examples)</li><li>When to use SQL vs NoSQL</li><li>Real-world analogies to help you remember</li><li>How to choose the right database for your project</li></ul><p>Let’s dive in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xDFfab8Phjxculprdq0efA.jpeg" /></figure><h3>🧠 What Is a Database?</h3><p>At its core, a <strong>database</strong> is simply an organised collection of data. Think of it like a super-smart filing cabinet — one that can answer questions like:</p><ul><li>“Give me all users who signed up this week.”</li><li>“What’s the price of this product?”</li><li>“Did Abhishek complete the task?”</li></ul><p>A database doesn’t just store data. It <strong>structures</strong>, <strong>indexes</strong>, and <strong>optimizes</strong> how that data is accessed, making it a powerful tool for any application.</p><h3>🧱 Two Main Types: SQL vs NoSQL</h3><h4>1. SQL (Structured Query Language) Databases</h4><p>Also known as <strong>relational databases</strong>, these use predefined schemas — like rows and columns in spreadsheets.</p><p>Popular examples:</p><ul><li><strong>PostgreSQL</strong></li><li><strong>MySQL</strong></li><li><strong>SQLite</strong></li><li><strong>Microsoft SQL Server</strong></li></ul><p>You define tables, relationships, and data types ahead of time. Think of this like organising a company directory — you need structured fields: Name, Email, Department, etc.</p><p><strong>Pros</strong>:</p><ul><li>Strong data integrity</li><li>Easy to query with SQL</li><li>Great for structured data and complex relationships</li></ul><p><strong>Use cases</strong>: Finance apps, e-commerce backends, HR systems.</p><h4>2. NoSQL (Not Only SQL) Databases</h4><p>Designed for flexibility and scale. These don’t require fixed schemas, and often store data as key-value pairs, documents, or graphs.</p><p>Popular examples:</p><ul><li><strong>MongoDB</strong> (document store)</li><li><strong>Redis</strong> (key-value)</li><li><strong>Cassandra</strong> (wide-column)</li><li><strong>Neo4j</strong> (graph-based)</li></ul><p>These are more like flexible filing drawers — you can toss in any shape of data and still retrieve it fast.</p><p><strong>Pros</strong>:</p><ul><li>Scalable horizontally</li><li>Flexible structure</li><li>Great for unstructured or evolving data</li></ul><p><strong>Use cases</strong>: Real-time apps, social media platforms, analytics dashboards.</p><h3>⚔️ SQL vs NoSQL: When to Choose What?</h3><pre>| Feature        | SQL                         | NoSQL                           |<br>|----------------|-----------------------------|----------------------------------|<br>| Schema         | Fixed                       | Flexible                         |<br>| Relationships  | Strong (joins, foreign keys)| Weak or manually coded           |<br>| Scaling        | Vertical (more power)       | Horizontal (more servers)        |<br>| Best for       | Transactions, consistency   | Speed, flexibility, big data     |<br>| Learning Curve | Easier for structured logic | Easier for quick prototypes      |</pre><h3>📦 Real-World Analogy</h3><ul><li><strong>SQL database</strong> = a relational Excel spreadsheet. Neat, structured, defined.</li><li><strong>MongoDB (NoSQL)</strong> = a folder of Google Docs. Different formats, but still easy to search.</li><li><strong>Redis</strong> = a sticky-note reminder system — ultra-fast but only holds what you need briefly.</li></ul><h3>🧩 Popular Database Use Cases</h3><pre>| App Type         | Likely DB Tech                         |<br>|------------------|----------------------------------------|<br>| Banking App      | PostgreSQL or MySQL                    |<br>| Chat Application | Redis + MongoDB                        |<br>| E-commerce       | SQL for orders, NoSQL for product data |<br>| Analytics Tool   | ClickHouse or Cassandra                |</pre><h3>🔍 Bonus: ACID vs BASE</h3><p>When you dive deeper, you’ll hear about these terms:</p><ul><li><strong>ACID (SQL)</strong>: Atomicity, Consistency, Isolation, Durability → Guarantees safe transactions.</li><li><strong>BASE (NoSQL)</strong>: Basically Available, Soft state, Eventually consistent → Focuses on scalability.</li></ul><p>Choose <strong>ACID</strong> when correctness matters (e.g. bank transfer).<br>Choose <strong>BASE</strong> when speed &amp; availability matter more (e.g. real-time analytics).</p><h3>💡 Choosing the Right Database</h3><p>Ask these questions:</p><ol><li>Do I need structure and relationships? → Go SQL.</li><li>Is my data constantly changing in shape? → Go NoSQL.</li><li>Am I storing temporary/cache data? → Consider Redis.</li><li>Will I need to scale to millions of users fast? → Think horizontal (NoSQL or sharded SQL).</li></ol><p>If you’re unsure, start with <strong>PostgreSQL or MongoDB</strong>. These are battle-tested, and flexible enough for 90% of beginner to mid-sized projects.</p><h3>🧠 Final Thoughts</h3><p>Databases aren’t scary once you understand their job: <strong>organise, access, and manage data</strong> efficiently. Whether you’re building your next SaaS product, tinkering with side projects, or optimising performance at scale — databases are your silent but powerful ally.</p><p>The key takeaway: <strong>choose the tool that fits the data</strong> — not the other way around.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e6fd37c29b46" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Is an API? A Simple 2-Sentence Explanation]]></title>
            <link>https://abhishekdubey825.medium.com/what-is-an-api-a-simple-2-sentence-explanation-fb85abd30b7b?source=rss-75f95d6aaf7c------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb85abd30b7b</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[beginner-friendly]]></category>
            <category><![CDATA[tech-explained-simply]]></category>
            <category><![CDATA[tech-basics]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Abhishek Dubey]]></dc:creator>
            <pubDate>Sat, 14 Jun 2025 20:04:16 GMT</pubDate>
            <atom:updated>2025-06-14T20:04:16.865Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PIG34oqcae3nHax24_Xjhw.jpeg" /></figure><p>An API (Application Programming Interface) is like a waiter at a restaurant — it takes your request (like “get me the menu”), delivers it to the kitchen (the server), and brings back the result (the food).<br> In tech terms, it’s how software talk to each other behind the scenes — whether it’s an app getting weather data, logging you in with Google, or powering your chatbot with AI.</p><h3>🍴 Real-Life Example</h3><p>Let’s say you use a weather app. That app doesn’t generate the weather — it asks an API like “Hey, what’s the weather in Mumbai?” and gets the latest forecast from a weather server.</p><h3>🛠 Why It Matters</h3><p>APIs are everywhere — when you log in, pay online, ask ChatGPT a question, or even scroll Instagram.<br> Learning what they do unlocks your understanding of how most apps and services work today.</p><h3>🏁 TL;DR</h3><p>APIs are messengers between software. You don’t see them, but they make modern apps possible.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fb85abd30b7b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Darkness of the Dark Web]]></title>
            <link>https://abhishekdubey825.medium.com/darkness-of-the-dark-web-a10002e28533?source=rss-75f95d6aaf7c------2</link>
            <guid isPermaLink="false">https://medium.com/p/a10002e28533</guid>
            <category><![CDATA[illegal-activity]]></category>
            <category><![CDATA[darkweb]]></category>
            <category><![CDATA[privacy]]></category>
            <category><![CDATA[child-pornography]]></category>
            <category><![CDATA[human-experimentation]]></category>
            <dc:creator><![CDATA[Abhishek Dubey]]></dc:creator>
            <pubDate>Wed, 07 Apr 2021 08:15:38 GMT</pubDate>
            <atom:updated>2025-06-22T12:26:39.242Z</atom:updated>
            <content:encoded><![CDATA[<p>I’m Abhishek. Enough introduction, Lets dive in.</p><p>This week, I started surfing around the dark web also known as Invisible web or Hidden web.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*9ubaNRvkp-je3wgOv0Nsog.jpeg" /></figure><p>It took me several hours to set up a Tails OS bootable USB drive. I opened the tor browser (the browser that let you open the hidden links), I was excited to see this new world where one can see the world with open mind without being judged and more importantly no one is looking at you to show customized ads.</p><p>I first checked my IP address and other data that can be leaked over the internet. Finally after realizing that it’s all safe to surf, I opened DuckDuckGo (A search engine usually first timer use on the tor browser). You may be wondering why not Google. Well it doesn’t run smoothly over there because Google need all your browsing activities and data and Tor does not allow it so easily.</p><blockquote>Lets cut crap and come straight to the point. I don’t want to waste your precious time.</blockquote><p><strong>What is saw there ?</strong></p><p>Well there is many good things there, you can speak freely about anything without being judged. No one will harm you if you spoke about any political party or leader. It can be a good support for media.</p><p>But 90% of Dark web is full of crap and illegal activities. Some of them are :</p><ol><li>Human Experimentation</li><li>Animal Abuse</li><li>Drug Markets</li><li>Weapon Market</li><li>Suicide room</li><li>Carding</li></ol><p>and many more disturbing things..</p><p>All these activities are illegal and need to be supervised.</p><p>I will talk more about tail os and how you can use it in some later point of time</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a10002e28533" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>