The time-honored travelers’ trick of charging your phone from the USB port on the hotel-room television is one option for powering up away from home.

Many television models have included USB jacks for years, particularly the flat-panel type with plenty of multimedia ports on the back or side of the set. Depending on the TV, the USB jack is there for different purposes. On some sets, it functions as a service port for television technicians. On some TVs, you can also plug in a USB drive full of photos to view on the big screen.

In addition to transferring data between devices, the USB standard can supply a small amount of power to gadgets connected with a USB cable. Phone manufacturers recommend that you charge your phone’s battery with the cable and electrical adapter that came with the device, and you use other options at your own risk. However, travelers who remembered their phone’s USB cables but forgot their wall charger cubes have been tapping power from functioning television USB ports for years.

If the television has a functioning USB port on the back, you can probably get enough power from it to juice your phone in a pinch.

The phone’s battery might not charge as quickly as it does with your standard power adapter or wireless mat, and the television may have to be on. But the TV’s USB port can do in a pinch if you have no other options and the hotel’s front desk does not have a charger to lend you.

If you have the right cable, you can also charge your phone from a computer’s USB port. Some hotels include USB ports in the rooms, although some security experts have advised against plugging a USB cable directly into a public USB jack because of the slim chance of data theft or malware. Likewise, the Federal Trade Commission has previously warned travelers about directly connecting phones to the USB jacks for the infotainment systems in rental cars because the phone could share personal data with the car’s system, but a dedicated charging port is another option.

Just keeping a spare travel charger permanently tucked in your suitcase can keep you powered on the road if you forget your usual gear. Wirecutter, a product review site owned by The New York Times, has recommendations for USB chargers for both walls and cars.