30 October 2014

Porting To Mediatek Device

Source: Written by Xtreme Ornob

Official Developer of XVipre™


Tutorial:

ONLY FOR MEDIATEK SoCs
In This Guide You'll Learn..
How to Port ROMs of the Same CPU
And Also..
HOW TO PORT ROM FROM A DIFFERENT SoC
Works for-

MT6589 to MT6577
MT6582 to MT6572
MT6577 to MT6575
Only ICS to ICS & JB to JB
May also work with 4.1 to 4.2
No Need of Source Code

No Need of Kernel Source

No Need of **ANDROID KITCHEN

No Need of LINUX...

Requirements:
* A Brain
* Patience
* Windows XP/7/8
* 7-Zip
* Notepad++
* Bootimg Unpack/Repack Tools for Windows!
* Stock ROM
* And a Little Respect!!

So now Lets Begin...
PORTING For Same SoCs ( Ex: MT6572 to MT6572)
* Replace these from your Stock ROM to the ROM u want to PORT!! Lets Call it "PORT"
FILE LIST FOR REPLACING:

Code:
 *system/vendor
 *system/usr
 *system/lib/modules
 *system/lib/hw
 *system/lib/libncurses.so
 *system/etc/firmware
 *system/etc/vold.fstab
 *system/etc/vold.fstab.nand
 *system/etc/bluetooth
For Fixing Problems...

Code:
 *system/etc/permissions
 *system/etc/security
 *system/etc/audio
 *system/etc/wifi
 *system/lib/drm
 *system/lisystem/lib/soundfx
