1. AaylaSecura's Avatar
    Greetings! I have read lots of guides on how to run scripts at boot time, most suggesting the safe way using Script Manager. But I'm encountering an odd issue:
    I installed dropbear via opkg as described here and I wrote a script that would execute as root and start it. The script executes fine when I run it manually (either from SManager or from my terminal emulator using sh) and I am able to connect to my phone via ssh. However, when I set SManager to run the script at boot, the script executes fine, the processes are running (I can see them in the output of ps), the output from the processes (saved to log files) is the same as when I run them manually (and the connection can be established), but there is no TCP port associated with dropbear. I check using netstat - when I run the script manually, I can see the listening port, but not when the script is run automatically. Consequently, I cannot connect to my phone even though dropbear is running and reports it's listening on the port I specified. I tried adding a 2 minute delay in the script before dropbear is started (to allow the device to fully boot up) and I can confirm dropbear is started well after every other process, but the result is the same. I'm not sure if this is a problem with dropbear, SManager or something else.
    I tried putting the script in /etc/init.d and making it executable, but it is not being run at all, I don't think scripts there are being read (there is no such entry in /init.rc that checks scripts in /etc/init.d).
    I'm running SlimBean 4.2.2 on Samsung Galaxy S with 3.0.71-Semaphore_JB_2.9.18s kernel. Here follows the script:

    # dropbear and ssh are installed in /data/local/bin
    export PATH=$PATH:/data/local/bin
    sleep 1s
    dropbear -p 42549 -v &>/sdcard/droplog
    sleep 1s
    # set up remote port forwarding (reverse ssh) to my PC so I can connect to my phone through its network's firewall
    ssh -TfN -o "GlobalKnownHostsFile /data/.ssh/known_hosts" -p 4713 -R 4714:localhost:42549 tcpfwd@<my-PC's public IP address> &>/sdcard/sshlog &
    06-28-2014 05:18 AM

Similar Threads

  1. Replies: 18
    Last Post: 09-22-2015, 05:23 AM
  2. Replies: 2
    Last Post: 08-21-2014, 09:30 AM
  3. Replies: 1
    Last Post: 06-28-2014, 07:22 PM
  4. any way to boost Verizon LTE signal where I'm at?
    By sdsubball23 in forum Samsung Galaxy S5
    Replies: 1
    Last Post: 06-28-2014, 06:08 AM
  5. my LG F100L not connect with google play
    By Arvind Sinha in forum Legacy Android & Other OS's
    Replies: 1
    Last Post: 06-28-2014, 02:32 AM