FORUMS
Remove All Ads from XDA

[HOWTO] Cook your custom rom for LG P500

86 posts
Thanks Meter: 61
 
By janitux, Member on 5th January 2011, 06:56 PM
Post Reply Email Thread
Hi there, we are going to use excellent dsixda's HTC Android Kitchen to cook our custom ROMs for LG P500. The list of the things we are going to need:
  1. Original ROM (Check this thread)
  2. LG Utils 0.4.2 (Check this URL)
  3. DzDecryptor v1.0b(Check this thread)
  4. Cygwin (Check this URL
  5. Unyaffsmbn (Check this thread)
  6. Dsixda's HTC Android Kitchen (Check this thread)

Note: I have a "romcooking" folder on my home (C:\Users\Patricio\romcooking), inside i have all the utils needed, and the .kdz file for the stock ROM. I recommend to use tab to complete filenames since they are too long.
  1. First we need to get a dz from the kdz (original firmware), extract LG Utils 0.4.2 and open KP500-Utils-EN.exe (You need to run this as administrator, or else you are getting an empty .cab file), select the I option (Extract files from KDZ file), and type the route to your .kdz file (Mine is C:\Users\Patricio\romcooking\V10A_00.kdz). Now, you must have a V10A_00.cab (Or another name, it depends on the stock rom you downloaded), open it with a extractor like 7zip or similar and extract the file "LGP500AT-00-V10a-EUR-XX-SEP-25-2010+0.dz" or similar to our romcooking folder.
  2. Then we are going to uncompress the .dz with DZDecrypt (Press Win + R, type cmd and enter, then you cd to the folder where DzDecrypt is located (ex:
    Code:
    cd C:\Users\Patricio\romcooking\DZDecryptor_v1.0b
    then we type:
    Code:
    DZDecrypt.exe "C:\Users\Patricio\romcooking\LGP500AT-00-V10a-EUR-XX-SEP-25-2010+0.dz" C:\Users\Patricio\romcooking\stockrom
    This is going to create a "stockrom" folder in our original romcooking folder, you are going to see a lot of files in the stockrom folder, the important ones are boot.img and system.mbn (DZDecrypt should have merged your system.mbn_0, system.mbn_1 and system.mbn_2)
  3. We need to install cygwin, open the setup.exe, just keep hitting next until you are on the select packages screen, go to "Devel" menu and select to install gcc, gdb and make, in "Interpreters" check perl, in "Archive" check zip and unzip, in "Web" check wget, in "Editors" check nano and vim and in "Utils" select cpio, util-linux and ncurses. Make some tea and wait for the cygwin install to finish and we are ready to go to the next step.
  4. We are going to compile unyaffsmbn, copy the extracted files from unyaffsmbn, system.mbn and boot.img to C:\cygwin\home\Patricio, now fire up cygwin and compile unyaffsmbn with:
    Code:
    gcc -o unyaffsmbn unyaffsmbn.c
    Now uncompress system.mbn, delete symlinks of bin/ and zip everything with:
    Code:
    mkdir system
    cd system
    ../unyaffsmbn.exe ../system.mbn
    find bin -type l -exec rm {} +
    cd ..
    zip -r stockrom.zip boot.img system/
    We are ready to go to the kitchen (We have a stockrom.zip on C:\cygwin\home\Patricio, remember that)
  5. Now we are going to use dsixda's HTC Android Kitchen, we need to have installed JDK. After we have downloaded and uncompressed the kitchen (Mine is in C:\cygwin\home\Patricio\kitchen), we need to put the ziped file we got in the previous step into the original_update folder of the kitchen. We are ready to go! fire up cygwin and cd to the kitchen location and exec ./menu , select option 1, you should see the zip file, put the number of it, and you are ready to go (It will create a WORKING_XXXXXX_XXXXXX folder, you can modify the files in WORKING_XXXX_XXXXX/system, add APKs, modify the apns file, etc).
    This command also gives us a lot of options for our rom: enable root, add busybox, deodex our files, zipalign, etc. If you are going to edit text files, use an editor like Notepad++ or any other program that can open/edit/save files in linux compliant style. It's pretty easy to use the kitchen, just check the official thread for options or help

The common options i use are:
  1. Add root permission (option 2), press f when asked and you are done
  2. Add Busybox
  3. Change name of the rom, easy cake
  4. Advanced options, press 0
  5. Add /data/app functionality
  6. Add Apps2SD
  7. Add custom boot animation functionality
  8. Deodex files in your ROM
  9. And Finally: Zipalign all *.apk files to optimize RAM usage

That should do the trick, when you are ready to cook your rom, just type 99, wait for it to build and it should be in the OUTPUT_ZIP folder in your kitchen folder.

Took info from this thread (About decompressing .dz and .mbn, and making it to work with the kitchen), and info from ruigui and tritant in this thread. The awesome android kitchen by dsixda. Sorry if i forgot to mention any work, just post it or pm me
If you have anything you want to add to the guide, just post it
The Following 46 Users Say Thank You to janitux For This Useful Post: [ View ] Gift janitux Ad-Free
 
 
5th January 2011, 07:08 PM |#2  
Member
Thanks Meter: 23
 
More
You don't need to dual boot to linux. It can be done with cygwin.
When you follow dsixda's guide to install kitchen, do as said but don't install cygwin from that guide.
Instead, download from official site, choose default options, but add these packages (it will be compliant with kitchen and give a little extra funcionality):
Devel: gcc, gdb, make
Interpreters: perl
Utils: cpio, util-linux, ncurses
Archive: zip, unzip
Web: wget
Editors: vi, nano

Good guide, nicely done


EDIT:
In my wife's machine (using windows 7 64bit. i'm without computer, for now....), i've installed cygwin as said above.
Then added two folders to my home dir:
kitchen and unyaffsmbn
In kitchen, use the kitchen
In unyaffsmbn, copy the files from unyaffsmbn.zip to that dir, then compile it there

EDIT2:
If you edit text files under windows, USE NOTEPAD++, or any other program that can open/edit/save files in linux compliant style.
There are differences in Windows and Linux when ENTER is pressed, and you'll have issues when trying to flash or run your custom ROM
The Following 7 Users Say Thank You to ruigui For This Useful Post: [ View ] Gift ruigui Ad-Free
5th January 2011, 10:52 PM |#3  
Junior Member
Flag Ragusa
Thanks Meter: 0
 
More
hi there... thanks a lot for your guide.
I'm trying to do the things you wrote step by step... I have extracted the dz file successfully, then I extracted the content using DZDecrypter... I found three files called system.mbn0, system.mbn1 and system.mbn2. The first and second are 80 Mbytes, the third just 17... Which one is the correct? When I try to use the command "unyaffsmbn system.mbn" (obviously I renamed the first and then the second) I get an error message ("impossible to execute binary file", or somenthing like that... I don't know how's in english because I'm italian).. Is that concerning to the presence of those three different files? Did somethind go wrong with the extracting process? Or maybe I didn't do somenthing important? Before doing this, I installed "build-essential" and did "gcc -o unyaffsmbn unyaffs.h" but apparently nothing happend... I got neither errors nor processes...
can you help me?
6th January 2011, 12:39 AM |#4  
ccdreadcc's Avatar
Senior Member
Flag Chennai
Thanks Meter: 300
 
Donate to Me
More
Awesome bro, I can try to make custom rom with indian version, ty.
6th January 2011, 03:19 AM |#5  
OP Member
Chile
Thanks Meter: 61
 
More
Quote:
Originally Posted by vinnux

hi there... thanks a lot for your guide.
I'm trying to do the things you wrote step by step... I have extracted the dz file successfully, then I extracted the content using DZDecrypter... I found three files called system.mbn0, system.mbn1 and system.mbn2. The first and second are 80 Mbytes, the third just 17... Which one is the correct? When I try to use the command "unyaffsmbn system.mbn" (obviously I renamed the first and then the second) I get an error message ("impossible to execute binary file", or somenthing like that... I don't know how's in english because I'm italian).. Is that concerning to the presence of those three different files? Did somethind go wrong with the extracting process? Or maybe I didn't do somenthing important? Before doing this, I installed "build-essential" and did "gcc -o unyaffsmbn unyaffs.h" but apparently nothing happend... I got neither errors nor processes...
can you help me?

