yashsingh1/xdaforums huggingface dataset:
[Android Software Development] Tyrany:
Even if the items in BOTTCLASSPATH don't exist, should i keep or remove them???

It gives me this error on boot

D/dalvikvm(11798): Unable to stat classpath element '/data/app/com.miui.sdk-1.apk'

D/dalvikvm(11798): Unable to stat classpath element '/data/app/com.miui.sdk-2.apk'

D/dalvikvm(11798): Unable to stat classpath element '/data/app/com.miui.framework-1.apk'

D/dalvikvm(11798): Unable to stat classpath element '/data/app/com.miui.framework-2.apk'

D/dalvikvm(11798): DexOpt: load 18ms, verify+opt 62ms, 535236 bytes

W/dalvikvm(11752): DexOpt: weird deps length 2104, bailing

D/dalvikvm(11799): Unable to stat classpath element '/data/app/com.miui.sdk-1.apk'

D/dalvikvm(11799): Unable to stat classpath element '/data/app/com.miui.sdk-2.apk'

D/dalvikvm(11799): Unable to stat classpath element '/data/app/com.miui.framework-1.apk'

D/dalvikvm(11799): Unable to stat classpath element '/data/app/com.miui.framework-2.apk'

D/dalvikvm(11799): DexOpt: load 7ms, verify+opt 14ms, 175748 bytes

W/dalvikvm(11752): DexOpt: weird deps length 2104, bailing

D/dalvikvm(11800): Unable to stat classpath element '/data/app/com.miui.sdk-1.apk'

D/dalvikvm(11800): Unable to stat classpath element '/data/app/com.miui.sdk-2.apk'

D/dalvikvm(11800): Unable to stat classpath element '/data/app/com.miui.framework-1.apk'

D/dalvikvm(11800): Unable to stat classpath element '/data/app/com.miui.framework-2.apk'

D/dalvikvm(11800): DexOpt: load 4ms, verify+opt 4ms, 127900 bytes

W/dalvikvm(11752): DexOpt: weird deps length 2104, bailing

D/dalvikvm(11801): Unable to stat classpath element '/data/app/com.miui.sdk-1.apk'

D/dalvikvm(11801): Unable to stat classpath element '/data/app/com.miui.sdk-2.apk'

D/dalvikvm(11801): Unable to stat classpath element '/data/app/com.miui.framework-1.apk'

D/dalvikvm(11801): Unable to stat classpath element '/data/app/com.miui.framework-2.apk'

D/dalvikvm(11801): DexOpt: load 4ms, verify+opt 5ms, 125868 bytes

W/dalvikvm(11752): DexOpt: weird deps length 2104, bailing
[Android Software Development] Notorious:
No idea
[Android Software Development] datagutt:
I sorted all the UserEnvironment/Path and dex errors. Stay tuned, might get this booting soon
[Android Software Development] Tyrany:
Did u get dex errors? On my paranoid Android base i get a lot o those how did u solve them?
[Android Software Development] rharshit:
So, using cm or aosp as base depends on device. But what difference does it make?

I'm sure MiUi won't be based on cm.

1 more thing. I'm gonna port it for armv6 devices. They use the older webview, hence older WebKit and libraries too. So in framework, I need to change them too, right?
[Android Software Development] datagutt:
I got the same error previously, and i bypassed it, but a very hard-to-fix error appeared afterwards

EDIT: Remove the pref_lock_acq call
[Android Software Development] rharshit:
See if you have "dalvik.vm.execution-mode" in build.prop.

If yes, set it to int:fast and try to boot again
[Android Software Development] Notorious:
How is everyone else's patchrom journey going
[Android Software Development] bihariel:
no, that line is not present in build.prop
[Android Software Development] Notorious:
[MENTION=3531145]fedevd[/MENTION] have you started on patchrom guide?
[Android Software Development] fedevd:
Not yet, i'm still studing the source, learning how it works and how to set it up.. Mostly I am looking a way to create a general source and not just for official devices and after that I will look what to add, what not, etc.. Besife that I am building for Nexus 4 and I am facing some issues caused by a wrong values on makefile..

