yashsingh1/xdaforums huggingface dataset:
[EVO 4G Android Development] sbecht:
How to charge battery when USB is dead.

I ran into this exact same issue. Thanks so much for posting this, as it saved me!

I thought I'd share a quick bit on charging the battery while in this state.

If you put the PC36IMG.zip on the root of your SD card, you can simply hold down the power and volume down on boot and then after it validates your PC36IMG.zip, select yes to update and during and after the update process, prior to rebooting, it will charge. Kind of a strange way to make it charge, but I'm not sure any other options really exist. Perhaps fastboot USB?
[EVO 4G Android Development] joeykrim:
android sdk is a package which must be downloaded from google. it is a developer toolset to work with the phone.

google "download android sdk" . there is also a tutorial on here for using the progam called "adb" which is inside the android sdk. good luck!
[EVO 4G Android Development] cuban4lf:
ok ive downloaded it already... still gives me error...
[EVO 4G Android Development] joeykrim:
the title of this thread is, [Fixed] Well looks like I killed my EVO already... (Lost SD & USB) in the evo 4g developer board, not help me troubleshoot setting up my android sdk properly in the evo 4g questions board...

on that note, please use the guides provided on XDA, by google and on the internet for properly configuring the android sdk toolkit. please use the questions board for questions and the developer board for development.

we are all more than happy and willing to freely devote our time and labor to assist you and all we ask is you help us by doing your part in researching your issue to the best of your efforts, clearly stating what command you're typing and the exact error it is giving you and posting it in the appropriate section on XDA being the questions board in this instance.

thanks and welcome to the forum!

here are some links from typing in "xda adb setup" in google.com

http://xdaforums.com/showpost.php?p=3591882&postcount=1

http://ip208-100-42-21.static.xda-developers.com/showthread.php?p=6653566

even found a youtube video! http://www.youtube.com/watch?v=XH-lEMvkNKc&feature=related
[EVO 4G Android Development] kloneD:
+rep saved me from buying another SD card which still wouldn't have fixed my issue.

Thanks!
[EVO 4G Android Development] cuban4lf:
thanks to all that helped !! I GOT IT FIXED !!! does anyone knw how this happend ?? so we dont do it again !!
[EVO 4G Android Development] tmidle8575:
Count me as another this saved. I vote for a sticky! Also, maybe a thread title change to make it a little clearer for those searching for a solution to the problem. I literally thought the OP had LOST their SD and USB, not lost the ability to use them. That was until I read the thread at least. :) Thanks again. STICKY THIS!
[EVO 4G Android Development] mumford:
I had the SD as well as USB problem. I was able to fix the SD using the instructions in this thread. I'm having problems fixing the USB.

I have done the root procedure described in " [TUTORIAL] How To Root The HTC EVO ~ Part-1 \0/ "

When I get to this step in connectbot:

I get this message:

Any ideas would be greatly appreciated. Thank you.
[EVO 4G Android Development] looneylu:
thanks a lot for this... this saved my @$$
[EVO 4G Android Development] Breakthecycle2:
OK, I had this issue. I used the fastboot fix and now I cannot use my USB. It won't mount or charge. I tried to use the USB fix and I had the SPC_xxx. Any fixes I can try?
[EVO 4G Android Development] maback:
Thank you! Saved me too.
[EVO 4G Android Development] Breakthecycle2:
Yeah I fixed mine too. Great work.
[EVO 4G Android Development] plmiller0905:
Does this permanently fix the "sd card not being detected" issue or do the issue still exist after you do this process?

Just wondering because I'm starting to have some of these issues.

Thanks
[EVO 4G Android Development] RyanLee:
My message was something like "SD card has been removed" and it was fixed permanently.
[EVO 4G Android Development] plmiller0905:
Thanks i got that message last night also. But that was the first time I got it. I think I'm going to do this fix because I'm starting to have more issues with it now.
[EVO 4G Android Development] cac9478:
thank you jesus for this thread!
[EVO 4G Android Development] _Burst_:
hey calk, or anyone else that can answer this.

