This is the method I use for my Ports. Of course, if bugs comes in your way, it's your responsibility to fix it
What you need:
Notepad++
WINRAR (Or some other archiving software)
A computer (Windows, Linux, or Mac)
Common Sense
I will be referring the Rom you're porting as "PORTED"
and your CM7/GB/Stock ROM as "BASE"
You must know if your Device is Armv7, Armv6, or Armv5. Your Base and Ported must be the same OEM!!Use any CM7/GB/Stock Rom as your BASE
See HERE to know which Device are which
If your BASE has problems, then your Port is gonna have the same problems.
You should already have a META-INF folder already in your BASE
First go into /system/app in your BASE and backup:
stk.apk
vpnservices.apk
camera.apk
bluetooth.apk
to whatever directory you like (Maybe to the Desktop)
Now Delete the folders from BASE and replace with PORTEDNow copy the backed up apps to your BASE in /system/app
/data
/system/app
/system/framework
/system/fonts
/system/media
Copy libandroid_runtime.so lib from PORTED to BASE in /system/lib
Without this file ROM may not boot.
Now go into etc folder (/system/etc) in BASE and open init.d folder--------Take a break for your eyes HERE-----------
Copy everything there and paste it into PORTED's /system/etc/init.d
Now in BASE, delete the init.d folder
And now in PORTED, copy the init.d folder to BASE's /system/etc
Ok. So far so good? Good.
--------Take a break for your eyes HERE-----------
Done? OK. Now go into etc folder (/system/etc) in BASE and open permissions folderNow open Notepad++ and open the build.prop in PORTED
Copy everything there and paste it into PORTED's /system/etc/permissions
Now in BASE, delete the permissions folder
And now in PORTED, copy the permissions folder to BASE's /system/etc
(This is to fix some permissions and Google Apps Problems)
Also open the build.prop in BASE, so now you have them side by side in the tabs
In PORTED, edit the build.prop to match with your device!
NOW This is very important!
Your
ro.build.description=
and
ro.build.fingerprint=
must be the same same as the build.prop in BASE!
If not, your Rom will not boot!
Save the Build.prop in PORTED and close NotePad++
In your BASE, head to:
\META-INF\com\google\android
Now open notepad++ again and open updater-script
Now in your PORTED, head to:
\META-INF\com\google\android
and open updater-script with notepad++
You should now have two updater-scripts side by side in notepad++'s tabs
Edit the BASE's updater-script to be like the PORTED's updater-script
Don't change any symlinks
Just change/edit/add permissions , ui_prints , asserts , run_programs , and installing the Kernel
-----THIS IS VERY IMPORTANT!------
In the updater-script of BASE, make sure the Format values are for your Device!!!
----------------------------------
Now make sure your Kernel is specifically for your Device
Also if your Device is not from the same manufacturer, then unpack the kernel and edit the BOOTCLASSPATH in init.rc
Copy the BOOTCLASSPATH from PORTED to BASE's init.rc and then repack Kernel
Ehhhh I think that's it
Now you can add your stuff or update some stuff/apps like Superuser and it's Binaries, Busybox, and more! Maybe add Beats Audio, XLoud, MegaBeatsBass?? Your Choice!!
Happy porting!!
0 comments:
Post a Comment