yashsingh1/xdaforums huggingface dataset:
[Android Software Development] sorullo_xgrx:
Before anything I'll guess you have adb setup on your path, or just open a command window inside the android SDK platform-tools

Add this line in your build.prop After Additional build properties

persist.service.adb.enable=1

And of course the drivers installed for your phone
[Android Software Development] HTC_M7:
Guys whats wrong with my apktool for miuiv5

Thanks

Projects/miui/one/3.5.31/system/framework $ apktool b outres

W: Could not find sources

I: Checking whether resources has changed...

I: Building resources...

invalid resource directory name: /home/Projects/miui/one/3.5.31/system/framework/outres/res/values-largeui-xhdpi

Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 17, --target-sdk-version, 17, -F, /tmp/APKTOOL8337970196936019436.tmp, -x, -S, /home/Projects/miui/one/3.5.31/system/framework/outres/res, -M, /home/Projects/miui/one/3.5.31/system/framework/outres/AndroidManifest.xml] * * * * * * * * * * * * * * * * *

* * * * at brut.androlib.Androlib.buildResourcesFull(Androlib.java:358) * * * * * * * * * * * * * * * * * * * *

* * * * at brut.androlib.Androlib.buildResources(Androlib.java:283) * * * * * * * * * * * * * * * * * * * * * *

* * * * at brut.androlib.Androlib.build(Androlib.java:206) * * * * * * * * * * * * * * * * * * * * * * * * * *

* * * * at brut.androlib.Androlib.build(Androlib.java:176) * * * * * * * * * * * * * * * * * * * * * * * * * *

* * * * at brut.apktool.Main.cmdBuild(Main.java:228) * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

* * * * at brut.apktool.Main.main(Main.java:79) * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 17, --target-sdk-version, 17, -F, /tmp/APKTOOL8337970196936019436.tmp, -x, -S, /home/Projects/miui/one/3.5.31/system/framework/outres/res, -M, /home/Projects/miui/one/3.5.31/system/framework/outres/AndroidManifest.xml] * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

* * * * at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:357)

* * * * at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)

* * * * ... 5 more

Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 17, --target-sdk-version, 17, -F, /tmp/APKTOOL8337970196936019436.tmp, -x, -S, /home/Projects/miui/one/3.5.31/system/framework/outres/res, -M, /home/Projects/miui/one/3.5.31/system/framework/outres/AndroidManifest.xml]

* * * * at brut.util.OS.exec(OS.java:89)

* * * * at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:355)

* * * * ... 6 more
[Android Software Development] sorullo_xgrx:
Same here I haven't being able to figure out the error. I think we need the aapt.exe from miui or something if someone knows please help us
[Android Software Development] fedevd:
Why is more harder patch smalis on official releases than ported unofficial releases? :S

Enviado desde mi GT-I9070 usando Tapatalk 4 Beta
[Android Software Development] Notorious:
http://en.miui.com/thread-4179-1-1.html
[Android Software Development] Notorious:
Did you switch RIL.smali* tree with your device?
[Android Software Development] fedevd:
Yep.. Fixed.. Was the folders inside plus ril smalis

Enviado desde mi GT-I9070 usando Tapatalk 4 Beta
[Android Software Development] hnkumar:
MIUI v5 4.2.x porting issue

Hi,

Can anybody help me here?

MIUI Source - Maguro 4.2.2 - 3.7.5

CM Source - JellyBean 4.2.2 R11

Port Device - DHD

Logcat details - http://pastebin.com/DQ9G7aGH

Advance thanks
[Android Software Development] HTC_M7:
Error Reporting WTF.

No boot right?

How did u compile the frameres and add to zip? Did u remember to package properly? Tell me whats in the apk when u open it which files and folders open in themain.
[Android Software Development] hnkumar:
1) Decompile Base framework & MIUI framework with a tag

2) Modify smalis

3) Compile MIUI framework

4) extract file from compiled file

5) update file to MIUI framework file

