The contents of your cellphone may not be as private as you think if you're planning to cross the border, civil liberties groups are warning the public.

Recent data shows border guards are checking phones more often than they used to. Numbers provided to CTV News by the Canada Border Service Agency suggested 9,300 people had their phones checked between November and July of this year.

CBSA says examining electronics is not routine, and is done only under certain circumstances.

But many may not know what to do when they find themselves in those circumstances, prompting the BC Civil Liberties Association to publish a guide for what border crossers need to know when asked to hand over their phones.

"The public really doesn't know what their rights are and they don't know what to expect," BCCLA's Meghan McDermott said Wednesday.

Can I refuse to give my password?

CBSA officers are allowed to do a cursory search to look at things that already exist on the phone, such as photos and video.

McDermott advised the first thing someone asked for their phone should do is ask whether they have to provide their password.

"Hopefully they say no, but for the most part, we think they're going to say yes," she said.

"Under the law, all these devices just count as goods, just like a briefcase or a pair of shoes, everything for grabs under the law."

Those who refuse risk losing access to their device, possibly for months. The BCCLA says there is uncertainty surrounding whether a person is legally obligated to unlock their phone, but that in the past, CBSA has been able to arrest or threaten to arrest someone who refuses.

McDermott said up until recently they could arrest someone, but the policy was directing officers not to enforce that.

"The most recent version of the policy we've seen, dated from December of last year, that's no longer in there. It doesn't say anything," she said.

"It's very ambiguous as to what to expect."

Failing to provide a password can also increase suspicions and result in denial of entry into Canada.

Hindering or obstructing a CBSA officer is an offence that can come with fines up to $50,000 or up to five years in prison.

What are the rules when crossing into the U.S.?

The CBSA rules are similar to those heading into the States: Officers don't need a warrant or even to prove reasonable suspicion to look at a phone.

"In U.S. secondary inspection I frequently see U.S. officers going through Canadians' cellphones," immigration lawyer Len Saunders said.

"There's a lot of information on people's phones… I think it's a useful tool for Canadian and U.S. officers if they want to dive into someone's background, business or personal, it's on their phone."

Saunders said people are required to hand over their phones, but cannot be forced to give out their passwords.

"If you don't mind an officer going through your phone, co-operate. If there's something in your phone you don't want them to read, you can politely decline," he advised.

Saunders said typically American officials will seize phones for five days, then they have to give them back.

However, he cautioned that Canadian citizens who are not co-operating or who are seen as obstructing a U.S. officer's inspection on Canadian soil could be subject to two years in jail.

What are border guards looking for?

Saunders said border guards can spend hours going through phones, looking at texts, emails and photos.

"They're looking for evidence. Someone who has used drugs, working illegally,… quite often they find info that leads to Canadians being barred from the U.S.," he said.

The BCCLA's handbook, which is available for download online, says the CBSA's phone searches must be limited to identifying the person, finding documents relevant to admissibility, or evidence of offences such as human trafficking.

"Front-line officers conduct initial searches of the contents of your device by browsing images, videos and files," the handbook says.

"This is meant to be a cursory look at the contents to determine that they do not contain contraband – such as child pornography or hate literature – or evidence of a crime. Initial searches can be random or targeted."

Why was I chosen, and who has access to my data?

Most people searched are not chosen at random, but instead based on information in travellers' databases and other indicators.

Officers should not carefully read every document or try to look at every photo on a phone, but instead should look at contents only long enough to settle their suspicions about a violation of a customs or immigration law. During the search, they should put the phone on airplane mode.

However, information found during the initial search may be used to justify a more detailed examination, the handbook says. In event of a detailed search, the phone will be taken away and/or copies will be made of the contents of the device. The copies are deleted after the investigation is complete, the CBSA said, but information can be shared with other government and security agencies.

What can I do to avoid a cellphone search?

The BCCLA advises those who are worried to leave their phone at home if possible, and to securely delete data they don't need to travel with. Require a strong password to log in, the handbook advises, make backup copies of data and put confidential documents in their own folder.

The handbook also suggests turning off computers before crossing the border, and using two-factor authentication and full-disk encryption.

What should I do if my phone was unfairly searched?

If a member of the public thinks their search was improper, but the complaint is not about discrimination or an invasion of privacy, they can file a complaint to the CBSA itself. In the event of a device being seized, or the issue of a penalty or fine, the affected person can request a review of the decision.

Those who believe they were discriminated against can file a complaint with the Canadian Human Rights Commission, and invasions of privacy can be filed with the Office of the Privacy Commissioner of Canada.

With a report from CTV Vancouver's Sheila Scott