Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works

Random project

android_bootimg_info

A tool to parse build.prop information from boot.img

View on GitHub

Anyone may press Interesting, signed in or not. It helps others find this project.

Member rating

No ratings yet.

Sign in to rate this project.

README

BootImgInfo - Android Boot Image Recovery Information Tool

A powerful Delphi-based application for extracting and analyzing Android boot images, providing comprehensive device information and build properties.

📱 Overview

BootImgInfo is a comprehensive tool designed to parse Android boot images (.img, .bin files) and extract valuable device information including build properties, system details, and hardware specifications. Perfect for Android developers, security researchers, and device analysts.

✨ Features

🔍 Boot Image Analysis

  • Android Boot Image Parsing - Supports standard Android boot image format
  • SPRD Boot Images - Special support for Spreadtrum (SPRD) boot images
  • Header Information - Extracts kernel size, ramdisk size, page size, and more
  • Magic Number Validation - Verifies boot image integrity

📦 Ramdisk Processing

  • GZip Decompression - Automatic detection and decompression of compressed ramdisks
  • CPIO Archive Parsing - Extracts files from CPIO-formatted ramdisks
  • File System Navigation - Browse and extract individual files from ramdisk

🏗️ Build Properties Extraction

  • Multi-file Support - Searches multiple build.prop variants:
    • build.prop
    • default.prop
    • prop.default
    • system/build.prop
    • system/default.prop
    • system/prop.default

📊 Device Information

Extracts comprehensive device details:

  • Brand & Manufacturer - Device brand and OEM information
  • Model & Product - Device model and product names
  • Android Version - OS version and SDK information
  • Security Patches - Security patch levels
  • Hardware Details - CPU architecture, platform information
  • Build Information - Build dates, fingerprints, incremental versions
  • Regional Settings - Timezone, region configurations
  • Custom ROM Support - MIUI, OPPO, Vivo specific properties

🚀 Getting Started

Prerequisites

  • Delphi 12 (or compatible version with System.ZLib support)
  • Windows OS (developed for Windows platform)

Installation

  1. Clone or download the repository
  2. Open BootImgInfo.dproj in Delphi IDE
  3. Build the project (Build → Build BootImgInfo)
  4. Run the executable from Win32\Debug\ or Win32\Release\

📖 Usage

Basic Usage

  1. Launch the BootImgInfo application
  2. Click the main button to select a boot image file
  3. Choose your Android boot image (.img or .bin file)
  4. View extracted device information in the rich text display

Supported File Formats

  • .img - Standard Android boot image files
  • .bin - Binary boot image files
  • Both compressed (GZip) and uncompressed ramdisks

Sample Output

pascal
Processing File... Ok

Brand : Samsung
OEM : Samsung
Model : SM-G991B
Android ver : 13
SDK ver : 33
Security patch : 2023-10-01
Build ID : TP1A.220624.014
Platform : exynos2100
CPU ABI : arm64-v8a

🏗️ Architecture

Project Structure

pascal
BootImgInfo/
????????? BootImgInfo.dpr          # Main program file
????????? frmMain.pas              # Main form UI
????????? Library/
???   ????????? AndroidBOOT/
???   ???   ????????? AnBoot.Lib.pas       # Boot image parsing library
???   ???   ????????? AnBoot.Constant.pas  # Boot image constants
???   ???   ????????? AnBoot.CPIO.pas      # CPIO archive handler
???   ????????? BuildProp/
???       ????????? BuildProp.Lib.pas        # Build properties parser
???       ????????? BuildProp.Constants.pas  # Property mappings
????????? README.md

Core Components

AnBoot Library

  • TAndroidBootLibrary - Main boot image parsing class
  • GZip Support - Automatic decompression using Delphi's System.ZLib
  • SPRD Handling - Special processing for Spreadtrum boot images
  • Stream-based Processing - Memory-efficient file handling

CPIO Library

  • TAndroidCPIOLibrary - CPIO archive parser
  • File Extraction - Individual file access from ramdisk
  • 4-byte Alignment - Proper CPIO format handling

BuildProp Library

  • TBuildPropLibrary - Build properties extractor
  • Priority-based Lookup - Searches multiple property variants
  • Fallback System - Uses alternative properties when primary ones aren't found

🛠️ Technical Details

Boot Image Format Support

  • Android Boot Image Header - Standard Android boot format
  • Page Size Detection - Automatic page size detection with fallback
  • Kernel & Ramdisk Separation - Proper extraction of boot components
  • Alignment Handling - Correct page boundary calculations

Compression Support

  • GZip Detection - Automatic GZip header detection (1F 8B 08)
  • Stream Decompression - Chunked reading for memory efficiency
  • Error Handling - Robust decompression error management

Property Mapping

The tool maps 20+ different Android properties to user-friendly names:

  • Brand, OEM, Model information
  • Android version details
  • Build and security information
  • Hardware specifications
  • Regional and custom ROM properties

🔧 Development

Building from Source

bash
# Open in Delphi IDE
# Build → Build BootImgInfo
# Or use command line:
dcc32 BootImgInfo.dpr

Dependencies

  • System.SysUtils - Basic system utilities
  • System.Classes - Stream and collection classes
  • System.ZLib - GZip decompression support
  • Vcl.Forms - Windows Forms framework
  • Vcl.Themes - UI theming support

Code Style

  • Professional Formatting - Consistent 2-space indentation
  • Error Handling - Comprehensive try/finally blocks
  • Memory Management - Proper object lifecycle management
  • Stream Processing - Efficient memory usage patterns

🤝 Contributing

How to Contribute

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes following the existing code style
  4. Test thoroughly with various boot images
  5. Submit a pull request

Areas for Contribution

  • Additional Boot Formats - Support for other boot image variants
  • UI Enhancements - Improved user interface
  • Export Features - Save extracted information to files
  • Batch Processing - Multiple file analysis
  • Linux Support - Cross-platform compatibility

📄 License

This project is open source. Please check the license file for specific terms and conditions.

⚠️ Disclaimer

This tool is designed for educational and research purposes. Users are responsible for ensuring they have appropriate permissions to analyze boot images. Always respect device manufacturers' terms of service and applicable laws.

🆘 Support

Troubleshooting

  • "Android Boot Magic Not Found" - File may not be a valid boot image
  • "Invalid CPIO Entry" - Ramdisk may be corrupted or use different format
  • "Failed to Process" - Check if file is accessible and not corrupted

Common Issues

  • Large Files - Tool handles large boot images efficiently via streaming
  • Compressed Ramdisks - Automatic GZip detection and decompression
  • Missing Properties - Tool searches multiple property variants for maximum compatibility

Made with ❤️ for the Android development community