“Take your sandals off of your feet.” This is harkening back to Exodus 3:5, when the angel said the same thing to Moses. Joshua is now standing in Moses’ place as the leader of Israel.
“And Joshua did so.” This short statement continues the theme of Joshua as the obedient servant of Yahweh. He obeyed what Yahweh said, and he obeyed what Yahweh’s messengers said (see commentary on Josh. 4:16).