Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
164 changes: 164 additions & 0 deletions DEMO_OUTPUT.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
=============================================================================
DEMOSTRACIÓN DE HERRAMIENTAS DE ANÁLISIS HEXADECIMAL Y MODIFICACIÓN MTK
=============================================================================

1. ANÁLISIS DE SECCFG (Bootloader Lock State)
=============================================================================

$ python Tools/seccfg_analyzer.py analyze seccfg.bin

=== Analyzing seccfg file: seccfg.bin ===

File size: 8388608 bytes (0x800000)
Detected version: V4

--- V4 seccfg Header ---
Magic: 0x4D4D4D4D (MMMM)
Version: 4
Size: 0x3C (60 bytes)
Lock State: 0x01 - DEFAULT (Locked)
Critical Lock State: 0x00
Secure Boot Runtime: 0x00
End Flag: 0x45454545 (EEEE)

Hash (last 32 bytes): 6462e2e954cb66c5aedbcc841dbc54dbb24b1716...

--- Bootloader Status ---
✗ Bootloader is LOCKED

=============================================================================

2. BÚSQUEDA DE CARRIER EN PROINFO
=============================================================================

$ python Tools/carrier_editor.py search proinfo.bin amxmx

=== Searching for 'amxmx' in proinfo.bin ===

Found 1 occurrence(s)

Match at offset 0x00000218 (decimal: 536):
---------------------------------------------------------------------------
000001f8: 00 00 00 00 00 00 00 00 00 56 45 4b 52 4c 35 32 |.........VEKRL52|
00000208: 5a 4a 44 00 00 00 00 00 00 00 00 00 01 00 04 00 |ZJD.............|
00000218: 61 6d 78 6d 78 00 2d 73 6b 69 70 00 2d 73 6b 69 |amxmx.-skip.-ski|
^^^^^^^
ENCONTRADO!

=============================================================================

3. MODIFICACIÓN DE CARRIER: amxmx → openmx
=============================================================================

$ python Tools/carrier_editor.py replace proinfo.bin proinfo_openmx.bin amxmx openmx --extend

=== Replacing 'amxmx' with 'openmx' ===
Input: proinfo.bin
Output: proinfo_openmx.bin
Padding: null

Found 1 occurrence(s) to replace:

Match at offset 0x00000218 (decimal: 536):
00000218: 61 6d 78 6d 78 00 2d 73 6b 69 70 00 |amxmx.-skip.|
^^^^^ ANTES

⚠ WARNING: This will modify the partition file!
Always backup before flashing to device!

Info: New string 'openmx' is longer than old string 'amxmx'
Will attempt to use null terminator space (extend mode)
Extended replacement at offset 0x00000218 (overwrote 1 null byte)

✓ Replaced 1 occurrence(s)
✓ Saved to: proinfo_openmx.bin

--- Verifying changes ---
✓ Verification: Found 1 occurrence(s) of 'openmx'

Match at offset 0x00000218 (decimal: 536):
00000218: 6f 70 65 6e 6d 78 2d 73 6b 69 70 00 |openmx-skip.|
^^^^^^ DESPUÉS

=============================================================================

4. ANÁLISIS HEXADECIMAL DETALLADO
=============================================================================

$ python Tools/hex_editor_demo.py seccfg.bin

===========================================================================
MTK Seccfg Hex Analysis Demonstration
===========================================================================

File: seccfg.bin
Size: 8388608 bytes (0x800000)

===========================================================================
1. Hex Dump of File Header (first 128 bytes)
===========================================================================

Offset Hex ASCII
---------------------------------------------------------------------------
00000000: 4d 4d 4d 4d 04 00 00 00 3c 00 00 00 01 00 00 00 |MMMM....<.......|
00000010: 00 00 00 00 00 00 00 00 45 45 45 45 64 62 e2 e9 |........EEEEdb..|
^^^^ MAGIC ^^^^ END FLAG

===========================================================================
2. Searching for Magic Patterns
===========================================================================

Found 1 occurrence(s) of pattern: 4d4d4d4d (MMMM)
Found 1 occurrence(s) of pattern: 45454545 (EEEE)

===========================================================================
3. Analyzing Header Fields
===========================================================================

Detected V4 format (starts with 'MMMM')

As uint32 (little-endian): 1296911693 (0x4d4d4d4d)
⚠ Recognized pattern: MMMM (seccfg magic)

Lock State Analysis:
As uint32 (little-endian): 1 (0x00000001)
⚠ Recognized pattern: 1 (possibly LOCKED)

Lock State Interpretation:
Status: LOCKED (DEFAULT)

=============================================================================

RESUMEN DE MODIFICACIÓN EXITOSA
=============================================================================

Archivo Original : proinfo.bin (3.0 MB)
Carrier Original : amxmx (Telcel México)
Offset : 0x218 (536 decimal)

Archivo Modificado : proinfo_openmx.bin (3.0 MB)
Carrier Nuevo : openmx (Open Mobile México)
Método : Extend mode (sobrescribir null terminator)

Verificación : ✓ EXITOSA
Estado : ✓ LISTO PARA USAR

⚠ ADVERTENCIA: Este archivo es específico del dispositivo.
Haz backup antes de flashear.
Flashear puede anular la garantía.

=============================================================================

COMANDOS PARA FLASHEAR AL DISPOSITIVO (⚠️ CUIDADO!)
=============================================================================

# 1. Backup actual
$ python mtk.py da r proinfo proinfo_backup_original.bin

# 2. Flashear archivo modificado
$ python mtk.py da w proinfo proinfo_openmx.bin

# 3. Reiniciar dispositivo
$ python mtk.py da reboot

=============================================================================
Loading