[Tutorial]MAKE YOUR OWN CUSTOM ROM FOR LG G2M :)

Search This thread

WYPIERDAALAAC

Senior Member
Sep 3, 2012
987
683
Warszawa
Hi all! I want to show you how to create custom rom based on stock lg firmware and stock rom ready to install by recovery :)

1. Making stock rom ready to install by recovery
1. Download latest LG KK Firmware KDZ: IS HERE
PASSWORD: firmware-lg-d620r-poland-62010

then this programme:
this: Click!

2. Run KDZ Extractor and open kdz (downloaded file) in it.
3. Click extract KDZ
4. Open extracted DZ file, wait and then click on merge system bin (you must check every file in programme)
5. Now you have some more files, look on:
-system.img
and
-boot_327680.bin (rename it to boot.img)
-cust_704512.bin (rename it to cust.bin)
6. Download attach file: attach file is here
7. Make some folder on your disc and put there META-INF folder (which you downloaded), system.img, boot.img and cust.bin.
8. Make zip package by 7zip.
9. Now you have ready zip package, you can install it by moded-Recovery.

2. Making custom rom based on stock
1. Make all points from first tutorial to 5*
2. Download here
3. Open system file in downloaded programme and save what you want.
4. Download "META-INF for custom":
Here

Example:
Code:
[B]Your text here[/B]

ui_print("*****************************");
ui_print("*        Your mod           *");
ui_print("*****************************");
ui_print("*       for LG G2M          *");
ui_print("*****************************");
ui_print("First part of installation...");

run_program("/sbin/mount", "/system");
run_program("/sbin/busybox","mount","/data");

[B]Delete system folder, in example you see  "media" folder[/B]

delete_recursive("/system/media");

package_extract_dir("system", "/system");
mount("ext2", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
package_extract_dir("system", "/system");
symlink("../xbin/su", "/system/bin/su");
symlink("../xbin/busybox", "/system/bin/busybox");
set_metadata("/system/xbin/su", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:su_exec:s0");
run_program("/sbin/busybox", "umount", "/system");
run_program("/sbin/busybox", "umount", "/cache");
run_program("/sbin/busybox", "umount", "/data");
run_program("/sbin/busybox", "mount", "/system");
run_program("/sbin/busybox", "mount", "/cache");
run_program("/sbin/busybox", "mount", "/data");
ui_print("Second part of installation...");

[B]About deleting apps, for example Books apk and odex file[/B]

delete("/system/app/Books.apk");
delete("/system/app/Books.odex");

set_perm_recursive(0, 0, 0777, 0777, "/system/etc/init.d");
set_perm_recursive(0, 0, 0755, 0644, "/system/app");
set_perm_recursive(0, 0, 0755, 0644, "/system/priv-app");
ui_print("Please wait... ");
run_program("/sbin/busybox", "umount", "/system");
run_program("/sbin/busybox", "umount", "/cache");
run_program("/sbin/busybox", "umount", "/data");
unmount("/system");
ui_print("Clearing cache");
delete_recursive("/data/dalvik-cache");
ui_print("Now UnMounting partitions");
run_program("/sbin/umount", "/system");
run_program("/sbin/umount", "/data");
show_progress(0.1, 0);

[B]Last words for ending intsallation[/B]

ui_print("*******************************");
ui_print("*          Thank you!         *");
ui_print("*******************************");
show_progress(0.1, 10);

If you want add kernel installation put boot.img to your folder and add to your script this command:
Code:
show_progress(0.050000, 5);
package_extract_file("boot.img", "/dev/block/platform/msm_sdcc.1/by-name/boot");
show_progress(0.200000, 10);

*** NEW UPDATER-SCRIPT, WITH FORMATING SYSTEM AND CLEAN INSTALLATION:
here!

FOR EDITING UPDATER SCRIPT ETC USE ALWAYS NOTEPAD++ (NotepadPP)
HOMEPAGE of N++
Thats all :)
 

Attachments

  • META-INF.zip
    169.1 KB · Views: 477
Last edited:

elhattak7

Senior Member
Apr 8, 2012
162
22
great work

:good:
Hi all! I want to show you how to create custom rom based on stock lg firmware and stock rom ready to install by recovery :)

1. Making stock rom ready to install by recovery
1. Download latest LG KK Firmware KDZ: CLICK

then this programme:
this: Click!

2. Run KDZ Extractor and open kdz (downloaded file) in it.
3. Click extract KDZ
4. Open extracted DZ file, wait and then click on merge system bin (you must check every file in programme)



