yashsingh1/xdaforums huggingface dataset:
[Milestone 2 Android Development] r2beta0:
Last night I had an idea to help fix media playback on MIUI. As it didn't work at first I'm posting here so we may think about this together. As many of you area aware of MIUI is based on Cyanogen. Exploring CyanogenDefy GitHub a bit you can find the repository for proprietary files used by Defy CM7:

https://github.com/CyanogenDefy/proprietary_vendor_motorola/tree/gingerbread/jordan

As our kernel is taken from a Froyo SBF my idea was to replace all proprietary files on MIUI for the ones on the original Froyo system. We also know that this approach have worked before to fix sensors/led issues. In my first attempt I tried the files from Argentina 2.2.2, but got the phone stuck 2nd M logo (bootmenu is still functional). I did try to debug this but the phone stucks before ADB and logcat can be used. Perhaps some of the libs shouldn't have to be replaced, or perhaps they are from incorrect version.
[Milestone 2 Android Development] Endless7:
If we are using ch kernel, i think it is better to replace it with files from ch 2.10.0 . it will reduce the risk of version mismatch. And beyond replacing, I think you have to edit some other files ( maybe in source ) to add some link to tell the system call the new added files when playing video( for rmvb/avi/wmv decoding files does NOT exist in MIUI previously ).

Im not dev, so this is just my assumption.
[Milestone 2 Android Development] r2beta0:
Well, recompiling is going to be impossible since MIUI is closed source. If the replace approach doesn't work we better focus into building our CM version and forget MIUI (for now). Also I am not using CH versions yet because some ME722 files doesn't work on A953.
[Milestone 2 Android Development] Endless7:
MIUI just do some change on UI, if we ignore this, it is just a CM7 with special UI... So fix works on CM7 would also works on MIUI.

