yashsingh1/xdaforums huggingface dataset:
[Android Software Development] ZduneX25:
This one has been written for GB, much changed.

To be honest you will not get booting v5 using patchrom there are important changes missing in smali.. that you would have to add manually after all.

I would recommend to try build v4 to get some experience.

__________

Sent from awesome Galaxy S3
[Android Software Development] fedevd:
Yeah, works fine but for the prebuilt devices in source. You need a good knowledge to make it work in unsupported devices..

That's the deal, MIUI never will be easy or newbie friendly... In first stage, source wasn't available for no one, after pressure and who know why Xiaomi released the source, not the code, this last was obfuscated, so still being the same crap.. That's Xiaomi policy, they will do everything they can to not release the code, source is one thing, code is another tottally different thing, even if breaks some free license rules..

How can't be possible to build for Advance that is practically same thing as S2? Picked up "i9100" prebuilt folder, changed base files and still being impossible to build.

I wanna build from source 'cus I wanna a clean and pure MIUI, not porting with trash and unusefull things maded for other devices but still being impossible so no way, for now I gotta port from S2, even if comes with a lot of unnecessary stuffs. Maybe is better if I do a new clean thread posting errors faced in the proccess and the possible fix (that is sooo important and don't see anything related in MIUI webs, how can be possible that MIUI didn't made a list with most common issues?). That's the best idea I have 'cus find that on web is a really mess abd pray god to find a solution 'cus is nearly impossible to find out, the users says "fixed. Building" and no ones explain how they fixed "x" error..

Enviado desde mi GT-I9070 usando Tapatalk 2
[Android Software Development] ZduneX25:
to remove
[Android Software Development] pyroemaniac:
If you don't understand coding or troubleshooting errors in the coding then yes, this tutorial will be impossible.

This however is a great tutorial for those that do understand the android framework and coding.
[Android Software Development] Dr01nE:
that's easy to say. but considering that I'm doing this for an unsupported phone and not to mention this "patchrom" may not really be working on touchwiz jelly bean.

if this tutorial is so great, how come I don't see a much patchroms other than the ones officially supported by miui's little project.
[Android Software Development] ZduneX25:
Hmmmm, miuiv5 for 42 different devices built with patchrom: http://en.miui.com/thread-2651-1-1.html

and mine is one more, so it's 43.
[Android Software Development] cowsquad:
Do you do download miui patchrom with repo or as a zip If I wanted to use repo, how would I avoid downloading all those unneeded device folders?
[Android Software Development] ZduneX25:
https://github.com/MiCode/patchrom/blob/jellybean/README

After repo init, press ctrl + h on pc's keyboard go to .repo directory look for manifest.xml remove other devices save then follow repo sync..

Current sources are compatible with 4.0.3/4.0.4 ics and 4.1.1/4.1.2 jb.
[Android Software Development] cowsquad:
Thank you man I was checking the manifest.xml last night but I didn't figure out . thank you for your response
[Android Software Development] cowsquad:
just one question the developers guide says that I should run a the following commands

make workspace and make firstpatch. which make file contains those, because on mine there isnt a rule for it.

thanks
[Android Software Development] ZduneX25:
Do not miss pulling your rom to stockrom with patchrom command or you will never get metadata directory and w/o it, it's pointless to start.

__________

Sent from awesome Galaxy S3
[Android Software Development] cowsquad:
I have tried that but i dont get to build a stock.zip because some errors. i get metadata folder, but my questions is: how come the make file doesnt have the make workspace and make first patch rules.I get those errors when I tried to run 'make workspace'

have you tried this guide or the developers guide? which version of python are you using?

thank you
[Android Software Development] ZduneX25:
You will build nothing with patchrom wondering about such things. Try regular porting: http://xdaforums.com/showthread.php?t=1777999
[Android Software Development] fedevd:
So did you?:

1) cd patchrom

2) . build/envsetup.sh

3) cd "pathofyourdevicecreatedbyscript"

4) make workspace

5) make firstpatch

Did you do that?

