What should black people do?...
My answer to this is simply the same as what white people should do. If an officer makes a request asking someone to get out of a vehicle, put hands in the air or show documents, then that person should comply and minimise any risk of having a weapon drawn on him/her. Do not allow negative body language to give rise to suspicion or make any sudden irregular, jerky movements that may give the wrong impression.
Obviously, there are going to be situations where the police get it wrong, sometimes where the officer is believed to be at serious risk of harm.
So, there is very little a suspect can do to avoid the scenarios referred to. The question is more relevant to what the law enforcement agencies can do to avoid repetition.
It could be that officers require further training or techniques to avoid a situation escalating. Or, the police could meet and work with certain groups to explain better their actions and work towards improved relations and enhance their reputation. Disciplinary procedures should be robust and where a serious breach has occurred then officers should be accountable.
These incidents seem to be avoidable but where there is a case to answer they should be vigorously investigated and appropriate action taken.