[MOD] Landscape mode for SMS


you can do it just for multilang... there is also english included... :)
 
yeah, that is actually my problem too. i'm not sure how much people are using multilang roms compared to non-multilang roms. as i can see in my thread, some people demand the mod as soon as the rom is released on friday.
but i think ingbrzy is right, for this mod i can use the multilang rom.
 
Multilang version of MMS fix is pretty good - users from others MIUI fan sites can use it too.
 
Multilang version of MMS fix is pretty good - users from others MIUI fan sites can use it too.
that makes sense. not sure if it still worth to update 2.11.16, since tomorrow is the orange day.
i'll let you and the users decide. :)
i can try tonight to download multilang roms and re-apply your mod again.
 
The strange part of this is that It doesn't work on SGS3 i9300... I did a bash script which handles the process. Rotation works on my N7 and NS but on SGS3 Mms.apk is missing. Its in /system/app but its missing on the desktop. I've compared AndroidManifest.xml from NS and SGS3 and are the same after fix. Any ideas?
 
The strange part of this is that It doesn't work on SGS3 i9300... I did a bash script which handles the process. Rotation works on my N7 and NS but on SGS3 Mms.apk is missing. Its in /system/app but its missing on the desktop. I've compared AndroidManifest.xml from NS and SGS3 and are the same after fix. Any ideas?
Does Mms.apk have right permission? Usually a reboot is needed after setting permission.
 
Should have... I do lang pack for every official device and it works on SGS2, NS, N7 etc. They have the same updater-scripts which handle permissions. I don't own SGS3 so can't check... I asked user who reported this issue to fix permissions. Still waiting response.
 
Hi,

I've found the solution how to return the landscape mode for SMS. Here is the example how to do it:

http://goo.gl/jUCpY

README.TXT


1. Install framework.
Copy framework-miui-res.apk and framework-res.apk to this dir
run install_framework.bat
remember the path to 1.apk and 6.apk - copy them to this dir

2. Decompile Mms.apk
run decompile.bat

3. Fix Mms\AndroidManifest.xml
Find and delete all
android:screenOrientation="portrait"
strings

4. Compile the new Mms.apk
run compile.bat
copy Mms\assets dir (complete) to Mms_new.apk
copy Mms\classes.dex to Mms_new.apk

5. Sign new Mms_new.apk
run sign.bat

6. Copy the final Mms_signed.apk to your device or new firmware

If you can't do it youself - please ask here and report which MIUI version you have and the phone model.

Can someone re-explain the direction in here? It's like trying to read Latin... =/
 
@Mesden,

The whole process looks very complicated for a 'normal' user, so the miuiandroid stuff have finally decided to include the fix to the firmware! Check the last firmware please:

We are testing fix for SMS rotation
 
And Btw there's no need to include classes.dex because you don't compile smali code. Also /assets are not needed.
The change is in AndroidManifest.xml and this file must be zipped to apk. That's all.

Wysyłane z mojego Nexus 7 za pomocą Tapatalk 2
 
2.12.28 includes the Landscape SMS but they took out the Toolbox, didn't they..?
 
2.12.28 includes the Landscape SMS but they took out the Toolbox, didn't they..?
We didnt took it out.. we just dont include it.. and never will... it will stay as MOD...
 
@Mesden,

2.12.28 multilang has it finally! Hurra!

@ingbrzy,

Are you sure???? It's in multilang, check it :)
 
So where is this Mod for the MIUI Toolbox if it's not with the official Rom? I don't want to upgrade and lose the MIUI Toolbox.
 
The strange part of this is that It doesn't work on SGS3 i9300... I did a bash script which handles the process. Rotation works on my N7 and NS but on SGS3 Mms.apk is missing. Its in /system/app but its missing on the desktop. I've compared AndroidManifest.xml from NS and SGS3 and are the same after fix. Any ideas?

Just to explain some basic android stuff for all. By default, android won't accept an apk if the manifest is modified but the apk isnt resigned. It is the only file checked for a valid certificate when an apk is installed to system. How it works at all without one on any device is a mystery to me, usually android will flat out refuse to use an apk if the signature for androidmanifest isnt correct. Any other file (resources.arsc, classes.dex, pngs, xmls, etc) can be replaced just fine without resigning, manifest is the ONLY exception to this. It may well explain the issues people are having everywhere with the Mms mod. And to complicate more, Mms.apk is signed with the MIUI release key, which isnt available on the patchrom, so you can't resign it with the same key which is the ideal solution. I don't think it matters which key it is signed with. But it DOES need to be resigned. And doing so will mean the data for the Mms app will be cleared as a result of the signature changing.

So end result of this, if you want the apk to always be accepted by the framework and modified correctly, and almost definitely work perfectly fine on every single device, is resign the Mms.apk with the platform key found here: https://github.com/MiCode/patchrom_build/tree/jellybean/security
Unfortunately I can't see a way to do this mod properly and correctly without it ruining the apk's compatibility with existing data, which is a whole nother issue and not one easily avoided. Hope this has helped/informed someone :)
 
So after properly signed and pushed to system/app the data of Mms.apk will be wiped? This involves text messages?
I can try to resign this apk, starting from my polish script and pl lang pack.
 
So after properly signed and pushed to system/app the data of Mms.apk will be wiped? This involves text messages?
I can try to resign this apk, starting from my polish script and pl lang pack.

I don't think messages are stored in data of mms. Just try it and see.
 
Well i did resign with this code:
Code:
java -Xmx2048m -jar $FOLDER_TOOL/signapk.jar -w $FOLDER_TOOL/platform.x509.pem $FOLDER_TOOL/platform.pk8 Mms_old.apk Mms.apk

And this is error when signing:
Code:
Podpisywanie aplikacji Mms.apk
java.security.cert.CertificateParsingException: invalid DER-encoded certificate data
    at sun.security.x509.X509CertImpl.parse(X509CertImpl.java:1723)
    at sun.security.x509.X509CertImpl.<init>(X509CertImpl.java:320)
    at sun.security.provider.X509Factory.engineGenerateCertificate(X509Factory.java:121)
    at java.security.cert.CertificateFactory.generateCertificate(CertificateFactory.java:322)
    at com.android.signapk.SignApk.readPublicKey(SignApk.java:88)
    at com.android.signapk.SignApk.main(SignApk.java:431)

Maybe I use testkey?
 
I have no idea where that error comes from. I have my own keys I use so can't vouch for patchrom ones working, but for all intents and purposes they should. Test key is not ideal but I suppose if it works...
 
ok i did it.
Used testkeys from my and miuiandroid script.
Resigned ok, mod works, sms is ok. The sms app looks intact. My previous settings are not changed.
But on my JB devices Mms.apk ... always worked when I've been installing lang pack with modded sms app. So I can't be sure if the app works for others.