Enviado desde mi GT-I9070 usando Tapatalk 2
[Android Software Development] cowsquad:
Yes, but the script doesn't create any folder. Thank you for your response
[Android Software Development] fedevd:
You're missing something.. Did you run the pull script?

Enviado desde mi GT-I9070 usando Tapatalk 2
[Android Software Development] cowsquad:
I did try to get the pull from phone script but I get an error. I think is a python error syntax. I get the metadata.
[Android Software Development] neXus PRIME:
[MENTION=3531145]fedevd[/MENTION]

Hi,

Please see attached files and tell me what to do.

One is the .rej file.

Other is the file in device root. Please apply this rej patch and give me the final file so i know what to do with all the rej files.

Regards

Yasir

P.S. rej files was here

device/temp/reject/services.jar.out/../../../../am/ActivityStack.smali.rej

Other file is

device/services.jar.out/../../../../am/ActivityStack.smali

Above is right ???
[Android Software Development] binhdb:
Good
[Android Software Development] BalcanGSM:
For Latest Patchrom Guide - Refer To This Link - http://en.miui.com/thread-9630-1-1.html
[Android Software Development] askpcguy:
Has anyone completed PatchROM for Miui v5? I been trying to patch MIUI v5 over to my Skyrocket and haven't been very successful.

Plus I am using this guide Porting miui cm10.1 based devices http://en.miui.com/thread-6395-1-1.html
[Android Software Development] patch_Adams:
Hi all. I am running the ota_target_from_phone but I have safestrap installed. The tool is pulling files, but will this work? Or do I need to odin back to stock?

My concern is the kernel

Thanks.
[Android Software Development] vidra:
Android version

so I can't use android 4.2.2 ?
[Android Software Development] ZduneX25:
[MENTION=6092581]vidra[/MENTION] https://github.com/MiCode/patchrom/tree/jellybean42
[Android Software Development] stevendeb25:
Can anyone tell me whats wrong with this logcat please.

Mi4 v6 to s5 g900f

https://mega.co.nz/#!yJEiwZZQ!nxyY48RwSGCkzgLGa8UQREeybWJo9IfQWlF5L6nLCkY

No display or boitanimation but seems to load

Cheers
[Android Software Development] Jaskaran498:
[MENTION=3141383]ZduneX25[/MENTION]

can you please reconfirm me where to make changes (for fixing rejects)?

Is it to the root directory of my phone (like ptchrom/phonename/android.policy.jar.out and make changes in files there) or temp/new_smali?

Also, after I have made the changes, how do I proceed to apply patches to fixed file? Rerun "make firstpatch"?
[Android Software Development] ZduneX25:
In the root directory, so do do not have to worry about they anymore, whole temp directly might be deleted once you merge your rejects.
[Android Software Development] Jaskaran498:
Thanks a lot for reply.

One more question- If I wanted to port halo to miui, I would first build a base rom (CM 11 in my case), then cherrypick halo into CM rom and resolve all dependencies, then use it as base for patchrom. Is that procedure right?

I am kinda confused what if patching process overwrote something... :/
[Android Software Development] ZduneX25:
You are thinking right, but patchrom is all smali, not java which is a bad thing, however yeah you will get halo support, the real deal is how to force it to load :P
[Android Software Development] infernicc:
Hi, is there a way how to port miui to note 4 if there is no 805 snapdragon miui device?
[Android Software Development] virajmalia:
I have a dual sim Motorola moto g (1st gen).

Can someone point me to a proper guide to compile MIUI on lollipop?

Nexus 4 has MIUI v6 now. I could also port it from there. So a port guide will also be helpful.
[Android Software Development] sev3n1985:
I've a stange problem with Patchrom, I've this problem:

Generate metadata used to build target files...

Compress the target_files dir into zip file

/home/antonio/patchrom6/s3ve3g

Build full ota package: /home/antonio/patchrom6/s3ve3g/stockrom.zip

../tools/releasetools/ota_target_from_phone: riga 256: /home/antonio/patchrom6/tools/releasetools/ota_from_target_files: Permesso negato