I am having the issue where i plug my USB cord in and it will charge but not ask if I want to mount or not. Is that this problem or not?

Also, if it is this problem and I end up having to flash mtd0.img, does it interfere with root at all? Im asking because we had to flash the mtd-eng.img to misc to aquire full root right? Wont this flash over that partition?
[EVO 4G Android Development] plmiller0905:
That's similar to my problem. I plug my Evo in and it charges. It doesn't ask me if I want to mount or not either. I cn change it to "Charging" by dragging the taskbar down, but it never used to be like that. Now It just automatically mounts and my Sd Card opens up.

I tried the fix on the first page and it didn't work. If I don't find a fix soon and this issue really gets at me, then I'm going to return to stock, test it then and see if the problem is still there. If it is I'm sending my mine in.

If it's not, then I'm assuming it's something to do with full root and/or the rom I'm using.

People here on this thread stated that their SD Card wasn't even being recognized. So I doubt any of them had our problem. Our's is recognized it's just not doing what it suppose to do when when connected to the computer.
[EVO 4G Android Development] cac9478:
goto settings>connect to pc and check the box next to "ask me"
[EVO 4G Android Development] plmiller0905:
Thanks but I did that. I connected to the PC and it did the same thing again.
[EVO 4G Android Development] tatnai:
Help! think I may have bricked my bro's evo. here's what I did (already rooted my to nand, flashing roms, know how to use adb BASICS)

did part 1 root. booted fined after the initial flash of PC36IMG. no probs. tried to flash damagecontrol v3.0, got a boot loop. tried flashing the rooted .6 supersonic, gave me an error halfway, and got boot loop. reflashed PC36IMG, and says "sd card not mounted, please insert sd card".

tried any fastboot command from within fastboot on the phone and within android sdk tools folder, I always get < waiting for devices > like it is not connected. I don't have anything on the PC asking for device drivers or anything, like it is not seeing the phone. If I can't send commands to fastboot from my pc, how do I fix this? will try reflashing pc36img, anyone know what I'm doing wrong? help!

EDIT: got it to work (sheepishly plugs in the other end of the USB cable to the computer).

LIFESAVER, STICKY THIS
[EVO 4G Android Development] xtravgnt:
Just got the usb/sd card issue and I'm having this same problem with permission denied even though I followed the root tutorial:confused:
[EVO 4G Android Development] spaum:
The reboot command does not work for me in connectbot, any idea why?
[EVO 4G Android Development] xtravgnt:
Well now I'm not getting that error but a /sdcard/flash_image: not found error

I have the file on the /sdcard directory and it's named flash_image not sure what the problem is:confused::mad:
[EVO 4G Android Development] toastcfh:
Did u unzip flash_image
[EVO 4G Android Development] Siberian_Khatru:
How do I put files onto the sd card if my computer isnt recognizing the sdcard through usb? I have fixed the evo not recognizing the sd card.
[EVO 4G Android Development] lafrad:
I have this same issue... How to get the files to the phone without removing SD Card.... (phone can see SD Card...)
[EVO 4G Android Development] tatnai:
You'll need an SD card reader if your usb still isn't working
[EVO 4G Android Development] lafrad:
heh... bummer... I'll have to go pick one up.

I tried the "e-mail to myself" bit... seems I get a different error...

it won't write the mtd0.img file to the device:

MEMGETBADBLOCK returned 1...

not writing bad block ...

error writing misc: no space left on device

*edit* Seems like this fixed it anyway!

yay!

Seems like a permissions thing... yet root is sufficient?
[EVO 4G Android Development] lafrad:
Well, Turns out I have the same problem as before.

The writing to the /data/ directory allows it to persist past a reboot, (it seems), but it does NOT persist past a power-off.

# /data/flash_image misc /data/mtd0.img
mtd: MEMGETBADBLOCK returned 1 at 0x00000000 (errno=0)
mtd: read all-zero block at 0x00020000; skipping
mtd: not writing bad block at 0x00000000
error writing misc: No space left on device

