• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

PirateBox Mobile | PAW Intergrated

Search This thread

pspunderground

Senior Member
Oct 6, 2010
841
1,028
Dallas
Piratebox-logo.png
Find Jochen's intergrated version here.​


OLD:​

While reading Gizmodo, I stumbled across an article about the PirateBox, an offline network for sharing files. I wanted to do this, but I didn't want to buy all the supplies. Instead, I decided to use an old Android phone, my HTC Hero (Sprint) that got abandoned after upgrading to an EVO 4G. In reality, any phone with Android, root, and WiFi woill work just fine.
Materials
  • Android Device
  • root
  • Wireless Tether App (market)
  • PAW Server (attached)
  • SDCard
  • Pirate Lunchbox (Not necessary)
  • BatteryPack (Not Necessary)
Instructions
  1. First, get on the internet and download the "Wireless Tether for Root Users" app. This will establish our PirateBox Network.
  2. Set up the name to "PirateBox" or anything you like. Make the network "open"
  3. Download and install the APK below. This version of PAW Server includes PirateBox, and the forwarding stuffz. Credits to joschi70
  4. Make a folder called "piratebox" on the root of the SDCard
  5. Next, Start the Tether app.
  6. Start PAW Server
  7. Finally, test the system out by uploading a file from another device. If all works well, the file will be at the folder called "piratebox" under the "html" folder where the pages are.
  8. EXTRA: For an almost-exact replica of the original PirateBox, place your device in a Pirate lunchbox with a battery pack.
How It Works

This works by the users joining the "PirateBox" network. PAW Server then serves the site. The page uses BeanShell Code because PAW Server does not like PHP and because BeanShell is supported by PAW. In the recent versions, joschi70 has changed PirateBox from a half-working project to a fully-working install-on-the-fly system. He has redesigned PirateBox to an almost-precise replica of the original PirateBox. He is also the one to get forwarding woking, so he deserves all credit for finishing this. I just started it :)

Other Stuff

NOW MORE PROBLEMS!!!!!11!!1!!!!!!1!!!!1

In order for this to work, you have to use "Wireless Tether for Root Users" and NOT the native tethering in ROMS like CyanogenMOD and MIUI. In fact, DO NOT use a rom with Native Tethering functionality. It screws up the ENTIRE connection to PirateBox. Sense is proven to work, since this was all tested on a Sprint Hero. MotoBlur and TouchWiz are not yet proven.

EDIT: Attached is a "server.txt" without the 2MB limit added by PAW. Rename the "server.txt" to "server.xml". Then, place "server.xml" in "sdcard/paw/conf/server.xml". Also, installation process is alot simpler thanks to Joschi70. He is the developer of PAW and has made an APK with PirateBox built in. His version looks more like the original and works more efficiently.

Original PirateBox: http://wiki.daviddarts.com/PirateBox
Credits to David Darts for inspiring me to roll my own with what I had.

Also, credits to joschi70, the developer of PAW, for the PirateBox bundle AND for fixing forwarding! Now enter any website address and it redirects to PirateBox! YAY and HIGH FIVE to joschi70!
 

Attachments

  • server.txt
    276 bytes · Views: 3,582
  • PawServer_PirateBox.apk
    715 KB · Views: 4,072
Last edited:

dbcoolio

New member
Jan 28, 2011
1
0
pretty cool

pretty cool, but what it really needs is to also list all of the files in the piratebox folder on the main page so that other people can download them. I haven't actually tried the original piratebox but I thought that was the point, to set up a quick anon local filesharing page so you can swap files between friends at lunch. I've never used BeanShell but it should be easy enough to do.
 

joschi70

Senior Member
Aug 10, 2010
92
93
www.fun2code.de
If you need some help with the scripts let me know.

The PAW setup should not be the problem.
What might be more difficult is to get the HTTP traffic redirect working.
 
Last edited:

Mvdbeld

Member
Jan 31, 2011
8
0
Hi, great work got this working on my HTC Desire (without root) using the normal tether functionality. The only problems so far the files you upload can't be downloaded cause the uploaded files are not visible trough the website. If this functionality can be added this would be awesome.
 

pspunderground

Senior Member
Oct 6, 2010
841
1,028
Dallas
Hi, great work got this working on my HTC Desire (without root) using the normal tether functionality. The only problems so far the files you upload can't be downloaded cause the uploaded files are not visible trough the website. If this functionality can be added this would be awesome.

