Jump to content











Photo
- - - - -

tftp32 for android

android

  • Please log in to reply
23 replies to this topic

#1 norlens

norlens
  • Members
  • 1 posts
  •  
    China

Posted 12 March 2012 - 11:48 AM

Because usb driver boot pc was limited, such as usb-hdd; usb-cdrom; usb-zip; so I'd like to use a mobile device and wifi to boot my computer.

of cause I can use another pc to do this, but start a pc to do this is troublesome。

#2 Grif

Grif

    Member

  • Developer
  • 38 posts
  •  
    United States

Posted 13 March 2012 - 04:58 AM

I have had similar thoughts, and the only tftp server I have found for the android platform is called AndTFTP. Unfortunately the developer of this app has chosen to run the listening port on UDP 6969, I do not know why. I have asked that he update the app to allow the standard tftpd ports, or allow users to define them, and he agreed, but as of yet no updates.

Furthermore, you will need the DHCP server on the LAN to point to the specified android device when tftp requests are broadcasted. This can be done using DD-WRT in many residential type routers using a specified config string.

Since the developer of AndTFTP has not complied with my request, I myself have dropped the project. However i do not see any other technical reason why this would not work.

#3 Grif

Grif

    Member

  • Developer
  • 38 posts
  •  
    United States

Posted 14 March 2012 - 04:57 AM

Bumping this up.... requesting input from the community.

To further explain the goal, I personally was hoping to serve out a PXE PLOP bootloader via TFTP from my Android device.

PC requests PXE boot> DHCP server routes PXE request to Android device as defined by routing rules in DDWRT router firmware> TFTP Daemon replies on Android device loading up PLOP on the PC> PC can now boot locally from any device PLOP allows (USB, etc.).

I have the entire setup running except for the Android TFTPD which appears to be hard coded to run on UDP 6969. The config string I have to set DDWRT to forward the PXE requests is cryptic to me, but works on my lan using a PC running TFTPD32 on standard TFTP ports. Simply forwarding the standard TFTP ports to the Android device on port 6969 fails to handshake.

Steve? Anyone? Surely there must be more interest in this than myself and the original poster. And the usefulness, once gained, must seem obvious.

#4 patpat

patpat

    Member

  • Banned
  • 48 posts
  •  
    United States

Posted 14 March 2012 - 09:44 AM

get AndTFTP.apk
rename it to ANDTFTP.apk.zip
extract of it classes.dex
hexedit classes.dex replacing the text string 6969 for 0069
put the edited classes.dex back to ANDTFTP.apk.zip
sign ANDTFTP.apk.zip with SignApk (instructions on the file)
rename ANDTFTP.apk.zip back to ANDTFTP.apk

by now you should've got a version of AndTFTP working on port 69...
  • Roboo likes this

#5 panreyes

panreyes

    Member

  • Members
  • 55 posts
  •  
    Spain

Posted 14 March 2012 - 07:50 PM

I've tried that by myself, but I can't find any 6969 anywhere...

#6 patpat

patpat

    Member

  • Banned
  • 48 posts
  •  
    United States

Posted 14 March 2012 - 09:53 PM

I've tried that by myself, but I can't find any 6969 anywhere...


"hexedit classes.dex replacing the text string 6969 for 0069"

do not look after 0x6969 look after a text string "6969"; it is there.

#7 Grif

Grif

    Member

  • Developer
  • 38 posts
  •  
    United States

Posted 15 March 2012 - 04:17 AM

@patpat Awesome. I'll try this. Project has been on hold for months, if this works I'll be highly grateful. Guess i should have asked XDA-devs, but i guess since the original developer dropped the ball, I wasnt comfortable asking ppl to reverse engineer his stuff without permission. But hopefully you have pointed me in the right direction, and will notify the dev what I have done if successful.

Edited by Grif, 15 March 2012 - 04:20 AM.


#8 Roboo

Roboo
  • Members
  • 1 posts
  •  
    Slovakia

Posted 14 June 2012 - 06:52 AM

@patpat: I have followed your instructions and created apk file, but application cannot be installed (Android ICS 4.0.3).
Can you send me your modified apk file?
Many thanks
Robert

#9 ahbhill

ahbhill
  • Members
  • 2 posts
  •  
    United States

Posted 17 October 2012 - 09:06 AM

Booting a PC via pxe from your android is possible. I was working on an app project about 8 months ago but never got around to finishing it. Heres how:

pre-reqs:
a rooted phone
busybox installed

the pc you are attempting to boot via PXE must be connected to a wifi router (via ethernet cable) that your phone is connected to.


FROM THE TERMINAL/ANDROTERM, use the commands

udhcpd - DHCP SERVER
udpsvd tftpd - TFTP SERVER
tcpsvd ftpd - FTP SERVER (for gPXE)


use udhcpd as the dhcp server and specify in the configuration the path of the bootfile (ex:/sdcard/pxe/startrom.0)

then use the command: udpsvd -vE tftpd 69 (some other settings) to start the tftp server

