Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,741,351 Members 39,059 Now Online
XDA Developers Android and Mobile Development Forum

[GUIDE] Porting rom to MDPI FROM MIUI AND HDPI [aroma tut coming soon]

Tip us?
 
sandy7
Old
(Last edited by sandy7; 7th October 2012 at 02:13 PM.)
#1  
sandy7's Avatar
Recognized Contributor / Recognized Developer - OP
Thanks Meter 6843
Posts: 6,181
Join Date: May 2012
Location: bangalore

 
DONATE TO ME
Post [GUIDE] Porting rom to MDPI FROM MIUI AND HDPI [aroma tut coming soon]

so here iam making a guide for ppl who wold like to port miui to xperia MDPI...noob friendly


soon ill make a guide for how to port HDPI rom to MDPI..

ill be tell u ppl how to make a miui rom with aroma installer...
and this how i port.

So lets start

STEP:-1
Things u need to before porting.
1.META-INF folder (iam giving my roms meta-inf folder.) http://www.mediafire.com/download.php?g2f3d233tkvteua
2.APKTOOL http://www.mediafire.com/download.php?ba8bqcf9lpfiu6mhttp://www.wuala.com/neroyoung/XDA%2...s/APKTool.rar/
3.APK MANAGER ICS http://www.mediafire.com/download.php?ba8bqcf9lpfiu6m
4.DEV FILES (giving my roms dev files) http://www.mediafire.com/download.php?z3onaugfr4nr65r
5.NOTE PAD++
6.WINRAR
7.BASE ROM OF ARC S FROM MIUIANDROID.com
8.BASE .587 ROM OF xperia MDPI (any one of mini pro,mini,lww,active)
9.PROPER KNOWLEDGE OF COMPILING AND DECOMPILING .
10.CALM MIND

STEP:-2
In system folder
From xperia mdpi .587 base rom
delete:
app
framework
fonts
media

open arc s miui rom archive with winrar and replace with those files above folders.DONT CLOSE ARCHIVE

now Open lib folder and copy some files from the arc s archive.
content-types.properties
liblbesec.so
liblocSDK_2.5OEM.so

Open etc Folder and copy some files from arc s archive

yellowpage.db
telocation.td

go to permissions folder in etc folder and add some files from arc s archive

miui-framework.xml
com.google.android.media.effects.xml
com.google.widevine.software.drm.xml
com.google.android.maps.xml


STEP:-3
Modifying build prop
change the underlined texts with notepad++ according to ur versions

Code:
Select Code
################# Updating of the SW Version #################
ro.semc.version.fs_revision=4.1.B.0.587
ro.build.id=4.1.B.0.587
ro.build.display.id=4.1.B.0.587

##### Values from product package metadata #####
ro.semc.product.model=SK17i
ro.semc.ms_type_id=AAD-3880097-AV
ro.semc.version.fs=WORLD-i
ro.semc.product.name=Xperia mini pro
ro.semc.product.device=SK17
ro.product.model=SK17i

# begin build properties
# autogenerated by buildinfo.sh
ro.build.version.incremental=2.9.29
ro.build.version.sdk=15
ro.build.version.codename=REL
ro.build.version.release=4.0.4
ro.build.type=user
ro.product.board=
ro.product.cpu.abi=armeabi-v7a
ro.product.cpu.abi2=armeabi
ro.product.manufacturer=Sony Ericsson
ro.product.locale.language=en
ro.product.locale.region=cn
persist.sys.timezone=Asia/Shanghai
ro.wifi.channels=
ro.board.platform=msm7x30
# ro.build.product is obsolete; use ro.product.device
# Do not try to parse ro.build.description or .fingerprint
ro.build.characteristics=default
# end build properties
#
# system.prop for mango

# ADDED BY BUILD SCRIPT 
ro.rommanager.developerid=miuiandroid
ro.modversion=MIUIAndroid-[U]2.9.29-EN-SK17i
STEP:-4
BUILD PROP TWEAKS

add thses to ur build prop ..

Code:
Select Code
# System props for audio
persist.audio.fluence.mode=endfire
persist.audio.vr.enable=false
persist.audio.hp=true

