Snippets

Zhiwei Li MT6735 IMEI File Generator

Created by Zhiwei Li
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import binascii

#Change it to Your IMEI, and pad zero
imeistr = '3520710681329890'


imei = bytearray(8)
i = 0
while i < 16:
	imei[i/2] = int(imeistr[i+1]) * 16 + int(imeistr[i])
	i = i + 2	
print(binascii.hexlify(imei))	


table = '\x16\xE5\xF4\xD1\xE8\x6A\x42\x00'
result = bytearray(12)
i = 0
while i < 8:
	result[i] = imei[i] ^ ord(table[i])
	i = i + 1
	
result[8]   = 0x74
result[9]   = 0x79
result[10]  = (result[0] + result[2] + result[4] + result[6] + result[8]) & 0xFF;
result[11]  = (result[1] + result[3] + result[5] + result[7] + result[9]) & 0xFF;
print(binascii.hexlify(result))	
	


padding = '\xE9\x1A\x0B\x2E\x17\x95\xBD\x0F\x8B\x86\x53\x72'
MP0B_001 = result * 2 + padding * 8
print(binascii.hexlify(MP0B_001))	

with open('MP0B_001', 'w') as f:
   f.write(MP0B_001)

Comments (1)

  1. Zhiwei Li

    MT6589 padding = '\x54\x5F\x90\xD0\xE0\xE1\x65\x4A\xAA\x74\xD3\xCE'

    IMEI = 'C3 20 7B 0F 0D 3E 0D BD 55 8B AD B5' or 'C3 A2 4A 0F 1F 3D E9 4C AA 74 BF AE'

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.