I need to restore my HTC one m7 to stock, but the usb port on the device is broken.
Is there a way i can restore my device to stock without conecting it to the PC?
the device is on 30% (and turned off) and i cant charge it.
To return your HTC one m7 to stock without a pc and a broken usb port you will need to have backed up your phone operating system before flashing roms in cwm or twrp or any other custom recovery. Then you could proceed to restoring stock rom in custom recovery.
With that amount of battery i'm doubtful. But you could try to push the file to the device via bluetooth or some other wireless file transfer method and then try flash the rom.