[Q] ADB or Terminal Emulator Help Needed

Search This thread

tarikakleh

Member
May 8, 2013
25
0
Los Angeles
Hello,

I am trying to update the recovery on my wife's S4.

I'm following these instructions, but I can't seem to get it to work in either Terminal Emulator or ADB. Any instructions will be much appreciated.

Originally Posted by stevey500 View Post
I am on locked-bootloader MF3.
I have had a broken/non-bootable recovery menu since I started tinkering with modifying MF3 bootloader.

I followed this guide and did it all within my stock rooted touchwiz rom using terminal emulator and it worked perfectly. I didn't even have to run the last .sh, just simply dd'd the stock recovery.img image to its appropriate location.

So, bootable people with MF3 bootloader and broken recovery menus... do this:

http://d-h.st/AuY put this image file on your internal storage.
Run this command in ADB (type adb shell to get to shell) or go to terminal emulator and enter this:
su -c "dd if=/storage/sdcard0/recovery.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery"

You should have a fully working stock recovery menu now.
 

drock212

Senior Member
Aug 26, 2009
897
229
ORLANDO
Hello,

I am trying to update the recovery on my wife's S4.

I'm following these instructions, but I can't seem to get it to work in either Terminal Emulator or ADB. Any instructions will be much appreciated.

What boatloader/baseband are you on. Also what version of android. Depending on what you're on this may not apply to you.

Sent from my SAMSUNG-SGH-I337 using XDA Premium 4 mobile app
 

DeadlySin9

Senior Member
Sep 2, 2012
1,475
703
Google Pixel 8 Pro
When you say update, do you mean flash the stock recovery or a custom one? Because this method is only to restore the stock recovery. You can't get a custom one.

Sent from my SGH-I337 running GPE
 

tarikakleh

Member
May 8, 2013
25
0
Los Angeles
When you say update, do you mean flash the stock recovery or a custom one? Because this method is only to restore the stock recovery. You can't get a custom one.

Sent from my SGH-I337 running GPE

Stock recovery. I am trying to update without losing data. I was advised to unroot, then update OTA but update wasn't working, no response when checking for update.. Problem is at one point I tried to flash TWRP through Goo and I broke stock recovery, which I need now to update.
 

drock212

Senior Member
Aug 26, 2009
897
229
ORLANDO
Stock recovery. I am trying to update without losing data. I was advised to unroot, then update OTA but update wasn't working, no response when checking for update.. Problem is at one point I tried to flash TWRP through Goo and I broke stock recovery, which I need now to update.

There's somewhere around here where someone posted just the recovery partition of the odin tar file. That can be flashed through odin and you'll regain your recovery. The reason ota doesn't work is because it needs recovery to install... Google search how to recover stock recovery for nb1 or whatever bootloader you're on and an XDA thread should come up

Sent from my SAMSUNG-SGH-I337 using XDA Premium 4 mobile app
 

tarikakleh

Member
May 8, 2013
25
0
Los Angeles
There's somewhere around here where someone posted just the recovery partition of the odin tar file. That can be flashed through odin and you'll regain your recovery. The reason ota doesn't work is because it needs recovery to install... Google search how to recover stock recovery for nb1 or whatever bootloader you're on and an XDA thread should come up

Sent from my SAMSUNG-SGH-I337 using XDA Premium 4 mobile app

Thanks, I did do a search, and the original post of this thread had the instructions. The problem is, I'm not sure I'm using the proper syntax in either ADB or Terminal Emulator. Kind of needed a walk-through or a bit more details on the instructions.

What I've done:
1) Downloaded the file via above link.
2) Placed it into internal storage of my phone under "sdcard0"
3) Ran the following string in Terminal Emulator exactly as written:

su -c "dd if=/storage/sdcard0/recovery.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery"

At this point it says it cannot find the file. I am not certain that this is the problem, but the file is named "mf3-recovery.tar.md5", whereas, in the string above it's named "recovery.img". Am I supposed to extract it some way, or rename it?

When it comes to this stuff, due to my limited knowledge, I try not to improvise. If it is not in the guide, I don't do it.
 

drock212

Senior Member
Aug 26, 2009
897
229
ORLANDO
Thanks, I did do a search, and the original post of this thread had the instructions. The problem is, I'm not sure I'm using the proper syntax in either ADB or Terminal Emulator. Kind of needed a walk-through or a bit more details on the instructions.

What I've done:
1) Downloaded the file via above link.
2) Placed it into internal storage of my phone under "sdcard0"
3) Ran the following string in Terminal Emulator exactly as written:



At this point it says it cannot find the file. I am not certain that this is the problem, but the file is named "mf3-recovery.tar.md5", whereas, in the string above it's named "recovery.img". Am I supposed to extract it some way, or rename it?

When it comes to this stuff, due to my limited knowledge, I try not to improvise. If it is not in the guide, I don't do it.