# System prop to select audio resampler quality
af.resampler.quality=255

# Miscellaneous Tweaks!
persist.sys.purgeable_assets=1
windowsmgr.max_events_per_sec=150

# Render UI with GPU
debug.sf.hw=1

# Battery Saving Tweak
ro.ril.disable.power.collapse=1
pm.sleep_mode=1
ro.mot.eri.losalert.delay=1000

# Fastest! 2G/3G/WiFi Settings
ro.ril.hsxpa=1
ro.ril.gprsclass=10
ro.ril.hep=1
ro.ril.enable.dtm=0
ro.ril.hsdpa.category=8 
ro.ril.enable.a53=1
ro.ril.enable.3g.prefix=1
ro.ril.htcmaskw1.bitmask=4294967295
ro.ril.htcmaskw1=14449
ro.ril.hsupa.category=6


# Other Tweaks
ro.kernel.android.checkjni=0
ro.max.fling_velocity=8000
video.accelerate.hw=1
Debug.performance.tuning=1
debug.composition.type=gpu
debug.composition.type=cpu
STEP:-5

Disabling auto brightness to make the leds to work.

1-decompile framework-res.apk
2-after decompiling goto res>values>bools.xml
3-u will see this line
Code:
Select Code
<bool name="config_automatic_brightness_available">true</bool>
4-change that 'true' to 'false'
5. recompile and put the file in system/framework folder.


BLACK BAR removing.
1-decompile MiuiSystemUI.apk
2-goto res>values> drawables.xml
3-delete this line
Code:
Select Code
<item type="drawable" name="notification_header_bg">#ff000000</item>
4-recompile it and paste it in system/app folder.

STEP:-6
Changing some things in meta-inf folder.
change the highlighted things according to ur rom
1-aroma config file


2-goto meta-inf>com>google>android>aroma>license
and write what every u want.


STEP:-7

Setting up folders.
so after doing all these
u should have these folder
META-INF
DEV
SYSTEM

make a zip of these folders...and ur done with the new miui rom


sorry for my bad presentation

CREDITS
Lens_flare (for giving idea how to do it)
jj doctor
The Following 43 Users Say Thank You to sandy7 For This Useful Post: [ Click to Expand ]
 
sandy7
Old
(Last edited by sandy7; 6th October 2012 at 06:20 PM.)
#2  
sandy7's Avatar
Recognized Contributor / Recognized Developer - OP
Thanks Meter 6843
Posts: 6,181
Join Date: May 2012
Location: bangalore

 
DONATE TO ME
GUIDE:-2

HOW TO COMPILE AND DECOMPILE


so 1st using apktool install these files by using this command..


framework-res.apk - apktool if framework-res.apk
framework-miui-res.apk - apktool if framework-miui-res.apk
SemcGenericUxpRes.apk - apktool if SemcGenericUxpRes.apk

once u done installing these 3 things.. close apktool.......

FRAMEWORK-RES
now download and install apk manager to ur c/ drive...
after installing u should have folders like this.




after that put apks in the folder named ' put apk's here for moding'
so u put framework-res.apk and miuisystemui.apk in that folder
like this



then open the script.
like this



after opening the script it will be like this



choose a project by pressing 22 and choose framework-res.apk



then decompile it by pressing 9

after in the project folder.
go to framework-res.apk >res>values>and open bools.xml in that change the auto brightness to false insted of true.



then recompile it by pressing 11 and it will ask for 'is it a system app' say yes there..

.

and it will also ask for 'copy original files that u have not modified.' say no there.



and do not sign the framework or systemui apk

so in the same folder ' put apks for modding u will find a file like this 'unsignedframework-res.apk' so rename it to framework-res and replace in the system/framework



so now framework is over..

SYSTEM UI
same way u decompile miuisystemui.apk

in that go to res>values> open drawables.xml and delete this line shown in down



after that recompile it by pressing 11
it will ask the same thing again 'is it a system app' say yes.



and 'do u want to copy original files that u have not modified' say yes.



and again a msg will popup like this



so for that a temp folder called 'keep' will be created in the inside apk manager ics folder in that delete this file shown in pic



