Patchrom (miui) for Note II

Search This thread

mssmison

Retired Forum Moderator
Apr 23, 2008
1,654
231
Google Pixel 5
Whiles there's currently an excellent port from the 7100 MIUI build it has a couple of flaws which I'm not totally sure can be resolved. It's been a long time since I looked at developing anything but figured I'd have a look at the current patchrom implimentation to see if we could get a proper 317 build going.
Here's some details about patchrom, and what I've done so far.

First up. https://github.com/MiCode/patchrom already has a note2 tree, so we can use that as a base for changes for the 317.
Have all the same pre-recs installed as you would to compile cm.

In linux you'll need to make a patchrom folder
1.mkdir patchrom
micode doesn't yet have all the repo setup for jellybean, so I just downloaded the following zip tardballs and extracted them into their respective folders;
https://github.com/MiCode/patchrom_miui/tree/jellybean -> patchrom/miui
https://github.com/MiCode/patchrom_tools/tree/jellybean -> patchrom/tools
https://github.com/MiCode/patchrom_build/tree/jellybean ->patchrom/build
https://github.com/MiCode/patchrom_note2 ->patchrom/note2
https://github.com/MiCode/patchrom_android/tree/jellybean ->patchrom/android

Once that's complete you can pretty much follow the developer guide here;
https://github.com/MiCode/patchrom/blob/ics/Patchrom Developer Guide.pdf
I highly suggest installing this as your source rom, (http://xdaforums.com/showthread.php?t=2016575&highlight=stock) installing it as a stock build first (no themes tweaks etc)
Create a folder patchrom/317 and start following the guide to create your stockrom.zip
Copy the following from the note2 folder into your new folder
makefile
miuihome
miuisystemui
originalsettings
mms
overlay
phone
settings
thememanager
customize_framework.sh
customize_miuiapp.sh
phoneapps.mk
Camera maybe?

Edit the makefile to update the directory references to your new build folder.
Run the make workspace to unzip and decompile the frameworks that are going to be modded.
By following the guide, with what you've done we're now at the firstpatch phase. That's what I'm currently working on as well.
The directions are a little convoluted so hopefully this helps.
When you run make firstpatch what it tries to do is automatically patch the miui smali bits into the framework/services smali files. Whenever it can't it'll create a *.rej file for you.
What you need to do is edit the associated file and manually put in the diffs from the rej files. Where we have this super great advantage is there's already the 7100 framework with the patched in rej in the note2 folder you downloaded earlier. So really you just need to compare that smali file against yours and apply the changes noted in the rej file. (tip. you edit the original files created during make workspace, nothing in the temp directory, just in the framework.jar.out folder etc)
Here's a really great post detailing an example; http://xdaforums.com/showpost.php?p=25713236&postcount=171
Boy.. that doesn't sound easy.. but believe me it's easy once you start looking at it.

Ok I've dealt with the *.rej files now what?

Holy congrats! Your a step ahead of me at this point :) Next up you just need to run make fullota. It *should* at this point build an ota you can flash from recovery.

copy to sdcard, reboot recovery flash and.. it should boot. Really I expect there should be little or no issues thanks to the 7100 work we've already borrowed.

Assuming it works, let's get it on github and shared with the miui team. That'll go a long way to making it a weekly build.

Good luck and have fun!

If you get somewhere, let us know.
 
Last edited:

almandog

Member
Nov 21, 2012
24
0
Waipahu
I have been using MIUI 3.1.25 from the T-Mobi Galaxy Note 2 thread. I really like this ROM. But there are issues since it is not optimized for the i317 note 2 phones. Example: I can't access my 64GB SD card on MIUI v5. I reverted to the previous version (MIUI 3.1.25) and my SD card forks fine. Have anyone followed the instructions in the original post above and was able to port MIUI to the i317 note 2 phone? I would really like to know how to port this ROM. I am looking into how to get started.
 

DirtyDroidX

Senior Member
Jan 7, 2011
343
257
Pittsburgh
Thanks for sharing this! Idk if anyone has improved on miui from this? Im willing to look into it, would you be willing to help me out with fixing some issues once i get it flowing? If so i appreciate it, just toss me a pm at your convenience.

