Jump to content


Photo

linux tools coming to MCR

- - - - -

  • Please log in to reply
215 replies to this topic

#21
kendon

kendon

    Addict

  • Members
  • PipPipPipPipPip
  • 923 posts
  • Devices:HTC Hero, ZTE Blade

wget is actually included in busybox, so there won't be any need for a separate binary. :)

Open up a shell and type busybox and you will be presented by the number of compiled in programs ready for use.

lol, i could've come up with this myself :) should check busybox features more often when fooling around with the phone... thx for the tip.

as for the debian idea: i had both debian and ubuntu on my phone, even ubuntu with gnome running :)
it is just not that comfortable to use. you have to start it somehow via bootdeb, you need to shutdown before you can restart your phone and all this. imho this is too much trouble if you just want some simple tools at hand. for example i have an alias as='adb shell', so whenever i want a command executed on android i just put as in front of it.
i'd prefer to have them statically linked ( :) whatever that means, i guess something like standalone executable), as they are easy to include in roms this way. correct me if i am wrong, more than typing make to compile something and i am so out of there...

fwiw here is my list of aliases i use when fooling around with android, remount is a script i created in /system/bin, you can guess what it does:

alias as='adb shell'
alias asll='adb shell ls -alh'
alias aslog='adb logcat|tee logcat.txt'
alias asro='adb shell remount ro'
alias asrw='adb shell remount rw'
alias assd='adb shell mount /sdcard'
alias cdhero='cd /media/data/hero'
alias vnchero='vncviewer hero:5901'
alias sshero='ssh root@hero -p 2222'

  • 0

#22
fyremoon

fyremoon

    Regular

  • MoDaCo Silver
  • PipPip
  • 97 posts
  • Location:St Leonards, UK
  • Devices:HTC Hero/T-mobile G2
  • Twitter:@fyremoon

Once installed, you can start screen with: /data/xbin/screen and resume an ongoing session with /data/xbin/screen -r

Enjoy !


I copied screen and screen.real into /system thinking that I wouldn't have to type the path, but it then asks for files in /var/run/utmp. :)

screen still runs though, bizarre! :)

  • 0

#23
PaulOBrien

PaulOBrien

    It's My Party

  • Founder
  • PipPipPipPipPipPip
  • 36,369 posts
  • Gender:Male
  • Location:Norwich, UK
  • Devices:All the Nexus!
  • Twitter:@paulobrien
/data/init.sh is run at first boot, so you could run inetd from there.

P

  • 0

You can follow me on Twitter - http://twitter.com/paulobrien / Follow MoDaCo on Twitter - http://twitter.com/modaco

Want to donate? MoDaCo is raising money for the Multiple Sclerosis society.

Posted Image


#24
stevenz

stevenz

    Diehard

  • MoDaCo Silver
  • PipPipPipPip
  • 473 posts
  • Gender:Male
  • Location:Wellington, New Zealand
  • Interests:Motorcycling
    Tinkering
  • Devices:OG Tab, Note, Touchpad, N7
  • Twitter:@KnightNZ
I realise this is probably a stupid question, but do you guys have any examples of what you're wanting to achieve by running this level of shell functionality on the Hero? As much as I'd like to have a fully functional remote Linux shell to ssh into from my Windows PC at work, I'm not sure it'd be of a great deal of use.

Please prove me wrong, I might stick Ubuntu onto it just "because I can", but I doubt I'd get a lot of use out of it, pretty sure I've seen someone's (Kendon's?) screenshots of remote X11 VNC sessions which would be amusing, but is vnc practical on such a "low-end" device? (this from someone who used to run Slackware on a PC with a crusty DX/2 66Mhz Cyrix CPU o/clocked to 80mhz years ago).

Suggestions of uses would be interesting :)

@Kendon - Statically linked binaries have any required library code embedded, dynamically linked ones call the external libraries (smaller executables). Portability vs. size.

