[9fans] 9P on android

143 views
Skip to first unread message

Enrico Weigelt

unread,
Aug 27, 2009, 4:25:26 AM8/27/09
to

Hi folks,


I just purchased an G2-Touch phone (running Android) - a really
cool toy, but it lacks 9P support ;-o

Maybe someone's already working on this issue ?


cu
--
----------------------------------------------------------------------
Enrico Weigelt, metux IT service -- http://www.metux.de/

phone: +49 36207 519931 email: wei...@metux.de
mobile: +49 174 7066481 icq: 210169427 skype: nekrad666
----------------------------------------------------------------------
Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme
----------------------------------------------------------------------

David Leimbach

unread,
Aug 27, 2009, 10:39:29 AM8/27/09
to
I'm interested in doing some stuff with the Palm Pre.  I'm actually looking at the javascript implementations of it as well.  I just have practically no time to invest these days in this stuff.

I think someone already got some of the plan 9 userspace tools on here though.

Dave

J.R. Mauro

unread,
Aug 27, 2009, 11:43:37 AM8/27/09
to
On Thu, Aug 27, 2009 at 4:20 AM, Enrico Weigelt<wei...@metux.de> wrote:
>
> Hi folks,
>
>
> I just purchased an G2-Touch phone (running Android) - a really
> cool toy, but it lacks 9P support ;-o

I don't know how open Android is, but if you could cross-compile the
v9fs modules (or compile them on the phone, if they let you get the
toolchain on it), you'd be in business. Otherwise, there's always one
of the userspace solutions, such as 9pfuse.

C H Forsyth

unread,
Aug 27, 2009, 11:49:42 AM8/27/09
to
>I'm actually looking at the javascript implementations of [9p] as well.

has javascript finally got support for binary data?

David Leimbach

unread,
Aug 27, 2009, 12:55:11 PM8/27/09
to
On Thu, Aug 27, 2009 at 8:59 AM, C H Forsyth <for...@vitanuova.com> wrote:
>I'm actually looking at the javascript implementations of [9p] as well.

has javascript finally got support for binary data?

I haven't been following.  I find a lot of "web stuff" to be off-putting, so I've not been keeping up.  base64 encoding stuff is crap but could suffice in a pinch.

Dave

erik quanstrom

unread,
Aug 27, 2009, 1:01:10 PM8/27/09
to
> I haven't been following. I find a lot of "web stuff" to be off-putting, so
> I've not been keeping up. base64 encoding stuff is crap but could suffice
> in a pinch.

uh, i don't think so. 9p2000 doesn't have a base64 encoding option.

- erik

David Leimbach

unread,
Aug 27, 2009, 1:17:21 PM8/27/09
to
As long as the server can deal with decoding and turning it into 9p again, it's nearly the same thing (albeit a 9p proxy).

I'm looking at these two implementations here to figure out how they work if binary javascript doesn't...


Dave
 


- erik


Skip Tavakkolian

unread,
Aug 27, 2009, 1:27:52 PM8/27/09
to

no direct binary support; but that's not the only problem. if
you're talking about using javascript inside the browser, you're stuck
with http and -- because there can only be one outstanding
request -- with continuous polling.


Tim Newsham

unread,
Aug 27, 2009, 3:10:11 PM8/27/09
to

Did Javascript not support binary data in the past? It seems
to support it fine in my browser at least. Here's a transcript
from a javascript shell session in my browser (note, top line is
most recent, bottom line is oldest):

http://www.thenewsh.com/shell.html

Eval: for(var i = 0; i < x.length; i++) _print(x.charCodeAt(i) + "\n");
Return: undefined
255
254
3
2
1
0
Eval: x = "\x00\x01\x02\x03\xfe\xff"
Return:

> Dave

Tim Newsham
http://www.thenewsh.com/~newsham/

David du Colombier

unread,
Aug 27, 2009, 3:43:30 PM8/27/09
to
I used Charles Forsyth's 9P implementation in Java (styx-n-9p) to start a
small 9P graphical browser on Android, some weeks ago, and it seems to work
very well.

--
David du Colombier

Roman V Shaposhnik

