finish locale udid fix (fix #1773)
make sure we don't crash if IDevice init fails
Test reformatting, step2.