This is done from a adb shell... USB works on the restart after typing it in on the device, it just didn't seem to persist past a reboot...
[EVO 4G Android Development] xtravgnt:
Got it working I had to add .bin to flash_image to make it work during the shell commands.
[EVO 4G Android Development] lafrad:
Well, I'm out of ideas.

Phone can get the USB "enabled" by using this method, but it will not persist past most power-downs. RUU is even failing.

It appears something is messed up with the partitioning of the system... as I'm unable to write to the /system mount, even when its remounted in read/write. (out of memory)

"mount" reports:

mount
rootfs / rootfs ro 0 0
tmpfs /dev tmpfs rw,mode=755 0 0
devpts /dev/pts devpts rw,mode=600 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0
none /dev/cpuctl cgroup rw,cpu 0 0
/dev/block/mtdblock4 /system yaffs2 rw 0 0
/dev/block/mtdblock6 /data yaffs2 rw,nosuid,nodev 0 0
/dev/block/mtdblock5 /cache yaffs2 rw,nosuid,nodev 0 0
tmpfs /app-cache tmpfs rw,size=8192k 0 0
/dev/block//vold/179:1 /sdcard vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
[EVO 4G Android Development] lafrad:
Well, the thread helped me to get to a stable state to apply the RUU from the OTA update... That fully cleared up all problems.

Now lets cross the fingers and hope I can properly re-root again when I get the time.

Thanks everyone.
[EVO 4G Android Development] nswenson:
Thanks Calkulin,

I had the same issue after trying unlock nand and then update radio twice as the radio didn't appear to flash properly. No USB and no sd card access until I carried out your steps.

Thanks!!

Nathan
[EVO 4G Android Development] lafrad:
I figured out why *MY* phone did this.

At some point, I had upgraded to the new OTA update (.6) and new radio. this was AFTER rooting.

Then, when going back to do the Nand Unlock, it flashed everything back to the original versions of software (Original ROM and Radio). This broke the SD card, and USB.

The procedure to "fix" it (shared in this thread) worked temporarily... but they didn't fix it over repeated reboots, and swapping roms would *always* break it. I was able to "fix" it again by executing the signed, OTA1 RUU.

Fast forward to today: I attempted re-rooting from the working phone. Following toast's 1 of 1 post, I immediately bricked SD/USB. (nice) I then RUU'd to the original, Rootable rom, which remained in bricked state. I fixed the SD card with fastboot, then went back into fastboot and applied the OTA1 RUU agian. SD Card is still fixed, but the USB is still broken... (Still listed in the Device Manager as "Qualcomm CDMA Technologies MSM", 3 times)

I have NOT been able to write to the MISC partition, ever. It errors out, going on about insufficient memory.

Don't quite know where to go from here.
[EVO 4G Android Development] epmacman:
I got the log to run and the phone rebooted but Im confused as to how I'm supposed to move the two files to the sd card if its not showing up in windows via usb?
[EVO 4G Android Development] slvdc1:
Take the sd card out and put it in your computer :-p I had this problem too with sd card (thought my card was corrupt) then would show up as 3X qualcomm devices...etc.

Put those files on sd card, ran the fastboot tool commands and all is well now and have since reflashed without and issues.
[EVO 4G Android Development] lafrad:
Has *anyone* see the MEMGETBADBLOCK error?
[EVO 4G Android Development] Cayniarb:
This is now the second time I have been in this boat. The first time happened after flashing a bad ROM (totally my own fault).

However, today, I was on a call and the phone crashed in the middle of it (totally not my fault).

Since then, I have lost USB connectivity -- but not the same as before, and I still have SD support. Now, when I plug in the USB cord, the phone charges (which it did not do the first time), but I cannot change the connection type (disk drive, htc sync, etc.). I have no USB support in fastboot either.

My drivers are good, and the phone is set to both USB debugging and to ask for the connection type every time.

I put the files in the OP on the SD card and tried the terminal fix there, but no luck.

Any ideas?

EDIT:

