Jump to content

[REQ FOR HELP] How to port a ROM to the Liquid


Guest Andrea1Liquid

Recommended Posts

Guest koudelka
Thank you koud! Hope to become a dev like you! So I don't have to use the original rom's boot.img? I can use the img from (for example) your MIUI port? Thank you for the important tip :D So just have to use phh's boot.img, substitute liquid specific drivers in /system/... and the job should be done! Correct me if I'm wrong... Really proud to receive tips from koud (at least you didn't laugh of me :P ). I was also thinking: if we have to substitute the original boot.img with phh's one (whithout having to extract it and swap ramdisk and kernel with phh's) and substitute the drivers from other ROMS, could we use leaked froyo's boot.img and have full hardware using precompiled libraries from stock froyo? That would give us full hw, of course without OC and other cool goodies of a custom kernel. Until we wait for froyo sources to be leaked ehm ehm released (which I think will be better than eclair's) that wouldn't be so bad. Is it possible? Thanks... :D

The difference in prelinking also affects how they compile and map memory in the kernel, so you need to use phh kernel. I think it would be technically possible to build android from source using same prelink as Acer use, and get it working. I have tried but did not manage to get it to boot (although I did not spend much time with it). CM does not support the 2G prelinking that acer use, so for that and most other roms it is not an option.

Link to comment
Share on other sites

Guest Andrea1Liquid
The difference in prelinking also affects how they compile and map memory in the kernel, so you need to use phh kernel. I think it would be technically possible to build android from source using same prelink as Acer use, and get it working. I have tried but did not manage to get it to boot (although I did not spend much time with it). CM does not support the 2G prelinking that acer use, so for that and most other roms it is not an option.

Thank you. So:

-Substitute boot.img with MIUI's, CM6 etc...one Done

-Find what drivers were "touched" using the date of the last modification Done

-Pick those drivers and include them in the ROM Done

-Include /cache in the ROM Done

-Note them Done

-chroot /cache in update-script, add useful things and delete useless things from there Done

-pack all

-sign

-flash

-in case something goes wrong Dog (to not say G*d :P) logcat will help and possibly others in this topic

Edited by Andrea1Liquid
Link to comment
Share on other sites

Guest koudelka
Thank you. So:

-Substitute boot.img with MIUI's, CM6 etc...one

-Find what drivers were "touched" using the date of the last modification

-Pick those drivers and include them in the ROM

-Note them and insert them in the update-script (in case delete stuff we don't need or that doesn't work in Liquid)

-chroot /cache in update-script

-pack all

-sign

-flash

-in case something goes wrong Dog (to not say G*d :P) logcat will help and possibly others in this topic

well if you check how the update script looks for other roms, they usually just copy the system folder in the updatezip to /system so you dont need to individually add stuff... What I do is I take an update script that that is already done and I modify it to fit my specific needs (often I dont need to modify it since it does what i want already, copy system, boot.img, data and cache)

and I dont sign because I am lazy :D

Link to comment
Share on other sites

Guest Andrea1Liquid

Understood. Thank you :P. I just finished to note all the .so in /system/lib (no sub-folders yet) which has the date of this month. Most of them have date 15/10/10, but some has 03/10/10. The most recent file is dated 16/10/10, so I assume these are the files I need. Let me know if there are older files which I need, please...

Once the list is complete I'll share it if others find it useful. Once I boot onto the ROM with this drivers I will share them.

Edit: "noting" sub-folders I found out files related to lights and sensors of late September, added them because they're important. Reconsidering late September files...

Edit 2: finished noting /System/lib (with subfolders) with September and October files.

Edit 3: Finished "noting" useful files in the whole /System directory

Edited by Andrea1Liquid
Link to comment
Share on other sites

Guest grooltor
This is the most interesting thread I've seen here 'till now :P

++++++++++++++++++++++1

Especially for that god... cat (I'm italian too and I'm lolling like a fool :D (Mosconi presidente!))

Link to comment
Share on other sites

Guest koudelka
Understood. Thank you :P. I just finished to note all the .so in /system/lib (no sub-folders yet) which has the date of this month. Most of them have date 15/10/10, but some has 03/10/10. The most recent file is dated 16/10/10, so I assume these are the files I need. Let me know if there are older files which I need, please...

Once the list is complete I'll share it if others find it useful. Once I boot onto the ROM with this drivers I will share them.

Edit: "noting" sub-folders I found out files related to lights and sensors of late September, added them because they're important. Reconsidering late September files...

Edit 2: finished noting /System/lib (with subfolders) with September and October files.

Edit 3: Finished "noting" useful files in the whole /System directory

hmm I am not sure where you are looking but my guess would be that you are checking out miui 10.15. if you see in /system/lib you will notice most are dated 10.15 (hence miui 10.15, the build date) but some of them are not, those are (most likely) files that has been replaced by me or vache because the original ones from the official miui rom does not work with our device, or it could just be libs that are added like latinime libary.

Link to comment
Share on other sites

Guest Andrea1Liquid

Thanks koud :D I copied all .so in /system/lib and copied almost all other files in the folders (I obviously ignored /framework, /app etc..). I didn't include very old files and, with the knowledge of working and non working hardware, excluded some files. Found in System/bin or xbin (I don't remember) a script about the calibration of proximity sensor. Going to look at it :lol: Copied the boot.img. So, I extracted the files I need. I have some doubts tough but will see after boot what are the missing hw. Now I have to copy from stock the .so for leds (to have full leds like stock with good timing) and calib_prox_sensor (something like that :P) to hopefully have proximity sensor working. Btw, yes, I'm using MIUI.

P.S.: I didn't notice the number of MIUI was actually the release date. :lol: Btw, I'm intentionally sharing all my steps in order to let others to understand/try/fail/help each other. That's the difference from a Club and a Community: the knowledge is available for everyone.

Also happy this is an interesting topic. Admit it: I'm the pepper of this topic :lol: :D :D :P [joking :lol:]

Edited by Andrea1Liquid
Link to comment
Share on other sites

Guest Andrea1Liquid
++++++++++++++++++++++1

Especially for that god... cat (I'm italian too and I'm lolling like a fool :D (Mosconi presidente!))

Ahahah :P I think you definitively understood I like joking, ahahah :D

Link to comment
Share on other sites

Guest Andrea1Liquid

Used the LCR-Froyo to find if my list is correct. Added some files I ignored earlier. Now I should have 99% correct drivers. Having to choose a Froyo Sense ROM to port from the Nexus One.

Link to comment
Share on other sites

Used the LCR-Froyo to find if my list is correct. Added some files I ignored earlier. Now I should have 99% correct drivers. Having to choose a Froyo Sense ROM to port from the Nexus One.

Better to take a stock ROM as base instead of an already ported one.

Link to comment
Share on other sites

Guest Andrea1Liquid

Thank you, will do it in case the ROM doesn't boot. I'm tired of "searching" drivers :P

Edit: Chosen and downloaded DjDroid 1.6. Let's port :D

Edit 2: Swapped boot.img, included liquid specific drivers and scripts, /cache. I now have to edit the update-script.

Edited by Andrea1Liquid
Link to comment
Share on other sites

Guest Andrea1Liquid

I have a little bit of flu today. Going to develop this port further this morning :lol:

Edit: Stopped the developing of update-script because I noticed the /System folder was too big (around 200 mb) and wouldn't fit in Liquid's System partition. So I used Vache's Sense Port to cut some useless driver, but slimmed down /System only by 10 mb. So I decided to symlink /System/framework to the Data partition. In other words I stored /system/framework in /data (which has a lot of space) in order to "slim" the System partition. Rom will boot even if /system/framework is not in the system partition as I Symbolic Linked the folder, that means I created a link between the /framework folder in /data and /system folder, but remember that if you wipe all/factory reset in recovery the ROM won't boot anymore and you'll have to re flash it. To achieve this I wrote the following in the update-script (the interesting line is the one in bold):

...

...

format DATA:

copy_dir PACKAGE:data DATA:

symlink /data/frame SYSTEM:framework

set_perm_recursive 0 0 0777 0666 DATA:

...

...

/frame is the folder where I putted the files that originally was in /system/framework. Maybe someone finds it useful :lol: I was inspired (:P) by Vache's Sense Port's update-script (btw, great idea). At the end of the story System partition will be fully occupied (0,3 mb of free memory :D :lol: ) and data partition will have between 100 and 145 mb of free memory (that means around 100 mb for apps, but as I have not yet installed this ROM I can't be sure of this number). Going to continue working on update-script.

P.S.: of course the creators of the ROMs I used as example to do this port will receive the deserved credits: Koudelka for his very useful tips and his wonderful MIUI port that I used as a base for my porting "experience", Vache for his tip (I always accept and thank for a good tip, regardless of who gives it to me) and his Sense Port that was very useful and last, but not least (:P) Vache & Malez for their awesome LCR-Froyo (which I'm currently using) that gave me a more "stock" look (even if it's a ported ROM) at my driver's "treasure catch" (:D)...

Edit 2: Did a break. Btw, finished editing the update-script.

Edit 3: Packed, flashed. Gave error on symlinking /xbin/env. Correcting...:P

Edit 4: Found the error. I wrote the same line two times (stupid mistake :D)...Packed again, flashed correctly, now it's booting...

Edit 5: Noooo...Stuck at the android eating the icecream...Damn...

Edit 6: Found the error. I've symlinked only the files in xbin and not the files in bin. I confused myself...:lol:

Edit 7: Installation aborted: can't symlink /bin/reboot.

Edited by Andrea1Liquid
Link to comment
Share on other sites

I have a little bit of flu today. Going to develop this port further this morning :lol:

Edit: Stopped the developing of update-script because I noticed the /System folder was too big (around 200 mb) and wouldn't fit in Liquid's System partition. So I used Vache's Sense Port to cut some useless driver, but slimmed down /System only by 10 mb. So I decided to symlink /System/framework to the Data partition. In other words I stored /system/framework in /data (which has a lot of space) in order to "slim" the System partition. Rom will boot even if /system/framework is not in the system partition as I Symbolic Linked the folder, that means I created a link between the /framework folder in /data and /system folder, but remember that if you wipe all/factory reset in recovery the ROM won't boot anymore and you'll have to re flash it. To achieve this I wrote the following in the update-script (the interesting line is the one in bold):

...

...

format DATA:

copy_dir PACKAGE:data DATA:

symlink /data/frame SYSTEM:framework

set_perm_recursive 0 0 0777 0666 DATA:

...

...

/frame is the folder where I putted the files that originally was in /system/framework. Maybe someone finds it useful :lol: I was inspired (:P) by Vache's Sense Port's update-script (btw, great idea). At the end of the story System partition will be fully occupied (0,3 mb of free memory :D :lol: ) and data partition will have between 100 and 145 mb of free memory (that means around 100 mb for apps, but as I have not yet installed this ROM I can't be sure of this number). Going to continue working on update-script.

P.S.: of course the creators of the ROMs I used as example to do this port will receive the deserved credits: Koudelka for his very useful tips and his wonderful MIUI port that I used as a base for my porting "experience", Vache for his tip (I always accept and thank for a good tip, regardless of who gives it to me) and his Sense Port that was very useful and last, but not least (:P) Vache & Malez for their awesome LCR-Froyo (which I'm currently using) that gave me a more "stock" look (even if it's a ported ROM) at my driver's "treasure catch" (:D)...

Edit 2: Did a break. Btw, finished editing the update-script.

Edit 3: Packed, flashed. Gave error on symlinking /xbin/env. Correcting...:P

Edit 4: Found the error. I wrote the same line two times (stupid mistake :D)...Packed again, flashed correctly, now it's booting...

Edit 5: Noooo...Stuck at the android eating the icecream...Damn...

Edit 6: Found the error. I've symlinked only the files in xbin and not the files in bin. I confused myself...:lol:

Edit 7: Installation aborted: can't symlink /bin/reboot.

You should make use of the cache, since it is pretty use empty, like phh did. Gives you a lot of space to play with

Link to comment
Share on other sites

Guest Andrea1Liquid

Yes, you're right. Btw, I can't understand why I'm stuck at the froyo image...During the flashing of the latest packed version the recovery gave no error, but I'm stuck. I can't understand why... Will try to understand what is going on with logcat. :P

Edit: It continues to spit off this message:

D/AndroidRuntime( 193):

D/AndroidRuntime( 193): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<

D/AndroidRuntime( 193): CheckJNI is OFF

D/dalvikvm( 193): creating instr width table

D/AndroidRuntime( 193): --- registering native functions ---

E/JNIHelp ( 193): Native registration unable to find class 'android/hardware/fmradio/FmReceiverJNI'

Edited by Andrea1Liquid
Link to comment
Share on other sites

...

...

/frame is the folder where I putted the files that originally was in /system/framework. Maybe someone finds it useful :D I was inspired (:P) by Vache's Sense Port's update-script (btw, great idea). At the end of the story System partition will be fully occupied (0,3 mb of free memory :D :P ) and data partition will have between 100 and 145 mb of free memory (that means around 100 mb for apps, but as I have not yet installed this ROM I can't be sure of this number). Going to continue working on update-script.

Deodexing will take huge space during first boot if the ROM is deodexed.

Edit 7: Installation aborted: can't symlink /bin/reboot.

Remove the line in the update-script and keep the binary.

You should make use of the cache, since it is pretty use empty, like phh did. Gives you a lot of space to play with.

Since last Froyo leak, cache was strip down to 60Mo, not easier as before (98Mo) to use it.

Edited by vache
Link to comment
Share on other sites

Guest Andrea1Liquid
Deodexing will take huge space during first boot if the ROM is deodexed.

Remove the line in the update-script and keep the binary.

Since last Froyo leak, cache was strip down to 60Mo, not easier as before (98Mo) to use it.

Thanks Vache. I deleted the line and flashed and I got stuck with this message in logcat:

D/AndroidRuntime( 193):

D/AndroidRuntime( 193): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<

D/AndroidRuntime( 193): CheckJNI is OFF

D/dalvikvm( 193): creating instr width table

D/AndroidRuntime( 193): --- registering native functions ---

E/JNIHelp ( 193): Native registration unable to find class 'android/hardware/fmradio/FmReceiverJNI'

Have you any idea?

Link to comment
Share on other sites

Guest Andrea1Liquid

Hey I continued my research for the cause of the problem and maybe the answers is in the framework folder which I symlinked. The problem most probably is in the jar files that are present only in the framework folder. The fact that I symlinked this directory makes the theory much possible.

Edit: continued the searching. All the (few) traces I found take to /framework folder. What's the problem? I can't include the folder in System cause I don't have enough space...

Edit 2: Here's my update-script:

show_progress 0.1 0

format CACHE:

copy_dir PACKAGE:cache CACHE:

set_perm_recursive 0 0 0777 0666 CACHE:

set_perm 0 0 0777 CACHE:d/busybox

set_perm 0 0 0777 CACHE:d/system/bin/linker

set_perm 0 0 0777 CACHE:d/system/bin/sh

set_perm 0 0 0777 CACHE:d/system/bin/netcfg

set_perm 0 0 0777 CACHE:d/system/bin/rild

set_perm 0 0 0777 CACHE:d/system/bin/qmuxd

format SYSTEM:

copy_dir PACKAGE:system SYSTEM:

symlink busybox SYSTEM:xbin/[

...

...

set_perm 0 0 06755 SYSTEM:xbin/tcpdump

delete SYSTEM:bin/su

symlink /system/xbin/su SYSTEM:bin/su

format DATA:

copy_dir PACKAGE:data DATA:

symlink /data/frame SYSTEM:framework

set_perm_recursive 0 0 0777 0666 DATA:

run_program PACKAGE:delete-dalvik

run_program PACKAGE:clear-packages

symlink /cache/dalvik-cache DATA:dalvik-cache

show_progress 0.2 0

format BOOT:

write_raw_image PACKAGE:boot.img BOOT:

show_progress 0.2 10

Edit 3: What a stupid I am (:P). I finally found the problem: I didn't set the permission to the framework folder and that's why the ROM doesn't boot. Going to flash...

Edit 4: Fail...:D Wtf?

Edit 5: Uff... putted app and framework in /data. Copied DATA code from Vache's update-script to be sure, but nothing: FAIL. Same error code. Could someone download my ROM (I will upload it) and see what's wrong?

Edited by Andrea1Liquid
Link to comment
Share on other sites

Guest Andrea1Liquid

@ koudelka: Maybe I didn't understand what you meant with "chroot /cache". Can you explain? Btw, I'm redoing the port basing on your CM. Crossfingers :P

Link to comment
Share on other sites

@ koudelka: Maybe I didn't understand what you meant with "chroot /cache". Can you explain? Btw, I'm redoing the port basing on your CM. Crossfingers :P

I think he means that you need to change the apparent disk root directory to the /cache

Link to comment
Share on other sites

Guest Andrea1Liquid

Yes I understood, but I don't know how to do it in Android. I tried a super fast port, but it was waaaaaaaaaaaaaay worser than before.

Edited by Andrea1Liquid
Link to comment
Share on other sites

Guest Andrea1Liquid

I don't know what to do. This beast doesn't want to run, no matter how much I try :'(

Edit: tried an other time: nothing!

Edited by Andrea1Liquid
Link to comment
Share on other sites

Wich boot.img are you using ?

A Sense ROM need a modification in the BOOTCLASSPATH in the ramdisk to add some HTC jar's.

You can use the phhroyo boot or the one from my sense port, they have it.

You may keep framework on system and move only app to data. You should have enough space. (system is now 160Mo since last froyo leak)

Link to comment
Share on other sites

Guest Andrea1Liquid
Wich boot.img are you using ?

A Sense ROM need a modification in the BOOTCLASSPATH in the ramdisk to add some HTC jar's.

You can use the phhroyo boot or the one from my sense port, they have it.

You may keep framework on system and move only app to data. You should have enough space. (system is now 160Mo since last froyo leak)

Thanks! Downloading it as fast as I can :P

Edited by Andrea1Liquid
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.