So today I was trying to backup my EFS/IMEI and found that I could do so using the TWRP Terminal commands:
dd if=/dev/block/bootdevice/by-name/modemst1 of=/sdcard/modemst1.emmc.win
dd if=/dev/block/bootdevice/by-name/modemst2 of=/sdcard/modemst2.emmc.win
Click to expand...
Click to collapse
However I typed it wrong, doing this:
dd if=/dev/block/bootdevice/by-name/modemst1 of=/dev/block/bootdevice/by-name/modemst1emmc.win
dd if=/dev/block/bootdevice/by-name/modemst2 of=/dev/block/bootdevice/by-name/modemst2.emmc.win
Click to expand...
Click to collapse
This resulted in having the backups inside the bootdevice file, is there any way I can delete these files with a TWRP terminal command?
Related
I would like to try flashing the stock bell rom back on my phone but I never backed it up initially.
I've been having Bluetooth music issues with both kernelpanics and ho!no!s roms so I have to get stock to test if its the phone or just the roms while its still in warranty.
Thanks guys!!
Sent from my LG-P930 using XDA
EDIT:
Found stock system.img
What are the ADB commands to flash the file to my phone?
Bump for new topic. Found System.img of stock bell canada rom
adb shell
su
dd if=/sdcard/boot.img of=/dev/block/mmcblk0p8
dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p13
dd if=/sdcard/firmware.img of=/dev/block/mmcblk0p1
dd if=/sdcard/system.img of=/dev/block/mmcblk0p27
dd if=/sdcard/baseband.img of=/dev/block/mmcblk0p14
Epyoch said:
adb shell
su
dd if=/sdcard/boot.img of=/dev/block/mmcblk0p8
dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p13
dd if=/sdcard/firmware.img of=/dev/block/mmcblk0p1
dd if=/sdcard/system.img of=/dev/block/mmcblk0p27
dd if=/sdcard/baseband.img of=/dev/block/mmcblk0p14
Click to expand...
Click to collapse
when I type SU in, it says /sbin/sh: su: not found
and if i try dd if=/sdcard/system.img of=/dev/block/mmcblk0p27
it gives me dd: can't open '/sdcard/system.img': No such file or directory
Okay, first, in CWM, you don't need to su for root permissions, your ADB shell has them. Second, if you haven't copied your file to the root level of your sdcard and if your file isn't named "system.img" exactly, that command will fail. I'll leave it to you to figure out how to move/rename your system.img file accordingly lol
Edit, it just occurred to me you might be having the garbled sdcard problem where it will spit out garbage if you type in the "ls" command in ADB. The solution has been posted by kernelpan1c, but first let us know what the output of ls is if you're sure your system.img is in the root level of your sdcard.
Malnilion said:
Okay, first, in CWM, you don't need to su for root permissions, your ADB shell has them. Second, if you haven't copied your file to the root level of your sdcard and if your file isn't named "system.img" exactly, that command will fail. I'll leave it to you to figure out how to move/rename your system.img file accordingly lol
Edit, it just occurred to me you might be having the garbled sdcard problem where it will spit out garbage if you type in the "ls" command in ADB. The solution has been posted by kernelpan1c, but first let us know what the output of ls is if you're sure your system.img is in the root level of your sdcard.
Click to expand...
Click to collapse
I already used ADB to push system.img to my phone's SDCard root directory.
Are you suggesting that I reformat my SDCard through windows?
I just realized that I am lacking the boot.img of the stock bell ROM. system and boot are the two that are absolutely necessary to get the phone working correct?
Which rom are you coming from? If it's a Nitro rom/kernelpan1c's rom, you shouldn't have to flash boot.img.
Yeah, according to kernelpan1c, there is something weird going on with the way our sdcard is formatted. After formatting it in Windows he says it should work just fine in the CWM flashed by Rom Manager (I haven't tested it myself, but I'm sure he's correct). I really want to know what is making the Rom Manager CWM unable to read it where bytecode64's CWM can read it just fine...
Malnilion said:
Which rom are you coming from? If it's a Nitro rom/kernelpan1c's rom, you shouldn't have to flash boot.img.
Yeah, according to kernelpan1c, there is something weird going on with the way our sdcard is formatted. After formatting it in Windows he says it should work just fine in the CWM flashed by Rom Manager (I haven't tested it myself, but I'm sure he's correct). I really want to know what is making the Rom Manager CWM unable to read it where bytecode64's CWM can read it just fine...
Click to expand...
Click to collapse
I think I'll be using HO!NO!'s rom as a base for the boot.img, since he has a bell optimus LTE, not the AT&T phone. I'm assuming that he hasn't made any changes to the boot partition, since no custom kernel development has occurred for this phone yet.
I found a so called legit CWM backup of the BELL rom, in one of the lu6200 threads, http://forum.xda-developers.com/showthread.php?t=1472501
but recovering the backup only hangs on the LG logo. I did a "advanced restore" and restored only the system and boot files but that didn't get past the logo either...
It booted after an advanced restore with the "stock" system(from that thread) and the boot (from HONO's), but the WIFI wouldn't start, it said error.
Where did you get your stock bell system.img? and can you provide it?
hereric said:
when I type SU in, it says /sbin/sh: su: not found
and if i try dd if=/sdcard/system.img of=/dev/block/mmcblk0p27
it gives me dd: can't open '/sdcard/system.img': No such file or directory
Click to expand...
Click to collapse
Mount sdcard in recovery.
After you enter adb shell
"mount /sdcard" (without quotations)
Then use the command "dd if=/sdcard/system.img of=/dev/block/mmcblk0p27"
Hi people! I need backups from your phone F180L. Those who have F180L phone please make a backup. Go to the terminal emulator and type:
su
cd /sdcard
mkdir 123
cd /123
dd if=/dev/block/mmcblk0p1 of=modem.img
dd if=/dev/block/mmcblk0p15 of=drm.img
dd if=/dev/block/mmcblk0p12 of=m9kefs1.img
dd if=/dev/block/mmcblk0p13 of=m9kefs2.img
dd if=/dev/block/mmcblk0p26 of=persist.img
Please Share a link to files that are in the /123
mazahaka1997 said:
Hi people! I need backups from your phone F180L. Those who have F180L phone please make a backup. Go to the terminal emulator and type:
su
cd /sdcard
mkdir 123
cd /123
dd if=/dev/block/mmcblk0p1 of=modem.img
dd if=/dev/block/mmcblk0p15 of=drm.img
dd if=/dev/block/mmcblk0p12 of=m9kefs1.img
dd if=/dev/block/mmcblk0p13 of=m9kefs2.img
dd if=/dev/block/mmcblk0p26 of=persist.img
Please Share a link to files that are in the /123
Click to expand...
Click to collapse
Those who know what this is about, need no explanations. Those who are not so sure, be aware that by doing this (specifically the line in red), you will be sharing your phone's identity. Nothing's wrong with that, as long as you know it.
What's in drm and persist images?
Sent from my LG-E975 using Tapatalk
davevinci said:
What's in drm and persist images?
Click to expand...
Click to collapse
For these two, I don't know... Since I am not familiar with nuts and bolts of the DRM implementation on Android, I don't know what exactly is stored on that partition. As for persist, I was trying to get some info on it quite a while ago, for a different phone that is long gone, but couldn't find much.
can anyone give me tutorial how to backup imei without pc? is there an application i need to install first?
zacutesz said:
can anyone give me tutorial how to backup imei without pc? is there an application i need to install first?
Click to expand...
Click to collapse
◄ BACKUP METHOD ►
Follow these instructions, but first install Terminal Emulator from Play Store ►
Thanks to Sector1369
► Make sure that you are rooted
► create a folder called "imei" (without quotes) inside your internal sdcard.
► install Terminal Emulator
► Type the following in terminal
1►
Code:
su
2► Remember to type the lines one by one...
Code:
dd if=/dev/block/mmcblk0p16 of=/sdcard/imei/mmcblk0p16_modemst1
dd if=/dev/block/mmcblk0p17 of=/sdcard/imei/mmcblk0p17_modemst2
dd if=/dev/block/mmcblk0p20 of=/sdcard/imei/mmcblk0p20_fsg
dd if=/dev/block/mmcblk0p23 of=/sdcard/imei/mmcblk0p23_modem
dd if=/dev/block/mmcblk0p9 of=/sdcard/imei/mmcblk0p9_DDR
dd if=/dev/block/mmcblk0p12 of=/sdcard/imei/mmcblk0p12_bk1
dd if=/dev/block/mmcblk0p18 of=/sdcard/imei/mmcblk0p18_fsc
► Now the backup is stored in "imei" folder of your internal storage ,store these files in safe place.
◄ RESTORE METHOD ►
► Make sure that you are rooted
► Make sure you have your backed up folder called "imei" (without quotes) inside your internal sdcard.
► install Terminal Emulator
► Type the following in terminal
1► This will grant root access
Code:
su
2► Remember to type the lines one by one...
Code:
dd if=/sdcard/imei/mmcblk0p16_modemst1 of=/dev/block/mmcblk0p16
dd if=/sdcard/imei/mmcblk0p17_modemst2 of=/dev/block/mmcblk0p17
dd if=/sdcard/imei/mmcblk0p20_fsg of=/dev/block/mmcblk0p20
dd if=/sdcard/imei/mmcblk0p23_modem of=/dev/block/mmcblk0p23
dd if=/sdcard/imei/mmcblk0p9_DDR of=/dev/block/mmcblk0p9
dd if=/sdcard/imei/mmcblk0p12_bk1 of=/dev/block/mmcblk0p12
dd if=/sdcard/imei/mmcblk0p18_fsc of=/dev/block/mmcblk0p18
Automatic method using PC - Auto IMEI Backup & Restore Tool
deadlyindian said:
Follow these instructions, but first install Terminal Emulator from Play Store ►
Thanks to Sector1369
► Make sure that you are rooted
► install Terminal Emulator
► Type the following in terminal
1►
Code:
su
2► Remember to type the lines one by one...
Code:
dd if=/dev/block/mmcblk0p16 of=/sdcard/imei/mmcblk0p16_modemst1
dd if=/dev/block/mmcblk0p17 of=/sdcard/imei/mmcblk0p17_modemst2
dd if=/dev/block/mmcblk0p20 of=/sdcard/imei/mmcblk0p20_fsg
dd if=/dev/block/mmcblk0p23 of=/sdcard/imei/mmcblk0p23_modem
dd if=/dev/block/mmcblk0p9 of=/sdcard/imei/mmcblk0p9_DDR
dd if=/dev/block/mmcblk0p12 of=/sdcard/imei/mmcblk0p12_bk1
dd if=/dev/block/mmcblk0p18 of=/sdcard/imei/mmcblk0p18_fsc
► Now the backup is stored in "imei" folder of your internal storage ,store these files in safe place.
Click to expand...
Click to collapse
every time i press enter after write first line it says "cannot open for write: no such file or directory"
it's that ok?
zacutesz said:
every time i press enter after write first line it says "cannot open for write: no such file or directory"
it's that ok?
Click to expand...
Click to collapse
i forgot to mention that you need to create a folder inside your internal sd card named as
Code:
imei
then place the commands in the terminal.
Oh, ok. Thx mate ?
Thanks.. How to restore this data . . if i facing the related problem after flashing ROM?
zacutesz said:
Oh, ok. Thx mate
Click to expand...
Click to collapse
You're Welcome
lak2004mi said:
Thanks.. How to restore this data . . if i facing the related problem after flashing ROM?
Click to expand...
Click to collapse
Check post 2 :angel:
Great instruction
Thanks a lot, for this step by step backup/restore method!
Hi, i'm stuck on TWRP 2.8.7.1 after a failed attempts to update LineageOS via OTA.
I cannot boot in bootloader nor in system, it always shows TWRP.
I found everywhere that in this case you should use these command lines :
Code:
dd if=/dev/zero of=/dev/block/platform/msm_sdcc.1/by-name/fota
dd if=/dev/zero of=/dev/block/platform/msm_sdcc.1/by-name/misc
but it gives me "no such file or directory" error :
Code:
~ # dd if=/dev/zero of=/dev/block/platform/msm_sdcc.1/by-name/fota
dd: can't open '/dev/block/platform/msm_sdcc.1/by-name/fota': No such file or directory
~ # ls /dev/block/platform/
7824900.sdhci 7864900.sdhci
These are the only files I have in /dev/block/platform/
I don't know why but I can't update TWRP via TWRP : when I try to flash the image it just proposes me to flash the boot partition (not the recovery).
What could I do ?
I forgot to mention I flashed the correct crackling LineageOS image afterward, and it worked, but I'm still blocked in TWRP.
I handled it !
I just changed the command line to :
Code:
dd if=/dev/zero of=/dev/block/platform/7824900.sdhci/by-name/fota
dd if=/dev/zero of=/dev/block/platform/7824900.sdhci/by-name/misc
Too bad I completely wiped all my phone trying to make things work. I hope it will be useful to someone !
Hello, same twrp loop with 3.0.0 or brick with twrp 3.0.3 by fastboot
I find "fastboot continue" to boot in system
I'm testing with last nightly,
after update twrp with playstore
krodelabestiole said:
I handled it !
I just changed the command line to :
Code:
dd if=/dev/zero of=/dev/block/platform/7824900.sdhci/by-name/fota
dd if=/dev/zero of=/dev/block/platform/7824900.sdhci/by-name/misc
Too bad I completely wiped all my phone trying to make things work. I hope it will be useful to someone !
Click to expand...
Click to collapse
This just saved my son's phone
Thanks for your message and knowledge on this matter. The force salutes you and is with you
I keep coming to this thread for the commands.
Thanks krodelabestiole
krodelabestiole said:
I handled it !
I just changed the command line to :
Code:
dd if=/dev/zero of=/dev/block/platform/7824900.sdhci/by-name/fota
dd if=/dev/zero of=/dev/block/platform/7824900.sdhci/by-name/misc
Too bad I completely wiped all my phone trying to make things work. I hope it will be useful to someone !
Click to expand...
Click to collapse
This finally saved me. I was trying the same two commands that you started with and got the same "no such directory..." error and your new commands worked. That was a tense few hours.
So it's been a while since I played with ROMs on my v521, but i just upgraded to TWRP 3.1.1-0, and tried to update lineage to the newest nightly. I'm not swuck in a boot-loop.
I've run the commands in terminal that fixed the issue last time I ran into it:
Code:
dd if=/dev/zero of=/dev/block/platform/msm_sdcc.1/by-name/fota
dd if=/dev/zero of=/dev/block/platform/msm_sdcc.1/by-name/misc
To no avail - terminal says it can't find the files.
I've wiped everything, reformatted data, reinstalled TWRP, etc.
What's next? How can I break out of the loop?
I fixed it. Grabbed the wrong bookmark. Should have run:
Code:
dd if=/dev/zero of=/dev/block/bootdevice/by-name/fota
dd if=/dev/zero of=/dev/block/bootdevice/by-name/misc
Xerloq said:
I fixed it. Grabbed the wrong bookmark. Should have run:
Code:
dd if=/dev/zero of=/dev/block/bootdevice/by-name/fota
dd if=/dev/zero of=/dev/block/bootdevice/by-name/misc
Click to expand...
Click to collapse
I recently ran into this issue. Thanks for posting the fix!
You saved my butt with this, OP! Thank you!
For those who stumble onto this, the "terminal" he's referring to is the TWRP terminal that is accessible in TWRP>>Advanced>>Terminal.
Thanks for this fix! Could someone please tell me how to type an equal sign (=) in the TWRP terminal keyboard? I can't find it anywhere. I managed to give the tablet these commands with the adb shell.
How to upgrading 3.1.1-0?
How to upgrading 3.1.1-0?
yangseunghwan said:
How to upgrading 3.1.1-0?
Click to expand...
Click to collapse
I am using 3.1.1-0.
Thanks, this worked perfectly! I'm running TWRP-V521-3.0.2.0
How to type an "=" sign in TWRP terminal kb
channeledbymodem said:
Thanks for this fix! Could someone please tell me how to type an equal sign (=) in the TWRP terminal keyboard? I can't find it anywhere. I managed to give the tablet these commands with the adb shell.
Click to expand...
Click to collapse
I'll answer my own question in case someone comes here looking for the answer:
in twrp terminal keyboard to type "=" sign, tap ?123, then ~\{ for special characters including "="
Xerloq said:
I fixed it. Grabbed the wrong bookmark. Should have run:
Code:
dd if=/dev/zero of=/dev/block/bootdevice/by-name/fota
dd if=/dev/zero of=/dev/block/bootdevice/by-name/misc
Click to expand...
Click to collapse
I have been stuck on this issue for over 5 hours thank you so mucn