yashsingh1/xdaforums huggingface dataset:
[Android Software Development] noidz:
Hi!

i want port miuiv5 on cm11.

My desireHd reboot after home launcher.

Some error on my log and i don't know how to fix it.

W/System.err( 2113): Caused by: libcore.io.ErrnoException: open failed: ENOENT (No such file or directory)

W/WhiteListObserver( 2495): please add exist folder! [/storage/sdcard0/Android/Tencent/tencentWeibo]

V/SimpleConfigParser( 2495): invalid line (comment or empty) """"""

E/SQLiteDatabase( 2575): Failed to open database '/data/user/0/com.android.email/databases/Extral_Provider.db'.

E/WindowManager( 1866): Unknown window type: 2997

W/System.err( 2688): java.io.FileNotFoundException: /proc/2279/cmdline: open failed: ENOENT (No such file or directory)

W/ContextImpl( 2795): Unable to create cache directory /data/data/com.android.bluetooth/cache

E/SQLiteDatabase( 1866): android.database.sqlite.SQLiteDiskIOException: disk I/O error (code 3850)

E/SQLiteDatabase( 1935): Failed to open database '/data/data/com.android.systemui/databases/analytics_com.android.systemui_6.db'.

E/SQLiteDatabase( 1935): android.database.sqlite.SQLiteException: not an error (code 0): Could not open the database in read/write mode.

It's a problem with SELINUX or framework.jar or service.jar?

Can you help me?

My log is
[Android Software Development] Slimegod:
Can someone take a look at this log for me: http://pastebin.com/KGsVVk97
[Android Software Development] Tyrany:
Guys is this working really to make a miui v6 port? https://github.com/miui-v6
[Android Software Development] ZduneX25:
Nope.
[Android Software Development] Slimegod:
Can MIUI v6 be ported to cm12 lollipop?
[Android Software Development] Aaahh:
Way too much work, system apps are packaged differently now...
[Android Software Development] Slimegod:
Yeah I heard. Trying to build a AOSP ROM so I can try to port it as we speak. Running into "no private recovery resources for TARGET_DEVICE d2lte" error. Trying to see what that errors is.
[Android Software Development] Aaahh:
I have no clue what it is without the other lines,

I have

D/dalvikvm( 2183): Added shared lib libnativehelper.so 0x0

D/dalvikvm( 2183): No JNI_OnLoad found in libnativehelper.so 0x0, skipping init

E/dalvikvm( 2183): ERROR: couldn't find native method

E/dalvikvm( 2183): Requested: Landroid/content/res/AssetManager;.addOverlayPath:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

E/dalvikvm( 2183): JNI posting fatal error: RegisterNatives failed for 'android/content/res/AssetManager'; aborting...

I/dalvikvm( 2183): "main" prio=5 tid=1 NATIVE

I/dalvikvm( 2183): | group="main" sCount=0 dsCount=0 obj=0x41ea3d68 self=0x41e92408

I/dalvikvm( 2183): | sysTid=2183 nice=0 sched=0/0 cgrp=default handle=1073832276

I/dalvikvm( 2183): | state=R schedstat=( 170073803 6072342 32 ) utm=12 stm=5 core=2

I/dalvikvm( 2183): #00 pc 0000132e /system/lib/libcorkscrew.so (unwind_backtrace_thread+29)

MOVED ON:

http://pastebin.com/Dri4Vjsx
[Android Software Development] CosmicDan:
It means you have a native method "addOverlayPath" declared but it doesn't exist in whatever library. Don't do it dirty by replacing lib files - edit the AssetManager smali manually and remove the delcaration (and all calls) to this "addOverlayPath" native method. You may need to write your own replacement from scratch to replicate its function, my rough guess is it's something to do with theme engine.

Alternatively you COULD get the lib file from MIUI ROM and replace your devices one, but this will likely break much more than it will solve. To find the correct lib, just do a recursive text search in the MIUI rom for "addOverlayPath" and it should only match one file.

Is there a reason you're not using PatchROM?
[Android Software Development] Aaahh:
I don't know what patch ROM is

I'm interested in this.

. To find the correct lib, just do a recursive text search in the MIUI rom for "addOverlayPath" and it should only match one file.

How do I search?
[Android Software Development] CosmicDan:
PatchROM is a set of scripts used to "patch" a stock/AOSP firmware with MIUI injections. It's universal and developed by Xiaomi themselves, as they use it for all non-Xiaomi devices. But last I heard MIUI is dead for non-Xiaomi devices, not sure if that's true - if it is, PatchROM would also be dead.