Edited by stevenz, 14 January 2010 - 02:55 AM.

  • 0
Motorcycling watchmaker.

#25
pulser

pulser

    Diehard

  • Members
  • PipPipPipPip
  • 432 posts
  • Gender:Male
  • Location:/dev/null
I

just tested tree in connectbot, works great.

Cheers, kendon. Must have missed this post during a merge, either that or I'm going blind. :???

  • 0

#26
Olatho

Olatho

    Newbie

  • Members
  • Pip
  • 16 posts
Now, if there only were a nice terminal-widget (not application, but a 4x4 widget I could stick on one of mye homescreens), this would be really great.
But thanks a lot for your work, all of you!

  • 0

#27
kendon

kendon

    Addict

  • Members
  • PipPipPipPipPip
  • 923 posts
  • Devices:HTC Hero, ZTE Blade

I realise this is probably a stupid question, but do you guys have any examples of what you're wanting to achieve by running this level of shell functionality on the Hero? As much as I'd like to have a fully functional remote Linux shell to ssh into from my Windows PC at work, I'm not sure it'd be of a great deal of use.

well, you could use rsync to syncronize directories when toying around with the bootscreen for example, also tree. actually it is all just a matter of how easy it can be to do something. with these tools many things become a one-click thing, you can't do anything you couldn't do before, but you can do it more easily.

edit: and yes, actually just because we can.

Edited by kendon, 14 January 2010 - 08:38 AM.

  • 0

#28
paulsmith

paulsmith

    Regular

  • MoDaCo Silver
  • PipPip
  • 75 posts
  • Devices:HTC Hero , Advent Vega
thanks for rsync - much appreciated.

Im assuming as its in update.zip format - we install by using the RA tools (rebooting , holding home key - like you would another ROM or radio)?

  • 0

#29
Vano13

Vano13

    Newbie

  • Members
  • Pip
  • 1 posts
  • Gender:Male
  • Location:Moscow, Russia
  • Devices:HTC Hero
Paul, it would be nice if you include mc in the MCR. Android's shell is almost unusable comparing to complete linux shell (bash, csh, etc). mc can help doing many things much faster:)

Edited by Vano13, 14 January 2010 - 09:43 AM.

  • 0

#30
PaulOBrien

PaulOBrien

    It's My Party

  • Founder
  • PipPipPipPipPipPip
  • 36,369 posts
  • Gender:Male
  • Location:Norwich, UK
  • Devices:All the Nexus!
  • Twitter:@paulobrien
I wonder how I can get rsync running as a CRON job?

P

  • 0

You can follow me on Twitter - http://twitter.com/paulobrien / Follow MoDaCo on Twitter - http://twitter.com/modaco

Want to donate? MoDaCo is raising money for the Multiple Sclerosis society.

Posted Image


#31
paulsmith

paulsmith

    Regular

  • MoDaCo Silver
  • PipPip
  • 75 posts
  • Devices:HTC Hero , Advent Vega
Cron job running on the phone would be ace for rsync - especially if it will turn on the wi-fi and turn off when finished.

My old iPhone had rsync but no cron, I used to have a cron job running on my main media box that would try and rsync every 10mins. Not great but it was great for backing up my phone camera photos and adding audio/video to the phone. Saved my bacon when I dropped it in a cup of tea - phone was kaput but all my photos were safe.

I've tried to play around with the android app locale - but I think it COULD be the cause of slow downs on my phone. Giving up on it

  • 0

#32
PaulOBrien

PaulOBrien

    It's My Party

  • Founder
  • PipPipPipPipPipPip
  • 36,369 posts
  • Gender:Male
  • Location:Norwich, UK
  • Devices:All the Nexus!
  • Twitter:@paulobrien
I use Y5 to turn on wifi when i'm at home and off when I go out. I use locale too tho.

P

  • 0

You can follow me on Twitter - http://twitter.com/paulobrien / Follow MoDaCo on Twitter - http://twitter.com/modaco

Want to donate? MoDaCo is raising money for the Multiple Sclerosis society.

Posted Image


#33
freeasabeer

freeasabeer

    Regular

  • Members
  • PipPip
  • 88 posts
  • Location:Paris, France
  • Devices:HTC Hero
cron and crond are already in busybox, so isn't it just a matter of tweaking the init.sh to get crond started ?

  • 0

#34
Marcony0

Marcony0

    Regular

  • Members
  • PipPip
  • 112 posts
  • Gender:Male
  • Devices:Samsung Galaxy Nexus
  • Twitter:@marceldy
this soo feels like many of the familiar Linux forums :) sometime's i feel i should have continued my computer science degree rather doing medical science :\ oh well..

cron job would be interesting :)

  • 0
Follow me on Twitter !

#35
kieranc

kieranc

    Newbie

  • Members
  • Pip
  • 37 posts
  • Devices:HTC Hero

vi? Pah! Nano ftw! :)

P

n00b :) nano sux!
nice idea though, screen is very useful, i can see rsync being handy too!

  • 0

#36
PaulOBrien

PaulOBrien

    It's My Party

  • Founder
  • PipPipPipPipPipPip
  • 36,369 posts
  • Gender:Male
  • Location:Norwich, UK
  • Devices:All the Nexus!
  • Twitter:@paulobrien
Interesting, should have checked busybox, didn't realise crond is in there!

P

  • 0

You can follow me on Twitter - http://twitter.com/paulobrien / Follow MoDaCo on Twitter - http://twitter.com/modaco

Want to donate? MoDaCo is raising money for the Multiple Sclerosis society.

Posted Image


#37
stevenz

stevenz

    Diehard

  • MoDaCo Silver
  • PipPipPipPip
  • 473 posts
  • Gender:Male
  • Location:Wellington, New Zealand
  • Interests:Motorcycling
    Tinkering
  • Devices:OG Tab, Note, Touchpad, N7
  • Twitter:@KnightNZ
By default BB crontab seems to look in /var/spool/cron/ and doesn't like working with a uid of 0. The folder can be specified with the -c switch, but if I point this at /etc/ and put the crontab in there the log says "ignoring crontab", along with all the other files in /etc/ - so it either doesn't like the filename or something within it.

I've just got;

* * * * * echo "New line" >> /data/cronout

in the crontab at the moment, guessing it's looking for a user-level file and not finding it due to no uid's?

  • 0
Motorcycling watchmaker.

#38
redcow

redcow

    Newbie

  • Members
  • Pip
  • 46 posts
  • Devices:HTC Hero
If somebody needs it, I compiled for myself at the beginning of my android experience :) nmap, netcat, joe, hts/htc, kismet, aircrack, wireless-tools,gpsd.. as static compiled binaries. For all the non daily use stuff I'm using debian in a chroot environment (bootdeb) much more flexible.

Edited by redcow, 14 January 2010 - 07:34 PM.

  • 0

#39
kendon

kendon

    Addict

  • Members
  • PipPipPipPipPip
  • 923 posts
  • Devices:HTC Hero, ZTE Blade

If somebody needs it, I compiled for myself at the beginning of my android experience :) nmap, netcat, joe, hts/htc, kismet, aircrack, wireless-tools,gpsd.. as static compiled binaries. For all the non daily use stuff I'm using debian in a chroot environment (bootdeb) much more flexible.

nmap please :)

has anyone tried tcpdump?

  • 0

#40
Andcr

Andcr

    Regular

  • Members
  • PipPip
  • 53 posts
  • Devices:HCT Hero (Euro)
YAY! rsync on my Hero!!
thanks a lot for this, I have been googling for this the last few weeks but nothing turned up.
This is amazing, gonna have a play with it :)

I checked for cron earlier this week but got the message "crontab: unknown uid 0" when running crontab -e
rsync + cron would be even more amazing :)

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users