PORTING MIUI V4.docx
- 文档编号:2930280
- 上传时间:2022-11-16
- 格式:DOCX
- 页数:22
- 大小:35.80KB
PORTING MIUI V4.docx
《PORTING MIUI V4.docx》由会员分享,可在线阅读,更多相关《PORTING MIUI V4.docx(22页珍藏版)》请在冰豆网上搜索。
PORTINGMIUIV4
MIUIv4porting
IknowthereisaProxuser'sguide-"HowtoPortMIUIv4foryourdevice"andGREATthreadintendedtoeliminateportingquirks.
Mygoalistocollectalltheexperiencewegotinthatthread,whichcouldbehelpfulfornewusersportingnewestreleasesofmiui.
FAQassumesquestionaire,butmyformatwillbemorelooklikeaguidebutascollection,itcouldbetreatedasFAQ.
StructurewillbeStage-dividedtoeaseofuse.
Stage1.Initialport
Let'sstartwithfirstmoment-baseschoice.
UnderbaseIwillmeanromwhichcouldbeusedtoportmiuiandalsomiuireleaseyouchoose.
Let'sassume-just"Base"willmeanromforyourdevicewithICS,suchasCyanogenModorAOKPorAOSPandtheirvariations(Idon'tknowifitispossibletousestockromforportingandwouldn'trecommendit),when"MIUIbase"meansanymiuiromyouprefer(mypreferenceandadvice-MIUIandroidcrespo[nexusS]release).Youcoulduseanymiuibasebutresultswillbeunpredictableandmayveryvaryfromguidestands,forthosecasesIpreparedcommondebuggingstage,whichwillhelptoeliminatebugsIhaven'tlisted.
UPDATE
Situationchanged.MIUIfornexusSisgoingtobeJellyBeanonly.AswearediscussingMIUIv4only(fornow),miuibasenowshouldbemoreCPU-specific.
ForQualcommdevicesIdothinkDesireSwouldbeachoice,formoto(alsootherdeviceswithTIOMAPCPU)-RAZR,forSEandSony-ofcourseLT18i(2011models)orLT26i(2012models)asframeworksareverysimilar,tegra2ownersmightprofitonOneXport.
OtherCPU-sarenotsupported(oralreadyhavemiuisupport,forexamplegalaxys2)asIsee,theonlysolution-migrateonJellyBeanordevelopastablemiuionlastnexusSicsrom-2.8.10.
NOTICE
Aswearenowrebasingtomorespecificdevices,guidestatementsmightbenotsoeasytoproceed(esp.stage2).Usestage3asdebuggingmanualandonlythenaskinthisthread:
P
Guidewillbetransformedto"portingMIUI5(JellyBean)"ASAP.
Whenbasechoosen,starttoport:
Copyunpackedbaserom(sosetoffolders)toanyfolderyouprefer(let'snameit"MIUI"),itusuallycontains:
∙system-folderonwhichwewillworkmoreoften
∙data-maycontainsomethingnecessarysuchasfirstbootscripts,configfilesetc.
∙META-INF-containscertificatesandsignatureforsigncheck,updater-script(wealsowillworkonit)update-binary(updater-scriptcommandprocessor)
∙boot.img,kernelandramdiskpackedtogether,touchonlyifkernelshouldbechangedtosomethingmorerecentorifyourpreferenceisnotsimilarwithbaserommaker's
Startingwithsystem:
delete:
∙app
∙framework
∙media
∙fonts
thenopenmiuiarchiveandextractthosefolderstosystem.Don'tclosearchive.
Openlibfolderinsystemtoaddfromthesamearchive:
∙content-types.properties[forthemes]
∙liblbesec.so[forLBEGuard-MIUIsuperuser]
∙liblocSDK_2.2.so[forbaidulocationservice,preventsnetworklocationproviderFC]
Openetcfolderinsystemtoaddfromthesamearchive:
∙yellowpage.db[Phonecallsability]
∙telocation.td(asfornexusSandtelocation.dbinothers)[locationproviderdependency]
gotopermissionsfolderinetctoadd:
∙com.nxp.mifare.xml[NFC]
∙miui-framework.xml[activatesmiuiframework,nearallappswon'tworkwithoutthat]
∙com.google.android.media.effects.xml[gallery]
∙com.google.widevine.software.drm.xml[somethingalsorelatedtogooglemayaffectplaymarket]
∙com.google.android.maps.xml[gmaps]
Openxbinfolderinsystemtoaddfromthesamearchive:
∙su[replace,don'tevenusebaseone!
]
∙invoke-as[binarywithnearbusyboxandtoolboxfunctionality,needeverywhereinsystem,mostlyinthemesandSU]
that'sallaboutadditionalfiles.Deviceswhichdon'thaveNFC(NearFieldCommunicationchip)alsoshouldn'thaveNfc.apkinappfolder!
Let'smodifybuild.propthen,toadd:
Code:
ro.build.id=MIUI
ro.build.display.id=MIUI
ro.build.version.incremental=2.x.x
ro.config.ringtone=MI.ogg
ro.config.notification_sound=FadeIn.ogg
ro.config.alarm_alert=GoodMorning.ogg
ro.config.sms_received_sound=FadeIn.ogg
ro.config.sms_delivered_sound=MessageComplete.ogg
ro.build.version.incrementalpointstoMIUIyouport,sospecifyit.
Atyourbaseyouwillmostlikelyseetheselines
Code:
ro.config.ringtone=
ro.config.notification_sound=
ro.config.alarm_alert=
ro.config.sms_received_sound=
ro.config.sms_delivered_sound=
arefilledwithringtonesthatonlybasehave,soojustchangethemasMIUIdohavedifferentringtoneset.
Initialportdone,insystempart,let'stalkaboutUpdater-script:
anyreleaseofmiuiyouportshouldhavethatline:
Code:
set_perm(0,0,06755,"/system/xbin/invoke-as");
forexampleyouhavethatbunchofcode[whichismostlycommonforCM9release]:
Code:
set_perm_recursive(0,0,0755,0644,"/system");
set_perm_recursive(0,2000,0755,0755,
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- PORTING MIUI V4
![提示](https://static.bdocx.com/images/bang_tan.gif)