[GUIDE][FOR ADVANCED USERS] [Edit original LG Firmwares] root su760 ICS - LG Optimus 3D

Hi guys,
this is a big tutorial for advanced users on how to edit LG Firmwares.
This could be usefull to change recovery included, root the bin or give a try to
change bootloader to make su760 ics on p920 work.
First download a bin or a kdz file:
http://lg-phone-firmware.com/
Then download the attached zip file and unpack it somewhere on your
windows pc.
Put the downloaded firmware in the same directory.
If you have chosen a kdz file you have to unpack it with LGExtract.
Ope up cmd and go with cd to the directory where all the files are.
Then type:
Code:
LGExtract -kdz *nameofthekdzfile*.kdz
upack the new .cab file with winrar or something like that, then run
LGExtract -wdb ***.wdb ***.dll
Click to expand...
Click to collapse
replace *** with the name of the files that you have unpacked
Now you should have a Folder caled BIN.
Use cd to enter that folder.
Run in cmd:
Code:
copy /b "LG****_AP[*].bin" "LG****_AP.bin"
Replace **** with p920 or su760 related to wich firmware you have downloaded.
Now use explorer to move the LG****_AP.bin in the folder where all the .exe files are.
Extracting the bin
Run in cmd
Code:
extract.exe ***_AP.bin
At first you will see all the partitions in the bin and their offsets,
then the tool will extract them to .img files, stay tuned this will take some time.
Root the system partition
You can skip this if you just want to replace a partition.
Rename the extracted sstem partition from something like "7 - system.img" to "system.img"
Download this:
http://downloads.noshufou.netdna-cdn.com/superuser/Superuser-3.1.3-arm-signed.zip
and put it together with the system.img into a linux distro.
In linux unpack the zip and copy the superuser.apk and the su file
in the same directory with the img
go with the terminal in the folder with the system.img
and run:
Code:
sudo mkdir temp
sudo mount -o loop system.img temp
sudo cp superuser.apk temp/app
sudo cp su temp/bin
cd temp/app
sudo chmod 0644 superuser.apk
cd ..
cd bin
sudo chmod 6755 su
sudo umount temp
Copy the image back to windows.
Replace a Partition
Install winhex or an other hex editor.
Open the downloaded or extracted bin.
Go to offset that extract.exe showed you,
and select everything to the end of the partition and delete it.
The end of the partition is the offset + size of extract.exe showed you.
For example:
If the offset of the system partition is 00DA0000
and the size of is 2BC00000 the end of the partition is DA0000 + 2BC00000 = 2C9A0000
now open up the image you want to replace i with in hex editor,
select everything go back to the offset of the partition in winhex and paste it there,
just save it and you have your new own bin file ready to flash with LGFlashTool.
Hope this helps you, please post if you didn't understand anything, I forgot something or something is wrong.

Credits
LGExtract:
http://forum.xda-developers.com/showthread.php?t=1566532
BIN Extracting Tool:
http://forum.xda-developers.com/showpost.php?p=31476664&postcount=17
Rooting img file:
http://forum.xda-developers.com/showthread.php?t=1517457
Please sent pm if I forget somebody

Changelog
--reserved--

↑
Sent from my LG-P925 using xda app-developers app

Hi berni, i managed to insert your bootloaders into an ics bin but it didnt boot good news though the bootloaders seemed to have flashed fine. Now just finding a way back into android.

berni987654321 said:
Hi guys,
this is a big tutorial for advanced users on how to edit LG Firmwares.
This could be usefull to change recovery included, root the bin or give a try to
change bootloader to make su760 ics on p920 work.
First download a bin or a kdz file:
http://lg-phone-firmware.com/
Then download the attached zip file and unpack it somewhere on your
windows pc.
Put the downloaded firmware in the same directory.
If you have chosen a kdz file you have to unpack it with LGExtract.
Ope up cmd and go with cd to the directory where all the files are.
Then type:
Code:
LGExtract -kdz *nameofthekdzfile*.kdz
upack the new .cab file with winrar or something like that, then run
replace *** with the name of the files that you have unpacked
Now you should have a Folder caled BIN.
Use cd to enter that folder.
Run in cmd:
Code:
copy /b "LG****_AP[*].bin" "LG****_AP.bin"
Replace **** with p920 or su760 related to wich firmware you have downloaded.
Now use explorer to move the LG****_AP.bin in the folder where all the .exe files are.
Extracting the bin
Run in cmd
Code:
extract.exe ***_AP.bin
At first you will see all the partitions in the bin and their offsets,
then the tool will extract them to .img files, stay tuned this will take some time.
Root the system partition
You can skip this if you just want to replace a partition.
Rename the extracted sstem partition from something like "7 - system.img" to "system.img"
Download this:
http://downloads.noshufou.netdna-cdn.com/superuser/Superuser-3.1.3-arm-signed.zip
and put it together with the system.img into a linux distro.
In linux unpack the zip and copy the superuser.apk and the su file
in the same directory with the img
go with the terminal in the folder with the system.img
and run:
Code:
sudo mkdir temp
sudo mount -o loop system.img temp
sudo cp superuser.apk temp/app
sudo cp su temp/bin
cd temp/app
sudo chmod 0644 superuser.apk
cd ..
cd bin
sudo chmod 6755 su
sudo umount temp
Copy the image back to windows.
Replace a Partition
Install winhex or an other hex editor.
Open the downloaded or extracted bin.
Go to offset that extract.exe showed you,
and select everything to the end of the partition and delete it.
The end of the partition is the offset + size of extract.exe showed you.
For example:
If the offset of the system partition is 00DA0000
and the size of is 2BC00000 the end of the partition is DA0000 + 2BC00000 = 2C9A0000
now open up the image you want to replace i with in hex editor,
select everything go back to the offset of the partition in winhex and paste it there,
just save it and you have your new own bin file ready to flash with LGFlashTool.
Hope this helps you, please post if you didn't understand anything, I forgot something or something is wrong.
Click to expand...
Click to collapse
Unable to extract bin of P725. it says "MAGIC HEADER NOT FOUND: any suggestions ?

