EliasKotlyar / Monsieur-Cuisine-Connect-Hack

166 stars 21 forks source link

MC App alternatives #31

Open Condorello opened 2 years ago

Condorello commented 2 years ago

Hi, anyone is working on the rev. engineering of the MC App itself? The real plus IMHO is not to run other android app on a ktichen robot, but hack the app to load custom recipes and access other database (bimby?) The app itself is just a step-by-step flow with the addition of 3-4 command to the robot: start cooking (with temp?), turn blades right/left (with RPM), with timers. If we will find the commands to do this step it could also be possible to write a whole new kitchen app with custom recipes database!

Someone can extract the MC2 apk file and upload somewhere?

1101011-xyz commented 2 years ago

@Condorello Here's the latest APK for the MC3 (Monsieur Cuisine Smart): https://1101011.xyz/com.tecpal.device.mc30/files/1.2.13.4/base.apk

kkoscielniak commented 2 years ago

@1101011-xyz

I was wondering if it's possible to access what recipes are installed there. Unfortunately the only .db file that is kept at base.apk (unzipped)/res/raw/tgi.db is encrypted.

1101011-xyz commented 2 years ago

@kkoscielniak: Here it is decrypted: https://1101011.xyz/files/tgi.db

tgi.db is encrypted using SQLCipher and the encryption key is the MD5 hash of the last 29 characters of the SHA-1 APK signature.

There's also an API for fetching other recipes from the MC server.

Silence32 commented 2 years ago

@1101011-xyz is it possible to use the mc3 app from the smart variant on the connect variant?

1101011-xyz commented 2 years ago

@Silence32 I haven't tried, it's possible that the CPU architecture will be a problem (32 bit vs 64 bit: Mediatek MT6580 vs Mediatek MT8167). There might be some difference with available temperature ranges and motor speeds.

Alex-Z96 commented 2 years ago

@Silence32 I haven't tried, it's possible that the CPU architecture will be a problem (32 bit vs 64 bit: Mediatek MT6580 vs Mediatek MT8167). There might be some difference with available temperature ranges and motor speeds.

My MC3 has restarted indefinitely...Do you have a backup file?I hope to recover through SP Flash Tool. Or do you have a correct scatter file?

GiGaLoBo commented 2 years ago

Hi,

I have the same request than Alex-Z96 : anyone that could help ?

bobstar-fr commented 2 years ago

Hello You want a restoration file! You didn't create it at the beginning of your MCC harck! This is a serious error, the warnings are well written!

GiGaLoBo commented 2 years ago

Hi bobstar-fr,

MC3 has different & undocumented so far partition table / scatter file, this github is only about MC2. My readback is not working properly so impossible to create a full backup .. but preloader/boot/recovery are good at least. I was able to create the proper scatter file with the correct tools, if all successfull for the hack, I'll document it

1101011-xyz commented 2 years ago

MC3 EMMC + Boot1 + Boot2 (3.6 GB - available for 24 hours): https://wormhole.app/qn42E#sydceHUAnWYt89I3ha21hQ

Some technical info available here: https://1101011.xyz/lidl-monsieur-cuisine-smart/index.html

I don't have a scatter file but here are some elements that may help:

$ fdisk -l emmc-2022-05-30.img
Disk emmc-2022-05-30.img: 14.56 GiB, 15634268160 bytes, 30535680 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 00000000-0000-0000-0000-000000000000

