Problem writing scripts on phone or computer emulator.

Discussion in 'Rescue Squad Guides' started by chrstdvd, Nov 2, 2010.

  1. chrstdvd
    Offline

    chrstdvd New Member

    Joined:
    Sep 30, 2010
    Messages:
    577
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    McKenney Va
    christim originally posted a reply to my thread "adb Lessons?" I have spent the past mouth learning Linux using the cgywin set up on Windows 7 machine.

    Today, I decided to get back into the Android environment and see if I could write some scripts in that environment. I learned how to get the emulator to work and played around with it some.

    Then I open up another command window, type adb devices, it recognizes my emulator and I can go into a shell. I type "cat > test" and get the message "read only". So I went back to ur reply to my post and copied/pasted the string to make rw. I typed my cat statement and got "not enough memory".

    Then I went on my phone and opened the terminal emulator app and typed "remount" and got the message "permission denied", so I typed the entire string that you gave me and got "permission denied" again. I am doing this on the root "/" directory on the phone and emulator.

    I can copy scripts from cgywin to the /system/bin or /usr/bin on the phone or emulator and get them to run, but I can not write a script in either.

    So, I hope you can tell me what I am doing wrong.
  2. chrstdvd
    Offline

    chrstdvd New Member

    Joined:
    Sep 30, 2010
    Messages:
    577
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    McKenney Va
    I figured it out!! On the phone (D2) I went into root explorer and clicked the system to R/W and then exited that app. I opened up the emulator app and typed "su" then I did a "cat > test and that worked, I typed a simple echo It Works but could not figure out how to do a control d to save it. After some panic goggling, I found out that the "ok" on the D2 keyboard is same as "ctrl" key on the computer. I did the "ok d and it saved my new file. Then I typed "sh t" enter and my message popped up. COOOOL!

    Next I tried to write a script with vi, and I can get it to work but can not figure out how to save and exit from vi. I use VIM on the computer and just renamed it to vi and stuck it in the /bin folder. I just hit the "save" icon to save my scripts on the computer. I recon I will have to go to the vi site an learn the real way to operate it on the phone. I need to use vi to edit mistakes from my cat scripts.

    On D2 in vi you hit ok button and c then alt : to get to command line and then wq to write your script to memory and quit vi. Thanks to pool_shark over on D2 forum for helping me work that out.
    Last edited: Nov 4, 2010
Search tags for this page

emulator -avd panic: could not open: test

,

kali android terminal emulator could not execute system bin