Eklovya said:
Unable to extract bin of P725. it says "MAGIC HEADER NOT FOUND: any suggestions ?
Click to expand...
Click to collapse
The bin got corrupted or they aren't supported there is also a tool made by wkpart it doesn't support the p920 but maybe you re phone
Sent from my LG-P920 using xda app-developers app

berni987654321 said:
The bin got corrupted or they aren't supported there is also a tool made by wkpart it doesn't support the p920 but maybe you re phone
Sent from my LG-P920 using xda app-developers app
Click to expand...
Click to collapse
The bin are correct i used them to recover my phone.
Can you provide me the link towards wpark tool?
Sent from my LG-P725 using xda premium

berni987654321 said:
Hi guys,
this is a big tutorial for advanced users on how to edit LG Firmwares.
This could be usefull to change recovery included, root the bin or give a try to
change bootloader to make su760 ics on p920 work.
First download a bin or a kdz file:
http://lg-phone-firmware.com/
Then download the attached zip file and unpack it somewhere on your
windows pc.
Put the downloaded firmware in the same directory.
If you have chosen a kdz file you have to unpack it with LGExtract.
Ope up cmd and go with cd to the directory where all the files are.
Then type:
Code:
LGExtract -kdz *nameofthekdzfile*.kdz
upack the new .cab file with winrar or something like that, then run
replace *** with the name of the files that you have unpacked
Now you should have a Folder caled BIN.
Use cd to enter that folder.
Run in cmd:
Code:
copy /b "LG****_AP[*].bin" "LG****_AP.bin"
Replace **** with p920 or su760 related to wich firmware you have downloaded.
Now use explorer to move the LG****_AP.bin in the folder where all the .exe files are.
Extracting the bin
Run in cmd
Code:
extract.exe ***_AP.bin
At first you will see all the partitions in the bin and their offsets,
then the tool will extract them to .img files, stay tuned this will take some time.
Root the system partition
You can skip this if you just want to replace a partition.
Rename the extracted sstem partition from something like "7 - system.img" to "system.img"
Download this:
http://downloads.noshufou.netdna-cdn.com/superuser/Superuser-3.1.3-arm-signed.zip
and put it together with the system.img into a linux distro.
In linux unpack the zip and copy the superuser.apk and the su file
in the same directory with the img
go with the terminal in the folder with the system.img
and run:
Code:
sudo mkdir temp
sudo mount -o loop system.img temp
sudo cp superuser.apk temp/app
sudo cp su temp/bin
cd temp/app
sudo chmod 0644 superuser.apk
cd ..
cd bin
sudo chmod 6755 su
sudo umount temp
Copy the image back to windows.
Replace a Partition
Install winhex or an other hex editor.
Open the downloaded or extracted bin.
Go to offset that extract.exe showed you,
and select everything to the end of the partition and delete it.
The end of the partition is the offset + size of extract.exe showed you.
For example:
If the offset of the system partition is 00DA0000
and the size of is 2BC00000 the end of the partition is DA0000 + 2BC00000 = 2C9A0000
now open up the image you want to replace i with in hex editor,
select everything go back to the offset of the partition in winhex and paste it there,
just save it and you have your new own bin file ready to flash with LGFlashTool.
Hope this helps you, please post if you didn't understand anything, I forgot something or something is wrong.
Click to expand...
Click to collapse
how can I extract the other partitions?
need modify the exe file? with that program? VS2012?
sorry for my english .. I'm Italian.

fabersantucci said:
how can I extract the other partitions?
need modify the exe file? with that program? VS2012?
sorry for my english .. I'm Italian.
Click to expand...
Click to collapse
Extract .exeextracts all the partitions
Sent from my LG-P920 using xda app-developers app

Thank you very much for this guide. I hope somebody makes a working recovery without wkparks u-boot
Sent From My LG Optimus 3D SU760

berni987654321 said:
Extract .exeextracts all the partitions
Sent from my LG-P920 using xda app-developers app
Click to expand...
Click to collapse
not work ... You can make an example?

Put for example v21e bin and the extract tool in one folder and run extrct .exe name of bin file
Sent from my LG-P920 using xda app-developers app

Hey, great guide! I'm trying this on an LG Motion and the LGExtract worked great. Unfortunately, I'm getting an error with extract.exe "Failed to match header."
Could you please provide a link to the wpark tool?

Lg su760 ics
hi,
my mobile sets info are:
Model LG SU760(korean T)
Android ver 4.0.4
baseband XMM6260
karnel 3.0.21
build number ICS
Software ver LGSU760-V30b-OCT-18-2012
Problems:
1. how i uninstall korean skt and T applications??
2. My data speed on gprs is slow, highest is 12kbps. wifi speed is ok. why the gprs is slow??
Is there i need to root or change baseband? i live in bangladesh.
thanks.

