efxtv

Android App Without Android Studio Android Command Line Tools | demo android project bash script

Dec 20th, 2025 (edited)
109
0
Never
7
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 12.11 KB | Cybersecurity | 0 0
  1. How to Create an Android App Without Android Studio (SDK 1435, Manual Gradle Setup)
  2.  
  3. ==============================
  4. ANDROID WEBVIEW APP (MANUAL)
  5. SDK 1435 | NO ANDROID STUDIO
  6. GRADLE VIA SDKMAN
  7. ==============================
  8.  
  9.  
  10. 1. CREATE PROJECT DIRECTORY
  11. ---------------------------
  12. $ mkdir WebLinkApp
  13. $ cd WebLinkApp
  14.  
  15. About:
  16. Root folder for the Android project.
  17.  
  18.  
  19. 2. INSTALL SDKMAN (FOR GRADLE)
  20. ------------------------------
  21. $ curl -s "https://get.sdkman.io" | bash
  22.  
  23. About:
  24. SDKMAN is used to manage Gradle versions cleanly.
  25.  
  26.  
  27. 3. ENABLE SDKMAN
  28. ----------------
  29. $ nano ~/.profile
  30. $ nano ~/.bashrc
  31.  
  32. Add at bottom (if missing):
  33. ---------------------------
  34. source "$HOME/.sdkman/bin/sdkman-init.sh"
  35. ---------------------------
  36.  
  37. Apply:
  38. $ source ~/.bashrc
  39.  
  40. Verify:
  41. $ sdk version
  42.  
  43. About:
  44. Without this, `sdk` command will not work.
  45.  
  46.  
  47. 4. INSTALL GRADLE 8.4
  48. ---------------------
  49. $ sdk install gradle 8.4
  50.  
  51. Verify:
  52. $ gradle -v
  53.  
  54. About:
  55. Gradle 8.4 is compatible with modern Android plugins.
  56.  
  57.  
  58. 5. CREATE GRADLE WRAPPER
  59. -----------------------
  60. $ gradle wrapper
  61.  
  62. About:
  63. Creates ./gradlew and gradle/wrapper files.
  64.  
  65.  
  66. 6. CREATE PROJECT STRUCTURE
  67. ---------------------------
  68. $ mkdir app
  69. $ mkdir -p app/src/main/java
  70. $ mkdir -p app/src/main/res/values
  71. $ mkdir -p app/src/main/res/layout
  72.  
  73. About:
  74. Manual Android projects require this structure.
  75.  
  76.  
  77. 7. CREATE settings.gradle
  78. -------------------------
  79. $ nano settings.gradle
  80.  
  81. Paste:
  82. -------------------------
  83. rootProject.name = "WebLinkApp"
  84. include(":app")
  85. -------------------------
  86.  
  87. About:
  88. Registers the app module.
  89.  
  90.  
  91. 8. CREATE ROOT build.gradle
  92. ---------------------------
  93. $ nano build.gradle
  94.  
  95. Paste:
  96. -------------------------
  97. buildscript {
  98.     repositories {
  99.         google()
  100.         mavenCentral()
  101.     }
  102. }
  103.  
  104. allprojects {
  105.     repositories {
  106.         google()
  107.         mavenCentral()
  108.     }
  109. }
  110. -------------------------
  111.  
  112. About:
  113. Defines dependency repositories.
  114.  
  115.  
  116. 9. CREATE gradle.properties
  117. ---------------------------
  118. $ nano gradle.properties
  119.  
  120. Paste:
  121. -------------------------
  122. org.gradle.jvmargs=-Xmx2048m
  123. android.useAndroidX=true
  124. android.enableJetifier=true
  125. -------------------------
  126.  
  127. About:
  128. Required for AndroidX and memory config.
  129.  
  130.  
  131. 10. CREATE app/build.gradle
  132. ---------------------------
  133. $ nano app/build.gradle
  134.  
  135. Paste:
  136. -------------------------
  137. plugins {
  138.     id 'com.android.application'
  139. }
  140.  
  141. android {
  142.     namespace "com.linktoapp.app"
  143.     compileSdk 35
  144.  
  145.     defaultConfig {
  146.         applicationId "com.linktoapp.app"
  147.         minSdk 14
  148.         targetSdk 35
  149.         versionCode 1
  150.         versionName "1.0"
  151.     }
  152.  
  153.     buildTypes {
  154.         release {
  155.             minifyEnabled false
  156.         }
  157.     }
  158.  
  159.     compileOptions {
  160.         sourceCompatibility JavaVersion.VERSION_17
  161.         targetCompatibility JavaVersion.VERSION_17
  162.     }
  163. }
  164.  
  165. dependencies {
  166.     implementation "androidx.appcompat:appcompat:1.6.1"
  167. }
  168. -------------------------
  169.  
  170. About:
  171. Main Android build configuration.
  172.  
  173.  
  174. 11. CREATE AndroidManifest.xml
  175. ------------------------------
  176. $ nano app/src/main/AndroidManifest.xml
  177.  
  178. Paste:
  179. -------------------------
  180. <manifest xmlns:android="http://schemas.android.com/apk/res/android">
  181.  
  182.     <application
  183.         android:label="@string/app_name"
  184.         android:theme="@style/Theme.AppCompat.NoActionBar">
  185.  
  186.         <activity
  187.             android:name=".MainActivity"
  188.             android:exported="true">
  189.  
  190.             <intent-filter>
  191.                 <action android:name="android.intent.action.MAIN"/>
  192.                 <category android:name="android.intent.category.LAUNCHER"/>
  193.             </intent-filter>
  194.  
  195.         </activity>
  196.  
  197.     </application>
  198.  
  199. </manifest>
  200. -------------------------
  201.  
  202. About:
  203. Do NOT use package="" here.
  204.  
  205.  
  206. 12. CREATE strings.xml
  207. ----------------------
  208. $ nano app/src/main/res/values/strings.xml
  209.  
  210. Paste:
  211. -------------------------
  212. <resources>
  213.     <string name="app_name">Web Link App</string>
  214. </resources>
  215. -------------------------
  216.  
  217. About:
  218. Fixes app_name resource error.
  219.  
  220.  
  221. 13. CREATE LAYOUT FILE
  222. ----------------------
  223. $ nano app/src/main/res/layout/activity_main.xml
  224.  
  225. Paste:
  226. -------------------------
  227. <?xml version="1.0" encoding="utf-8"?>
  228. <WebView xmlns:android="http://schemas.android.com/apk/res/android"
  229.     android:id="@+id/webview"
  230.     android:layout_width="match_parent"
  231.     android:layout_height="match_parent"/>
  232. -------------------------
  233.  
  234. About:
  235. Fullscreen WebView.
  236.  
  237.  
  238. 14. CREATE JAVA PACKAGE
  239. -----------------------
  240. $ mkdir -p app/src/main/java/com/linktoapp/app
  241. $ nano app/src/main/java/com/linktoapp/app/MainActivity.java
  242.  
  243. Paste:
  244. -------------------------
  245. package com.linktoapp.app;
  246.  
  247. import android.os.Bundle;
  248. import android.webkit.WebView;
  249. import android.webkit.WebViewClient;
  250. import androidx.appcompat.app.AppCompatActivity;
  251.  
  252. public class MainActivity extends AppCompatActivity {
  253.  
  254.     @Override
  255.     protected void onCreate(Bundle savedInstanceState) {
  256.         super.onCreate(savedInstanceState);
  257.  
  258.         WebView webView = new WebView(this);
  259.         setContentView(webView);
  260.  
  261.         webView.getSettings().setJavaScriptEnabled(true);
  262.         webView.setWebViewClient(new WebViewClient());
  263.  
  264.         webView.loadUrl("https://example.com");
  265.     }
  266. }
  267. -------------------------
  268.  
  269. About:
  270. Change URL here to change the loaded link.
  271.  
  272.  
  273. 15. BUILD RELEASE APK
  274. ---------------------
  275. $ ./gradlew clean assembleRelease
  276.  
  277. Output:
  278. -------------------------
  279. app/build/outputs/apk/release/
  280. -------------------------
  281.  
  282.  
  283. 16. CREATE KEYSTORE
  284. -------------------
  285. $ keytool -genkeypair -v \
  286. -keystore mykey.jks \
  287. -keyalg RSA \
  288. -keysize 2048 \
  289. -validity 10000 \
  290. -alias mykey
  291.  
  292. About:
  293. Used for manual APK signing.
  294.  
  295.  
  296. 17. SIGN APK (NO GRADLE)
  297. -----------------------
  298. $ apksigner sign \
  299. --ks mykey.jks \
  300. --ks-key-alias mykey \
  301. --out app-release-signed.apk \
  302. app-release-unsigned.apk
  303.  
  304.  
  305. 18. ZIPALIGN APK
  306. ----------------
  307. $ $ANDROID_SDK_ROOT/build-tools/34.0.0/zipalign -v 4 \
  308. app-release-signed.apk \
  309. app-release-final.apk
  310.  
  311.  
  312. 19. INSTALL APK
  313. ---------------
  314. $ adb install app-release-final.apk
  315.  
  316.  
  317. 20. CHANGE WEBSITE LINK
  318. ----------------------
  319. Edit:
  320. MainActivity.java
  321.  
  322. Change:
  323. webView.loadUrl("https://yourlink.com");
  324.  
  325.  
  326. 21. CHANGE APP NAME
  327. ------------------
  328. Edit:
  329. app/src/main/res/values/strings.xml
  330.  
  331.  
  332. 22. CHANGE PACKAGE NAME
  333. ----------------------
  334. Edit:
  335. - namespace in app/build.gradle
  336. - applicationId in app/build.gradle
  337. - Java folder path
  338. - package line in MainActivity.java
  339.  
  340.  
  341. ==============================
  342. END OF GUIDE
  343. =====================================================================
  344.  
  345. =====================================================================
  346. BASH SCRIPT TO CREATE PROJECT (copy it to app.sh) run to see help
  347. =====================================================================
  348.  
  349. #!/usr/bin/env bash
  350. set -e
  351.  
  352. clear='\033[0m'
  353. IGreen='\033[0;92m'
  354. IYellow='\033[0;93m'
  355. IRed='\033[0;91m'
  356.  
  357. # -----------------------------
  358. # Arguments
  359. # -----------------------------
  360. PACKAGE_NAME="$1"
  361. APP_NAME="$2"
  362. SDK_VERSION="$3"
  363. JAVA_INPUT="$4"
  364.  
  365. if [ $# -ne 4 ]; then
  366.   echo
  367.   echo -e "${IGreen}=======================================================${clear}"
  368.   echo -e "${IGreen}==========${IYellow} CREATE CUSTOM ANDROID PROJECT ${IGreen}==========${clear}"
  369.   echo -e "${IGreen}=======================================================${clear}"
  370.   echo
  371.   echo -e "Usage  : ./app.sh <package> <appname> <sdk> <java>"
  372.   echo -e "Example: ./app.sh com.abcd.game mygame 35 java17"
  373.   echo -e "JAVA   : java8 | java11 | java17 | java21"
  374.   echo -e "SDK    : 21+ (recommended 31–36)"
  375.   echo
  376.   exit 1
  377. fi
  378.  
  379. # -----------------------------
  380. # Java version mapping
  381. # -----------------------------
  382. case "$JAVA_INPUT" in
  383.   java8)  JAVA_VERSION="1_8" ;;
  384.   java11) JAVA_VERSION="11" ;;
  385.   java17) JAVA_VERSION="17" ;;
  386.   java21) JAVA_VERSION="21" ;;
  387.   *)
  388.     echo -e "${IRed}❌ Invalid Java version: $JAVA_INPUT${clear}"
  389.     exit 1
  390.     ;;
  391. esac
  392.  
  393. # -----------------------------
  394. # Derived values
  395. # -----------------------------
  396. PACKAGE_PATH=$(echo "$PACKAGE_NAME" | tr '.' '/')
  397. PROJECT_ROOT="$APP_NAME"
  398. APP_MAIN="$PROJECT_ROOT/app/src/main"
  399.  
  400. # -----------------------------
  401. # Create directories
  402. # -----------------------------
  403. mkdir -p "$APP_MAIN/java/$PACKAGE_PATH"
  404. mkdir -p "$APP_MAIN/res/values"
  405. mkdir -p "$PROJECT_ROOT/app"
  406.  
  407. # -----------------------------
  408. # settings.gradle
  409. # -----------------------------
  410. cat > "$PROJECT_ROOT/settings.gradle" <<EOF
  411. rootProject.name = "$APP_NAME"
  412. include(":app")
  413. EOF
  414.  
  415. # -----------------------------
  416. # Root build.gradle
  417. # -----------------------------
  418. cat > "$PROJECT_ROOT/build.gradle" <<EOF
  419. buildscript {
  420.     repositories {
  421.         google()
  422.         mavenCentral()
  423.     }
  424.     dependencies {
  425.         classpath "com.android.tools.build:gradle:8.3.2"
  426.     }
  427. }
  428.  
  429. allprojects {
  430.     repositories {
  431.         google()
  432.         mavenCentral()
  433.     }
  434. }
  435. EOF
  436.  
  437. # -----------------------------
  438. # gradle.properties
  439. # -----------------------------
  440. cat > "$PROJECT_ROOT/gradle.properties" <<EOF
  441. org.gradle.jvmargs=-Xmx2g
  442. android.useAndroidX=true
  443. android.enableJetifier=true
  444. android.suppressUnsupportedCompileSdk=$SDK_VERSION
  445. EOF
  446.  
  447. # -----------------------------
  448. # app/build.gradle
  449. # -----------------------------
  450. cat > "$PROJECT_ROOT/app/build.gradle" <<EOF
  451. plugins {
  452.     id "com.android.application"
  453. }
  454.  
  455. android {
  456.     namespace "$PACKAGE_NAME"
  457.     compileSdk $SDK_VERSION
  458.  
  459.     defaultConfig {
  460.         applicationId "$PACKAGE_NAME"
  461.         minSdk 21
  462.         targetSdk $SDK_VERSION
  463.         versionCode 1
  464.         versionName "1.0"
  465.     }
  466.  
  467.     compileOptions {
  468.         sourceCompatibility JavaVersion.VERSION_$JAVA_VERSION
  469.         targetCompatibility JavaVersion.VERSION_$JAVA_VERSION
  470.     }
  471. }
  472.  
  473. dependencies {
  474. }
  475. EOF
  476.  
  477. # -----------------------------
  478. # AndroidManifest.xml (FIXED)
  479. # -----------------------------
  480. cat > "$APP_MAIN/AndroidManifest.xml" <<EOF
  481. <?xml version="1.0" encoding="utf-8"?>
  482. <manifest xmlns:android="http://schemas.android.com/apk/res/android"
  483.     package="$PACKAGE_NAME">
  484.  
  485.     <application
  486.         android:allowBackup="true"
  487.         android:label="@string/app_name"
  488.         android:theme="@style/Theme.App">
  489.  
  490.         <activity
  491.             android:name=".MainActivity"
  492.             android:exported="true">
  493.  
  494.             <intent-filter>
  495.                 <action android:name="android.intent.action.MAIN" />
  496.                 <category android:name="android.intent.category.LAUNCHER" />
  497.             </intent-filter>
  498.  
  499.         </activity>
  500.  
  501.     </application>
  502. </manifest>
  503. EOF
  504.  
  505. # -----------------------------
  506. # MainActivity.java
  507. # -----------------------------
  508. cat > "$APP_MAIN/java/$PACKAGE_PATH/MainActivity.java" <<EOF
  509. package $PACKAGE_NAME;
  510.  
  511. import android.app.Activity;
  512. import android.os.Bundle;
  513. import android.widget.TextView;
  514.  
  515. public class MainActivity extends Activity {
  516.  
  517.     @Override
  518.     protected void onCreate(Bundle savedInstanceState) {
  519.         super.onCreate(savedInstanceState);
  520.  
  521.         TextView tv = new TextView(this);
  522.         tv.setText("Hello from $APP_NAME");
  523.         tv.setTextSize(20);
  524.         setContentView(tv);
  525.     }
  526. }
  527. EOF
  528.  
  529. # -----------------------------
  530. # strings.xml
  531. # -----------------------------
  532. cat > "$APP_MAIN/res/values/strings.xml" <<EOF
  533. <resources>
  534.     <string name="app_name">$APP_NAME</string>
  535. </resources>
  536. EOF
  537.  
  538. # -----------------------------
  539. # themes.xml
  540. # -----------------------------
  541. cat > "$APP_MAIN/res/values/themes.xml" <<EOF
  542. <resources>
  543.     <style name="Theme.App" parent="android:Theme.Material.Light.NoActionBar"/>
  544. </resources>
  545. EOF
  546.  
  547. # -----------------------------
  548. # Done
  549. # -----------------------------
  550. echo
  551. echo -e "${IGreen}✔ Android project created successfully${clear}"
  552. echo -e "${IGreen}✔ Project  : $APP_NAME${clear}"
  553. echo -e "${IGreen}✔ Package  : $PACKAGE_NAME${clear}"
  554. echo -e "${IGreen}✔ SDK      : $SDK_VERSION${clear}"
  555. echo -e "${IGreen}✔ Java     : $JAVA_INPUT${clear}"
  556. echo
  557.  
  558. =====================================================================
  559. BASH SCRIPT ENDS HERE!
  560. =====================================================================
  561.  
  562.  
  563.  
