Jump to content


Photo

linux tools coming to MCR

- - - - -

  • Please log in to reply
215 replies to this topic

#61
PaulOBrien

PaulOBrien

    It's My Party

  • Founder
  • PipPipPipPipPipPip
  • 36,368 posts
  • Gender:Male
  • Location:Norwich, UK
  • Devices:All the Nexus!
  • Twitter:@paulobrien
64 please! :)

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


#62
paulsmith

paulsmith

    Regular

  • MoDaCo Silver
  • PipPip
  • 75 posts
  • Devices:HTC Hero , Advent Vega


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

  • 0

#63
teknologist

teknologist

    Diehard

  • Members
  • PipPipPipPip
  • 460 posts
  • Location:Paris, France
  • Devices:HTC Hero, NexusOne
  • Twitter:@teknologism

64 please! :)

P



Me too...


TIA!

E

  • 0

#64
freeasabeer

freeasabeer

    Regular

  • Members
  • PipPip
  • 88 posts
  • Location:Paris, France
  • Devices:HTC Hero

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.

  • 0

#65
freeasabeer

freeasabeer

    Regular

  • Members
  • PipPip
  • 88 posts
  • Location:Paris, France
  • Devices:HTC Hero

Me too...

TIA!

E


Paul & teknologist: for the x86_64 version I need to be back at home this evening !

  • 0

#66
paulsmith

paulsmith

    Regular

  • MoDaCo Silver
  • PipPip
  • 75 posts
  • Devices:HTC Hero , Advent Vega
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 :)

  • 0

#67
PaulOBrien

PaulOBrien

    It's My Party

  • Founder
  • PipPipPipPipPipPip
  • 36,368 posts
  • Gender:Male
  • Location:Norwich, UK
  • Devices:All the Nexus!
  • Twitter:@paulobrien
I'm going rsync nightly my photos from my phone to my server, then on my desktop pc do the same to pull them down. Awesome! :)

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


#68
freeasabeer

freeasabeer

    Regular

  • Members
  • PipPip
  • 88 posts
  • Location:Paris, France
  • Devices:HTC Hero

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, 15 January 2010 - 02:24 PM.

  • 0

#69
bandroid

bandroid

    Newbie

  • Members
  • Pip
  • 9 posts
  • Devices:htc hero
Hell yeah rsync!
Thank you!

  • 0

#70
paulsmith

paulsmith

    Regular

  • MoDaCo Silver
  • PipPip
  • 75 posts
  • Devices:HTC Hero , Advent Vega
"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

  • 0

#71
freeasabeer

freeasabeer

    Regular

  • Members
  • PipPip
  • 88 posts
  • Location:Paris, France
  • Devices:HTC Hero
 

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 Attached File  busybox_resolvconf_friendly.zip   569.89KB   38 downloads... 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, 17 January 2010 - 06:01 PM.

  • 0

#72
intronauta

intronauta

    Newbie

  • Members
  • Pip
  • 17 posts
  • Devices:HTC HERO

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

  • 0

#73
Loxley

Loxley

    Newbie

  • Members
  • Pip
  • 43 posts
  • Devices:Hero

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 [url="http://google.de""]http://google.de"[/url].

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

It's getting interesting.

Have a nice day

Niki

  • 0

#74
freeasabeer

freeasabeer

    Regular

  • Members
  • PipPip
  • 88 posts
  • Location:Paris, France
  • Devices:HTC Hero
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.

  • 0

#75
Loxley

Loxley

    Newbie

  • Members
  • Pip
  • 43 posts
  • Devices:Hero

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

  • 0

#76
pulser

pulser

    Diehard

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

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


Bit of a silly question, I believe, but if you put those nameservers into resolv.conf, would that make the phone use them for 'normal' browsing etc, over 3G connection? I have been wanting to do this for a while, as T-Mobile's are a bit sluggish, but not as bad recently. I found other DNS servers (like google) I can ping a lot faster than theirs.

If so, do I just need to pop in the modified busybox that reads the resolv.conf file?

If not, any ideas about how to 'setprop' them and then 'force' them to not be changed by DHCP. I can get them temporarily, but they change back if the connection drops even momentarily :)

Cheers

Edited by pulser, 18 January 2010 - 08:59 AM.

  • 0

#77
freeasabeer

freeasabeer

    Regular

  • Members
  • PipPip
  • 88 posts
  • Location:Paris, France
  • Devices:HTC Hero
No, not at all. Busybox world and android applications world are 2 separate worlds.

  • 0

#78
Catscrash

Catscrash

    Newbie

  • Members
  • Pip
  • 48 posts
  • Devices:HTC Hero
Wow, thats really great, thanks a lot...

I see a lot of you seem to know quite a bit about android dns-system...

please have a look at my problem here: http://android.modac...n/#entry1110270 that would be soooo great!

Thanks

  • 0

#79
pulser

pulser

    Diehard

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

No, not at all. Busybox world and android applications world are 2 separate worlds.


I suspected that :)

I'm trying to figure out where in the Android/Linux system the actual 3G connection takes place, and if there are any scripts used to make the connection. Any ideas if there is anything in Linux that would be making the connection (I'm guessing something to do with /dev/rmnet0)

Thanks for confirming though.

  • 0

#80
Loxley

Loxley

    Newbie

  • Members
  • Pip
  • 43 posts
  • Devices:Hero

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.


Works like a charm over here. What did you do?

Thanks

niki

  • 0




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users