Doing like this I don't have to sign the zip file. Everything will happen through script. I used to port 4.1.x of MIUI v5. Stuck with 4.2.2 :(
[Android Software Development] Karolinho:
what base and miui version i should take to port miui to xperia acro s?
[Android Software Development] fedevd:
Any of Nexus S or Galaxy Nexus (Lens_flare adviced that in the beginning of firts post, please read it), just watch what version do you want (v4 or v5) and use developer version, not stable (prevent root headaches)..

Enviado desde mi GT-I9070 usando Tapatalk 4 Beta
[Android Software Development] Karolinho:
Where i can find developer version?

and can i port nexus S 2.8.10 to FXP CM9 base?
[Android Software Development] fedevd:
That is too old.. is from 2012.. I used miuiandroid_maguro_3.22.2 and worked fine for me.. in the first post of Lens_flare you have a link to miuiandroid.com roms repository, take a look..

Enviado desde mi GT-I9070 usando Tapatalk 4 Beta
[Android Software Development] Notorious:
Question to all the devs that port 4.2 based MIUI V5 how do you guys patch your webviewcore.smali for browser to work. I just switched from what I was previously porting from to start porting from Mako and Maguro
[Android Software Development] Karolinho:
3.22.2 is JB and there isnt a stable base on acro s.
[Android Software Development] Rox:
Any help here ?

http://pastebin.com/GM3FFzgy

MIUI v5 (3.7.12) from galaxy nexus (maguro)

ported to CM10 ACE 2

No boot? Can that be because there is framework_ext.jar except framework2.jar ?
[Android Software Development] tathanhlam66:
miui v5 3.7.12 is android 4.2,you need use cm10.1
[Android Software Development] Rox:
But where is problem ? Libs?etc?

Sent from my GT-I8160
[Android Software Development] sorullo_xgrx:
Modify your kernel to add framework_ext.jar to the PATH inside init.rc file as well as shelld service at the end of init.rc
[Android Software Development] Rox:
Thanks, i thought that is problem ;)

I already ported v4 and have shelld service ;)

Sent from my GT-I8160
[Android Software Development] fedevd:
Can be ported using CM10.. Look for polimorph and you will see..

Enviado desde mi GT-I9070 usando Tapatalk 4 Beta
[Android Software Development] Notorious:
No it cannot it HAS to be 4.2. Polimorph ported it from GSM Galaxy Nexus when BurgerZ ported it from Mi2 when it was 4.1 still
[Android Software Development] sorullo_xgrx:
Hey guys has anyone successful decompiled and compile framework-res.apk from nexus 4.2.2 build.. I'm getting error while compiling
[Android Software Development] HTC_M7:
Yea. Need miui aapt.
[Android Software Development] sorullo_xgrx:
I might have an old one, mind sharing that one you are using :D
[Android Software Development] sandy7:
get it from here
[Android Software Development] sorullo_xgrx:
That's the one I'm using but for some reason after done the changes it does not compile complete I guess the apk is like 1 mb smaller than the original
[Android Software Development] sandy7:
does it gives an errors while compiling ?
[Android Software Development] sorullo_xgrx:
It gives me warning something like the api 17 as already being declare in androidmanifest.XML max and min. Api level 17 as already being declare in the manifest
[Android Software Development] sandy7:
did u check if the API's are assigned in apktool.yml?
[Android Software Development] sorullo_xgrx:
Api is 17 inside apktool.yml should I change it to 16..
[Android Software Development] sandy7:
no...hmm any how upload me ur framework ill give it a try .
[Android Software Development] sorullo_xgrx:
Thanks
[Android Software Development] HTC_M7:
http://miui.connortumbleson.com/other/aapt/
[Android Software Development] sorullo_xgrx:
And just to be sure is there another command I have to enter beside apktool if framework-res.apk to install
[Android Software Development] CosmicDan:
Use APKTool 1.4.3 with -r switch (decode resources only). Also, keep the original META-INF folder to retain signature. I dunno if that works though, I just hacked-out signature checking in my ROM.
[Android Software Development] Lens_flare:
have you "apktool if"d both framework-res and framework-miui-res?

