Welcome to the Android Central Forums Create Your Account or Ask a Question Answers in 5 minutes - no registration required!
Results 1 to 4 of 4
  1. Thread Author  Thread Author    #1  
    Cawt's Avatar

    Posts
    2 Posts

    Default Android terminal emulator

    Hello,
    just got Samsung Galaxy S II and I'm trying to open a file in terminal emulator for android.
    The file is named 'setup.sh'. When I type 'sh setup.sh' in terminal, it writes back 'Can't open setup.sh'
    The file is saved on the phone.
    Anyone knows how to open it? What I am doing wrong?
  2. #2  

    Default Re: Android terminal emulator

    Try typing in the file path before the command, eg

    $ /system/bin/sh setup.sh.

    I don't know if you need to add the "sh" before... Just going by fuzzy memory here.

    Sent from my LS670 using Android Central Forums
  3. Thread Author  Thread Author    #3  
    Cawt's Avatar

    Posts
    2 Posts

    Default Re: Android terminal emulator

    Thanks for reply. I placed the file on phone(I believe it's internal sd card) and it's just remains there, what can be file path for it?
    Also, do you know what is directory for root of internal sd card?
  4. #4  

    Default Re: Android terminal emulator

    Quote Originally Posted by Cawt View Post
    Thanks for reply. I placed the file on phone(I believe it's internal sd card) and it's just remains there, what can be file path for it?
    Also, do you know what is directory for root of internal sd card?
    Well, I'm just learning about this, too. Thanks to your question, I was able to find some interesting information about Android!

    To find out how the internal flash memory is divvied up, you type

    $ cat /proc/mtd

    That shows you the "blocks" of the internal memory.

    I'm not exactly sure how to run your file, but I know how to run other binary files. First, put the file you want to run on the root of your sd card. (/sdcard)

    Second, open the terminal emulator and type $ su to change to superuser. The cursor should change from a $ to a # symbol.

    Then type # mount -o remount, rw -t yaffs2 /dev/block/mtdblock /system. This changes the permission on the /system files to read write.

    Then move the file from the SD card to the binary folder with # cat /sdcard/yourfilename > /system/bin/yourfilename

    Then do # chmod 755 /system/bin/yourfilename

    After that, the file should run from within the /system/bin directory. Also remember, to change back the memory to read only with # mount -o remount,ro -t yaffs2 /mtd/block/mtdblock5 /system.

    I got a lot of this information from this website, if you are interested in learning more:

    http://www.freeyourandroid.com/guide...mands-android#

    Sent from my LS670 using Android Central Forums

Similar Threads

  1. Decent terminal emulator app that works on Evo?
    By Darth Mo in forum HTC EVO 4G
    Replies: 2
    Last Post: 10-01-2010, 10:54 AM
  2. Terminal Emulator
    By marko358 in forum HTC EVO 4G Rooting, ROMs, and Hacks
    Replies: 12
    Last Post: 09-29-2010, 10:42 AM
  3. Terminal Emulator? Maybe a silly question..
    By Fabrian in forum Motorola Droid X
    Replies: 0
    Last Post: 09-24-2010, 01:21 PM
  4. Rooting with Better Terminal Emulator on Droid X, need help
    By BrownHornet72 in forum Motorola X Rooting, ROMs, and Hacks
    Replies: 0
    Last Post: 09-16-2010, 12:29 AM
  5. trouble trying to run a script on terminal emulator
    By borgey401 in forum Motorola Droid Rooting, ROMs and Hacks
    Replies: 4
    Last Post: 04-23-2010, 02:40 AM

Posting Permissions