Ok cool you found the tar file... This can be flashed through odin actually and it will restore your recovery without touching anything else or you can extract the tar file on your desk top, this will give you the img file then that can be placed into internal storage just like in the instructions. Before placing there though just rename the img file to recovery or just leave it as is and remember it. The string would be as follows

Su -c dd if=/storage/sdcard0/whatever you named the duke. of=/dev/block/platform/msm_sdcc.1/by-name/recovery

Give that a try again since its a tar file it can be flashed through odin

Sent from my SAMSUNG-SGH-I337 using XDA Premium 4 mobile app
 
  • Like
Reactions: tarikakleh

jd1639

Inactive Recognized Contributor
Sep 21, 2012
16,833
5,404
Minnesota
Thanks, I did do a search, and the original post of this thread had the instructions. The problem is, I'm not sure I'm using the proper syntax in either ADB or Terminal Emulator. Kind of needed a walk-through or a bit more details on the instructions.

What I've done:
1) Downloaded the file via above link.
2) Placed it into internal storage of my phone under "sdcard0"
3) Ran the following string in Terminal Emulator exactly as written:



At this point it says it cannot find the file. I am not certain that this is the problem, but the file is named "mf3-recovery.tar.md5", whereas, in the string above it's named "recovery.img". Am I supposed to extract it some way, or rename it?

When it comes to this stuff, due to my limited knowledge, I try not to improvise. If it is not in the guide, I don't do it.

The .tar.md5 file looks like it's an Odin flashable file. To use the dd command you need the .img file. recovery.img I'd probably in the.tar.md5 file but I'm not familiar with it. Do you have a link to the mf3 tar file?

Sent from my Nexus 5 using XDA Free mobile app
 
  • Like
Reactions: tarikakleh

tarikakleh

Member
May 8, 2013
25
0
Los Angeles
Ok cool you found the tar file... This can be flashed through odin actually and it will restore your recovery without touching anything else or you can extract the tar file on your desk top, this will give you the img file then that can be placed into internal storage just like in the instructions. Before placing there though just rename the img file to recovery or just leave it as is and remember it. The string would be as follows

Su -c dd if=/storage/sdcard0/whatever you named the duke. of=/dev/block/platform/msm_sdcc.1/by-name/recovery

Give that a try again since its a tar file it can be flashed through odin

Sent from my SAMSUNG-SGH-I337 using XDA Premium 4 mobile app

Awesome thanks! I'll let know what happens. Need to get my hands on wife's phone first.
 

tarikakleh

Member
May 8, 2013
25
0
Los Angeles
...or you can extract the tar file on your desk top, this will give you the img file then that can be placed into internal storage just like in the instructions...

Seems like I need my hand held with every step of this process!

To extract the img from the tar, I did the following:

1) extracted with 7-zip
2) left me with a "recovery.bin"
3) dropped that file into sgs2oext4
4) in diskinternals linux reader, I select "mount image"

For step 4, I don't get a mount.

I think the problem is with step 3, the recovery.ext4.img file is 0KB, I've left it running on sgs20ext4 for at least 30 minutes and nothing changed.

How am I screwing up?
 

drock212

Senior Member
Aug 26, 2009
897
229
ORLANDO
Seems like I need my hand held with every step of this process!

To extract the img from the tar, I did the following:

1) extracted with 7-zip
2) left me with a "recovery.bin"
3) dropped that file into sgs2oext4
4) in diskinternals linux reader, I select "mount image"

For step 4, I don't get a mount.

I think the problem is with step 3, the recovery.ext4.img file is 0KB, I've left it running on sgs20ext4 for at least 30 minutes and nothing changed.

How am I screwing up?

You might only be able to use odin to flash since its a tar file already

Sent from my SAMSUNG-SGH-I337 using XDA Premium 4 mobile app
 

drock212

Senior Member
Aug 26, 2009
897
229
ORLANDO
Will this preserve the data/settings on the phone?

I read on another forum where the same tying happened to another guy and he flashed just the bootloader through odin and it did not touch any of the other partitions (data/settings) but since I have not done this myself I can not guarantee it.

Sent from my SAMSUNG-SGH-I337 using XDA Premium 4 mobile app
 

tarikakleh

Member
May 8, 2013
25
0
Los Angeles
If you flash recovery in Odin it will not wipe your device

Sent from my Nexus 5 using XDA Free mobile app

Tried flashing using ODIN 1.85 and I get FAIL!. "Auto Reboot" and "F. Reset Time" are checked.

<ID:0/005> Added!!
<OSM> Enter CS for MD5..
<OSM> Check MD5.. Do not unplug the cable..
<OSM> Please wait..
<OSM> mf3-recovery.tar.md5 is valid.
<OSM> Checking MD5 finished Sucessfully..
<OSM> Leave CS..
<ID:0/005> Odin v.3 engine (ID:5)..
<ID:0/005> File analysis..
<ID:0/005> SetupConnection..
<ID:0/005> Initialzation..
<ID:0/005> Get PIT for mapping..
<ID:0/005> Firmware update start..
<ID:0/005> recovery.bin
<ID:0/005> NAND Write Start!!
<ID:0/005>
<ID:0/005> Complete(Write) operation failed.
<OSM> All threads completed. (succeed 0 / failed 1)
 