unread,
Aug 27, 2009, 5:11:01 PM8/27/09
to
On Thu, 2009-08-27 at 10:24 -0700, Skip Tavakkolian wrote:
> because there can only be one outstanding request -- with continuous polling.

Unless I misunderstood you, this is not quite true. You can have
as many outstanding requests as you have XMLHTTPRequest objects.
And, of course, you can do AJAX Push using various techniques.

So it really is not all that different, except that you have
to strip the HTTP envelope.

Thanks,
Roman.

Eric Van Hensbergen

unread,
Feb 4, 2010, 6:56:32 PM2/4/10
to
Is source to your application available anywhere? I'm getting a
Android tablet and wanted to do some 9P/Plan9 hacking for it and it
sounds like you have a good starting point.

-eric

Rahul Murmuria

unread,
Mar 2, 2010, 12:53:40 PM3/2/10
to
Hi Eric!
I know this thread is a little old now, but I wanted to take a look
into the same thing.

9P on Android!! Its something that could turn out to be an asset to my
project here, that I intend to do.. what's the latest update on it?
Can Google Android be used as a 9P server too, instead of just a java
or php or javascript-based client that connects to a Plan 9 Styx
server? There is this project called npfs (
http://sourceforge.net/projects/npfs/ ) but I have never tried running
a 9P fileserver and so have not a clear idea on the details here.

--
Rahul Murmuria

David Leimbach

unread,
Mar 2, 2010, 1:47:00 PM3/2/10
to
I think the Java Styx code could be changed for writing servers, though it might need some support code to make writing servers a little nicer.

Dave

Tim Newsham

unread,
Mar 2, 2010, 4:57:05 PM3/2/10
to
> Hi Eric!
> I know this thread is a little old now, but I wanted to take a look
> into the same thing.
>
> 9P on Android!! Its something that could turn out to be an asset to my
> project here, that I intend to do.. what's the latest update on it?
> Can Google Android be used as a 9P server too, instead of just a java
> or php or javascript-based client that connects to a Plan 9 Styx
> server? There is this project called npfs (
> http://sourceforge.net/projects/npfs/ ) but I have never tried running
> a 9P fileserver and so have not a clear idea on the details here.

Npfs is in C. You could make java bindings to it, but it would
probably be more work than it's worth.

I've been using a few 9p servers from android. I have
a java library that does 9p service that I'm using. Here's
some code I published that includes the library:

http://9fans.net/archive/2009/10/269

Let me know if you have any questions.

> Rahul Murmuria
>
> On Thu, Feb 4, 2010 at 6:53 PM, Eric Van Hensbergen <eri...@gmail.com> wrote:
>> Is source to your application available anywhere?  I'm getting a
>> Android tablet and wanted to do some 9P/Plan9 hacking for it and it
>> sounds like you have a good starting point.
>>
>>     -eric
>>
>>
>> On Thu, Aug 27, 2009 at 1:41 PM, David du Colombier <0in...@gmail.com> wrote:
>>> I used Charles Forsyth's 9P implementation in Java (styx-n-9p) to start a
>>> small 9P graphical browser on Android, some weeks ago, and it seems to work
>>> very well.
>>>
>>> --
>>> David du Colombier
>>>
>>>
>>
>>
>
>

Tim Newsham | www.thenewsh.com/~newsham | thenewsh.blogspot.com

Rahul Murmuria

unread,
Mar 4, 2010, 8:03:14 AM3/4/10
to
Hi Tim!

On Tue, Mar 2, 2010 at 4:51 PM, Tim Newsham <new...@lava.net> wrote:
> Npfs is in C.  You could make java bindings to it, but it would
> probably be more work than it's worth.
>
> I've been using a few 9p servers from android.  I have
> a java library that does 9p service that I'm using.  Here's
> some code I published that includes the library:
>
>  http://9fans.net/archive/2009/10/269
>

Lovely!! Will check it out.

> Let me know if you have any questions.
>

Be sure to hear from me in the near future!

>
> Tim Newsham | www.thenewsh.com/~newsham | thenewsh.blogspot.com


Best Regards,
--
Rahul Murmuria

Reply all
Reply to author
Forward
0 new messages