honeylab's blog

各種ハードウェアの改造、主にファミコンミニなどをやってます(ました)

docomo dTV01 / unext-tv (HUAWEI M220)をroot化しようとしたけどうまくいっていない話

ハードオフで見つけてたので、勉強がてらいじっていました。

この2つ、基板が全く同じでソフトだけ違うもののようでした。

 

シリアル端子は出ていたけど、 bootloader中にも何のキー入力も受け付けず、
起動してからはconsoleはcloseされるようでシリアルからのアクセスはできませんでした。

 

シリアルから触れなくても、ビルド番号x7クリックで開発者モードにして、
ネットワーク経由でadbできるので大体のことはできるのですが、
あくまでも大体のことしかできないのです。

そのため、どうにかしてroot化できないかといろいろやっていたのですが、今のところできていないのでここまでの流れをメモしておきます。

 

シリアル接続~Linux起動まで

System startup

Reg Version:  v1.1.0
Reg Time:     2014/6/1619:25:50
Reg Name:     hi3719cdmo1b_hi3719cv100_ddr3_2gbyte_8bitx4_4layers_emmc.reg

Compressed-boot v1.0.0
Uncompress....................Ok


System startup

Reg Version:  v1.1.0
Reg Time:     2014/6/1619:25:50
Reg Name:     hi3719cdmo1b_hi3719cv100_ddr3_2gbyte_8bitx4_4layers_emmc.reg

Fastboot 3.3.0 (panli@ottm620-Tecal-RH2288-V2-12) (Jul 14 2015 - 23:34:35)

Fastboot:      Version 3.3.0
Build Date:    Jul 14 2015, 23:35:12
CPU:           Hi3719Cv100
Boot Media:    eMMC
DDR Size:      1GB

Checking DDR config ... OK
Check nand flash controller v610. found
Special NAND id table Version 1.36
Nand ID: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
No NAND device found!!!

Check spi flash controller v350. found
Can't find a valid spi flash chip.
Can't find a valid spi flash chip.

MMC/SD controller initialization.
MMC/SD Card:
    MID:         0x45
    Read Block:  512 Bytes
    Write Block: 512 Bytes
    Chip Size:   3776M Bytes (High Capacity)
    Name:        "SEM04"
    Chip Type:   MMC
    Version:     4.0
    Speed:       25000000Hz
    Bus Width:   8bit
    Boot Addr:   0 Bytes

Boot Env on eMMC
    Env Offset:          0x00100000
    Env Size:            0x00010000
    Env Range:           0x00010000


SDK Version: HiSTBAndroidV500R001C00CP0008_v2014120116

start led blink
ir_led_blink_proc start led blink
ir_led_blink_proc start led blink
ir_led_blink_proc start led blink
ir_led_blink_proc start led blink
ir_led_blink_proc start led blink
ir_led_blink_proc start led blink
ir_led_blink_proc start led blink
ir_led_blink_proc start led blink
ir_led_blink_proc start led blink
ir_led_blink_proc start led blink
mac:04:02:1f:19:ce:21
1 blocks read: OK

Reserve Memory
    Start Addr:          0x35FFF000
    Bound Addr:          0x3E1F000
    Free  Addr:          0x34E89000
    Alloc Block:  Addr        Size
                  0x34E89000       8192
                  0x34E8C000       3133440
                  0x3518A000       3686400
                  0x3550F000       1658880
                  0x356A5000       8294400
                  0x35E8F000       12288
                  0x35E93000       1048576
                  0x35F94000       212992
                  0x35FC9000       8192
                  0x35FCC000       204800

32768 blocks read: OK
## Starting Secure OS at 0x36000000 ...
## Secure OS Image:
   Header Size: 0x400 (1 KB)
   Kernel Load Addresss: 0x38001000
   Kernel Size: 0xadbd4 (694 KB)
   Task Number: 7
   Task Total Size: 0x141BF0 (1286 KB)