I do not understand this problem
I hope you give me detailed instructions. Thank you very much!!!
"Replace a Partition
Install winhex or an other hex editor.
Open the downloaded or extracted bin.
Go to offset that extract.exe showed you,
and select everything to the end of the partition and delete it.
The end of the partition is the offset + size of extract.exe showed you.
For example:
If the offset of the system partition is 00DA0000
and the size of is 2BC00000 the end of the partition is DA0000 + 2BC00000 = 2C9A0000
now open up the image you want to replace i with in hex editor,
select everything go back to the offset of the partition in winhex and paste it there,
just save it and you have your new own bin file ready to flash with LGFlashTool."

Related

[HOW TO] Open CGs

Hi all :
I try open all CGs for see the files, but i only know to open CG39 and some more..
sudo mount -o loop CG.39.smg CG39
But the others ¿¿
Some one have the answer ¿?¿?¿?
There is a Perl script which can unpack boot and recovery (CG35 & CG47) in this thread: http://forum.xda-developers.com/showthread.php?t=443994
Filipitripi said:
Hi all :
I try open all CGs for see the files, but i only know to open CG39 and some more..
sudo mount -o loop CG.39.smg CG39
But the others ¿¿
Some one have the answer ¿?¿?¿?
Click to expand...
Click to collapse
CG64.smg & CG65.smg: partition tables that you can open using fdisk/sfdisk
CG33.smg is a CDROM ISO file!
iirc one or two of them are the splash image (not 100% sure now)
Filipitripi said:
Hi all :
I try open all CGs for see the files, but i only know to open CG39 and some more..
sudo mount -o loop CG.39.smg CG39
But the others ¿¿
Some one have the answer ¿?¿?¿?
Click to expand...
Click to collapse
how to repack cg39.smg
if you have any details on windows 7 how to open repack do send me.
rachit2588 said:
how to repack cg39.smg
if you have any details on windows 7 how to open repack do send me.
Click to expand...
Click to collapse
http://sourceforge.net/projects/ext... 2.2 (Latest)/ext2explore-2.2.71.zip/download
It will allow you opening ext3 images inside Windows
^very good idea
danimagrin said:
http://sourceforge.net/projects/ext... 2.2 (Latest)/ext2explore-2.2.71.zip/download
It will allow you opening ext3 images inside Windows
Click to expand...
Click to collapse
so now i can see files on cg39.smg using ext2reader but the thing is now how to get system image from cg39.smg to system.img ??
rachit2588 said:
so now i can see files on cg39.smg using ext2reader but the thing is now how to get system image from cg39.smg to system.img ??
Click to expand...
Click to collapse
System.img to be restored with Nandroid? If yes you have to extract all files with ext2reader then use mkyaffs2image to build system.img.
danimagrin said:
System.img to be restored with Nandroid? If yes you have to extract all files with ext2reader then use mkyaffs2image to build system.img.
Click to expand...
Click to collapse
with mkyaffs2image its jus showing me a cmd windows for some less thn 1 sec and its jus goes away...please upload the version you are using...also let me know if it needs any prerequisite software to be installed.
It's because mkyaffs2image is a command line app, just like in the DOS days... To use it you should open a cmd window (type cmd at Windows menu and press enter), go to the directory right before the one you extracted files (you use cd "dirname" to enter in a directory and "cd .." to leave it. So when you are in the directory right before the one in which you've extracted files type "mkyaffs2image CG39extracteddir system.img"
danimagrin said:
It's because mkyaffs2image is a command line app, just like in the DOS days... To use it you should open a cmd window (type cmd at Windows menu and press enter), go to the directory right before the one you extracted files (you use cd "dirname" to enter in a directory and "cd .." to leave it. So when you are in the directory right before the one in which you've extracted files type "mkyaffs2image CG39extracteddir system.img"
Click to expand...
Click to collapse
oh , ok.. its working..thanks
danimagrin said:
It's because mkyaffs2image is a command line app, just like in the DOS days... To use it you should open a cmd window (type cmd at Windows menu and press enter), go to the directory right before the one you extracted files (you use cd "dirname" to enter in a directory and "cd .." to leave it. So when you are in the directory right before the one in which you've extracted files type "mkyaffs2image CG39extracteddir system.img"
Click to expand...
Click to collapse
ok last doubt...after creating system.img can it be restored via custom recovery..??
how to add md5 check sums for that so that custom recovery can identify as proper nandorid..!!??
rachit2588 said:
oh , ok.. its working..thanks
Click to expand...
Click to collapse
You welcome!
Sure you can use it with nandroid, you must download md5sum.exe, place it together with mkyaffs2image, after you used mkyaffs2image then type "md5sum system.img" and it will generate checksum. Create a file called "nandroid.md5" and paste what md5sum returned. You can open a nandroid.md5 file of another backup and you'll understand better how it's done..
excellent..i got it
@danimagrin help me how to add root files if our cg39 image is unrooted..??
ie how to manually add root files from some rooted cg39 image to some non rooted original image..which files and folders are required to add/replace..?? ne thoughts..
rachit2588 said:
@danimagrin help me how to add root files if our cg39 image is unrooted..??
ie how to manually add root files from some rooted cg39 image to some non rooted original image..which files and folders are required to add/replace..?? ne thoughts..
Click to expand...
Click to collapse
I know how to do it on Linux, because you've to run chmod and chown to set su and Superuser.apk permissions. I'll see if it's possible to do it inside Windows and I'll answer you asap.
Where did you get mkyaffs2image for Windows? Are you running it with -f flag or not? Have you already made an image and restored it and did it really work? I'm afraid if will not work because of the same problem above...
danimagrin said:
I know how to do it on Linux, because you've to run chmod and chown to set su and Superuser.apk permissions. I'll see if it's possible to do it inside Windows and I'll answer you asap.
Where did you get mkyaffs2image for Windows? Are you running it with -f flag or not? Have you already made an image and restored it and did it really work? I'm afraid if will not work because of the same problem above...
Click to expand...
Click to collapse
yes i have made an system.img with md5 nandroid check sum...but still not restored with CWM Recovery...yeah mkyaffs2image works on windows...find out in the attached IMG depacker
rachit2588 said:
yes i have made an system.img with md5 nandroid check sum...but still not restored with CWM Recovery...yeah mkyaffs2image works on windows...find out in the attached IMG depacker
Click to expand...
Click to collapse
I'll test it as soon as I get home and then I tell you!

