MediumBuild an Android App Without Android Studio (Because We Like Our RAM) | by Krishna Gopal Jha | Medium
Sitemap
Krishna Gopal Jha

Krishna Gopal Jha

🛡️ InfoSec researcher & Python dev | Top 1% on TryHackMe | Builds tools for pentesting, malware analysis & password recovery | 🚀 Cybersecurity nerd

Build an Android App Without Android Studio (Because We Like Our RAM)

3 min readJan 2, 2026

--

Let’s be real. Installing Android Studio just to convert a simple HTML file into an app is like buying a jet engine to blow dry your hair. It’s heavy, it eats your RAM for breakfast, and it turns your laptop fan into a jet turbine.

I’m on Kali Linux. I like my terminal dark, my commands fast, and my GUI nonexistent.

So, here is how you take your web project (HTML/CSS/JS) and wrap it into a shiny .apk file using Apache Cordova—strictly via the Command Line. No bloatware allowed.

The “I Don’t Want to Read” Summary

  • Tool: Apache Cordova (CLI)
  • OS: Kali Linux (or any Linux distro, really)
  • Goal: index.html → app-debug.apk

Step 1: The Setup (aka “Downloading the Internet”)

First, we need the basics. Cordova runs on Node.js. If you don’t have this, are you even coding?

sudo apt update
sudo apt install nodejs npm -y
sudo npm install -g cordova

Step 2: The “Java Trauma” (Important!)

Here is where 99% of people rage-quit.

Kali Linux is cutting edge. It comes with Java 25 (or whatever the latest futuristic version is). But Android builds? They live in the past. They crave stability. If you try to build with Java 25, Gradle will scream at you about “Unsupported class file major version 69.”

We need to downgrade to the G.O.A.T. of stability: Java 21.

Run this to install the chosen one:

sudo apt install openjdk-21-jdk openjdk-21-jre -y

Or, check for the latest compatible by using:

apt search openjdk

Now, tell your system to actually USE it:

Get Krishna Gopal Jha’s stories in your inbox

Join Medium for free to get updates from this writer.

Bash

sudo update-alternatives --config java
# Type the number for java-21 and hit Enter. Do it.
sudo update-alternatives --config javac
# Do the same here.

Step 3: Getting the SDK (Without the GUI)

We need the Android SDK, but we don’t want the UI. We just want the command-line tools.

  • Make a home for it:
mkdir -p ~/Android/Sdk/cmdline-tools cd ~/Android/Sdk/cmdline-tools
  • Download the goods: Download the android studio SDK, but only CLI no GUI setup is required.
wget https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip -O tools.zip
unzip tools.zip
rm tools.zip
  • Install the specific tools Cordova demands: Cordova is picky. It wants Build Tools 35.0.0. Give the baby what it wants.
  • Run this:
./sdkmanager "build-tools;35.0.0" "platforms;android-35" "platform-tools"
  • The “Legal” Stuff: You have to accept the licenses, or Google won’t let you build.
yes | ./sdkmanager --licenses

Pro Tip: Set the environment variable just to be safe.

export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
export PATH=$JAVA_HOME/bin:$PATH
echo 'export ANDROID_HOME=$HOME/Android/Sdk' >> ~/.zshrc
echo 'export PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools' >> ~/.zshrc
source ~./zshrc

(Now your terminal knows who’s boss).

Step 4: Making the Magic Happen

Navigate to your workspace folder. Let’s create the app wrapper.

cordova create myApp com.example.myfiles MyApp
cd myApp
cordova platform add android

Now, the fun part:

  • Go to the www folder.
  • Yeet (delete) everything inside it.
  • Paste your own index.html, CSS, and JS files there.

Want your own Logo?

Don’t be basic and use the default robot icon.

  • Put your logo.png in the main project folder.
  • Open config.xml.
  • Add this line inside the <widget> tag:
<icon src="logo.png" />

Step 5: The Grand Finale

Type this command and hold your breath:

Bash

cordova clean android
cordova build android

If the terminal Matrix text stops flowing and says BUILD SUCCESSFUL… you did it.

You can find your APK here: platforms/android/app/build/outputs/apk/debug/app-debug.apk

Transfer it to your phone, install it, and tell your friends you’re an “App Developer” now. (I won’t tell them it’s just a website in a trench coat).

Troubleshooting (Because things break)

  • Gradle Error? You ignored me and used Java 25, didn’t you? Go back to Step 2.
  • License Error? You didn’t press y enough times. Run sdkmanager --licenses again.
  • “SDK location not found”? You forgot to export ANDROID_HOME. Check your .zshrc.

Connect With Me!

📸 Instagram → @theindiapsych
🐱 GitHub → github.com/krishnagopaljha
👔 LinkedIn → linkedin.com/in/krishnagopaljha

Follow me for more …

--

--

Krishna Gopal Jha
Krishna Gopal Jha