It seems that my phone decided to fix itself. I pieced together some info from various other forums that suggested that the solution to this particular problem is removing the battery for about 60 seconds, then turning the phone back on. I did not try this (well, I am sure I did remove the battery for that much time, but not as an attempted fix) so I cannot confirm, but regardless, it appears to only be a temporary problem.
[EVO 4G Android Development] vballboarder:
I got the SD card to read using the first part of this fix, but when I try to fix the USB problem using connect bot, I get this error also:

# /data/flash_image misc /data/mtd0.img

mtd: MEMGETBADBLOCK returned 1 at 0x00000000 (errno=0)

mtd: read all-zero block at 0x00020000; skipping

mtd: not writing bad block at 0x00000000

error writing misc: No space left on device

Then when I type reboot it says "not permitted"

I'm not sure what's going on. Can anyone who's had this problem help out a little. I've spent about 40-50 hours reading all about rooting and adb, etc and I figured it out pretty good, but I'm stuck at this part.

EDIT: Okay, I'm back to having lost SD card and USB recognition, but now I can't get the fix to recognize the usb. When I fastboot, the command prompt just sits there saying "waiting for Device" forever.

any help please. I can't get into recovery because the phone sits on the screen with the red Triangle and the ! in the middle. anyway to bypass having to input the command prompt to get into recovery mode?

Thanks
[EVO 4G Android Development] vballboarder:
Ok, so in device manager where should the drivers show up? I'm not seeing anything resembling drivers for my phone on there. I have Win 7 64bit. the first time I tried this fixed, it worked great and the drivers loaded when I ran fastboot oem, but I'm back to no sd card recognition and no usb and this fix is not working. The only thing I'm thinking is the drivers aren't there and aren't loading automatically.
[EVO 4G Android Development] dougdascenzo:
thank god for this thread. Had the same two problems, took hours for me to figure this out, but both of the fixes worked first try. THANKS!
[EVO 4G Android Development] shadowhawk2020:
Ok, do I need help to figure this out... It installed the bootloader driver, and I went to the command prompt, from the C:\ I typed

fastboot oem enableqxdm 0

fastboot reboot

Nothing happened, so I read further, and it looks like someone on page 4 had to go to c:\~\AndroidSDK\tools to type the command. But my computer does not have that folder. Any ideas? I would hate to have to take this back if it is something fixable.
[EVO 4G Android Development] dougdascenzo:
Edit: I just realized you sound like maybe you didn't even download the sdk yet. If so, you need to download android sdk from here http://developer.android.com/sdk/index.html. I think if you unzip it the stuff you need is right there. Don't even think you need to install it or anything like that.

Okay, two things. For fastboot to work, you first have to turn off your phone, plug it in to your pc, and then turn it on by holding VolDown and Power button to get to the bootloader. In there, you should either see fastboot, or click into bootloader and see fastboot. Can't remember which. If you should here the notification sound on your pc that you just connected something through the usb.

Then to run fastboot commands, you need to figure out where you dropped that android-sdk directory. If it was say, C:\android-sdk, then in command prompt you would you have to type the following:

cd c:\android-sdk\tools\

This puts you in the directory where fastboot and adb executables are located. Now you can run commands against fastboot directory like this

fastboot oem enableqxdm 0

Honestly, you could execute these commands from anywhere in command prompt, you just have to fully qualify the path to fastboot if you aren't in it's directory, which sucks. Like this

c:\android-sdk\tools\fastboot.exe oem enableqxdm 0

Hope this helps.
[EVO 4G Android Development] shadowhawk2020:
Thank you for the help, I am now on to the usb portion of the problem. I am able to load the .zip on my computer for the root, but cannot get it to take the commands to give me recovery mode.

I can type su, but I am getting an error that says read only, any ideas how to push the recovery files through, even if my computer cannot connect to the phone?

Thanks again
[EVO 4G Android Development] dougdascenzo:
Here is what I did, I ran into the same problem. Since you cannot add the files to your phone through your PC since your USB is jacked, browse to the forum and download the files on your phone. Then, download es file explorer if you don't have it and extract the two zip files. Take note of what directory they are in, because they probably will be in /sdcard/download or /sdcard/downloads rather than in the root of the /sdcard. You can either extact them into the root, or just in the download directory and change the commands you are instructed to type to include the download portion of the path.
[EVO 4G Android Development] shadowhawk2020:
Ok, I cannot get it to take this line