Loading Secure OS ...
================task_addr:0x36000000
uwSCR = 0x600001d3
Set all interrupts to be non-secure
gic_int_num:160
address:f8a01080,value:00000000
address:f8a01080,value:f800ffff
address:f8a01084,value:ffffffff
address:f8a01088,value:ffffffff
address:f8a0108c,value:ffffffff
address:f8a01090,value:ffffffff
GICC_PRIMASK primask 000000f8
GIC_ID_PHY_BASE value 00000000
GIC_IC_PHY_BASE value 00000000
SCU Init
CodeStart = 0x38001000, CodeEnd = 0x38276c00
map_section_entry 2 times l1_index:0x00000382
===map UART Shareable device start==== === === = !!!
===map UART Shareable device ==== === === = !!!
===map Timer Shareable device ==== addr[f8a81000] === === = !!!
===map GIC Shareable device ==== addr[0xFC000000] === === = !!!
===map TZPC Shareable device ==== addr[0xFCA00000] === === = !!!
===map L2 cache registers ==== addr[0xFC100000] === === = !!!
===map suspend registers 1 ==== addr[0xFCC00000] === === = !!!
===map suspend registers 2 ==== addr[0xFCD00000] === === = !!!
intRestore OK 3!
attension please : excute from osTaskInit!!!!!!
osMemSystemInit default pt done 0x00080000
attension please : osSysInit OK!!!!!!
attension please : osHwTmrInit OK!!!!!!
attension please : osSwiInit OK!!!!!!
attension please : osTskInit OK!!!!!!
attension please : osHuntInit OK!!!!!!
attension please : osMsgInit OK!!!!!!
attension please : osSemInit OK!!!!!!
System Security Config... OK!
map_section_entry 2 times l1_index:0x00000f8a
TrustZone enabled...  OK!
map_section_entry 2 times l1_index:0x00000f8a
map_section_entry 2 times l1_index:0x00000f8a
map_section_entry 2 times l1_index:0x00000f8c
map_section_entry 2 times l1_index:0x00000f8c
Create secure mem zone... OK!
Create non-secure mem zone... OK!
Init Cipher driver... OK!
<<<OTP DBG>>> OTP_DRV_ModInit 373: OTP init success!
attension please : before task_func OK!!!!!!
global_task_base=0x36200000
osTaskInit done
os initialization successfully
uwMMUCtrl = 0x00c5187f
have defined OS_STB_HiS40V200
RTOSck start to schedule date: 06-26 Change-Id: IB790
init_map_loader:TASK_ADDRESS=0x36400000 order=0x00000002
internal task[0] load success, task name:task_demo1
init_map_loader:TASK_ADDRESS=0x36800000 order=0x00000002
internal task[1] load success, task name:task_demo2
init_map_loader:TASK_ADDRESS=0x36300000 order=0x00000000
internal task[2] load success, task name:task_demo3
init_map_loader:TASK_ADDRESS=0x36c00000 order=0x00000001
internal task[3] load success, task name:dxwidevine
init_map_loader:TASK_ADDRESS=0x37000000 order=0x00000003
internal task[4] load success, task name:task_QA_TZService
init_map_loader:TASK_ADDRESS=0x37800000 order=0x00000002
internal task[5] load success, task name:task_dxhdcp2
Back to boot
## Succeed to load Secure OS
32768 blocks read: OK
## Booting kernel from Legacy Image at 01ffffc0 ...
   Image Name:   Linux-3.4.67_s40
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    7518304 Bytes = 7.2 MiB
   Load Address: 02000000
   Entry Point:  02000000
   Verifying Checksum ... OK
   XIP Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