Sent from my SAMSUNG-SGH-I317 using Tapatalk 4 Beta
 

kat0072

Senior Member
Mar 10, 2012
469
226
42
Hyderabad
Xiaomi Poco F1
Thanks for sharing this! Idk if anyone has improved on miui from this? Im willing to look into it, would you be willing to help me out with fixing some issues once i get it flowing? If so i appreciate it, just toss me a pm at your convenience.

Sent from my SAMSUNG-SGH-I317 using Tapatalk 4 Beta

Thanks for the post but belive me fixing rejects is not that easy job. You will get hundreds of rejects while patching the smali code by MIUI patchrom.

If anyone got success with this, I would love to get in touch with you.

Guys please help with Patchrom Tool for Note 2
 

Top Liked Posts

  • There are no posts matching your filters.
  • 6
    Whiles there's currently an excellent port from the 7100 MIUI build it has a couple of flaws which I'm not totally sure can be resolved. It's been a long time since I looked at developing anything but figured I'd have a look at the current patchrom implimentation to see if we could get a proper 317 build going.
    Here's some details about patchrom, and what I've done so far.

    First up. https://github.com/MiCode/patchrom already has a note2 tree, so we can use that as a base for changes for the 317.
    Have all the same pre-recs installed as you would to compile cm.

    In linux you'll need to make a patchrom folder
    1.mkdir patchrom
    micode doesn't yet have all the repo setup for jellybean, so I just downloaded the following zip tardballs and extracted them into their respective folders;
    https://github.com/MiCode/patchrom_miui/tree/jellybean -> patchrom/miui
    https://github.com/MiCode/patchrom_tools/tree/jellybean -> patchrom/tools
    https://github.com/MiCode/patchrom_build/tree/jellybean ->patchrom/build
    https://github.com/MiCode/patchrom_note2 ->patchrom/note2
    https://github.com/MiCode/patchrom_android/tree/jellybean ->patchrom/android

    Once that's complete you can pretty much follow the developer guide here;
    https://github.com/MiCode/patchrom/blob/ics/Patchrom Developer Guide.pdf
    I highly suggest installing this as your source rom, (http://xdaforums.com/showthread.php?t=2016575&highlight=stock) installing it as a stock build first (no themes tweaks etc)
    Create a folder patchrom/317 and start following the guide to create your stockrom.zip
    Copy the following from the note2 folder into your new folder
    makefile
    miuihome
    miuisystemui
    originalsettings
    mms
    overlay
    phone
    settings
    thememanager
    customize_framework.sh
    customize_miuiapp.sh
    phoneapps.mk
    Camera maybe?

    Edit the makefile to update the directory references to your new build folder.
    Run the make workspace to unzip and decompile the frameworks that are going to be modded.
    By following the guide, with what you've done we're now at the firstpatch phase. That's what I'm currently working on as well.
    The directions are a little convoluted so hopefully this helps.
    When you run make firstpatch what it tries to do is automatically patch the miui smali bits into the framework/services smali files. Whenever it can't it'll create a *.rej file for you.
    What you need to do is edit the associated file and manually put in the diffs from the rej files. Where we have this super great advantage is there's already the 7100 framework with the patched in rej in the note2 folder you downloaded earlier. So really you just need to compare that smali file against yours and apply the changes noted in the rej file. (tip. you edit the original files created during make workspace, nothing in the temp directory, just in the framework.jar.out folder etc)
    Here's a really great post detailing an example; http://xdaforums.com/showpost.php?p=25713236&postcount=171
    Boy.. that doesn't sound easy.. but believe me it's easy once you start looking at it.

    Ok I've dealt with the *.rej files now what?

    Holy congrats! Your a step ahead of me at this point :) Next up you just need to run make fullota. It *should* at this point build an ota you can flash from recovery.

    copy to sdcard, reboot recovery flash and.. it should boot. Really I expect there should be little or no issues thanks to the 7100 work we've already borrowed.

    Assuming it works, let's get it on github and shared with the miui team. That'll go a long way to making it a weekly build.

    Good luck and have fun!

    If you get somewhere, let us know.