<<<<<<< HEAD
This project focuses on the successful reverse engineering, modernization, and patch-application for the legacy Vedabase Android application, ensuring full compatibility with modern Android versions (up to Android 16).
- Target SDK Update: The application's
targetSdkVersionwas updated to 33 (Android 13). This provides the best balance of modern system performance while avoiding the strict runtime receiver constraints of API 34, ensuring stability on Android 14, 15, and 16. - Architecture: Confirmed that the application logic is pure Java, making it natively compatible with all modern ARM64-v8a devices.
- Problem: Legacy file access is restricted on Android 11+. The 1.1GB
.ivdfile could not be read via absolute paths. - Discovery: Analysis revealed that the
.ivdformat is a standard SQLite Database. - Surgical Patch: Injected Dalvik bytecode (Smali) into
MainActivity.onCreate. The app now automatically detects if it's running on Android 11+ and prompts the user for "All Files Access" (MANAGE_EXTERNAL_STORAGE), preserving the original high-performance rendering pipeline.
The welcome screen strings were updated directly in the Smali source (u.smali) for a cleaner user experience:
- Updated Header: Matches the modern introduction text from
Intro001.htm. - Removed Legacy Links: Deleted the broken troubleshooting and instructions sections.
- New Footer:
- Text: "This apk is modified For the latest devices upto android 16"
- Attribution: "modified by:" (Linked to GitHub)
- URL:
https://github.com/hackthacker
vedabase_latest_clean.apk: The final, signed, and aligned production-ready APK.decompiled_apk/: The complete, patched source project (Smali + Resources).tools/: Required utilities (Apktool,uber-apk-signer).BUILD-GUIDE.md: Step-by-step commands to rebuild the project.INSTALL-FIX-REPORT.md: Detailed technical diagnosis of installation errors.README-Reverse-Engineering.md: Technical documentation of the discovery phase.
To build the APK from the modified source, run the following commands (see BUILD-GUIDE.md for details):
- Compile:
java -jar tools\apktool.jar b decompiled_apk -o vedabase_latest_clean.apk - Sign & Align:
java -jar tools\uber-apk-signer.jar --apks vedabase_latest_clean.apk --allowResign --overwrite
The project is 100% successful. The application installs, requests necessary permissions, and renders the Vedabase content perfectly on the latest Android hardware.
A deep-dive reverse engineering project surgical Smali-level patching of a 2010 legacy APK targeting Android 4.3 Jelly Bean (API 18), fully modernized and production-signed for Android 16 (API 35) without having a single line of Java source code.
What is This β’ Why This Repo β’ SDK Changes β’ Topics Covered β’ Tools Used β’ Build Setup β’ How to Rebuild β’ Who is This For β’ Repo Stats β’ License β’ Support
- What is This
- Why This Repo
- SDK Version Changes
- Topics Covered
- Tools Used
- Build Environment Setup
- How to Rebuild
- Who is This For
- Repo Stats
- License
- Support
The Android application is a massive offline Vedic scripture reader built around a 1.1 GB proprietary .ivd database file. Originally released targeting Android 4.3 Jelly Bean (API 18), the application became completely non-functional on modern Android versions due to three compounding failures scoped storage enforcement, unsigned APK rejection, and deprecated file I/O APIs.
This project performs end-to-end reverse engineering of the APK entirely at the Smali (Dalvik bytecode) level. No decompiled Java source was required. Key surgical patches were injected into MainActivity.onCreate, permission declarations were updated in AndroidManifest.xml, and welcome screen strings were modernized directly inside .smali producing a fully signed, zipaligned, production-ready APK that runs flawlessly on Android 16 (API 35).
During analysis, the proprietary .ivd file format was identified to be a standard SQLite database with a renamed extension. This eliminated the need for any custom parser and allowed the existing high-performance rendering pipeline to be preserved entirely without modification.
β οΈ Disclaimer: This project is strictly for educational and personal use only. All rights to the original Vedabase application and its content belong to their respective copyright holders. No proprietary content is redistributed in this repository.
| # | Problem | Root Cause | Solution Applied |
|---|---|---|---|
| 1 | App hard-crashed on Android 11+ launch | Scoped storage enforcement blocked all legacy File() absolute path reads |
Injected MANAGE_EXTERNAL_STORAGE runtime permission request into MainActivity.onCreate via Smali |
| 2 | 1.1 GB .ivd database completely unreadable |
OS blocked access via legacy absolute paths on API 30+ | Reverse engineered .ivd format confirmed standard SQLite; patched file access path resolution |
| 3 | APK refused to install on modern devices | Package was unsigned rejected by Android Package Manager on API 26+ | Signed with apksigner (v1 + v2 schemes) + zipaligned using Android Build Tools 34.0.0 |
| 4 | targetSdkVersion critically outdated |
Originally API 18 triggered legacy compatibility shims causing instability | Updated to targetSdkVersion 33 modern runtime behaviour, no strict API 34 restrictions |
| 5 | Welcome screen broken with dead links | Hardcoded legacy troubleshooting URLs in const-string values inside .smali |
Rewrote all affected const-string entries cleaner header, removed dead links, added attribution |
| 6 | ARM64 compatibility unknown | Source architecture undocumented | Confirmed pure Java logic zero native .so libraries natively compatible with all ARM64-v8a devices |
| Property | Original APK | Modified APK |
|---|---|---|
| Min SDK Version | 14 Android 4.0 Ice Cream Sandwich |
14 Preserved (maximum device reach maintained) |
| Target SDK Version | 18 Android 4.3 Jelly Bean |
33 Android 13 Tiramisu |
| Compile SDK | Unknown / pre-API 19 toolchain | Build Tools 34.0.0 |
| Compatible Up To | Android 4.3 effectively broken on Android 5.0+ | β Android 16 (API 35) fully verified |
| Native Libraries | ARMv7 only | None required pure Java, all ABIs supported |
| APK Signing Scheme | Unsigned | v1 (JAR) + v2 (APK Signature Block) via apksigner |
| Storage Permission | None declared | MANAGE_EXTERNAL_STORAGE runtime-requested on API 30+ |
- Android APK structure analysis and decompilation with APKTool
- Smali / Dalvik bytecode reading, understanding opcodes, and writing surgical patches
- Scoped Storage (API 30+) runtime
MANAGE_EXTERNAL_STORAGEinjection into existing bytecode - Proprietary file format reverse engineering identifying SQLite inside
.ivd targetSdkVersionandminSdkVersionstrategy across Android API generations- APK signing with
apksigner(v1 + v2 signature schemes) - APK alignment with
zipalignfor memory-mapped I/O optimization - Debug keystore generation with
keytool - Java source decompilation and cross-referencing with JADX
- Multi-version Android compatibility testing (Android 11 through 16)
- Smali string patching
const-string,\n,\'escape sequences, multi-line formatting AndroidManifest.xmlpermission and SDK attribute modification- Welcome screen UI modernization via direct Smali and resource patching
- APK verification with
apksigner verify
| Tool | Version | Purpose | Download |
|---|---|---|---|
| APKTool | v2.10.0 |
Decompile APK β Smali + XML resources; recompile back to unsigned APK | apktool_2.10.0.jar |
| uber-apk-signer | v1.3.0 |
One-command APK signing + zipalign; supports v1/v2/v3 schemes | uber-apk-signer-1.3.0.jar |
| JADX | v1.5.0 |
Decompile APK to readable Java source for static analysis and cross-referencing | jadx-1.5.0.zip |
| apksigner | Build Tools 34.0.0 |
Low-level APK signing with explicit v1/v2 scheme control | Bundled with Android Build Tools |
| zipalign | Build Tools 34.0.0 |
Align APK entries on 4-byte boundaries for runtime memory efficiency | Bundled with Android Build Tools |
| Android SDK Manager | cmdline-tools r11 |
Install and manage Android Build Tools and platform components | commandlinetools-linux |
| keytool | JDK 21.0.9 LTS |
Generate RSA-2048 debug keystore for APK signing | Bundled with JDK |
| OpenJDK | 21.0.9 LTS |
Runtime for APKTool, uber-apk-signer, apksigner, and keytool | adoptium.net |
| Zed Editor | Latest | Primary editor for Smali bytecode and XML resource modification | zed.dev |
| Android Studio | Latest | Emulator testing, ADB device management, and logcat debugging | developer.android.com/studio |
Complete environment setup on Ubuntu 22.04 / Debian or WSL2 on Windows.
sudo apt-get update && sudo apt-get install -y wget unzip curl
# Install OpenJDK 21
sudo apt-get install -y openjdk-21-jdk
# Verify
java -version
# Expected: java version "21.0.9" 2025-10-21 LTS# Download the APKTool wrapper script
wget https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool \
-O /usr/local/bin/apktool
chmod +x /usr/local/bin/apktool
# Download APKTool JAR v2.10.0
wget https://github.com/iBotPeaches/Apktool/releases/download/v2.10.0/apktool_2.10.0.jar \
-O /usr/local/bin/apktool.jar
chmod +x /usr/local/bin/apktool.jar
# Verify
apktool --version
# Expected: 2.10.0wget https://github.com/patrickfav/uber-apk-signer/releases/download/v1.3.0/uber-apk-signer-1.3.0.jar \
-O /usr/local/bin/uber-apk-signer.jar
# Verify
java -jar /usr/local/bin/uber-apk-signer.jar --version
# Expected: uber-apk-signer v1.3.0wget https://github.com/skylot/jadx/releases/download/v1.5.0/jadx-1.5.0.zip \
-O /tmp/jadx.zip
unzip /tmp/jadx.zip -d /opt/jadx
export PATH="/opt/jadx/bin:${PATH}"
# Verify
jadx --version
# Expected: 1.5.0wget https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip \
-O /tmp/cmdline-tools.zip
mkdir -p /opt/android-sdk/cmdline-tools
unzip /tmp/cmdline-tools.zip -d /opt/android-sdk/cmdline-tools
mv /opt/android-sdk/cmdline-tools/cmdline-tools \
/opt/android-sdk/cmdline-tools/latest
# Accept licenses and install Build Tools 34
yes | /opt/android-sdk/cmdline-tools/latest/bin/sdkmanager --licenses
/opt/android-sdk/cmdline-tools/latest/bin/sdkmanager "build-tools;34.0.0"
# Add to PATH
export PATH="/opt/android-sdk/build-tools/34.0.0:${PATH}"
# Verify
zipalign --version
apksigner --versionπ‘ Add all
export PATHlines to~/.bashrcor~/.zshrcto make them permanent across sessions.
keytool -genkey -v \
-keystore debug.keystore \
-storepass android \
-alias androiddebugkey \
-keypass android \
-keyalg RSA \
-keysize 2048 \
-validity 10000 \
-dname "CN=Android Debug,O=Android,C=US"With the environment set up and decompiled_apk/ directory containing all applied patches:
# Step 1: Recompile Smali + resources back to unsigned APK
apktool b decompiled_apk -o vedabase_unsigned.apk
# Step 2: Sign and zipalign in a single command
java -jar /usr/local/bin/uber-apk-signer.jar \
--apks vedabase_unsigned.apk \
--allowResign \
--overwrite
# Output: vedabase_unsigned-aligned-signed.apk# Step 1: Recompile
apktool b decompiled_apk -o app-unaligned.apk
# Step 2: Zipalign
zipalign -p -f 4 app-unaligned.apk app-aligned.apk
# Step 3: Sign with explicit v1 + v2 schemes
apksigner sign \
--ks debug.keystore \
--ks-pass pass:android \
--v1-signing-enabled true \
--v2-signing-enabled true \
app-aligned.apk
# Step 4: Verify signature
apksigner verify --verbose app-aligned.apkadb install app-aligned.apk
# or for reinstall
adb install -r app-aligned.apkβ
Android reverse engineers studying real-world Smali patching
β
Security researchers analyzing legacy APK structures and storage patterns
β
Devotees requiring Vedabase to run on Android 11, 12, 13, 14, 15, or 16
β
Developers learning scoped storage migration without Java source access
β
Students studying APK decompilation, bytecode injection, and re-signing
β
Engineers learning the full APKTool β patch β sign β verify pipeline
β
Anyone studying proprietary file format identification (SQLite inside .ivd)
β Not for commercial redistribution of the patched APK
β Not a replacement for the official Vedabase platform or website
β Not for bypassing DRM, copy protection, or proprietary licensing
This project is licensed under the MIT License see the LICENSE file for details.
The original Vedabase application, its content, and the
.ivddatabase files belong entirely to their respective copyright holders. This repository documents only the technical reverse engineering and patching process for educational purposes. No proprietary content, database files, or original APK binaries are redistributed here.
If this project helped you, consider leaving a β it helps other reverse engineers find this work.
For technical questions, reproduction issues, or patch improvements open a GitHub Issue.
Made with β€οΈ by hackthacker