Edit: the source code except UI I thinks is the same with CM7. So refer to CM7`s code may help in MIUI too.
[Milestone 2 Android Development] jambo89liam:
Wow i had never heard of MIUI till now, i love it its so nice. Thanks for the easy update.zip
[Milestone 2 Android Development] jambo89liam:
Is there an app drawer?
[Milestone 2 Android Development] will5:
MIUI is nice, but we need to focus on cm7.

With cm7 we could have the coming android releases, 2.3.5 and so on.

With miui we will get stuck on a particular release.
[Milestone 2 Android Development] Endless7:
Yep, I thinks so. But dangpzanco hasnt set up the project:D
[Milestone 2 Android Development] r2beta0:
Yeps, I agree with you, that's why I'm only fixing stuff in MIUI that don't require source editing. If any of you find a way to enable HW media decoding in MIUI just tell me how so I can append that to the update.zip. Also have in mind that this way of porting MIUI is never going to be as good as an official release. We also tend to be some (or many) versions behind latest build.

As I said before, If we manage to get official CM support for MS2 we have a big chance of getting MIUI officially ported.
[Milestone 2 Android Development] r2beta0:
What about this? :)

https://github.com/CyanogenMilestone2
[Milestone 2 Android Development] Endless7:
Yes, it did. If we have CM offcial support. MIUI will give us support too!

Cool!
[Milestone 2 Android Development] Endless7:
Maybe we should open a stick topic of this.
[Milestone 2 Android Development] will5:
OMG :D

Anyone asked @kabaldan? With milo 1 slowing down development, maybe he could give us a hand, at least for set the project basis.

A new topic with "official CM7 support WIP" could be useful, but with no developers interested, it would be the same that talk here...

We are not that far, guys, compiling sources, applying some fixes, and we are touching official :D
[Milestone 2 Android Development] Endless7:
Just a quetion: Our CM7 will be based on the new GB kernel?
[Milestone 2 Android Development] will5:
Until now, I think there is no way to boot CM7 with GB kernel.

Anyway, the leaked kernel, it´s almost the same than the one in froyo.
[Milestone 2 Android Development] r2beta0:
I think we should try to use kernel/devtree from A953 phone and not ME722. If we can't get the thing to boot with this then we should replace for chinese version.
[Milestone 2 Android Development] r2beta0:
New version available on OP.
[Milestone 2 Android Development] dangpzanco:
Ask for stargo, he knows a way to calculate the injected_code_address for a specific kernel. If you dig inside the 2nd-init.c from bootmenu on my repo (CyanogenMilestone2), you'll notice many versions of Defy SBFs and that there's the enhanced inject code for CH rom by stargo (which I added).

Maybe if we (or stargo) calculate(s) the code for GB kernel/Latam/Europe Rom, we get it to boot on a known kernel.

Sent from my Milestone 2 XDA App
[Milestone 2 Android Development] dangpzanco:
Later I will open a new Thread for this project.

Members of CyanogenMilestone2 by now:

-r2beta0

-stargo (he contacted me but didn't reply yet)

I need a chinese translator for a parallel port project:

MS2Toolbox and A953BasebandSwitcher by Kyle ***(forgot his name =P)

Sent from my Milestone 2 XDA App
[Milestone 2 Android Development] r2beta0:
Dang, 2nd-init already works and calculate the injected address just fine on froyo Milestone2 kernel. I was using 2nd-init with zero problems on Brazil 2.2 ROM and Argentina 2.2.2 ROM.
[Milestone 2 Android Development] dangpzanco:
Hm... but have you tested the specially built for Defy's CM7 2nd-init version?

Sent from my Milestone 2 XDA App
[Milestone 2 Android Development] r2beta0:
I've read the source code. It's basically the same I used in my versions of pre-bootmenu 2nd-init. In fact 2nd-init calculates the image size based on /proc/1/maps and searches for some assembler instructions on RAM (code for execve) to define de injection address.

Edit: Let's hope google unlocks MS2 bootloader so we won't need 2nd-init anymore :)
[Milestone 2 Android Development] dangpzanco:
Alright then, I'm going to play piano because I have no other ideas for today LOL...
[Milestone 2 Android Development] AragornPE:
The only thing holding me down from flashing this update is the lack of mp3 decode.

If I install PowerAmp, will it work? Since PowerAmp has its own decode library... just wondering

Keep up with the good work guys!

Rocking with my M2 and XDA app
[Milestone 2 Android Development] r2beta0:
But mp3 and mp4 works fine. Wma don't.
[Milestone 2 Android Development] will5:
@angdroid could help too. He was working on d2, d2g and m2.

Maybe we could ask him.
[Milestone 2 Android Development] dangpzanco:
I don't thrust him... He got funds to buy a Milestone 2 from donators (not from me) in the forum and he never talked/explained himself here again...

Sent from my Milestone 2 XDA App
[Milestone 2 Android Development] AragornPE:
Guess it's flash time for me then =P

I don't trust angdroid too. He is a thief and a liar. He asked for donations to buy a M2 so he could develop, lots of users donated to him and he just vanished. Now he just posts some random bull**** about dev'ing for M2 but it's just lies. Never tried to explain himself for the community, and always says that M2 community is aggressive towards him (I began being aggressive after he showed up on twitter with his bull****)

Just forget about him, it's not worth your time.

Rocking with my M2 and XDA app
[Milestone 2 Android Development] will5:
Didnt know how that story ended.

Lets look for other developers then :)
[Milestone 2 Android Development] dangpzanco:
MIUI Torch is not working after 19th August update...

Sent from my Milestone 2 XDA App
[Milestone 2 Android Development] szmartin:
update error

what is the lastest update.zip's md5?

479B885BC505905DFBF03905151D9289

right?

i flash 0818's rom

and i flash lastest rom it show error

assert fails:getprop("ro.product.device")=="umts_milestone2" || getprop("ro.build.product")=="umts_milestone2"

E:error in /sdcard/update.zip

(status 7)
[Milestone 2 Android Development] Endless7:
You can send me a text with chinese needed to be translated. I will try by best. At least let you understand the meaning.

Tips: Actually the author for these 2 apps is sw_acer. Maybe you can contact with him and invite him to your project directly ( he has ID here ):p
[Milestone 2 Android Development] Endless7:
Yep, the same here. Once I open it, it FC immediately.

I have the same problem here. It seems the script to flash .img is something wrong. But /system has been copy correctly, so we still can boot the system.
[Milestone 2 Android Development] dangpzanco:
Actually I don't need to send you the text, you can create a github account and I put you in the translation team on CyanogenMilestone2.

Are you sure sw_acer is the author? He made only one post here and the name in github is Kyle something...

Sent from my Milestone 2 XDA App
[Milestone 2 Android Development] Endless7:
Sure. He develop these apps in GFAN. That is also why it`s chinese only.

Till now, he develop 3 apps:

sd2rom-hack http://bbs.gfan.com/android-460981-1-1.html

milestone2toolbox http://bbs.gfan.com/android-754851-1-1.html

milestone2baseband switcher http://bbs.gfan.com/android-663382-1-1.html

[Port]milestone2 Recovery&Bootmenu http://bbs.gfan.com/android-2194589-1-1.html

I have send him a pm this day, but he hasnt reply yet.