so it might be your binaries issue, just carefully look into each folder, it might miss something..

another reason - inputmanager*.smali tree, do you remember what exactly you changed in it?
[Android Software Development] Ozadroid:
1.decompile miuisystemui.apk

2.goto /res/values open drawables.xml

3.delete the line <item type="drawable" name="status_bar_background">#ff000000</item>

and delete the empty line created by removing this line aswell.

4.save

5.Recompile (I used APK-Multi-Tool
[Android Software Development] DJBhardwaj:
Which Rom have you taken as miui base? Miuiandroid or miui.us?
[Android Software Development] Alex93917:
MIUIAndroid.

I've looked it and now, i've this :

11:52:07.427 Error AndroidRuntime 30042 *** FATAL EXCEPTION IN SYSTEM PROCESS: WindowManager
11:52:07.427 Error AndroidRuntime 30042 android.content.res.Resources$NotFoundException: Resource ID #0x111003b
11:52:07.427 Error AndroidRuntime 30042	at android.content.res.Resources.getValue(Resources.java:1022)
11:52:07.427 Error AndroidRuntime 30042	at android.content.res.MiuiResources.getValue(MiuiResources.java:62)
11:52:07.427 Error AndroidRuntime 30042	at android.content.res.Resources.getBoolean(Resources.java:804)
11:52:07.427 Error AndroidRuntime 30042	at com.android.server.wm.WindowManagerService.<init>(WindowManagerService.java:760)
11:52:07.427 Error AndroidRuntime 30042	at com.android.server.wm.WindowManagerService.<init>(WindowManagerService.java:145)
11:52:07.427 Error AndroidRuntime 30042	at com.android.server.wm.WindowManagerService$WMThread.run(WindowManagerService.java:687)
[Android Software Development] Ozadroid:
WindowManager

11:52:07.427 Error AndroidRuntime 30042 android.content.res.Resources$NotFoundException: Resource ID #0x111003b

In framework.jar Goto /android/content/res/ open resources.smali

Goto line no. 1022 there will b an id replace it wid 0x111003b

Reflash!
[Android Software Development] Alex93917:
No change :

12:32:36.673 Error AndroidRuntime 309 *** FATAL EXCEPTION IN SYSTEM PROCESS: WindowManager
12:32:36.673 Error AndroidRuntime 309 android.content.res.Resources$NotFoundException: Resource ID #0x111003b
12:32:36.673 Error AndroidRuntime 309	at android.content.res.Resources.getValue(Resources.java:1022)
12:32:36.673 Error AndroidRuntime 309	at android.content.res.MiuiResources.getValue(MiuiResources.java:62)
12:32:36.674 Error AndroidRuntime 309	at android.content.res.Resources.getBoolean(Resources.java:804)
12:32:36.674 Error AndroidRuntime 309	at com.android.server.wm.WindowManagerService.<init>(WindowManagerService.java:760)
12:32:36.674 Error AndroidRuntime 309	at com.android.server.wm.WindowManagerService.<init>(WindowManagerService.java:145)
12:32:36.674 Error AndroidRuntime 309	at com.android.server.wm.WindowManagerService$WMThread.run(WindowManagerService.java:691)
[Android Software Development] Hikari:
didnt help. black line is still there!...

---------- Post added at 11:42 AM ---------- Previous post was at 11:39 AM ----------

I replaced the whole inputmanager*.smali tree
[Android Software Development] Ozadroid:
it helped me. did u put the miuisystemui.apk in the zip n reflashed after cleaning ??
[Android Software Development] Hikari:
nope. just pushed it via adb and rebooted. but nvm Ill try again later. At the moment I have a more imp issue to solve..
[Android Software Development] Ozadroid:
i also pushed it via adb n it didnt worked.. but worked when i reflashed the rom wid new miuisystemui.apk
[Android Software Development] Alex93917:
Problem solved ! Just bad windowsmanager.smali.

But, my network status is stucked to 2 bars (1 / 3 / 4 Bars is not possible) --> In Status Bars.

How solve this ?! :)
[Android Software Development] v1r0x:
did you replace signalstrength*.smali and RIL*.smali as mentioned in OP?
[Android Software Development] Alex93917:
Yes, it's done, but no change ! :/

