[HowTo] making a System Dump of Stock Firmware for 'Dummies'

eybee1970

Senior Member
Jan 22, 2010
4,940
13,224
0
Hi folks,

we have some lucky users among us with a generic (Dev) IMEI - some of these are able to get OTA updates, thought for testusers and/or developers from Samsung, after they install latest Test firmware XXLSA from sammobile....some got updates up to XXLSC and already provided a dump. Others got updates up to XXLSD (and maybe higher in future - who knows, where the journey ends...), but don't know what to do to share this firmware with us 'Flashaholics' here on xda and other forums...

Now, as more and more people asking me (why ever me...) how to make a system dump from Stock Firmware, I decided to write a short 'HowTo for Dummies'. So if you know about someone, who has a unknown Test Firmware installed, or YOU are the chosen one, just follow this tutorial and make us happy ;)

This is just one way of several to do this - but as I think, it is the easiest way for newbies (without having to use Android SDK and adb shell on PC --> that's what experienced would do ;))

Prerequisites:

- at least 1,4 GB free space on internal SDcard
- a brain (and above 80 IQ-points...)!!!!! ;)


Step 1) Rooting your Stock Firmware
(thx to Phil for the steps, I just copy/pasted them) --> if you already have Root + busybox installed, go to Step 2) directly




  • Put the previously downloaded cwm-non-touch-6.0.x.x-i9100.zip file on your external sd card

  • Copy the Root_XXX.zip file you downloaded to internal or external sd card

  • Boot into stock recovery (volume up+home+power), and select "apply update from external storage". Now select the cwm-non-touch-6.x.x.x-i9100.zip file you copied in previous step (this step gives a temporary flash that will disappear after reboot)

  • You get CWM recovery interface (this custom recovery is temporary, not permanent)

  • Inside CWM, select "install zip from sdcard". Then, select "choose zip from sdcard". Now, scroll down to the "Root_XXX.zip" file and hit power button to install it.

  • It will add SuperSU or Superuser last version apk to system/app, last superuser binary (su) to system/xbin and busybox last version to system/xbin, all with correct file permissions.
Reboot and you get permanent root + busybox installed on your stock kernel.
(You can easily unroot your device afterwards...it is also described in Phils thread, where I took all these from: [20 Sep 2012][ICS]Universal Rooting for most ICS phones, Any ROM, now with CWM6 )


Step 2) Making a complete System Dump of Stock Firmware:



  • Install 'Terminal Emulator' from Playstore
  • Open Terminal Emulator
  • type 'su' with your internal keyboard and press return button
  • grant Superuser access on upcoming popup window
  • now type the following line and press return button after finished typing:
Code:
dd if=/dev/block/mmcblk0p8 of=/sdcard/modem.bin
==> this will generate 'modem.bin' (= Modem) on your internal SDcard (will be finished after a few seconds)


  • now type the following line and press return button after finished typing:
Code:
dd if=/dev/block/mmcblk0p5 of=/sdcard/zImage
==> this will generate 'zImage' (= Kernel) on your internal SDcard (will be finished after a few seconds)


  • now type the following line and press return button after finished typing:
Code:
dd if=/dev/block/mmcblk0p12 of=/sdcard/hidden.img
==> this will generate 'hidden.img' (= preload partition) on your internal SDcard (will be finished after a few minutes, as it is more then 300 mb!)


  • now type the following line and press return button after finished typing:
Code:
dd if=/dev/block/mmcblk0p9 of=/sdcard/factoryfs.img
==> this will generate 'factoryfs.img' (= system partition) on your internal SDcard (will be finished after a few minutes, as it is more then 800 mb!)


Now you have the following output / files on your internal SDcard:



  • modem.bin
  • zImage
  • hidden.img
  • factoryfs.img

==> zip these 4 together and upload them to a hoster ==> post the link here and devs can start building a new ROM (Stock + CustomROMs) and kernel devs (now we luckily have Phil for that) can preroot the kernel + put in CWM recovery.

That's all and really very very easy....:cowboy:

Disclaimer:

I am not responsible for any damages - it is your risk (though it is not a dangerous thing to do!)
 
Last edited:

REVERSiN

Senior Member
Mar 4, 2012
834
395
0
Nicely done my friend :) this should ease up on some of the users (the ones who get updates for us XD)

Congratulations on this, now you see why community loves you soooo. liebe endet nie !!


es ein vergnugen es zu lesen. gute arbeit eybee :good:
 

klem__

Senior Member
May 9, 2012
289
43
0
Thank very much boss
Hope you will be one of the prof when xda university will open.
Thank you very much

Hope now when we will see LS(any letter) it will be with the links of the dump :)

Envoyé depuis mon GT-N7000 avec Tapatalk
 

rraaka

Senior Member
Sep 8, 2010
2,608
671
0
Clicked for Newsworthy article. :thumbup:
Sounds really simple for someone who doesn't have the second prerequisite. :D

