Create Custom Image? - Galaxy 3 Android Development

How can i pull my current system to a tar file to flash it like a firmware?

ilendemli said:
How can i pull my current system to a tar file to flash it like a firmware?
Click to expand...
Click to collapse
Use dd It will work

the problem is, i dont know what dd is

ilendemli said:
the problem is, i dont know what dd is
Click to expand...
Click to collapse
Google it .

mkdir /sdcard/droid_dd_backup/
dd if=/dev/block/mtdblock4 of=/sdcard/droid_dd_backup/system.img
dd if=/dev/block/mtdblock6 of=/sdcard/droid_dd_backup/data.img
dd if=/dev/block/mtdblock5 of=/sdcard/droid_dd_backup/cache.img
dd if=/dev/block/mtdblock0 of=/sdcard/droid_dd_backup/config.img
do i need something on my phone?
EDIT: why arent here mtdblock 1-3?

Cannot open for read no such file or directory :/

Check your mounts with mount

dd if=/dev/block/bml3 of=/sdcard/droid_dd_backup/bml3.bak
dd if=/dev/block/bml4 of=/sdcard/droid_dd_backup/bml4.bak
dd if=/dev/block/bml5 of=/sdcard/droid_dd_backup/bml5.bak
dd if=/dev/block/bml6 of=/sdcard/droid_dd_backup/bml6.bak
dd if=/dev/block/bml7 of=/sdcard/droid_dd_backup/bml7.bak
dd if=/dev/block/bml8 of=/sdcard/droid_dd_backup/bml8.bak
dd if=/dev/block/bml9 of=/sdcard/droid_dd_backup/bml9.bak
dd if=/dev/block/bml10 of=/sdcard/droid_dd_backup/bml10.bak
dd if=/dev/block/stl4 of=/sdcard/droid_dd_backup/stl4.bak
dd if=/dev/block/stl6 of=/sdcard/droid_dd_backup/stl6.bak
dd if=/dev/block/st7 of=/sdcard/droid_dd_backup/stl7.bak
dd if=/dev/block/stl8 of=/sdcard/droid_dd_backup/stl8.bak
i done it already with there commands, but now, how can i create a tar file to flash with odin?

Keep the language English to not confuse other users...
You should dd to factoryfs.rfs, datafs.rfs and so on, a bak file is not recognized by Odin. Then you can use lzarc or total commander to tar the files.

but which bml file must i dd to factory.rfs. there are more than 10 and in a tar file there are 5 or 6 files :/

Check your mounts, system needs to be factoryfs.rfs so its dev/block/bml6

aha.. and how do you know it?
bml6 is 220mb
Okey, i hope this is right:
su
cat /dev/block/bml1 > /sdcard/boot.bin
cat /dev/block/bml2 > /sdcard/Sbl.bin
cat /dev/block/bml3 > /sdcard/logo.png
cat /dev/block/bml4 > /sdcard/zImage
cat /dev/block/bml5 > /sdcard/factoryfs.rfs
cat /dev/block/bml6 > /sdcard/datafs.rfs
cat /dev/block/bml7 > /sdcard/cachefs.rfs
cat /dev/block/bml8 > /sdcard/recovery.rfs

ilendemli said:
aha.. and how do you know it?
bml6 is 220mb
Okey, i hope this is right:
su
cat /dev/block/bml1 > /sdcard/boot.bin
cat /dev/block/bml2 > /sdcard/Sbl.bin
cat /dev/block/bml3 > /sdcard/logo.png
cat /dev/block/bml4 > /sdcard/zImage
cat /dev/block/bml5 > /sdcard/factoryfs.rfs
cat /dev/block/bml6 > /sdcard/datafs.rfs
cat /dev/block/bml7 > /sdcard/cachefs.rfs
cat /dev/block/bml8 > /sdcard/recovery.rfs
Click to expand...
Click to collapse
Hmm, system should be factoryfs.rfs, so you mixed something up here. Also you would not need to backup zimage, sbl, boot and cache since you don't change anything in there for a rom.

Normally even data stays untouched...

^^ i only dont like to install everything back, when i flash something other, and i dont want to use titanium backup or something like that.

Maybe you can try extract JPF firmware by Total Commander becouse you have 5 files *.tar.md5 and you need PDA files with factoryfs.rfs includet in with App . After extract use UltraISO in my case or other Virtual image program and in factoryfs.rfs deleted aplication that you want . After that click save and by Total Commander put factoryfs.rfs back . I don´t tried this procedure yet but and I think that can work fine...

Mh.. Did you just try "mount" on a console ? Because it would gave you from what /system and /data are mounted.
And yeah, flashing pour /data as datafs.rfs won't work, i tried. Too bad .

do you mean total commander for the phone? or the pc?
can i see the content of my phone usind total commander? oO

