• Announcements

    • Reminder - MoDaCo position on illegal content   07/30/15

      ILLEGAL CONTENT I'd like to just reaffirm MoDaCo's position regarding piracy and illegal content in the light of some recent questions / postings. Posts will be censored by myself or my moderation team if the contain or link to: Illegal / pirated / cracked software or sites that host such softwareNintendo emulators / ROMs or sites hosting them (in light of Nintendo's legal stance)CUSTOM ROMS You may discuss and post links to custom device ROMs on MoDaCo, provided the following rules are adhered to: ROMs must not contain any illegal 3rd party software (this includes trial versions included without permission)ROMs must give full credit to the original authorISSUES If you have any issues with this policy, please contact PaulOBrien directly via PM.
    • Reminder: Selling items on the forum directly is not allowed   07/30/15

      Please note that selling items on the forum directly is not allowed by the forum rules. There is a forum for eBay auctions whereby you can list the items on eBay and link to them there. This is the ONLY forum for this type of activity. You may also advertise links to the eBay forum in your signature. Please note that selling directly in contravention of these rules will result in a warning / suspension / ban.

linux tools coming to MCR

216 posts in this topic

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

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
0

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

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
0

Share this post


Link to post
Share on other sites

Posted · Report post

I wonder how I can get rsync running as a CRON job?

P

0

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

cron and crond are already in busybox, so isn't it just a matter of tweaking the init.sh to get crond started ?

0

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

vi? Pah! Nano ftw! :)

P

n00b :) nano sux!

nice idea though, screen is very useful, i can see rsync being handy too!

0

Share this post


Link to post
Share on other sites

Posted · Report post

Interesting, should have checked busybox, didn't realise crond is in there!

P

0

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

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
0

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

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.

0

Share this post


Link to post
Share on other sites

Posted · Report post

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...

0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

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
0

Share this post


Link to post
Share on other sites

Posted · Report post

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

0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

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
0

Share this post


Link to post
Share on other sites

Posted · Report post

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 ?

0

Share this post


Link to post
Share on other sites

Posted · Report post

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?

0

Share this post


Link to post
Share on other sites

Posted · Report post

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

busybox_withbbconfig_crondtodatacron_lscolorenabled.zip

0

Share this post


Link to post
Share on other sites

Posted · Report post

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.

0

Share this post


Link to post
Share on other sites

Posted · Report post

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

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

MoDaCo is part of the MoDaCo.network, © Paul O'Brien 2002-2015. MoDaCo uses IntelliTxt technology.