===TrustedCore hisik3_init_cache started===
===TrustedCore l2x0_init ok===
<<<CIPHER INFO>>> Cipher_Init 166: Cipher init success!
<<<CIPHER INFO>>> HAL_Cipher_HDCPTxReadEnable 1227: tx_read = 1
<<<CIPHER INFO>>> Cipher_DeInit 173: Do nothing, cipher deinit success!
<<<OTP DBG>>> OTP_Init 395: Do nothing, OTP init success!
<<<CIPHER INFO>>> Cipher_Init 166: Cipher init success!
<<<OTP DBG>>> OTP_DeInit 403: Do nothing, OTP deinit success!
<<<CIPHER INFO>>> Cipher_DeInit 173: Do nothing, cipher deinit success!
<<<OTP DBG>>> OTP_Init 395: Do nothing, OTP init success!
<<<CIPHER INFO>>> Cipher_Init 166: Cipher init success!
<<<OTP DBG>>> OTP_DeInit 403: Do nothing, OTP deinit success!
<<<CIPHER INFO>>> Cipher_DeInit 173: Do nothing, cipher deinit success!

Kernelの起動メッセージは普通に出ていますが、その前のブートローダはARM系でよくあるu-bootではありません。
また、Kernelの前にどうやらTrusted Secure OSというようなものが起動しているようです。
この間、いろいろキーを打ち込んでみたけど反応がありませんでした。

adbから接続した状態では生パーティションの状態を取得することができません。
そのため、以前PSCなどの吸出しで用いたeMMC配線乗っ取り法で別PCからeMMCのデータを読み込んでみることにしました。

そうしたところ、eMMCの内容が参照できましたが、見たところRAWパーティションが鎮座しているだけでした。
いろいろ調べた結果、どうやらeMMC内に普通のパーティションを切っているのではなく、bootargsのパラメータでLinuxから認識されているようです。
blkdevparts=mmcblk0:1M(fastboot),1M(bootargs),2M(reserve1),16M(trustedcore),4M(reserver2),16M(recovery),2M(deviceinfo),8M(baseparam),8M(pqparam),20M(logo),40M(fastplay),16M(kernel),4M(misc),512M(system),16M(drmsfs),512M(cust),256M(cache),-(userdata)

この値を参照して作成したのが以下のパーティションリストです。
1k offset offset(byte) size MB
0 fastboot 0 0 1
1 bootargs 1024 1048576 1
2 reserve1 2048 2097152 2  ( zero filled)
3 trustedcore 4096 4194304 16
4 reserve2 20480 20971520 4 ( zero filled)
5 recovery 24576 25165824 16
6 deviceinfo 40960 41943040 2
7 baseparam 43008 44040192 8
8 pqparam 51200 52428800 8 ( zero filled)
9 logo 59392 60817408 20
10 fastplay 79872 81788928 40
11 kernel 120832 123731968 16
12 misc 137216 140509184 4 ( zero filled)
13 system 141312 144703488 512
14 drmsfs 665600 681574400 16
15 cust 681984 698351616 256
16 cache 1206272 1235222528 256
17 userdata 1468416 1503657984 last

kernel内にはuImage形式のKernel (+cpio.gz initramfs)が入っていました。
ちょっと頑張ってcpio.gzの中身を書き換えて書き戻したところ、Kernelの読み込みメッセージが表示される前に、bootloaderからresetされてしまいました。
また、bootargsの中、bootcmd=mmc read 0 0x36000000 0x2000 0x8000; loadsos 0x36000000; mmc read 0 0x1FFFFC0 0x3B000 0x8000; bootm 0x1FFFFC0
の部分を潰してしまえばbootloaderのコンソールか何かに残れるのではないかと試してみましたが、
この部分がまったく参照されていないような動きをしました。(何を書いておいてもsosの読み込み、起動後に kernelが起動される)
しかし、このパーティションの先頭4バイトがチェックサムなのですが、それが合わないとやはりresetされます。
また、bootcmdを書き換えても動作は変わりませんでしたが、パーティションの識別文字列を書き換えたらやはりresetされました。
どうやら、なにか書き換え防止の仕組みがあるようです。

adbで入って
shell@android:/proc $ cat partitions
major minor #blocks name

