Tweak the iPhone's vibration schemes
Two little things annoyed me with my beloved iPhone: it vibrates when I plug it for charging, and it doesn’t have any kind of haptic feedback.
Well, I just tackled these two problems at once.
How? By simply modifying the vibration schemes.
Prerequisite: sorry to point out the obvious, but of course your iPhone has to be jailbroken (or jailbreaked, you choose) 😉
We’ll have to modify two files on the phone:
/System/Library/PrivateFrameworks/Celestial.framework/N90/SystemSoundBehaviour.plistThis file tells the iPhone what to do when something happens like receiving a phone call, an SMS or enabling vibrate mode.
/System/Library/PrivateFrameworks/Celestial.framework/SystemSoundVibrationPatterns.plistThis file sets the vibration duration and intensity.
Both are text files, they can be easily edited with the Property List Editor if you’re on a Mac. Otherwise a plain text editor will do, just be careful with the syntax.
First, let’s have a look at SystemSoundBehaviour.plist.
There are several items, each composed of keys:
- RingVibrateIgnore,SilentVibrateIgnore,RingerSwitchOff = when the phone is on silent (vibrate) mode
- RingVibrateIgnore,SilentVibrateIgnore,RingerSwitchOn = when the phone is in normal (sound) mode
In each mode, you just declare the actions you want, either Vibrate, Beep or both.
In my example, to get the haptic feedback when typing on the keyboard, I added the KeyPressed entry, since it’s not there by default. It’s set to vibrate each time a key is pressed on the virtual keyboard, and also to make a sound if the phone is not set to silent.
Since I also wanted to prevent my iPhone from vibrating each time I put it on my Luna‘s dock at night, I simply removed the actions in the key named ConnectedToPower. That’s it!
The next step is to modify the SystemSoundVibrationPatterns.plist.
Again, I added the same KeyPressed entry. This time the parameters are:
- Intensity: I’m not quite sure how it affects the vibration. Normally it’s set to 1, I set it to 4.
- OffDuration: The duration of the pause between vibrations
- OnDuration: The duration of the vibration
- TotalDuration: The duration of the whole sequence (vibrations and pauses)
The settings I used make a perfect haptic feedback for my iPhone 4. It generates a very subtle vibration when typing on the keyboard. It’s very short and silent, just what I wanted.