I ported v6 like 3 times using CM, AOSP and PA and I had dextop issues, kickstart errors, flashed wrong camera drivers and a lot of stuffs and didn't booted.. Maybe I had missing libs or bins.. I will try tomorrow again with v6 and I will let you know if I fix it..

Anyway, will be better if we make a list of v6 needed files.. Will take a look tomorrow at night..
[Android Software Development] datagutt:
[MENTION=3531145]fedevd[/MENTION] I actually was wrong about fixing the UserEnvironment error, thought i did fix all the dex errors (MIUI6 is very similar to tablet ROM when it comes to porting).

Omni is a solid base, but Xiaomi changed so many core system libraries, and replacing them requires you to replace a lot of other libraries and suddenly you have a non-booting ROM.

For example, they did changes to libmedia_jni, which libstagefright calls and replacing libstagefright looks like a dead-end.
[Android Software Development] fedevd:
Yep, I assumed that it had to port it like the tablet way.. That was another thing, which files use and which not 'cus ended in a blind state: nothing on logs. I was digging around and I took note about some files but still bootlooping..
[Android Software Development] Slimegod:
I'm wondering if they actually purposely made it that way so v6 can't be ported at all because like datagutt said if you replace one lib, it offsets the other and whatever you replace it offsets something else and it's just a dead end and it just isn't booting.
[Android Software Development] Tyrany:
good morning everybody

W/dalvikvm( 1039): DexOpt: weird deps length 2104, bailing

W/dalvikvm( 1039): Cached DEX '/system/framework/android.test.runner.jar' (/data/dalvik-cache/system@framework@android.test.runner.jar@classes.dex) is stale and not writable

I/dalvikvm( 1039): Unable to open or create cache for /system/framework/android.test.runner.jar (/data/dalvik-cache/system@framework@android.test.runner.jar@classes.dex)

W/dalvikvm( 1039): DexOpt: weird deps length 2104, bailing

W/dalvikvm( 1039): Cached DEX '/system/priv-app/CalendarProvider.apk' (/data/dalvik-cache/system@priv-app@CalendarProvider.apk@classes.dex) is stale and not writable

I/dalvikvm( 1039): Unable to open or create cache for /system/priv-app/CalendarProvider.apk (/data/dalvik-cache/system@priv-app@CalendarProvider.apk@classes.dex)

why does this error appear?
[Android Software Development] Notorious:
Went from 43 rejects down to around 10ish hopefully I did all most of them right [emoji120]
[Android Software Development] fedevd:
Gimme your Hangouts contact, I wanna test a porter script
[Android Software Development] bihariel:
Could you guys helpme on my port, as i said before, the rom can almost boot, it even shows a litlle of the interface during a half second, then it vibrates and then it reboots:

you can see the errors here: http://xdaforums.com/showpost.php?p=55063453&postcount=2565

They are strange errors like:

18:04:09.498 Error AndroidRuntime 1782 FATAL EXCEPTION: main
18:04:09.498 Error AndroidRuntime 1782 Process: com.amap.android.location, PID: 1782
18:04:09.498 Error AndroidRuntime 1782 java.lang.RuntimeException: Unable to instantiate service com.amap.android.location.NetworkLocationService: java.lang.ClassNotFoundException: Didn't find class "com.amap.android.location.NetworkLocationService" on path: DexPathList[[zip file "/system/framework/com.android.location.provider.jar", zip file "/system/app/AMAPNetworkLocation.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
[Android Software Development] datagutt:
Even though it "almost boots", MIUI has done changes to some libraries (namely libmedia_jni, or so i suspect). To fix the most important error (UserEnvironment error), you need to replace this file. After replacing the file, it will error due to a missing method in libstagefright. Replacing libstagefright.so with MIUI-version will cause your ROM to get stuck at "Netd starting..".
[Android Software Development] bihariel:
Ok, thank you, so no way to port this .... damn
[Android Software Development] utingbato:
here is my logcat..

https://www.box.com/s/46db51f3a6d40b8ee074

