Remove Jailbreak and restore to factory settings without iTunes
A friend has an iPhone and they need to wipe it and remove the jailbreak on it. They don't need a backup.
The problem is they don't have access to a computer with iTunes on it to do this.
Can this be done without iTunes? Will doing an 'erase all content and settings' lock the phone? Some posts I have read suggest if you do this the phone will get bricked.
I believe all of the current jailbreak solutions work by modifying an IPSW file for the device, and flashing that back on to it. To remove it, you would need a clean IPSW and to do that you need to restore it through iTunes. If you don't back it up first (wether that be on iCloud or iTunes), then obviously you'll lose all of the settings, apps, and app data on the phone as well.
You've heard correctly - tapping "Erase All Content and Settings" on a jailbroken device will just cause it to get stuck on the Apple logo while booting until you restore it with iTunes (because the filesystems of jailbroken devices are slightly rearranged).
The only way to remove the jailbreak from a jailbroken device is to restore it with iTunes on a computer.
(If your device is stuck on the Apple logo and you want to restore it, you may have to put the device into DFU mode before iTunes can read it. You can do this by plugging your device into a computer that has iTunes installed, holding the power (lock) button and home button for 10 seconds, then releasing the power button while you keep holding the home button for another 15 seconds. Then iTunes should recognize it and allow you to restore it.)