Device                   Start      End  Sectors  Size Type
emmc-2022-05-30.img1      1024     7167     6144    3M Microsoft basic data
emmc-2022-05-30.img2      7168    17407    10240    5M Microsoft basic data
emmc-2022-05-30.img3     17408    37887    20480   10M Microsoft basic data
emmc-2022-05-30.img4     37888    58367    20480   10M Microsoft basic data
emmc-2022-05-30.img5     58368    58879      512  256K Microsoft basic data
emmc-2022-05-30.img6     58880    59647      768  384K Microsoft basic data
emmc-2022-05-30.img7     59648    60415      768  384K Microsoft basic data
emmc-2022-05-30.img8     60416    93183    32768   16M Microsoft basic data
emmc-2022-05-30.img9     93184   125951    32768   16M Microsoft basic data
emmc-2022-05-30.img10   125952   126975     1024  512K Microsoft basic data
emmc-2022-05-30.img11   126976   143359    16384    8M Microsoft basic data
emmc-2022-05-30.img12   143360   176127    32768   16M Microsoft basic data
emmc-2022-05-30.img13   176128   995327   819200  400M Microsoft basic data
emmc-2022-05-30.img14   995328  1015807    20480   10M Microsoft basic data
emmc-2022-05-30.img15  1015808  1017855     2048    1M Microsoft basic data
emmc-2022-05-30.img16  1017856  1028095    10240    5M Microsoft basic data
emmc-2022-05-30.img17  1028096  1038335    10240    5M Microsoft basic data
emmc-2022-05-30.img18  1038336  1042431     4096    2M Microsoft basic data
emmc-2022-05-30.img19  1042432  1046527     4096    2M Microsoft basic data
emmc-2022-05-30.img20  1046528  1114111    67584   33M Microsoft basic data
emmc-2022-05-30.img21  1114112  5308415  4194304    2G Microsoft basic data
emmc-2022-05-30.img22  5308416  5922815   614400  300M Microsoft basic data
emmc-2022-05-30.img23  5922816 22708223 16785408    8G Microsoft basic data
emmc-2022-05-30.img24 22708224 30501887  7793664  3.7G Microsoft basic data
emmc-2022-05-30.img25 30501888 30534655    32768   16M Microsoft basic data

scatter.txt extracted from /data/com.discovery.systemupdate/files/LocalSdUpdate.zip:

preloader 0x0
pgpt 0x0
proinfo 0x80000
nvram 0x380000
protect1 0x880000
protect2 0x1280000
seccfg 0x1c80000
lk 0x1cc0000
lk2 0x1d20000
boot 0x1d80000
recovery 0x2d80000
para 0x3d80000
logo 0x3e00000
odmdtbo 0x4600000
vendor 0x5600000
expdb 0x1e600000
frp 0x1f000000
tee1 0x1f100000
tee2 0x1f600000
kb 0x1fb00000
dkb 0x1fd00000
metadata 0x1ff00000
system 0x22000000
cache 0xa2000000
apd 0xb4c00000
userdata 0x2b5000000
flashinfo 0xFFFF0084
sgpt 0xFFFF0004
GiGaLoBo commented 2 years ago

Hi 1101011-xyz,

Thank you for your contribution. Here joined the scatter file that I could generate with my partial readback, with the WwR tool. Mediatek M8167 seems to have SLA/DAA protection when downloading (flashing), couldn't be able to flash the "boot" partition with the recovery yet on MC3 ... still working on it.

MT8167_Android_scatter-MC3.txt

Alex-Z96 commented 2 years ago

MC3 EMMC + Boot1 + Boot2 (3.6 GB - available for 24 hours): https://wormhole.app/qn42E#sydceHUAnWYt89I3ha21hQ

Some technical info available here: https://1101011.xyz/lidl-monsieur-cuisine-smart/index.html

I don't have a scatter file but here are some elements that may help:

$ fdisk -l emmc-2022-05-30.img
Disk emmc-2022-05-30.img: 14.56 GiB, 15634268160 bytes, 30535680 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 00000000-0000-0000-0000-000000000000