thank you
[Android Software Development] CosmicDan:
08-13 03:39:07.505: E/dalvikvm(1266): Requested: Lcom/android/server/PowerManagerService;.nativeStartSurfaceFlingerOffAnimation:(I)V

Follow the guide dude.
[Android Software Development] utingbato:
i see.. even it same rom? miui galaxy w and cm9 glaxy w.. i just update the base rom..

thank you
[Android Software Development] CosmicDan:
You haven't done the PowerManager smali patch in the guide. Yes, my Xperia Play port is based on CM9. If you're habing trouble with that you might want to stop, it takes a LOT of work to fix all the bugs when basing on CM9 instead of stock. Steps that Lens_Flare doesn't go in to because it's extensive and varies per device.
[Android Software Development] utingbato:
i see... i try again and report back. thank you
[Android Software Development] DJBhardwaj:
Finally fixed! Thanks alot ;)
[Android Software Development] utingbato:
https://www.box.com/s/ce5e3d57cd40d0400b7c

still not booting.. even i fixed the PowerManagerService.smali

thank you
[Android Software Development] DJBhardwaj:
Follow the first four posts carefully.

And I mean all of it.
[Android Software Development] CosmicDan:
No, you haven't :rolleyes:

Seriously dude, if you can't follow the simple guide you may as well give up. Because this is easy and it gets a lot harder with CM9 with things we can't help you with.

?: E/dalvikvm(1485): ERROR: couldn't find native method
?: E/dalvikvm(1485): Requested: Lcom/android/server/PowerManagerService;.nativeStartSurfaceFlingerOnAnimation:(I)V
?: E/JNIHelp(1485): RegisterNatives failed for 'com/android/server/PowerManagerService', aborting
?: A/libc(1485): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1)
[Android Software Development] Hikari:
After fixing the mic like shown in the guide I keep on getting phone/messaging fcs! Any help? Thanks!
[Android Software Development] Ozadroid:
FIRST THING!!

If somthing is wrong take a logcat of it! Widout that no one can help u. we here are not chuck norris who can tell u this is wrong how to fix.

so prepare a logcat always then ask for help.
[Android Software Development] Huncriter:
nobody knows how to solve this????
[Android Software Development] Ozadroid:
the error is above the FATAL EXCEPTION : main

post that!
[Android Software Development] Lens_flare:
possibly recompiling apk error.
[Android Software Development] Hikari:
I asked and didnt provide a logcat because I thought someone might have had that issue and can tell me what to do quickly. If it was needed Id instantly provide a log...

I dunno! its not related to recompiling.. its not gonna work if I include it in the rom package but if I provide it as a separate fix.zip it works... I dont know why..
[Android Software Development] Ozadroid:
Lens_flare help please!!!

though this error is not of miui port.. it cam from sense port. but if u cud help? i hv tried merging assetmanager.smali

W/dalvikvm( 142): ERROR: Unable to find decl for native Landroid/content/res/AssetManager;.splitThemePackage:(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)I

W/dalvikvm( 142): ERROR: Unable to find decl for native Landroid/content/res/AssetManager;.detachThemePath:(Ljava/lang/String;I)Z

W/dalvikvm( 142): ERROR: Unable to find decl for native Landroid/content/res/AssetManager;.getBasePackageCount:()I

W/dalvikvm( 142): ERROR: Unable to find decl for native Landroid/content/res/AssetManager;.getBasePackageName:(I)Ljava/lang/String;

W/dalvikvm( 142): ERROR: Unable to find decl for native Landroid/content/res/AssetManager;.getBasePackageId:(I)I

W/dalvikvm( 142): ERROR: Unable to find decl for native Landroid/content/res/AssetManager;.addRedirectionsNative:(I)V

W/dalvikvm( 142): ERROR: Unable to find decl for native Landroid/content/res/AssetManager;.clearRedirectionsNative:()V

W/dalvikvm( 142): ERROR: Unable to find decl for native Landroid/content/res/AssetManager;.generateStyleRedirections:(III)Z

E/JNIHelp ( 142): RegisterNatives failed for 'android/content/res/AssetManager'

