[Q] Motorola Charm ADB Error: exec '/system/bin/sh' failed: Exec format error (8) - Android Software/Hacking General [Developers Only]

Hi.
First of all I have to say that I found similar threads in this forum such as this and this and this but the problem is, they either provide use SEUS as a solution (which is only for sony ericson) or Flashing the entire phone.
I have a Motorola Charm phone with Android 2.1 firmware, and like everyone else tried rooting my android (using SuperOneClick, which went well) and installing apps2sd, but failed to do so due to lack of memory, and now I've lost the shell access, Wi-Fi, Bluetooth, and what not.
The command "adb shell" gives me this error:
exec '/system/bin/sh' failed: Exec format error (8)
I can't flash the phone due to the contacts, notes, and other important info I have on the phone. If there's a way to backup these info and then flash, please let me know. If there is a solution for this without the need to flash the phone, I'll appreciate it. Any help would be appreciated!
Again thanks a lot for your help. This problem is frustrating and I need my phone back asap!

I don't want to spam but can somebody PLEASE help me out??
This problem is frustrating and I've almost lost half of my entire phone functionality, all I can do is texting and calling. It's no different from an old Nokia phone running Symbian!
I searched everywhere and I found NO acceptable solution for this problem, although it seems to be very common. SEUS only works for Sony Ericson, and I've got a Motorola...

:crying::crying::crying:
There are no other forums better than xda-developers.
Please somebody help me out!

Try to wipe data and cache from stock recovery and let us know what happen

Is there any way to backup those info before wiping the data?
I have a whole lot of notes, contacts, etc which are essential.

Please, I need an answer. I can't just wipe the data, there are info I need to keep. I have to backup the data before flashing the phone...
I've tried several tools such as Wodershare MobileGO, but none of them work because they usually need shell access, and that doesn't work.
Does anyone know about a tool that can backup the internal phone memory without using ADB?

OK I did it but it still didn't work!
I master reset the phone, which wipes all the data and resets the phone back to the factory settings, but the WiFi is still not fixed and now I can't even call since the phone requires me to login and to do that it needs an internet connection...
Nothing was fixed. I'm brain-dead.
Anyone has a solution for this??