and press enter
so recompiling is done with out any error...
now in the that 'put ur apks for moding' folder rename it to MiuiSystemUI and place it in the system/app

The Following 23 Users Say Thank You to sandy7 For This Useful Post: [ Click to Expand ]
 
sandy7
Old
(Last edited by sandy7; 7th October 2012 at 02:08 PM.)
#3  
sandy7's Avatar
Recognized Contributor / Recognized Developer - OP
Thanks Meter 6843
Posts: 6,181
Join Date: May 2012
Location: bangalore

 
DONATE TO ME
Arrow Hdpi to mdpi

GUIDE:-3


HOW TO PORT A ROM FROM HDPI TO MDPI
ONLY ICS ROMS

so lets start it.
things u need
1.META-INF folder http://www.mediafire.com/download.php?uv2vf7k7wlqh9vj
2.winrar
3.mdpi .587 base rom (ex: xperia mini pro)
4.Any HPDI rom u want to port (ex: xperia arc s)
5.Basic knowledge of system supporting files.
6.Notepad++
7.patients

So lets start.

Step 1

take a ARC S rom as a base and extract to a folder so that u will consists of all these folders.in the system folder.
and delete the red colored remarked folders.
Code:
Select Code
app
bin (replace with mdpi bin folder)
etc
fonts (replace with mini pro rom fonts folder)
framework
lib
media
semc
tts
usr (replace with mini pro rom usr. folder)
vendor
xbin

STEP 2.
coming to apps folder.
delete
SemcHdmiControlService.apk
and all the blot wares.
and add what every apks u want in ur rom..like themes etc

STEP:3

Coming to etc folder
open the mini pro rom acrhive
and replace with the following files

Code:
Select Code
/firmware (whole folder)
hw_config
media_profiles
pre_hw_config
sensors.conf
so done with etc folder.
Donot close the archive.


Now open lib folder
copy and replace the following files from mini pro archive
Code:
Select Code
camera files:-
libcameraextensionclient.so
libcameraextensionjni.so
libcameraextensionservice.so
libcameralight.so
libcameraservice.so
libcamera_clientsemc.so
libcald_pal.so
libcald_hal.so
libcald_server.so
liboemcamera.so
libbluedroid.so
libsurfaceflinger.so
libsurfaceflinger_client.so
libbluedroid.so

/hw (whole folder)
/modules (whole folder)

Delete -libhdmidisplay.so
Quote:
NOTE:
framework of an HDPI rom will work on MDPI rom no need to change it

STEP 4:
TWEAKS
for better performace i have added my roms tweaks....
http://www.mediafire.com/download.php?ve276m6x3xsr3p0
u can place these files in etc/init.d folder.

u can search xda for more tweaks..

STEP 5:-
Editing BUILD PROP.

change all the red marked values as per ur device.
change the ring defaults in blue marked field.
Code:
Select Code
##### Merging of the /util/data/semc_kernel_time_stamp.prop file #####
ro.build.date=Wed Jul 4 12:32:24 2012
ro.build.date.utc=1341397944
ro.build.user=BuildUser
ro.build.host=BuildHost

##### Final patch of properties #####
ro.build.product=MT15i
ro.build.description=MT15i-userdebug 4.0.4  UL5_3w test-keys

ro.product.brand=SEMC
ro.product.name=MT15i_1255-1755
ro.product.device=MT15i
ro.build.tags=release-keys
ro.build.fingerprint=SEMC/MT15i_1255-1755/MT15i:4.0.4/4.1.B.0.587/UL5_3w:user/release-keys




      ######################## Customized property values #########################
      
ro.semc.version.cust=1255-1755
ro.semc.version.cust_revision=R1I

      #########################################################################
      

ro.config.ringtone=Missing.ogg
ro.config.notification_sound=notification.ogg    
ro.config.alarm_alert=rise_up.ogg
ro.semc.content.number=PA3 

################# Updating of the SW Version #################
ro.semc.version.fs_revision=write any thing u want
ro.build.id=write any thing u want
ro.build.display.id=write any thing u want

