The worst penalty is expedited removal (deportation), if the CBP officer deems that you have abandoned your residence. However, as a green card holder you have more rights than a tourist, you are actually entitled to a hearing before an immigration judge.Unscrupulous officers sometimes pressure you to sign the I-407 form, which shows voluntary abandonment of permanent resident status. If you have no intention of surrendering your green card, do not sign the form. All they can do after that is serve you with a Notice to Appear in immigration court.It's becoming more common for the border agent to demand access to your phone and all of your social media accounts. The Supreme Court has held that searches at the border are an acceptable exception to the 4th amendment. However, it has not ruled on the specific legality of searching your entire life history stored in your phone. So, as a general rule, you don't want anything in your phone that should not be available to the government. If you refuse to unlock your phone, it can be detained for an undeterminate amount of time.