How to solve it?
[Android Software Development] ZduneX25:
How about your content of /metadata directory in device's one?
[Android Software Development] Mister-v:
Got the same error as you when building miui v7 for p760
[Android Software Development] infernicc:
still no miui for snaodragon 805..can you help me? is there some way how to port for note 4?

Odoslané z SM-N910F pomocou Tapatalku
[Android Software Development] Slimegod:
I'm getting a "failed" when flashing my MIUIv7 patchrom. I've tried TWRP 2.8.7.0 and the latest CWM recoveries. Even downgraded recoveries and nothing seems to work. I even tried flashing my v5 I built thinking it's the ROM but it's not. So it's something to do with the build. I get the same error when trying to flash my v6 build. I'm not even getting a error message. What could be the issue?
[Android Software Development] ZduneX25:
Go to /cache/recovery and check out your logs.
[Android Software Development] Slimegod:
It's not throwing a error http://pastebin.com/65xt8cW3. Signature verification is already disabled as well.
[Android Software Development] kaotd99:
Hi. Can you help me about this error:

root@localhost: /home/KaoTD/MiCode# source build/envsetup.sh

PATCHROM_BRANCH = kitkat

ANDROID_PLATFORM = v19

ANROID_TOP =

ANDROID_OUT =

PORT_PRODUCT = Unknown

USE_ANDROID_OUT =

ANDROID_BRANCH =

root@localhost: /home/KaoTD/MiCode/ara# make fullota

>>> build out/framework-res.apk

#for call ./customize_framework-res.sh

/bin/bash: /home/KaoTD/MiCode/tools/aapt: cannot execute binary file

make: *** [out/framework-res.apk] Error 126

root@localhost: /home/KaoTD/MiCode/ara#

im building patchrom miui v6, stockrom.zip is cm11 m12

using ubuntu 13.10
[Android Software Development] 3lambda:
Can someone explain me how add reject file ? does I have to remplace .smali or edit and add line ?
[Android Software Development] ZduneX25:
Anyone knows where (in smali) I could adjust vibration streight?
[Android Software Development] Slimegod:
Phone is hung on boot animation http://pastebin.com/FR70rQzd already edited my ramdisk with MIUI's. Need help.
[Android Software Development] stevendeb25:
Is there a way or a guide for updates?

There's a miui v6 5.7.24 that got abandoned

Is there a way to update this rom via patchrom?
[Android Software Development] hfmls:
any help on this pls?

http://xdaforums.com/g4/help/miui-7-request-thread-t3301334
[Android Software Development] marcomarinho:
Where's the source code for MIUI8? And for Kitkat above version? the source code is decrapted
[Android Software Development] Slimegod:
Don't think there's a source code for v8 yet.
[Android Software Development] zelendel:
You do know there is no real source code for miui. It is closed source. Closest you will find Is the patch rom setup but that is incomplete at best.
[Android Software Development] marcomarinho:
Yup, that's true. They announced sometime ago that they'll become a open source rom but what they've done was give the tools to port the rom and not to make it better. There are many bugs in Nexus5 for example where we need to decompile every apk and recompile again to try to fix some things.. I think that it's a bad move from Xiaomi .. anyways, I want to believe that in Miui8 they'll release the source code once for all
[Android Software Development] niranjangoud:
Work with Windows

Can I use Windows pc for building these Rom

...?
[Android Software Development] Suraj Pandey:
Helpful for me. Thanks
[Android Software Development] askpcguy:
As far as I know, patchrom is only for Linux. Just get Ubuntu and install it on an external USB hard drive.
[Android Software Development] tr4nqui1i7y:
Anyone else working on the nexus 6p port? I've been trying since before patchrom updated to marshmallow. The furthest I've gotten is to the bootanimation.
[Android Software Development] DJKristy:
If it's just porting, then what's we downloading from git.

It looks like some source code
[Android Software Development] zelendel:
What you are downloading is a bunch of closed sourced precompiled filed that are used to patch rom so they can work. This is what makes it a port. You can't pure AOSP and their kernel source and build a rom for the device.
[Android Software Development] stevendeb25:
set correct permissions on

add_miui_smail.sh and apktool in tools folder ;)

EDIT:

