Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I want to use WinSCP to transfer data to my phone over wireless. I've enabled dropbear on my phone. WinSCP connects, but crashes after trying pwd. Logging in with PuTTy, I can see that pwd is returning a blank line:

/data/dropbear # pwd

/data/dropbear # which pwd
/system/xbin/pwd
/data/dropbear # busybox pwd
/data/dropbear
/data/dropbear # ls -l /system/xbin/pwd
lrwxrwxrwx    1 root     root             7 Apr  1 23:30 pwd -> busybox

Coming from an OpenWrt background, that dropbear setup seems normal to me. Why is this shell printing blank lines? My device is a Motorola Droid running Cyanogenmod 7 RC4.

share|improve this question
    
What do you get if you just run busybox without any parameters? It looks like that's what's happening on your first line, since as you say, pwd is just a link to busybox. –  Matt H Apr 3 '11 at 20:08

2 Answers 2

up vote 2 down vote accepted

Can you replace the pwd symbolic link with a script that just runs 'busybox pwd'?

Or would an alias work?

share|improve this answer

The behavior is different because dropbear uses a different shell than the terminal app. A workaround would be to just use the same shell as the terminal app:

echo "/system/bin/sh" > /data/dropbear/.profile

Be advised that this contradicts the Cyanogenmod wiki, which instructs you to use the busybox shell: /system/xbin/busybox sh

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.