I had a look there, but could only found some files, but not all of them.
Maybe I've overlooked something.
I'm adding the file browsing functionality and the original uses Python.
 
Dec 5, 2010
20
0
Maastricht
This must be a pretty stupid question, but the file upload size limit is 2 megabytes if a file is larger than that, the browser gives the error 'connection has been reinitialized'.

Am I the only one having this problem?
 

joschi70

Senior Member
Aug 10, 2010
92
93
www.fun2code.de
This is not a stupid question ;)

The default upload size of PAW is 2MB. There will be an update soon, with a much higher limit.

You can change this manually by editing the <maxPost /> line in the PAW configuration (/sdcard/paw/conf/server.xml).
 
  • Like
Reactions: janniemannieee

pspunderground

Senior Member
Oct 6, 2010
841
1,028
Dallas
This must be a pretty stupid question, but the file upload size limit is 2 megabytes if a file is larger than that, the browser gives the error 'connection has been reinitialized'.

Am I the only one having this problem?

I have attached a "server.xml" in the original post. I just added 24 0's after "1". if anyone wants to calculate that, i'll be happy to know how many MB's that is :p
 
Dec 5, 2010
20
0
Maastricht
<strike>I don't know anything about programming linux, and just a very little html. But I'll be your bugreporter from now on. Because I would love to help the project.
;)
I installed the app from joschi70. But after you upload a file it will be in /sdcard/piratebox

But if you are browsing files it will check /sdcard/paw/html/piratebox

Or is it just my Desire HD that does that kind of stuff:p</strike>


Edit:

Removed /sdcard/piratebox and created /sdcard/paw/html/piratebox

got it working 100% now :D
 
Last edited:

pspunderground

Senior Member
Oct 6, 2010
841
1,028
Dallas
<strike>I don't know anything about programming linux, and just a very little html. But I'll be your bugreporter from now on. Because I would love to help the project.
;)
I installed the app from joschi70. But after you upload a file it will be in /sdcard/piratebox

But if you are browsing files it will check /sdcard/paw/html/piratebox

Or is it just my Desire HD that does that kind of stuff:p</strike>


Edit:

Removed piratebox from /sdcard/ and created /sdcard/paw/html/piratebox

got it working 100% now :D

I have to look into it because joschi70's apk saves to /sdcard/piratebox/ and browses that same directory, not to /sdcard/paw/html/piratebox.

EDIT: Try to uninstall joschi's PirateBox bundle, delete /paw from your SDCard, and reinstall joschi's PAW/PirateBox APK
 
Last edited:
Dec 5, 2010
20
0
Maastricht
I already tried that :p

Whenever you come to the piratebox homepage and click

2. To view files uploaded to PirateBox, click here.

It says: Got the error: Not Found
while trying to obtain /piratebox

whenever you upload something and click:
3. Browse and download
files here.

It will take you to the files you have previously uploaded

At least this is the problem with mine?

I've deleted /sdcard/paw

and reinstalled the app
 

pspunderground

Senior Member
Oct 6, 2010
841
1,028
Dallas
I already tried that :p

Whenever you come to the piratebox homepage and click

2. To view files uploaded to PirateBox, click here.

It says: Got the error: Not Found
while trying to obtain /piratebox

whenever you upload something and click:
3. Browse and download
files here.

It will take you to the files you have previously uploaded

At least this is the problem with mine?

I've deleted /sdcard/paw

and reinstalled the app