179 0 3866624 mmcblk0
179 1 1024 mmcblk0p1
179 2 1024 mmcblk0p2
179 3 2048 mmcblk0p3
179 4 16384 mmcblk0p4
179 5 4096 mmcblk0p5
179 6 16384 mmcblk0p6
179 7 2048 mmcblk0p7
259 0 8192 mmcblk0p8
259 1 8192 mmcblk0p9
259 2 20480 mmcblk0p10
259 3 40960 mmcblk0p11
259 4 16384 mmcblk0p12
259 5 4096 mmcblk0p13
259 6 524288 mmcblk0p14
259 7 16384 mmcblk0p15
259 8 524288 mmcblk0p16
259 9 262144 mmcblk0p17
259 10 2398208 mmcblk0p18
179 16 2048 mmcblk0boot1
179 8 2048 mmcblk0boot0
これだと、eMMC->USBリーダ接続だと認識できないboot0とboot1が表示されますが、

shell@android:/proc $ cat /dev/block/mmcblk0boot0
/system/bin/sh: cat: /dev/block/mmcblk0boot0: Permission denied
この中身は表示できません。
そのため、BeagleBoneBlack等、生のMMC接続を持つ何らかの機器に接続してこのパーティションを覗いてみたいと思います。

まあ、root化したところでそんなに面白いことができるわけではないと思うんですが…

FUSO デジタルCo2/O2チェッカー CD-2IRを分解する

ちょっと業務で使う必要があったのでこいつを調達。

「FUSOデジタルCO2・O2チェッカーCD-2IR」

 ほんとはデジタル出力が出るものがほしかったんだけど、
1プローブでCo2,O2が測れてデジタル出力のあるものが見当たらなかったので
次点でアナログ出力のあるこいつに。

Co2はNDIR,O2はガルバニ電池。
O2のレンジは5%~30%、Co2は0.04~5%。
学校の酸素・二酸化炭素の実験なんかで使うためにウチダのカタログに載ってるような商品で、呼気のレベル(2%~)が計測出来ます。

 

その辺で買える室内環境用のCo2センサは3000ppmとか5000ppmとかまでで、
このレンジのものはあまり売ってないのです。
 

ある程度正確性を要する案件なので、単センサは選定できず。
使う前に構造を知っておきたいのと、今後できればセンサ単体でシステムを作りたいので確認のために分解します。

f:id:honeylab:20200221112133j:plain

 

本体裏表

f:id:honeylab:20200221112253j:plain f:id:honeylab:20200221112302j:plain

 

単三電池4本のほか、AC/DCアダプタで動作可能。
左から電源、アナログ出力、センサプローブ端子

f:id:honeylab:20200221112311j:plain

 

f:id:honeylab:20200221112451j:plain

裏蓋をあけたところ

f:id:honeylab:20200221112556j:plain

内部マイコンボードを外したところ。

f:id:honeylab:20200221112724j:plain

メインマイコンボード。CPUはTOSHIBAのTMP86FM29LUG。

f:id:honeylab:20200221112236j:plain

Co2/O2一体型プローブ。開けてみる。

f:id:honeylab:20200221114150j:plain

f:id:honeylab:20200221114159j:plain

f:id:honeylab:20200221114159j:plain

O2センサは SK-25F アナログ電圧が出力されるタイプ

www.figaro.co.jp

 

Co2センサはsenair.comのもので、型番が読めないけどおそらく5%maxのこいつかな。

senseair.com

こっちはmodbusらしい。

f:id:honeylab:20200221114244j:plain

プローブ基板と本体はVCC/GND/緑/白の4芯でつながってるのでi2cあたりに変換してるのかな?
プローブ基板の裏、写真左側のゲジゲジがたぶんそのマイコン

真ん中のはO2センサの出力(0-10mV)のアンプかと。

 

電源を入れると60秒のウォームアップが。バブルシステムではない。

f:id:honeylab:20200221115018j:plain

ウォームアップ後、そこを外気とみなして21% O2に校正してしまうので、
そうでない環境で電源をON/OFFできないのがちょっとあれ。

Co2は明示的に校正ボタンで400ppm。

 