So what state is your phone in right now?
Even without shell access, you may be able to explore the filesystem with adb, using the pull subcommand. Finding a usable version of sh (perhaps in somebody's nandroid backup), and pushing it to /system/bin/sh may help you get shell access back.
-Snags

Fixed!!
Snags697 said:
So what state is your phone in right now?
Even without shell access, you may be able to explore the filesystem with adb, using the pull subcommand. Finding a usable version of sh (perhaps in somebody's nandroid backup), and pushing it to /system/bin/sh may help you get shell access back.
-Snags
Click to expand...
Click to collapse
It's good that someone at least is trying to help me...
Good thing I somehow managed to get it fixed!
After talking to the customer service and hearing them telling me that "I've got no choice but to exchange my phone,"; I came up with the idea of erasing the entire internal memory of the phone. I googled, learned that such thing is called Flashing, watched the tutorial, found the right SBF, Flashed my phone, and now everything is back to normal!
Also I found out about Link2SD app, and used this one instead of the script which worked perfect, and now, although I didn't find any custom ROMs for my phone, I have the apps moved to the SD card and the phone functions properly!
However, I'm kinda disappointed with XDA-Developers, based on their reputation. I expected some help. Maybe if someone had told me what to do this would've taken much less time for me. Doesn't matter now tho...
TL;DR:
The solution was Flashing the Phone (instead of Resetting it back to Factory Settings).

Related

/data partition read only - My experience

I have spent a couple of days in hell and would now like to share my experience as a big thank you to the XDA community. However, I am fairly noobish when it comes to Android so if you feel that this does not help, please feel free to delete this entry.
It all began when I restarted my G Tablet and got lots of popus about various applications, including acore, failing. I thought that this was due to me screwing up the system in some way after more or less having followed r34p3rex's superb guide here: http://forum.xda-developers.com/showthread.php?t=827209.
Ignoring this for a moment I tried to install one of the NDK sample apps on the device. This failed with the message: "read only file system". Looking in logcat it was pretty apparent that this was also causing all other applications to fail, since they were logging errors with not being able to write under /data/.
Looking at dmesg output finally confirmed this, where it reported that the /data partition had journal errors and could only be mounted as read only (this was also confirmed by issuing the mount command from within an adb shell).
This led me on a journey from just trying to remount the partition as read only (which failed with no further message), through installing clockworkmod, different versions of tnt lite, formatting and repartitioning (or so I thought), to flashing the device through its APX interface (using nvflash). None of them worked.
Not until I read a post by raydog153 - in this archived thread: http://forum.xda-developers.com/archive/index.php/t-857875.html - did I succeed by re-partitioning the sdcard (under the advanced section).
You could argue that it was stupid to not realize that a re-partitioning was required in the first place - since the ext3 partition obviously had errors and Android does not provide a fsck command (or does it?) - but I guess I thought that this was what was actually being done in other clockwork commands or at least when doing the nvflash, but obviously that was not the case.
Anyway, sorry for the lengthy entry. I just wanted to give back to the community and help others who might get the same problems I had. Also, on the positive side I have learned a lot and, like someone else wrote, I have completely lost my noob fear of bricking my G Tablet.
Keep up the good work, guys! You Rock!
almost a week without problems with FCs, thanks for this usefull info.

[Q] "Lost root" after busybox upgrade - Cannot r/w to / !

[Hopefully I didn't miss this being covered somewhere else, as I am much the same as many of you and get beyond irritated with endless repeat questions. I searched using the best keywords I could think of for the issue, but to no avail. Apologies in advance if this has been covered!]
Alrighty. I've got a TF101, rooted it myself (thank you XDA), running 8.6.5.1.9 i believe, stock rom just with root. Used nvflash and Razorclaw. Worked like a charm.
It's been fine for the last 6 months, no issues. However, I decided to update busybox using its internal updater as I have before with no problems. I noticed I accidentally told it to install to /system/bin instead of /system/xbin, and the only reason I even knew about that was due to having to configure an app to find busybox in /xbin instead of /bin.
Now there's a problem. I can still access the internal virtual sd card, but that's about it. The device can't seem to read or write to the main directory (although it can deal with going DIRECTLY to /mnt/sdcard). Ghost commander can't view the main directory, but ESFile explorer _can_, although root browsing in ESFile Explorer is UNchecked. It shouldn't be able to do what it's doing, and it's only doing it in one of two apps.
As a result, I've got no access to any root apps obviousy, but the wifi is having issues as well, it tries connecting but it can't complete the connection.
I'm toying with just wiping and flashing a new rom entirely, but figured I'd ask before I jump in the deep end of things. I keep backups of stuff, but it's still such a pain in the ass reinstalling things.
Any suggestions? I have a feeling it's something "simple", a link file or ... something which linux gurus would know about and I would not, not being a guru or disciple myself.
Thanks in advance!
If only you have working CWM installed. You could just flash this Superuser3.0.7.
Ah, but the plot thickens. I had superuser on there. I even uninstalled and reinstalled it. No dice.
Update: I said fuggit and did a factory reset. However, my wifi is still not fully connecting to my network although it has no problem finding it. I don't have a recovery image on the external SD and unless i get the network working, will have to wait until tomorrow to get a working microsd->usb adapter to put it on there.
I CAN still get into CWM, thank god.
Current rom is stock 8.6.6.19
Razorclaw gives an error when trying to root.
Also, when trying to moust USB from the recovery menu. it fails, saying "E:unable to upen ums lunfile (no such file or directory).
I am hoping this will magically get fixed after re-installing stock from the SD card ... and that my device isn't somehow crippled.
Sorry for the massive details, but more data = better.
It will magically get fixed
I recommend you flash any Totally stock ota. Then upgrade to the latest OTA, then use my tool PERI (or another) to install recovery and root. Then you should be all fixed up.
Well, it looks like I did get things back on track, but oddly enough, neither of the standard OR modified for root stock ROMs would work. One just wouldn't install, another failed halfway through. MD5s checked out and everything. I had put Revolver 4 beta on there sort of as a "just in case", and that one installed fine (and I was pleased when it displayed "installing Busybox symlinks").
Phew. CLose close call. Now to deal with the bull**** of setting stuff back up again.
However, the question remains: I'm assuming this whole thing happened because of the busybox update and me accidentally installing it to /bin instead of /xbin, and I think it "cleaned up" its own symlinks or something.
I'm not saying don't update your busybox, although I'm sticking with what works and **** upgrading anymore, just be careful...
Thanks for the help!
Recently I used the busybox installer to update my busybox version and it went through great... but after reboot it reverted back to the old version.. And I never touch it since.. don't want to take the hassle further..
There are certain 'plague' versions of busybox that simply don't work. I'd find that list of working BBs and STICK with one that's good. I'm still on 1.63 or someat like that.
Mangraa said:
[Hopefully I didn't miss this being covered somewhere else, as I am much the same as many of you and get beyond irritated with endless repeat questions. I searched using the best keywords I could think of for the issue, but to no avail. Apologies in advance if this has been covered!]
Alrighty. I've got a TF101, rooted it myself (thank you XDA), running 8.6.5.1.9 i believe, stock rom just with root. Used nvflash and Razorclaw. Worked like a charm.
It's been fine for the last 6 months, no issues. However, I decided to update busybox using its internal updater as I have before with no problems. I noticed I accidentally told it to install to /system/bin instead of /system/xbin, and the only reason I even knew about that was due to having to configure an app to find busybox in /xbin instead of /bin.
Now there's a problem. I can still access the internal virtual sd card, but that's about it. The device can't seem to read or write to the main directory (although it can deal with going DIRECTLY to /mnt/sdcard). Ghost commander can't view the main directory, but ESFile explorer _can_, although root browsing in ESFile Explorer is UNchecked. It shouldn't be able to do what it's doing, and it's only doing it in one of two apps.
As a result, I've got no access to any root apps obviousy, but the wifi is having issues as well, it tries connecting but it can't complete the connection.
I'm toying with just wiping and flashing a new rom entirely, but figured I'd ask before I jump in the deep end of things. I keep backups of stuff, but it's still such a pain in the ass reinstalling things.
Any suggestions? I have a feeling it's something "simple", a link file or ... something which linux gurus would know about and I would not, not being a guru or disciple myself.
Thanks in advance!
Click to expand...
Click to collapse
You may have been hit with a bug I introduced.
There was a bug with version 8.0 of my application.
There is not an issue with Busybox V1.20.1.
I apologize for this bug, the application symlinked all applets to Busybox and on some devices there are applets which are unique to the device and should not be replaced by those offered by Busybox.
A simple way to fix this is to simply reflash your rom. You do not need to wipe or clear any data. This will fix the issue and you can update Busybox normally with my application as long as it is version 8.1 or higher.
I apologize for the frustration I have caused, please let me know if I can do anything to help you further. I am trying to find people who were affected to see if I can help rectify the situation.
yeah me too
I guess I should have done a more recent backup. I tell you, there is a reason i have 38 updates waiting, everytime I start going through them, boom blows up in my face

Problem with PhilZ recovery!

Hello,
I thought of myself as a pretty experienced user, but you never learn enough!
However, I flashed some roms (lollipop) that, probably due to my mistakes, screwed up my file system, to the point that my recovery (latest PhilZ) wasn't able to find its backup anymore. Eventually I solved the problem as I was able to find my backups and use them to revert my phone to the rom I wanted to run (Carbon 4.4.4). But I was really annoyed by the fact that my file system was a bit off and still I was having problems with the recovery. So I decided to begin investigating the possibility to restore my phone to factory default. Before going with it, I tried the soft approach, i.e. I used the soft factory reset available from the settings menu. It all seemed fine and I re-flashed a lollipop rom that suited me.
Now the problem is that, after all the ordeal, I decided to make a new backup and so I did. It appears all fine, my recovery can actually "see" it, but I cannot identify it using a root browser! It seems to have disappeared unless I open the recovery and then I see it there. It is located in a folder that I can, of course, access, but,when I do so, I can't find the file!
I tried to put on my phone an old backup (always a PhilZ one), but when I try to put it on the phone I can't find the Backup folder in the Clockworkmod folder!
Anyone has any idea of what is going on and can give me a suggestion on how to overcome the problem?
Thanks
Luca
PS An alternative would be suggesting how to do a restore from a sideload: I thought I saw a similar option, but I can't seem to find it anymore within the recovery's options! I tried also restoring via NRT, but although all seem to go fine and the software return no failure notice, I can't find the backup file that should have been pushed (successfully) on my device!
Its not a recovery issue. Its an L issue.
Best thing to do would be to wipe data and storage then fastboot flash userdata.IMG
http://forum.xda-developers.com/showthread.php?t=2938749
rootSU said:
Its not a recovery issue. Its an L issue.
Best thing to do would be to wipe data and storage then fastboot flash userdata.IMG
http://forum.xda-developers.com/showthread.php?t=2938749
Click to expand...
Click to collapse
Thanks a lot for your help.
How can I find the img. file to flash?
Would it be ok to just go ahead and start from 0 using this:
http://forum.xda-developers.com/google-nexus-5/general/tutorial-how-to-flash-factory-image-t2513701
How can fastboot flash an image file? I've never done that before! As I said, been doing this for a while, but never done this before...I think!
Luca
Alas, after reading your post on one-click toolkits, I'm afraid I'm one of those who thinks they can do things, but rely on simple tools to do them. However, I never (almost never) forgot to make a nandroid backup before flashing a new rom and, to be honest, I'm not a flashoolic. I never, ever bricked my phone (got a few bootloops). If I find a rom that suits my need, I stick with it for as long as I can.
The changes between KK and L are such that are beyond my comprehension, but I try hard to solve the problems I have without bugging everyone at the first obstacle. But now, after fidgeting with my phone for 2 days, I had to give up. With a few words, you singled out the reason why I couldn't come on top of this: things change and I was not informed of how much they did!
Luca
Problem partially solved..I think! Now I can see the folder and found my backup!!
I used the restorecon command you suggested. I couldn't make it work using terminal emulator (just did not accept the su command: why I don't really know). Then I thought about using adb shell via pc and, I really surprised myself; I was able to pull it through. I'm not totally brain damaged as I felt when I couldn't even reproduce the command you indicated. It is probably the application that doesn't work. It was my first time with adb shell, so a new thing learned.
However, now I would like to ask you: if I place in the proper folder the backup folder I saved on my pc, will I be able to restore the nandroid backup? I just need some data that I forgot (trivial things, such as text messages and a few app data, like passwords and stuff) but it would be useful.
Thanks once more for your help.
Luca

cannot use adb to solve continuous reboot - device offline

I have oneplus one came from chineese retailer already rooted and with adware. always meant to reflash with straight CM or with a version of AOSP, but ended up use adb (which I have for development, though I am NOT experienced in using adb, flashing rom or what ever only programming) to disable a number of apps and it seemed to be stable.
More recently I had a phone crash following the crash of an app that I think is the CM app launcher, something begining with t, trebuchet?, i dont recall. Since then the phone keeps rebooting and I cannot seems to use adb, the device is either not present or offline.
I can boot to cyanogen recovery which offers:
- reboot system now
- apply update
- apply from adb
- choose from internal storage
- wipe data/factory reset
- wipe cache partition
- wipe media
If I select apply from adb then the device is nolonger offline but in sideline mode, but I don't think this is what I want.
I never liked CM and I had always thought that I might try to flash with a version of AOSP if possible and I wondered if now was the time. I thought TWRP might be useful for this and the first step to installing this was:
C:\...\Downloads>adb reboot bootloader
but I get
error: closed
I briefly see the debugging notification before the phone reboots but in adb it is always not present or offline.
How do I get to the point of either solving my repeating reboot at least or preferably installing a version of AOSP that would be compatible with OnePlus One, preferably without destrying data. I think the data is in a different partition or something but I have forgotten the little I learnt about this a few years ago.
I would be so grateful of some help and learning, right now to all intents and purposes I have a nice looking brick.
hardya said:
I have oneplus one came from chineese retailer already rooted and with adware. always meant to reflash with straight CM or with a version of AOSP, but ended up use adb (which I have for development, though I am NOT experienced in using adb, flashing rom or what ever only programming) to disable a number of apps and it seemed to be stable.
More recently I had a phone crash following the crash of an app that I think is the CM app launcher, something begining with t, trebuchet?, i dont recall. Since then the phone keeps rebooting and I cannot seems to use adb, the device is either not present or offline.
I can boot to cyanogen recovery which offers:
- reboot system now
- apply update
- apply from adb
- choose from internal storage
- wipe data/factory reset
- wipe cache partition
- wipe media
If I select apply from adb then the device is nolonger offline but in sideline mode, but I don't think this is what I want.
I never liked CM and I had always thought that I might try to flash with a version of AOSP if possible and I wondered if now was the time. I thought TWRP might be useful for this and the first step to installing this was:
C:\...\Downloads>adb reboot bootloader
but I get
error: closed
I briefly see the debugging notification before the phone reboots but in adb it is always not present or offline.
How do I get to the point of either solving my repeating reboot at least or preferably installing a version of AOSP that would be compatible with OnePlus One, preferably without destrying data. I think the data is in a different partition or something but I have forgotten the little I learnt about this a few years ago.
I would be so grateful of some help and learning, right now to all intents and purposes I have a nice looking brick.
Click to expand...
Click to collapse
Did you try factory reset?
Thank you so much for your the suggestion, I appreciate it.
Not yet I haven't. I'm not familiar with the CM Recovery Software and the option is entitled "wipe data/factory reset". Do you happen to know if this means bother or either and if selecting this explains more and gives options before proceeding. Key is I want to avoid wiping data if possible because while most is sync'd offline some is recent and not or not for particular reasons.
If there's a choice then will "factory reset" leave personal data alone? Do you know, will the factory reset likely be to version/adaptation of CM put on by rooting retailer PLUS anoying/mal/ad/ware apps put on by rooting retailer.
If this is my only option then I will go ahead and do it and take the hit.
If following this, it is possible to install a stable Android 7.n.n AOSP only that will support the hardware and leave data intact (ONLY LEAVE DATA IF POSSIBLE) I would be very grateful for a clear and complete script to achieve this. I was a professional developer for 20 years, now semi-retired, so I know what I know and what I don't know in terms of foundational knowledge, taking care etc etc, but I am very inexperienced in flashing phones and using ADB except the fact the eclipse/android studio uses it.
I used a windows script to install fastboot if that is any help (though the script did show some errors it still said "All Done!" at the end. Tried to C&P the errors but failed). I can also try to install TWRP (or what ever) if that's any help.
Many thanks would really appreciate your help in my getting my OnePlus One working and stable again.
Andrew.
hardya said:
Thank you so much for your the suggestion, I appreciate it.
Not yet I haven't. I'm not familiar with the CM Recovery Software and the option is entitled "wipe data/factory reset". Do you happen to know if this means bother or either and if selecting this explains more and gives options before proceeding. Key is I want to avoid wiping data if possible because while most is sync'd offline some is recent and not or not for particular reasons.
If there's a choice then will "factory reset" leave personal data alone? Do you know, will the factory reset likely be to version/adaptation of CM put on by rooting retailer PLUS anoying/mal/ad/ware apps put on by rooting retailer.
If this is my only option then I will go ahead and do it and take the hit.
If following this, it is possible to install a stable Android 7.n.n AOSP only that will support the hardware and leave data intact (ONLY LEAVE DATA IF POSSIBLE) I would be very grateful for a clear and complete script to achieve this. I was a professional developer for 20 years, now semi-retired, so I know what I know and what I don't know in terms of foundational knowledge, taking care etc etc, but I am very inexperienced in flashing phones and using ADB except the fact the eclipse/android studio uses it.
I used a windows script to install fastboot if that is any help (though the script did show some errors it still said "All Done!" at the end. Tried to C&P the errors but failed). I can also try to install TWRP (or what ever) if that's any help.
Many thanks would really appreciate your help in my getting my OnePlus One working and stable again.
Andrew.
Click to expand...
Click to collapse
Okay,since you want to flash Aosp N,leave that factory reset thing.
https://forum.xda-developers.com/showthread.php?t=2788632
This thread should be enough atm.Everything has been explained,and it's just simple copy paste,so,even if you're unfamiliar with adb,you should be able to do just fine.
Just follow,install adb/fastboot drivers,unlock bootloader,and flash twrp.
Now,unlocking bootloader will format internal storage,which means everything....but,a simple adb command should be able to back everything up into your pc.
Ensure your adb/fastboot drivers are already installed,and using adb devices in cmd shows your connected device id,before below process!
adb backup -apk -shared -all -f C:\Users\NAME\backup.ab
Where "NAME" is the name of your Windows user name.
On the device, a new screen should appear. If you want to encrypt the backup, enter a password -- otherwise, tap Back up my data. The backup will begin, and you'll find the backup file in the folder declared in the backup command.
Depending on how much data your device holds, this process can take quite some time.
The restoration process is simple. Connect the device to be restored and (from the same location you issued the backup command) enter the command:
adb restore C:\Users\NAME\backup.ab
Where NAME is the name of the same Windows user from the backup process.
Again, depending on how much data is on the backup, the restore process can take some time.
Click to expand...
Click to collapse
When you're done doing all of this,just follow any rom's thread instructions to flash that rom.
Btw,you're on Cos13.1.x,yes?
So sorry for not replying to say thank you sooner, I have been busy with family issues.
Thank you so much for your response, I really appreciate it. I shall take a look at this soon and try to get regular android N on the phone soon. Thank you.
I'm just starting to read and work through this. Just to clarify, re my original post, is the fact that my phone is continually rebooting and that adb shows the device as offline a problem? Will I still be able to use adb to backup the phone contents? Do I need any special understanding to do that?
I finally came back to this and flashed a new rom carbon rom. I only noticed afterwards that there is very little support for this rom and I've had some issues.
If you think the issues are in some way generic and you have come accross them before you may have some ideas:
- there is no built in task manager and third party ones do not seem to cover the apps I am interested in. Any ideas why there is no built in task manager anymore like there used to be and how one might be able to turn it back on?
- the camera does not work and the open camera I installed instead has some image faults (or misunderstood feature). Big line down the middle of the image.
Any ideas.

Bypassing lock on old ZTE FLASH N9500

Found my old phone from high school. Turned it on and looks like I never factory reset it, and I would love to see all of the photos and messages I left behind, however I can not for the life of me remember the pin I used. Browsed around and tried to delete the gesture.key using ADB but permission is denied, and I wasn't able to find a custom recovery tool for this specific phone either. Anyone have any possible solutions? Thank you
Shiiiba said:
Found my old phone from high school. Turned it on and looks like I never factory reset it, and I would love to see all of the photos and messages I left behind, however I can not for the life of me remember the pin I used. Browsed around and tried to delete the gesture.key using ADB but permission is denied, and I wasn't able to find a custom recovery tool for this specific phone either. Anyone have any possible solutions? Thank you
Click to expand...
Click to collapse
If you cannot remember the PIN, you're most likely going to have to factory reset. There is no way around this that I know of, unfortunately.
you can just dump the whole userdata partition off flash memory in EDL mode, loop mount partition image from linux and modify it's content (like deleting locksettings.db)
Shiiiba said:
Hi there, thanks for responding to my forum post. I can give it a shot, however I was wondering if you would be willing to help me with attempting this. Im familiar with root and devices but I’ve not had any experiencing with dumps or tools like the one you provided on github. I have an extra ZTE Flash to test on but some extra insight would be nice. I also had two questions:
1: can I just take the locksettings.db and somehow retrieve my pin from it instead of modifying and dumping?
2: if I do end up having to dump, will the environment be the same (IE logged in apps, id like to see my message history in apps that are there)
Thanks so much, and sorry for disturbing.
Click to expand...
Click to collapse
you need a firehose programmer matching your SoC and OEM. the tool comes with collection (loaders) for quite few devices, just give it a try.
1. might be possible with password.key
2. yes by just deleting locksettings.db nothing is changed

Categories

Resources