Jump to content

linux tools coming to MCR


Guest freeasabeer

Recommended Posts

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.

Resolv.conf won't help. Busybox needs to be linked against android's own libc.

Peace

Niki

Edited by Loxley
Link to post
Share on other sites
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.

Cool down, I regularly use httpd to access a r/o copy of my personal wiki on my Hero.

Have a nice day

Niki

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

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

Care to share? :)

P

Link to post
Share on other sites
How does one go about achieving this when running a ship version of the OS?

I'm not sure that's possible. You would have to replace the libc headers and object-files in your toolchain with the ones from android. I wouldn't know where to start, though.

I used http://github.com/tmurakam/droid-wrapper together with a conglomerate of the android sources (to get the header's) and parts of the NDK to get some binaries (like crtend_android.o). That is enough to compile not too large projects and link them dynamically. Unfortunately busybox's build-system refused to cooperate. Perhaps it would be easier to work on androids Toolbox

I might give it another try in late February when I have some days off.

Have a nice day

Niki

Link to post
Share on other sites
Guest paulsmith

Im trying to install the rsync binary supplied at the start of this thread using the RA tools.

Im getting the error:

Copying files.........

E: Cant Symlink /system/xbin/ssh

E: Failure at line 14

symlink dropbear SYSTEM:xbin/ssh

Any ideas?

Link to post
Share on other sites
Guest paulsmith

Maybe... was the previous release of rsync already installed on you phone ?

I dont think so - I cannot see rsync in /system/xbin

ssh , scp both sym link to dropbear unlike most of the others that link to busybox. Not sure if thats right or wrong.

Paul

Link to post
Share on other sites
Guest freeasabeer
I dont think so - I cannot see rsync in /system/xbin

ssh , scp both sym link to dropbear unlike most of the others that link to busybox. Not sure if thats right or wrong.

Paul

Hum... if you've got symlinks to dropbear, then you most probably have already installed the previous version before.

I will update rsync update package to 0.3 in a few seconds: that should correct this issue.

Link to post
Share on other sites
Guest paulsmith

Hi again,

I just tried the new 0.3 rsync - at first I thought it had worked as I didn't see any errors when applying the update.zip

The rsync file had not copied over to /system/xbin

However it must have nearly worked - It changed my dropbear sshd config from my change of port 22 to back to port 2222 (I already had the authorised keys -R part) - so it must have done some things right.

Once I copied the rsync from the zip file to /system/xbin by hand it all works.

Using ssh android shell with rsync from ubuntu desktop to android phone worked fine. The other way round - in an ubuntu desktop shell using rsync to copy stuff off the android deive worked great.

Thanks for your help. Nice to have rsync :)

Link to post
Share on other sites
Guest freeasabeer
Hi again,

I just tried the new 0.3 rsync - at first I thought it had worked as I didn't see any errors when applying the update.zip

The rsync file had not copied over to /system/xbin

However it must have nearly worked - It changed my dropbear sshd config from my change of port 22 to back to port 2222 (I already had the authorised keys -R part) - so it must have done some things right.

Once I copied the rsync from the zip file to /system/xbin by hand it all works.

Using ssh android shell with rsync from ubuntu desktop to android phone worked fine. The other way round - in an ubuntu desktop shell using rsync to copy stuff off the android deive worked great.

Thanks for your help. Nice to have rsync :)

You know what: I never said rsync was to be found in /system/xbin... It's just because it is actually in /data/xbin :)

I have taken the following approach:

- if I need to modify something that is currently in /system, then let modify it in /system

- anything else that is new, just go to /data/xbin where Paul already did put its nano editor.

Edited by freeasabeer
Link to post
Share on other sites
Guest paulsmith

"You know what: I never said rsync was to be found in /system/xbin... It's just because it is actually in /data/xbin :) "

Sorry my bad - I never even looked in there - just assumed it was in /system/xbin

Link to post
Share on other sites
Guest freeasabeer

 

Resolv.conf won't help. Busybox needs to be linked against android's own libc.

Peace

Niki

OK, I think I do have now a working busybox with resolv.conf busybox_resolvconf_friendly.zip... So the question now is: how do we get a /etc/resolv.conf that is always updated with the right values ???

Do we need a little daemon that look at net.dns1 property every minute or so and that update resolv.conf accordingly ? 

So far I have made /etc/resolv.conf a symlink to /data/local/resolv.conf and I update this latter file manually with the following script:

#!/system/bin/sh

gw=`/system/bin/getprop net.dns1`

resolvconf=/data/local/resolv.conf

echo "domain lan" >$resolvconf

echo "search lan" >>$resolvconf

echo "nameserver $gw" >>$resolvconf

Edited by freeasabeer
Link to post
Share on other sites
Guest intronauta
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.

How you symlinked /bin to /system/bin???? :)

crond: crond (busybox 1.15.3) started, log level 0

crond: can't exec, user root cmd /bin/sh -c /data/cron/file.sh

I tried with SHELL=/system/bin/sh , but I get the same error :)

Link to post
Share on other sites
OK, I think I do have now a working busybox with resolv.conf... So the question now is: how do we get a /etc/resolv.conf that is always updated with the right values ???

Can anyone confirm this? I just get a "bad address" error when trying something like "wget http://google.de".

Please don't use "ping" to test, as ping is a native binary, not busybox.

It's getting interesting.

Have a nice day

Niki

Link to post
Share on other sites
Guest freeasabeer

I've updated this post with my resolv.conf friendly busybox. I realize now I didn't uploaded it at the time of writing the post.

It also includes latest lscolors and crond config updates from Paul.

Link to post
Share on other sites
I've updated this post with my resolv.conf friendly busybox. I realize now I didn't uploaded it at the time of writing the post.

It also includes latest lscolors and crond config updates from Paul.

Cool. I'll give it a try tomorrow. Do you mind sharing what you did To bb?

Perhaps we should just put Googles nameservers (8.8.8.8 and 8.8.4.4) into resolv.conf.

Good night

Niki

Link to post
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.