##### Values from product package metadata #####
ro.semc.product.model=MT15i
ro.semc.ms_type_id=AAD-3880100-AV
ro.semc.version.fs=WORLD-i
ro.semc.product.name=Xperia Neo
ro.semc.product.device=MT15
ro.product.model=MT15i

# begin build properties
# autogenerated by buildinfo.sh
ro.build.version.incremental=UL5_3w
ro.build.version.sdk=15
ro.build.version.codename=REL
ro.build.version.release=4.0.4
ro.build.type=user
ro.product.board=
ro.product.cpu.abi=armeabi-v7a
ro.product.cpu.abi2=armeabi
ro.product.manufacturer=Sony Ericsson
ro.product.locale.language=en
ro.product.locale.region=US
ro.wifi.channels=
ro.board.platform=msm7x30
# ro.build.product is obsolete; use ro.product.device
# Do not try to parse ro.build.description or .fingerprint
ro.build.characteristics=default
# end build properties
#
# system.prop for hallon (change it 'mango')
#

# Notify the system that the RIL only signals once
ro.telephony.call_ring.multiple=false

rild.libpath=/system/lib/libril-qc-1.so
rild.libargs=-d /dev/smd0
persist.rild.nitz_plmn=
persist.rild.nitz_long_ons_0=
persist.rild.nitz_long_ons_1=
persist.rild.nitz_long_ons_2=
persist.rild.nitz_long_ons_3=
persist.rild.nitz_short_ons_0=
persist.rild.nitz_short_ons_1=
persist.rild.nitz_short_ons_2=
persist.rild.nitz_short_ons_3=
DEVICE_PROVISIONED=1

wifi.interface = wlan0
ro.semc.wifi.hostapd=1


ro.semc.sols.product-code=90
ro.semc.timescape_keys=Sony_Ericsson_Xperia

ro.semc.sols.company-code=5
persist.ro.ril.sms_sync_sending=1
ro.use_data_netmgrd=true

# Disable strict mode checking
persist.android.strictmode=0

# Constant values for Battery test in Service menu
ro.semc.batt.capacity=1500
ro.semc.batt.test.z_threshold=50
ro.semc.batt.test.min_level=70

ro.service.swiqi.supported=true
persist.service.swiqi.enable=1

#Default values/Locales for the hiding languages feature
ro.product.locale.excluded=ar_EG ar_IL fa_IR iw_IL


#
# ADDITIONAL_BUILD_PROPERTIES
#
ro.product-res-path=framework/SemcGenericUxpRes.apk
ro.com.google.gmsversion=4.0_r1
ro.com.google.clientidbase=android-sonyericsson
drm.service.enabled=true
keyguard.no_require_sim=true
ro.com.android.dateformat=MM-dd-yyyy
ro.com.android.dataroaming=false
ro.ril.hsxpa=1
ro.ril.gprsclass=10
ro.semc.xloud.supported=true
dalvik.vm.heapstartsize=5m
dalvik.vm.heapgrowthlimit=48m
dalvik.vm.heapsize=128m
ro.sf.lcd_density=240 (change it to 160)
ro.usb.pid_suffix=156
dalvik.vm.dexopt-flags=m=y
net.bt.name=Android
dalvik.vm.stack-trace-file=/data/anr/traces.txt
ro.drm.active.num=4
ro.drm.active.0=semc,1
ro.drm.active.1=cmla,0
ro.drm.active.2=viaccess,0
ro.drm.active.3=marlin,1
BUILD PROP TWEAKS.

add these lines at the end of build prop.
u can find more tweaks on xda

Code:
Select Code
# System props for audio
persist.audio.fluence.mode=endfire
persist.audio.vr.enable=false
persist.audio.hp=true

# System prop to select audio resampler quality
af.resampler.quality=255

# Miscellaneous Tweaks!
persist.sys.purgeable_assets=1
windowsmgr.max_events_per_sec=150

# Render UI with GPU
debug.sf.hw=1

# Battery Saving Tweak
ro.ril.disable.power.collapse=1
pm.sleep_mode=1
ro.mot.eri.losalert.delay=1000

