Corrected entry: William is taking a scan of his own brain in the bathroom to try to upload into the robot body, about half way through the film. Later in the film to undermine Jones, he uploads this scan into the robot to give himself a strong ally in the fight who turns the tables. However this Robot William had the brain scan taken that was uploaded into it long before William knew that Paul was turning on him and going to kill his cloned family, which caused the real William to have a near mental break down and fall apart. When the robot William comes in, he's already in on the plan and starts kicking but to get the family back and is about to kill Jones. But there's no way this older brain scan would have reacted this way going into this situation.
Quantom X
9th Oct 2019
Correction: It is shown that it is quite trivial for William to change aspects of those scans. As he was rebuilding his algorithm for the robots to function, he could have added something to the brain scan that indicated his family was in danger in the other room. Jones was watching, but obviously not very well as he was not expecting the robot to activate (he was just expecting William to rebuild the code, not upload it). He had the access and the time, and nobody in the room would have known.
oldbaldyone