How do you search? With a text editor or grep on the console, very basic developer stuff mate.
[Android Software Development] Slimegod:
Yeah there's no codes for v6 and v5 is pretty much dead. There's a guy who's porting v6 manually for the Nexus 5 I think. Other than that yeah it's dead. I'm trying to revive it for the s3 if I can. Trying to build AOSP for my device and possibly try porting it and take it from there. But building AOSP is totally different then cm. I'm hung on this kernel error atm so we'll see.
[Android Software Development] CosmicDan:
Forgive my ignorance and slightly off topic question; what's the highlights of MIUIv6? I'm on lollipop AOSP + Xposed these days, though I'll always have an interest in MIUI porting as it's what lead to my professional work in Android development :)

From what I know, its only for Xiaomi devices and others get an APK that isn't much more than a custom launcher + apps. Correct?

I never ported from a Xiaomi device, they intentionally offload a lot of code into native libraries for them last I checked - making porting near impossible.

Building AOSP is much easier if you have a CM device tree, I've done it before (albeit for CM10). The trick was to use the CM build system (I.e. everything in build/) but AOSP for everything else. You can use your s3 device tree from cyanogenmod in your AOSP-ish kitchen this way, though you'll need to strip and edit some make files manually (e.g. removing cm references to /vendor).

I always use cyanogenmod build system myself, despite never building an actual cm firmware - its far better than AOSP's.

EDIT: You'll also get errors about missing libraries and intermediates though, most of these are missing build tools from external/ - its nothing an experienced hacker can't handle though :) you may want to download whole cm reposet however to make it easier to find the missing stuff (glorious recursive text searching again). Obviously this won't be 100% AOSP but ~95%.

EDIT2: Are you saying there's no unofficial MIUIv6 at the moment? Maybe it's time for another CosmicDan world-first xD

Sent via Tapatalk on my Xperia Z
[Android Software Development] Tyrany:
Picture miui 6 as a child of ios 7 and lollipop in android 4.4 =) , miui theme engine, cool animations, more minimal and white

from what i get in their foruns they even struggle to keep updated their phones =P

*this tool dont patch files but help merge this to port miui to aosp rom =)
[Android Software Development] Slimegod:
Maybe someone can chime in about the highlights of v6 because I'm really not to sure. Sounds crazy because I want to port it. But I honestly just want to see if I can do it. But a developer has done me for the Nexus 5, manually. As far as for building the AOSP I pretty much do what you've mentioned in use this being that it's already for the i9300 device https://github.com/SuperNexus/android_manifest. Use the cm11 muppet repo but remove the kernel tree and just sync my device tree alone. But when I built the kernel and moved it to the proper directory it's saying a error "no rule to make target d2_config" referring to the kernel. So I'm kinda stuck.
[Android Software Development] Tyrany:
I have the unoficial and a beta port, if you tell me what you want to see i can make a video showing
[Android Software Development] CosmicDan:
So in general, same MIUI goodness. I'm getting a little sick of Xposed module bugs so I think I might take a crack at it.

Best approach would be to diff MIUI6 firmware with AOSP firmware (framework obviously is the bulk of work) for the same device; assuming they still do AOSP releases for Mi devices. Or was that a one off thing, AOSP for Mi devices?

Sounds the most difficult part would be re-engineering native methods that we have no source access to, but usually they are simple and one can guess on their expected function/result by whatever code uses it. General reverse engineering stuff I know, easier said than done!

Sent via Tapatalk on my Xperia Z
[Android Software Development] fedevd:
[MENTION=1844875]CosmicDan[/MENTION] yup, lot of modules are buggy or bad implemented.. MIUI is an interesting rom but I got tired of the same Apple UI. Xiaomi have a good design team who can develop a newer clean, fresh and nice UI but they don't idk why.. Anyway, port it will be harder from a Xiaomi device, it always was and will require a lot of time just to port it (beside the hours of bugfixing derivated to porting job).. I followed your MIUI works, your capacity or knowledge to this and I think, imho, that will be bettee if you focuse your atention on creating a new UI, that will be more interesting than wasting time on MIUI ports.. I mean, I think that instead if porting it, why not find some designers and create a new UI? Like MIUI inits ('created' a new UI, then just modded some apps, then just made a whole rom). If you create a new UI, the rest will come alone.. I am not talking about features, just a new UI, you can find a looooot of interesting ideas on, in example, DeviantART.. Then if you see that it get some progress you can choose mod some apps, add some features nd pack it as a rom. At this Android scene stage, we have a looooot of things that can make it easier than Froyo or Eclair times..

