Related
Lets discuss about ROM port guidance for dummies like me. Hope it will help others also who want to port it.
Here is my experience for porting several MIUI in my phone, shall other to make it perfect.
First we must have a source rom to port. Desire HD is my chosen since it has some similar hardware.
I replace the source rom using several files from the previous working MIUI rom.
I never mix framework with any other files from previous miui version, I just patch framework.jar and services.jar (decompile and recompile). And for system app files I let them as is, except for torch.apk taken from 1.11.11 and systemUI.apk with manual patch (decompile and recompile).
I use the same driver modules files in every my port (wifi, sensor, light, gps), the rest drivers are compiled in the kernel so we can't touch them except if we can build from source. I use almost the same library in every port. ( You can see the same files from my 2.2.3 and my 2.3.9)
The other files are came from the source dhd rom and additional apps taken from other rom or any mod as long as they're not accessing the hardware directly.
And for the kernel, lately I use SDKernel and mOCK kernel. I've modified both boot image of them. At 2.3.9 as you knew, I use modded SDKernel, I've change default cpu clock and also bringing up the fm radio service in it. And for my current miui (2.3.16) I'm using mOCK kernel, I've change the default cpu clock also, but not bringing up fm service (since I've not succeded yet using FM radio).
Here are some files I don't use from source rom (replace by following files):
- Torch.apk
- hciattach
- netd
- wpa_supplicant
- liba2dp
- libc****
- libcamera
- libcamera_service
- libffmpeg
- libgemini
- libhardware_legacy
- libmmipl
- libmmjpeg
- liboemcamera
- libril
- librpc
- libskia
- libwebcore
- vold
- vold.stab
- btwlancoex
- compassd
- geomagneticd
hci_qcomm_init
hostapd
hostapd_cli
lightd
load_wifi
modempre
netmgrd
nt_password_hash
oem_rpc_svc
orientationd
port-bridge
proximityd
pwgen
qmuxd
rmt_oeminfo
zipalign
all files from system/etc/firmware/wlan
some files in init.d script, I use just hostapd, tweak sdcard read and zipalign. The rest setting I let the default config.
init.qcom.xxx
loca_parameter.ini
wpa_supplicant.conf
all files from /system/lib/hw and /system/lib/modules from previous port ( taken from 1.11.11 and triumph if I'm not wrong... not exactly remembered)
libaudio***
libauth
libcm
libcommondefs
libdiag
libdll
libdsi_netctrl
libdsm
libdsmutils
libgsd**
libidl
libloc***
libmmgsdilib
libnetmgr
libnv
liboem_rapi
liboncrpc
libOpenVG
libpbmlib
libposteffect
libqdp
libqmi
libqueue
libreference-ril
libril***
libwms**
and also all file in /system/usr/keychars and /system/usr/keylayout
If I'll change kernel, then I'll change wifi lib also which work with it.
And add some addons... not related to the core.
wpa_supplicant.conf, gps.conf, build.prop are changed as needed
I think those files are sufficient to make a new port...
Tools to decompile and recompile apk and jar files is apktool, you can use apkmultitool from apkmultitool.com.
How to fix headset:
Decompile services.jar, use this command line;
apktool d services.jar
You'll find services.jar.out folder as output. Find HeadsetObserver.smali file and replace any "h2w" word with "headset_sensor". Use notepad++ to do it. And recompile using this command line:
apktool b services.jar.out
Find the new compiled file at services.jar.out/dist folder.
How to fix native wifi tether and haptic feedback:
The file need to modify is framework-res.apk. You can do the same to decompile and recompile just like fixing headset. Decompile the file and find array.xml in framework-res.out/res/values. Find "wl.0" replace with "softap.*". You'll easily find the level values pattern for haptic feedback in the same file. The pattern values is "off,on,off,on" format to turn off and turn on vibrate in milisecond. Recompile again.
The new compiled file can not be used yet, you should restore the META-INF folder and AndroidManifest file from the original framework-res.apk file. Use 7zip application to open both old and new framework-res.apk and drag META-INF folder and AndroidManifest file to the new compiled framework-res.apk then it ready to use.
Happy porting......!!!
I'll update this post if there are some more useful...
Any suggestion are welcome...
Thank you very much for this. Will surely help newbies like me
FR... I got an idea... if there is an app which will do just like your future release miui kitchen BUT it run in device, so it will have an OTA update, how cool....! I want to help to port it to an android app (apk file), but I just only have several hours in a week for this fun.
I have already scripted what you have written in the first post.
What needs to be done with the framework files?
Free Radical said:
I have already scripted what you have written in the first post.
What needs to be done with the framework files?
Click to expand...
Click to collapse
I think we have to let the original theme and standard apps, the customization is optional due to different need of users. (For example you and me could be like beat audio or maybe not).
For the headset, you have to decompile service.jar, open headsetobserver.smali (i forgot for the exactly name) and change every "h2w" word to "headset_sensor" then recompile, then headset will work.
Sent from my CSL-MI410 with my MIUI 2.3.16 using tapatalk
The kitchen app shall be ready in a day or two.
Shall experiment later when I return home.
Btw, what to change in the framework folder?
Also, you need to mention in your guide that the proprietary hw, keylayout,keychar, module files need to be preserved.
I have pmed zuk regarding his set of proprietary fih/fb0 files so that we can make a skeleton framework to be used for cooking every Rom.
Sent from my Spice MI-410 on my rom!
Free Radical said:
The kitchen app shall be ready in a day or two.
Shall experiment later when I return home.
Btw, what to change in the framework folder?
Also, you need to mention in your guide that the proprietary hw, keylayout,keychar, module files need to be preserved.
I have pmed zuk regarding his set of proprietary fih/fb0 files so that we can make a skeleton framework to be used for cooking every Rom.
Sent from my Spice MI-410 on my rom!
Click to expand...
Click to collapse
Service.jar is in framework folder FR. My prev post mention the change of this file.
Yes, any files in hw,modules,keychar and keylayout folder at the source rom should be deleted and replaced by files from the working rom.
The skeleton for other rom willbe different. You have to make different folder for skeleton files for different rom. Several are the same files, but separating them will make you easier to manage. So the list file names is not too important, just put them in the folder will be enough. Sorry .... Just my though...
Sent from my CSL-MI410 with my MIUI 2.3.16 using tapatalk
AND LADIES & GENTLEMEN... WE HAVE LIFT OFF!!!!!!!!!!!
REJOICE.
I have made an automatic miui rom porter.
I am calling the app F-CuK-R
Thank you CK, edowar, zuk and elol.
Just booted up 2.3.16 successfully. Ported using my app (Testing the rom it churned out. I am hoping native wifi tethering is fixed)
Shall upload after midnight.
Now we can have MIUI GB release the same day after every official release
Although I must confess a lot of the files I am using are missing in this post.
but fear not, I shall make them public as soon as the app is ready for prime time with a nice gui.
Made the list after several failed experiments over the last week. Finally a simple file comparison (using a script I made) between the official MIUI release and the original 1.11.11 release helped.
Free Radical said:
AND LADIES & GENTLEMEN... WE HAVE LIFT OFF!!!!!!!!!!!
REJOICE.
I have made an automatic miui rom porter.
I am calling the app F-CuK-R
Thank you CK, edowar and zuk.
Just booted up 2.3.16 successfully. Ported using my app (Testing the rom it churned out.)
Shall upload after midnight.
Now we can have MIUI GB release the same day after every official release
Although I must confess a lot of the files I am using are missing in this post.
but fear not, I shall make them public as soon as the app is ready for prime time with a nice gui.
Made the list after several failed experiments over the last week. Finally a simple file comparison (using a script I made) between the official MIUI release and the original 1.11.11 release helped.
Click to expand...
Click to collapse
Greaattt FR... Can't wait to taste it....!!!!
Sent from my CSL-MI410 with my MIUI 2.3.16 using tapatalk
I guess I spoke too soon.
My port again has an issue with the headset. :sigh: back to the drawing board
sorry FR, for not replying for your PM. I was away for internet for some time...!!
You have already done a really Good job. I should say, really quick...!!
This will real Good deal for MIUI lover's.
Good Luck...!!
Can someone enumerate changes to be done to systemUI, android.policy, framework.jar and framework-res in different mods so that I can script them for my cooker?
Sent from my Spice MI-410 on my MIUI 2.3.16 port
CacingKalung said:
Lets discuss about ROM port guidance for dummies like me. Hope it will help others also who want to port it.
Here is my experience for porting several MIUI in my phone, shall other to make it perfect.
First we must have a source rom to port. Desire HD is my chosen since it has some similar hardware.
I replace the source rom using several files from the previous working MIUI rom.
I never mix framework with any other files from previous miui version, I just patch framework.jar and services.jar (decompile and recompile). And for system app files I let them as is, except for torch.apk taken from 1.11.11 and systemUI.apk with manual patch (decompile and recompile).
I use the same driver modules files in every my port (wifi, sensor, light, gps), the rest drivers are compiled in the kernel so we can't touch them except if we can build from source. I use almost the same library in every port. ( You can see the same files from my 2.2.3 and my 2.3.9)
The other files are came from the source dhd rom and additional apps taken from other rom or any mod as long as they're not accessing the hardware directly.
And for the kernel, lately I use SDKernel and mOCK kernel. I've modified both boot image of them. At 2.3.9 as you knew, I use modded SDKernel, I've change default cpu clock and also bringing up the fm radio service in it. And for my current miui (2.3.16) I'm using mOCK kernel, I've change the default cpu clock also, but not bringing up fm service (since I've not succeded yet using FM radio).
Here are some files I don't use from source rom (replace by following files):
- Torch.apk
- hciattach
- netd
- wpa_supplicant
- liba2dp
- libc****
- libcamera
- libcamera_service
- libffmpeg
- libgemini
- libhardware_legacy
- libmmipl
- libmmjpeg
- liboemcamera
- libril
- librpc
- libskia
- libwebcore
- vold
- vold.stab
- btwlancoex
- compassd
- geomagneticd
hci_qcomm_init
hostapd
hostapd_cli
lightd
load_wifi
modempre
netmgrd
nt_password_hash
oem_rpc_svc
orientationd
port-bridge
proximityd
pwgen
qmuxd
rmt_oeminfo
zipalign
all files from system/etc/firmware/wlan
some files in init.d script, I use just hostapd, tweak sdcard read and zipalign. The rest setting I let the default config.
init.qcom.xxx
loca_parameter.ini
wpa_supplicant.conf
all files from /system/lib/hw and /system/lib/modules from previous port ( taken from 1.11.11 and triumph if I'm not wrong... not exactly remembered)
libaudio***
libauth
libcm
libcommondefs
libdiag
libdll
libdsi_netctrl
libdsm
libdsmutils
libgsd**
libidl
libloc***
libmmgsdilib
libnetmgr
libnv
liboem_rapi
liboncrpc
libOpenVG
libpbmlib
libposteffect
libqdp
libqmi
libqueue
libreference-ril
libril***
libwms**
and also all file in /system/usr/keychars and /system/usr/keylayout
If I'll change kernel, then I'll change wifi lib also which work with it.
And add some addons... not related to the core.
wpa_supplicant.conf, gps.conf, build.prop are changed as needed
I think those files are sufficient to make a new port...
I'll update this post if there are some more useful...
Any suggestion are welcome...
Click to expand...
Click to collapse
How do you decompile and recompile service.jar n framwork.jar???
nitin1978 said:
How do you decompile and recompile service.jar n framwork.jar???
Click to expand...
Click to collapse
I have added how to fix the headset, haptic feedback and native wifi tether at the first post including how to decompile and recompile files.
Happy porting....!!!
Sent from my CSL-MI410 using Tapatalk
thanks bro...
In this Guide I Will teach you How to Port (almost) Any ROM to our HTC Tattoo (might work with every Phone)
Note:
The ROM which you are porting from will be referred to at PORT
The ROM to which you will make changes will be referred to as BASE
1. Delete system/app from the BASE and add the system/app from PORT to the BASE
2. Open system/bin in both and add the extra files from PORT to BASE (TIP : Easy way would be copy all the files from BASE to PORT , delete the ones in BASE and copy the ones in PORT)
3. Open system/etc in both...dont touch the folders in both...add the extra other files from PORT to BASE(PS : again the tip in step two can be used here )
4. Delete system/framework in BASE and add the system/framework from PORT To BASE
5. Open system/lib in both....add the extra .so files from PORT to BASE (PS : Use the tip from step two)
6. Delete system/media from BASE and add from system/media from PORT to BASE
7. Now open system/xbin in both...add the extra files from PORT to BASE (PS : Use the tip from step two)
8. Make Changes to build.prop and rename the .zip of BASE
9. Best of luck
REMEMBER at the end of this the BASE will be the ROM you are making!!!!
Also Remember try to use a PORT which has a screen resolution close to your device so that you dont have to resize.
Also this will not guarantee a fully functional build..though sometimes if you are in luck you may get a fully functional one
Reserved
Is this how you port your ROM's?
armands64 said:
Is this how you port your ROM's?
Click to expand...
Click to collapse
Yes..the current two roms i have made i used this...also, of course resizing to had to be done
deba1994 said:
In this Guide I Will teach you How to Port (almost) Any ROM to our HTC Tattoo (might work with every Phone)
Note:
The ROM which you are porting from will be referred to at PORT
The ROM to which you will make changes will be referred to as BASE
1. Delete system/app from the BASE and add the system/app from PORT to the BASE
2. Open system/bin in both and add the extra files from PORT to BASE (TIP : Easy way would be copy all the files from BASE to PORT , delete the ones in BASE and copy the ones in PORT)
3. Open system/etc in both...dont touch the folders in both...add the extra other files from PORT to BASE(PS : again the tip in step two can be used here )
4. Delete system/framework in BASE and add the system/framework from PORT To BASE
5. Open system/lib in both....add the extra .so files from PORT to BASE (PS : Use the tip from step two)
6. Delete system/media from BASE and add from system/media from PORT to BASE
7. Now open system/xbin in both...add the extra files from PORT to BASE (PS : Use the tip from step two)
8. Make Changes to build.prop and rename the .zip of BASE
9. Best of luck
REMEMBER at the end of this the BASE will be the ROM you are making!!!!
Also Remember try to use a PORT which has a screen resolution close to your device so that you dont have to resize.
Also this will not guarantee a fully functional build..though sometimes if you are in luck you may get a fully functional one
Click to expand...
Click to collapse
can please elaborate a little more about the build prop and its changes.
It want to try this thing for my own use and I had seen your CM7 modded with i style look and I need to port that on my wildfire.
So I understand everything but the build prop. where should I get that
Hi tanmay.sharma
It depends on the ROM
still , I'll give u examples
1. Porting say MIUI with CM7 as base
Change these lines
ro.build.version.incremental=eng.jenkins.20120615.144321
ro.config.ringtone=Playa.ogg
ro.config.notification_sound=regulus.ogg
ro.config.alarm_alert=Alarm_Beep_03.ogg
ro.modversion=CyanogenMod-7.2.0
TO
ro.build.version.incremental=Release 2.1
ro.config.ringtone=MI.ogg
ro.config.notification_sound=FadeIn.ogg
ro.config.alarm_alert=GoodMorning.ogg
ro.modversion=Click MIUIv3
2. If porting another device rom, like i ported SEMC rom from X10 MINI
You will have to change these lines to the device u porting from like in this case X10 Mini
ro.product.brand=SEMC
ro.product.name=E10i_1254-2716
ro.product.device=E10i
ro.product.manufacturer=Sony Ericsson
and add more extra manufacturer lines!!!
Hope it helps
if more help needed feel free to ask!
Cannot understend
deba1994 said:
In this Guide I Will teach you How to Port (almost) Any ROM to our HTC Tattoo (might work with every Phone)
Note:
The ROM which you are porting from will be referred to at PORT
The ROM to which you will make changes will be referred to as BASE
1. Delete system/app from the BASE and add the system/app from PORT to the BASE
2. Open system/bin in both and add the extra files from PORT to BASE (TIP : Easy way would be copy all the files from BASE to PORT , delete the ones in BASE and copy the ones in PORT)
3. Open system/etc in both...dont touch the folders in both...add the extra other files from PORT to BASE(PS : again the tip in step two can be used here )
4. Delete system/framework in BASE and add the system/framework from PORT To BASE
5. Open system/lib in both....add the extra .so files from PORT to BASE (PS : Use the tip from step two)
6. Delete system/media from BASE and add from system/media from PORT to BASE
7. Now open system/xbin in both...add the extra files from PORT to BASE (PS : Use the tip from step two)
8. Make Changes to build.prop and rename the .zip of BASE
9. Best of luck
REMEMBER at the end of this the BASE will be the ROM you are making!!!!
Also Remember try to use a PORT which has a screen resolution close to your device so that you dont have to resize.
Also this will not guarantee a fully functional build..though sometimes if you are in luck you may get a fully functional one
Click to expand...
Click to collapse
Dear
i cannot understand that how we change the port.
This procedure work with the help of adb shell or other method
sorry for stupid question. I am not dev or proff.
thanks
desiboyz said:
Dear
i cannot understand that how we change the port.
This procedure work with the help of adb shell or other method
sorry for stupid question. I am not dev or proff.
thanks
Click to expand...
Click to collapse
Nope ..no shell needed ...gets the zips of both the rooms on your comp ...unpack using your favourite file manager (eg. WinRAR) ...do all the steps and repack..transfer to your phone.. flash it on your phone ..cross your fingers
Remember.. this doesn't always guarantee a perfect port.. there maybe some bugs!!
Sent from my Tattoo using xda app-developers app
I did this and it worked but its the old rom not the ported one that I wanted -_-
im port cm9.1 latest stable,,,its very good ,,,fast,,smooth too,,,but auto dim isnt not working,,,how to get it working???
great man.
auto brightness not working may be sensor files are missing, I noticed same issue in cm10 by rcset.
elol we need you for solving this
ryan just upload your ROM please
not worried much about auto brightness
reversegear said:
great man.
auto brightness not working may be sensor files are missing, I noticed same issue in cm10 by rcset.
elol we need you for solving this
ryan just upload your ROM please
not worried much about auto brightness
Click to expand...
Click to collapse
my connection is very slow for upload bro,,,but u can try this alone,,its easy,,,,just go to cynanogen site,,,download latest cm 9.1 for xperia arc(anzu) or latest nightly,,,,,next follow my tutorial above,,,take file from cm9 rc2 by rcset
META-INF - delete and replace all folder
edit build.prop or replace
replace boot.img
system/bin - replace and add dif files
applypatch
btwlancoex
geomagneticd
hci_qcomm_init
hlr_auc_gw
hostapd
hostapd_cli
lightd
nt_password_hash
orientationd
port-bridge
proximityd
recovery
rild
rmt_storage
vold
wpa_supplicant
system/etc
firmware - delete and replace all folder
permissions - delete and replace all folder
- add or replace
init.qcom.bt.sh
init.qcom.fm.sh
init.qcom.sdio.sh
init.qcom.wifi.sh
loc_parameter.ini
vold.fstab
system/framework
framework-res.apk - mod vibrate
services.jar - fix headset
system/lib - add or replace
libandroid_runtime.so
libcamera.so
libcamera_client.so
libcm.so
libgps.so
libhardware_legacy.so
libmmjpeg.so
liboemcamera.so
libril.so
libril-qc-1.so
- and add all dif files from base work
system/lib/hw - add
camera.fb0.so
gps.fb0.so
lights.fb0.so
sensors.fb0.so
system/lib/modules - delete and replace all folder
system/usr - replace all folder
idc
keychars
keylayout
its tutorial from rcset,,,if you follow this,,im guarantee you will be sucsess...keep spirit
From what device ROM you have ported??I use crespo device,but failed,stuck on splash.img
Sent from my Spice Mi-410 using Tapatalk 2
Arya_3RDNumber said:
From what device ROM you have ported??I use crespo device,but failed,stuck on splash.img
Sent from my Spice Mi-410 using Tapatalk 2
Click to expand...
Click to collapse
try change libhardware_legacy.so cm9 mtdev latest or take from my ported IceColdSandwicth V8.7....use rom htc Sensation ''pryamid'' base rom to need porting rom cm9,it will easy you..
---------- Post added at 03:18 PM ---------- Previous post was at 03:17 PM ----------
ryanroxx said:
my connection is very slow for upload bro,,,but u can try this alone,,its easy,,,,just go to cynanogen site,,,download latest cm 9.1 for xperia arc(anzu) or latest nightly,,,,,next follow my tutorial above,,,take file from cm9 rc2 by rcset
META-INF - delete and replace all folder
edit build.prop or replace
replace boot.img
system/bin - replace and add dif files
applypatch
btwlancoex
geomagneticd
hci_qcomm_init
hlr_auc_gw
hostapd
hostapd_cli
lightd
nt_password_hash
orientationd
port-bridge
proximityd
recovery
rild
rmt_storage
vold
wpa_supplicant
system/etc
firmware - delete and replace all folder
permissions - delete and replace all folder
- add or replace
init.qcom.bt.sh
init.qcom.fm.sh
init.qcom.sdio.sh
init.qcom.wifi.sh
loc_parameter.ini
vold.fstab
system/framework
framework-res.apk - mod vibrate
services.jar - fix headset
system/lib - add or replace
libandroid_runtime.so
libcamera.so
libcamera_client.so
libcm.so
libgps.so
libhardware_legacy.so
libmmjpeg.so
liboemcamera.so
libril.so
libril-qc-1.so
- and add all dif files from base work
system/lib/hw - add
camera.fb0.so
gps.fb0.so
lights.fb0.so
sensors.fb0.so
system/lib/modules - delete and replace all folder
system/usr - replace all folder
idc
keychars
keylayout
its tutorial from rcset,,,if you follow this,,im guarantee you will be sucsess...keep spirit
Click to expand...
Click to collapse
if you use base ''anzu'' you will not get unmount and mount usb working..
Arya_3RDNumber said:
From what device ROM you have ported??I use crespo device,but failed,stuck on splash.img
Sent from my Spice Mi-410 using Tapatalk 2
Click to expand...
Click to collapse
im take base from xperia arc,,i think ist better because have same gpu
elol said:
try change libhardware_legacy.so cm9 mtdev latest or take from my ported IceColdSandwicth V8.7....use rom htc Sensation ''pryamid'' base rom to need porting rom cm9,it will easy you..
---------- Post added at 03:18 PM ---------- Previous post was at 03:17 PM ----------
if you use base ''anzu'' you will not get unmount and mount usb working..
Click to expand...
Click to collapse
do you mean mount usb on cwm????i dont test it,,but usb storage its working good,,,
buy hey elol,,very nice to see u in fb0 thread,,:good:
elol can u teach me,,how to get auto dim working??
you need complie framework-res.apk then open array.xml compare framework fb0 ics with framework what do you want to porting
oh ...
Sent from my SH8188U using xda premium
hi guys, after a lots of trying I finally fix my gps on BAKED Blackbean ROM.
I explain what I've done.
I put "gps.legend.so" (View attachment gps.legend.so.zip) taken from "cm-7-20130301-NIGHTLY-legend" into system/lib/hw folder and replace.
Set permissions to rw-r--r--
Restart
Probably it works also on zeubea's cm9-10
THIS IS NOT A FLASHABLE ZIP. EXTRACT "gps.legend.so" and put into system/lib/hw folder using a file manager (e.g. Root explorer)
I hope you appreciate
sorry for my bad english
please report if it works with your device, thank you
Hi please can anybody help:
So I decompiled the framework-res.apk with apk-tool and did some changes in res/values/arrays ...when I compiled everything this probleme was coming: In the original framework-res.apk all values folders are hidden, in my re-compiled ones they are there
I tried to flash the rom - bootloop ... can anybody teach me right compiling of the framework-res.apk?
Thank you
Flo0008 said:
Hi please can anybody help:
So I decompiled the framework-res.apk with apk-tool and did some changes in res/values/arrays ...when I compiled everything this probleme was coming: In the original framework-res.apk all values folders are hidden, in my re-compiled ones they are there
I tried to flash the rom - bootloop ... can anybody teach me right compiling of the framework-res.apk?
Thank you
Click to expand...
Click to collapse
Take Meta-inf folder from original apk and copy it to new one. Open apks with 7zip or winrar. And I think that you need to copy AndroidManifest too.
Sent from my GT-I9070 using Tapatalk