f:id:honeylab:20200221115154j:plain

 

軽く息を吹きかけてみたところ。約1% Co2。

センサの動作環境としてRH 80%までという要求があるので、
測定空気を盤用除湿器に通したところで測定する、という構造を作ってみる予定。

アナログ出力専用ケーブルを発注し忘れてた…作れるけど、仕事なので買う…

ミルキー味のプロテインがウマイ件について

実はわたくし、今でこそこんなんだけど昔はそこそこ水泳のできるオタクだった時期がありまして、


f:id:honeylab:20200218113211j:plain 

f:id:honeylab:20200218113453p:plain  

 

結構幼少期からプロテインとか飲んでいました(飲まされていた)。

出たての頃のザバスプロテインなんかは溶けも悪く、味も悪く、口の中でベッタベタの癖に粉っぽい、というものが多かったのですが、最近はダイエットや女性人気のおかげでバナナやらココアやら出てきておいしいものも多くなりました。

現代人の食事状況から考えると、特別に運動しなくてもたんぱく質の補給をするためにプロテインは飲んだ方がいいともいわれ、メンタルの安定のために必要とされるトリプトファンなど、アミノ酸の原料となるたんぱく質はできるだけ気楽に取ろうといろいろ試したりしていました。

 

そんななか、嫁が見つけてきたこれ。

ビーレジェンドプロテイン ミルキー味

  

 

パードゥン?

「異色のコラボ!」じゃねぇ

とにかく、甘くておいしい、のが売りの商品のようです

飲んでみましたが…

糞甘いww

イチゴオレのイチゴ抜きぐらいwww

ダイエットで甘いものを制限されるストレスを受けるぐらいなら、
ここで潔く甘いものをとってしまえ、という意気込みのよう。
実際、空腹感はすごく抑えられます。中途半端な甘さにするぐらいならこのぐらいでいいわ。

このメーカのほかの商品を見てみましたが、まぁなんだこのふざけた名前のプロテインたちは。

メロメロメロン風味ってお前はひめめか!!!
かめはめ波風味ってなんだ!!!飲んだ後にかめはめ波出ないか確認しちゃうだろ

f:id:honeylab:20200218114241p:plain

いや、面白いシリーズ見つけたわ。
いわゆる一般的な廉価なプロテインよりは若干割高ですが、
無理なくプロテインを楽しくとる人にはかなりおススメですこれ。

ミルキーは500gからあります。

 

 いや、これまじでおいしい。

 

NEOGEO ASP Unlock All games

!!!! WARNING !!!!!

You may broke your console.
If you wait unlock key from vender , you must wait.
You can this with your spare ASP.

 And I can make the "Unlock All USB" but I am busy for waiting new baby.
So I wrote this article for expert hacker who can use solder iron and Linux.


NEOGEO Arcade Stick Pro - Hidden Games Unlocked

Above game list is TRUTH.ASP has 40 games with hidden 20 games.

 

You can unlock all games with below operations,

but you will be rejected from repair service.

 

 

1.Open console.

f:id:honeylab:20191113140442j:plain

2.Take out the PCB from case and remove steel shield cover.

f:id:honeylab:20191113141114j:plain

3.Short "R44" pad for enable UART signal.

f:id:honeylab:20200108015807p:plain

f:id:honeylab:20200108020013p:plain

4.Connect to PC with USB-UART(3.3V level) converter.

"-" to "GND" , ASP "Rx" to PC "TX" , ASP "Tx" to PC "RX"
And set terminal 115200bps,8bit,None.

If connection OK and turn ASP power on , you could see bootup log on terminal.

f:id:honeylab:20200108020242p:plain

 

"root@snk:/ #" is linux terminal with root.

if you cannnot serial "root@snk:/" or hit [Enter] or check connection.

you type command and hit [enter].command line is "one line" if you see separate line.

and put linux expert on your side.

5. change current directory to mod

root@snk:/ # cd /mnt/vendor/res/local

root@snk:/mnt/vendor/res/local