once that is done, your ready to boot from the PC.

On the routers that I have tested this on (about 8 diffrent brands, I never had to change ANY router settings. I just simply connect to the wifi network and kick off my PCE script. If you want to download the boot files via ftp & gPXE(faster),you can use "tcpsvd -vE ftpd 21".


Whenever I hopfully can find the time, I plan on finishing up the android app im working on and drop it out on the market to simplify this process for everyone(And yes it will be FREEEE). Its extremely helpful when I'm at a family members house or friends and they throw in the "hey while your here, can you look at my pc its broke.".

kick on the android wifi, start the server, then boot it up to PE, Hirens, or whatever I need.


Hope this helps


Adom

#10 panreyes

panreyes

    Member

  • Members
  • 55 posts
  •  
    Spain

Posted 17 October 2012 - 01:44 PM

Really interesting!

I've tried what you say, but the busybox version I installed doesn't seem to include udhcpd

#11 Grif

Grif

    Member

  • Developer
  • 38 posts
  •  
    United States

Posted 18 October 2012 - 12:56 AM

Hrrmmm.. nor mine. :dubbio:

I wonder if that one-post user is pulling our collective legs, so to speak?

I sure wish there was an app for that.

#12 panreyes

panreyes

    Member

  • Members
  • 55 posts
  •  
    Spain

Posted 18 October 2012 - 10:10 AM

Full busybox includes, in fact, udhcpd, but the versions available in the play market won't include those applets

#13 Grif

Grif

    Member

  • Developer
  • 38 posts
  •  
    United States

Posted 19 October 2012 - 02:17 AM

Emailed Busybox Pro dev with a request to include the required applets.

#14 Grif

Grif

    Member

  • Developer
  • 38 posts
  •  
    United States

Posted 05 December 2012 - 03:42 AM

I'm elated to say that I now finally have a working PXE server running on my Android device! Am looking for participants in what I would call a semi-closed beta-test. It has been successfully tested on two devices using multiple payloads. The intent here is not to use it for OS deployment, but rather to load and execute diagnostic software on the target machines, load small PE's and perhaps small VM's.

The requirements are a rooted Android device with Wifi, preferably with a decent amount of internal storage. I ask for serious developers/testers only who are willing to report bugs, expand the scope of the project, document their usage examples and share their results.

I've been obsessing about this project for two years, and finally found a programmer to package the primary bits together for me. We are both very excited for the potential of this, and are looking for people whom we could share that enthusiasm.

Thanks Folx!

Love this forum! :yahoo:
  • Sha0 likes this

#15 Sha0

Sha0

    WinVBlock Dev

  • Developer
  • 1682 posts
  • Location:reboot.pro Forums
  • Interests:Booting
  •  
    Canada

Posted 05 December 2012 - 03:53 AM

Now if you could get an iSCSI target running on the Android, then you could boot diskless computers from it without those computers having a large RAM requirement... ;)

#16 Grif

Grif

    Member

  • Developer
  • 38 posts
  •  
    United States

Posted 05 December 2012 - 04:03 AM

Now if you could get an iSCSI target running on the Android, then you could boot diskless computers from it without those computers having a large RAM requirement... ;)


That is indeed possible. Not implemented yet tho, care to help?

Edited by Grif, 05 December 2012 - 04:12 AM.


#17 ahbhill

ahbhill
  • Members
  • 2 posts
  •  
    United States

Posted 21 December 2012 - 07:49 AM

Forgot I even made a post on here. Havent been on in a bit.

 

Regarding busybox...I forgot to mention that not all version support udp&tcpsvd(Sorry about that) ...The one ive been using was extracted from the "SuperOneClick" zip file(googleSuperOneClick). The ones on the market(at leat the ones I tested) did't seem to support those functions. 

 

iSCSI and NFS in the works....



#18 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 07 December 2013 - 02:32 AM

hi Grif, just wondering if you were able to pull things together with a dev and if so is it available now? sounds like a great idea. thanks

#19 slothman

slothman

    Newbie

  • Members
  • 26 posts
  •  
    United States

Posted 15 March 2014 - 08:21 PM

You can use dnsmasq as a PXE server on android.

 

I use dnsmasq as a PXE server on my linux box.  It works very well.

 

Inside of the crossbreeder app, they have a dnsmasq which has pxe support compiled in.

 

http://forum.xda-dev...d.php?t=2113150

 

It is only for armv7 or better devices though.

 

Simply extract the dnsmasq app from the zip file and put it in /system/bin with a root explorer app.

 

Then you can create a conf file for it that will enable tftp and PXE.

 

I don't have time to create an app or flashable zip file that would do all this, but someone can easily accomplish this if they have some time.

 

There is also a paid app called servers ultimate that has pxe *and* iscsi server.

 

I don't know how he managed that because all of the iscsi servers I've seen require a kernel module to work...


Edited by slothman, 15 March 2014 - 08:28 PM.


#20 Grif

Grif

    Member

  • Developer
  • 38 posts
  •  
    United States

Posted 17 March 2014 - 12:21 AM

