HELP! Legend doesn't see anymore my SD card! - Legend General

Hi, sorry if i waste your time, but happens to me a problem with my htc legend.
Before write you i try many times and search a lot on google for find solution to my issue. For start, sorry for may bad english..
After do a nandroid backup to my htc legend rooted, i tryed rodrigezsstyle rom; than i wanna back to my settings and i did a nandroid restore. After the restor my legend was restored, BUT it doesn'r read the sd card and it doesn't sync with the pc. I can't install the pc driver, i can't flash an original rom and i can't flash different rom. And, now, i don't see in software the Superuser Permission.
The phone make yours, data, calls, sms, mail are ok, but i can't do nothig more. the sd was in the phone but it doesn't read it.
Please help me to make all ok, i thing that HTC support and warranty are loose.
Thank you
thank you
thank you
I do this: root - flash rom 2.xx root- nandroid backup -
flash rodriguez style rom - nandroid restore - puf, the phone doesn' read sd card.
There is a step by step guide for make my phone able to read the sd card, please help me?
LITTLE NEWS:
Now i put phone in fastboot usb and i try with suxcess to flash the 1.31.405.5 signed rom, but legend doesn't see sd card anyways......
sorry for my bad english
Money for who help me to make all issues ok!!!!

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.
Fix USB
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 boot
It will give you a log, look for the line that says INFOCID is SPCS_001, if it says something different, then use the generator below to create one(or hex edit the one I posted)
Download the mtd0.img attached or use this CID generator made by stevebrush over @ Modaco to create a custom one
Download the flash_image attached
Unzip both zips and copy both files to the SD card
Open a terminal emulator(I used ConnectBot) and type
su
cat /sdcard/flash_image > /data/flash_image
cat /sdcard/mtd0.img > /data/mtd0.img
chmod 755 /data/flash_image or chmod u+x /data/flash_image
/data/flash_image misc /data/mtd0.img
reboot
And that should fix the USB issue
-----
Last question:
Now usb seems ok and the PC can read the phone like a external storage, but i have error with HTC sync. How can i do?
thank you

SD Cards not recognized by phone, but work in Computer
Since last night - out of the blue - my HTC Legend doesn't recognize any SD Card anymore. I tried 3 different ones (8GB, 2GB, 1GB, different brands), but ES File Manager or Astro say 'no SD Card mounted' and under 'Setting/SD & Phone Storage' the Mount/Dismount Options are greyed out (also Camera and Gallery say 'please insert SD Card').
All Cards work flawlessly on the PC, the 8 GB I was using so far has still all my apps, music, pics, videos. Copied files to HD, re-formatted and copied back, no change.
I tried Factory Reset to no avail. Then I tried to connect via Fastboot with USB Debugging enabled, installed ADB and did the command 'fastboot oem enable qxdm 0' upon which it said 'Okay!.....0.13ms' or something like that. Still not SD Card showing up.
Rebooting several times, cleaned contacts with nail polish remover, connected to PC or unconnected. No change.
Has anyone another idea what I could try to get it working again? Thanks a million!

