USB powering batteries without OS support?
Answer: Yes.

Maxim Integrated Guide to smart battery devices. Or if you're a "dumb device" kinda person, the device being charged can tie their data lines (D+ and D-) and receive maximum power from an adapter. Vice Versa YOu can always charge a USB device 5V @ 500mA regardless of what is present on the data lines (tied up or down or floating or anything). Anything past that would require one of the chips similar to the link's that intelligently (and without programming, i.e. you just solder it in and it works) charges the device that follows USB charging spec.

On the off chance you're talking about using your phone to charge something (still not quite sure, but adding for completeness), that's called OTG and from what I know you'll only be able to provide around 8mA from your phone to the device.

Addendum: Apple doesn't follow USB Charging spec. Ask apple why that is.