# Fastest! 2G/3G/WiFi Settings
ro.ril.hsxpa=1
ro.ril.gprsclass=10
ro.ril.hep=1
ro.ril.enable.dtm=0
ro.ril.hsdpa.category=8 
ro.ril.enable.a53=1
ro.ril.enable.3g.prefix=1
ro.ril.htcmaskw1.bitmask=4294967295
ro.ril.htcmaskw1=14449
ro.ril.hsupa.category=6


# Other Tweaks
ro.kernel.android.checkjni=0
ro.max.fling_velocity=8000
video.accelerate.hw=1
Debug.performance.tuning=1
debug.composition.type=gpu
debug.composition.type=cpu
STEP:6
EDITING Updater script.

only add the red colored line if u are adding a data folder for supercharger. scripts.

Code:
Select Code
show_progress(0.1, 0);										
ui_print(" write any thing inside this");
ui_print(" Installation Started !");
format("MTD", "system");
format("MTD", "cache");
mount("MTD", "system", "/system");
mount("MTD", "userdata", "/data");
show_progress(1.2, 83);
package_extract_dir("system", "/system");
show_progress(0.14, 3);
package_extract_dir("data", "/data");
ui_print("");
set_progress(0.700000);
unmount("/system");
unmount("/data");
show_progress(1, 0);
ui_print("");
ui_print("reboot");
STEP 7

the Icons are of different size in HDPI....
what u have to do is resize it to 48x48 size by using MIR. or GMIP or windows image resize or Photoshop

so here is the list of particular png's u have to resize and replace it.

1st open a apk with winrar from the following folders bellow extract those png's do no close the archive resize it to 48x48 and replace it mdpi folder.

Code:
Select Code
browser -- mipmap-mdpi / ic_launcher_browser.png
calculator -- drawabe-hdpi / icon.png
google quick search box -- mipmap-mdpi / search_app_icon.png
phonebook -- drawable-mdpi / ic_launcher_contacts.png & ic_launcher_phone.png
semc calender -- drawable-mdpi / app_icon.png
semc clock -- drawable-mdpi / alarmclock.png
semc phone -- drawable-mdpi / clh_launcher_phone.png
settings -- mipmap-mdpi / ic_launcher_settings.png
torch -- drawable-mdpi/ you will find it.
talk -- drawable-mdpi / ic_launcher_google_talk.png
STEP 8

after doing all these
u should have these folders

make it a zip file name it.

so u have made a new rom ported from HPDI to MDPI

sorry for bad presentation ....ill edit this post in more understandable way soon
The Following 32 Users Say Thank You to sandy7 For This Useful Post: [ Click to Expand ]
 
mihahn
Old
(Last edited by mihahn; 6th October 2012 at 05:01 PM.)
#4  
mihahn's Avatar
Recognized Contributor
Thanks Meter 2159
Posts: 3,185
Join Date: May 2012
Very nice guide, but would be cool if you could show more screenshots, this would make the whole presentation better. Apart from this, it's very good

But maybe you could write something about porting kernels, because we need to port kernel, too. Otherwise the phone wouldn't boot, right?


Devices/Links/Information:
 

Device:Google Nexus 4 8gb
ROM:Stock Android 4.4.2 [KOT49H]

Device:Google Nexus 7 32gb
ROM:Stock Android 4.4.2 [KRT16O]

Device:Xperia Mini Pro SK17i
ROM: Super Jelly Bean 8.0
Kernel:nAa 2.6 [CWM]

Device:Raspberry Pi Model B
OS: Arch Linux

For a Rooting Guide for xperia 2011 devices, click me! | To unlock the Bootloader, click me! | How to install a custom kernel/rom? Click me | Super Jelly Bean 8.0 for xperia mdpi
 
sandy7
Old
#5  
sandy7's Avatar
Recognized Contributor / Recognized Developer - OP
Thanks Meter 6843
Posts: 6,181
Join Date: May 2012
Location: bangalore

 
DONATE TO ME
Quote:
Originally Posted by mihahn View Post
Very nice guide, but would be cool if you could show more screenshots, this would make the whole presentation better. Apart from this, it's very good

But maybe you could write something about porting kernels, because we need to port kernel, too. Otherwise the phone wouldn't boot, right?
thanks ill update the screen shots soon..

