In a bad way, need help

Discussion in 'Android Hacks and Help' started by boostedf4, Mar 1, 2011.

  1. boostedf4
    Offline

    boostedf4 New Member

    Joined:
    Aug 24, 2010
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    0
    Hey guys, sorry if this is the wrong forum, but my phone is in a bad way right now. I recently downloaded a bash shell. In the process of copying it to /system/bin/bash somehow my sh shell got messed up. Yes I am rooted, but now I cannot do anything root (or even connect to 3g/wireless/etc) on my phone. I had done a nandroid backup before hand, but I cannot even restore that. I have the sh file, but it appear when I try to push it through using ADB, that it is not getting the proper permissions to execute. Any help here would be appreciated. (This is a Droid 1). I'm really sick to my stomach right now that my phone might be just another piece of junk...
  2. BUFFALOMADMAN
    Offline

    BUFFALOMADMAN New Member

    Joined:
    Aug 9, 2010
    Messages:
    218
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    BUFFALO, NY
    What were you trying to do and did you try shutting it off then trying to get to clockwork by holding x and pressing power button at same time to get to your backup-
  3. jeffv2
    Offline

    jeffv2 Developer Developer

    Joined:
    Dec 23, 2010
    Messages:
    1,240
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    south jersey
    first make sure you type "su" to see if thats the reason your permissions are messed up.. if not then
    try using "adb remount" to mount the /system partition as r/w then push su to /system/xbin then chmod 644 /system/xbin/su
  4. boostedf4
    Offline

    boostedf4 New Member

    Joined:
    Aug 24, 2010
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    0
    As I said, I was just trying to run a bash script in the terminal emulator (curiosity of course). The I noticed the I no longer has my sh script in /system/bin and instead a /system/bin/sh0. I can get the sh script (have a friend that I pulled it off of, although I suspect the sh0 is a "backup"), but I don't think it is getting the proper permissions, so it's not allowing the script to run. My basis on this conclusion is that in adb, it will not launch a shell with "adb shell" because /system/bin/sh does not have the proper permissions.

    I do not have clockwork, but instead I have SPRecovery. I can get into, I tried to do nandroid restore, but it returned an error 20. Every time. That was my first thought...
  5. boostedf4
    Offline

    boostedf4 New Member

    Joined:
    Aug 24, 2010
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    0
    When I type in su into the terminal, it does not grant me su permissions. It "says" it does from the super user app but I still cannot access root. I do not have su available though...
  6. jeffv2
    Offline

    jeffv2 Developer Developer

    Joined:
    Dec 23, 2010
    Messages:
    1,240
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    south jersey
    maybe try echo $SHELL /system/bin/bash or since you have sh0 then try echo $SHELL /system/bin/sh0

    if sh0 is a backup then it'll work as long as you don't need su to run it.
  7. boostedf4
    Offline

    boostedf4 New Member

    Joined:
    Aug 24, 2010
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    0
    Okay, when I do echo $SHELL /system/bin/bash it returns:

    /system/bin/bash

    and echo $SHELL /system/bin/sh0 returns:

    /system/bin/sh0
  8. jeffv2
    Offline

    jeffv2 Developer Developer

    Joined:
    Dec 23, 2010
    Messages:
    1,240
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    south jersey
    yes thats you changing your shell for the time being, after you change you shell to sh0 or bash then try running "su" or try using adb
  9. boostedf4
    Offline

    boostedf4 New Member

    Joined:
    Aug 24, 2010
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    0
    Ah, okay, I should have realized that (being a linux person myself).

    And still no root access with su...still can't run shell with adb...
  10. jeffv2
    Offline

    jeffv2 Developer Developer

    Joined:
    Dec 23, 2010
    Messages:
    1,240
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    south jersey
    hmm... without a proper shell almost nothing can be done to fix this problem, how about flashing via sbf down to 2.0.1 then rooting with z4root or some other rooting application?
  11. boostedf4
    Offline

    boostedf4 New Member

    Joined:
    Aug 24, 2010
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    0
    One of my thoughts was to try rooting again (I used the "Root regardless of OS" method). I could get the sbf to load, but when the update.zip came up in sprecovery, it failed to install it. I really think my phone is just junk now. I just don't understand what happened...
  12. jeffv2
    Offline

    jeffv2 Developer Developer

    Joined:
    Dec 23, 2010
    Messages:
    1,240
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    south jersey
    nah your phone will be fine as long as you have a bootloader on it. use a sbf to flash back to 2.0.1 (because 2.0.1 is easier to root)
  13. boostedf4
    Offline

    boostedf4 New Member

    Joined:
    Aug 24, 2010
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    0
    Okay, I'll do a search for that. Do you happen to have a link on how to do it in case I can't find it?

    I appreciate all your help so far! I'm kind of sick to my stomach right now over this...
  14. jeffv2
    Offline

    jeffv2 Developer Developer

    Joined:
    Dec 23, 2010
    Messages:
    1,240
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    south jersey
  15. jeffv2
    Offline

    jeffv2 Developer Developer

    Joined:
    Dec 23, 2010
    Messages:
    1,240
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    south jersey
    and might i ask what you needed bash for? if you really need it i can help you out with that
  16. boostedf4
    Offline

    boostedf4 New Member

    Joined:
    Aug 24, 2010
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    0
    Okay, thanks.

    Just to be clear (cause I'm nervous after messing up once lol) I go into the boot loader, run rsdlite, load the .sbf file, run it and I will be on 2.0.1 correct? Then I can root it and update it back to the most recent froyo correct?
  17. boostedf4
    Offline

    boostedf4 New Member

    Joined:
    Aug 24, 2010
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    0
    It was curiosity more than anything, I'm used to running bash on my linux box, but after this, I really couldn't care less about it honestly lol. I'll root for what I need it for (over clocking and wireless tether) and leave it be.
  18. jntdroid
    Offline

    jntdroid DF Super Moderator Premium Member

    Joined:
    Nov 18, 2009
    Messages:
    6,437
    Likes Received:
    292
    Trophy Points:
    83
    Location:
    TX
    Were you running stock root or a custom rom before? if you just want stock root, you'll have to re-root it all over again when you update to 2.2. If you want a custom ROM, then what Jeff is saying is probably the fastest way.

    edit: forgot about your nandroid, i'll shut up now
  19. jeffv2
    Offline

    jeffv2 Developer Developer

    Joined:
    Dec 23, 2010
    Messages:
    1,240
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    south jersey
    yeah, after you flash it you'll be back to 2.0.1 then you can reroot & flash a recovery then go back to your nandroid.

    & you probably wont notice much of a difference between sh (Bourne shell) and bash (Bourne-again shell)
    besides scripting simplicity.
  20. boostedf4
    Offline

    boostedf4 New Member

    Joined:
    Aug 24, 2010
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    0
    okay cool. that puts my mind at ease some. Thanks again sooo much for your help. I'm doing proper backups just in case (contacts sms, etc).

    Yeah, I'm used to the simplicity of bash, but, like I said, I'll pass instead of dealing with this haha.