WIP Porting CM10 Discussion

Search This thread

kuma82

Senior Member
Jan 19, 2012
1,783
941
Houston
Alright we have a CM9 for locked bootloader but we don't have CM10 and the people that want to help don't have a clue about where to begin.
I really didn't want to make a new thread but so much stuff is scattered in several places on this subject, and I don't feel like jacking peoples thread to answer "how to stuff".

artas182x already ported a 2nd-init (rom and recovery) for L9, so we just have to figure out the right settings to make CM10 boot.
Please read this thread http://xdaforums.com/showthread.php?p=36706378


The only CM10 I have so far is from markolino631 http://xdaforums.com/showthread.php?t=2313036
ROM
http://www.mediafire.com/download/fdka03ulxtxn1pg/cm-10-20130611-UNOFFICIAL-p760.zip


One of the first things you will need to learn is how to make a boot.tar or recovery.tar for locked bootloader.


How to make a boot.tar or recovery.tar

Things you will need Linux OS or cygwin (for windows), osm0sis's mkbootimg (Android Kitchen has it all set and ready to go), and last but not least a brain ;)

okay you want to make a boot.tar, well we first need to get our hands on the boot.img. So I'll just use a stock boot.img for this example, but we really need CM10 boot.img.

I am using cygwin and Android Kitchen for this example.
First navigate to advance options (#0) select number #12 (in advanced options) and select option "a"(Extract kernel+ramdisk from boot.img/recovery.img in any folder).
Place the boot.img inside the new folder it specifies and hit enter. Afterwards you will have a "zImage" file and a "boot.img-ramdisk" folder.
howtotar_zps80600521.jpg

howtotar2_zpsbed4c577.jpg

Note: the Kitchen will get rid of the boot.img (so don't place your only boot.img copy in that folder).
Now exit the Kitchen (just press Ctrl+c) and navigate to the new folder with cygwin (shorten the folder name if you want, like I did in my example).
Code:
Kuma Family@KumaFamily-PC /home/Kuma/Kitchen
$ [B]cd bootimg_stock/boot.img-ramdisk/[/B]

Once in the "boot.img-ramdisk" folder we are all set to make the boot.tar
However, lets check the permission on all the files in that folder.
So type ls -ln and make a note of the permission for each file, without the proper permission it won't work for sure.
Another thing, if using cygwin make sure you move a folder properly. If you just move a folder (with Window explorer) you may loss the correct permission for those files. However, if you just change the name of a file it doesn't effect the permissions. I'll try and elaborate some more later.
howtotar3_zps94b28506.jpg


Now type tar cvf boot.tar ./* and a new boot.tar will be created in that folder.

Code:
$ tar cvf boot.tar ./*
./charger
./data/
./default.prop
./dev/
./fota.rc
./init
./init.goldfish.rc
./init.lge.early.rc
./init.lge.rc
./init.lge.ril.rc
./init.lge.usb.rc
./init.lgep769board.rc
./init.post_boot.sh
./init.rc
./init.trace.rc
./init.u2.rc
./init.usb.rc
./lgdms.fota.rc
./lgdms.fota_update.rc
./proc/
./res/
./res/images/
./res/images/charger/
./res/images/charger/battery_0.png
./res/images/charger/battery_1.png
./res/images/charger/battery_2.png
./res/images/charger/battery_3.png
./res/images/charger/battery_4.png
./res/images/charger/battery_none.png
./res/images/charger/battery_overheat.png
./res/images/charger/battery_trickle_ani_01.png
./res/images/charger/battery_trickle_ani_02.png
./res/images/errorlogo.png
./sbin/
./sbin/adbd
./sbin/e2fsck_static
./sbin/lge_fota
./sbin/mke2fs_static
./sbin/resize2fs_static
./sbin/ueventd
./sbin/wallpaper
./sys/
./system/
./ueventd.goldfish.rc
./ueventd.lgep769board.rc
./ueventd.rc

Kuma Family@KumaFamily-PC /home/Kuma/Kitchen/bootimg_stock/boot.img-ramdisk
$
howtotar4_zps4614f78b.jpg

Once you made your boot.tar (and made the changes you wanted) you can place the boot.tar in the system (/system/bootstrap/) with the correct permissions
Code:
chmod 755 /system/bootstrap/boot.tar

I already made a couple of recoveries and modified ram disk using this method.
For recovery type tar cvf recovery.tar ./*


I'll be posting some more stuff but i really have my hands full.
 

ThEuNdYiNg1

Senior Member
Dec 27, 2009
330
114
jacksonville
Alright we have a CM9 for locked bootloader but we don't have CM10 and the people that want to help don't have a clue about where to begin.
I really didn't want to make a new thread but so much stuff is scattered in several places on this subject, and I don't feel like jacking peoples thread to answer "how to stuff".

artas182x already ported a 2nd-init (rom and recovery) for L9, so we just have to figure out the right settings to make CM10 boot.
Please read this thread http://xdaforums.com/showthread.php?p=36706378


The only CM10 I have so far is from markolino631 http://xdaforums.com/showthread.php?t=2313036
ROM
http://www.mediafire.com/download/fdka03ulxtxn1pg/cm-10-20130611-UNOFFICIAL-p760.zip


One of the first things you will need to learn is how to make a boot.tar or recovery.tar for locked bootloader.


How to make a boot.tar or recovery.tar

Things you will need Linux OS or cygwin (for windows), osm0sis's mkbootimg (Android Kitchen has it all set and ready to go), and last but not least a brain ;)

okay you want to make a boot.tar, well we first need to get our hands on the boot.img. So I'll just use a stock boot.img for this example, but we really need CM10 boot.img.

I am using cygwin and Android Kitchen for this example.
First navigate to advance options (#0) select number #12 (in advanced options) and select option "a"(Extract kernel+ramdisk from boot.img/recovery.img in any folder).
Place the boot.img inside the new folder it specifies and hit enter. Afterwards you will have a "zImage" file and a "boot.img-ramdisk" folder.
howtotar_zps80600521.jpg

howtotar2_zpsbed4c577.jpg

Now exit the Kitchen (just press Ctrl+c) and navigate to the new folder with cygwin (shorten the folder name if you want, like I did in my example).
Code:
Kuma Family@KumaFamily-PC /home/Kuma/Kitchen
$ [B]cd bootimg_stock/boot.img-ramdisk/[/B]

Once in the "boot.img-ramdisk" folder we are all set to make the boot.tar
However, lets check the permission on all the files in that folder.
So type ls -ln and make a note of the permission for each file, without the proper permission it won't work for sure.

howtotar3_zps94b28506.jpg


Now type tar cvf boot.tar ./* and a new boot.tar will be created in that folder.

Code:
$ tar cvf boot.tar ./*
./charger
./data/
./default.prop
./dev/
./fota.rc
./init
./init.goldfish.rc
./init.lge.early.rc
./init.lge.rc
./init.lge.ril.rc
./init.lge.usb.rc
./init.lgep769board.rc
./init.post_boot.sh
./init.rc
./init.trace.rc
./init.u2.rc
./init.usb.rc
./lgdms.fota.rc
./lgdms.fota_update.rc
./proc/
./res/
./res/images/
./res/images/charger/
./res/images/charger/battery_0.png
./res/images/charger/battery_1.png
./res/images/charger/battery_2.png
./res/images/charger/battery_3.png
./res/images/charger/battery_4.png
./res/images/charger/battery_none.png
./res/images/charger/battery_overheat.png
./res/images/charger/battery_trickle_ani_01.png
./res/images/charger/battery_trickle_ani_02.png
./res/images/errorlogo.png
./sbin/
./sbin/adbd
./sbin/e2fsck_static
./sbin/lge_fota
./sbin/mke2fs_static
./sbin/resize2fs_static
./sbin/ueventd
./sbin/wallpaper
./sys/
./system/
./ueventd.goldfish.rc
./ueventd.lgep769board.rc
./ueventd.rc

Kuma Family@KumaFamily-PC /home/Kuma/Kitchen/bootimg_stock/boot.img-ramdisk
$
howtotar4_zps4614f78b.jpg

Once you made your boot.tar (and made the changes you wanted) you can place the boot.tar in the system (/system/bootstrap/) with the correct permissions
Code:
chmod 755 /system/bootstrap/boot.tar

I already made a couple of recoveries and modified ram disk using this method.
For recovery type tar cvf recovery.tar ./*


I'll be posting some more stuff but i really have my hands full.


what if the permissions of the files are not the same as the permissions thats in your screenshot?

just tried to make a rom and got a security error again. IDK what im doing wrong
 
Last edited:

Ilxaot

Senior Member
May 1, 2013
1,473
763
26
Parrish
This is sick. So once we have a boot.tar, do we just drop it onto a CM10 ROM for say, the P760? That seems all too easy and probably wrong.

Sent from my Nexus 7 using Tapatalk
 

kuma82

Senior Member
Jan 19, 2012
1,783
941
Houston
what if the permissions of the files are not the same as the permissions thats in your screenshot?

just tried to make a rom and got a security error again. IDK what im doing wrong
Need exact steps, or I won't be able to help.
More than like you aren't using a stock jellybean boot.img, that's why you are getting the security error.
This is sick. So once we have a boot.tar, do we just drop it onto a CM10 ROM for say, the P760? That seems all too easy and probably wrong.

Sent from my Nexus 7 using Tapatalk

I wish it was that easy there are several other files that need to be replaced from stock, like libs and stuff.
I don't have the time to troubleshooting.
Building the rom from source is the best route, but my computer is crap.
 

Ilxaot

Senior Member
May 1, 2013
1,473
763
26
Parrish
If I knew how, I could try. I have a decent setup. The problem for me is that I have no history in development, only tweaks. And, I don't know how to make a ROM for an unlocked bootloader, so I get the feeling that if I look for help, I'll find results for unlocked bootloader ROMs and end up botching the ROM.

Sent from my Nexus 7 using Tapatalk
 

ThEuNdYiNg1

Senior Member
Dec 27, 2009
330
114
jacksonville
Need exact steps, or I won't be able to help.
More than like you aren't using a stock jellybean boot.img, that's why you are getting the security error.




I wish it was that easy there are several other files that need to be replaced from stock, like libs and stuff.
I don't have the time to troubleshooting.
Building the rom from source is the best route, but my computer is crap.

first thing is i download p760 cm10 and took the boot.img and decompiled it with cygwin i edited the names so instead of it saying init.lgep760board or whatever is it i changed it to p769 and i also changed in one of the files the name file for the .usb file to p769. then i made the boot.tar with your instructions. the recovery and everythin else is from the cm9 rom, i just took the bootstrap folder from there and put it in the cm10 rom

The stock boot.img is from your tweaked rom and i also copied all of the libs and things thats required to be modded like you did with cm9 for the p769 since my phone is a p769 and not a p760
 

Ilxaot

Senior Member
May 1, 2013
1,473
763
26
Parrish
first thing is i download p760 cm10 and took the boot.img and decompiled it with cygwin i edited the names so instead of it saying init.lgep760board or whatever is it i changed it to p769 and i also changed in one of the files the name file for the .usb file to p769. then i made the boot.tar with your instructions. the recovery and everythin else is from the cm9 rom, i just took the bootstrap folder from there and put it in the cm10 rom

The stock boot.img is from your tweaked rom and i also copied all of the libs and things thats required to be modded like you did with cm9 for the p769 since my phone is a p769 and not a p760

I'm no expert, but that sounds about right. D:

Sent from my Nexus 7 using Tapatalk
 

krashprocess

Member
Nov 16, 2013
8
7
Madrid
I've been experimenting with porting different versions of CM (10.1 and 11), AOKP and PacMan (so basically Android 4.3 and 4.4). Didn't got them booting, but the recoveries did work and didn't give a Security Error.

Permissions in the files are important (the files you need to edit usally need 0755). You need to replace the boot.img of the ROM for the stock one and use the replaced boot.img to create a boot.tar. You also need to add a line to the updater-script that changes the permissions of the /system/bootstrap to 755, so the 2nd init script can access to them.

You also need to replace the e2fsck in /system/bin (and add the e2fsck.bin, which is the original binary). The kernel executes e2fsck to check the file system at boot, so it's the perfect candidate to launch the 2nd init process (since the original kernel executes this binary always at boot).

If you get the correct permissions in the files, the correct files replaced and edited, you may get past the Security Error. I'm now investigating why it hangs on the LG logo. I think I'm not building the boot.tar correctly, and that's why the 2nd init is unable to jump to it.
 

ThEuNdYiNg1

Senior Member
Dec 27, 2009
330
114
jacksonville
I've been experimenting with porting different versions of CM (10.1 and 11), AOKP and PacMan (so basically Android 4.3 and 4.4). Didn't got them booting, but the recoveries did work and didn't give a Security Error.

Permissions in the files are important (the files you need to edit usally need 0755). You need to replace the boot.img of the ROM for the stock one and use the replaced boot.img to create a boot.tar. You also need to add a line to the updater-script that changes the permissions of the /system/bootstrap to 755, so the 2nd init script can access to them.

You also need to replace the e2fsck in /system/bin (and add the e2fsck.bin, which is the original binary). The kernel executes e2fsck to check the file system at boot, so it's the perfect candidate to launch the 2nd init process (since the original kernel executes this binary always at boot).

If you get the correct permissions in the files, the correct files replaced and edited, you may get past the Security Error. I'm now investigating why it hangs on the LG logo. I think I'm not building the boot.tar correctly, and that's why the 2nd init is unable to jump to it.

so i basically need to replace that with stock file and it should work?
 

kuma82

Senior Member
Jan 19, 2012
1,783
941
Houston
so i basically need to replace that with stock file and it should work?

No, you need the modified 2fsck, pull it from my tweak stock rom or somewhere else, like artas182x l9recovery apk. Another thing don't use the bootstrap files for CM9. Pull it from my rom as well.
Just so you know, I made the changes you are talking about (changing 760 to 769) and it didn't work. For some reason the data partition wouldn't mount. I'll give y'all some logcats later.

Sent from my LGMS769 using XDA Premium 4 mobile app
 
  • Like
Reactions: Ntrasme

krashprocess

Member
Nov 16, 2013
8
7
Madrid
Hey Kuma, thanks so much for the guide. I'm getting stuck at the LG logo screen (before the boot animation). Obviously adbd is not getting started since I'm pretty sure my boot.tar is somehow wrong. Is it possible to still grab the logcats out of the device? I can still access the recovery (and replace it with different CWM for L9 versions). Thanks in advance.

And it's not just a matter of replacing a file AFAIK. It involves a few more steps until you get at least past the Security Error. I didn't get any of my ports to boot the actual OS, but at least the recovery works.
 
Last edited:

LaDY Vengeance

Senior Member
Aug 27, 2013
1,038
517
Philadelphia
Hey Kuma, thanks so much for the guide. I'm getting stuck at the LG logo screen (before the boot animation). Obviously adbd is not getting started since I'm pretty sure my boot.tar is somehow wrong. Is it possible to still grab the logcats out of the device? I can still access the recovery (and replace it with different CWM for L9 versions). Thanks in advance.

And it's not just a matter of replacing a file AFAIK. It involves a few more steps until you get at least past the Security Error. I didn't get any of my ports to boot the actual OS, but at least the recovery works.

Best of luck to y'all! If we can manage at least a CM 10, that would be awesome! Of course, we may run into bugs but that is the norm on the nightlies. :rolleyes:

Sent from my LG-P769 using XDA Premium 4 mobile app
 
  • Like
Reactions: kuma82

kuma82

Senior Member
Jan 19, 2012
1,783
941
Houston
Hey Kuma, thanks so much for the guide. I'm getting stuck at the LG logo screen (before the boot animation). Obviously adbd is not getting started since I'm pretty sure my boot.tar is somehow wrong. Is it possible to still grab the logcats out of the device? I can still access the recovery (and replace it with different CWM for L9 versions). Thanks in advance.

And it's not just a matter of replacing a file AFAIK. It involves a few more steps until you get at least past the Security Error. I didn't get any of my ports to boot the actual OS, but at least the recovery works.

I thought adb wasn't working but it was. I just kept trying and it started working. It's probably not working because you need to install android platform sooner. I noticed a driver was popping up but Windows didn't know what to do with it. So I manually installed it, not at a computer right now, so I'm not sure what the actually drive its called.

Sent from my LGMS769 using XDA Premium 4 mobile app
 

krashprocess

Member
Nov 16, 2013
8
7
Madrid
I thought adb wasn't working but it was. I just kept trying and it started working. It's probably not working because you need to install android platform sooner. I noticed a driver was popping up but Windows didn't know what to do with it. So I manually installed it, not at a computer right now, so I'm not sure what the actually drive its called.

Sent from my LGMS769 using XDA Premium 4 mobile app

I'll have to check on Windows. I use Debian and OS X to do these things (which doesn't requires drivers), but since I needed Windows to flash the KDZs I have a computer available. I'll see if I can get past the LG screen soon!

BTW I have some builds that don't give Security Error, although they don't boot. If someone wants me to upload them to take a look, I can do it with no problem.
 

kuma82

Senior Member
Jan 19, 2012
1,783
941
Houston
more help

The instructions on extracting the stock boot.img is important. The .rc files are running commands and are looking for specific files to execute. For example this command is found in the init.rc for V10F (LGMS769)
Code:
service mdnsd /system/bin/mdnsd
    class main
    user mdnsr
    group inet net_raw
    socket mdnsd stream 0660 mdnsr inet
    disabled
    oneshot

Maybe the rom won't boot because it's missing an important command that required by the kernel.

I have noticed that not all service commands actually have a script to run.
For example in init.goldfish.rc
Code:
service qemu-props /system/bin/qemu-props
    class core
    user root
    group root
    oneshot

service qemud /system/bin/qemud
    socket qemud    stream 666
    oneshot
/system/bin/qemu-props
and
/system/bin/qemud
are not in the stock system.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 5
    Alright we have a CM9 for locked bootloader but we don't have CM10 and the people that want to help don't have a clue about where to begin.
    I really didn't want to make a new thread but so much stuff is scattered in several places on this subject, and I don't feel like jacking peoples thread to answer "how to stuff".

    artas182x already ported a 2nd-init (rom and recovery) for L9, so we just have to figure out the right settings to make CM10 boot.
    Please read this thread http://xdaforums.com/showthread.php?p=36706378


    The only CM10 I have so far is from markolino631 http://xdaforums.com/showthread.php?t=2313036
    ROM
    http://www.mediafire.com/download/fdka03ulxtxn1pg/cm-10-20130611-UNOFFICIAL-p760.zip


    One of the first things you will need to learn is how to make a boot.tar or recovery.tar for locked bootloader.


    How to make a boot.tar or recovery.tar

    Things you will need Linux OS or cygwin (for windows), osm0sis's mkbootimg (Android Kitchen has it all set and ready to go), and last but not least a brain ;)

    okay you want to make a boot.tar, well we first need to get our hands on the boot.img. So I'll just use a stock boot.img for this example, but we really need CM10 boot.img.

    I am using cygwin and Android Kitchen for this example.
    First navigate to advance options (#0) select number #12 (in advanced options) and select option "a"(Extract kernel+ramdisk from boot.img/recovery.img in any folder).
    Place the boot.img inside the new folder it specifies and hit enter. Afterwards you will have a "zImage" file and a "boot.img-ramdisk" folder.
    howtotar_zps80600521.jpg

    howtotar2_zpsbed4c577.jpg

    Note: the Kitchen will get rid of the boot.img (so don't place your only boot.img copy in that folder).
    Now exit the Kitchen (just press Ctrl+c) and navigate to the new folder with cygwin (shorten the folder name if you want, like I did in my example).
    Code:
    Kuma Family@KumaFamily-PC /home/Kuma/Kitchen
    $ [B]cd bootimg_stock/boot.img-ramdisk/[/B]

    Once in the "boot.img-ramdisk" folder we are all set to make the boot.tar
    However, lets check the permission on all the files in that folder.
    So type ls -ln and make a note of the permission for each file, without the proper permission it won't work for sure.
    Another thing, if using cygwin make sure you move a folder properly. If you just move a folder (with Window explorer) you may loss the correct permission for those files. However, if you just change the name of a file it doesn't effect the permissions. I'll try and elaborate some more later.
    howtotar3_zps94b28506.jpg


    Now type tar cvf boot.tar ./* and a new boot.tar will be created in that folder.

    Code:
    $ tar cvf boot.tar ./*
    ./charger
    ./data/
    ./default.prop
    ./dev/
    ./fota.rc
    ./init
    ./init.goldfish.rc
    ./init.lge.early.rc
    ./init.lge.rc
    ./init.lge.ril.rc
    ./init.lge.usb.rc
    ./init.lgep769board.rc
    ./init.post_boot.sh
    ./init.rc
    ./init.trace.rc
    ./init.u2.rc
    ./init.usb.rc
    ./lgdms.fota.rc
    ./lgdms.fota_update.rc
    ./proc/
    ./res/
    ./res/images/
    ./res/images/charger/
    ./res/images/charger/battery_0.png
    ./res/images/charger/battery_1.png
    ./res/images/charger/battery_2.png
    ./res/images/charger/battery_3.png
    ./res/images/charger/battery_4.png
    ./res/images/charger/battery_none.png
    ./res/images/charger/battery_overheat.png
    ./res/images/charger/battery_trickle_ani_01.png
    ./res/images/charger/battery_trickle_ani_02.png
    ./res/images/errorlogo.png
    ./sbin/
    ./sbin/adbd
    ./sbin/e2fsck_static
    ./sbin/lge_fota
    ./sbin/mke2fs_static
    ./sbin/resize2fs_static
    ./sbin/ueventd
    ./sbin/wallpaper
    ./sys/
    ./system/
    ./ueventd.goldfish.rc
    ./ueventd.lgep769board.rc
    ./ueventd.rc
    
    Kuma Family@KumaFamily-PC /home/Kuma/Kitchen/bootimg_stock/boot.img-ramdisk
    $
    howtotar4_zps4614f78b.jpg

    Once you made your boot.tar (and made the changes you wanted) you can place the boot.tar in the system (/system/bootstrap/) with the correct permissions
    Code:
    chmod 755 /system/bootstrap/boot.tar

    I already made a couple of recoveries and modified ram disk using this method.
    For recovery type tar cvf recovery.tar ./*


    I'll be posting some more stuff but i really have my hands full.
    4
    I've been experimenting with porting different versions of CM (10.1 and 11), AOKP and PacMan (so basically Android 4.3 and 4.4). Didn't got them booting, but the recoveries did work and didn't give a Security Error.

    Permissions in the files are important (the files you need to edit usally need 0755). You need to replace the boot.img of the ROM for the stock one and use the replaced boot.img to create a boot.tar. You also need to add a line to the updater-script that changes the permissions of the /system/bootstrap to 755, so the 2nd init script can access to them.

    You also need to replace the e2fsck in /system/bin (and add the e2fsck.bin, which is the original binary). The kernel executes e2fsck to check the file system at boot, so it's the perfect candidate to launch the 2nd init process (since the original kernel executes this binary always at boot).

    If you get the correct permissions in the files, the correct files replaced and edited, you may get past the Security Error. I'm now investigating why it hangs on the LG logo. I think I'm not building the boot.tar correctly, and that's why the 2nd init is unable to jump to it.
    2
    No progress, I recently took on a new position at the job and I need my phone for work.

    Sent from my LGMS769 using XDA Premium 4 mobile app

    Hello. I can help you. You can build cm-10.2 using my cm11 sources; https://github.com/artas182x?tab=repositories
    Use also kernel from my git (it is patched stock kernel). There will be bugs with sdcard and wifi but it should boot.
    2
    Hey Kuma, thanks so much for the guide. I'm getting stuck at the LG logo screen (before the boot animation). Obviously adbd is not getting started since I'm pretty sure my boot.tar is somehow wrong. Is it possible to still grab the logcats out of the device? I can still access the recovery (and replace it with different CWM for L9 versions). Thanks in advance.

    And it's not just a matter of replacing a file AFAIK. It involves a few more steps until you get at least past the Security Error. I didn't get any of my ports to boot the actual OS, but at least the recovery works.
    2
    Any progress with the port?

    Sorry I've been busy with work and family lately and I've had had much free time, plus I need my phone for work. I have been able to pull logcats. I'll upload what I have so far later.

    Sent from my LGMS769 using XDA Premium 4 mobile app