chmod 755 /data/flash_image or chmod u+x /data/flash_image

it would take half of it (before the or)

it then took the next line

And it would not reboot, so I pulled the battery and now I have success... Of course I am now gun shy about adding a new rom
[EVO 4G Android Development] dougdascenzo:
haha no worries man sounds like you are good to go. That line with the OR in it, you did it right. Only had to type the first part. Also, the reboot I think might have just been an instruction rather than a command, I just reset the phone like you did.

You sound like you literally ran into every one of the same problems I did. Now, download Rom Manager, open it up, click the first option to flash to Clockwork recovery. Then click the reboot to recovery option in rom manager, then once in there, go to nandroid and make yourself a backup since you are stable :)

What ROM are you on right now? The rooted version of the OTA release and updated radio?

I went to those, backed it up stable. Then I just flashed Fresh3 from Rom Manager and it was easy as 123 through that app. So far is good to go, not any problems.
[EVO 4G Android Development] clocker6633:
Well I have the same problem after trying to flash a custom rom. I was able to fix the sd card problem via the instructions from the op.

But

Even after entering the second set of commands for the usb problem and rebooting I got nothing. No sync to my pc and no charging. Now my batt is dead. Guess I'm screwed?
[EVO 4G Android Development] lafrad:
You can plug your phone in, and keep it "off" (not sleeping). it should charge.
[EVO 4G Android Development] dougdascenzo:
I actually had that happen too, and here is what my problem was. I downloaded the zip files directly on my phone and unzipped them using a zip program on android. I ran the commands, no errors so I think it is all good. Nothing. I go back and check the files and one of them was 0kb. No clue what happened, but I unzipped again and it actually had content, ran the commands and it was good to go.

This is probably a longshot that it is your problem, but worth looking at as a potential solution.
[EVO 4G Android Development] clocker6633:
Thanks for the replies. Yes I discovered it would charge when turned off finally. :)
[EVO 4G Android Development] clocker6633:
I just checked my file sizes to verify. I even redownloaded them to be sure. The flash_image is 75 kb and the mtd0.img is 640 kb.

It's very strange because when I run the copy commands from the shell the 2 image files appear to move without complaint. The chmod command also seems to execute correctly so I'm assuming the permissions on the flash_image file were set correctly. Everything appears to have worked only it doesn't provide the desired results.

Believe me when I tell you that it sucks having to turn off my phone to charge it at nite, even worse during the day. :*(
[EVO 4G Android Development] dougdascenzo:
I just looked at that generator he links to to create your own mtd0.img file and I notice that it uses your ROM version to generate the file. Is it possible that his file worked for most of us because we happened to be on the same ROM version as him, but you are on a different one? What is your version right now. Mine is 1.32.651.6 and that is what it was at the time I ran these fixes too. If yours is different, maybe you need to modify his file or generate your own.
[EVO 4G Android Development] clocker6633:
Interesting thought. I didn't use the CID generator because I followed the op's instructions pertaining to the log file and the INFOCID info. Everything matched so I assumed I was ok. I have since reverted back to the stock rom and run the Sprint ota update. My rom is now also 1.32.651.6. I guess I could unlock it again via unrevoked so I can at least get super user and try again.
[EVO 4G Android Development] lse4:
Fix SD

Press & hold vol down and power on the phone

Select fastboot by pressing the power button

Make sure in device manager the driver is installed(Win 7 x64 downloaded them automatically)

Open command prompt like you would to use ADB and type

fastboot oem enableqxdm 0

fastboot reboot

That should fix your SD card not being detected.

im having a problem my pc is not reconizing my phone and it wont install now for me to do this can anyone help
[EVO 4G Android Development] lse4:
anyone have a video to show how to install the usb cause its not lettting me even charge my phone