A USB port might give you 100-130mA into a homebrew circuit. Specs state that it doesn't provide 500mA until a protocol called enumeration.
This charging circuit handles two 3.7V batteries in series. Each battery gets current at a 50% duty cycle. It is not too different from charging the batteries separately.
The clock can come from a 555 IC pulse generator. In fact I tried to make do with the half-bridge inside a 555, although I got a meager charge rate. So my schematic has an external half-bridge.
This requires extreme caution. It's wise to limit voltage and current levels, to avoid having something go wrong, like a fire or explosion.