E/AndroidRuntime( 142): Unable to register all android natives

I/ServiceManager( 137): service 'media.audio_flinger' died

I/ServiceManager( 137): service 'media.camera' died

I/ServiceManager( 137): service 'media.player' died

I/ServiceManager( 137): service 'media.audio_policy' died

I/Netd ( 212): Netd 1.0 starting

thnx
[Android Software Development] Alex93917:
I back here because External_Sd doesn't work on MIUI 2.8.10 Port.

This is working on CM9, my base for MIUI port. Yes, on MIUI, doesn't work. External_sd works and is displaying to "/mnt/external_sd/", but not to "mnt/sdcard/external_sd".

I've not changed vold.fstab or in build.prop line linked.

How bind to /sdcard/external_sd/ ?

Thanks
[Android Software Development] v1r0x:
sure u have added all fields and methods of base assetmanager to miui one?
[Android Software Development] Ozadroid:
its not miui.. its HTC sense port.. but yes i have added all fields n methods!
[Android Software Development] CosmicDan:
Umm... This thread is about MIUI, not Sense. BTW, porting Sense to non-HTC devices is illegal.
[Android Software Development] fedevd:
Did you copy this files?:

* libandroid_runtime.so

* libandroidfw.do

* libskia.so

* libmedia_jni.so

* libandroid_servers.so

* libhwui.so
[Android Software Development] datagutt:
Not unless i want a netd loop :)
[Android Software Development] fedevd:
Could be 'ldd-arm' helpfull?
[Android Software Development] Slimegod:
Did a empty directory for the apps you mentioned but I'm getting a "error no such file in directory". There's no res/values folder so there's no XML for patchrom to pick up. Don't know where to pull it from.
[Android Software Development] Notorious:
Do you have everything setup based on what he has in his github? Like you made empty folders for all the apps he added to local-miui-modified-apps in the makefile?
[Android Software Development] Slimegod:
Yeah I made a directory for each app mentioned in the root directory of my device folder.
[Android Software Development] fedevd:
Had to delete Patchrom and sync it again :@

I will leave the sync and go to bed.. Tomorrow I will be free to start with port process.. For which devices are we porting? Here Nexus 4
[Android Software Development] Notorious:
Delete the local-miui-modified-apps from your makefile they are not needed unless you speak Polish. Zdune modifies them to add support for his native language. I'll try and upload my stuff to git so y'all can compare. I currently have some phonewindowmanager rejects to patch and some others before make fullota will work
[Android Software Development] Slimegod:
I modified it and changed what he had to English already. Upload it and I'll compare. I used his makefile and just did edits where needed. All of my reject files are good. Just dealing with these app errors.

---------- Post added at 02:55 AM ---------- Previous post was at 02:52 AM ----------

Why you had to start over?
[Android Software Development] Notorious:
Pushing it now
[Android Software Development] fedevd:
[MENTION=3794018]shakim24[/MENTION] 'cus I derped everything.. [MENTION=4229751]Notorious[/MENTION] pushing to test if boots?
[Android Software Development] Notorious:
Pushing it so y'all can see what most of it should look like. I have still some rejects to work out before it will build and need to do some edits here and there but you should be able to compare to yours

Edit: got an error and had to delete something and repush
[Android Software Development] Slimegod:
Post your makefile so I can take a look.....
[Android Software Development] Notorious:
Still working on uploading to github kept facing errors but I think I fixed it now... Better to upload everything than a single file

---------- Post added at 11:36 PM ---------- Previous post was at 11:28 PM ----------

I'll figure it out in the morning here's my makefile for now https://www.dropbox.com/s/ovthec3ob9j35ks/makefile?dl=0
[Android Software Development] Slimegod:
There is a difference. And that's with miui modified apps. Yours is just email while mine is all the apps he mentioned to mkdir for which I did. So why I get that "no such file in directory" error I gotta figure it out.
[Android Software Development] Tyrany:
Guys any idea on this please ?

W/dalvikvm( 1039): DexOpt: weird deps length 2104, bailing