Figure it out, hopefully. Make sure to have the "piratebox" folder premade on the root of the SDCard.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 6
    Piratebox-logo.png
    Find Jochen's intergrated version here.​


    OLD:​

    While reading Gizmodo, I stumbled across an article about the PirateBox, an offline network for sharing files. I wanted to do this, but I didn't want to buy all the supplies. Instead, I decided to use an old Android phone, my HTC Hero (Sprint) that got abandoned after upgrading to an EVO 4G. In reality, any phone with Android, root, and WiFi woill work just fine.
    Materials
    • Android Device
    • root
    • Wireless Tether App (market)
    • PAW Server (attached)
    • SDCard
    • Pirate Lunchbox (Not necessary)
    • BatteryPack (Not Necessary)
    Instructions
    1. First, get on the internet and download the "Wireless Tether for Root Users" app. This will establish our PirateBox Network.
    2. Set up the name to "PirateBox" or anything you like. Make the network "open"
    3. Download and install the APK below. This version of PAW Server includes PirateBox, and the forwarding stuffz. Credits to joschi70
    4. Make a folder called "piratebox" on the root of the SDCard
    5. Next, Start the Tether app.
    6. Start PAW Server
    7. Finally, test the system out by uploading a file from another device. If all works well, the file will be at the folder called "piratebox" under the "html" folder where the pages are.
    8. EXTRA: For an almost-exact replica of the original PirateBox, place your device in a Pirate lunchbox with a battery pack.
    How It Works

    This works by the users joining the "PirateBox" network. PAW Server then serves the site. The page uses BeanShell Code because PAW Server does not like PHP and because BeanShell is supported by PAW. In the recent versions, joschi70 has changed PirateBox from a half-working project to a fully-working install-on-the-fly system. He has redesigned PirateBox to an almost-precise replica of the original PirateBox. He is also the one to get forwarding woking, so he deserves all credit for finishing this. I just started it :)

    Other Stuff

    NOW MORE PROBLEMS!!!!!11!!1!!!!!!1!!!!1

    In order for this to work, you have to use "Wireless Tether for Root Users" and NOT the native tethering in ROMS like CyanogenMOD and MIUI. In fact, DO NOT use a rom with Native Tethering functionality. It screws up the ENTIRE connection to PirateBox. Sense is proven to work, since this was all tested on a Sprint Hero. MotoBlur and TouchWiz are not yet proven.

    EDIT: Attached is a "server.txt" without the 2MB limit added by PAW. Rename the "server.txt" to "server.xml". Then, place "server.xml" in "sdcard/paw/conf/server.xml". Also, installation process is alot simpler thanks to Joschi70. He is the developer of PAW and has made an APK with PirateBox built in. His version looks more like the original and works more efficiently.

    Original PirateBox: http://wiki.daviddarts.com/PirateBox
    Credits to David Darts for inspiring me to roll my own with what I had.

    Also, credits to joschi70, the developer of PAW, for the PirateBox bundle AND for fixing forwarding! Now enter any website address and it redirects to PirateBox! YAY and HIGH FIVE to joschi70!
    3
    I'm still here, but I've been busy and have only been able to follow what's being said rather than contribute. Looking back on this thread, it seems like we need a well-organized how-to post for a step-by-step setup of Piratebox on Android. I realize it might vary by model, but if we could get it out there for the Galaxy S, S2, and S3 that would be a start. It might be best to focus on older models, since I think Ideally this would run on a dedicated extra phone. Seems like as good a use as any for an old Galaxs S laying around.

    If I have time, I'll get around to it this weekend. Most of it has been simplified by Jochen and makes the old guide obsolete.
    1
    This is not a stupid question ;)

    The default upload size of PAW is 2MB. There will be an update soon, with a much higher limit.

    You can change this manually by editing the <maxPost /> line in the PAW configuration (/sdcard/paw/conf/server.xml).
    1
    Got it running with the stock tether app on my Notion Ink Adam.
    I've posted about it on my blog. The post also describes the technical details and the plugin installation.
    Here is the blog post: PirateBox on Android

    Hope that helps in setting up a PirateBox...

    Update:
    Since version 0.3 of the plugin, PirateBox is also working on rooted Galaxy Nexus devices running Ice Cream Sandwich.
    1
    Just found this thread after beating PAW up for an hour. Heh. I'm going to a building boats out of trash and junk festival called Camp Tipsy and thought it would be fun to setup some wifi gear and a Raspberry Pi for some kind of anonymous disconnected message board. Over the last 48 hours I've learned a bit about solar powering DC devices, how much of a pain it is, and how costly it is. Realized I've got 4 extended batteries for my old HTC G2, which might last through a weekend of running wifi tethering. Then I found PAW and this thing I forgot about, PirateBox (which saves me from writing any code).

    I've got the thing running on an old HTC G2 with the extended battery in a street facing window with the SSID "attwifi", will see how long that lasts.

    Some things to note...

    * The plugin install through the config site thing that PAW has never really worked. I dug up what that page does when I hit install, which is copy over some init scripts from the plugin directory to the PAW etc/init directory. I went ahead and did that by hand and that got PirateBox to start working.
    * I've classically have had bad luck with continuously running wifi tethering/hotspot, it'll die from time to time, is there any easy to run something similar to cron to monitor tethering, or simply restart tethering and then PAW once every 30 minutes?

    Thanks!