[Q] Smali Reject Files Walkthrough

Ahmed Ishtiaque

Dec 23, 2013
Hi guys,

I've been trying to port MIUI ROM in my device using patchrom. I managed to advance up to the command 'make firstpatch'. However, after that command is run, I get an out saying, 'Look into bla/bla/bla/temp/reject' folder to resolve any conflicts!
Now, I have no idea how to resolve all these conflicts in the smali code. Could anyone give me any leads on how to do this?



Jan 4, 2014
If you keep reading the guide, you need to decide what code to include, remove etc. Look for the +... - and ! signs in the reject files. You need to have an understanding of smali though.
I too am stuck at the same point...

Sent from my GT-I9195 using Tapatalk

Java Comms

Feb 1, 2014
you need to maually replace smali in framework ... and what to aad and what to remove in which files is all detials in reject smalis

i mean look in reject samlis

+ means u have to add that manually using notepad
- means u have to remove that codes from frameworks


Jul 24, 2012
The registers (e.g. v7, v2) can sometimes be different, and so can the labels (e.g. cond_0, goto_2). So look at the reject file and try to do a partial search for the lines above/below the change that it's rejected.

Sometimes that's not enough to go on, and you can manually diff the MIUI smali from ./android/ with your working device tree copy to get an idea. But it can get really messy there, especially with the MTK PatchROM (in the MTK one, it's based on Lenovo device and there is a lot of crap that Lenovo put in there that don't exist on other MT6589 devices).

EDIT: Just in case you are working on an MT6589 device, you can take a look at my public repo for the Xtreamer Q device here. It was very painful, at the time of first porting the PatchROM for MTK was still based heavily on Lenovo framework ID's so I basically ported that framework-res to our device with the help of remapid.jar.