W/dalvikvm( 1039): Cached DEX '/system/framework/android.test.runner.jar' (/data/dalvik-cache/system@framework@android.test.runner.jar@classes.dex) is stale and not writable

I/dalvikvm( 1039): Unable to open or create cache for /system/framework/android.test.runner.jar (/data/dalvik-cache/system@framework@android.test.runner.jar@classes.dex)

W/dalvikvm( 1039): DexOpt: weird deps length 2104, bailing

W/dalvikvm( 1039): Cached DEX '/system/priv-app/CalendarProvider.apk' (/data/dalvik-cache/system@priv-app@CalendarProvider.apk@classes.dex) is stale and not writable

I/dalvikvm( 1039): Unable to open or create cache for /system/priv-app/CalendarProvider.apk (/data/dalvik-cache/system@priv-app@CalendarProvider.apk@classes.dex)

i got a hand full of this crap =(
[Android Software Development] Notorious:
Having all the apps is not needed. The reason he has them added in that line is because he modifies them to add Polish other then that they are the original app.
[Android Software Development] Slimegod:
So I just need email then? What's your base man, why you have so many rejects?
[Android Software Development] Notorious:
Yes you just need email since he has some custom fixes for it. My base is CM11 8-24 nightly. If you wanna know how many rejects you have cd to your temp folder in patchrom and do tree reject in the terminal
[Android Software Development] Slimegod:
Already cleared my rejects, was wondering why you had so many and now I know why. Use Omni ROM as your base. It's what I used. Only got like maybe 14 or 15 rejects.
[Android Software Development] Notorious:
I don't want to start over lol . Maybe in the future if I get builds setup perfectly. I did patchrom for testing main reason I didn't do it for my S3 and did my Evo LTE instead and because Im gonna try and sell the s3 soon
[Android Software Development] Slimegod:
I see lol. Don't blame you. Check this out though, even if I do mkdir for just email more then likely I'll still run into that error though cause it's trying to find a XML file that's not there. Being that it's a empty file. Some other apps I didn't get a error because they weren't empty.
[Android Software Development] Notorious:
Go to his github he has the XML there for the email app
[Android Software Development] Slimegod:
Searched it don't recall seeing it.
[Android Software Development] Notorious:
https://github.com/zdunex25/patchrom_m0/blob/kitkat/Email/res/values/styles.xml.part
[Android Software Development] Slimegod:
I'm assuming just stick it in the email folder created then.
[Android Software Development] Notorious:
Have to make the directories inside the email folder also red/values
[Android Software Development] Slimegod:
Right, right.....
[Android Software Development] Slimegod:
Where is the patched kernel Zdune was talking about a few posts back?
[Android Software Development] fedevd:
Look this block of ZduneX25 'makefile':

local-pre-zip-misc:
cp other/spn-conf.xml $(ZIP_DIR)/system/etc/spn-conf.xml
cp other/apns-conf.xml $(ZIP_DIR)/system/etc/apns-conf.xml
[B]cp other/boot.img $(ZIP_DIR)/boot.img[/B]
cp other/system_fonts.xml $(ZIP_DIR)/system/etc/system_fonts.xml
cp -f other/libsqlite.so $(ZIP_DIR)/system/lib/libsqlite.so
#	cp other/su $(ZIP_DIR)/system/xbin/su

This code adds external files like 'spn-conf.xml' or 'apns-conf.xml' or the kernel.. He unpacked the kernel, added the neccesary stuffs, packed back and added into 'other' folder (I assume that he created that folder, not PatchROM) like the other files called on that lines.. So you better unpack, edit and repack your kernel and then just create a 'other' folder and add it in..
[Android Software Development] Slimegod:
Ok but after all that's done there's still a command he's talking about that forces to use the patched kernel, was wondering what that command is.
[Android Software Development] fedevd:
Where? Can't find his post talking about a kernel..
[Android Software Development] Slimegod:
That same post that you quoted. If you read further he says it.
[Android Software Development] ZduneX25:
I did not say such thing, [MENTION=3531145]fedevd[/MENTION] told you exactly what i do with kernel.
[Android Software Development] fedevd:
Nop, I can't find anything related to 'force to use patched kernel'.. Are you in the correct branch? In that 'makefile' I only found the quoted bold line that just copy the kernel and add it into the port but fur sure he made changes in the kernel without PatchROM.. Anyway, sync almost done here so like in 1 hour I'll be ready to start porting and I will give a try to PatchROM later..
[Android Software Development] Slimegod:
Ok my bad I read it wrong then.
[Android Software Development] Notorious:
So close
[Android Software Development] fedevd:
Did you tryed to build before patch those rejects? I was able to build fine but with bootloops and lot of issues.. Did you faced 'ic_lockscreen_ime.png' issues at the begining?
[Android Software Development] ZduneX25:
[MENTION=3531145]fedevd[/MENTION] put it http://91.205.75.29//zdunex25/wip/ic_lockscreen_ime.png inside /framework-res/res/drawable-yourdpi/, and he is having missing certs in apkcerts,txt (metadata)
[Android Software Development] ZduneX25:
Yeah all typical aosp stuff like systemui, layncger, google gallery.. Leave it empty then see what to delete once build is done, miui app they use different names, so you remove your stock doubles.

Moreover patchrom cannot delete anything from priv-app by itself, so take a look at

Remove usless stuff

, they are the same for all aosp roms.

Miui will welcome you with more FC than you can either close or open, so you have to remove doubles.

Dialer = Phone in MIUI

Keyguard = MiuiKeyguard

Gallery2 = MiuiGallery

SystemUI = MiuiSystemUI

etc.
[Android Software Development] fedevd:
[MENTION=3141383]ZduneX25[/MENTION]

Build full ota package: /home/federico/patchrom/mako/stockrom.zip
unzipping target target-files...
using device-specific extensions in .
unable to load device-specific module; assuming none
Traceback (most recent call last):
File "/home/federico/patchrom/tools/releasetools/ota_from_target_files", line 884, in <module>
main(sys.argv[1:])
File "/home/federico/patchrom/tools/releasetools/ota_from_target_files", line 852, in main
WriteFullOTAPackage(input_zip, output_zip)
File "/home/federico/patchrom/tools/releasetools/ota_from_target_files", line 401, in WriteFullOTAPackage
device_specific.FullOTA_Assertions()
File "/home/federico/patchrom/tools/releasetools/common.py", line 690, in FullOTA_Assertions
return self._DoCall("FullOTA_Assertions")
File "/home/federico/patchrom/tools/releasetools/common.py", line 679, in _DoCall
getattr(self.miui_module, function_name)(*((self,) + args), **kwargs)
File "/home/federico/patchrom/tools/releasetools/miui_releasetools.py", line 6, in FullOTA_Assertions
info.script.Mount("/data")
File "/home/federico/patchrom/tools/releasetools/edify_generator.py", line 140, in Mount
p = fstab[mount_point]
KeyError: '/data'
federico@Aspire-Z3761:~/patchrom/mako$

Never happen before but now I face this.. How can I solve it?

EDIT: Nevermind, was recovery issue. Fixed flashing TWRP instead of CWM.. Built but can't even start 'adb'.. I'm done for today, gotta learn how to fix rejects.. Meanwhile I am waiting for [MENTION=3355080]datagutt[/MENTION] port boot up..
[Android Software Development] ZduneX25:
How many rejects did you get?
[Android Software Development] Notorious:
How exactly were you patching your rejects? Were you just copying the lines from the rejects over and that's it?
[Android Software Development] fedevd:
Nope, didn't fixed any reject yet.. I was hours setting correctly PatchROM that I left a while.. My head is :bang: :bang: rite now so I gotta sleep for work..

Didn't took note about how many rejects, I will try take note tomorrow..
[Android Software Development] Notorious:
CD to your temp folder in patchrom and do command tree reject in the terminal and will tell you how many rejects you have also show you where they all are
[Android Software Development] fedevd:
You mean do 'ls' on reject folder?
[Android Software Development] Notorious:
"Is"?
[Android Software Development] fedevd:
Sorry, my bad.. Understood wrong.. 24 rejects only..