The legality of certain phone modifications in the United States, particularly those that allow phones to be used on wireless carriers for which they weren't originally intended, is currently on a congressional see-saw. Every three years, the Librarian of Congress has to approve or extend an exemption of the infamous Digital Millennium Copyright Act (DMCA) to allow or deny consumers the right to unlock (read: carrier unlock, and in some cases rooting/jailbreaking, but not unlocking bootloaders) their phones by circumventing digital rights management. Congress let the exemption slide earlier this year - read the gory details here.  Now a new bill has been entered that, if passed, would grant a permanent exemption to the DMCA for carrier unlocking, among other things. The Electronic Frontier Foundation has an exhaustive write-up of House Resolution 1892, the "Unlocking Technology Act," which they've given their initial support.

HR 1892 focuses on three things: one, re-defining the definition of DRM "circumvention" in the DMCA to cover only those exploits that specifically allow copyright infringement. So the DMCA would still make it illegal to pirate a video game via a cracked licensing tool, but unlocking or rooting your legally-acquired phone would be permissible, even if it means technically violating software copyright. The first provision of the bill also calls for a review of the DMCA in general, and section 1201 (the one which punishes copyright protection circumvention) in particular.

Second, HR 1892 calls for a permanent DMCA exemption for carrier-based phone unlocking, with or without the carrier's approval. This would put an end to the three-year cycle of congressional approval and renewal by adding this particular exemption to a list of permanent DMCA section 1201 exceptions. It also covers the tools used for carrier unlock, and makes them legal - again, under the somewhat nebulous definition of non-infringing DRM circumvention. The relevant portion of the bill is quoted below.

18 SEC. 3. NETWORK SWITCHING NOT INFRINGEMENT.

Section 117 of title 17, United States Code, is amended by adding at the end of the following new sub-section:

(e) NETWORK SWITCHING.—Notwithstanding the provisions of section 106, it is not an infringement to copy or adapt the software or firmware of a user-purchased mobile communications device for the sole purpose of enabling the device to connect to a wireless communications network if—

(1) the copying or adapting is initiated by, or with the consent of, the owner of that device or the owner’s agent;
(2) the owner of that device or the owner’s agent is in legal possession of the device; and
(3) the owner of that device has the consent of, or an agreement with, the authorized operator of such wireless communications network to make use of that wireless communications network.

Lastly, the bill includes a direction that the executive branch (i.e. the President and his staff and appointees) clear  up any conflicts that this bill might cause with international agreements. It's been argued that at least some international trade treaties negotiated by the US Trade Representative could be incompatible with a national legal standard for unlocking phones; this provision basically tells the President to clean that mess up.

The Unlocking Technology Act comes from US Representatives Zoe Lofgren (D-CA), Thomas Massie (R-KY), Anna Eshoo (D-CA), and Jared Polis (D-CO). For those who aren't familiar with the individual representatives, they run the gamut from left (Lofgren and Eshoo) to center (Polis) to right (Massie), making the bill, or at least its co-authors, surprisingly bi-partisan.

Note that this is a separate bill from the Wireless Device Independence Act, which only pushes for the DMCA exemption. Also recall that the White House has publicly expressed support for easily and legally switching carriers once a phone or tablet contract is up. None of that guarantees a bill's success; it's still got to pass through the House, the Senate and across the big guy's desk, which may take one or more congressional sessions. But the outlook is certainly promising.

EFF.org - New Bipartisan Bill Proposes Real Fixes to Bad Copyright Law

EFF.org - H.R. 1892 "Unlocking Technology Act" text