The nation’s major mobile carriers have amassed a treasure trove of sensitive data on their customers that they share with police and advertisers — but keep hidden from the consumers themselves.

The major carriers, AT&T, Sprint, T-Mobile and Verizon, store who you texted, the content of texts and locational tracking information such as cell-site data, which identifies the cell tower to which a customer was connected at the beginning of a call and at the end of the call. Different companies hold your data for different times. Sprint hoards information the longest, according to a Justice Department survey, keeping your call records for an average of 18-24 months.

But, according to a survey by Pro Publica, the major carriers won’t disclose the data to their customers, for a host of reasons — nonsensical ones at best. But they will gladly hand it over to the authorities, even without warrants.

The survey comes as the government is increasingly looking to use cell-site data to bolster prosecutions in the aftermath of a Supreme Court ruling that said the government must obtain a warrant to affix a GPS device to track a vehicle’s every move.

The justices said a warrant was necessary to affix the device to the vehicle. So, in response, the authorities claim they may obtain the data from a target’s mobile phone, without a warrant, because Americans have no expectation of privacy in their public movements. Courts have been going along, even before the high court’s January decision.

When defeating California legislation this year that would force the mobile carriers to publicly report the number of times they turn over cell phone location information to police and federal agents, they successfully argued that such a plan would be too burdensome, and would take time away from the important work of sharing customer data with cops “day and night.”

T-Mobile declined comment on the Pro Publica survey. But AT&T said giving customers their data “is not a service we provide.”

Sprint said it doesn’t do it “for privacy reasons.”

That answer sounds familiar to a claim made last week by the Obama administration, which said it would violate Americans’ privacy if it informed the public on how many times it spied, without warrants, on Americans’ electronic communications under the FISA Amendments Act.

Verizon said it would provide your data to the cops “but not directly to you.”

All of the carriers’ terms of service note that your data is being used to serve targeted ads “from their own services or from outside companies,” Pro Publica reported.