Device                   Start      End  Sectors  Size Type
emmc-2022-05-30.img1      1024     7167     6144    3M Microsoft basic data
emmc-2022-05-30.img2      7168    17407    10240    5M Microsoft basic data
emmc-2022-05-30.img3     17408    37887    20480   10M Microsoft basic data
emmc-2022-05-30.img4     37888    58367    20480   10M Microsoft basic data
emmc-2022-05-30.img5     58368    58879      512  256K Microsoft basic data
emmc-2022-05-30.img6     58880    59647      768  384K Microsoft basic data
emmc-2022-05-30.img7     59648    60415      768  384K Microsoft basic data
emmc-2022-05-30.img8     60416    93183    32768   16M Microsoft basic data
emmc-2022-05-30.img9     93184   125951    32768   16M Microsoft basic data
emmc-2022-05-30.img10   125952   126975     1024  512K Microsoft basic data
emmc-2022-05-30.img11   126976   143359    16384    8M Microsoft basic data
emmc-2022-05-30.img12   143360   176127    32768   16M Microsoft basic data
emmc-2022-05-30.img13   176128   995327   819200  400M Microsoft basic data
emmc-2022-05-30.img14   995328  1015807    20480   10M Microsoft basic data
emmc-2022-05-30.img15  1015808  1017855     2048    1M Microsoft basic data
emmc-2022-05-30.img16  1017856  1028095    10240    5M Microsoft basic data
emmc-2022-05-30.img17  1028096  1038335    10240    5M Microsoft basic data
emmc-2022-05-30.img18  1038336  1042431     4096    2M Microsoft basic data
emmc-2022-05-30.img19  1042432  1046527     4096    2M Microsoft basic data
emmc-2022-05-30.img20  1046528  1114111    67584   33M Microsoft basic data
emmc-2022-05-30.img21  1114112  5308415  4194304    2G Microsoft basic data
emmc-2022-05-30.img22  5308416  5922815   614400  300M Microsoft basic data
emmc-2022-05-30.img23  5922816 22708223 16785408    8G Microsoft basic data
emmc-2022-05-30.img24 22708224 30501887  7793664  3.7G Microsoft basic data
emmc-2022-05-30.img25 30501888 30534655    32768   16M Microsoft basic data

scatter.txt extracted from /data/com.discovery.systemupdate/files/LocalSdUpdate.zip:

preloader 0x0
pgpt 0x0
proinfo 0x80000
nvram 0x380000
protect1 0x880000
protect2 0x1280000
seccfg 0x1c80000
lk 0x1cc0000
lk2 0x1d20000
boot 0x1d80000
recovery 0x2d80000
para 0x3d80000
logo 0x3e00000
odmdtbo 0x4600000
vendor 0x5600000
expdb 0x1e600000
frp 0x1f000000
tee1 0x1f100000
tee2 0x1f600000
kb 0x1fb00000
dkb 0x1fd00000
metadata 0x1ff00000
system 0x22000000
cache 0xa2000000
apd 0xb4c00000
userdata 0x2b5000000
flashinfo 0xFFFF0084
sgpt 0xFFFF0004

I missed the 24-hour file you shared. Could you please send the link again?

1101011-xyz commented 2 years ago

I missed the 24-hour file you shared. Could you please send the link again?

MC3 EMMC + Boot1 + Boot2 (3.6 GB - available for 24 hours): https://wormhole.app/QOQxB#gSUurzzzN-m6MFTSC7snWQ LocalSdUpdate.zip: https://wormhole.app/ml63e#5MRbIRe8a1M9lOopz4eldQ

Alex-Z96 commented 2 years ago

I missed the 24-hour file you shared. Could you please send the link again?

MC3 EMMC + Boot1 + Boot2 (3.6 GB - available for 24 hours): https://wormhole.app/QOQxB#gSUurzzzN-m6MFTSC7snWQ LocalSdUpdate.zip: https://wormhole.app/ml63e#5MRbIRe8a1M9lOopz4eldQ

Thanks for your sharing! I'll try burning these system files.

GiGaLoBo commented 2 years ago

Worked for me ; thanks again 1101011-xyz !!!

TWRP recovery file provided in this github doesn't work with MC3 (quite logical because different chipsets), found a tool to create some but the output is too big ... working around this

1101011-xyz commented 2 years ago

Discord server for discussing MC2 and MC3 hacks and more: https://discord.gg/Npr3F3JR6t

MrFreez198738 commented 1 year ago

@1101011-xyz have you the same files but for the MC2? thx

1101011-xyz commented 1 year ago

Hi @MrFreez198738, sorry I don't have an MC2.

alexanderadam commented 7 months ago

In the meantime there appeared a project called ReVanced that is able to patch functionality into other apps or remove unwanted functionalities. It seems that nobody asked for MCC patches yet though. ReVanced gives a nice user experience for patching the APK.

But of course disassembling (i.e. with apk.sh) and creating patches is still a manual task then.