---------- Post added at 02:21 PM ---------- Previous post was at 01:57 PM ----------

I've now this problem :

14:17:19.648 Error AndroidRuntime 1607 FATAL EXCEPTION: main
14:17:19.648 Error AndroidRuntime 1607 java.lang.NoClassDefFoundError: com.android.internal.telephony.SamsungMSMRIL
14:17:19.648 Error AndroidRuntime 1607	at com.android.internal.telephony.PhoneFactory.makeDefaultPhone(PhoneFactory.java:136)
14:17:19.648 Error AndroidRuntime 1607	at com.android.internal.telephony.PhoneFactory.makeDefaultPhones(PhoneFactory.java:55)
14:17:19.648 Error AndroidRuntime 1607	at com.android.phone.PhoneApp.onCreate(PhoneApp.java:442)
14:17:19.648 Error AndroidRuntime 1607	at com.android.phone.MiuiPhoneApp.onCreate(MiuiPhoneApp.java:110)
14:17:19.648 Error AndroidRuntime 1607	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:969)
14:17:19.648 Error AndroidRuntime 1607	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3967)
14:17:19.648 Error AndroidRuntime 1607	at android.app.ActivityThread.access$1300(ActivityThread.java:126)
14:17:19.648 Error AndroidRuntime 1607	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1188)
14:17:19.648 Error AndroidRuntime 1607	at android.os.Handler.dispatchMessage(Handler.java:99)
14:17:19.648 Error AndroidRuntime 1607	at android.os.Looper.loop(Looper.java:137)
14:17:19.648 Error AndroidRuntime 1607	at android.app.ActivityThread.main(ActivityThread.java:4437)
14:17:19.648 Error AndroidRuntime 1607	at java.lang.reflect.Method.invokeNative(Native Method)
14:17:19.649 Error AndroidRuntime 1607	at java.lang.reflect.Method.invoke(Method.java:511)
14:17:19.649 Error AndroidRuntime 1607	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
14:17:19.649 Error AndroidRuntime 1607	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
14:17:19.649 Error AndroidRuntime 1607	at dalvik.system.NativeStart.main(Native Method)
14:17:19.649 Warning ActivityManager 293 Process com.android.phone has crashed too many times: killing!

com.android.phone FC.
[Android Software Development] Hikari:
ok! so I tried stage 4 once again, now when I touch a textbox I get the message telling me that the android keyboard has given fc.. any help at this point? Thanks!
[Android Software Development] Ozadroid:
Replace ur RIL*.smali
[Android Software Development] Alex93917:
I've already replaced :

RIL.smali

RIL$1.smali

RIL$RILReceiver.smali

RIL$RILSender.smali

No change. Always stucked to 2 bars, but all work ...
[Android Software Development] Hikari:
Keyboard fixed! Thanks for all your help!!
[Android Software Development] Hikari:
Hi! its me again. This time I come up with MediaProvider not working.. I cant get any media on my sd read.. and in the 'running apps' section of app settings it keeps on telling me that mediaprovider is "restarting".. Any help on this?
[Android Software Development] adyscorpius:
apktool if framework-miui-res.apk

Sent from my One
[Android Software Development] sorullo_xgrx:
Will do thanks. I really have to get it going to fix some bugs on my port. Thanks guys

---------- Post added at 12:18 PM ---------- Previous post was at 12:05 PM ----------

Here is my framework-res.apk
[Android Software Development] 2nd Sky:
Sorry, but my Port failed ;(

updater-script works this time :)

but now, bootloop