you shouldn't get three system.mbn files, did you used the 1.0b of DzDecryptor? when i used it, it said something about merging, i think that it gets the three files and then combines them to get a proper system.mbn
The Following User Says Thank You to janitux For This Useful Post: [ View ] Gift janitux Ad-Free
6th January 2011, 10:12 AM |#6  
Junior Member
Flag Ragusa
Thanks Meter: 0
 
More
I used the downloaded version from the link you posted. At least I guess... :/ Well I'm going to try again soon! Thanks a lot again for your guide!

Sent from my LG-P500 using XDA App
6th January 2011, 12:20 PM |#7  
Member
Thanks Meter: 8
 
More
Other methode for exctract mbn file, not need to connect the phone.
Windows only....


(1) Download LG-Utils 0.4.2: http://www.assembla.com/spaces/ks360...tils-0.4.2.zip
(2) Run KP500-Utils-EN.exe (or whatever language you prefer out of the available choices) and select I to extract the KDZ.
(3) Open the resulting CAB file and extract the DZ file.
(4) Download DZExtract: http://www.frenchcoder.com/upload/DZExtract-V0.2.zip
(5) Use DZExtract to extract the MBN files:

DZExtract -x GW620RAT-V10c-OCT-21-2009-RGS-CA_DZ+0.dz C:\extractedTo\
The Following 2 Users Say Thank You to tritant For This Useful Post: [ View ] Gift tritant Ad-Free
6th January 2011, 02:33 PM |#8  
Member
Flag Bucharest
Thanks Meter: 5
 
More
after compiling and chmod I do:

Code:
xoxo@xoxo-VirtualBox:~/work/unyaffsmbn$ unyaffsmbn system.mbn 
unyaffsmbn: command not found
both files are in that folder. Am I doing anything wrong?

Cheers.

@tritant - LG-Utils link not working
6th January 2011, 02:39 PM |#9  
Member
Thanks Meter: 23
 
More
So.... You MUST compile unyaffsmbn first. Only then you'll have an "executable".
Code:
gcc unyaffsmbn.c -o unyaffsmbn
Then copy system.mbn to unyaffsmbn folder.
After that, do:
Code:
cd PATH_TO_UNYAFFSMBN
./unyaffsmbn system.mbn
You missed the ./

You can download lg utils from here
6th January 2011, 02:52 PM |#10  
Member
Flag Bucharest
Thanks Meter: 5
 
More
Quote:
Originally Posted by tuxcomputing

after compiling and chmod I do:

Code:
xoxo@xoxo-VirtualBox:~/work/unyaffsmbn$ unyaffsmbn system.mbn 
unyaffsmbn: command not found
both files are in that folder. Am I doing anything wrong?

Cheers.

@tritant - LG-Utils link not working

'course I compiled

of course your method worked and the one in the first post didn't...
6th January 2011, 03:06 PM |#11  
Member
Thanks Meter: 13
 
More
exist only a windows version of dzextract?
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes