libimobiledevice - Teaching Penguins to Talk to Fruit 14 years ago
Example of how to read your home screen app layout data using Python.
# Fix for subfolders in icon_state for iOS >= 4
# line 48 : libimobiledevice\cython\sbservices.pxi
# err = sbservices_get_icon_state(self._c_client, &c_node, "2")
# export LD_LIBRARY_PATH=/usr/local/lib
import imobiledevice
idevice = imobiledevice.iDevice()
ld = imobiledevice.LockdownClient(idevice,"sb")
sbport = ld.start_service(imobiledevice.SpringboardServicesClient)
sbc = imobiledevice.SpringboardServicesClient(idevice, sbport)
icon_state = sbc.icon_state
# set icon_state from xml using ipython
# download binary plist from http://iconstate.herokuapp.com/ with sbservice checked
# convert to xml using plutil.pl from http://scw.us/iPhone/plutil/
# new_xml = !cat IconState.text.plist
# new_icon_state = plist.from_xml(new_xml.s)
# sbc.icon_state = new_icon_state