Edit: Kyle is just his another name.
[Milestone 2 Android Development] Endless7:
I have no knowledge in direct translating app and once my school begin, I will not have much time here. If this is still OK, I would love to do this...

ps: English is soso too and no guarantee for quality.
[Milestone 2 Android Development] RDUKE7777777:
If you need someone for translating CM7 from English into German, i could help.

At least anything I could do.
[Milestone 2 Android Development] dangpzanco:
It's easy, I was doing with Google Translate, but some words got weird.

You just need to navigate the app repo and translate the chinese chars inside the java/c/xml codes.

But first create your github account so I can add privilegies for you.

Sent from my Milestone 2 XDA App
[Milestone 2 Android Development] Endless7:
I have create an account with name: Endless7
[Milestone 2 Android Development] DeadSix17:
Did anyone notice that the Backlight never goes off? I Mean the LCD Backlight (Not keyboard, that doesnt work, even though it says its fixed)

So how can i fix the:

1) Always on Backlight (Go into a Dark room, and press power button, you will see its still on VERY LOW but it is on.. and eats battery)

2) Keyboard backlight (as flashing the fix would probably kill it .. as i read that somewhere) and going into the settings for Backlight stuff.. and custom mode.. with all the boxes that crashes my Settings APK ..

i downloaded that fixed apk, doesnt make a difference.. settings.apk still crashes. and keyboard-backlight, and always on LCD_backlight of course doesnt work.
[Milestone 2 Android Development] thucksoft:
Black Screen after red Moto logo

I've tryed to apply this update but my phone shows a black screen right after the Red Moto Logo appear.

I'm trying to access recovery mode or clockwork but nothing happens, all I have is a Red Moto Logo and a Black Screen (the screen is on, but black).

Can someone help me here?
[Milestone 2 Android Development] r2beta0:
Appaently I did something wrong on the last update. The torch and backlight issues are related. Also the light sensor is messed up as you can see in androsensor app. Probably I placed the wrong lights.a953.so lib in this update. I'n facing the same problems here. It's safer to wait for the new fix.
[Milestone 2 Android Development] DeadSix17:
So the "Always on Backlight" is related to that aswell? .. as i didnt expirience this problem by using the other thread i mean where you have to flash via RSD which didnt work in the first time.. now i got it to work (idk why it works now).. anyway but Do you know why theres no MIUI launcher in all the .zip's and Nandbackups ?? I would like to have it back as in your one.. can you supply the apk or something?
[Milestone 2 Android Development] r2beta0:
Yeps, everything is related (and fixed now). The problem was caused by some changes I did in build.prop and some libs I renamed. Apparently changing the name of board and devices makes the system use different locations on /sys tree, for example /sys/class/leds/flashlight/brightness. This was the incorrect location of flashlight caused by renaming jordan to A953. By now I've restored Defy's original values. I'm going to experiment more on this before I rename the device to A953 again.

Edit: MIUI Launcher is included since the first version of my update.zip.
[Milestone 2 Android Development] DeadSix17:
Yes but how can i get the MIUI launcher without using your update.zip that was my question.... like where did you get it from? .. I think i found it here:

http://xdaforums.com/showpost.php?p=15491933&postcount=2

PS: is the fixed version uploaded (backlight issues)

PS2: yes he uploaded the fixed version, so now i have no need for the other tutorial, the update.zip of him does what i want.. gets me the MIUI launcher and fixed backlight.. now lets see what else needs a fix
[Milestone 2 Android Development] r2beta0:
I got mine from the original defy thread, there is a post where you can download launcher:

http://xdaforums.com/showthread.php?t=1161110
[Milestone 2 Android Development] Endless7:
Found a problem, after start / kill adbd, I can not mount /tmp in my recovery. Write any files to /tmp may fail.
[Milestone 2 Android Development] psperm:
weeeeeee. the ui is so nice~~

just changed from the leaked GB rom to this ported Defy rom.

Amazing piece of art from the miui team.

Excellent port from you guys.

Looking at the battery performance right now. Hope it is as good as the GB-leaked-Rom.

Thanks guys, especially r2beta0, walter79 and Endless7.

I can help yall in translating Chinese, if you need me. Forward me a pm I will try my best to help.
[Milestone 2 Android Development] r2beta0:
Sorry to disappoint you but I think battery life in this port still needs improvement. Here battery runs faster than froyo.
[Milestone 2 Android Development] Atomos33:
It's in every MIUI i've tried on every devices i had... It's seems that MIUI use a lot of ressources...