* Now Replace the Stock Boot.img to Port ROM!
* Now Open The Port ROM folder and go to META-INF/google/android and open updater-script in Notepad++
* Do the same for the Stock ROM
* Now In the Port ROM's Updater Script, find a line that starts with this...
format(".......
and only replace the mmcblk0p.. with the stock one!
* Do the same for this line...
mount("...

Example:
This is the PORT one!!!

Code:
 format("ext4", "EMMC", "/dev/block/mmcblk0p5", "0", "/system");
 mount("ext4", "EMMC", "/dev/block/mmcblk0p5", "/system");
This is the Stock one!!

Code:
 format("ext4", "EMMC", "/dev/block/mmcblk0p3", "/system");
 mount("ext4", "EMMC", "/dev/block/mmcblk0p3", "/system");

Now just Replace the "mmcblk0p3" from STOCK to PORT!!
It should look like this:

Code:
 format("ext4", "EMMC", "/dev/block/mmcblk0p3", "0", "/system");
 mount("ext4", "EMMC", "/dev/block/mmcblk0p3", "/system");
DO NOT REPLACE THE WHOLE LINE!
* Now go back to the Folder of Port ROM and You'll see 2 folders & 1 file named
-META-INF
-system
-boot.img

* Now Select these three and Click Right Mouse Button and Click on 7-Zip ->> Add to Archive
* Now a dialouge box should appear!
* Configure the Format like This:
Archive format: ZIP

Compression Level : Normal

Compression Method: Deflate

Dictoioany Size: 32k

Word Size 32

* Now Start Zipping and Push the ZIP to your Memory Card
* Go to Recovery >> Install ZIP & Wipe Data
Finished!!
Now was that so hard?? Its a Really Easy thing to d0!!
Now Come to the Hard Part!!
Porting From Different SoCs ( Ex: MT6582 to MT7572 )
Read this carefully & apply the way i say!
* Take the ROM u want to port & name it PORT!
* Take your Stock ROM & Name it Stock
* Now Replace These files from Stock to PORT--

Code:
 *system/vendor
 *system/usr
 *system/lib/modules
 *system/lib/hw
 *system/lib/libncurses.so
 *system/etc/firmware
 *system/etc/vold.fstab
 *system/etc/vold.fstab.nand
 *system/etc/bluetooth
* Now Open build.prop in notepad++ & Search for this line

Code:
ro.mediatek.platform=MT65xx
Now Replace this (MT65xx) with your CPU!!
For Example

Code:
ro.mediatek.platform=MT6572
* Now Go To META-INF/google/android and open updater-script in notepad++
* Add this line between the lines of "set_perm"

Code:
set_perm(0, 0, 0644, "/system/vendor/lib/hw/gralloc.mt65xx.so");
[Replace the mt65xx with your cpu]
Example:

Code:
set_perm(0, 0, 0644, "/system/vendor/lib/hw/gralloc.mt6572.so");
* Now Go back to the Rom folder and Take the boot.img and decompile it with any bootimg-unpack tool!
* Now delete the zimage and rename boot.img-ramdisk to PORT-Ramdisk
* Now Do the Same for Stock boot.img and open the folder named PORT-ramdisk and copy all the fil PORT-[QUOTE]ramdisk to boot.img-ramdisk of your Stock boot.img
* Now Go to boot.img-ramdisk and open init.rc
* Now find these lines and replace with your cpu

Code:
 #Create Chip Property
 on early_property:ro.hardware=mt6582
  setprop ro.mtk.hardware mt6589
  
 on early_property:ro.hardware=mt6589
  setprop ro.mtk.hardware mt6589
example :

Code:
 #Create Chip Property
 on early_property:ro.hardware=mt6582
  setprop ro.mtk.hardware mt6572
  
 on early_property:ro.hardware=mt6589
  setprop ro.mtk.hardware mt6572
* Now Compile your New boot.img and Pack your New ROM and Flash!!
Cheers!!!!
Porting Lewa OS5 ROM:
* Replace These files from Stock to LeWa OS5 ROM

Code:
 *system/vendor
 *system/usr
 *system/lib/modules
 *system/lib/hw
 *system/etc/firmware
 *system/etc/vold.fstab
 *system/etc/vold.fstab.nand
 *system/etc/bluetooth
* Replace Stock boot.img to Lewa OS5 ROM
* Unpack boot.img
* Open init.rc
* Find these lines

Code:
 on early_property:ro.build.type=user
  write /proc/bootprof "INIT: user build setting"
  export BOOTCLASSPATH /system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/mediatek-common.jar:/system/framework/mediatek-framework.jar:/system/framework/secondary-framework.jar:/system/framework/CustomProperties.jar:/system/framework/mediatek-telephony-common.jar:/system/framework/mediatek-op.jar

 on early_property:ro.build.type=userdebug
  write /proc/bootprof "INIT: userdebug build setting"
  export BOOTCLASSPATH /system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/mediatek-common.jar:/system/framework/mediatek-framework.jar:/system/framework/secondary-framework.jar:/system/framework/CustomProperties.jar:/system/framework/mediatek-telephony-common.jar:/system/framework/mediatek-op.jar


 on early_property:ro.build.type=eng
  write /proc/bootprof "INIT: eng build setting"
  export BOOTCLASSPATH /system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/mediatek-common.jar:/system/framework/mediatek-framework.jar:/system/framework/secondary-framework.jar:/system/framework/CustomProperties.jar:/system/framework/mediatek-telephony-common.jar:/system/framework/mediatek-op.jar:/system/framework/emma.jar
* Now Add this line in the end of 1t and 3rd line
:/system/framework/lewa-framework.jar

Example:

Code:
 on early_property:ro.build.type=user
  write /proc/bootprof "INIT: user build setting"
  export BOOTCLASSPATH /system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/mediatek-common.jar:/system/framework/mediatek-framework.jar:/system/framework/secondary-framework.jar:/system/framework/CustomProperties.jar:/system/framework/mediatek-telephony-common.jar:/system/framework/mediatek-op.jar:/system/framework/lewa-framework.jar

 on early_property:ro.build.type=userdebug
  write /proc/bootprof "INIT: userdebug build setting"
  export BOOTCLASSPATH /system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/mediatek-common.jar:/system/framework/mediatek-framework.jar:/system/framework/secondary-framework.jar:/system/framework/CustomProperties.jar:/system/framework/mediatek-telephony-common.jar:/system/framework/mediatek-op.jar


 on early_property:ro.build.type=eng
  write /proc/bootprof "INIT: eng build setting"
  export BOOTCLASSPATH /system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/mediatek-common.jar:/system/framework/mediatek-framework.jar:/system/framework/secondary-framework.jar:/system/framework/CustomProperties.jar:/system/framework/mediatek-telephony-common.jar:/system/framework/mediatek-op.jar:/system/framework/emma.jar:/system/framework/lewa-framework.jar
* Now Compile the new boot.img and Repack your New Lewa OS5 ROM
Porting MiUI ROM
Replace These files from Stock to MiUI ROM


Code:
 *system/vendor
 *system/usr
 *system/lib/modules
 *system/lib/hw
 *system/etc/firmware
 *system/etc/vold.fstab
 *system/etc/vold.fstab.nand
 *system/etc/bluetooth
* Replace Stock boot.img to Lewa OS5 ROM
* Unpack boot.img
* Open init.rc
* Find these lines

Code:
 on early_property:ro.build.type=user
  write /proc/bootprof "INIT: user build setting"
  export BOOTCLASSPATH /system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/mediatek-common.jar:/system/framework/mediatek-framework.jar:/system/framework/secondary-framework.jar:/system/framework/CustomProperties.jar:/system/framework/mediatek-telephony-common.jar:/system/framework/mediatek-op.jar

 on early_property:ro.build.type=userdebug
  write /proc/bootprof "INIT: userdebug build setting"
  export BOOTCLASSPATH /system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/mediatek-common.jar:/system/framework/mediatek-framework.jar:/system/framework/secondary-framework.jar:/system/framework/CustomProperties.jar:/system/framework/mediatek-telephony-common.jar:/system/framework/mediatek-op.jar


 on early_property:ro.build.type=eng
  write /proc/bootprof "INIT: eng build setting"
  export BOOTCLASSPATH /system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/mediatek-common.jar:/system/framework/mediatek-framework.jar:/system/framework/secondary-framework.jar:/system/framework/CustomProperties.jar:/system/framework/mediatek-telephony-common.jar:/system/framework/mediatek-op.jar:/system/framework/emma.jar

* Do the Same as Lewa and add this line in the end of 1st and 3rd line.

Code:
:/system/framework/miui-framework.jar

* Compile the New Boot.img and Repack your new ROM and FLash!!
Cheers!!
Enjoy your New ROM and Give Credits to me for if I Helped you!
For Advanced Users:
PORTING FIX:
Framework:
* decompile framework.jar
* Go to

Code:
\smali\com\mediatek

* Replace All Files from STOCK to this Folder
* Now go to

Code:
\smali\com\android\server

* Replace All Files from STOCK to this Folder
* Compile framework.jar and Push to Device!
* This Should FIX Bootloop, Mms.apk, Phone.apk, Settings.apk, Contacts.apk Force Close
* Fixing Other Problems:
Files related to Specific hardware:
* Replace if Not Working!!
* Camrea:

Code:
\system\lib\libcamalgo.so
\system\lib\libmhaldrv.so
\system\lib\libcamera_client.so
\system\lib\libcameracustom.so
\system\lib\libcameraprofile.so
\system\lib\libcameraservice.so
* GPS:

Code:
/system/xbin/libmnlp
* Bluetooth & Wifi:

Code:
/system/lib/libbluetooth_mtk.so
/system/lib/libbluetoothem_mtk.so
* Radio:

Code:
\system\lib\libaudio.a2dp.default.so
\system\lib\libaudio.primary.default.so
\system\lib\libaudiocompensationfilter.so
\system\lib\libaudiocustparam.so
\system\lib\libaudioeffect_jni.so
\system\lib\libaudioflinger.so
\system\lib\libaudiosetting.so
\system\lib\libfmar1000.so
\system\lib\libfmcust.so
\system\lib\libfmjni.so
\system\lib\libfmmt6616.so
\system\lib\libfmmt6620.so
\system\lib\libfmmt6626.so
\system\lib\libfmmt6628.so
* For Fixing Wifi & FM-Radio do this!
(NOT NEEDED IN MT6572)

Code:
fmradio.driver.chip=1
(Change it to 3 if yours is MT6628)

Code:
mediatek.wlan.chip=MT6620
(Replace mediatek.wlan.chip=MT6620 to your WLAM Chip Type Ex: mediatek.wlan.chip=MT6628 for MT6628)

Code:
mediatek.wlan.module.postfix=_mt6620
(Replace mediatek.wlan.module.postfix=_mt6620 to your WLAM Chip Type Ex: mediatek.wlan.module.postfix=_mt6628 for MT6628)
* Now open updater-script and Find this line or ADD a New one(If Not Found)!!
symlink("wlan_mt6620.ko", "/system/lib/modules/wlan.ko")
(Replace wlan_mt6620.ko to your WLAM Chip Type Ex: wlan_mt6628.ko for MT6628)

16 October 2014

Huawei Honor 4X (荣耀4X)


今天,荣耀官方再次玩起了哑谜,虽然并没有直接宣布新机的名称,但是根据宣传海报,我们可以看出“4”以及“X”,那么新机被命名为4X的可能性还是很大的。
这款荣耀4X如果不错的话就是之前曝光的代号为樱桃的荣耀全网通新机,该机配备了:
--  5.5英寸1280*720分辨率屏幕
--  1.2GHz四核处理器
--  2GB RAM + 8GB ROM的内存组合,最大支持32GB  SD卡扩展
--  前置500万像素相机 + 后置1300万像素相机
--  运行基于Android4.4.3系统深度定制的Emotion UI
--  支持GSM,CDMA,TD-SCDMA,TD-LTE,WCDMA网络,也就是联通、移动与电信2G/3G/4G全网通

据之前的消息,荣耀全网通新机或将售价千元,将在本月底发布。


4G全网通 双卡双待 骁龙410 5.5寸720P 3000mah 2G+8G

 

12 October 2014

佳域S3/F2终于现身 5模13频双卡双4G



当前国内手机市场的现况是-从上游厂商到运营商,再到销售终端,都在大力的推广4G,一时间4G手机成为了大家的热门关注点,即使是卖场里不懂手机的大妈,在换机也会问一声:支持4G吗?由此可见4G已深入人心。

   素来奉行“简单、实用”产品理念的佳域手机在推出了S2/G6两款中高端定位机型之后,同样开始备战4G时代,早期曾有一款型号为佳域F2的4G新品被曝光,但是从当前获得的消息来看,佳域是打算在4G时代大干一场了,不仅有F2,还有S3、S4等更多新品筹备上市,且各有看点。

当前国内手机市场的现况是-从上游厂商到运营商,再到销售终端,都在大力的推广4G,一时间4G手机成为了大家的热门关注点,即使是卖场里不懂手机的大妈,在换机也会问一声:支持4G吗?由此可见4G已深入人心。

佳域S3

   素来奉行“简单、实用”产品理念的佳域手机在推出了S2/G6两款中高端定位机型之后,同样开始备战4G时代,早期曾有一款型号为佳域F2的4G新品被曝光,但是从当前获得的消息来看,佳域是打算在4G时代大干一场了,不仅有F2,还有S3、S4等更多新品筹备上市,且各有看点。

除去MT6752八核64位处理器,定位为中端大屏性价比神器的S3其它规格也有亮点,将拥有2G RAM与3G RAM两个版本,2G RAM版会率先上市,配备一块5.5英寸FHD分辨率的屏幕,装备索尼13MP相机,电池容量超过3000毫安,并支持更换。佳域S3的跑分照片显示,该机的2G RAM版安兔兔跑分近3W7,可想而知3G RAM版应该会更高一些。

   最后来看看设计,佳域S3的大致轮廓与S2接近,S2是5英寸屏幕产品里娇小迷你型的产品之一,拥有6mm的厚度与不俗的窄边框,S3虽然还未公开具体三围信息,不过预计仍会延续S2的这些优点。

佳域F2



  与面面俱到的S3相比,佳域F2则略逊色一些,如之前传出的消息一样,佳域F2将搭载MT6582+MT6290双芯片方案,该方案已经足够成熟,目前被大量的入门级4G产品采用。虽处理器没有S3强悍,但是难能可贵的是网络部份,佳域F2将和S3一样,具备多模多频能力,可支持移动、联通双4G+双卡双待,这无疑是该机与同类产品竞争的一大有力武器

  此外F2会采用5英寸720P分辨率的屏幕,运行内存比之前传出的数值更高,达到主流的2GB,拥有800万像素索尼CMOS摄像头,应该会内置佳域自家经于kitkat定制的系统。外观则与G3有些相似,比S3更方正一些,会拥有纤薄的厚度。 本文来自MTK手机网http://www.mtksj.com

价格以及上市时间

  相信不少关注MTK平台的老朋友都对佳域手机比较熟悉,凭借一款售价亲民的双核机G2,佳域手机收获无数网友关注,这款手机也成为了佳域旗下的经典产品, 亦是佳域手机“简实、实用”理念的代表之作,随后上市的G3、G4等产品同样奉行亲民政策,直到G6/S2的上市,这两款产品因成本更高,售价比佳域早期 的产品贵了不少,因此销量似乎并不如人意。

  现在佳域手机将重拾“简单、实用”的理念,根据我们独家获得的消息显示,拥有双卡双4G护体的佳域F2售价会很亲民,而各方面更强的佳域S3据说定价千元出头,当然3G RAM版会更贵一些,上市时间可能就在近期,后续还会有更强大的佳域S4面世。