The most important phrase to remember and repeat is: “I will remain silent. I want to speak with an attorney.”
App to Let Friends and Family Know You are Getting Arrested
Apps for Law Enforcement Encounters
What To Do If You Are Stopped By The Police
What To Expect When You Are Arrested
What To Expect At Your First Court Appearance
What To Do If You Are Stopped By Immigration Officials
A collection of other know-you-rights material and here as well.