Skip to content

hackThacker/awesome-reverse-engineering

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

<<<<<<< HEAD

Vedabase Android Modernization Project

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).

πŸš€ Key Accomplishments

1. Modern Android Compatibility (API 34+)

  • Target SDK Update: The application's targetSdkVersion was 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.

2. Scoped Storage & Database Fix

  • Problem: Legacy file access is restricted on Android 11+. The 1.1GB .ivd file could not be read via absolute paths.
  • Discovery: Analysis revealed that the .ivd format 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.

3. Welcome Screen Modernization

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

πŸ“‚ Project Structure

  • 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.

πŸ› οΈ Rebuilding the Project

To build the APK from the modified source, run the following commands (see BUILD-GUIDE.md for details):

  1. Compile: java -jar tools\apktool.jar b decompiled_apk -o vedabase_latest_clean.apk
  2. Sign & Align: java -jar tools\uber-apk-signer.jar --apks vedabase_latest_clean.apk --allowResign --overwrite

βœ… Final Status

The project is 100% successful. The application installs, requests necessary permissions, and renders the Vedabase content perfectly on the latest Android hardware.

πŸ“– Android Reverse Engineering & Modernization


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.


License Stars Forks Issues


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


πŸ“‹ Table of Contents


πŸ” What is This

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).

🧠 Core Discovery

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.


πŸ’‘ Why This Repo

# 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

πŸ“± SDK Version Changes

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+

πŸ“š Topics Covered

  • 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_STORAGE injection into existing bytecode
  • Proprietary file format reverse engineering identifying SQLite inside .ivd
  • targetSdkVersion and minSdkVersion strategy across Android API generations
  • APK signing with apksigner (v1 + v2 signature schemes)
  • APK alignment with zipalign for 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.xml permission and SDK attribute modification
  • Welcome screen UI modernization via direct Smali and resource patching
  • APK verification with apksigner verify

πŸ› οΈ Tools Used

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

βš™οΈ Build Environment Setup

Complete environment setup on Ubuntu 22.04 / Debian or WSL2 on Windows.

Step 1 Install Java 21 LTS

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

Step 2 Download APKTool v2.10.0

# 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.0

Step 3 Download uber-apk-signer v1.3.0

wget 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.0

Step 4 Download JADX v1.5.0 (for static analysis)

wget 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.0

Step 5 Install Android Command Line Tools & Build Tools 34

wget 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 PATH lines to ~/.bashrc or ~/.zshrc to make them permanent across sessions.

Step 6 Generate Debug Keystore

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"

πŸ”¨ How to Rebuild

With the environment set up and decompiled_apk/ directory containing all applied patches:

Option A Using uber-apk-signer (Recommended one command signs + aligns)

# 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

Option B Manual apksigner + zipalign (Granular control)

# 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.apk

Install on Device

adb install app-aligned.apk
# or for reinstall
adb install -r app-aligned.apk

🎯 Who is This For

βœ…  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

πŸ“Š Repo Stats

Last Commit Repo Size Top Language Java Version APKTool uber-apk-signer JADX Build Tools


πŸ“„ License

This project is licensed under the MIT License see the LICENSE file for details.

The original Vedabase application, its content, and the .ivd database 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.


🀝 Support

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

>>>>>>> 40d25a074197953ef2feb3a809c6daa6eb2f9e14

About

Expert reverse engineer specializing in binary analysis, malware research, and low-level system internals. Experienced in dissecting complex software, uncovering vulnerabilities, and understanding code beyond source-level abstraction

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors