The administration of President Donald Trump exempted smartphones, computers, and other electronics from so-called retaliatory tariffs, potentially softening the shock to consumers from prices while simultaneously benefiting electronics giants, including Apple Inc. and Samsung Electronics Co.

The exemptions, published Friday evening by the U.S. Customs and Border Protection, narrow the scope of the tariffs, excluding goods from the 125 percent tariff on Chinese goods and his baseline 10 percent global tariff on almost all other countries.

The exemptions will apply to smartphones, laptops, hard drives, computer processors, and memory chips. These popular consumer electronics are generally not produced in the U.S. Establishing domestic production will take years.