error now
[Android Software Development] Aspire:
Use on Windows under Cygwin
[Android Software Development] come at me bro:
would this work on the htc holiday/vivid, i thought miui actually needed cm source for the handset first, anyway i can not get unbuntu running again in virtual box,
[Android Software Development] s4pt4:
try this please :

$ sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \
x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \
libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \
libxml2-utils xsltproc
[Android Software Development] nikku_hot123:
Can any developer fix SystemUI.apk compilation problem?
[Android Software Development] Racing19969:
Working on it. I have submitted bugs to miui and they have offered some help. Hopefully I will get it figured out.
[Android Software Development] dswaggz:
Thank u sooo much

via rebel W/ a cauze rebel rom 2.1 ;)
[Android Software Development] Aspire:
it says package not found, though i have universe repository enabled....
[Android Software Development] nikku_hot123:
Thanks. Hoping for the best...
[Android Software Development] jahlovePL:
LWW and Mini Pro already have new MIUI ports. Could they devs can help?
[Android Software Development] -Grift-:
yikes our mdpi phones need a bit more porting
[Android Software Development] Jon2555:
Does anybody know when ICS source will be released?
[Android Software Development] zelendel:
As soon as the CM team finishes it.

Guys first one of the main issues is that this doesn't work on just any rom. As we all know MIUI is all based off of CM coding. So you will need a similar based rom. So you will not be able to use this on OEM based rom's such as HTC, Samsung, Motorola, LG or SE.
[Android Software Development] insestito:
this is for ALL DEVICES ????
[Android Software Development] MisterGT:
Look in my opening post for that.

---

Fix for SystemUI not building is to copy the SystemUI folder from the i9100 folder. It contains two .smali files.
[Android Software Development] dswaggz:
So will this work the samsung exhibit II guys?

via rebel W/ a cauze rebel rom 2.1 ;)
[Android Software Development] MisterGT:
Are you serious? Try it out yourself.
[Android Software Development] Jon2555:
CM9 is released and MIUI ICS roms are released too so why source isn't released?
[Android Software Development] KemikalElite:
Sorry dswaggz isn't a dev. However I'm from the exhibit ii and I'm trying to build MIUI for it. dswaggz has been asking for a MIUI port since we got a working recovery so hopefully I'll get MIUI working soon. Rome wasn't built in a day and I hate to bring up the negative but it's most likely going to be quite a while before we get close to ICS.

http://xdaforums.com/showpost.php?p=22249879&postcount=17

On page 1 I asked about this and got that response saying that this does not require AOSP based ROM just rooted, HDPI, 2.3.3-2.3.7. Not to mention that the download includes a stock TouchWiz-based ROM as the example. I don't have any experience with MIUI since this is my first HDPI device so I can't tell if this needs to be a CM/AOSP ROM or if the "Patchrom" just loads MIUI content into any ROM. I'm not arguing here, I've ask a question and got an answer and now a completely different answer so I really just want a clear, correct answer to avoid anymore confusion.
[Android Software Development] dswaggz:
Thanx kem hey buddy u should port the blacc note rom from the sgw section

via rebel W/ a cauze rebel rom 2.1 ;)
[Android Software Development] KemikalElite:
That quote from the original thread answers the AOSP vs Stock ROM question perfectly. I wonder how I missed reading that.

An OEM/Stock ROM is RECOMMENDED but an AOSP ROM can be used as well.

I would port that provided we get the original dev's permission first.
[Android Software Development] dswaggz:
OK I'll ask an please make thee most awesomeness miui build maybe u could use there stocc 2.3.6 for it or that rom;)

via rebel W/ a cauze rebel rom 2.1 ;)
[Android Software Development] MisterGT:
Stock is recommended indeed. I've been trying building a ROM for a while but without success. I get errors of android.acore and systemui crashing continuously. I asked for an English manual at the official forums and they said that it will be released soon. I hope that will help us
[Android Software Development] KemikalElite:
Even if I did get a complete zip file made at this point I'm sure it wouldn't run. It would bootloop or some process would crash. When it comes to porting MIUI / CM / AOSP: "The inverse of Murphy's law: Nothing will go right."
[Android Software Development] Rosemberg91:
this guide work/work for implementing miui on tablet???
[Android Software Development] DarthJonathan:
Guys i get the error service.jar "make: *** [.build/services.jar] Error 1" kemika have u passed it? can some one help me thx
[Android Software Development] nikku_hot123:
There is a bug i think as when you decompile i9100 systemUI.apk then also i gives some errors. They have proided their own systemUI decompiled as folder structure is totally different. I am not even able to make Phone.apk? Does anybody has any solution?
[Android Software Development] didhiy:
There's no bug, here is the answer from github:

