An AFP Server on your iPhone

 

This native application sets up an AFP file server on your iPhone or iPod Touch and also provides a simple GUI interface for controlling the file server.

 

Installation

The easiest way to install application is by using Installer.app and selecting the package “AFPd”. This package may not be visible until you first install the Community Sources package. 


If you’d like to use Installer.app to install it directly from here, then add my repository to your list of sources: http://www.eecs.berkeley.edu/~job/afpd/installer.xml  

Once you have added the repository you can then install the package “AFPd Direct”.


You can also download the application from this site and install it manually. The application is self initializing and nearly self-contained. The first time it is run it will place two .plist files into /Library/LaunchDaemons. To uninstall, simply delete the application and the two .plist files from /Library/LaunchDaemons.  It must be installed into /Applications and the main executable file /Applications/AFPd.app/afpdcontrol must be owned by root and have file mode 4755.


Download:      AFPd-0.3.zip ( current version 0.3 )

                       AFPd-src-0.3.zip ( current version 0.3 )



Notes

The source code for the UI control application is provided in the src subdirectory of the application bundle. Compiling it will require a properly configured toolchain for cross compiling. The arm-apple-darwin-* packages from Darwinports are quite convenient.


If you already have some version of afpd installed, you should probably uninstall it before installing this application.


This application currently does not work for iPhone running firmware 1.0.2.  It does work for 1.1.3. 


When you connect to the AFP server you will need to authenticate as root with your password. The default password is “alpine”, but hopefully you changed this while jailbreaking. To be clear, that’s the root password of your iPhone not of your computer.


I don’t maintain the Installer.app repository that serves this application. The version posted here may be newer than that version.



Acknowledgment

The code for afpd and dns-sd was ported and compiled for the iPhone by the programer using the pseudonym “Core”.  The source code for the daemons is now included in the src subdirectory.



  1. Change Log  

  2. 0.3   Compatible with 1.1.3 firmware.

  3.         Uses -w flag in lanchctl for afpd.

  4.         Go button auto enables/disables as user types.

  5.         Share names have new defaults.

  6.         Added default share for ~mobile.

  7.         /Applications/AFPd.app/afpdcontrol must be 4755 mode.

  8.         Error is shown if permissions are set wrong.

  9. 0.2   Keyboard now hides after service name is set.

  10.         Return key is now blue "Go" to make it clear that it needs to be pressed.

  11. 0.1   Initial working version.



Last modified on February 26, 2008 6:00 PM.

Installing this application requires that your device be modified to allow installation of third-party applications. Modifying your iPhone or iTouch could damage it if you don’t know what you are doing or even if you do know what your doing. It will also void your warrantee and could be prohibited by laws that may apply to you. This application is provided for use by people who understand and accept the risks and consequences of making such modifications. The author of this software takes no responsibility for any consequences directly or indirectly related to the use of the software. For example, if this software causes your iPhone to explode and kill everyone you know, it’s your own fault for using it. To be quite honest, you really should have known better.