Anyway for better battery life the Jordan's CM7 nighlty (2.3.5) doesn't have battery drain issue :) (RC1 does though)
[Milestone 2 Android Development] r2beta0:
Just uploaded new update.zip that should fix problems introduced on previous update.
[Milestone 2 Android Development] will5:
thanks for new build :D

battery on jordan nightly is amazing, I though something were wrong with the battery meter, but is last too much.

On the other hand, cm7 is not really usable on m2 atm.
[Milestone 2 Android Development] will5:
Trying last build :D

Looks good so far.

Just one thing, "phone volume" or "ringtone volume" how it´s called on miui, always stay the same, no matter how low or high you select, always sound at the same level.

And... why nobody delete fmradio apk from defys roms? I guess we dont need that :D
[Milestone 2 Android Development] r2beta0:
Because I aways forget to do that. And to delete defy baseband too :P
[Milestone 2 Android Development] will5:
lmao :D

It's really nice this rom. Miui guys makes a wonderful work.

r2beta, where do you think touchscreen fixes implemented on gb leak are?

Gb leak makes touchscreen uniformity real. Would be great to implement that fixes on custom roms.
[Milestone 2 Android Development] psperm:
haiz.. just flashed the cm7 port, its good but quite disappointing though, so many steps to do, now i screwed up the framework-res.apk, bootlooping now, argh!

usb part is so problematic, should have streamlined it, with all the patches and tweaks.

battery usage pretty unsure but i suppose its good.

Gapps part i think should be added as a option to patch it because most of us are more familiar with stock conditions with market, gmail, Google account and etc. now i'm not very sure how to add it back.
[Milestone 2 Android Development] will5:
We need to fix the leds, guys. Notification led wont last long in charger mode.

Im trying to charge the battery with phone off, but when I turn on the phone, it's at the same battery level? Weird.
[Milestone 2 Android Development] p.gregy:
Hi guys, if you need English translation of basebandswitcher look here.

http://gregy.cz/android/
[Milestone 2 Android Development] will5:
Guys, an important warning.

Dont let the battery goes to 0%.

With this roms, you cant charge the battery when phone is off.

so, if battery goes to 0%, you may not boot the phone anymore.
[Milestone 2 Android Development] dandroid13:
Really? I'm sure I've charged mine while it was off. (I'm on CM7 though) :confused:
[Milestone 2 Android Development] will5:
Tested with cm7 and miui.

All night charging, next day, 15% battery, the exact number when I powered off and connected charger. When you charge while it´s off, the real charge led turn on, but doenst charge.

On miui web you can see things like this:

So I guess, it´s not a so uncommon problem :)

BUT, may be something wrong with my phone.
[Milestone 2 Android Development] dandroid13:
I may be wrong but, when charging while off there's a battery and a percentage on-screen right? If yes, then my phone is charging. :p

Also, here the real LED charge is off and the indicator is on.

Edit: Since my last post the charge has gone from 40% to fully charged.
[Milestone 2 Android Development] will5:
Do we have different phones? :confused:

When it´s powered off and charging, there is no screen, there is nothing, phone is off :)

The only way to charge with phone off, is connecting the cable, and then power off the phone. Other way the phone will turn on by itself.

Tested on official 2.2.2 and charging while off, works, so it´s a bug within defys roms on m2.
[Milestone 2 Android Development] dangpzanco:
After the 20-08 update, the notification bar toggles are just 4, and the power off options don't show up the same way as 19-08.

Sent from my Milestone 2 XDA App
[Milestone 2 Android Development] will5:
Have you tried to move left? I have more than 4 toggles, just not all fit in the screen space, you have to scroll horizontally...
[Milestone 2 Android Development] dandroid13:
I did that and the phone turned on automatically, going to the battery iPhone-like screen. :confused:

But when doing it via usb it didn't do nothing.
[Milestone 2 Android Development] will5:
lmao, when you use the wall charger it shows an image on screen? :D

I´d never used the wall charger, I though USB was the same thing.

I´ll check with wall charger.

Anyway, usb charging while off, doesnt work :) and on froyo it works.

So, if someone run out of battery with defys rom, just charge with the wall charger until the phone has significant battery to power on again.
[Milestone 2 Android Development] dandroid13:
lol, yeah, via usb it doesn't work but with the wall charger it does and it's faster too :p

like this:
[Milestone 2 Android Development] will5:
Good to learn something new :D

Hope devs can get rid of little bugs in this rom, it´s really nice.
[Milestone 2 Android Development] dandroid13:
An all-in-one update.zip for CM7 would be awesome :D
[Milestone 2 Android Development] will5:
Cm7 on update.zip will come too, I guess.