nomad4ever said:
...Then I tried to connect via Fastboot with USB Debugging enabled, installed ADB and did the command 'fastboot oem enable qxdm 0' upon which it said 'Okay!.....0.13ms' or something like that. Still not SD Card showing up.
Click to expand...
Click to collapse
For the SDCard:
Reboot your phone to the bootloader screen. Plug it into your computer and enter into fastboot on your phone.
On your computer, use the command prompt and target the directory where fastboot is stored. Eg) /AndroidSDK/tools/
Then type: fastboot devices
This should return your Legend's serial number. Then type fastboot oem enableqxdm 0 <---- NOTICE THAT THERE IS NO SPACE BETWEEN "enable" and "qxdm"!
The reason I'm repeating these instructions is because your post suggests you didn't do it correctly. USB Debugging is irrelevant in this case since your phone is at the bootloader screen. ADB is irrelevant in this case too since we're not using ADB commands. Also, when the SDCard isn't being recognized, many people find that ADB isn't working either.
For ADB (If yours isn't working):
Check Post # 104 here: http://android.modaco.com/content-page/299174/no-adb-no-sd/page/100/#
Make sure you input "chmod 755 /data/flash_image" in the terminal emulator after you enter "cat /sdcard/mtd0.img > /data/mtd0.img" and before "/data/flash_image misc /data/mtd0.img".
If the SDCard still isn't recognized, it may be a hardware issue. Good luck!

Thank you jaStorm for the detailed explanations! I tried it again step by step with the same result. I think it was just my mistake before, producing a space in my previous post.
'fastboot devices' gives out my serial number
>HT045xxxxxxx fastboot
and 'fastboot oem enableqxdm 0' gives out
> ... OKAY [0.031s]
finished. total time: 0.031s
>
upon 'fastboot reboot' the device reboots properly, but still without the SD Card coming back:
> rebooting...
finished. total time: 0.016s
>
I'm not so clear yet about the steps in the post #104 you mentioned. It seems to be for the USB not recognized. Would it probably help for my SD Card issue also?
I tried 'fastboot oem boot' and my CID is 'HTC__044'. So if I understand it correctly, I would have to take the image file there, edit the CID number and try to copy it somehow into the /data directory of my phone? My phone is not rooted (still Stock 2.2 HTC Sense). I have a Terminal Emulator installed on the phone, but what now?
Can I download the image probably, if I sent it to myself via e-mail to the device? I could maybe also FTP it. Sorry, am I bit clueless here, regarding the steps on how to get the modified file into the device and if it would work without rooting! Rooting for my device would require downgrading/flashing the firmware, for which I would need the SD Card again.
Thanks for your help though!

U saved my life........thx a miliooonnnnnnnnn..........i really love this forum!!!!!!!!!

thank you
thanks alot you saved my phone yaar .. thank u sooo much

Related

[Q] SD Card removed, but it's there!

i am using modaco rom ,after reset for me showing no sd card......some one help me......
USB Brick
read this thread:
http://forum.xda-developers.com/showthread.php?t=733713
no way.....its not working showing
C:\sdk\tools>chmod 755 /data/flash_image
'chmod' is not recognized as an internal or external command,
operable program or batch file.
C:\sdk\tools>cat /sdcard/flash_image > /data/flash_image
The system cannot find the path specified.
smartsreenath said:
no way.....its not working showing
C:\sdk\tools>chmod 755 /data/flash_image
'chmod' is not recognized as an internal or external command,
operable program or batch file.
C:\sdk\tools>cat /sdcard/flash_image > /data/flash_image
The system cannot find the path specified.
Click to expand...
Click to collapse
Did you tried from a terminal emulator on your Legend or via adb instead of Windows? (chmod and cat are Unix's binaries and they can't work with Windows directly)
i can't download......... showing insufficient storage........i even can't install application through 91pc suite for android..........i need help....and in device manager my htc is showing but i can't connect.........nnnnnnnnnnneeeeeeed hhhelllllp
use a sdcard reader ( if you have one ) and put connectbot.apk ( that you can find here http://code.google.com/p/connectbot/downloads/list ) on your sd...
mount your SD card before trying to unbrick your USB like that :
type :
fastboot oem enableqxdm 0
in fastboot mode
after reboot, your phone will see your SD.
If you have a file manager already installed, look for connectbot and install it.
After that , follow unbrink process.
ilos said:
use a sdcard reader ( if you have one ) and put connectbot.apk ( that you can find here http://code.google.com/p/connectbot/downloads/list ) on your sd...
mount your SD card before trying to unbrick your USB like that :
type :
fastboot oem enableqxdm 0
in fastboot mode
after reboot, your phone will see your SD.
If you have a file manager already installed, look for connectbot and install it.
After that , follow unbrink process.
Click to expand...
Click to collapse
i appreciate your response.......but you don't understand my problem....my phone neither detects sdcard nor download file from market[also through browser]....could you suggest any other way ......please its urgent.....
i tried with terminal emaluator but showing permission denied....but my phone is rooted.......
after fastboot oem enableqxdm 0 , a bricked phone can see the sdcard.
don't try to connect your computer to your device, computer will not see your sdcard, sdcard will be only readable by the device.
if all of that doesn't work you have probably a problem with your sdcard.
and take a look here :
http://forum.xda-developers.com/showthread.php?t=748813
thousand thanks man............
Txkw said:
Did you tried from a terminal emulator on your Legend or via adb instead of Windows? (chmod and cat are Unix's binaries and they can't work with Windows directly)
Click to expand...
Click to collapse
sorry my mistake
whats a 'terminal emulator' please ?
EDIT: Found it in the Market.
Hope they put a link to [How To] Unbrick your Legend in the first post in android development since its a common ailment for Legend and Desire.
Learners Lisence said:
whats a 'terminal emulator' please ?
EDIT: Found it in the Market.
Hope they put a link to [How To] Unbrick your Legend in the first post in android development since its a common ailment for Legend and Desire.
Click to expand...
Click to collapse
you want it, you get it
http://forum.xda-developers.com/showthread.php?t=751265
sorry for bringing up this topic...
I've tried to "fastboot oem enableqxdm 0" but my phone still canot c my sd card..
to show my step,
i booted up my phone into fastboot mode and enter the code using cmd in windows..
it says success then i booted it back up normally...
but sdcard removed message still there...
did i do wrongly or what else can i do?
my card is still a working card...
bylee123 said:
sorry for bringing up this topic...
I've tried to "fastboot oem enableqxdm 0" but my phone still canot c my sd card..
to show my step,
i booted up my phone into fastboot mode and enter the code using cmd in windows..
it says success then i booted it back up normally...
but sdcard removed message still there...
did i do wrongly or what else can i do?
my card is still a working card...
Click to expand...
Click to collapse
First use a adapter and check if u can read your card on the computer, if it does backup your content, and format. (If u have HTC Synk installed, close it)
*insert the card in your phone.
*press volume down + power
*chose fastboot
*connect your phone (make sure it say fastboot usb before u continue)
*open cmd, go to AndroidSDK -> Tools
*Type "fastboot oem enableqxdm 0"
Reboot, and your card should be up and running. If needed continue with the steps from the Unbrick guide in dev
HpX said:
First use a adapter and check if u can read your card on the computer, if it does backup your content, and format. (If u have HTC Synk installed, close it)
*insert the card in your phone.
*press volume down + power
*chose fastboot
*connect your phone (make sure it say fastboot usb before u continue)
*open cmd, go to AndroidSDK -> Tools
*Type "fastboot oem enableqxdm 0"
Reboot, and your card should be up and running. If needed continue with the steps from the Unbrick guide in dev
Click to expand...
Click to collapse
Below are what I did before I kept getting the error "Removed SD card"...
Eclair 2.1 with update 1.
1. Create goldcard. Success.
2. Then i went on with the rooting guide, without applying RUU.1.31.
3. Failed in step1-windows.bat, step2-windows.bat. Thus kept creating goldcard.(obviously i am so newbie)
4. Then after sometimes of retrying I get the error after a reboot.
After i got the error, I created a goldcard based on the previous CID i got.
The goldcard enables me to downgrade to RUU.1.31.
But still the error is still there.
Tried the unbrick guide.
But even after I execute "fastboot oem enableqxdm 0",
then follow the guide with "fastboot oem boot", my USB still didn't work.
Ignoring the fact that the guide needs SD capability I did all the steps in the guide(i use softroot, since i never rooted my legend yet!),
all commands went through without error, even retried.
Till now my phone stilll shows the error, "Removed SD card".
Can anyone help me? Paul? anyone?
Card i used: 1. Sandisk 2GB card that comes with the phone(my goldcard), 512MB old microSD card.
Guides used: modaco rooting guide and unbrick guide
Both cards are working well, can be detected in windows and no error when checked with h2testw in windows.
Windows can detect Legend when connected. Drivers all good.
So guys, is this really USB bricked or what it is?
If u guys need any information bout the phone please let me know, i'll try to provide.
help me
Please help me. I have the same problem and I do not know where to write command oem fastboot enableqxdm 0
bro read the previous posts.....

[FIX] cant , unable , error mounting sdcard (So Simple)

tested on cdma sprint nexus s 4g
idk if the gsm version will work or not
its so simple
idk if anyone else found this yet
but its really easy.
i found this out when i read that
unlocking the phone may wipe the sdcard
_____________________________________________
you have to have adb or android sdk
i provided it if you dont have it
note: i didnt not create the files
and have samsung drivers for usb fastboot
goto junefabrics.com/android/download.php
just install and select the right brand
_____________________________________________
extract the folder to anywhere
hold shift then right click on the folder (tools)
select open command window here
type in the following
commands:
Code:
adb shell
fastboot oem lock
(check screen, select lock)
fastboot oem unlock
(check screen, select unlock)
(done)
Man BIG THX!
Dont now why my NS cant mount the SD Card but ur little Trick works perfekt!
Serial Kazama said:
Man BIG THX!
Dont now why my NS cant mount the SD Card but ur little Trick works perfekt!
Click to expand...
Click to collapse
error devce nfo! What do i do?!?!

Cracked screen- no touch. ADB unauthorized - how to pull nandroid backup?

I sadly dropped my nexus 4 on hard tiles yesterday face down and the whole front cracked everywhere! The phone still turns on, I can copy internal storage off fine, but since the touchscreen doesn't work anymore I'm having trouble with getting system data off e.g. sms.
I've managed to get non touch CWM installed, made a nandroid, but now I can't copy the damn thing off! ADB gives me unauthorised for every command, and obviously I can't use the phone to authorise my PC. Am I now essentially screwed? Been googling for ages and can't find a way round the fact I can't use ADB or force my phone to authorise my PC without using the screen.
Any other ideas would be massively appreciated. The phone is rooted, CM10.2, and luckily usb debugging is enabled.
Cheers!!
You said you can copy internal storage right? so why not pull the nandroid from /clockworkmod/backup?
Sent from my Nexus 4 using Tapatalk 4
I do not use CWM, but I do use TWRP and it allow me to access to the /data and /sdcard partition just fine, /system is off limit though. I don't know where your nandroid is backed up in, but I assume its in /sdcard.
Try this: Flash TWRP in fastboot mode, then press the volume button either up or down twice, then press Power to access the recovery. Then on the main menu of TWRP, you can do adb commands right away.
I can then simply back up my whole /sdcard partition by: adb pull /sdcard/ C:\backup
Or backup the all the apps data: adb pull /data/data/ C:\backup
Thank you both for the advice. I've tried using adb in recovery, but it says: remote object '/sdcard' is not a file or directory.
If I type adb devices, I get my phone ID along with 'recovery' next to as expected.
Any ideas?
Thanks.
EDIT: Ignore this, just added a / after /sdcard and now its pulling ok. Thanks so much!
I was typing this up before I read your edit:
If you don't know where certain files are, you can type "adb shell" to enter the phone itself, there you can look at the phone directory structure and find where your files are located.
Use the cd and ls commands to navigate in the phone: http://afrodita.rcub.bg.ac.rs/~ivica/nlm/part1/cd_ls.html
Once you're done, type "exit" to get out of adb shell. Then you can use the "adb pull" command to copy the files.

[noob-read] adb and fastboot. What is it? How can it help you?

Please note, I can only speak with any degree of certainty about devices bought from Play / Moto. I cannot attest to the accuracy of this information for US carrier versions etc. Anything you do is at your own risk
Contents / Thread overview
Introduction
What is Fastboot?
What is adb?
How to install adb and fastboot
How to test adb and fastboot work
OK Gimme some useful fastboot commands please!
OK Gimme some useful adb commands please!
A little more about using Windows command prompt
Myth Busters
Introduction
adb and fastboot are very useful command line tools. They can be used from Windows, Linux or Mac to carry out tasks on your android device, such as moving and backing up files, rooting and restoring your phone to it's factory state. Understanding how to use these tools could save your phone when you get yourself in trouble. This is especially true of rooted users. Particularly those of you who are "new to the scene". You definitely should read and understand this thread before you do ANYTHING root related.
This thread is not intended to be a non-exhausted reference. It is merely here to give an overview of the most basic of basics
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
What is fastboot?
Fastboot comprises of 2 components.
1) Fastboot mode on the phone (The Bootloader)
2) Fastboot tool on your computer
Fastboot is a small command line tool that you can use from your computer whilst the phone is connected via USB and you are booted into the bootloader. The most common uses for fastboot are:
Unlocking the bootloader - needed as part of the rooting process
Flashing a custom recovery to the device - needed as part of the rooting process
Flashing factory images - used for saving / trestoring your device back to stock
Being able to do these 3 things are essential before rooting. Many new users skip learning these and use a toolkit to root. As a result, when they mess up and we try to explain what they need to do to fix their issues, it becomes very difficult for us to help as fastboot is not understood. It is YOUR responsibility to understand these things BEFORE you mess up.
What is adb?
adb is another small command line tool that stands for "Android Debugging Bridge". Again, it can be used from a computer connected via USB to your android device. It can be used whilst the device is booted into Android or (if you have a custom recovery), it can be used in recovery too, unlike fastboot (yes, adb and fastboot are NOT the same thing) which can only be used in the bootloader.
adb can be used to push files to (or pull files from) your phone. It can also be used to execute many of the commands available in Linux terminals (Or Android terminal emulators) on the device itself. We're not here to cover all these commands however. We just want to cover the basics.
How to install adb and fastboot
adb and fastboot are very easy to install and can be installed on Windows, Linux and MAC computers. The Windows install can be a little bit more complicated than the other 2 and may need additional drivers installing too.
Windows.
There is a very handy tool that can install adb and fastboot in 15 seconds. It is recommended that you use this to install adb and fastboot. Please see the link immediately below for that tool:
ADB, Fastboot and Drivers - 15 seconds ADB Installer - Really quick and easy way to install adb and fastboot (by @Snoop05). Download links are at the bottom of post 1.
This tool asks if you want to install adb and fastboot (to which you should answer Y) and then creates c:\adb\adb.exe and c:\adb\fastboot.exe
It then asks if you want to install it system wide .. This is asking to install for all windows users. < 15 second installer needs updating to SDK 23, which is required for latest Android versions.
Download the latest SDK (adb and fastboot) versions here: https://developer.android.com/sdk/index.html (Scroll down to SDK tools only) then download the Windows *Installer*.
Open the installer and select "Platform-tools" and install the packages. This should create "C:\Program Files (x86)\Android\android-sdk\platform-tools"
Now we want to set this path as a Windows Environment variable PATH to make the executables work system wide:
right-click computer > properties > advanced > environment variables.
under system variables click "path" and click "edit"
at the end of the line, add the below:
Code:
;C:\Program Files (x86)\Android\android-sdk\platform-tools
Please note, the semi-colon ; is VERY important.
You may also need to install drivers.
Here is a link to the Google USB Driver: DOWNLOAD THIS
Code:
To install on Windows 7:
- Ensure existing drivers are uninstalled first*
- Extract the zip to c:\adb (created earlier by the installer)
- Right-click "Computer" > Manage in windows and choose "Device Manager"
- Boot the Nexus 6 to the bootloader (Volume down + Power) and connect the USB Cable
- Watch for any new devices with exclamation marks appearing
- Right-Click the new device > Update driver software
- Choose the "browse" method and browse to c:\adb, find teh folder you extracted then follow the wizard to the end - using amd6 64 if you're on a 64 bit system and i386 if you're on a 32 bit system.
*To uninstall existing drivers, boot into Android and connect the USB cable. Monitor device manager for the device showing up. To uninstall the device, right-click it to uninstall it. At the prompt, ensure you also choose to delete the driver. Repeat this for bootloader and recovery.
Code:
To Install on Windows 8, you may need to additionally disable driver enforcement
- From the Metro Start Screen, open Settings (move your mouse to the bottom-right-corner of the screen and wait for the - -- pop-out bar to appear, then click the Gear icon).
- Click ‘More PC Settings’.
- Click ‘General’.
- Scroll down, and click ‘Restart now’ under ‘Advanced startup’.
- Wait a bit.
- Click ‘Troubleshoot’.
- Click ‘Advanced Options’
- Click ‘Windows Startup Settings’
- Click Restart.
Once that is done, your Windows computer is configured for adb and fastboot.
In device manager, the device should show up as below, depending whether you are booted into recovery or bootloader...
Recovery - Android Device > Google Nexus 4 ADB Interface
Bootloader - Android Device > Google Nexus 4 Bootloader Interface
If it shows as something different, either you have existing drivers in the way or something went wrong.
Linux and Mac
Here is a really simple tool to install adb and fastboot on the above OS. The only expectation is you know how to open and run a terminal command. Please see the link immediately below:
Nexus Tools 2.2 (Featured by XDA) - adb and fastboot installer for Linux and Mac (by @corbin052198)
Once you have installed adb and fastboot from the above link, you're ready to go.
How to test adb and fastboot work
As previously mentioned, adb and fastboot are both command line tools. That means you must run these tools from command prompt (cmd in Windows) or Terminal (Linux and Mac).
Remember earlier, I mentioned that fastboot can only be used in bootloader? and adb can only be used in Android (or custom recovery - lets cover that later)? We can use the command "fastboot devices" and "adb devices to see if we have adb and fastboot working correctly.
Lets try it.
Boot your phone into android
Connect it to your computer via USB
Open cmd (start > type "cmd" on Windows) or Terminal (Mac/ Linux
Type in the windows "adb devices" and press enter
Here is what we don't want to see:
Notice how there is nothing underneath where it says "List of attached devices" That means it cannot see any device
Here is what we DO want to see:
We can see that there is now a device listed.
OK lets test fastboot. Unplug the USB and turn off the phone. When it is off, hold down Volume down + power until you feel the vibrate. You will now be in the bootloader. Reconnect the USB cable.
In the same window (cmd or terminal) we're going to now type "fastboot devices".
Again, here is an example of what we don't and do want to see:
If in both modes, you can see your devices "Serial Number", then you know they are both working.
Please note that if you cannot get adb and fastboot to work "system wide", you can open the command prompt to the location of the adb and fastboot executables exist and try from there.
OK Gimme some useful fastboot commands please!
Here are some of the most useful fastboot commands you will come across. Fastboot is used mostly for flashing images to the devices partitions on the internal memory.
Code:
fastboot oem unlock
This unlocks your bootloader and allows you to flash a recovery to root. WARNING, this will wipe your device. Rooting the N6 is essentially unlocking the bootloader, flashing a recovery and then putting the SuperSU zip on your sdcard and flashing it via the recovery. This thread covers rooting: [HOW-TO] The Nexus 6 All-In-One Beginner's Guide by @xBeerdroiDx
Code:
fastboot flash recovery recovery.img
This will flash a recovery.img to the recovery partition. The command is broken down into "fastboot flash" (what to do) "recovery" (where to flash to) "recovery.img" what to flash there. In the terminal or command prompt, you cannot just type "recovery.img" though. It has to be the path to where the recovery image is. For example, if my recovery image is on my desktop, I would have to type:
Code:
fastboot flash recovery c:\users\rootsu\desktop\recovery.img
It is worth noting, that it IS case sensitive, meaning if your file is called Recovery.img, you must type the capital R...
Other things you would flash:
Code:
fastboot flash system system.img
fastboot flash boot boot.img
These will flash the system image (ROM) and boot image (kernel) as you would if you were returning to stock.
A full guide to returning to stock can be found here: [TUTORIAL][GUIDE][HOW TO] Flash Factory Images || Unroot || Relock bootloader by @Mr hOaX
You can also boot into a recovery.img without flashing it...
Code:
fastboot boot c:\users\rootsu\desktop\recovery.img
which is "fastboot boot" (what to do) "c:\users\rootsu\desktop\recovery.img" what to do it with. As you may have noticed, we did not define the recovery partition in this command, that's because we're not flashing it....
OK Gimme some useful adb commands please!
At the moment, we are going to assume you have a custom recovery and you have booted into recovery. The reason for this is using adb in recovery can be much simpler.
Here are some useful scenarios for using adb.
Backup your sdcard to your PC
Code:
adb shell
mount data
exit
adb pull data/media/0 c:\MyBackup
**Please note, some recoveries may "mount data" automatically on boot, so don't be disheartened if you get an error stating device or resource busy. This probably just means you can't mount what is already mounted**
/data/media/0 is the real location of /sdcard for your information. Also referred to as "The mount point". What we have done here is "adb pull" (what to do) "data/media/0" (what to move) "c:\MyBackup" (where to move it to)
Push a zip file from your PC to your sdcard (useful if you wiped your sdcard and rom)
Code:
adb shell
mount data
exit
adb push c:\rom.zip data/media/0
What we have done here is "adb push" (what to do) "c:\rom.zip" (what to move) "data/media/0" (where to move it to)
You can of course also use adb to push and pull files to and from /system too. You just need to:
Code:
adb shell
mount system
exit
I mentioned earlier that using custom recovery is much easier for adb than whilst booted into Android. You need to ensure you have a kernel that allows insecure adb before you do anything with system and data partitions. You also need to ensure that USB debugging has been enabled in developer options.
For example, to mount system to pull files whilst android is running you have to:
Code:
adb root
adb shell
mount -o rw,remount /dev/block/platform/msm_sdcc.1/by-name/system /system
...which is clearly a little bit more involved, so I recommend you use recovery for adb push and pull. You can find more detailed information on adb here: http://developer.android.com/tools/help/adb.html
A little more about using Windows command prompt
One thing to understand is that like Windows, command prompt (cmd.exe) works with directories (or folders if you like). The Linux and Mac terminals are the same, but most linux users, we expect you would already know this.
Here you will see I have downloaded a recovery image that I want to flash using fastboot.
As you can see, the recovery.img is located in C:\users\rootSU\Desktop
Usually when you open the command prompt from the start menu, or run command, the command prompt will default to your user location as seen below:
So lets try and fastboot flash recovery recovery.img...
It fails with a not-too-accurate error message. It has failed because you have not told it where the recovery image is. It assumes it is in the directory as listed in the prompt
So, how do we deal with this? Well, there are 3 ways.
1) We tell the command prompt where the recovery.img actully is in the command itself
Success! As you can see, we have told the command that the location for the file is Desktop\recovery.img
2) We can change the directory in command prompt to the directory where the file is. In this example, we change directory to "Desktop". The change directory command is "cd " or in this case "cd Desktop"
3) ...and possibly the simplest method. We hold shift whilst we right-click on the folder we want to change directory to, and directly open a command prompt there:
Another point to make with command prompt or terminals, is if you do a particular command, it is "pre-programmed" to "expect" a particular format of that command.
For example, we know that adb push as a command expects after it . This means the command is actually
Code:
adb push
BUT if you put something AFTER , for example -
Code:
adb push somethingelse
, it will assume that the "somethingelse" is a bad parameter, and the command will fail. It will probably display (or "print" which is the technical term in a terminal) a helpful guide of how the command should be used instead of trying to run the command which it does not understand.
You're probably wondering why I am telling you this. Well quite simply, it is a warning about folder names. Imagine you have c:\users\rootSU\My Documents as a folder. You assume the command is then
Code:
adb pull /data/media/0 c:\users\rootSU\My Documents
but it is not... There is a space in between My and Documents. What you have actually done is
Code:
adb pull Documents
because it uses a space to signify the end of a command or parameter. It is best to avoid using folders with spaces in them. Avoid as much as you can. In the event it is unavoidable (Although when is it ever>) then please surround the path with quotation marks,
Code:
adb pull /data/media/0 "c:\users\rootSU\My Documents"
so that way, it sees everything between the " " as a single parameter.
Myth Busters
Myth 1: You need USB debugging on to use adb and fastboot
If you cannot boot into Android, it doesn't matter. You DO NOT need USB Debugging turned on to use adb outside of android. USB Debugging is an Android ONLY setting. Fastboot obviously also does not need debugging either as this too is outside of Android
Myth 2: to adb push or fastboot flash files, they must be in the same folder as adb or fastboot executables. Sorry but this is rubbish. You can pass the full path of the image you're flashing or file you're pushing in the command and fastboot / adb can be called system wide if you've set them as an environment variable or used the 15 second installer
thanks(im out of thanks). but ill be back to leave one here!!!!!
simms22 said:
thanks(im out of thanks). but ill be back to leave one here!!!!!
Click to expand...
Click to collapse
No worries. Just putting it here for info. It's not a new work, just a slightly amended version of my N5 thread. No need for thanks
rootSU said:
No worries. Just putting it here for info. It's not a new work, just a slightly amended version of my N5 thread. No need for thanks
Click to expand...
Click to collapse
it was up in the n5 threads before, and was needed here. but its here now as well, so thank you
Good guide. Needs to be a sticky. In fact, I think every device general forum should have a sticky like this. Would have saved me a lot of grief back when....
Excellent update.
Very good to see. I'm sure lots of people will be sending noobs here for the basics.
Up to your usual helpful, good work I see.
rootSU said:
This tool asks if you want to install adb and fastboot (to which you should answer Y) and then creates c:\adb\adb.exe and c:\adb\fastboot.exe
It then asks if you want to install it system wide (to which again, you should answer Y)... This then allows you to type adb commands in the command prompt without having to open a particular directory first. You may or may not understand what I mean when I say that, but take it from me, its much more convenient and easier to use this way.
Click to expand...
Click to collapse
Y option = System-wide = install to "C:\adb" and add path for system variable - This mean you can use it by any account on your pc.
N option = Current user only = install to "C:\Users\[YOUR USERNAME]\adb" and add path for user only - Only user account used for installation can actually use it.
So if you say Y or N you will be still able to use it from any directory with cmd.
rootSU said:
It will also ask if you want to install device drivers. Actually, say N to this as we're going to cover that next, using the google USB drivers
Here is a link to the Google USB Driver: DOWNLOAD THIS
Click to expand...
Click to collapse
Drivers in my installer are the one from the link you posted here. I'm not using any modified drivers, just the one that come with SDK. And they are also digitally signed.
I hope you will fix these But still nice work, beginners should understand it :good:
Snoop05 said:
Y option = System-wide = install to "C:\adb" and add path for system variable - This mean you can use it by any account on your pc.
N option = Current user only = install to "C:\Users\[YOUR USERNAME]\adb" and add path for user only - Only user account used for installation can actually use it.
So if you say Y or N you will be still able to use it from any directory with cmd.
Drivers in my installer are the one from the link you posted here. I'm not using any modified drivers, just the one that come with SDK. And they are also digitally signed.
I hope you will fix these But still nice work, beginners should understand it :good:
Click to expand...
Click to collapse
Thanks for the info. I thought system wide meant it was putting it as a path environment variable. Reason I didmt use the drivers from your tool originally is (well I wrote this thread for N5 originally) they didnt work so had to install the universal naked driver. But if yours are the same as the ones linked, I can update that.
rootSU said:
Thanks for the info. I thought system wide meant it was putting it as a path environment variable. Reason I didmt use the drivers from your tool originally is (well I wrote this thread for N5 originally) they didnt work so had to install the universal naked driver. But if yours are the same as the ones linked, I can update that.
Click to expand...
Click to collapse
Path is added in both cases.
Sooo I need a little help here. I followed the directions to unlock the bootloader and everything went good. I did the CF auto-root, and the phone booted back up as normal. Now, I was trying to flash the M preview, and all of a suddon now my phone isn't recognized in adb. You posted a pic of what we don't want to see when testing for adb, but you don't say how to fix it if we run into the problem. Any way to get it to recognize my phone again so I can get this build on?
papeshfoo said:
Sooo I need a little help here. I followed the directions to unlock the bootloader and everything went good. I did the CF auto-root, and the phone booted back up as normal. Now, I was trying to flash the M preview, and all of a suddon now my phone isn't recognized in adb. You posted a pic of what we don't want to see when testing for adb, but you don't say how to fix it if we run into the problem. Any way to get it to recognize my phone again so I can get this build on?
Click to expand...
Click to collapse
Can you be very specific with your issue please?
papeshfoo said:
Sooo I need a little help here. I followed the directions to unlock the bootloader and everything went good. I did the CF auto-root, and the phone booted back up as normal. Now, I was trying to flash the M preview, and all of a suddon now my phone isn't recognized in adb. You posted a pic of what we don't want to see when testing for adb, but you don't say how to fix it if we run into the problem. Any way to get it to recognize my phone again so I can get this build on?
Click to expand...
Click to collapse
Android M no like root, you'll either have to live with stock or wait for chainfire to do his thing.
This all worked well until I had to find my device in the cmd prompt. It listed no devices when I typed in "ADB Devices". The issue I found was with the ADB Interface Driver. I uninstalled it and reinstalled it thinking it might've been a driver issue, but it still wouldn't work. I tried the "Uninstall driver" then "scan for hardware changes" but that didn't work. Finally I found the universal ADB driver and tried using that. STILL nothing. I figured that, because I don't have my device's driver installed, it might've been that, so I tried to DL it and yet again, nothing. I have a Kyocera Hydro Life, if that helps. Also, I tried looking through the "update driver manually" in order to update the driver software by looking through the different ADB interfaces that it had but my Kyocera driver wasn't there. Is it supposed to be there or do I just use one of the ones provided?
I checked my programs and apps and it says that the Kyocera usb driver was installed. Did I do something wrong?
ScottyChaos said:
This all worked well until I had to find my device in the cmd prompt. It listed no devices when I typed in "ADB Devices". The issue I found was with the ADB Interface Driver. I uninstalled it and reinstalled it thinking it might've been a driver issue, but it still wouldn't work. I tried the "Uninstall driver" then "scan for hardware changes" but that didn't work. Finally I found the universal ADB driver and tried using that. STILL nothing. I figured that, because I don't have my device's driver installed, it might've been that, so I tried to DL it and yet again, nothing. I have a Kyocera Hydro Life, if that helps. Also, I tried looking through the "update driver manually" in order to update the driver software by looking through the different ADB interfaces that it had but my Kyocera driver wasn't there. Is it supposed to be there or do I just use one of the ones provided?
I checked my programs and apps and it says that the Kyocera usb driver was installed. Did I do something wrong?
Click to expand...
Click to collapse
Try a different USB port. If that doesn't work try a different USB cable. If that also doesn't work, you could try disabling driver signature checking for Windows.
If those don't work, try this thread > http://forum.xda-developers.com/showthread.php?t=1583801
cam30era said:
Try a different USB port. If that doesn't work try a different USB cable. If that also doesn't work, you could try disabling driver signature checking for Windows.
If those don't work, try this thread > http://forum.xda-developers.com/showthread.php?t=1583801
Click to expand...
Click to collapse
EDIT: I also forgot to mention that the error code that came up while I was in the dev manager was compatibility error code (28) when I clicked on "Device ADB interface".
ScottyChaos said:
EDIT: I also forgot to mention that the error code that came up while I was in the dev manager was compatibility error code (28) when I clicked on "Device ADB interface".
Click to expand...
Click to collapse
Error 28 means drivers not installed. Try the driver help thread that I linked above.
---------- Post added at 12:33 PM ---------- Previous post was at 12:04 PM ----------
cam30era said:
Error 28 means drivers not installed. Try the driver help thread that I linked above.
Click to expand...
Click to collapse
@ScottyChaos,
Just a fundamental question: I assume you have enabled "Developer Options" in Settings, and then checked "enable USB debugging"?
---------- Post added at 12:39 PM ---------- Previous post was at 12:33 PM ----------
[/COLOR @ScottyChaos,
Here is a thread that you might find interesting > http://forum.xda-developers.com/android/help/metro-pcs-kyocera-hydro-life-rooted-t2870678
Windows 10 device driver management is even more locked down then windows 8. I got two of the three drivers loaded but when going into adb mode on the phone through recovery it just disappeared out of the device manager. I had to unplug and plug in while in that mode to trigger a unloaded driver in the device manager. Once there I had to force the adb driver manually with the nasty windows driver warning and all. Once I did that I could see the device in adb mode and sideload my marshmallow OTA. woot!
I decided to drop a thanks bomb...
ADB is good.
But that fastboot.
Seriously, its ONE command. OK, a few different arguments to use.... But it is so easy, and so powerful. People are afraid to mess up on command line, but its actually way harder to type the wrong thing out then to click the wrong thing.
LEARN IT. Forget your toolkit.
You can fix almost anything, Its not too hard for you. It may be new... YOU CAN DO IT.
Also, I have to say it... Its not going to help anyone, but it will keep me from punching something. ADB and Fastboot... Not the same. You don't ADB a new system image....

[how to] lock/unlock your bootloader without htcdev(s-off required)

READ THIIS!
*this thread is for m9. it will NOT work on m7,or any older device. please check the general forum for your particular device for a similar thread.
this thread will let you unlock your bootloader without htcdev,or let you change your hboot watermark from relocked or locked back to stock.
advantages
-no hassle with htcdev,tokens,or unlock codes
-no submitting your phones personal info to htc
-the ability to get back to 100% stock without any visual traces or records of having been s off or unlocking your bootloader.
you do NOT need to downgrade your hboot. this simple adb command works without any scary hboot downgrades.
*you must be s off.
*you must have superuser installed
read this:
this will not work if your s on. its not a way to magically unlock
the usual disclaimers:
use this info at your own risk. if it melts your phone into a little pile of aluminum goo,its not my fault.
credits
-beaups for schooling me on echo comand protocol
-strace for originally discovering the location of the lock status flag(check out this thread for more info)
- @Mutasek24 for fearlessly testing all commands
IF you are an advanced user with adb/fastboot set up and some basic knowlede of the cmd window,you can skip to #2
1)set up adb(windows 7 and older)
-download this file
-install drivers: if you have htc sync installed,you should allready have drivers. if not,you can install htc sync,or install these modified htc drivers from revolutionary (driver mirror)
-unzip your miniadb_v1031.zip file. this is native funtionality in windows 7. you otherwise may need a utility such as "7-zip" to extract,or unzip it. place the unzipped folder onto the root of your C drive on your PC. root means the top level,not inside any folders. so just copy and paste,or drag and drop the folder onto C with everything else that is there. you may want to rename it to "miniadb_m7" since youll be putting some device specific files in here.
-open a command window. on windows 7,click the start bubble in the lower left and type "command" in the search box. xp i believe is similar or the same. doing this should open a small black command window.
-change to your miniadb_m7 directory. type the following at the prompt in your cmd window:
cd c:\miniadb_m7
your command promt should change to "c:miniadb_m7>" provided you: 1)unzipped the miniadb_v1031 zip file,and 2)put the folder on your c drive,and 3)entered the name of the folder correctly ("miniadb_m7" in this case)
-now make sure usb debugging is checked in developer options(you will need to turn it on first),and plug your phone into your PC with a usb cable
-make sure your phone is being recognized- type:
adb devices
if your drivers are installed correctly,this should return your phones serial number. you should hear the "found device" noises when you plug your phone in. if it starts installing drivers,wait for it to finish before typing the adb devices command.
if you get your serial number back,then enter this command:
adb reboot bootloader
this should take your phone to the "fastboot" screen,wich is white with colored letters. this is one mode of your bootloaders interactive modes. at the top youll see fastboot devices as confirmation youre in fastboot.
now enter:
fastboot devices
again,this should return your phones serial number. you should hear the "found device" noises when you plug your phone in. if it starts installing drivers,wait for it to finish before typing the adb devices command.
if you get your serial number back,you can enter the following to boot back to the phones OS:
fastboot reboot
and now,youve installed adb/fastboot and tested youre phones drivers. if at either spot,you have trouble and dont get your serial number back,there is some sort of connection issue. use these steps to troubleshoot:
troubleshooting connectivity issues:
-try a reboot of the PC
-try different usb cables and ports
-dont use a usb hub
-dont use usb 3.0
-make sure nothing capable of comunicating with the phone is enabled and running. htc sync,pdanet,easy tether,and even itunes have all been known to cause issues.
-windows 8 has been known to have issues. try a windows 7 or older machine
failing the above,
-i use these drivers for fastboot and adb(donwload and run as admin): http://downloads.unrevoked.com/HTCDriver3.0.0.007.exe (mirror)
failing that,try manually updating the drivers in the following manner:
-put the phone in fastboot mode(select fastboot from the hboot menu)
-open device manager on the PC
-plug in phone,watch for it to pop up in device manager.
-update drivers with device manager,pointing the wizard to the extracted
driver download folder from above
note that you can check the connectivity of the phone,and make sure drivers are working by in the following manner:
-open cmd window. change to directory containing adb/fastboot utilities
-adb with the phone in the booted OS,usb debug enabled,enter:
adb devices in a cmd window
-fastboot with phone in fastboot,enter:
fastboot devices in cmd window
in either case,a properly connected phone with working drivers installed should report back the phones serial number.
Click to expand...
Click to collapse
this process,in your cmd window,should look something like this:
Code:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Scott>[COLOR="red"]cd c:\miniadb_m7[/COLOR]
c:\miniadb_m7>adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
FAxxxxxxxxxx device
c:\miniadb_m7>[COLOR="red"]adb reboot bootloader[/COLOR]
c:\miniadb_m7>[COLOR="red"]fastboot devices[/COLOR]
FAxxxxxxxxxx fastboot
c:\miniadb_m7>[COLOR="red"]fastboot reboot[/COLOR]
rebooting...
finished. total time: 0.037s
c:\miniadb_m7>
2)reset your "lock status flag"
to LOCK your bootloader,enter the following:
adb devices
adb shell
su (if needed to get a # prompt)
echo -ne '\x00\x00\x00\x00' | dd of=/dev/block/mmcblk0p2 bs=1 seek=33796
(i would very strongly recomend you copy/paste this)
exit
(exit a second time if you need to to get back to a normal > prompt)
adb reboot bootloader
verify you are now locked
_____________________________________________________________________________________________
to UNLOCK your bootloader,enter the following:
adb devices
adb shell
su (if needed to get a # prompt)
echo -ne "HTCU" | dd of=/dev/block/mmcblk0p2 bs=1 seek=33796
(i would very strongly recomend you copy/paste this)
exit
(exit a second time if you need to to get back to a normal > prompt)
adb reboot bootloader
verify you are now unlocked
other useful threads:
restore software status: original banner: http://forum.xda-developers.com/one-m9/general/how-to-restore-software-status-original-t3092882
change mid: fastbooot oem writemid xxxxxxxxx
change cid: fastboot oem writecid xxxxxxxx
mine
scotty1223 said:
mine
Click to expand...
Click to collapse
Thanks a lot for your very useful information. I have 2 questions??
1) When I am s-on and need to get s-off, then I need to be unlocked and rooted, so to do these still I need to use HTC-dev to unlock and root.
2) Does this method wipe data like when we use HTC-dev?
Nima78600 said:
Thanks a lot for your very useful information. I have 2 questions??
1) When I am s-on and need to get s-off, then I need to be unlocked and rooted, so to do these still I need to use HTC-dev to unlock and root.
2) Does this method wipe data like when we use HTC-dev?
Click to expand...
Click to collapse
1)yes. the first time you root,you will need to use htcdev to unlock the bootloader. the biggest benefit of this is the ability to return to a locked status for warranty. while s on,the best youll be able to do is relocked.
2)no,it will not wipe your data. it just changes the flag that hboot checks in order to decide if its locked,or not.
scotty1223 said:
1)yes. the first time you root,you will need to use htcdev to unlock the bootloader. the biggest benefit of this is the ability to return to a locked status for warranty. while s on,the best youll be able to do is relocked.
2)no,it will not wipe your data. it just changes the flag that hboot checks in order to decide if its locked,or not.
Click to expand...
Click to collapse
Thanks a lot mate. Appreciate for your replying
anyway to get "modified" back to "official" in boot loader?
Thanks @scotty1223. Used your threads for the m7 and m8. Happy to see this here too.
an0ther said:
anyway to get "modified" back to "official" in boot loader?
Click to expand...
Click to collapse
Flash your device RUU.
I am a little confused. How do I unlock my boot loader without root? I have s-off and i'm just messing around with trying to get rid of modified status but how does the "su" work without root?
an0ther said:
I am a little confused. How do I unlock my boot loader without root? I have s-off and i'm just messing around with trying to get rid of modified status but how does the "su" work without root?
Click to expand...
Click to collapse
You don't. This method requires s-off and root. It does say that in the OP BTW.
Behold_this said:
Thanks @scotty1223. Used your threads for the m7 and m8. Happy to see this here too.
Flash your device RUU.
Click to expand...
Click to collapse
I did, it still says modified in boot loader. Do I need to lock boot loader first?
an0ther said:
I did, it still says modified in boot loader
Click to expand...
Click to collapse
Use Sdcard method
Behold_this said:
Use Sdcard method
Click to expand...
Click to collapse
Mine is 64 gig, guess i'll have to get a 32 gig to make it fat32. Dang. Thanks for your help
Thanks for your very important knowledge.This question is not related to this thread, do you know which adb commands we can use to remove tampered flag as such in M7 and M8? I wonder mmcblk0p blocks might be different.
Thanks!
Enviado desde mi HTC One M9
coolberry said:
Thanks for your very important knowledge.This question is not related to this thread, do you know which adb commands we can use to remove tampered flag as such in M7 and M8? I wonder mmcblk0p blocks might be different.
Click to expand...
Click to collapse
The block where the tampered flag is write protected,so it cannot be written to with adb and have the change "stick". We know the command,it just doesn't work.
An ruu won't be available for all variants,so there will still be a work around,it will just be a bit more complicated. I just need to make sure it works and try to make it as user friendly as possible.
an0ther said:
Mine is 64 gig, guess i'll have to get a 32 gig to make it fat32. Dang. Thanks for your help
Click to expand...
Click to collapse
What does 64gb have to do with anything? Just back it up and reformat
scotty1223 said:
What does 64gb have to do with anything? Just back it up and reformat
Click to expand...
Click to collapse
Not possible. Only cards up to 32gb can be formatted as fat32, it's because above 32gb cards are not SDHC anymore but SDXC and this doesn't work..
devatxda said:
Not possible. Only cards up to 32gb can be formatted as fat32, it's because above 32gb cards are not SDHC anymore but SDXC and this doesn't work..
Click to expand...
Click to collapse
Did a little bit of searching and found a couple references to this:
http://mympx.org/Downloads/p13_sectionid/2/p13_fileid/13
And
http://m.download.cnet.com/EaseUS-Partition-Master-Home-Edition/3000-2248_4-10863346.html
Have you tried either?
Sent from my HTC One max
Behold_this said:
Use Sdcard method
Click to expand...
Click to collapse
im a little confused on what methods reset the flag,and which dont
could someone clarify the results of
-flash 0PJAIMG.zip via download mode from sd card
-flash 0PJAIMG.zip via RUU mode from pc
-run .exe from windows machine
-any other methods??
thanks
scotty1223 said:
im a little confused on what methods reset the flag,and which dont
could someone clarify the results of
-flash 0PJAIMG.zip via download mode from sd card
-flash 0PJAIMG.zip via RUU mode from pc
-run .exe from windows machine
-any other methods??
thanks
Click to expand...
Click to collapse
Ruu.exe worked for me.
Sdcard worked for @Mutasek24, but download mode manual flash did not (as reported in your other thread).
Because all methods are flashing the exact same SIGNED zip, and exe flashes through RUU mode, it's likely that flashing zip manually from RUU mode would reset the flag while using download mode does not. That needs to be tested tho.

Categories

Resources