Bluetooth profile selector [jailbreak]

A little while back I described how to disable A2DP on your iPhone. It required manual modification of some files on the iPhone, which is not for the faint of heart. Now, I have created an application that allows you to change the Bluetooth profiles on a per-device basis. It works very easy.

Bluetooth device selectionBluetooth profilesAbout BTPS

Go to Cydia and look for the Bluetooth Profile Selector application. It is hosted with the BigBoss repository that is installed with Cydia by default. After installation you should see a red box with a Bluetooth icon inside of it.

The application shows all Bluetooth devices that have been detected. Just tap on one of the devices and the next screen is displayed that contains all the profiles that the iPhone can use on that device. The default setting enables all profiles, but you can choose which profiles that you want to enable. When you’re finished, just press the home button and the settings will be applied. During this process the Bluetooth server is restarted, so you’ll lose any active Bluetooth connections for a short while.

You can also download the package here. Put it on your iPhone and use SSH to run dpkg -i BTPS.deb to install it.

UPDATE: Apple has changed something in v4.3.1 and the profile selector cannot be used since then. Unfortunately, I don’t have an iPhone with v4.3.1, so I cannot test it. There has been some people that claim that they can fix it, so you can download the code here.

I received several requests from people if they could donate. You can donate via Paypal if you like:


Why I decided to jailbreak my iPhone

After owning the iPhone for a while, I was fed up with the closed nature of the device. I wanted to disable A2DP and found out that there was no way to do it. I decided to jailbreak the device to take a look about how to do this and found out that there are numerous other advantages as well:

  • The iPhone defaults to output audio on an A2DP device, when it is in the neighborhood. I want to always use the dock connector, but you need to modify your iPhone settings to do this.
  • Some Microsoft Exchange configurations are configured so your iPhone requires an access code at least once per hour. I use my iPhone often, so this was quite annoying. I installed Exchange Unlock to disable this functionality.
  • Access toggles easily using SBSettings application (available through Cydia) to enable some hidden features of the iPhone (i.e. numerical battery level). You can also access some frequently used toggles (WIFI, BlueTooth, …) much easier or show a list of running applications.
  • You can run applications in the background with the Backgrounder application (available through Cydia). This is especially great when using navigation products that are normally disabled when you are receiving or placing a phone call. Make sure you terminate the application when you really don’t need it anymore to prevent the application from draining the battery.
  • The default battery indication is quite lousy, but you can enable a numerical display. You can enable the SBShowBatteryLevel key in /var/mobile/Library/Preferences/com.apple.springboard.plist file or use a third party tool like SBSettings (available through Cydia). This application also allows to perform some other neat tricks, so make sure you take a look at it.
  • Install IPA files from other sources then the iTunes Store. Install AppSync for OS 3.0 on your iPhone (available through Cydia via Hackulo.us repository). Drag the IPA files into iTunes and you can sync them just like normal applications. The only difference is that you’re not updated about updates of course.
  • Access your phone using SSH, so you get access to the entire filesystem and are able to execute any command on your iPhone.
  • There are numerous other reasons why you want to jailbreak your iPhone. Some people like Winterboard to change the appearance of the phone. I like the default style, so I decided to stick with the normal springboard.

Are there any disadvantages? Yes, there are (unfortunately):

  • Whenever you upgrade your iPhone’s firmware, then you lost your jailbreak and need to start over again. This isn’t a major issue, because iPhone updates aren’t released very often. Always make sure you check if you can jailbreak the new version before you perform the upgrade.
  • Some applications can destabilize your iPhone. I only install applications that I really need and test them thorough. The applications listed above have never affected the stability and battery life in any way. You only need to be careful with Backgrounder, because you can easily leave an application in the background without knowing.

Howto disable A2DP on the iPhone

UPDATE [October 4, 2009]: I have created a utility that prevents the manual labour and can be installed via Cydia.

UPDATE [August 20, 2009]: The previous post described a method that didn’t work well. Shawn Porter pointed out the problem, so I have updated the post and now it works fine.

I have an iPhone 3G and use it in my car as a music player. I have installed an GROM audio adapter for the iPhone, so I can connect it to my Mazda 6 car stereo. The GROM adapter even allows to use the controls on the steering wheel. Everything worked just fine, until iPhone OS 3.0 came along.

iPhone OS 3.0 includes support for A2DP, which is capable of stream audio via BlueTooth to another device. Unfortunately, there is no way to disable A2DP and it will always select the A2DP source when it is available. You can switch back to the dock connector, but you need to do this each time you start your car.

Apple should make an option to select which BlueTooth profiles should be enabled for a certain connection, but this is not possible with the current firmware. I decided to jailbreak my iPhone and try to find a solution.

The interesting directory is /var/mobile/Library/Preferences, where the iPhone stores the BlueTooth settings. These settings are stored in the PLIST format, so you need a PLIST editor (Mac or PC) or you need to convert them by hand. Transfer the com.apple.MobileBluetooth.services.plist to your computer (refer to Simon’s blog to find out how to do this). You can also use iFile to edit the file on your iPhone directly (thanks to Richard van den Berg for pointing it out).

Open the com.apple.MobileBluetooth.services.plist in your PLIST editor and make sure you edit the A2DPService section and store the devices you don’t want to use A2DP in the UnauthorizeList (without the letter “d”). This dictionary will probably not exist yet, so you need to add it by hand. You need to know the MAC address, but it is probably listed already in this file.

<key>A2DPService</key>
<dict>
  <key>State</key>
  <true/>
  <key>UnauthorizeList</key>
  <dict>
    <key>00:10:60:D0:91:D0</key>        <!-- This is the MAC address -->
    <date>2009-08-08T01:00:00Z</date>   <!-- Timestamp -->
  </dict>
</dict>

Transfer the PLIST file back to your iPhone and reboot the device. Once it gets back on, then the A2DP service should be disabled.