i never tried porting kernels....ill start it in this month....once iam done ill bring a guide for that also

edit: for making this miui rom u can use any ics kernels in development forums works fine.
The Following 3 Users Say Thank You to sandy7 For This Useful Post: [ Click to Expand ]
 
mihahn
Old
#6  
mihahn's Avatar
Recognized Contributor
Thanks Meter 2159
Posts: 3,185
Join Date: May 2012
Quote:
Originally Posted by sandy7 View Post
thanks ill update the screen shots soon..

i never tried porting kernels....ill start it in this month....once iam done ill bring a guide for that also

edit: for making this miui rom u can use any ics kernels in development forums works fine.
Okay great, because every rom I've tried to port needed it's own kernel

How about the updater-script? Could you maybe explain something about this; what we can change there, etc?


Devices/Links/Information:
 

Device:Google Nexus 4 8gb
ROM:Stock Android 4.4.2 [KOT49H]

Device:Google Nexus 7 32gb
ROM:Stock Android 4.4.2 [KRT16O]

Device:Xperia Mini Pro SK17i
ROM: Super Jelly Bean 8.0
Kernel:nAa 2.6 [CWM]

Device:Raspberry Pi Model B
OS: Arch Linux

For a Rooting Guide for xperia 2011 devices, click me! | To unlock the Bootloader, click me! | How to install a custom kernel/rom? Click me | Super Jelly Bean 8.0 for xperia mdpi
 
sandy7
Old
#7  
sandy7's Avatar
Recognized Contributor / Recognized Developer - OP
Thanks Meter 6843
Posts: 6,181
Join Date: May 2012
Location: bangalore

 
DONATE TO ME
Quote:
Originally Posted by mihahn View Post
Okay great, because every rom I've tried to port needed it's own kernel

How about the updater-script? Could you maybe explain something about this; what we can change there, etc?
just use my updater script attached in meta-inf folder...

bcz it would be easy for noobs..

edit: ok ill make update what all u need to change in updater script
The Following 3 Users Say Thank You to sandy7 For This Useful Post: [ Click to Expand ]
 
mihahn
Old
#8  
mihahn's Avatar
Recognized Contributor
Thanks Meter 2159
Posts: 3,185
Join Date: May 2012
Quote:
Originally Posted by sandy7 View Post
just use my updater script attached in meta-inf folder...

bcz it would be easy for noobs..

edit: ok ill make update what all u need to change in updater script
This would be great if you could tell us (maybe not in this tutorial, but maybe in another?) what we have to change to port updater-script, maybe even if we port from different manufactures?


Devices/Links/Information:
 

Device:Google Nexus 4 8gb
ROM:Stock Android 4.4.2 [KOT49H]

Device:Google Nexus 7 32gb
ROM:Stock Android 4.4.2 [KRT16O]

Device:Xperia Mini Pro SK17i
ROM: Super Jelly Bean 8.0
Kernel:nAa 2.6 [CWM]

Device:Raspberry Pi Model B
OS: Arch Linux

For a Rooting Guide for xperia 2011 devices, click me! | To unlock the Bootloader, click me! | How to install a custom kernel/rom? Click me | Super Jelly Bean 8.0 for xperia mdpi
 
sandy7
Old
#9  
sandy7's Avatar
Recognized Contributor / Recognized Developer - OP
Thanks Meter 6843
Posts: 6,181
Join Date: May 2012
Location: bangalore

 
DONATE TO ME
Quote:
Originally Posted by mihahn View Post
This would be great if you could tell us (maybe not in this tutorial, but maybe in another?) what we have to change to port updater-script, maybe even if we port from different manufactures?
ok iam thinking of pining this thread ...it will be help full for devs
The Following User Says Thank You to sandy7 For This Useful Post: [ Click to Expand ]
 
sandy7
Old
#10  
sandy7's Avatar
Recognized Contributor / Recognized Developer - OP
Thanks Meter 6843
Posts: 6,181
Join Date: May 2012
Location: bangalore

 
DONATE TO ME
Arrow guide 2

updated the guide for decompiling recompiling files.

The Following 4 Users Say Thank You to sandy7 For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes