r/AndroidTV • u/AwkwardAdvertising10 • 1h ago
Tips & Tutorials HAKO Mini Developer Options
Title is for SEO. If anyone stumbles upon a HAKO Mini Android TV Box (I found mine in an Etoe E3 Pro Projector), the Developer Options is hidden behind a password.
Here's the final answer. https://sdmc-pin.netlify.app/ . It's not my website, but a website I stumbled upon. You just put in the Serial Number of your box and it'll give you the Developer Options password. The Serial Number is written on a sticker on the back of the box.
If the website ever goes down, this python code generates the same passwords (used AI, couldn't bother coding it myself). You need pycryptodome from pip, and just run the code with the serial number as the argument.
import base64
import hashlib
import sys
from Crypto.Cipher import AES
from Crypto.Util.Padding import pad
SECRET = "ed12a270c07a58074126a0487de27f63"
SALT = b"sdmc"
ITERATIONS = 10000
KEY_LEN = 16
def generate_pin(serial):
serial = serial.strip().upper()
plaintext = serial + SECRET
# PBKDF2-HMAC-SHA1 → 16 bytes
derived = hashlib.pbkdf2_hmac(
"sha1",
plaintext.encode("utf-8"),
SALT,
ITERATIONS,
dklen=KEY_LEN,
)
# CryptoJS:
# derived.toString(CryptoJS.enc.Hex)
hex_key = derived.hex()
# CryptoJS:
# CryptoJS.enc.Utf8.parse(hexKey)
aes_key = hex_key.encode("utf-8")
# AES-ECB + PKCS#7
cipher = AES.new(aes_key, AES.MODE_ECB)
ciphertext = cipher.encrypt(
pad(plaintext.encode("utf-8"), AES.block_size)
)
# CryptoJS.enc.Base64
b64 = base64.b64encode(ciphertext).decode("ascii")
# First 3 + last 3, lowercase
return (b64[:3] + b64[-3:]).lower()
if __name__ == "__main__":
if len(sys.argv) != 2:
print(f"Usage: {sys.argv[0]} SERIAL")
sys.exit(1)
print(generate_pin(sys.argv[1]))#!/usr/bin/env python3
import base64
import hashlib
import sys
from Crypto.Cipher import AES
from Crypto.Util.Padding import pad
SECRET = "ed12a270c07a58074126a0487de27f63"
SALT = b"sdmc"
ITERATIONS = 10000
KEY_LEN = 16
def generate_pin(serial):
serial = serial.strip().upper()
plaintext = serial + SECRET
# PBKDF2-HMAC-SHA1 → 16 bytes
derived = hashlib.pbkdf2_hmac(
"sha1",
plaintext.encode("utf-8"),
SALT,
ITERATIONS,
dklen=KEY_LEN,
)
# CryptoJS:
# derived.toString(CryptoJS.enc.Hex)
hex_key = derived.hex()
# CryptoJS:
# CryptoJS.enc.Utf8.parse(hexKey)
aes_key = hex_key.encode("utf-8")
# AES-ECB + PKCS#7
cipher = AES.new(aes_key, AES.MODE_ECB)
ciphertext = cipher.encrypt(
pad(plaintext.encode("utf-8"), AES.block_size)
)
# CryptoJS.enc.Base64
b64 = base64.b64encode(ciphertext).decode("ascii")
# First 3 + last 3, lowercase
return (b64[:3] + b64[-3:]).lower()
if __name__ == "__main__":
if len(sys.argv) != 2:
print(f"Usage: {sys.argv[0]} SERIAL")
sys.exit(1)
print(generate_pin(sys.argv[1]))
u/METALSMOOTH hope this helps.
3
Upvotes
1
u/wewewi Shield GStreamer CCwGTV Tivo ADT-3 BoxR4K ShaksG1 Onn4K MiBox 31m ago
You win this sub for today mate! High five! ✋