MiuiAnderson commented

2 days ago

It should work. We verified this whole compliation process.

source build/envsetup.sh
cd i9100
make apktool-if (This command install framework-res.apk and framework-miui-res.apk)
make zipfile
[Android Software Development] SnegovikRZN:
Hello! Help me please:

build .build/MIUISystemUI.apk...
--------------------------------------------
cp -r SystemUI .build
/home/snegovikrzn/MiCode/tools/apktool b .build/SystemUI .build/MIUISystemUI.apk
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
res/drawable-hdpi/status_bar_background.png:0: error: Resource entry status_bar_background is already defined.
res/drawable-hdpi/status_bar_background.9.png:0: Originally defined here.
/home/snegovikrzn/MiCode/p970/.build/SystemUI/res/values/styles.xml:3: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/TextAppearance.StatusBarTitle'.
/home/snegovikrzn/MiCode/p970/.build/SystemUI/res/values/styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/TextAppearance.StatusBarTitle'.
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL5583028033809290543.tmp, -I, /root/apktool/framework/1.apk, -S, /home/snegovikrzn/MiCode/p970/.build/SystemUI/res, -M, /home/snegovikrzn/MiCode/p970/.build/SystemUI/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL5583028033809290543.tmp, -I, /root/apktool/framework/1.apk, -S, /home/snegovikrzn/MiCode/p970/.build/SystemUI/res, -M, /home/snegovikrzn/MiCode/p970/.build/SystemUI/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
make: *** [.build/MIUISystemUI.apk] Ошибка 1
[Android Software Development] Samiam303:
That's basically where everyone's stuck. As far as I know nobody's actually built anything that works with this so far, or at least if they have they've kept pretty quiet.
[Android Software Development] Samiam303:
Can you post the error you get when building Phone.apk?
[Android Software Development] nikku_hot123:
i am getting these errors????i replaced my Phone/res/values-es-rUS/strings.xml with i9100 Phone/res/values-es-rUS/strings.xml and voila it worked but i dont think it will work on my phone ;(

build .build/Phone.apk...
--------------------------------------------
cp -r Phone .build
/root/patcher/patchrom/tools/apktool b .build/Phone .build/Phone.apk
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
/root/patcher/patchrom/splus/.build/Phone/res/values-es-rUS/strings.xml:205: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
/root/patcher/patchrom/splus/.build/Phone/res/values-es-rUS/strings.xml:206: error: Unexpected end tag string
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL2350004579727357196.tmp, -I, /root/apktool/framework/1.apk, -I, /root/apktool/framework/2.apk, -S, /root/patcher/patchrom/splus/.build/Phone/res, -M, /root/patcher/patchrom/splus/.build/Phone/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL2350004579727357196.tmp, -I, /root/apktool/framework/1.apk, -I, /root/apktool/framework/2.apk, -S, /root/patcher/patchrom/splus/.build/Phone/res, -M, /root/patcher/patchrom/splus/.build/Phone/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
make: *** [.build/Phone.apk] Error 1
[Android Software Development] owain94:
compiled fine here with CM7 kang for the p990...

first try had an systemUI error but if you just read the error log it is super easy to fix (:
[Android Software Development] nikku_hot123:
I think it is the problem with kernel as I am using stock kernel boot.img for my samsung gt i9001.. does it require cm kernel?
[Android Software Development] nikku_hot123:
Is it working without boot loops? I am also able to compile successfully with stock rom but it is stuck in bootloops .. logcat in previous post. Can u suggest me any solution??
[Android Software Development] SnegovikRZN:
How? Please help