About onscreen keyboard half its size, could be a problem with orientation, on landscape, kb has the aspect ratio of portrait mode. Inverting two values could fix that.
[Milestone 2 Android Development] dangpzanco:
Or you could use Swype Beta instead...

Sent from my Milestone 2 XDA App
[Milestone 2 Android Development] will5:
The thing I dont like about swype, it´s that once you touch a letter, you can´t move to the next one (in case you hit another by mistake)

But, yes, is an alternative.

Anyway, don´t know if it will be useful to fix this roms. Sooner or later, we´ll have to start from scratch to have cm7 and miui working properly...
[Milestone 2 Android Development] dangpzanco:
That's why I forked the Defy's CM7 repo. But development is slow...

Another alternative is pack a universal update.zip that fix the roms problems, which will never be 100% fail proof.

Sent from my Milestone 2 XDA App
[Milestone 2 Android Development] will5:
Sure, and update.zip fix will always broke some things :rolleyes:

We need more developers :( Isn´t mike interested in compiling some sources?
[Milestone 2 Android Development] dangpzanco:
I don't think so, when he blowed his phone he quickly sold his phone and bought one from HTC.

We have r2beta0, stargo and sw_acer as REAL devs here...

I mean, they actually know a code language.

Sent from my Milestone 2 XDA App
[Milestone 2 Android Development] will5:
I know, without a phone is a little hard to compile sources :(

Lets wait for current devs news.
[Milestone 2 Android Development] Endless7:
Has sw_acer contacted with you?
[Milestone 2 Android Development] Endless7:
r2beta0, is 720P recoring working fine on your MIUI. And how did you enable 720P recording?(I remember you said you have enable it ). thx.
[Milestone 2 Android Development] dangpzanco:
Yep!

Sent from my Milestone 2 XDA App
[Milestone 2 Android Development] r2beta0:
You just have to edit /system/etc/media_profiles.xml (or something like that). There is some entries commented for 720p recording but if you enable it you should change fps to 24 instead of 30. The video freezes once you start recording and suffers from playback issue later. I think video freezing and playback error are related.
[Milestone 2 Android Development] Endless7:
Now I have the same issue on dual system 2.3.4 and miui. But 2.3.4 is based on MS2 and its 720P recording should works. This is odd. Any way, i will try what you said.
[Milestone 2 Android Development] r2beta0:
About the charging LED always on: there is a property that is supposed to let you choose if you want the led on or off. It was called ro.battery_light on first versions and got renamed to ro.batteryLight on recent versions of CM7. I tried to set both to false on build.prop but it doesn't seem to work. Maybe MIUI developers changed that or maybe if was fixed on a more recent version than 1.8.12.
[Milestone 2 Android Development] Endless7:
Edit:

Forget to say...the solution is for dual system: GB 2.3.4. But the problem is really the same with the one you have in MIUI. So I thinks 720p recording issue in MIUI is probably caused by the same thing. But use these files to replace in MIUI will cause stuck on bootanimation.

I found 720p recording is related to these files:

/system/lib

libcamea.so

libcamera_client.so

libcameraservices.so

liboemcamera.so

/system/app

blurcamera.apk

Before replacing these files from original GB-77, even I use 3rd-party camcamera to force 720P recording, the video still freezes once I start recording.

But after replacing, both stock and 3rd-party camcamera work well. So maybe it's a method to fix 720P recording in CM7/MIUI.
[Milestone 2 Android Development] r2beta0:
Replacing all that libs makes the system bootloops. Replacing just libcamera.so and liboemcamera.so lets the system boot, but camera orientation is messed. I think it can be fixed in build.prop. I will post again when I fix that.
[Milestone 2 Android Development] r2beta0:
Ok, found orientation fix. In build.prop must remove ro.media.capture.flip and add ro.media.sensor.orient=90. This fixes camera orientation. Must also uncomment HD encoder profile in /system/etc/media_profiles.xml and change frame rate to 24 (otherwise camera will FC). Still getting video freezing on HD recording.
[Milestone 2 Android Development] will5:
Anyone tested soft like this https://market.android.com/details?id=com.beansoft.lcd_density_changer&feature=search_result to see if keyboard half its size, and icons separation can be fixed?
[Milestone 2 Android Development] Endless7:
I think it's encoder problem. Try LG camera which can mod encoder method to find a supported encoder.

ps: media_profiles.xml on GB leak is different from the one on 2.2 in encoder. compare them or you may find something useful.