Beside that, Xposee modules bugs are a pain in the ass in lot of cases but I got tired too of Apple's UI too used on MIUI. That's why I don't use MIUI looooong time ago (no MIUI on Yuga nad no MIUI on Mako). MIUI have a lot of interesting built-in stuffs that make it an interesting rom but it's so so so closed that sometimes get sick and sucks.. Wasting time porting it from a Xiaomi device (more difficult than port it from a non-Xiaomi device) is too much time that can be wasted in newer projects..
[Android Software Development] CosmicDan:
Indeed and well said. That's why I went back to AOSP; Xposed is nice for its pick-and-chose visual modding capability. Bugs aside, Xposed puts a *very* heavy strain on general runtime performance - even when no modules are enabled - so I'm keen to ditch it.

I thought MIUI6 is/was only available for Xiaomi devices. Is this no longer the case?

Funny you say that, GUI design is something I've done for many years and I do enjoy it :) my latest work can be found here - https://youtu.be/_Sr5K78ZsZI not the video itself, but the UI on the TV screen. Not exactly Android and more Metro inspired and big-screen friendly but yeah. Video doesn't show my custom alerts/dialogs and other controls, but yeah.

Forgive the digression that may seem like an excuse to brag, it does have a point haha. I work on headless Android hardware professionally - these media boxes and such - and I have had plans to make a skin for Android especially for these boxes, but to make a UI that transfers well to both small and big screens (since I hope to one day try again with our mobile division). It's a risky and tricky thing to do though, Microsoft are trying with Windows 10 again after the miserable failure that was 8...

I've considered doing a full-blown reverse engineering of MIUI's Theme engine, among other things - but time is never on my side.

Err... Where was I? Nowhere :)

Anyway, I've taken enough off-topic time here I think! But I like your idea, too many custom ROM's these days and they're all just Cyanogenmod/AOSP clones that bring nothing really new, at least in regards to overall interface and identity. Since I'm a workaholic I would indeed like to work on something that I can use both professionally and for the community, at least in regards to GUI.

If/when I do, I'll be sure to blog about it at least - so I invite you to check cosmicdan.com for any future developments I might make in this area :)

Thanks guys!

Sent via Tapatalk on my Xperia Z
[Android Software Development] fedevd:
You said it: 'they're all just Cyanogenmod/AOSP clones'

Android had a lot great developers, designers, etc. but the only one who changed the entire UI was/is MIUI. I like Lollipop UI, it fits to this modern times that everything gotta look nice too but I am rally crious about why nobody beside MIUI made a new full UI, hu? Anyway, I will take a look to your work, I know about your Android knowledge and I know that you're really enthusiast and give the best effort so I know that you make interesting stuffs.. Dinner time, see ya..

Guys, MIUI v6 it's morr harder than v5 or v4 and bettee wait for Lollipop based roms to port it..
[Android Software Development] CosmicDan:
Actually, the reason is simple. In order to comply with Google certification, the device must pass CTS which includes Holo UI tests - what this means is that if anything is themed or changed too much like MIUI does, then Google license is void and they're technically not allowed to bundle Play Store and any other Google app. This is the whole reason why gapps are separate, because nobody bothers with CTS testing (except Cyanogenmod) and even with CTS passing, commercial companies still need Google approval.

Just a little industry info for all :) It's one of many reasons why I think Xiaomi/MIUI will never succeed outside Asia and the android underground. Well, commercially speaking anyway.

I think this is also why so many Roms are just AOSP/CM clones - they have hopes to go mainstream commercial, or even to be acquired by Google.

Sent via Tapatalk on my Xperia Z
[Android Software Development] Tyrany:
i'm trying to port miui camera, but dont know this error =S

can someone share some lights?
[Android Software Development] CosmicDan:
I'm guessing you didn't sign the APK with matching platform cert for your base firmware. It could be a missing/wrong permission in manifest but I've always seen logs mention missing permission when this is the case, no such thing here. Seems camera is trying to access JNI directly, which means platform-level certificate (system UID) is required.

Sent via Tapatalk on my Xperia Z
[Android Software Development] Slimegod:
CosmicDan being that you have knowledge building AOSP I'm having issues building my kernel. Here's the error. Looking online but I can't find a fix.
[Android Software Development] CosmicDan:
You couldn't copy/paste text instead of screenshot? Anyway looks like the kernel isn't being compiled at all, its just looking for already-compiled image (the zImage before its compressed with zlib). I think, I'm not sure sorry its been a long time since I used AOSP SDK. Are you using CM build tools? Maybe something like 'make kernel' is all you need to do. Or you can build kernel however which way and manually put the 'image' file at the requested location in target.

