AeThex-OS/android/bootanimation/analyze_logo.py
MrPiglr b3c308b2c8 Add functional marketplace modules, bottom nav bar, root terminal, arcade games
- ModuleManager: Central tracking for installed marketplace modules
- DataAnalyzerWidget: Real-time CPU/RAM/Battery/Storage widget (unlocked by Data Analyzer module)
- BottomNavBar: Navigation bar for Projects/Chat/Marketplace/Settings
- RootShell: Real root command execution utility
- TerminalActivity: Full root shell with neofetch, sysinfo, real Linux commands
- Terminal Pro module: Adds aliases (ll, la, h), command history
- ArcadeActivity + SnakeGame: Pixel Arcade module unlocks retro games
- fade_in/fade_out animations for smooth transitions
2026-02-18 22:03:50 -07:00

58 lines
2 KiB
Python

import struct
import zlib
from PIL import Image
import io
import os
data = bytearray(open('C:/Users/PCOEM/AeThexOS/android/bootanimation/logo.bin', 'rb').read())
print(f"Logo partition size: {len(data)} bytes")
# Parse MTK logo header (new format)
# The header contains block info for images
header = data[:512]
print("\nHeader bytes 0-100:")
print(header[:100].hex())
# Look for zlib compressed data (78 9c, 78 da, 78 01, 78 5e)
zlib_starts = []
for i in range(0, len(data) - 2):
if data[i] == 0x78 and data[i+1] in [0x9c, 0xda, 0x01, 0x5e]:
zlib_starts.append(i)
print(f"\nPossible zlib streams at: {zlib_starts[:20]}")
# Try to decompress each
os.makedirs('extracted_logos', exist_ok=True)
for idx, start in enumerate(zlib_starts[:5]):
try:
# Try different lengths
for length in [500000, 1000000, 2000000, 4000000]:
try:
decompressed = zlib.decompress(data[start:start+length])
print(f"\nDecompressed from offset {start}: {len(decompressed)} bytes")
# Try to interpret as raw BGRA (800x1280)
expected_size = 800 * 1280 * 4
if len(decompressed) >= expected_size:
img = Image.frombytes('RGBA', (800, 1280), decompressed[:expected_size], 'raw', 'BGRA')
img.save(f'extracted_logos/logo_{idx}_{start}.png')
print(f" Saved as logo_{idx}_{start}.png")
break
except:
continue
except Exception as e:
pass
# Also try raw BGRA at fixed offsets
print("\nTrying raw BGRA at common offsets...")
for offset in [512, 4096, 8192, 16384, 32768]:
try:
expected_size = 800 * 1280 * 4
if offset + expected_size <= len(data):
img = Image.frombytes('RGBA', (800, 1280), bytes(data[offset:offset+expected_size]), 'raw', 'BGRA')
img.save(f'extracted_logos/raw_{offset}.png')
print(f" Saved raw_{offset}.png")
except Exception as e:
print(f" Offset {offset}: {e}")