iPad location service and OpenSSH

12 comments

Posted on 19th May 2010 by Benj in Apps |English |Howtos |iPad

, , ,

If you jailbroke your iPad and installed OpenSSH, you’ll notice that the location service in the Map.app doesn’t work anymore. It seems to be a bug with OpenSSH and the iPad. Lucky, there are allready some fixes around.

Requirements

  • iPad with Firmware 3.2
  • Jailbreak wth Spirit
  • SSH Client e.g. Putty

There are two possible solutions: the first one is quite easy but you need to this everytime you reboot your iPad. The second fix is permanent, but you need to modify a .plist file from your iPad, which makes the fun a bit more complicated.

Solution 1 (easy)

  1. Use putty to connect to your iPad – Mac Users just can use the Terminal.app: ssh root@iPad-IP
    Login root and password is the wellknown alpine
  2. Enter the following command: launchctl unload /System/Library/LaunchDaemons/com.apple.locationd.plist
    After that, enter this one: launchctl load /System/Library/LaunchDaemons/com.apple.locationd.plist
  3. You’re done. The location serives is working to the next reboot.

Solution 2 (complicated)

  1. Edit the file /System/Library/LaunchDeamons/com.apple.locationd.plist from your iPad – you need to copy this one to your PC/Mac and maybe also decrypt it with an plist< ->ascii converter.
  2. Now replace <key\>OnDemand</key\> <false/> with <key\>OnDemand</key\> <true/>

Thanks to daxnal23 for testing solution 2. :)

12 Comments
  1. daxnal23@yahoo.com says:

    Tried Solution 2. Worked without issue, however the change is noted below.
    <key>OnDemand</key>
    <true/>

    19th May 2010 at 20:35

  2. Kilrathy says:

    Great work, thanks for giving feedback! :)

    19th May 2010 at 05:25

  3. gnowk says:

    pledit (command line) can be used to convert the .plist file from binary to ascii and vice versa.

    if you're handy with vi, you can do everything on the ipad over ssh.

    19th May 2010 at 21:07

  4. domshen says:

    I had success with option 1 but it got old so I tried option 2. IT WORKS. WOOHOO. had trouble with using a converter so I had to edit it on a mac but after I did that I thought about it and it could have been edited right on the ipad using ifile

    19th May 2010 at 01:17

  5. reza says:

    Option 2 did not work for me, but it did if I gave it a bit of help. I added these two files to force restart the service — I also made the OnDemand change, but I'm not sure if it's necessary. No reason to have the locationd service running anyhow..

    iGooz:~ root# cat /Library/LaunchDaemons/net.reza.restart.plist
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>Label</key>
    <string>net.reza.restart</string>
    <key>ProgramArguments</key>
    <array>
    <string>/usr/local/bin/restart_gps.sh</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    </dict>
    </plist>

    iGooz:~ root# cat /usr/local/bin/restart_gps.sh
    #!/bin/sh

    /bin/launchctl unload /System/Library/LaunchDaemons/com.apple.locationd.plist
    /bin/launchctl load /System/Library/LaunchDaemons/com.apple.locationd.plist

    19th May 2010 at 10:06

  6. Kilrathy says:

    Wow, nice script. Did you restarted your iPad after changing the plist?

    19th May 2010 at 16:51

  7. Kilrathy says:

    Thanks for the hints! :)

    19th May 2010 at 18:25

  8. xorne says:

    thanx a lot dude, that's work !

    19th May 2010 at 09:26

  9. Fede says:

    Hi everybody!! Very nice site, my regards!
    The reza’s script, how can i use it? With what? I simply use that with mac terminal?
    I’m sorry if mine is a stupid question, i’m waiting for reply..
    Thanks all! Bye

    19th May 2010 at 16:12

  10. Wilkoa says:

    Many thanks this works well. I used ifile to make the edit direct on the iPad.

    19th May 2010 at 05:57

  11. Fede says:

    @Wilkoa: How can you do with ifile? ifile tells me that can be edit… it's strange…
    however, location doesn't works… after 1 week it's work but now not.. i tried the first solution, the second, 2 itunes restoration but nothing… i hope can't be an hardware problem..

    19th May 2010 at 13:25

  12. Esnake says:

    method 2 also worked for me directly on the ipad using ifile
    @Fede when opening use "Properties List" and in that way you should be able to edit the plist

    19th May 2010 at 01:20

Leave a comment