Sent via Tapatalk on my Xperia Z
[Android Software Development] Slimegod:
Yeah didn't think any copying and pasting. Was told the source code is broken anyway so no build from source could be made. Would have to manually port.
[Android Software Development] CosmicDan:
Building from source is not important for MIUI I don't think, since MIUI itself is closed source you'll be doing all the work in smali anyway. A clean ROM would help simplify things, but not essential.

What's important is getting firmware for a device that has both AOSP-ish and MIUI versions. Decompile and diff the frameworks (and whatnot) between the two in order to find the MIUI overlays/additions.

If that's not possible, then start whacking-in core apps (starting with SystemUI is a good bet) and manually resolve every missing method... Which is a massive task. But possible. It's fixing the bugs with *changed* code that presents no logcat errors which is the hardest part, but still possible. I did it back in GB days in about a fortnight of fulltime work.

Sent via Tapatalk on my Xperia Z
[Android Software Development] Slimegod:
I see.
[Android Software Development] CosmicDan:
Lol, that's all?

Anyway, I've tried looking into this main approach (one device with both official MIUI6 and AOSP to diff them) but either the MIUI scene is more fragmented these days than my Google skill can handle or it simply doesn't exist. Xiaomi might not have released sources/device tree/whatever for any v6 Mi devices yet I guess...?

If anybody finds anything, please share it with us!

Sent via Tapatalk on my Xperia Z
[Android Software Development] Slimegod:
No I was just trying to soak all of what you said in lol. I was playing when patchrom until they stopped v5 projects. Never was able to get it to boot. Then I just dropped it and started building cm unofficial for personal use. I tried building AOSP a long time ago and was stuck at his same point I'm at now and never got past it. Got back into it when v6 came out. I just wanted a AOSP build from my hands and hard work you know. Everything you're saying makes sense though. I'm use to dealing with smali codes from patchrom and dealing with rejects. Not that complicated just tedious.
[Android Software Development] fedevd:
Hey Kamil, whats up? I was trying to talk to you, send me a PM with your Whatsapp or Hangouts contact, I lost your :P

Patchrom v6? Looks like you have app issues, did you used deodexed as base? I didn't have any issue like that but I had a non-radio build and some other weird errors using TWRP, never worked with CWM..
[Android Software Development] ZduneX25:
Patchrom V5 kitkat been replaced with V6 kitkat so i used the same base, faced 7 easy to fix rejects, but cannot get pass through bootanimation...
[Android Software Development] fedevd:
[MENTION=1844875]CosmicDan[/MENTION] we need you around here mate, your knowledge could help us with v6 Patchrom!! Can we talk over Hangouts?
[Android Software Development] CosmicDan:
Sorry mate, ultra busy with work atm (deadline this week).

I've seen this kind of thing before, dexopt dependency failures but its very cryptic. What is this "miui.apk" about?

EDIT: I've also been out of the loop for a while, never used KitKat PatchROM so I'm not sure I'd be much better help.

Sent via Tapatalk on my Xperia Z
[Android Software Development] ZduneX25:
Hard to say patchrom does not even decompile this miui.apk file, just copy and paste into rom, however they do provide following binaries: https://github.com/MiCode/patchrom_miui/tree/v6-kitkat/XXHDPI/system/bin and most of 'porters' they are using stock binaries instead (to get xposed working for example). Like: https://github.com/imanesaurus/patc...mmit/947e7f1d102f314045ff866d431f0c7c58eb137f
[Android Software Development] fedevd:
I preffer keep trying with Patchrom. We can build without any error for a Nexus 4 but it can't boot, we can't find if we need some specific changes on kernel or system.. I diffed a working kernel with mine and no specific changes, made some changes on build.prop and other minor changes and still not being able to make it boot, weird in my case 'cus I built v5 without no big changes, just some lines in the kernel and that's all but v6 cost me more than I thought
[Android Software Development] ZduneX25:
[MENTION=1844875]CosmicDan[/MENTION] all in bootcalsspath and all are fremaworks, i do resing it and most of apps with platform key, using miui's binaries at the moment

oh take a look they coded these in smali: http://pastebin.com/dBqVK4zB (who does that :eek:), moreover [MENTION=3531145]fedevd[/MENTION] just took base pure aosp kernel w/o specyfic bootclasspath and his patchrom's build booted, caught me confused..

