I ran into a situation where I needed to restart my iPhone, but unfortunately the lock button was broken. Normally a restart requires holding the lock button and home button for 8 seconds.
Fortunately - you can use AssistiveTouch to get on screen versions of those buttons.
- Open the Settings app
- Tap "General"
- Tap "Accessibility"
- In the "Physical & Motor" section tap on "AssistiveTouch"
- Turn "AssistiveTouch" on
- A white circle will appear in the bottom right. Tap it.
- Tap on "Device".
- Hold the on screen "Lock Screen" icon and the real home button at the same time, for 8 seconds.
After your iphone restarts you'll want to go back an turn AssistiveTouch off.