[Need Help] Galaxy 3 Backup Tool

Hi,
i hope anybody can help me to make a Galaxy 3 Rom Backup Tool.
I made a little script for the German Forum, and it works fine but i can not flash the backupped Rom files.
Can somebody help me how i can push the backupped /data partition in datafs.rfs to the Phone without getting a Bootloop?
Here is a link to the Script http://www.multiupload.com/TAIJ9Z53J7
Sry for my english ^^
Nice work!
Will try ASAP...
And btw your english is good enough!
Ok, translated for you :
Code:
Install Total Commander and connect your Galaxy 3 to your PC in USB debugging mode
Next run Backup.bat
Your backup is finished when the window closes by itself. You can find the data in the folder backup on your SD
Copy the whole folder to your PC
Open the ROM Image.tar in total commander
Now you can flash your backup as One Package in Odin.
WARNING: please mention my name when you upload or translate the tool
Thanks for the code, I was just thinking along the same lines. You can skip the Total commander thing if you'd include something like 7zip commandline which is free. You can then call it from your batch file. Or tar it in the phone itself or is this too slow/bad for SD ?
You pull the files over with adb pull, but instruct to copy them from the SD as well.
As for why it bootloops : need to test it, but will probably wait for a fresh rom.
You can also put it back with dd ?
hmm
with which adb command i can put all 5 files in a flashable .tar file?
and how i can put the whole /data partition from the datafs.rfs in the /data folder and overwrite the files in the data folder?
Hmm, I see it's Busybox responding on my Galaxy, maybe it's not installed by default, but it was included in a custom ROM ?
Code:
BusyBox v1.18.4 (2011-03-20 15:16:04 CDT) multi-call binary.
Usage: tar -[cxtzjamvO] [-X FILE] [-f TARFILE] [-C DIR] [FILE]...
Create, extract, or list files from a tar file
Operation:
c Create
x Extract
t List
Options:
f Name of TARFILE ('-' for stdin/out)
C Change to DIR before operation
v Verbose
z (De)compress using gzip
j (De)compress using bzip2
a (De)compress using lzma
O Extract to stdout
h Follow symlinks
m Don't restore mtime
exclude File to exclude
X File with names to exclude
T File with names to include
You'd have to remount /data r/w to make any changes to it. But if you're dd-ing, it'll talk to the block device directly. Not sure how to clear it though, maybe dd does it by itself. Have a google for linux commands.
hmm ok,
and why i get a bootloop when i want to flash the files with odin?
one more question ^^
how i can pull the complete /data partition to SD card?
And Creating a .tar file with 7zip commandline works, but the File is not flashable.
you can find the info in i9000 forum
http://forum.xda-developers.com/showthread.php?t=943588
http://forum.xda-developers.com/showthread.php?t=960946
http://forum.xda-developers.com/showthread.php?t=965190
Okay i have a 1 click Rom backup now ^^
But its still the problem that i get a bootloop after flashing...
Ok, I tested it and /data was wiped, phone can't mount sd card etc. etc.
tgm28 said:
Ok, I tested it and /data was wiped, phone can't mount sd card etc. etc.
Click to expand...
Click to collapse
Use THIS from HERE.
Quoting deskjeti.
deskjeti said:
Hi,
I made a Backup & Recovery Script in the German Android Hilfe Forum for the Galaxy 3.
The Tool make a flashable Rom with 3 Clicks and Restore the Backup with one Flash and one Click.
The Script restores all Apps, app Data Google Account and Wifi key´s.
How To:
Unzip the zip file wherever you want and plug in your Phone with USB Debugging Mode.
Run the Step1 and wait, after Step1 is finished run Step2 and if Step2 finished Run Step3
In the "Alexgalaxys G3 Recovery v2 Final" Folder now is a CustomRom.tar.
Flash it as One Package.
If the Phone is started plug the Phone in Usb debugging mode and Run the Recovery.bat after it is complete you have to reboot you Phone.
Link: http://www.multiupload.com/NV0CFVYV2I
Click to expand...
Click to collapse
Although I edited the files to just be one click.

[Tutorial] How to port cf-root to other i9003 Firmwares [23/02/2012]