build log: http://pastebin.com/UKF3EafU
[Android Software Development] CosmicDan:
Doesn't mean they were coded in smali, final static fields compile that way. Simple then, change those paths :) or you need those APK's in preinstall, they might intentionally point to data so theme manager or something can modify them.

Sent via Tapatalk on my Xperia Z
[Android Software Development] Slimegod:
Fedevd or Zdune either of you build AOSP from source? I'm trying it for my s3 but I think the source is broken I'm using the source code from here https://github.com/AOSP-S4-KK/platform_manifest/commits/kk-4.4 and supernexus and just adding my device tree.
[Android Software Development] Slimegod:
Been like 2yrs since I built patchrom so my memory about certain errors are vague. How do I fix this.

Edit: thought I installed apktool when I updated Linux :banghead:
[Android Software Development] CosmicDan:
Patchrom includes its own apktool, but its crashing. I can't tell why because you too a photo of your screen lol.

You can try replacing apktool jar with latest beta.

Sent via Tapatalk on my Xperia Z
[Android Software Development] Slimegod:
Yeah I switched it and it's still crashing. Errors I see are "expection in thread " main" java.lang.UnsupportedClassVersionError :brut/apktool/Main : Unsupported major.minor version 51.0" the one at the end is "recipe for target 'out/apktool-if' failed.

---------- Post added at 03:10 AM ---------- Previous post was at 02:44 AM ----------

Edit: the error is from apktool the version like Cosmic said. But I switched it and still getting that error, why I'm not sure.
[Android Software Development] CosmicDan:
If you googled this error you would have found that this means you need JDK 1.7, but you have something older (probably 1.6).

Sent via Tapatalk on my Xperia Z
[Android Software Development] Slimegod:
Yeah I did Google the error and updated my Java jdk now this is the new error http://pastebin.com/KRUydehj

Edit: I'm wondering if its the version of Linux I'm running. When I was on 14.04 I had no issues. I'm on 15.04 now.
[Android Software Development] CosmicDan:
No, its clearly a patchrom bug. Or you did something wrong. As the error says, there are two resources with the same public value. Fix it manually.

Sent via Tapatalk on my Xperia Z
[Android Software Development] fedevd:
[MENTION=1844875]CosmicDan[/MENTION] can you take a look at this error please?

https://github.com/MiCode/patchrom/issues/83

I have it running '../tools/releasetools/ota_target_from_phone -r'. That script calls other scripts located on https://github.com/MiCode/patchrom_tools/tree/v6-kitkat/releasetools. It's clearly a '/data' mount error. That happens only with CWM recovery. If I use TWRP I had no error but the RIL/wifi doesn't work so I wanna fix that CWM dump error to see if dumping with that recovery I have wifi/RIL working..

I made a logcat (I don't have it here now to upload it) of the build created with TWRP and looks like the wifi works but in some stage fails, maybe creating the interface 'wlan0' or some missing bin, idk, I can't find where fails and it's not a reject issue, [MENTION=3141383]ZduneX25[/MENTION] fixed the ones related to GSM/CDMA smalis.. I am getting really angry whit this frustrating issue now :@
[Android Software Development] CosmicDan:
I have no idea. PatchROM is not the most resilient script, simply because its impossible to test with every single device and recovery.

In this case I would null-out the data extraction part and manually perform it in shell myself. Or you can make two dumps, one with TWRP and the other with CWM, and diff them to build your own stockrom.

MTK patchrom was terrible and I remember modifying it a lot to get it to work. Just examine the script and make the necessary changes for valid commands, probably whatever version of busybox your recovery has is unexpected version (e.g. mount applet is missing filesystem autodetection).

I highly doubt the recovery in use is the cause of RIL/Radio not working but, seems unrelated. 90% of the time patchrom will never make a 100% working ROM so be prepared to manually edit smali.

Sent via Tapatalk on my Xperia Z
[Android Software Development] Slimegod:
Yeah I did, I deleted the sw600dp-nodpi, both files, error still exists.

Edit: think it's the ROM I'm using when doing the tools/releasetools command. I'm using slimrom due to the fact that it's closer to pure AOSP. Was reading up that someone also had the same error while trying to run "apktool if" using slimroms framework-res.apk. So I'm not sure for certain if that's it but it had the same line with the sw600dp-nodpi error. While I was doing patchrom for v5 I used omni so may just go back to that. Thanks for the help Cosmic :thumbup: