Jump to content

linux tools coming to MCR


Guest freeasabeer

Recommended 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!

Link to comment
Share on other sites

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
Link to comment
Share on other sites

Guest paulsmith

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)?

Link to comment
Share on other sites

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
Link to comment
Share on other sites

Guest paulsmith

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

Link to comment
Share on other sites

Guest Marcony0

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 :)

Link to comment
Share on other sites

Guest stevenz

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?

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

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.

I know nc (netcat) is part of busybox, so that is one less thing to think about.

Link to comment
Share on other sites

Guest freeasabeer
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 :)

This is because there is no /etc/passwd file...

You can add one that contain the following line:

root::0:0:root:/data:/system/xbin/ash

but then you will face: chdir (/var/spool/cron/crontabs): no such file or directory !

Need to check if we can tweak crontab config in busybox...

Link to comment
Share on other sites

thanks for the info!

I'll be sure to keep an eye on this thread :)

still learning more and more about Linux every day :)

Edited by Andcr
Link to comment
Share on other sites

This is because there is no /etc/passwd file...

You can add one that contain the following line:

root::0:0:root:/data:/system/xbin/ash

but then you will face: chdir (/var/spool/cron/crontabs): no such file or directory !

Need to check if we can tweak crontab config in busybox...

call crond -c to define an alternate crontab directory, for instance:

crond -c /data/data/crontabs

Link to comment
Share on other sites

Guest stevenz

Made the /etc/passwd file containing;

root::0:0:root:/data:/system/xbin/ash

Created /etc/root with

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

Started crond using;

crond -l 0 -L /var/log/cron.log -c /etc (-l and -L switches are just for excessive logging)

crond tries to run scripts via /bin/sh so symlinked /bin to /system/bin to keep it happy.

And bingo, crond happily running amending a line to a file once a minute.

The crontab command needs the -c switch to change the working folder to /etc as well ifyou use that for anything.

Edited by stevenz
Link to comment
Share on other sites

Guest freeasabeer
but then you will face: chdir (/var/spool/cron/crontabs): no such file or directory !

Need to check if we can tweak crontab config in busybox...

Checked: this is actually something we can set in busybox configuration.

Paul, would you mind to build a new busybox with something that make more sense for the crond spool directory ? By the way, could you also enable the bbconfig applet so that we can extract busybox configuration file from the binary ?

Link to comment
Share on other sites

Checked: this is actually something we can set in busybox configuration.

Paul, would you mind to build a new busybox with something that make more sense for the crond spool directory ? By the way, could you also enable the bbconfig applet so that we can extract busybox configuration file from the binary ?

What about adding:

mkdir /var

mkdir /var/spool

mkdir /var/spool/cron

mkdir /var/spool/cron/crontabs

to /etc/init.rc so that it creates these folders automatically after it mounts /system, would that do it?

Link to comment
Share on other sites

Here's a busybox with bbconfig enabled and with the crond directory set to /data/cron. Feels like a good idea to work together to also get busybox as 'right' as possible for Android. :)

Incidentally, busybox compilation with the Google toolchain is indeed a PITA, I use codesourcery.

P

If busybox was recompiled to resolve exactly like ping does, the network functions will work properly. Currently, none of them can resolve an IP from a hostname. Its almost like it needs a /etc/resolv.conf, not all that useful.

Link to comment
Share on other sites

Guest freeasabeer
Here's a busybox with bbconfig enabled and with the crond directory set to /data/cron. Feels like a good idea to work together to also get busybox as 'right' as possible for Android. :)
Great! Yeah, I think there are still too much applets in your busybox.... the more obvious to me being ftpd, httpd, telnetd, udhcpd, syslogd and maybe some more.

Well, unless we want a real unix system in parallel to android ...

Incidentally, busybox compilation with the Google toolchain is indeed a PITA, I use codesourcery.

I use my own brewed toolchain.... optimized for armv6j / arm1136jf-s (the cpu inside the MSM7200) and with compilation switch set to optimize for speedĀ  :)

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.