Tutorial for Porting Cf-root To Newer Firmware's
There were quite a few requests for a tutorial to create ginger bread cf-root. So here it is folks.
Big Thanks to skin1980 for helping me out.
Credits:
Chainfire for the cf-root.
Skin1980 for porting it to Samsung Galaxy SLCD.
Prerequisites:
Any Linux. Basic knowledge of linux is mandatory.
Tools for Unpacking and Packing images.
Base Samsung Galaxy SLCD Gingerbread Cf-root.
Samsung Galaxy SLCD Gingerbread Firmware ROM for cf-root creation.
Downloads & Setup
Any Linux: For this tutorial I am using Linux Mint KDE. You are free to use the Linux of your choice. Ideal starting point for downloading and installing Linux would be Distrowatch.com.
Tools for unpacking and packing images: These are sets of tools that allow you to unpack and pack boot images. Basically one requires just a few tools to achieve.
Link to Download: cfroot-tools.zip - 19 KB.
Download and exatract it into your home folder. It will create a cfroot-tools folder under home folder. Go to the folder and execute the following comand:
Code:
chmod +x *
Base Cf-root: Download any latest cf-root from this Link. Extract the normalboot.img from the cf-root tar file.
normalboot.img: Require normalboot.img extracted from downloaded Gb ROM.
Hex editor: You will require and Hex Editor. I am using bless hex editor. You can use any one which you are comfortable or the one available under your linux distribution.
Open terminal window and enter the following commands:
Code:
[FONT=Microsoft Sans Serif][SIZE=2]cd
[/SIZE][/FONT][FONT=Microsoft Sans Serif][SIZE=2]gedit ~/.bashrc[/SIZE][/FONT]
You can use any editor of your choice. The main purpose is to set the tools path. At the bottom of this file, add the following lines:
Code:
PATH=$HOME/cfroot-tools:$PATH
export PATH
Save and close the file.
Logoff from linux and login again for the new path to take effect.
The Actual Process
For the purpose of tutorial, I am going to use XXKPQ cf-root as the base and DDKP3 for creating new one.
Create a folder called “cfroot” with out the quotes under home.
Go to the created folder and create two more folders: DDKP3 and XXKPQ.
Now copy the normalboot.img extracted from XXKPQ cf-root and copy it into the XXKPQ folder. Next copy the normalboot.img fromDDKP3 firmware and copy it into DDKP3 folder.
Now go to the cfroot-tools folder under HOME and copy the decom.sh and recom.sh into XXKPQ and DDKP3 folders.
The above steps can be accomplished by the below code. Open command window and type the following:
Code:
cd
mkdir ~/cfroot
mkdir ~/cfroot/XXKPQ
mkdir ~/cfroot/DDKP3
cd ~/cfroot/XXKPQ
cp ~/cfroot-tools/*.sh .
chmod +x *.sh
cd ~/cfroot/DDKP3
cp ~/cfroot-tools/*.sh .
chmod +x *.sh
You need to press enter after each command.
From terminal window, first to change directory to XXKPQ, type the following commands:
Code:
cd ~/cfroot/XXKPQ
./decom.sh
After the execution of the above command, the following files and folders will be created:
normalboot.img-base
normalboot.img-cmdline
normalboot.img-pagesize
normalboot.img-ramdisk.gz => Ramdisk
normalboot.img-zImage => Kernel
Click to expand...
Click to collapse
Apart from these files, a folder called ramdisk will be created, into which the contents of normalboot.img-ramdisk.gz would have been extracted.
Now once more from the terminal window execute the following command:
Code:
cd ~/cfroot/DDKP3
./decom.sh
Also make note of the following values, which are shown, when the decom.sh script is executed.
Code:
BOARD_KERNEL_BASE 81800000
BOARD_PAGE_SIZE 00001000
Now under DDKP3 folder, edit the recom.sh file. Replace the value after --base with the value after BOARD_KERNEL_BASE. Replace the value after --pagesize with value after BOARD_PAGE_SIZE. Save the file.
Now we can switch to file manager. It will be easier to work using a file manager from here on. Open the XXKPQ/ramdisk and DDKP3/ramdisk folders separately in file manager.
Copy the folders res & sbin from base cf-root (XXKPQ in our case) and paste into DDKP3/ramdisk folder. Overwrite all when prompted.
Copy all the files under XXKPQ/ramdisk (in the root) to DDKP3/ramdisk.
From XXKPQ/ramdisk/lib/modules/2.6.35.7/kernel/ copy the fs folder into DDKP3/ramdisk/lib/modules/2.6.35.7/kernel/.
At this point of time, we no longer require the XXKPQ folder. So we can close the file manager window browsing XXKPQ folder.
Now comes the tricky and critical part. This must be done very carefully. We need to edit the .ko files using a hex editor.
Under the kernel/crypto/ folder, there is a pcbc.ko file, edit it using an hex editor. Search for 2.6.35.7 using find option in the editor. Now note down the six digit numbers starting immediately after 2.6.35.7-CL. In our case the magic number is 882023. Close the file and the editor.
Now we open the kernel/fs/ folder in the file manager.
Now open the mbcache.ko file in the hex editor. Search for 2.6.35.7 again. As we can see that the six digits after 2.6.35.7-CL is not 882023. In our case it is 709629. We need to change 709629 to 882023 and save the file. Different editors provide for different methods of editing. In my case I can just simply click on starting number that is 7 and start typing 882023 and save the file.
Now you need to do the same for two more files under kernel/fs/jbd2/ and kernel/fs/ext4/.
Now go back to ramdisk folder. Under ramdisk/sbin/boot/ there is a file called install.sh. We are now going to edit this file. This not important that you edit this file.
Edit the first line and replace XXKPQ with DDKP3.
Similarly under the “# Once be enough”, there is another XXKPQ which is to be replace with DDKP3.
Now save this file.
Now back to command prompt and execute the following commands:
Code:
cd ~/cfroot/DDKP3
./recom.sh
Executing the above script recreates the normalboot.img-ramdisk.gz, the normalboot.img and create DDKP3-CFROOT-16-02-2012.tar.
The DDKP3-CFROOT-16-02-2012.tar is the cf-root for DDKP3 and can be flashed using ODIN as Pda file.
*
Thats it folks. Hope my effort is worthwhile and benefits some of you.
*
Additional Links:
A text file Create Custom Rom (though not for our phone but is quite useful all the same) - Found it while searching google. Don't know who created it. But here is the link. Create_Custom_Rom.txt - 5 KB
The link to tools zip mentioned in the above text file. tools.tar.gz - 49 MB
Script to uncompress and compress UC Kernel
uc_decom.sh - 258 b
uc_recom.sh - 382 b
10 Chars ......
For Future Use
Whoa! This is huge! Awesomr work man! Thanks.
Edit - No offence meant, but it would be appropriate if the title is How to "port" or similar. Since it ws "created" by ChainFire and we just porting it.
ganeshbiyer is good, very patient, did not think that my trouble!
Has been helping me! Am very grateful!
great job! & i already translate it into chinese^^
and a problem:
after i run the script "decom.sh",it display following words:
[[email protected] xxkpq]# ./decom.sh
./decom.sh: line 5: unpackbootimg: command not found
gunzip: ../normalboot.img-ramdisk.gz: No such file or directory
cpio: premature end of archive
[[email protected] xxkpq]#
help me please~what's going on?
cRainin said:
great job! & i already translate it into chinese^^
and a problem:
after i run the script "decom.sh",it display following words:
[[email protected] xxkpq]# ./decom.sh
./decom.sh: line 5: unpackbootimg: command not found
gunzip: ../normalboot.img-ramdisk.gz: No such file or directory
cpio: premature end of archive
[[email protected] xxkpq]#
help me please~what's going on?
Click to expand...
Click to collapse
unpackbootimg must be in the path.
also it must be executable.
ganeshbiyer said:
unpackbootimg must be in the path.
also it must be executable.
Click to expand...
Click to collapse
sorry,i paste the wrong code. my problem is this:
[[email protected] XXKPQ]$ ./decom.sh./decom.sh: /home/chenyu/cfroot-tools/unpackbootimg: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
gzip: ../normalboot.img-ramdisk.gz: No such file or directory
cpio: premature end of archive
[[email protected] XXKPQ]$
cRainin said:
sorry,i paste the wrong code. my problem is this:
[[email protected] XXKPQ]$ ./decom.sh./decom.sh: /home/chenyu/cfroot-tools/unpackbootimg: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
gzip: ../normalboot.img-ramdisk.gz: No such file or directory
cpio: premature end of archive
[[email protected] XXKPQ]$
Click to expand...
Click to collapse
Need to install the missing file ld-linux.so.2
Sent from my GT-I9003 using xda premium
Thank you Ganeshbiyer! this is the tutorial for which send multiple private messages and never answered .. Thanks again, nowI can make a version for Gingerbread UBKPD.
goodbye
Yeah ganesh! A superb work..well done bro
thanks bhaiya....
Thanks for the tutorial buddy
Hope it has been useful.
_
Release all PERFECT! I had no problem in making the entire guide .. BUT ... when flashing in ODIN, and says that when it failed to finish.
I knew that I would be so easy, so I started to analyze both folders (my UBKPD and XXKPQ) and did not get that at the root of KPD I have 12 files and only 11 KPQ. The 12th file executable type KPD called RECOVERY. This file should remove it before using recom.sh?
Thanks again for the guide. goodbye
Edit2:
Well, my little patience led me to delete that file and then went back to RECOVERY recom.sh run and throw me error that could not erase normalboot.img and did not understand, but looking at the files in the root, not the size you normalboot.img was higher than the stock then replace the stock normalboot (+5 mb), run again and finally he created recom.sh cf.root, I flash with ODIN successfully without any problem in these +30 minutes.
Thanks (again).
Now I have as including UV & OC (freqmax 1100MHz is very good speed and would think you do not need more with this phone)
maybe a stupid question:
would it work with other phones as well? natually with the files of the other phone and not with the 9003 files
fabsau said:
maybe a stupid question:
would it work with other phones as well? natually with the files of the other phone and not with the 9003 files
Click to expand...
Click to collapse
Well you can always try
thanks for your reply
I will try it soon^^
wait for my next reply
greetings fabsau
i do it all at this tutorial and it create .tar fine without trouble.. i flash with odin also no problem happen.. but while device open.. at boot logo get stuck or freeze at long time.. why it happen???
i confuse with this line:-
-Copy the folders res & sbin from base cf-root (XXKPQ in our case) and paste into DDKP3/ramdisk folder. Overwrite all when prompted.
-Copy all the files under XXKPQ/ramdisk (in the root) to DDKP3/ramdisk.
-From XXKPQ/ramdisk/lib/modules/2.6.35.7/kernel/ copy the fs folder into DDKP3/ramdisk/lib/modules/2.6.35.7/kernel/
Click to expand...
Click to collapse
why do not copy all the file in ramdisk n skip copy file inside the ramdisk folder.. it is difference?? please tell me if i do a mistake.

V20B .bin file :)

There you go
http://www.lgmobiles.com/gsm/download/P920 V20B (Gingerbread Version).zip
To root the bin file (instructions based on the one here)
Requirements: WinHex, a Linux distro (VMs work fine), drivers and flasher.
Instructions
1. Extract and open LGP920AT-00-V20b-ESA-XXX-JAN-10-2012+0_AP.bin in WinHex or any other hex editor.
2. Use WinHex to dump the content from offset B80000 (hexadecimal) to the end (select B80000 as start block and 22ABFFFF as end block and copy it to a new file), and save the dump as system.img.
3. Copy the .img to your Linux distro. Place it in the desktop. Now open terminal, cd to Desktop and enter the following commands one by one:
sudo mkdir temp
sudo mount -o loop system.img temp
Click to expand...
Click to collapse
What this does is mount the img into the temp folder. However, the files are read only. To copy su and superuser.apk, download both file, place them in the Desktop and enter the following commands:
sudo cp superuser.apk temp/app
sudo cp su temp/bin
Click to expand...
Click to collapse
Now, you have to set permissions for su and superuser.apk.
cd temp/app
sudo chmod 0644 superuser.apk
cd
cd Desktop/temp/bin
sudo chmod 6755 su
Click to expand...
Click to collapse
To save the changes, enter this:
sudo umount temp
Click to expand...
Click to collapse
Now, copy image.img back to Windows or whichever environment you prefer.
4. Copy the contents of the img file in WinHex. Go back to the bin file in WinHex and remove any data from offset B80000 onwards. You should be left with offsets 0 to B7FFFF. Right click block B7FFFF, select clipboard data > paste and accept all the prompts. You can now save the .bin file.
5. Now, it's time to flash the .bin. Extract the drivers somewhere and install "LGUnitedMobileDriver_S497CA20_WHQL_ML_Ver_1.0 .exe" and "LGUnitedMobileDriver_S497MA20_WHQL_ML_Ver_1.0.exe". Then, extract the flasher to another location.
6. With the .bin and .fls (found in the zip file containing the .bin as well) in hand, turn your phone off and remove both SD and SIM cards.
MAKE A BACKUP BEFORE PROCEEDING. THIS PROCEDURE WIPES SYSTEM AND APPS. DATA SUCH AS MUSIC AND IMAGES WILL REMAIN INTACT.
Click to expand...
Click to collapse
7. Hold volume up button while inserting the usb cable. When your computer detects the phone, let go of the button.
8. Once the driver installs, run B_SmartFlashTool_Extern.exe, go to the ROM copy D/L tab
9. Select the .bin file under CP bin and the .fls file under AP .bin.
10. Click start. Don't touch anything.
11. Once it's done, close the flasher, unplug your phone and insert the SIM and SD cards and turn it on.
12. Done
Zip file contains both .fls and .bin files.
So it seems roms based on v20B might be in the works
EDIT: Not going to upload, has been superseded by v20E and the Megatron exploit.
Hello! Please laid out links to the program.
http://file.karelia.ru/3jw96r/
LGP920AT-00-V20e (no patched)
Please patch file!
Sent from my LG-P920 using xda premium
he's uploading the v20b bin as we speak, also someone might need to make a thread on "patched firmware" if people are finding more .bin files
I'm 30% through the second zip file, Mediafire only allows maximum 200MB per file so I had to split up the .bin. It should be up in about an hours' time.
SnegovikRZN said:
http://file.karelia.ru/3jw96r/
LGP920AT-00-V20e (no patched)
Click to expand...
Click to collapse
Can somebody patch this bin. I think this is newest ROM 18.01.2012.
dr_jerremy said:
Can somebody patch this bin. I think this is newest ROM 18.01.2012.
Click to expand...
Click to collapse
I'm downloading it now, download speeds are really slow. I'll take a look once it finishes downloading.
pandaball said:
I'm downloading it now, download speeds are really slow. I'll take a look once it finishes downloading.
Click to expand...
Click to collapse
I'm almost done with dowloading,but i dont know how to patch :S..... I will try
EDIT: Bin. V20E 18.01.2012
Follow the updated instructions, they should be concise enough to follow.
In other news, I realised I forgot to set permissions for superuser.apk and su. So, I have to reupload everything due to my mistake. Sorry guys, I can only upload everything tomorrow as it's getting late
@SnegovikRZN If you could create patched ROMs for P920 as you did with the P970 that would be great
pandaball said:
Follow the updated instructions, they should be concise enough to follow.
In other news, I realised I forgot to set permissions for superuser.apk and su. So, I have to reupload everything due to my mistake. Sorry guys, I can only upload everything tomorrow as it's getting late
@SnegovikRZN If you could create patched ROMs for P920 as you did with the P970 that would be great
Click to expand...
Click to collapse
Can I say I'm first?
pandaball said:
Can I say I'm first?
Click to expand...
Click to collapse
i'll bring my thumbdrive over jk
Я не могу создать прошивку для p920, так как там немножко другая структура...
Ohh the ANDROID! string is missing... ok, no problem
in the 20e the entry 22ABFFFF is missing..
Maybe for V20E:
2249FFF0
I can't flash patched rom with Lg flash tool..
Oh I figured out what's the problem
Seem V20B having more options to root it.
hondymondy said:
Seem V20B having more options to root it.
Click to expand...
Click to collapse
Not really, most new roms would be rebased on v20E so I would recommend those

[Tutorial] NOOB-Friendly Instructions on Packing and Repacking system.new.dat file

I am a Windows user, and I was having quite the trouble unpacking and repacking system.new.dat files. I tried all sorts of Windows Chinese tools for the job, but no matter what I did, when I put the system.new.dat file and system.transfer.list file back into the flashable zip (even if I made no changes to the system.new.dat file... just unpacked and repacked), I would get an error flashing the file.
I finally got around this by installing Ubuntu 16.04 Xenial Xerus on VirtualBox. You can find a lot of tutorials online about how to do that. I am basing my instructions off of xpirt's tutorial on unpacking and repacking with the tools he provides. But it took me about 2 days to figure it out because I kept running into problems since some of the instructions made assumptions that the user knows how to use Linux. I am very new to Linux. I am not completely sure how to do *everything* from the command line, so if someone wants to add to my instructions to make it easier, please do so. But these are the things I did to figure it out.
So here are the noob-friendly Linux Ubuntu instructions on how to unpack and repack:
Section 1: Getting everything Ready
1. Download your flashable .zip rom. In my case, I downloaded cm-12.1-20150619-UNOFFICIAL-afyonltetmo.zip to my Ubuntu Desktop. You can download it to your Home Directory as well. Doesn't matter.
2. Download sdat2img. I downloaded mine to my Home Directory.
3. Download img2sdat. I also downloaded this to my Home Directory.
4. Extract all 3 zips, by right clicking on them and choosing 'Extract Here.' It will extract them into their own directories. The main directories that you need to pay attention to are /sdat2img-master/ and /img2sdat-master/
5. Download ext4fs either right into the sdat2img-master folder, or anywhere you want and then drag and drop it into the sdat2img-master folder.
6. Open Terminal, and install Python 2.7, if it's not already installed. Put
Code:
sudo apt-get install python-2.7 python-pip
Section 2: Beginning the Unpacking Process
*Note, you can copy and paste the codes; however, you can't use keyboard shortcuts in terminal. You have to right click and choose your option.
*Another note: Where you see "user" in the terminal commands, substitute it with your Linux username.
1. In your extracted folder from your flashable zip, right click on system.new.dat and system.transfer.list and choose 'cut.' Then paste them in the sdat2img-master folder.
2. Back in Terminal put
Code:
cd sdat2img-master
. That will get you into the right directory.
3. Now put
Code:
./sdat2img.py system.transfer.list system.new.dat system.img
. That will create your raw ext4 .img file.
4. You want to create an output directory for all the files that are in system.img. Put
Code:
mkdir output
5. Now you can mount system.img, and it will mount it into that output folder. Put
Code:
sudo mount -t ext4 -o loop system.img output/
6. You might have the problem that you don't have ownership of all the files (they have little "locks" on them). To gain ownership, put
Code:
sudo chown -R user:user /home/user/sdat2img-master/output
. If you still can't get read and write access, just try rebooting your Ubuntu virtual computer. That was the only thing that finally worked for me. You can start modifying stuff as you wish.
Section 3: Compress files back to a raw ext4 image
1. You are now going to need your file_contexts file from your original extract rom zip. COPY (not cut) and paste it into the sdat2img-master folder.
2. You are also going to need your 'make_ext4fs' file. Make sure it is in the sdat2img-master folder. You might have trouble with permissions, so just in case, put
Code:
chmod 777 /home/user/sdat2img-master/make_ext4fs
into terminal.
3. In Files (Ubuntu's "File Manager"), in the sdat2img-master folder, right click on your system.img file and go to 'Properties'. Notice the information in "Size." Ignore the GB, but look at the bytes. Mine is 2,411,724,800. Copy that number, but remove the commas. So mine is 2411724800.
4. Next is the actual compressing part. Put
Code:
./make_ext4fs -T 0 -S file_contexts -l 2411724800 -a system system_new.img output/
into terminal, but substitute '2411724800' with whatever size you got from the Properties in system.img. You will now how a new file called system_new.img.
Section 4: Converting ext4 (raw image) to img (sparse image)
1. Now you will need to install img2simg. In Terminal, put
Code:
sudo apt-get install android-tools-fsutils
2. Now you can put
Code:
img2simg system_new.img system_new_sparse.img
You will now have a file called system_new_sparse.img that is ready to be packed in a new dat file.
Section 5: Converting img (sparse image) to dat (sparse data)
1. Cut and paste your system_new_sparse.img into img2sdat-master folder that you made earlier.
2. Now you need to navigate to that folder in terminal. Put
Code:
cd /home/user/img2sdat-master
3. Now you can put
Code:
./img2sdat.py system_new_sparse.img
to create your new dat file. It will first ask you which Android version it's for. Enter the number corresponding and hit enter.
4. You're now pretty much done. As you'll see, it created 3 files: system.new.dat, system.patch.dat, and system.transfer.list. Just paste these files into your folder where your flashable zip files are, replacing any original ones in there. Make sure you also have your file_contexts file in there as well. Highlight all the files in there, right click, and zip them up. Then name your flashable zip whatever you want and try flashing!

Categories

Resources