6.check your filesystem

root@snk:/mnt/vendor/res/local # ls -la
drwxrwxrwx root root 2019-10-16 10:20 English
drwxrwxrwx root root 2011-01-01 22:33 Japanese
drwxrwxrwx root root 2019-10-16 10:20 Korean
drwxrwxrwx root root 2019-10-16 10:20 Simplified_Chinese
drwxrwxrwx root root 2019-10-16 10:20 Traditional_Chinese
-rwxrwxrwx root root 834240 2019-10-16 10:21 default.ttf
-rwxrwxrwx root root 186 2019-10-16 10:21 lang_array.ini

7.Enter "Japanese" locale

 I'm using Japanese Game List, if you are not , select "English" or "Korean"...

root@snk:/mnt/vendor/res/local # cd Japanese/

8.See to check the filelist.

root@snk:/mnt/vendor/res/local/Japanese # ls -la
-rwxrwxrwx root root 332 2019-10-16 10:21 copyright.ini
-r-xr-xr-x root root 1745776 2019-10-16 10:21 font.ttf
-rwxrwxrwx root root 229 2019-10-16 10:21 game_type.ini
-rwxrwxrwx root root 2418 2011-01-01 08:45 games.ini
drwxrwxrwx root root 2019-10-16 10:20 help
-rwxrwxrwx root root 2116 2019-10-16 10:21 lock.ini
-rwxrwxrwx root root 1922 2019-10-16 10:21 strings.ini

 "games.ini" is list of default 20 games.
"lock.ini" is list of unlocked hidden 20 games.
if you want to get hidden list, type "cat lock.ini"

9.remount filesystem for modify.

root@snk:/mnt/vendor/res/local/Japanese # mount -o rw,remount /mnt/vendor

 10.make backup before mod

root@snk:/mnt/vendor/res/local/Japanese # cp games.ini games_org.ini

 11.combine "games.ini" and "lock.ini" , and write-out to "games_unlock.ini"

 

root@snk:/mnt/vendor/res/local/Japanese # cat games.ini lock.ini > games_unlock.ini

12.re-check file list.
root@snk:/mnt/vendor/res/local/Japanese # ls -la
-rwxrwxrwx root root 332 2019-10-16 10:21 copyright.ini
-r-xr-xr-x root root 1745776 2019-10-16 10:21 font.ttf
-rwxrwxrwx root root 229 2019-10-16 10:21 game_type.ini
-rwxrwxrwx root root 2418 2011-01-01 08:45 games.ini
-rwxrwxrwx root root 2418 2011-01-01 22:32 games_org.ini
-rwxrwxrwx root root 4534 2011-01-01 22:33 games_unlock.ini
drwxrwxrwx root root 2019-10-16 10:20 help
-rwxrwxrwx root root 2116 2019-10-16 10:21 lock.ini
-rwxrwxrwx root root 1922 2019-10-16 10:21 strings.ini

confirm "games_unlock.ini" size has sum of "games.ini" and "lock.ini" bytes.

12.Do MOD. overwrite "games.ini"

root@snk:/mnt/vendor/res/local/Japanese # cp games_unlock.ini games.ini

13.confirm  your filesystem

root@snk:/mnt/vendor/res/local/Japanese # ls -la
-rwxrwxrwx root root 332 2019-10-16 10:21 copyright.ini
-r-xr-xr-x root root 1745776 2019-10-16 10:21 font.ttf
-rwxrwxrwx root root 229 2019-10-16 10:21 game_type.ini
-rwxrwxrwx root root 4534 2011-01-01 22:33 games.ini
-rwxrwxrwx root root 2418 2011-01-01 22:32 games_org.ini
-rwxrwxrwx root root 4534 2011-01-01 22:33 games_unlock.ini
drwxrwxrwx root root 2019-10-16 10:20 help
-rwxrwxrwx root root 2116 2019-10-16 10:21 lock.ini
-rwxrwxrwx root root 1922 2019-10-16 10:21 strings.ini

 

14. reboot and ....

root@snk:/mnt/vendor/res/local/Japanese # reboot

40 games will be shown.
If your console is not Japanese region , some file's size must be difference.
But same operation will make your console be unlocked.

 

 

NEOGEO Arcade Stick Pro system update detail

NEOGEO ASP stock ui has mechanism for system update.

If on booting up, update.bin and update_desc.ini are placed on / of NAND,
update.bin has called with execv.

With placing "update.img" on USB stroage and insert to ASP , and select "System Update" will place these file onto NAND and reboot.

Next boot will run update working.

 

update.img is legacy zip format.

(it is some special , I could not make zip with WinZip,but open...)

f:id:honeylab:20200107100536p:plain

Update.img(zip) has least two files "[somedir]/update.bin" and "[somedir]/update_desc.ini".

And it must be set password "xugameplay-snk"

 

update.bin is normal ELF executable binary or any.

update_desc.ini likes below.

 #Template
[VERSION]=<v1.0>
[VERSION_CODE]=<1911180932>
[PUBLISH_TIME]=<2019.11.18>
[DESCRIPT]=<Do packed script which execute USB/command.sh>
[LAUNCHER_NAME]=<Honeylab World>
[LAUNCHER_PATH]=</mnt/data/honeylab/command>
[INJECT_PATH]=</mnt/data>
[CRC]=<2904145815>

This update_desc.ini is testing , but it will work with more test.

stock UI's "system update" supports not only game unlock but any works.

NEOGEO Arcade Stick Pro cdkey file format for game unlocking.

・Unlock CD-Key system

Vendor already provided CD-Key files for unlocking two Games.
cdkey zip is contain cdkey/[GAME_TITLE].cdk file.
This hexdumps are METAL_SLUG.cdk and METAL_SLUG2.cdk.

f:id:honeylab:20200105230043p:plain

44 bytes from start are id and check header.Their two cdk file are same binary .

First 4bytes little endian 32-bit is length of least bytes = 0x 00 00 01 28 = 296(dec) bytes.
Next 32bit int is count for something 4byte values : and values[0]=0x00000100

least 0x20 =32(dec)bytes is MD5 encoded data from some data.

 value is [ e3251075554389fe91d17a794861d47b ]

least 0x100 bytes are encrypted cdk file.

openssl can decrypt this data stream.

because stock executable contains a secret key for decrypt them.

f:id:honeylab:20200105231527p:plain

snk $ openssl rsautl -decrypt -inkey snk.pem -in encrypted.dat -out decrypted.dat
snk $ cat decrypted.dat
[SN_NO]=<FFFFFFFFFFFFFF>
[CDKEY]
[ID]=<27>
[NAME]=<mslug>
[CDKEY/]
[ENCRYPT]=<850b405b3dcdaa1543309ad09e1a7f76>

this stream make order unlocking "mslug ,ID 27" to stock system.

openssl can re-generate public key for encrypt cdk file.
so in logically , we can generate cdkey file for unlock other games.

 

 

第二回 技術書同人誌博覧会に出展します

gishohaku.dev

(技書博本編へ 11:00~13:59 に来場される場合には事前予約(無料)が必要です。 14:00 以降は予約なしで入場いただけます)

※予約時間帯は満員となっています。現時点で予約されていない方は14:00以降の入場とのことです。

サークルページはこちらです

gishohaku.dev

既刊2冊と新刊「メガドライブミニのひみつ」を頒布します。

Image
価格はいずれも¥1000となっています。

今回、子連れでの参加となるため予期せぬ早期店じまいや
休憩中座ががある可能性があります。

在庫全部数持ち込みではなく、なんとなくの数量を搬入します。
万が一現地で品切れの際は通販をご案内させていただきます。

 あらかじめご購入を検討の際には twitterなどで一声かけていただけると目安になりますのでご検討ください。

 

家庭の事情により次回の技術書典はお休みにしました。
もしblogの読者、Twitterのフォロワーさんいましたら是非お声がけください。