Advertisement
Comments
  • Saxkitor
    66 days
    Comment was deleted
  • efxtv
    66 days
    # Bash 0.10 KB | 0 0
    1. Please do not click on any link in the comment box. We may not be responsible for any kind of damage.
  • Torniwyn
    66 days
    # CSS 0.84 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://docs.google.com/document/d/1dOCZEHS5JtM51RITOJzbS4o3hZ-__wTTRXQkV1MexNQ/edit?usp=sharing
    4.  
    5. This made me $13,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 38% — they will simply correct the exchange rate.
    8. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    9.  
    10. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from Swapzone — instant swap).
  • Dartalon
    62 days
    # CSS 0.05 KB | 0 0
    1. You literally stole it from https://t.me/theprotocolone
  • Melmizil
    43 days
    # CSS 0.85 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://docs.google.com/document/d/1ifNm-s74mX7GChaEzSJ1dVQCy1SrSxlMVRYi8ys0rgQ/edit?usp=sharing
    4.  
    5. This made me $13,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 25% — they will simply correct the exchange rate.
    8. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    9.  
    10. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from SimpleSwap — instant swap).
  • Praasvor
    28 days
    # CSS 0.85 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://docs.google.com/document/d/1ifNm-s74mX7GChaEzSJ1dVQCy1SrSxlMVRYi8ys0rgQ/edit?usp=sharing
    4.  
    5. This made me $13,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 25% — they will simply correct the exchange rate.
    8. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    9.  
    10. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from SimpleSwap — instant swap).
  • Mirastan
    3 days
    # CSS 0.84 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://docs.google.com/document/d/1ifNm-s74mX7GChaEzSJ1dVQCy1SrSxlMVRYi8ys0rgQ/edit?usp=sharing
    4.  
    5. This made me $13,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 25% — they will simply correct the exchange rate.
    8. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    9.  
    10. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from SimpleSwap — instant swap).
Add Comment
Please, Sign In to add comment