5. Now you have some more files, look on:
-system.img
and
-boot_327680.bin (rename it to boot.img)
-cust_704512.bin (rename it to cust.bin)
6. Download attach file: attach file is here
7. Make some folder on your disc and put there META-INF folder (which you downloaded), system.img, boot.img and cust.bin.
8. Make zip package by 7zip.
9. Now you have ready zip package, you can install it by moded-Recovery.

2. Making custom rom based on stock
1. Make all points from first tutorial to 5*
2. Download here
3. Open system file in downloaded programme and save what you want.
4. Download "META-INF for custom":
Here

Example:
Code:
[B]Your text here[/B]

ui_print("*****************************");
ui_print("*        Your mod           *");
ui_print("*****************************");
ui_print("*       for LG G2M          *");
ui_print("*****************************");
ui_print("First part of installation...");

run_program("/sbin/mount", "/system");
run_program("/sbin/busybox","mount","/data");

[B]Delete system folder, in example you see  "media" folder[/B]

delete_recursive("/system/media");

package_extract_dir("system", "/system");
mount("ext2", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
package_extract_dir("system", "/system");
symlink("../xbin/su", "/system/bin/su");
symlink("../xbin/busybox", "/system/bin/busybox");
set_metadata("/system/xbin/su", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:su_exec:s0");
run_program("/sbin/busybox", "umount", "/system");
run_program("/sbin/busybox", "umount", "/cache");
run_program("/sbin/busybox", "umount", "/data");
run_program("/sbin/busybox", "mount", "/system");
run_program("/sbin/busybox", "mount", "/cache");
run_program("/sbin/busybox", "mount", "/data");
ui_print("Second part of installation...");

[B]About deleting apps, for example Books apk and odex file[/B]

delete("/system/app/Books.apk");
delete("/system/app/Books.odex");

set_perm_recursive(0, 0, 0777, 0777, "/system/etc/init.d");
set_perm_recursive(0, 0, 0755, 0644, "/system/app");
set_perm_recursive(0, 0, 0755, 0644, "/system/priv-app");
ui_print("Please wait... ");
run_program("/sbin/busybox", "umount", "/system");
run_program("/sbin/busybox", "umount", "/cache");
run_program("/sbin/busybox", "umount", "/data");
unmount("/system");
ui_print("Clearing cache");
delete_recursive("/data/dalvik-cache");
ui_print("Now UnMounting partitions");
run_program("/sbin/umount", "/system");
run_program("/sbin/umount", "/data");
show_progress(0.1, 0);

[B]Last words for ending intsallation[/B]

ui_print("*******************************");
ui_print("*          Thank you!         *");
ui_print("*******************************");
show_progress(0.1, 10);

If you want add kernel installation put boot.img to your folder and add to your script this command:
Code:
show_progress(0.050000, 5);
package_extract_file("boot.img", "/dev/block/platform/msm_sdcc.1/by-name/boot");
show_progress(0.200000, 10);

Thats all :)
 
  • Like
Reactions: WYPIERDAALAAC

baggino

Senior Member
Jan 28, 2011
1,057
152
question: would it be possible to copy the part of the stock of sw Gps CM12? I'm fine with CM12 but GPS signal ... dancer stock with stable signal
 

baggino

Senior Member
Jan 28, 2011
1,057
152
stability is improved but still less the stock. I'd like to try the Resurrection_remix - but I do not know how to copy ... :eek:
 

WYPIERDAALAAC

Senior Member
Sep 3, 2012
987
683
Warszawa
How to add root directly in the created zip ? ???

you must write commands in script for that, tell me if it's good:
link for supersu https://download.chainfire.eu/696/SuperSU/UPDATE-SuperSU-v2.46.zip and put to tmp/supersu folder
Code:
set_progress(0.700000);
ui_print("Rooting...");
package_extract_dir("PACKAGENAME/supersu", "/tmp/supersu");
run_program("/sbin/busybox", "unzip", "/tmp/supersu/UPDATE-SuperSU-v2.46.zip", "META-INF/com/google/android/*", "-d", "/tmp/supersu");
run_program("/sbin/busybox", "sh", "/tmp/supersu/META-INF/com/google/android/update-binary", "dummy", "1", "/tmp/supersu/UPDATE-SuperSU-v2.46.zip");
run_program("/system/xbin/busybox", "--install", "-s", "/system/xbin");
set_progress(0.800000);
 

Zer0_rulz

Senior Member
Dec 22, 2014
74
9
i cant find the system.img.
these files are D62020a00.kdz,
 

Attachments

  • 123112412412451.png
    123112412412451.png
    234.9 KB · Views: 81

Top Liked Posts

  • There are no posts matching your filters.
  • 18
    Hi all! I want to show you how to create custom rom based on stock lg firmware and stock rom ready to install by recovery :)

    1. Making stock rom ready to install by recovery
    1. Download latest LG KK Firmware KDZ: IS HERE
    PASSWORD: firmware-lg-d620r-poland-62010

    then this programme:
    this: Click!

    2. Run KDZ Extractor and open kdz (downloaded file) in it.
    3. Click extract KDZ
    4. Open extracted DZ file, wait and then click on merge system bin (you must check every file in programme)
    5. Now you have some more files, look on:
    -system.img
    and
    -boot_327680.bin (rename it to boot.img)
    -cust_704512.bin (rename it to cust.bin)
    6. Download attach file: attach file is here
    7. Make some folder on your disc and put there META-INF folder (which you downloaded), system.img, boot.img and cust.bin.
    8. Make zip package by 7zip.
    9. Now you have ready zip package, you can install it by moded-Recovery.

    2. Making custom rom based on stock
    1. Make all points from first tutorial to 5*
    2. Download here
    3. Open system file in downloaded programme and save what you want.
    4. Download "META-INF for custom":
    Here

    Example:
    Code:
    [B]Your text here[/B]
    
    ui_print("*****************************");
    ui_print("*        Your mod           *");
    ui_print("*****************************");
    ui_print("*       for LG G2M          *");
    ui_print("*****************************");
    ui_print("First part of installation...");
    
    run_program("/sbin/mount", "/system");
    run_program("/sbin/busybox","mount","/data");
    
    [B]Delete system folder, in example you see  "media" folder[/B]
    
    delete_recursive("/system/media");
    
    package_extract_dir("system", "/system");
    mount("ext2", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
    package_extract_dir("system", "/system");
    symlink("../xbin/su", "/system/bin/su");
    symlink("../xbin/busybox", "/system/bin/busybox");
    set_metadata("/system/xbin/su", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:su_exec:s0");
    run_program("/sbin/busybox", "umount", "/system");
    run_program("/sbin/busybox", "umount", "/cache");
    run_program("/sbin/busybox", "umount", "/data");
    run_program("/sbin/busybox", "mount", "/system");
    run_program("/sbin/busybox", "mount", "/cache");
    run_program("/sbin/busybox", "mount", "/data");
    ui_print("Second part of installation...");
    
    [B]About deleting apps, for example Books apk and odex file[/B]
    
    delete("/system/app/Books.apk");
    delete("/system/app/Books.odex");
    
    set_perm_recursive(0, 0, 0777, 0777, "/system/etc/init.d");
    set_perm_recursive(0, 0, 0755, 0644, "/system/app");
    set_perm_recursive(0, 0, 0755, 0644, "/system/priv-app");
    ui_print("Please wait... ");
    run_program("/sbin/busybox", "umount", "/system");
    run_program("/sbin/busybox", "umount", "/cache");
    run_program("/sbin/busybox", "umount", "/data");
    unmount("/system");
    ui_print("Clearing cache");
    delete_recursive("/data/dalvik-cache");
    ui_print("Now UnMounting partitions");
    run_program("/sbin/umount", "/system");
    run_program("/sbin/umount", "/data");
    show_progress(0.1, 0);
    
    [B]Last words for ending intsallation[/B]
    
    ui_print("*******************************");
    ui_print("*          Thank you!         *");
    ui_print("*******************************");
    show_progress(0.1, 10);

    If you want add kernel installation put boot.img to your folder and add to your script this command:
    Code:
    show_progress(0.050000, 5);
    package_extract_file("boot.img", "/dev/block/platform/msm_sdcc.1/by-name/boot");
    show_progress(0.200000, 10);

    *** NEW UPDATER-SCRIPT, WITH FORMATING SYSTEM AND CLEAN INSTALLATION:
    here!

    FOR EDITING UPDATER SCRIPT ETC USE ALWAYS NOTEPAD++ (NotepadPP)
    HOMEPAGE of N++
    Thats all :)
    3
    Very good tutorial !
    I made a flashable v10j ! I can upload it if anyone is interested.
    2
    How to add root directly in the created zip ? ???

    you must write commands in script for that, tell me if it's good:
    link for supersu https://download.chainfire.eu/696/SuperSU/UPDATE-SuperSU-v2.46.zip and put to tmp/supersu folder
    Code:
    set_progress(0.700000);
    ui_print("Rooting...");
    package_extract_dir("PACKAGENAME/supersu", "/tmp/supersu");
    run_program("/sbin/busybox", "unzip", "/tmp/supersu/UPDATE-SuperSU-v2.46.zip", "META-INF/com/google/android/*", "-d", "/tmp/supersu");
    run_program("/sbin/busybox", "sh", "/tmp/supersu/META-INF/com/google/android/update-binary", "dummy", "1", "/tmp/supersu/UPDATE-SuperSU-v2.46.zip");
    run_program("/system/xbin/busybox", "--install", "-s", "/system/xbin");
    set_progress(0.800000);
    1
    great work

    :good:
    Hi all! I want to show you how to create custom rom based on stock lg firmware and stock rom ready to install by recovery :)

    1. Making stock rom ready to install by recovery
    1. Download latest LG KK Firmware KDZ: CLICK

    then this programme:
    this: Click!

    2. Run KDZ Extractor and open kdz (downloaded file) in it.
    3. Click extract KDZ
    4. Open extracted DZ file, wait and then click on merge system bin (you must check every file in programme)



    5. Now you have some more files, look on:
    -system.img
    and
    -boot_327680.bin (rename it to boot.img)
    -cust_704512.bin (rename it to cust.bin)
    6. Download attach file: attach file is here
    7. Make some folder on your disc and put there META-INF folder (which you downloaded), system.img, boot.img and cust.bin.
    8. Make zip package by 7zip.
    9. Now you have ready zip package, you can install it by moded-Recovery.

    2. Making custom rom based on stock
    1. Make all points from first tutorial to 5*
    2. Download here
    3. Open system file in downloaded programme and save what you want.
    4. Download "META-INF for custom":
    Here

    Example:
    Code:
    [B]Your text here[/B]
    
    ui_print("*****************************");
    ui_print("*        Your mod           *");
    ui_print("*****************************");
    ui_print("*       for LG G2M          *");
    ui_print("*****************************");
    ui_print("First part of installation...");
    
    run_program("/sbin/mount", "/system");
    run_program("/sbin/busybox","mount","/data");
    
    [B]Delete system folder, in example you see  "media" folder[/B]
    
    delete_recursive("/system/media");
    
    package_extract_dir("system", "/system");
    mount("ext2", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
    package_extract_dir("system", "/system");
    symlink("../xbin/su", "/system/bin/su");
    symlink("../xbin/busybox", "/system/bin/busybox");
    set_metadata("/system/xbin/su", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:su_exec:s0");
    run_program("/sbin/busybox", "umount", "/system");
    run_program("/sbin/busybox", "umount", "/cache");
    run_program("/sbin/busybox", "umount", "/data");
    run_program("/sbin/busybox", "mount", "/system");
    run_program("/sbin/busybox", "mount", "/cache");
    run_program("/sbin/busybox", "mount", "/data");
    ui_print("Second part of installation...");
    
    [B]About deleting apps, for example Books apk and odex file[/B]
    
    delete("/system/app/Books.apk");
    delete("/system/app/Books.odex");
    
    set_perm_recursive(0, 0, 0777, 0777, "/system/etc/init.d");
    set_perm_recursive(0, 0, 0755, 0644, "/system/app");
    set_perm_recursive(0, 0, 0755, 0644, "/system/priv-app");
    ui_print("Please wait... ");
    run_program("/sbin/busybox", "umount", "/system");
    run_program("/sbin/busybox", "umount", "/cache");
    run_program("/sbin/busybox", "umount", "/data");
    unmount("/system");
    ui_print("Clearing cache");
    delete_recursive("/data/dalvik-cache");
    ui_print("Now UnMounting partitions");
    run_program("/sbin/umount", "/system");
    run_program("/sbin/umount", "/data");
    show_progress(0.1, 0);
    
    [B]Last words for ending intsallation[/B]
    
    ui_print("*******************************");
    ui_print("*          Thank you!         *");
    ui_print("*******************************");
    show_progress(0.1, 10);

    If you want add kernel installation put boot.img to your folder and add to your script this command:
    Code:
    show_progress(0.050000, 5);
    package_extract_file("boot.img", "/dev/block/platform/msm_sdcc.1/by-name/boot");
    show_progress(0.200000, 10);

    Thats all :)
    1
    why not :) maybe it will help someone back from cm to stock ;)

    Ok! I am uploading!