Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[9fans] android hacking?

28 views
Skip to first unread message

Tim Newsham

unread,
Oct 7, 2009, 6:36:38 PM10/7/09
to
Anyone playing with android phones? There's a lot of devices
on it that might be interesting to export. Would be pretty
easy to make a 9p server that gives you access to the
GPS positioning, the accelerometer, or processed position
(compass, pitch, roll), etc..
Are any of these of interest to people? Any other features
of interest that I didnt mention?

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

Christopher Nielsen

unread,
Oct 7, 2009, 6:45:40 PM10/7/09
to
I just bought one last week, so I haven't had much chance to hack around on it.
I am definitely interested, though.

Work has been and will continue to be busy, so I haven't had / won't
have much time to work on side projects.

--
Christopher Nielsen
"They who can give up essential liberty for temporary
safety, deserve neither liberty nor safety." --Benjamin Franklin

matt

unread,
Oct 8, 2009, 5:45:40 AM10/8/09
to
Tim Newsham wrote:

> Anyone playing with android phones?


I have a G1 dev but I've not written a single line of code for it

You didn't mention the camera, I try not to !

What would be amazing would be attaching it via USB and importing its
/net (or some other way of turning it into a 3G modem for plan9)

hiro

unread,
Oct 8, 2009, 6:16:02 AM10/8/09
to
> What would be amazing would be attaching it via USB and importing its /net
> (or some other way of turning it into a 3G modem for plan9)

Is there more about it than compiling inferno and simply exporting that device?

matt

unread,
Oct 8, 2009, 7:33:08 AM10/8/09
to
hiro wrote:

I'm sure that would be great, drop me an email when it's finished :)


Anthony Sorace

unread,
Oct 8, 2009, 10:39:00 AM10/8/09
to
as i understand it, "proper" android stuff is meant to be in their
java flavor. you can load C programs, but i think only with the
dev tools. what's more, the system doesn't have the full library
we're used to on unix-like systems. i'd be fairly surprised if our
stuff (inferno, p9p, or drawterm) happened to only use the
subset available there.

which isn't to say it wouldn't be nice to have.

i think the idea of getting at the various devices these things
export would be great. this was part of the GSoC proposal for
getting drawterm on the iPhone/iPod Touch. doing it for
android would be just as neat (especially personally, since
Verizon has said they're getting android phones soon). in either
case, it should be possible to do the export in the "proper"
environment without too much hassle. for android, i'd start by
figuring out which of the java styx libraries use the subset
closest to what android offers.

matt

unread,
Oct 8, 2009, 12:28:20 PM10/8/09
to
Anthony Sorace wrote:

>as i understand it, "proper" android stuff is meant to be in their
>java flavor. you can load C programs,
>

http://google-opensource.blogspot.com/2009/06/introducing-android-scripting.html


http://www.mattcutts.com/blog/android-barcode-scanner/

Just as a proof-of-concept, here’s a barcode scanner written in six
lines of Python code:

import android
droid = android.Android()
code = droid.scanBarcode()
isbn = int(code['result']['SCAN_RESULT'])
url = “http://books.google.com?q=%d” % isbn
droid.startActivity(’android.intent.action.VIEW’, url)

Tim Newsham

unread,
Oct 8, 2009, 12:43:28 PM10/8/09
to

That would probably be enough, but keep in mind that while you
have linux, you dont have X. so you'd have to deal with inferno's
graphics some other way (or just go text mode?)

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

Tim Newsham

unread,
Oct 8, 2009, 12:47:11 PM10/8/09
to
> i think the idea of getting at the various devices these things
> export would be great. this was part of the GSoC proposal for
> getting drawterm on the iPhone/iPod Touch. doing it for
> android would be just as neat (especially personally, since
> Verizon has said they're getting android phones soon). in either
> case, it should be possible to do the export in the "proper"
> environment without too much hassle. for android, i'd start by
> figuring out which of the java styx libraries use the subset
> closest to what android offers.

The java subset is fairly large. I havent tried the existing
styx libs much except to check out that the com.vitanuova.styx
client code works (I dont think it supports server stuff
though). I have my own server 9p code right now so it would
be fairly easy for me to export a simple device like gps
or the accelerometer in pure java. Drawterm would be a lot more
work.

ps: running native C code on the existing phones is fairly easy to
do, although its probably not "really" android and may not be
guaranteed to work on future phones.

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

hiro

unread,
Oct 8, 2009, 7:13:22 PM10/8/09
to
Is the usb port speaking the standard usb storage language?

Tim Newsham

unread,
Oct 8, 2009, 7:35:03 PM10/8/09
to
> Is the usb port speaking the standard usb storage language?

I dont really know the details. If you plug it in you can
talk to it over a debugging interface over the usb ("adb").
But you can also set it up so that the sdcard in the phone
appears to be a drive over the usb port.

The usb connector on the ADP1/htc dream/t-mobile g1
also has some extra pins that have a serial port thats
usually used for a kernel debugger. You can turn that off
and use it as another tty device. Some model phones by
other manufacturers dont have this serial port.

Mostly only my phone I talk to it using the "adb" link
and over tcp/ip to the wifi.

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

matt

unread,
Oct 9, 2009, 8:35:34 AM10/9/09
to
hiro wrote:

>Is the usb port speaking the standard usb storage language?
>
>
>

yes, to the SD card, no idea if you can do anything else with it

Ethan Grammatikidis

unread,
Oct 9, 2009, 10:11:51 PM10/9/09
to

I'm planning on ditching X on my Linux-powered Zaurus. I can't code
for X and it's got that horrible font-breakage which prevents me using
any window manager I'd actually like, so it's going. I may well be
wanting Inferno to output to the Linux framebuffer in the near future.

Actually I'd really like to make my own somewhat Plan 9-like window
system. It seems possible using Mesa, I'm much happier programing
OpenGL than X, but it's the biggest project I've ever embarked on so I
sure don't want to promise anything, even to myself.

--
Ethan Grammatikidis

Those who are slower at parsing information must
necessarily be faster at problem-solving.

Enrico Weigelt

unread,
Oct 29, 2009, 4:09:52 PM10/29/09
to
Tim Newsham wrote:
> Anyone playing with android phones? There's a lot of devices
> on it that might be interesting to export. Would be pretty
> easy to make a 9p server that gives you access to the
> GPS positioning, the accelerometer, or processed position
> (compass, pitch, roll), etc..

That's one of the next things on my 2do list ;-)

We're currently designing a new (9p-based) interface for these
kind of vector devices @gpm-dev.

Once that's done, I'll try to use my G2's accelerometer as
mouse replacement ;-)


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

cellphone: +49 174 7066481 email: in...@metux.de skype: nekrad666
----------------------------------------------------------------------
Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme
----------------------------------------------------------------------


Tim Newsham

unread,
Oct 29, 2009, 7:12:55 PM10/29/09
to
> We're currently designing a new (9p-based) interface for these
> kind of vector devices @gpm-dev.

What's gpm-dev? Can you provide more info?

> cu

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

Enrico Weigelt

unread,
Nov 24, 2009, 7:50:23 PM11/24/09
to
* Tim Newsham <new...@lava.net> wrote:
> >We're currently designing a new (9p-based) interface for these
> >kind of vector devices @gpm-dev.
>
> What's gpm-dev? Can you provide more info?

The developer maillist of the "General purpose mouse" (GPM) project.

GPM is the standard driver for mice (and similar devices) on
Linux and provides things like copy-on-paste on the console.

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

0 new messages