and i tryed to get logcat, without luck ;(

CMD sayd by :

.../adb logcat -v long

i added in build.prop

what can i do ? :/
[Android Software Development] sandy7:
well i could compile it back easily ...

the solution is before compiling delete folder res/drawable-ldrtl-xhdpi and then compile it..once finish add this folder from original framework-res.apk using winzip
[Android Software Development] sorullo_xgrx:
thanks for the quick response. I will start the process
[Android Software Development] HTC_M7:
Hey guys what have u been doing for webkit on 4.1.2 miuiv5? The same as guide?
[Android Software Development] Hijacks:
miui-framework.xml

I've searched arround here in forum and in the internet, but found nothing. I try to port MIUI v5 and I'm missing miui-framework.xml.

Like in post one said "go to permissions folder in etc to add:" in no MIUI v5 ROM I've downloaded, there is not miui-framework.xml in /system/etc/permissions.

Can anyone explain me this? Has there be changes in porting to MIUI v5? Can someone make a summary what changed on MIUI v5 porting?
[Android Software Development] Notorious:
miui-framework.xml was removed in v5
[Android Software Development] Hijacks:
And from where do you have that information. Can you tell me any other things that have changed what is nessesary for successful miui porting.
[Android Software Development] Notorious:
Well if its not in the rom anymore it was removed :p
[Android Software Development] Hijacks:
This is not a satisfactory answer. Is there any other file that have the funktion of former miui-framework.xml. I dont't think they just removed a file, they've changed the kind it works.
[Android Software Development] Notorious:
Nope removed completely. Not needed anymore
[Android Software Development] fedevd:
Why not? v5 differs in a couple things than v4.. Files, framework.. "invoke-as" was removed too.. In fact "com.google.xxxxx" (/system/etc/permmissions/) named on OP was removed too..

Enviado desde mi GT-I9070 usando Tapatalk 4 Beta
[Android Software Development] Hijacks:
Thanks very much. Thats an answer i expected from my prvious post. Are there any other things to now for porting V5.
[Android Software Development] twitish:
I agree. I have successfully ported MIUI v4 numerous times but have yet to give v5 a go. What are the main differences in porting now? Can anyone maybe make a new guide or even just a few general suggestions? Any help is appreciated by the entire community.
[Android Software Development] fedevd:
Hmmm, nope, doesn't have to do a new guide 'cus this is the most detailed guide you will find, do you wanna know why? 'cus with this guide you will be able to port MIUI without any knowledge of smali's (most heavy and extensive port proccess). Now it's where your knowledge about Android itself gets in, plus common sense. All you need to do is move the named files in OP and start debbuging ("debbuging" means logs to understand what is happening). That's why everyone in guides says: "you need knowledge about basic debbuging". You can be totally new in port's without any knowledge, with this guide you will be able to port it anyway, will cost you more than everyone.. Beside that, here you will find a lot of fixes or how to solve issues of an extensive list of possible, and not so possible, errors.. The process is really simple, just move files and after start with logs to see what smalis, or kernel, have to be diffed and patched.. I know than are a couple changes beteewn v4 and v5, but you will be able to fix it doing logs and understanding what means every item in it.. Niko (Lens_flare) can't do a more detailed guide 'cus every device differs from the other so doing a guide much more detailed will result in a 50 pages of guide... This is a guide of basic and common tasks to do, the rest is knowledge, common sense and researchs..

Enviado desde mi GT-I9070 usando Tapatalk 4 Beta
[Android Software Development] HTC_M7:
Haha saw post way back. Use same method as porting guide for webkit. webview entire tree is important make sure not only webviewcore.
[Android Software Development] twitish:
Appreciate the reply. And no worries, I'm not bad at reading these logs since I started porting MIUI. I was just seeing if there were any major changes in porting v5 compared to v4. I've read up on the framework2.jar (or whatever the name of the file is, the MIUI specific one you need to add to your kernel init), and there's no more invoke-as and so on. Didn't know if anyone had made a list of the changes specifically so as to avoid those "Wow I'm stupid for not copying that over" moments. I guess I'll just jump in head first today and hope for the best.
[Android Software Development] Hijacks:
Nobody said that a new or more detailed guide is needed, but a little summary of changes from v4 to v5 would be very nice.
[Android Software Development] fedevd:
Dude, read comment #2195..

I repeat, move the named files in OP, then the system itself will tell you on the logs what smalis needs to be diffed or what files has to be added..

I wish that too xD.. But the port procces is not a 3 steps things.. The bad side of porting project is that for sure you will have a files mess.. For sure you will forgott a file or any other thing.. Porting always is a mess so don't feel stupid for anything, you're human so you can have errors (=

Enviado desde mi GT-I9070 usando Tapatalk 4 Beta
[Android Software Development] Hijacks:
I've read your comment and are right in all what you wrote. But as you wote in post #2193 "v5 differs in a couple of things than v4" I hope you understand my wish for a little summary.
[Android Software Development] fedevd:
I can't tell you what diff are.. Just move the files in the first post, if you can't find "x" file, just leave it and continue with the next, then is just a log matter.. The log will tell you what do you need to do..

Enviado desde mi GT-I9070 usando Tapatalk 4 Beta
[Android Software Development] Zehlek:
Can I use Mako 4.3 as a base to upgrade Miui 3.7.19 for Mako?
[Android Software Development] thehacka1:
Yes you can. But you might have nasty side-effects.

---------- Post added at 12:54 AM ---------- Previous post was at 12:52 AM ----------

A little help please. Trying to port MIUI V5. I've patched up everything and it won't boot. Logcat is here: http://pastebin.com/1REs5tBc
[Android Software Development] fedevd:
Line 987:

E/PhonePolicy( 314): Could not preload class for phone policy: com.android.internal.policy.impl.PhoneWindow$ContextMenuCallback

Decompile "android.policy.jar" and diff that smali located in "/com/android/internal/policy/impl/PhoneWindow*.smali"..

For more clear logs do "adb logcat -c" and then "adb logcat >name.txt" (Ctrl+C when is around 100-150 kb) (=
[Android Software Development] thehacka1:
Now I get this: http://pastebin.com/j2t8NQJP Please help. It always boot loops when starting the connectivity service. :(
[Android Software Development] fedevd:
Still the same issue

Enviado desde mi GT-I9070 usando Tapatalk 4 Beta
[Android Software Development] thehacka1:
How do I fix it? I tried patching but both files are the same. I tried replacing but it still didn't work.
[Android Software Development] fedevd:
Replacing the whole "PhoneWindow" tree?
[Android Software Development] Notorious:
what are you porting? MIUI V5 4.1 or 4.2 or MIUI V4?

Some things i noticed off a quick glance is libmmparser.so' not found and libmmparser_lite.so' not found so add those from rom your porting. Ill edit this post when i notice anything else

---------- Post added at 08:40 PM ---------- Previous post was at 08:10 PM ----------

Also a new updated guide is available here http://en.miui.com/thread-5643-1-1.html
[Android Software Development] twitish:
Thank you my friend!! That updated guide is exactly what I was looking for!! Now to start over and put my better foot forward!
[Android Software Development] Rimmer1966:
Wonder if anyone has any advice for me? Thanks to this guide I've managed to port MIUI v5 4.2.2 from the Galaxy Nexus to my Xperia T

Everything seems to work great, RIL, WI-FI , Camera etc.. The only thing not working is GPS. Any app that uses GPS just says "Searching for GPS" constantly, I'm not even getting the GPS icon in the status bar. I've been thru the logcat but can't see anything obvious. Anyone else had the same issue or anything similar?

Any help would e greatly appreciated.
[Android Software Development] Zehlek:
I tried THIS METHOD to use [MENTION=1778279]Datsun.510[/MENTION] rom and 4.3 leak as a base and I got stuck at Bootanimation
[Android Software Development] Notorious:
Youre trying to port a 4.2 rom on top of a 4.3 rom :eek: thats why. Also without a logcat you wont get any help