How to turn off iphone with broken lock button without sim card?

My friend has a 3gs and doesn't have a sim in it so he can't use it. But hes trying to hacktivate it and can't switch it off because the lock button is broken off.

Wait until goes die

First, go to settings.
Next, go to general, scroll to the bottom and tap accessibility.
Then, scroll to the bottom again, and turn on assistive touch.
Finally, you will see a little white button in the corner of the iphone. Tap on it, then tap on device, and then tap the lock screen icon, and it will turn off. You can also hold it to bring the power off slider, to power it off.

  • My iphone turn off for no reason and won't turn back on and lock button is broken? I was just on it and it was 85% charge and it turn off for no reason and it still vibrating.plus my lock button is broken I need help Mom won't take me to get it fix I need help now
  • My iphone 4's lock button is broken. Is there any other possible way to turn it on? Its not my current phone, but I need to download music & pictures off it but its off and the button is totally unusable. I tried to talk to the Apple store but I can't get the serial number off the phone (due to the fact that its OFF ) so they were unhelpful.
  • IPhone won't turn on or charge! Broken lock button Yesterday my iPhone 4S turned off by its self and I can't get it to turn on. I tried charging it but nothing happens. My lock button is broken so I can't hold the home/power buttons to turn it on. My phone won't even charge on my laptop so iTunes has no device connected to it. Please Help! Before it tuned off it had about 40-ish percent. I've had it charging since last night hoping it would help but nothing's happened.
  • Iphone lock button broken, is there any alternative to lock iphone? My iphone 3G lock button is totally damaged and is out of warranty and I can't afford to get it repaired. I was wondering is there any app which can convert "silent" button to lock button. Or may be an app on which i can manually lock the device. By the way my Iphone is jailbroken, and "accessibility" is not accessible.