The design of the M365 folding mechanism is severely flawed. After a fair amount of riding, it predictably fails and can cause serious injury. While we do get what we paid for, luckily this is a known issue and is pretty straightforward to address with two improvements.
The hook or latch is the small curved piece with a bolt head in the middle. It's visible from the front of the whole mechanism, and is what hooks into the groove when pushing in the locking lever. This component is too thin and cracks in half. The hinge bolt is what the whole stem pivots on. It's the main axis and obviously a critical part. The stock version can shear off at the groove toward the middle.
I've listed some sources for an improved replacement for each in Getting Started with the Xiaomi Mijia M365.
How to replace the hook
So you have your replacement parts. Before you can put them in, turns out you have to remove the old ones! The hinge bolt easily comes out via a metric hex key but the hook requires a little extra attention.
- 5mm punch
- 5mm (around 3/16) drill bit
The manufacturer probably inserted the steel pin holding it in place hydraulically. That means it's really in there. It didn't even budge with my initial attempt with the hammer and the punch.
Start by propping the front of the scooter up on a bench or something and anchor the back wheel against the floor. The goal is to have downward momentum on the broken hook. Then drill 3 holes into the hook directly inline with the pin. Because the pin is held only by the hook and not the part it's anchored to, this turned out to be the secret to greatly reducing friction and freeing it.
Aim to drill into the aluminum and not the steel pin. You can hit the pin but stop as soon as you can. Don't go all the way through it. The improved hook designs all come with a new pin anyway, but you still want the old one loosened and not broken to keep it as a solid piece to extract.
With your holes drilled, another pass with the punch should take it out without issue. Prop up the base of the stem with a wood block and hammer it on a hard surface such as concrete. Avoid supporting the part you're striking with any other part of the stem, or you may damage it.
Take note that the pin slightly tapers on one side. I found the pin was inserted from the left side, facing forwards on the scooter. That means you'll want to strike from the right side. If you look carefully at each pin end, you will notice one is slightly smaller than the other. That's the side you want to pound. See the photo of this pin above.