Back uped the info.


Sent from my GT-N7000 using Tapatalk 2
 

dsmas

Senior Member
Apr 18, 2012
1,152
251
0
Bangalore
Sharing your valuable knowledge and experience is priceless for those who are interested. Well, me, I simply follow pros like you.

Sent from my GT-N7000 using xda premium
 

ThaiDai

Senior Member
May 28, 2011
2,537
2,574
203
Aachen/หนองบัวลำภู
In addition to Step 2:
I made the dumps from my PC with a connected device with "adb", so I could copy them to the harddisk directly.

"adb devices" for checking if connection is established, "adb shell" switching to the device, "su" for root access, and then the commands eybee1970 explained in detail.

After that I fetched the files in my file manager from the connected device.
I prefer to work with terminal windows on the PC and not on the device.

With this you do not need Step 1 - because I didn't ;)
 

eybee1970

Senior Member
Jan 22, 2010
4,940
13,224
0
In addition to Step 2:
I made the dumps from my PC with a connected device with "adb", so I could copy them to the harddisk directly.

"adb devices" for checking if connection is established, "adb shell" switching to the device, "su" for root access, and then the commands eybee1970 explained in detail.

After that I fetched the files in my file manager from the connected device.
I prefer to work with terminal windows on the PC and not on the device.

With this you do not need Step 1 - because I didn't ;)
That's why I said 'for Dummies'....no PC, no Android SDK, no adb shell...just the device
 

ekache

Senior Member
Jan 30, 2009
343
15
0
41
Jakarta
Now the history rolls back...
as people raced to create their own custom roms.
The chosen ones with their great knowledge was kind enough to uncover about the custom rom things and shared it with some tutorials here in xda-dev for people who needed it.
Just like the old time...when WinMo has a bright future here.
Thanks a million for devs and chefs at xda-dev who always spread the lights.
 

REVERSiN

Senior Member
Mar 4, 2012
834
395
0
Great guide. A little off topic but I don't know where else to ask and you are an expert in ROM making. How do I put things like all multiwindow apps and 4 way reboot in the ROM build before it goes on the phone? Sorry again for it being in here, can't find anywhere else to ask.

Sent from my GT-N7000 using xda app-developers app
4Way reboot mod is at the system/framwork/ directory "android.policy.jar" file is responsible for this stuff....

as for all multi apps after an investigation it appeared it looked for a certain statement to know whether its a sammy app patching that code to the launcher and editting the policy for this feature too gets you all apps access (almost all) as some just dont work....


there are plenty of guides and tutorials over the internet and forums... on different phones mostly but with a little time you can manage everything as you want to so READ some ;) enjoy!



i'am guessing we need to start writing more tutorials in the N7000 section in here we have no knowledge sharing mostly developing and some new guys are ready to try their own so we have to share everything it started with eybee (thanks to him) and hopefully will continue with all other guys who do mods.... no matter how small it can be usefull.

believe it or not but even devs assist each other with mods its not like each one was born with all that OP-Code in his head :p
 

vijai2011

Retired Recognized Developer
Oct 24, 2011
991
482
0
chennai
Ah...good guide eybee.Let me see if i can make a shell script to dump the partitions and make odin roms out of it.I already have scripts to dump and make odin rom for /system,/data partitions.will add preload,kernel and modem to the script.Let me see how my time permits today.Hope the script will help people.But the only drawback is it will work only on linux.Users may use cygwin too for it :)

Sent from my GT-N7000 using xda app-developers app
 

rupiahvn

Member
Oct 20, 2012
20
109
0
That's why I said 'for Dummies'....no PC, no Android SDK, no adb shell...just the device
For my case adb shell was not succeed. Device reboots unexpectedly while dumping factoryfs. Maybe file size is too big. Thus I had to use terminal emulator though pc keyboard is much more convenience
 

ThaiDai

Senior Member
May 28, 2011
2,537
2,574
203
Aachen/หนองบัวลำภู
Two remarks:
Typing something like "dd if=/dev/block/mmcblk0p9 of=/sdcard/factoryfs.img" is never something I would call easy. If you do not have Linux shell commands knowledge, than these are about "50 characters without meaning" that you have to type (on the keyboard of your device - which is even more error-prone).
PC or Note: it is never dummy-simple.


Making a batch wich automatically generates an ROM installable with ODIN (so the result are tars) is dangerous.
The difference between "dump" and "dumb" isn't so big - as I just proved myself.

When you make a batch with a complete process from dumping, copying, building to a "blob" installable with Odin there will be no step in the process for quality control.
Example (hurts to write this): If there's something in the original Rom you are dumping that couldn't be shared then it makes its way through the process in to the final Rom. And the dummy user of these scripts will never know or can protect himself from it.
Only pro from this: after learning this the hard way you don't feel like a dummy user anymore.
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone