# exec '/system/bin/sh' failed: No such file or directory (2)



## Yuan0120 (Sep 9, 2012)

Hello,i get a problem exec '/system/bin/sh' failed: No such file or directory (2) when i root and unlock bootloader 
i try to upgrade rom from 2.3.7 to ics
when i try to unlock bootloader get the problem,:crying:
View attachment 1312639

so i cannot process change kernal..
someone told me try root my phone again to solve this problem..
i follow and get this,


same problem to..
*before that my phone was rooted.

possible fix it? hope someone can help me step by step..


----------



## AJ88 (Sep 9, 2012)

This error says there is no sh file in your device..
Just check by using any root explorer
Go to system>bin in this bin folder There must be a file named sh about 2-4 mb in size.
If not that's the missing file and your problem too..

we all should be polite enough to press thanks for anyone who helped US.


----------



## Renate (Sep 9, 2012)

I don't know exactly what piece of software that you are using, but the core of it is ADB.
adbd (the ADB daemon) on your device can not find your shell.
It doesn't exist at /system/bin/sh
Do you have it somewhere else on your device?
The shell path is hard-coded into adbd
Are you sure that the adbd on your device is the right one?


----------



## x1123 (Oct 27, 2012)

Yuan0120 said:


> Hello,i get a problem exec '/system/bin/sh' failed: No such file or directory (2) when i root and unlock bootloader
> i try to upgrade rom from 2.3.7 to ics
> when i try to unlock bootloader get the problem,:crying:
> View attachment 1312639
> ...

Click to collapse



Just try to reflash with your device with 2.3.7 again. If works, it mean something wrong with your ICS rom. How do you upgrade your rom? did you do via recovery or fastboot. I believed sh file is there but No enough * permissions *. normally works by fixing the permission


----------



## __roberto__ (Mar 31, 2017)

Hi, I encountered the same problem on my AVD device. The problem appeared after that I started the device with "-writable-system" flag. After that, I always have to start the device with this flag to avoid the error that you encountered too.


----------



## Adren gomez (Apr 19, 2018)

Buenas tardes tengo el mismo problema pero el mío es un mate 7 que que me aparece este error al tratar de entrar al sistema al tratar de pedir permiso shell me sale este error - exec '/system/bin/sh' failed no such file or directory (2) el celular está muerto aló que coje carga se enciende y se queda en el logo de Huawei no se reinicia se queda ahí y lo conecto al PC y en modo adb me lo reconoce


----------



## ARDV (Dec 31, 2019)

i get the sane error when i try: adb shell
exec '/system/bin/sh' failed: No such file or directory (2)


----------



## AndreuMCA (Jun 3, 2021)

Some body solved this problem?? I have the same problem with a frozen amazfit stratos: when I try adb shell
- exec '/system/bin/sh' failed: No such file or directory (2) -
using port=5555


----------



## Deleted member 1890170 (Jun 3, 2021)

The EXEC command isn't available on Android ( i.e. part of it's ToyBox command suite )  unless BusyBox command suite is installed.


----------



## AndreuMCA (Jun 3, 2021)

jwoegerbauer said:


> The EXEC command isn't available on Android ( i.e. part of it's ToyBox command suite )  unless BusyBox command suite is installed.

Click to collapse



How can I install BusyBox please?


----------



## Deleted member 1890170 (Jun 3, 2021)

AndreuMCA said:


> How can I install BusyBox please?

Click to collapse



Installing BusyBox basically requires device's Android is rooted - what in turn requires device's bootloader is unlocked and it's dm-veritiy and/or AVB lock is disabled.


----------



## AndreuMCA (Jun 3, 2021)

I'm not sure what you mean. 
I found busybox.exe for windows than I do not know what I have to do with this file, I ran it and created a lot of aplications files
And also I downloaded .apk file and I tried to install it in the amazfit wach using the tool Huami_Amazfit_Tool but do not work because some command use shell or similar and appears again the same error: 
"'/system/bin/sh' failed: No such file or directory (2)"
The main thing is I have a Amazfit Stratos frozen on A logo. I can reboot it on fastboot only using manual method and is unlocked because I introduced the code but all the process to restore than I downloaded or I tried (recovery.bat, flash.bat, unbrick.bat...) all them in some moment use the comand "adb shell something" and here fails all restore process
The strange thing is than worked me installing the Pace firmware, the watch starts but the touch screen not works, and was veeery had back to Stratos because doing this I lost the serial number (null) and the fastboot was locked again so I spend a few hours to restore the watch to the initial point: statos completely frozen but unlocked.


----------