jd1639

Inactive Recognized Contributor
Sep 21, 2012
16,833
5,404
Minnesota
Tried flashing using ODIN 1.85 and I get FAIL!. "Auto Reboot" and "F. Reset Time" are checked.

<ID:0/005> Added!!
<OSM> Enter CS for MD5..
<OSM> Check MD5.. Do not unplug the cable..
<OSM> Please wait..
<OSM> mf3-recovery.tar.md5 is valid.
<OSM> Checking MD5 finished Sucessfully..
<OSM> Leave CS..
<ID:0/005> Odin v.3 engine (ID:5)..
<ID:0/005> File analysis..
<ID:0/005> SetupConnection..
<ID:0/005> Initialzation..
<ID:0/005> Get PIT for mapping..
<ID:0/005> Firmware update start..
<ID:0/005> recovery.bin
<ID:0/005> NAND Write Start!!
<ID:0/005>
<ID:0/005> Complete(Write) operation failed.
<OSM> All threads completed. (succeed 0 / failed 1)

Try a different usb port and cable. Odin can be finicky

Sent from my Nexus 5 using XDA Free mobile app
 

drock212

Senior Member
Aug 26, 2009
897
229
ORLANDO
Tried it using multiple ports, 2 cables (1 original), and two computers. Same results... :confused:

Try odin 3.09 could just be the version of odin being weird

Sent from my SAMSUNG-SGH-I337 using XDA Premium 4 mobile app

---------- Post added at 10:13 PM ---------- Previous post was at 10:03 PM ----------

Ok dumb question but I have to ask... You put the phone in download mode (power off... Then power on holding volume down home key and power) then plugged it in while odin was up? If so then try this

http://xdaforums.com/showthread.php?p=46775016

Stock recovery img file for mf3 and adb instruction on how to install

Sent from my SAMSUNG-SGH-I337 using XDA Premium 4 mobile app

---------- Post added at 10:22 PM ---------- Previous post was at 10:13 PM ----------

Tried it using multiple ports, 2 cables (1 original), and two computers. Same results... :confused:

Found it!!!!! Ok using odin 1.85 you can flash each part of the firmware separately. Put phone in download node plug into pc while running odin and flash just the recovery but put it in the recovery slot of odin

http://xdaforums.com/showthread.php?p=46943588

This helped me when I did the same thing as you while on mf3

Sent from my SAMSUNG-SGH-I337 using XDA Premium 4 mobile app
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Thanks, I did do a search, and the original post of this thread had the instructions. The problem is, I'm not sure I'm using the proper syntax in either ADB or Terminal Emulator. Kind of needed a walk-through or a bit more details on the instructions.

    What I've done:
    1) Downloaded the file via above link.
    2) Placed it into internal storage of my phone under "sdcard0"
    3) Ran the following string in Terminal Emulator exactly as written:



    At this point it says it cannot find the file. I am not certain that this is the problem, but the file is named "mf3-recovery.tar.md5", whereas, in the string above it's named "recovery.img". Am I supposed to extract it some way, or rename it?

    When it comes to this stuff, due to my limited knowledge, I try not to improvise. If it is not in the guide, I don't do it.

    Ok cool you found the tar file... This can be flashed through odin actually and it will restore your recovery without touching anything else or you can extract the tar file on your desk top, this will give you the img file then that can be placed into internal storage just like in the instructions. Before placing there though just rename the img file to recovery or just leave it as is and remember it. The string would be as follows

    Su -c dd if=/storage/sdcard0/whatever you named the duke. of=/dev/block/platform/msm_sdcc.1/by-name/recovery

    Give that a try again since its a tar file it can be flashed through odin

    Sent from my SAMSUNG-SGH-I337 using XDA Premium 4 mobile app
    1
    Thanks, I did do a search, and the original post of this thread had the instructions. The problem is, I'm not sure I'm using the proper syntax in either ADB or Terminal Emulator. Kind of needed a walk-through or a bit more details on the instructions.

    What I've done:
    1) Downloaded the file via above link.
    2) Placed it into internal storage of my phone under "sdcard0"
    3) Ran the following string in Terminal Emulator exactly as written:



    At this point it says it cannot find the file. I am not certain that this is the problem, but the file is named "mf3-recovery.tar.md5", whereas, in the string above it's named "recovery.img". Am I supposed to extract it some way, or rename it?

    When it comes to this stuff, due to my limited knowledge, I try not to improvise. If it is not in the guide, I don't do it.

    The .tar.md5 file looks like it's an Odin flashable file. To use the dd command you need the .img file. recovery.img I'd probably in the.tar.md5 file but I'm not familiar with it. Do you have a link to the mf3 tar file?

    Sent from my Nexus 5 using XDA Free mobile app
    1
    If you flash recovery in Odin it will not wipe your device

    Sent from my Nexus 5 using XDA Free mobile app