ilendemli said:
do you mean total commander for the phone? or the pc?
can i see the content of my phone usind total commander? oO
Click to expand...
Click to collapse
Use Total Commander on PC and you only do change in rom which you can flash after that . You can't edit your phone by Total Commande for PC . You can use some similar on your phone to edit system and make changes by app call RootExplorer.apk .

to edit the file, it will not be so difficulty, i need the file from my phone :/ thats the problem..

Related

[HOW-TO]Create Custom ODIN Images for Backup/Restore

I'm sure several people will be wanting this information, so I figured I would post it here for everyone. This will allow you to backup your system and create custom Odin images for restore purposes. For anyone unfamiliar with the Samsung system, they use Odin to flash things to the device, much like HTC has RUU and Moto has SBF. Odin files are either .tar files, or .tar.md5 files.
The .tar.md5 files are .tar files with the md5 checksum added to the end of the file. If you attempt to flash a .tar.md5 file, Odin will automatically check that the contents are what they should be before flashing and proceed with the flash if the md5 is valid, otherwise it will stop.
In Odin, you should use the PDA button for all flashing. The PIT button may be used as well, if we can get a valid .pit file for the device, but for now, PIT won't be used either. Other than PDA, Start/Reset are the only other buttons you need to worry about.
Now, on to creating the backup files. First, you will need your device to be rooted (perm or temp root will work), and you also need to have access to terminal on the phone, either via an emulator or adb shell access. To create the backup files, you won't need a Linux/UNIX system, but you will if you want to create a flashable Odin package. The following will output the files on the root of the SDCard, adjust the "of=" path if you want them somewhere else. It will also create the files for the proper filename for Odin as well. So to create the files, here are the commands you will use from root shell (#):
System:
Code:
dd if=/dev/block/stl10 of=/sdcard/factoryfs.rfs bs=4096
Kernel:
Code:
dd if=/dev/block/bml8 of=/sdcard/zImage bs=4096
Recovery:
Code:
dd if=/dev/block/bml9 of=/sdcard/recovery.bin bs=4096
DO NOT INCLUDE THE FOLLOWING IN ANYTHING BUT A PERSONAL BACKUP
Cache:
Code:
dd if=/dev/block/mmcblk0p3 of=/sdcard/cache.rfs bs=4096
DBData:
Code:
dd if=/dev/block/stl11 of=/sdcard/dbdata.rfs bs=4096
Data:
Code:
dd if=/dev/block/mmcblk0p1 of=/sdcard/movinand.bin bs=4096
The last three files (cache, dbdata, data) may contain personal information, so do not include these 3 files in anything but a personal backup/recovery package.
To create a flashable Odin package, you need to pull all of the files off of the phone/sdcard and onto your computer. From there, you use the following to create the package:
Code:
tar -H ustar -c factoryfs.rfs recovery.bin zImage > package_name.tar
md5sum -t package_name.tar >> package_name.tar
mv package_name.tar package_name.tar.md5
If you want to include cache/dbdata/data in the above for personal use, just add them after the "-c" and before the ">".
There are other files that may be in Odin packages, but they are protected by Samsung and cannot be dumped properly. The files are the bootloader, secondary bootloader, modems, and .lfs partitions. The files would be boot.bin, Sbl.bin, modem.bin (not sure what it would be for the CDMA/LTE dual modem here), and param.lfs. It however isn't that big of an issue that these can't be dumped as the can't really be altered by normal flashing of the device, and are usually only altered via OTA updates.
Thanks for this info imnuts! I unfortunately updated to the new update and would like to go back to rooted but cant until I downgrade.
Thanks!
Thanks for posting this. I'm going to attempt to make a personal backup and then I can factory reset the phone and make a stock version for people to use. I'm haven't installed the update yet either, so I'm hoping this will let people get back to ED1. I've also been playing around with theming using the fascinate community rom theme and ninjamorph to swap files. It'll take a while, but it's currently the only way I feel safe messing with framework-res.
wynalazca said:
Thanks for posting this. I'm going to attempt to make a personal backup and then I can factory reset the phone and make a stock version for people to use. I'm haven't installed the update yet either, so I'm hoping this will let people get back to ED1. I've also been playing around with theming using the fascinate community rom theme and ninjamorph to swap files. It'll take a while, but it's currently the only way I feel safe messing with framework-res.
Click to expand...
Click to collapse
I'm definitely looking forward to having a downgrade ROM image to get back to ED1!
So how do you add the last personal 3 i just got the droid charge and i am not very familiar with samsung files i had a droid x and a thunderbolt very shortly and am familiar with ruu and sbf but how do you add cache dbdata and the other one. I meab like the actual command not the instruction to put it after c
rami98 said:
So how do you add the last personal 3 i just got the droid charge and i am not very familiar with samsung files i had a droid x and a thunderbolt very shortly and am familiar with ruu and sbf but how do you add cache dbdata and the other one. I meab like the actual command not the instruction to put it after c
Click to expand...
Click to collapse
The only thing that would change would be the tar command. If you want to include the other files, it would be:
Code:
tar -H ustar -c cache.rfs dbdata.rfs factoryfs.rfs movinand.bin recovery.bin zImage > package_name.tar
md5sum -t package_name.tar >> package_name.tar
mv package_name.tar package_name.tar.md5
You just need to pull the files from your phone and have them in the same directory that you're in in terminal, and have them named appropriately. It also doesn't matter what order they are in (that I know of), I just have them in alphabetical order for ease of reading.
So im going to try and do the voodoo lagfix for the first time ever but I wanted to make a backup. Im on ED2 and NOT rooted so how would I go about making these backups?
imnuts said:
The only thing that would change would be the tar command. If you want to include the other files, it would be:
Code:
tar -H ustar -c cache.rfs dbdata.rfs factoryfs.rfs movinand.bin recovery.bin zImage > package_name.tar
md5sum -t package_name.tar >> package_name.tar
mv package_name.tar package_name.tar.md5
You just need to pull the files from your phone and have them in the same directory that you're in in terminal, and have them named appropriately. It also doesn't matter what order they are in (that I know of), I just have them in alphabetical order for ease of reading.
Click to expand...
Click to collapse
I tried the above and I keep getting this error message in the command prompt:
'tar' is not recognized as an internal or external command, operable program or batch file.
(I'm trying this on windows 7 professional)
Any help would be appreciated, thanks!
mypantsaretorn said:
I tried the above and I keep getting this error message in the command prompt:
'tar' is not recognized as an internal or external command, operable program or batch file.
(I'm trying this on windows 7 professional)
Any help would be appreciated, thanks!
Click to expand...
Click to collapse
You wouldn't by any chance be trying the "tar" command at a windows command prompt, would you?
imnuts said:
To create the backup files, you won't need a Linux/UNIX system, but you will if you want to create a flashable Odin package.
To create a flashable Odin package, you need to pull all of the files off of the phone/sdcard and onto your computer. From there, you use the following to create the package:
Code:
tar -H ustar -c factoryfs.rfs recovery.bin zImage > package_name.tar
md5sum -t package_name.tar >> package_name.tar
mv package_name.tar package_name.tar.md5
If you want to include cache/dbdata/data in the above for personal use, just add them after the "-c" and before the ">".
Click to expand...
Click to collapse
Course you might be running Linux in a vmware or Hyper-V environment....hint?
HTH
Damn! I didn't pay attention to the second part of that sentence! Lol
Thanks for the "hint"..
Sent from my SCH-I510 using XDA App
The other option would be using Cygwin, but I've never tried it, so it may or may not work.
imnuts said:
The other option would be using Cygwin, but I've never tried it, so it may or may not work.
Click to expand...
Click to collapse
cygwin works!
Edit: Here is how:
1. Search google for cygwin - download
2. Run - you will be prompted to get packages - I assumed "archive" was a good place to start - not sure if you need this or not...
3. When complete you will see a new icon on your desktop - double-click
4. Be patient as it loads
5. Copy the files output'ed from first post to same folder on PC
6. Back in cygwin:
a. cd x: (where x: is the drive letter of the drive that has the folder with the files)
b. tar -H ustar -c cache.rfs dbdata.rfs movinand.bin factoryfs.rfs recovery.bin zImage > package_name.tar
c: md5sum -t package_name.tar >> package_name.tar
d: mv package_name.tar package_name.tar.md5
Complete output of commands:
These files are for the users to personalise their cygwin experience.
They will never be overwritten nor automatically updated.
`./.bashrc' -> `/home/UWINKET//.bashrc'
`./.bash_profile' -> `/home/UWINKET//.bash_profile'
`./.inputrc' -> `/home/UWINKET//.inputrc'
`./.profile' -> `/home/UWINKET//.profile'
Your group is currently "mkgroup". This indicates that neither
your gid nor your pgsid (primary group associated with your SID)
is in /etc/group.
The /etc/group (and possibly /etc/passwd) files should be rebuilt.
See the man pages for mkpasswd and mkgroup then, for example, run
mkpasswd -l [-d] > /etc/passwd
mkgroup -l [-d] > /etc/group
Note that the -d switch is necessary for domain users.
[email protected] ~
$ cd h:
System Volume Information
[email protected] /cygdrive/h
$ cd downloads
[email protected] /cygdrive/h/downloads
$ cd charge
[email protected] /cygdrive/h/downloads/charge
$ cd tarbackup/
[email protected] /cygdrive/h/downloads/charge/tarbackup
$ tar -H ustar -c cache.rfs dbdata.rfs movinand.bin factoryfs.rfs recovery.bin
zImage > package_name.tar
[email protected] /cygdrive/h/downloads/charge/tarbackup
$ md5sum -t package_name.tar >> package_name.tar
[email protected] /cygdrive/h/downloads/charge/tarbackup
$ mv package_name.tar package_name.tar.md5
[email protected] /cygdrive/h/downloads/charge/tarbackup
$
Hmm flash did not work with my personal data in it - got an error. Created a new .tar file with just factoryfs.rfs recovery.bin and zImage and was able to flash that. TG for TiBu!
jism31 said:
Thanks for this info imnuts! I unfortunately updated to the new update and would like to go back to rooted but cant until I downgrade.
Click to expand...
Click to collapse
How do you start doing this. How do I get to root shell (#)... Thanks
AD
I plan to get rooted on ED1 so I can get a stock image backed up, and have a clean base to work from. Still getting my head around the odin stuff first.
RaptorMD said:
I plan to get rooted on ED1 so I can get a stock image backed up, and have a clean base to work from. Still getting my head around the odin stuff first.
Click to expand...
Click to collapse
you dont have to do that its already done
http://forum.xda-developers.com/showthread.php?t=1085190
Well, I successfully followed all the instructions and have created my first ODIN flashable file, I have not tried to flash it yet. I'm just curious, I pull all the different .rfs, .bin, and zImage on this file and noticed it's about 1.8gb file. Is this normal?
Also, before I try to flash this. Should I have dissable voodoo lagfix and converted back to rfs before I dumped the files?
Thanks for all the help!
JKChad said:
Well, I successfully followed all the instructions and have created my first ODIN flashable file, I have not tried to flash it yet. I'm just curious, I pull all the different .rfs, .bin, and zImage on this file and noticed it's about 1.8gb file. Is this normal?
Also, before I try to flash this. Should I have dissable voodoo lagfix and converted back to rfs before I dumped the files?
Thanks for all the help!
Click to expand...
Click to collapse
Yes, that's normal for it to be so large as dd will dump the partition, including empty space. If you were to compress it with zip or lzma, it'd drop down considerably.
Not sure about the voodoo part as I've never dumped files from an ext4 partition. I don't see any reason why it wouldn't work, but I'd flash with caution and have another working image ready just in case.
imnuts said:
Not sure about the voodoo part as I've never dumped files from an ext4 partition. I don't see any reason why it wouldn't work, but I'd flash with caution and have another working image ready just in case.
Click to expand...
Click to collapse
Shouldn't be an issue as long as he keeps the voodoo kernel.
Sent from my SCH-I510 using Tapatalk
Anybody try this with voodoo yet ?

[GUIDE] How To Convert ODIN Tars to System.imgs for CWM (and vice versa)

This will probably get moved, but I do believe it is development related because it is important to everyone who flashes ROMs but can't use ODIN for whatever reason (ie Linux/Mac users).
Seeing all the ROM cookers get asked so much to make system.imgs or update.zips to cater to the Linux/Mac users, I decided it was time to tell people how to just convert an ODIN Tar.
I will tell people how to do it on Ubuntu seeing that is what I have (in a VM), but once I have the patience to install Mac OS in a VM, I shall make a guide for that.
Please note that if the factoryfs.rfs is in RFS format (ie it's a stock ROM or it's a ROM by someone who doesn't like EXT4 for whatever reason), you will not be able to do this. The format the factoryfs.rfs is in (EXT2, 4, JFS, whatever) needs to be supported by your Linux kernel. You can check that by doing cat /proc/filesystems
After a lot of investigating, I have learnt that RFS is a broken version of FAT. You could poke around with it and try mounting it as vfat but I don't guarantee success.
ODIN TAR -> System.img
Download your TAR and save it to your Desktop (I will use Kyorarom Ascendency Beta)
Open the TAR with Archive Manager (or whatever you use) and extract the factoryfs.rfs from it to your desktop. You don't need anything else
Open Terminal (under Applications > Accessories)
Go into superuser mode:
Code:
sudo -s
Make a mountpoint for the system:
Code:
mkdir /mnt/system
Mount the image
Code:
mount -o loop ~/Desktop/factoryfs.rfs /mnt/system
Change directory to /mnt and make the tarball for the system.img
Code:
cd /mnt
tar cvf system.img system
Unmount and clean up
Code:
umount /mnt/system
rm -rf /mnt/system
Copy the system.img to your phone
System.img -> ODIN TAR
Download a TAR from another ROM, and the system.img to your desktop.
Open the TAR with Archive Manager (or whatever you use) and extract the factoryfs.rfs from it to your desktop. You don't need anything else
Open Terminal (under Applications > Accessories)
Go into superuser mode:
Code:
sudo -s
Make a mountpoint for the system:
Code:
mkdir /mnt/system
Mount the image
Code:
mount -o loop ~/Desktop/factoryfs.rfs /mnt/system
Change directory to /mnt and make the tarball for the system.img
Code:
cd /mnt
rm -rf system/*
tar xvf ~/Desktop/system.img
Unmount and clean up
Code:
umount /mnt/system
rm -rf /mnt/system
Put the factory.rfs into a TAR and flash it with ODIN.
Done! Hopefully this should all work nicely for everyone.
Nice One... Should be helpful for ROM Developers to provide system.img for their ROM's...
Nice one. Thanks. Though I don't use .imgs still was quite Informative.
Sent from my GT-I5800 using xda premium
Nice tut, on windows they can use adb and dd/ mkyaffs2img
From my fingers to your eyez
cdesai said:
Nice tut, on windows they can use adb and dd/ mkyaffs2img
From my fingers to your eyez
Click to expand...
Click to collapse
Can u pls explain tht furthur.
vsoft11 said:
Can u pls explain tht furthur.
Click to expand...
Click to collapse
Pretty much do the same thing but from in ADB shell, and instead of the command:
Code:
sudo -s
with
Code:
su
and
Code:
tar cvf system.img system
gets changed to
Code:
tar cvf /sdcard/system.img system
Also I'm pretty sure on the phone, /dev/loop0 is called /dev/block/loop0.
I'll probably have to wait until you put up a mac tutorial..
harkan89 said:
I'll probably have to wait until you put up a mac tutorial..
Click to expand...
Click to collapse
As MacOS is basically Unix you should be able to do the same with/on/in a mac when you open a Terminal/Console (forgot how it's called exactly)....
Wouldnt it be easier if you run this commands?
Code:
mount -o loop factoryfs.rfs ~/Desktop/system
tar cvf system.img system
the mount command mounted it succesfully for me
mankokoma said:
As MacOS is basically Unix you should be able to do the same with/on/in a mac when you open a Terminal/Console (forgot how it's called exactly)....
Click to expand...
Click to collapse
Wait a sec.. I have to use adb for this? Cuz I tried the commands as mark mentioned but it didnt turn up any results.. I do recognize some of these commands, so probably it should run on the mac Terminal..
TearsDontFalls said:
Wouldnt it be easier if you run this commands?
Code:
mount -o loop factoryfs.rfs ~/Desktop/system
tar cvf system.img system
the mount command mounted it succesfully for me
Click to expand...
Click to collapse
Because I am foolish. I shall improve the guide later today.
harkan89 said:
Wait a sec.. I have to use adb for this? Cuz I tried the commands as mark mentioned but it didnt turn up any results.. I do recognize some of these commands, so probably it should run on the mac Terminal..
Click to expand...
Click to collapse
I got my Mac VM working so I will use that and make a Mac guide.
hillbeast said:
I got my Mac VM working so I will use that and make a Mac guide.
Click to expand...
Click to collapse
Yaay! Finally!
harkan89 said:
Wait a sec.. I have to use adb for this? Cuz I tried the commands as mark mentioned but it didnt turn up any results.. I do recognize some of these commands, so probably it should run on the mac Terminal..
Click to expand...
Click to collapse
You can use adb too (but these commands should work on a Mac too, as Mac | Linux -- UNIX (based on)
Or you can always use cwm!
is there also a way to convert system.img to tar files...
cdesai said:
You can use adb too (but these commands should work on a Mac too, as Mac | Linux -- UNIX (based on)
Or you can always use cwm!
Click to expand...
Click to collapse
I have superuser enabled on mac.. WHen I try the first command.. mkdir /mnt/system.. it says no such file or directory found.. and losetup is apparently not a command recognized by mac terminal..
mohsin2cool said:
is there also a way to convert system.img to tar files...
Click to expand...
Click to collapse
Yes, I shall make a guide for that after Christmas.
harkan89 said:
I have superuser enabled on mac.. WHen I try the first command.. mkdir /mnt/system.. it says no such file or directory found.. and losetup is apparently not a command recognized by mac terminal..
Click to expand...
Click to collapse
Macs don't use a /mnt directory. They use /Volumes, just like how Ubuntu is moving over to /media.
And I don't think the mach kernel supports losetup type stuff. I will make a Mac guide after Christmas.
HI
If u got the time, Can u pls make a tutorial video for this using adb. Would have bn very helpful.
devc0ol said:
If u got the time, Can u pls make a tutorial video for this using adb. Would have bn very helpful.
Click to expand...
Click to collapse
Sure. I will do it in the coming days.
nice guide, but will it also work if you convert it with CWM recovery?
JasonPurungrit said:
nice guide, but will it also work if you convert it with CWM recovery?
Click to expand...
Click to collapse
What do you mean?

How to make an Odin flashable .tar from .img

So i just wanted to share this info as it has been very helpful to me in my development process. When making custom recoveries you often end up with a recovery.img and with Samsung devices there isn't really a good way to flash those. The best way to flash these is to run the following on a linux box:
$ tar -H ustar -c recovery.img > recovery.tar
$ md5sum -t recovery.tar >> recovery.tar
$ mv recovery.tar recovery.tar.md5
Now you can flash that recovery.tar.md5 through Odin in the PDA tab. Im guessing you can use the same process on any .img file (userdata.img, etc.) you create but i havent tested that. Ive only tested this on recovery.img and it works great.
Sorry if this is old information but i couldn't find any posts in the Skyrocket section and just wanted to share this.
Thanks
Easiest way I've found to flash a recovery img on skyrocket is to rename recovery file to recovery.img and place it on internal SD. (This won't work if your soft bricked and a tar file will be necessary )
Then type: dd if=/sdcard/recovery.img of=/dev/block/mmcblk022 in adb shell or terminal emulator.
That should work for any of our recovery images as long as you rename it to recovery.img and put it in your internal SD. I suppose you could replace /sdcard/ with /external_sd/ if you wanted to flash from external SD. Oh and don't be supprised if you catch a little heat for posting this in dev section.
Sent from my SAMSUNG-SGH-I727 using xda premium
Noob question.... Is there a way to do this on windows vs linux?
cdshepherd said:
Easiest way I've found to flash a recovery img on skyrocket is to rename recovery file to recovery.img and place it on internal SD. (This won't work if your soft bricked and a tar file will be necessary )
Then type: dd if=/sdcard/recovery.img of=/dev/block/mmcblk022 in adb shell or terminal emulator.
That should work for any of our recovery images as long as you rename it to recovery.img and put it in your internal SD. I suppose you could replace /sdcard/ with /external_sd/ if you wanted to flash from external SD. Oh and don't be supprised if you catch a little heat for posting this in dev section.
Sent from my SAMSUNG-SGH-I727 using xda premium
Click to expand...
Click to collapse
dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p22 bs=4096
And not sure if there is a windows way. Try googling for Windows tar and md5sum. There most likely is a way.
Sent from my SAMSUNG-SGH-I727 using XDA App
Thank you
I used your method to flash the clockworkmod touch recovery. It worked flawlessly
Sk8er, I used your method today. Its flawless dude. Thanks
Sent from my SAMSUNG-SGH-I727 using xda premium
kamgrn said:
Noob question.... Is there a way to do this on windows vs linux?
Click to expand...
Click to collapse
funny... nobody bothered to answer this.
The way to do this in Windows as I know:
1. Ensure the fastboot drivers for your device is installed.
2. Acquire the fastboot binary (this is fastboot.exe).
3. Test if fastboot can see your device. Open DOS Command prompt, go to the fastboot binary folder and run "fastboot devices" command.
Example: C:\FASTBOOT\fastboot devices ---> The output should be some sort of serial number.
4. Flash the img file you have via command "fastboot flash boot <image_filename>"
Example: C:\FASTBOOT\fastboot flash boot boot.img
jtdc said:
funny... nobody bothered to answer this.
The way to do this in Windows as I know:
1. Ensure the fastboot drivers for your device is installed.
2. Acquire the fastboot binary (this is fastboot.exe).
3. Test if fastboot can see your device. Open DOS Command prompt, go to the fastboot binary folder and run "fastboot devices" command.
Example: C:\FASTBOOT\fastboot devices ---> The output should be some sort of serial number.
4. Flash the img file you have via command "fastboot flash boot <image_filename>"
Example: C:\FASTBOOT\fastboot flash boot boot.img
Click to expand...
Click to collapse
What if this is for the note, where there is no fastboot? I can get to odin mode, or to recovery mode, but no fastboot...unless i'm missing something..??
Thanks
Thank you for the post. I used your method but to flash TWRP as follows:
1. Downloaded recovery file (openrecovery-twrp-2.2.0-skyrocket.img) for Samsung Skyrocket from TWRP website on Linux.
2. Renamed file to recovery.img
3. Ran the following commands to covert IMG file to a TAR file:
tar -H ustar -c recovery.img > openrecovery-twrp-2.2.0-skyrocket.tar
md5sum -t openrecovery-twrp-2.2.0-skyrocket.tar >> openrecovery-twrp-2.2.0-skyrocket.tar
mv openrecovery-twrp-2.2.0-skyrocket.tar openrecovery-twrp-2.2.0-skyrocket.tar.md5
4. Flashed recovery using ODIN as customary.
It worked flawlessly with no issues. I highly recommend TWRP over CWM Touch Recovery. TWRP wipes things cleanly. You DO NOT have to wipe 3x which will reduce the wear and tear on your device.
ebaul said:
What if this is for the note, where there is no fastboot? I can get to odin mode, or to recovery mode, but no fastboot...unless i'm missing something..??
Thanks
Click to expand...
Click to collapse
use samsung tool kit v2.3. i had same issue as u and this page only sort of helped me and i guessed my way to tool kit. you only need to install it and place the recovery you need to transform in its input folder, where ever you installed it. then run it and just follow the instructions its pretty easy.
Thanks for the Pakistanian guy above me for reviving this vital topic ...
this method is great :
dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p22 bs=4096
BUT to be sure no leftovers are there :
dd if=/dev/zero of=/dev/block/mmcblk0p22
dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p22 bs=4096
Can be done inside Android if you're rooted , and a terminal emulator app is installed ...
nice commands to keep in mind.
mahanddeem said:
Thanks for the Pakistanian guy above me for reviving this vital topic ...
this method is great :
dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p22 bs=4096
BUT to be sure no leftovers are there :
dd if=/dev/zero of=/dev/block/mmcblk0p22
dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p22 bs=4096
Can be done inside Android if you're rooted , and a terminal emulator app is installed ...
Click to expand...
Click to collapse
Lol
its pakistani
btw great the other method worked for you
sk8erwitskil said:
So i just wanted to share this info as it has been very helpful to me in my development process. When making custom recoveries you often end up with a recovery.img and with Samsung devices there isn't really a good way to flash those. The best way to flash these is to run the following on a linux box:
$ tar -H ustar -c recovery.img > recovery.tar
$ md5sum -t recovery.tar >> recovery.tar
$ mv recovery.tar recovery.tar.md5
Now you can flash that recovery.tar.md5 through Odin in the PDA tab. Im guessing you can use the same process on any .img file (userdata.img, etc.) you create but i havent tested that. Ive only tested this on recovery.img and it works great.
Sorry if this is old information but i couldn't find any posts in the Skyrocket section and just wanted to share this.
Thanks
Click to expand...
Click to collapse
Would it be the same approach whilst with custom zImage? and load into PDA tab? or are they any other settings to flash custom kernel with odin... I tried flashing with heimdall v.1.3.1 and 1.3.2 both version results "fail to initialise protocol". could please provide any pointes on how to flash custom built kernel image on S2 lte.
I think I finally find it!!
thank you man +1
mrbeers said:
Anyone have a CWD backup for the Repp? I am both newb & noob to the rooting scene and deleted my backup when I factory reset my phone. Any help will be appreciated. I'm gonna spam this message until I get my 10 posts then I'll post a new thread. Sorry mods! My family is without a phone until I fix this!
Click to expand...
Click to collapse
I don't recommend that if you want help
Sent from my SGH-I727 using Tapatalk 2
Huge thanks !
sk8erwitskil said:
So i just wanted to share this info as it has been very helpful to me in my development process. When making custom recoveries you often end up with a recovery.img and with Samsung devices there isn't really a good way to flash those. The best way to flash these is to run the following on a linux box:
$ tar -H ustar -c recovery.img > recovery.tar
$ md5sum -t recovery.tar >> recovery.tar
$ mv recovery.tar recovery.tar.md5
Now you can flash that recovery.tar.md5 through Odin in the PDA tab. Im guessing you can use the same process on any .img file (userdata.img, etc.) you create but i havent tested that. Ive only tested this on recovery.img and it works great.
Sorry if this is old information but i couldn't find any posts in the Skyrocket section and just wanted to share this.
Thanks
Click to expand...
Click to collapse
Hi! First of all, thx a lot really was trying to find this out for a long time. One Question i have tough. I Only used the first command and left it as a simple tar file, flashed it with odin and all was well. So what do you actally do by adding md5sum and then renaming it? Is it better to add the md5sum or does it make no difference?
again huge thanks! I always used mskip toolkit, but i like to not depend on additional software
I believe ODIN will verify the md5 sum of the .img if the .md5 file is in the tar. Just in case your .img in the tar gets corrupted. If that happens ODIN will abort the flash and report something like md5 mismatch
Sent from my SAMSUNG-SGH-I727 using xda app-developers app
---------- Post added at 12:21 PM ---------- Previous post was at 12:20 PM ----------
So its not necessary but a good practice.
Sent from my SAMSUNG-SGH-I727 using xda app-developers app
sk8erwitskil said:
So i just wanted to share this info as it has been very helpful to me in my development process. When making custom recoveries you often end up with a recovery.img and with Samsung devices there isn't really a good way to flash those. The best way to flash these is to run the following on a linux box:
$ tar -H ustar -c recovery.img > recovery.tar
$ md5sum -t recovery.tar >> recovery.tar
$ mv recovery.tar recovery.tar.md5
Now you can flash that recovery.tar.md5 through Odin in the PDA tab. Im guessing you can use the same process on any .img file (userdata.img, etc.) you create but i havent tested that. Ive only tested this on recovery.img and it works great.
Sorry if this is old information but i couldn't find any posts in the Skyrocket section and just wanted to share this.
Thanks
Click to expand...
Click to collapse
very helpful... thx mate
That's strange but command from first post don't work for me. Tablet says about incorrect file (.img, not .img.md5). So I've modified commands to make them work with Galaxy Tab 8.9 and Odin 1.8.5:
Code:
cp recovery.img recovery.img.md5
md5sum -t recovery.img.md5 >> recovery.img.md5
tar -H ustar -c recovery.img.md5 > recovery.tar
md5sum -t recovery.tar >> recovery.tar
mv recovery.tar recovery.tar.md5

Plz .. Help .. My big problem in mobile .. In process dd if=/dev/zero

Hello everyone
First excuse me because I am a little bad in English
But there is a problem that has tired me a lot and tired in trying to find a solution to it in vain
The problem is in knowing the names of the mobile sectors such as modem, modest 1, modemst2, carrier and other sectors
.....
I tried many of the following attempts
1
By order ls like
adb shell
$ su
# cd /dev/block/platform/msm_sdcc.2/by-name/
# ls
But unfortunately this message appears
sh: cd: /dev/block/platform/msm_sdcc.2/by-name: No such file or directory
2
Read file (mount)
Located in the folder (proc)
I got some names on it but the names were not required
3
Read file (last_log)
Located in the path (cache / recovery /)
I also got some but did not get the names of the required sectors such as modem and modemst 1.2
..............
Please help me because I need this solution for the dev / zero process
I put my problem on more than one programmer and most of the site but I could not find a solution
I hope you get a solution to my problem and thank you
First question is... where are you getting msm_sdcc.2 from? When you go into adb shell, cd into /dev/block/platform. Hit tab twice (or do ls to cd into the directory manually) and you will then be at the directory where it says a bunch of items such as mmcXXXX. cd to by-name and do an ls -l. You will see all the names of the partitions.
For the second question, what are you trying to do? Are you trying to mount partition?
For your third question, modemst1 and modemst2 along with modem are located in /dev/block/platform/XXXX/XXXX/by-name/ .
Also, what are you trying to do with the dd if=/dev/zero command? You do realize that command adds zeros to the file, making it completely unusable and filling up the phone max size. Say for example if you had a text file as 123. If you do dd if=/dev/zero of=file.txt, it would replace the file with zeros until disk space is maxed out, unless you specify a bite size and count.

"write error: No space left on device" error fix

when im about to remove the modem files like this from adb menu
dd if=/dev/zero of=/dev/block/bootdevice/by-name/mdm1m9kefs1
dd if=/dev/zero of=/dev/block/bootdevice/by-name/mdm1m9kefs2
dd if=/dev/zero of=/dev/block/bootdevice/by-name/mdm1m9kefs3
dd if=/dev/zero of=/dev/block/bootdevice/by-name/mdm1m9kefsc
im getting "write error: No space left on device" error.
how to fix this. or is there any other way to delete those files.
Those commands will overwrite the named block-devices with zeroes, they don't get deleted means it's not technically erasing.
jwoegerbauer said:
Those commands will overwrite the named block-devices with zeroes, they don't get deleted means it's not technically erasing.
Click to expand...
Click to collapse
ok, so is there a way to overwrite them? cos atm i cant with those commands
To overwrite you have to specify as infile an image ( .img ) and as outfile the block-device wanted
jwoegerbauer said:
Look inside here:
dd: No Space Left on Device | Beamtic
After running dd for a long time, it stops with an error saying no space is left on the device.
beamtic.com
Click to expand...
Click to collapse
would it also be fixed when i format the device and wipe all data?
Raw34 said:
would it also be fixed when i format the device and wipe all data?
Click to expand...
Click to collapse
Re-read my altered post above yours.
jwoegerbauer said:
To overwrite you have to specify as infile an image ( .img ) and as outfile the block-device wanted
Click to expand...
Click to collapse
can u give me an example for the command for adb menu?
i want to get rid of this file mi10orj.bin in the modem
What ADB are you using? AFAIK ADB hasn't a menu,
If device is rooted then you may run
Code:
adb devices
adb shell "stop"
adb shell "rm -f /vendor/mi10orj.bin"
adb shell "start"
if the .bin-file is located in vendor partition what IDK
jwoegerbauer said:
What ADB are you using? AFAIK ADB hasn't a menu,
If device is rooted then you may run
Code:
adb devices
adb shell "stop"
adb shell "rm -f /vendor/mi10orj.bin"
adb shell "start"
if the .bin-file is located in vendor partition what IDK
Click to expand...
Click to collapse
its called "minimal adb and fastboot tool".
yes the device is rooted. im gonna try this commands when im done with my working.
thx so much for your help and insight, so far.

Categories

Resources