[WINDOWS/LINUX][PORT][MIUI]Auto MIUI Porter v4

Search This thread

Top Liked Posts

  • There are no posts matching your filters.
  • 101
    Supports ICS & Jellybean​


    Things You Need To Do
    WINDOWS
    Note: Tested on Windows 8
    1) 7-Zip
    2) Winmerge
    3) Notepad++
    4) Java SE Development Kit
    5) Install in default location
    6) You should not choose a root path that includes spaces in directory names
    C:\my port\Miui_Auto_PorterV* 《-- won't work
    C:\my_port\Miui_Auto_PorterV* 《-- will work(there should not be any spaces)

    LINUX
    Note: Tested on Ubuntu 12.10
    1) 7-Zip
    2) Meld
    3) KWrite
    4) Java SE Development Kit
    5) Install them
    6) You should not choose a root path that includes spaces in directory names
    Home/user/my port/Miui_Auto_PorterV* 《-- won't work
    Home/user/my_port/Miui_Auto_PorterV* 《-- will work(there should not be any spaces)
    7) You need to set permissions of these 2 files as "executable"
    - MIUI-Auto-Porter-LinuxV*
    - tools/apktool


    COMMON
    1) "common sense" :p
    2) Give credits and thanks :D


    How To
    NOTE: Script is auto explanatory, so you just need to follow it.

    NOTE: If your working directory is in system partition, you need admin rights.

    1) Now just start the MIUI-Auto-Porter-V*.cmd

    2) The script starts creating folders
    NOTE: Make sure you extract your miui and cm zip's in their respected folders
    1) CM - Extract your cm zip inside it
    2) MIUI - Extract your miui zip inside it
    3) PORT - Its automatically generated dont manually edit it
    4) WIP - All your apk's jar files are decompiled here you can manually edit your smali's here
    5) Tools - All the tools required by the script are here(comes in the zip)

    3) Now it asks you if you need to copy these files into your miui rom
    NOTE: Its a simple y/n answer for it
    Code:
    1) CM NFC
    2) CM Camera
    3) Delete MIUI Camera

    4) Again a y/n question if you want to copy service.jar USB folder, if yes it will take you to manual diffing

    5) All the files will automatically be displayed to dif or to manually edit

    6) To know more about what to manual diff, please follow Lens_flare's guide.

    7) After you finish manually diffing, let the script do its job,

    8) Collect your miui_signed.zip and happy flashing

    9) Any doubts feel free to ask me

    10) Dont forget the THANKS button & to give proper CREDITS if you use it

    Things This Script Does
    NOTE: These are mixed ICS & Jellybean files, the script does it automatically dont worry about that.

    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    Automatic
    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-​


    Folders​
    Code:
    - system\app\
    - system\framework\
    - system\fonts\
    - system\media\


    File's
    Code:
    [I]Lib Files[/I]
    - system\lib\content-types.properties
    - system\lib\liblbesec.so
    - system\lib\liblocSDK_2.5OEM.so
    - system\lib\libjni_resource_drm.so
    
    [I]Etc Files[/I]
    - system\etc\yellowpage.db
    - system\etc\telocation.idf
    - system\etc\spn-conf.xml
    - system\etc\telocation.td
    
    [I]Permission Files[/I]
    - system\etc\permissions\com.nxp.mifare.xml
    - system\etc\permissions\miui-framework.xml 
    - system\etc\permissions\com.google.android.media.effects.xml 
    - system\etc\permissions\com.google.android.media.effects.xml
    - system\etc\permissions\com.google.widevine.software.drm.xml
    - system\etc\permissions\com.google.widevine.software.drm.xml
    - system\etc\permissions\com.google.android.maps.xml
    
    [I]Xbin Files[/I]
    - system\xbin\su
    - system\xbin\invoke-as

    Smali's
    Code:
    [I]Framework Smali's[/I]
    - org\codeaurora\Performance.smali 
    - android\graphics\Paint.smali 
    - android\os\Environment.smali
    - android\net\wifi\WifiNative.smali 
    - android\bluetooth\HeadsetBase*.smali 
    - android\os\Power.smali 
    - android\view\GLES20*.smali 
    - android\view\HardwareCanvas.smali 
    - android\os\PowerManager*.smali 
    - android\hardware\Camera*.smali 
    - android\server\BluetoothA2dpService*.smali 
    - android\webkit\WebView*.smali 
    - android\webkit\WebSettings*.smali 
    - android\webkit\HTML5*.smali
    - android\webkit\SelectActionModeCallback*.smali 
    - com\android\internal\telephony\BaseCommands.smali
    - com\android\internal\telephony\RIL*.smali
    - com\android\internal\telephony\Samsung*.smali 
    - com\android\internal\telephony\QualcommSharedRIL*.smali 
    - android\content\res\PackageRedirectionMap*.smali 
    - android\app\ProfileManager*.smali 
    - android\media\AudioManager$1.smali
    - android\media\AudioManager$2.smali 
    - android\media\MediaRecorder*.smali
    - android\app\ProfileGroup*.smali 
    - android\os\IPowerManager*.smali 
    - com\android\internal\app\ActivityTrigger.smali 
    
    [I]Services Smali's[/I]
    - com\android\server\input\InputManager*.smali
    - com\android\server\wm\InputManager*.smali
    - com\android\server\watchdog*.smali


    XML's
    Code:
    [I]Framework-Res XML[/I]
    - res\xml\storage_list.xml

    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    Manual
    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-​
    NOTE: Script either ask's you what to do, or opens the files for manually editing or diff'ing.

    APK's
    Code:
    - Copy CM Camera.apk
    - Copy CM NFC.apk
    - Delete MIUI Camera.apk

    Smali's For Diff'ing
    Code:
    - framework\os\SystemProperties.smali
    - framework\android\media\AudioFormat.smali
    - framework\com\android\internal\telephony\PhoneFactory.smali
    - framework\android\content\res\AssetManager.smali
    - services\com\android\server\PowerManagerService.smali

    XML's For Editing
    Code:
    - res\values\bools.xml
    - res\values\arrays.xml

    Others Files For Editing
    Code:
    - system\build.prop
    - META-INF\com\google\android\updater-script


    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    Random Auto Stuff
    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-​

    Code:
    - Installs the necessary Framework Files
    - Decompiles Framework-Res(CM\MIUI) to "wip\apks\(CM\MIUI)\framework-res.apk.out"
    - Decompiles services.jar(CM\MIUI) to "wip\jars\(CM\MIUI)\services.jar"
    - Decompiles framework.jar(CM\MIUI) to "wip\jars\(CM\MIUI)\framework.jar"
    - Decompiles android.policy.jar(CM\MIUI) to "wip\jars\(CM\MIUI)\android.policy.jar"
    - Builds all the files after you edit them
    - copy the necessary files from the built files into the actual roms files. (prevents signing apk's)
    - zipaligns all the apk's
    - creates flashable zip
    - signs the zip
    - final zip is 'miui_signed.zip'


    ChangeLog​
    Code:
    [B]V4[/B]
    - Introducing Linux version
    - Improved copying
    - improved start up
    - improved explanation
    - (linux/windows) now u can place your working folder anywhere,... (You 
     should not choose a root path that includes spaces in directory names)
    
    [CENTER]=-=-=-=-=-=-=-=[/CENTER]
    
    [i]V3[/i]
    - Improved folder creation
    - Improved cm and miui folder detection
    - Improved user friendly features
    - Script optimization 
    
    [I]V2[/I]
    - Script Cleanup
    - More User Friendly
    
    [I]V1[/I] 
    - Initial Release


    5
    update : get ready for a major update... next version will have (linux/windows)
    1) automated extraction of cm/miui zips
    2) option to have 3 way reboot option (only jb/ics)
    3) option to change the image in settings-about page (use custom branding images)
    4) option to add stuff to your Rom like apps etc.
    5) automatic display md5 of the final zip file after it is created
    3
    ^^^
    let me know how it works,... :)
    3
    Updated: happy porting,...
    2
    UPDATED: its more user friendly now,...