Author Topic: Canon EOS 70D - SD card locked  (Read 686 times)

utigaard

  • Just arrived
  • *
  • Posts: 1
Canon EOS 70D - SD card locked
« on: December 26, 2017, 09:32:26 PM »
Hello, im not sure if this is the correct place to put this, but i'll give it a go. I've googled for the last month and have found nothing to help me. Canon here in Norway wants 300 euro to change out the sd slot. I was wondering if there was a way to use ML to just ignore the SD lock sensor. I would change it but I will have to wait for parts, and im not too keen to open the camera without exhausting every option. I'm just looking for a way ignore the sensor. Any replies will be appreciated.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 11211
  • 5D Mark Free
Re: Canon EOS 70D - SD card locked
« Reply #1 on: December 27, 2017, 08:09:52 AM »
Should work by patching FF0C4574 from 0x0A00000B to 0xEA00000B (string: "[STARTUP] WriteProtect (%#x)").

The 70D branch already includes the patch manager, so I believe this should work:

Code: [Select]
patch_instruction(0xFF0C4574, 0x0A00000B, 0xEA00000B, "WriteProtect");

This should go right before calling Canon's init_task, e.g. starting from the 70D_merge_fw112 branch:

Code: [Select]
diff -r d048d8447fa3 src/boot-hack.c
--- a/src/boot-hack.c
+++ b/src/boot-hack.c
@@ -41,6 +41,7 @@
 #include "reloc.h"
 #include "ml-cbr.h"
 #include "backtrace.h"
+#include "patch.h"
 
 #if defined(FEATURE_GPS_TWEAKS)
 #include "gps.h"
@@ -756,6 +757,8 @@
         }
     }
 
+    patch_instruction(0xFF0C4574, 0x0A00000B, 0xEA00000B, "WriteProtect");
+
     // memory check OK, call Canon's init_task
     int ans = init_task_func(a,b,c,d);

Tested in QEMU (comment out "case 0x0168" from eos_handle_gpio in eos.c to simulate the WriteProtect switch being enabled). Not sure if the MPU also watches this switch (hopefully not) - will test later on 5D3.

edit: seems to work (5D3.113: 0xFF0C43C4)

Walter Schulz

  • Hero Member
  • *****
  • Posts: 6007
Re: Canon EOS 70D - SD card locked
« Reply #2 on: December 27, 2017, 08:44:01 AM »
If a1ex's hack doesn't work you may want to contact a mobile phone repair shop (with a good reputation ...). They might be able to replace this part without much hassle and with a lower price tag attached.