As the title, where can I get the source code of the recovery mode? And how can I flash the recovery mode firmware into xavier?
Recovery mode does not change the Jetson directly. There is no source code per se. When in recovery mode the Xavier shows up as a device instead of a host, and another host will see this device over USB. The driver package (which is part of both JetPack and the SDK Manager) understands how to talk to the Xavier when in recovery mode. Unless the driver package actually runs (such as via the SDK Manager GUI), then nothing happens. Recovery mode is used only when flashing is performed, and not any other time (such as package install…which occurs when not in recovery mode).
As to the firmware or content which actually goes on inside the Xavier when in recovery mode, this is not published. So if you are actually looking for what is loaded during recovery mode, then you are out of luck.