You can use dnsmasq as a PXE server on android.

 

I use dnsmasq as a PXE server on my linux box.  It works very well.

 

Inside of the crossbreeder app, they have a dnsmasq which has pxe support compiled in.

 

http://forum.xda-dev...d.php?t=2113150

 

It is only for armv7 or better devices though.

 

Simply extract the dnsmasq app from the zip file and put it in /system/bin with a root explorer app.

 

Then you can create a conf file for it that will enable tftp and PXE.

 

I don't have time to create an app or flashable zip file that would do all this, but someone can easily accomplish this if they have some time.

 

There is also a paid app called servers ultimate that has pxe *and* iscsi server.

 

I don't know how he managed that because all of the iscsi servers I've seen require a kernel module to work...

 

 

After my long battle with throat cancer, we are back in DEV mode!! Work has begun anew with bigger and even better ideas.  Yes, DNSMASQ is one way to do it, you are on the right track.  Keep any eye out on the Android market for the full version soon.  We should call it a PRO version because it adds so much more speed, functionality and options.  The response we have gottten wanting us to get back on track has been worldwide and enormous.  Its very satisfying to hear how people are modding it and adding to even the LITE version.    Thanks guys for keeping this thread alive.  I didn't know if I was going to  live much longer and this project is as close to my heart as a baby, Its my progeny. ;)  The Docs say I'm currently cancer free btw.  Chemo and radiation suck hard.Esp the radiation side effects. Thanks again guys!



#21 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 17 March 2014 - 01:14 AM

hi Grif, Congratulations on winning the battle with cancer! that is great! and thanks for keeping us posted on your really cool ap! maybe you can host the .apk on reboot? not everyone utilize google playstore.

CONGRATULATIONS on your WIN!

#22 slothman

slothman

    Newbie

  • Members
  • 26 posts
  •  
    United States

Posted 23 March 2014 - 08:09 PM

Well I just managed to compile vblade for android.

 

So now we have a working AoE target.

 

I tested it out and it seems to work well.

 

I target most of my builds for Android 2.2 due to some programs requiring certain functionality introduced with 2.2

 

It *may* run on Android 2.1, but no guarantees.

 

Here is the link: http://d-h.st/2EO

 

To get the client part to work, you need the kernel module and the aoe tools.

 

I have the aoe tools compiled, but they are not tested.  Generally I like to test my stuff before I release it.

 

If you want to create your own aoe kernel module, you'll need the source for your android kernel.

 

Working on iSCSI target now, but it is annoying to fix all the parts where they use linux functionality not present in android...


Edited by slothman, 23 March 2014 - 08:14 PM.


#23 slothman

slothman

    Newbie

  • Members
  • 26 posts
  •  
    United States

Posted 28 May 2014 - 06:35 PM

Well since for some reason I can't edit my post, here's an update.

 

Apparently dev-host is not that good for hosting files long-term.

 

So I've uploaded vblade to a lot more hosts.

 

Still working on compiling the iscsi target, haven't really had time to work through all the linker errors.

 

http://ge.tt/8g2lf6i1/v/0

http://rghost.net/55939061

http://www62.zippysh...55883/file.html

http://www.sendspace.com/file/kyakqa

http://www.solidfile...d399b938/vblade

http://d01.megashare...php?d01=N74P9zu

http://www.sockshare...4A540B143255961

https://www.tusfiles.net/oae363hk1dll

http://sharesend.com/83zeczix

http://www.gigasize....get/b6wzmrx2j4c

http://depositfiles....files/dwbjgy5mr

http://www.datafilehost.com/d/fa3ab972

http://bitshare.com/?f=vwv8t07z

http://bayfiles.net/...v/8o1Plg/vblade

https://anonfiles.co...799df4cec5dc3dc

http://turbobit.net/pm5umeyuvtqj.html

 

I think that should be enough lol


Edited by slothman, 28 May 2014 - 06:36 PM.


#24 slothman

slothman

    Newbie

  • Members
  • 26 posts
  •  
    United States

Posted 02 June 2014 - 01:20 AM

Another update.

 

Disregard the vblade from the previous post, it will not work in 100% of android systems.

 

The new one I've just compiled should.

 

http://ge.tt/7jX7Lei1/v/0

http://rghost.net/56075643

http://www65.zippysh...67791/file.html

http://www.sendspace.com/file/e64azh

http://www.solidfile...3c560e86/vblade

http://d01.megashare.../XN939Rp/vblade

http://www.tusfiles.net/hi7t3k6cs61b

http://sharesend.com/ze9lh61u

http://www.gigasize....get/48fx8j6o00f

http://depositfiles....files/uxanh6lha

http://www.datafilehost.com/d/e2d43c51

http://bayfiles.net/...G/sEnkCU/vblade

https://anonfiles.co...f9f5620b6209950

http://turbobit.net/zprqfhx2l319.html

 

Just a note to self, I had to leave out sockshare and bitshare, they're currently being retarded.







Also tagged with one or more of these keywords: android

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users