maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   MeeGo / Harmattan (https://talk.maemo.org/forumdisplay.php?f=45)
-   -   Emojifix (iOS/Android Emoji SMS fix) (https://talk.maemo.org/showthread.php?t=94027)

gtronn74 2015-03-09 21:07

Re: Emojifix (iOS/Android Emoji SMS fix)
 
Quote:

Originally Posted by kapu2 (Post 1456286)
The instructions say you must disable Aegis before installing this patch... so in order to do that, I need to have Inception installed....right?

EDIT: LIES. I only need Coderus's aegis-hack, is that right?

EDIT2: Reread this thread and actually absorbed the information into my brain. In order to install with aegis-hack you have to follow the steps THP said to make a deb or such, which I cannot do with my limited skills :/ Next step, figure out how to enable open mode?

I Down loaded acf libsms-utils0_0.5.17.3+0m7_armel-mod.deb
And install aegis hack . Made a folder called cd were i have libsms deb file . Then i start the terminal app . Write devel-su . Then password :rootme . Then Write : cd /home/user/MyDocs/(name of folder were the libs deb file are ) for me the folder is cd . Hit enter
Now you Write :aegis-dpkg -i libsms-utils0_0.5.17.3+0m7_armel-mod.deb hit enter.
Now it finish . But i installed Harmoji before i did the rest .

hedayat 2015-06-18 21:17

Re: Emojifix (iOS/Android Emoji SMS fix)
 
Quote:

Originally Posted by hedayat (Post 1445247)
@thp: As you are already patching libsms-utils, I was wondering if replacing "UCS-2" with "UTF16" (AFAIK, it is recognized by iconv as UTF-16) is enough?

FYI: I finally decided to fix emoji bug on my N9, and tried my proposed solution first. It seems to work fine (I send an SMS with emoji to myself and received it successfully. Not tested with another person yet). Well, it is still the solution provided by thp, but implemented differently. :)

Iryus 2015-06-21 07:43

Quote:

Originally Posted by hedayat (Post 1474093)
FYI: I finally decided to fix emoji bug on my N9, and tried my proposed solution first. It seems to work fine (I send an SMS with emoji to myself and received it successfully. Not tested with another person yet). Well, it is still the solution provided by thp, but implemented differently.

Good news dude!

Maybe you should do a new libsms-utils.deb that everyone can test please 

hedayat 2015-06-21 20:53

Re: Emojifix (iOS/Android Emoji SMS fix)
 
Thanks. :)
Unless this solution provides real benefits for users, I think having a single working .deb for users is better and less confusing for them (so they won't ask "which one should I use?!"). And creating a proper .deb which doesn't cause MALF on anyone's N9 needs some time which I'd prefer to spend elsewhere if I found it!

And for more experienced users, testing my solution should be fairly easy: all it needs is a hex editor (or a sed like utility for binary files) to replace UCS-2 with UTF16 in libsms, copying it in /usr/lib (preferably after backing up the original one!), and update refhashlist (needs 'real' root access, e.g. using opensudo).

Iryus 2015-06-21 22:25

Re: Emojifix (iOS/Android Emoji SMS fix)
 
@hedayat=> You're rght, simple user prefer easy installation, that means .deb...anyway thank you i'll test your tips ;-)

hedayat 2015-06-22 07:18

Re: Emojifix (iOS/Android Emoji SMS fix)
 
BTW, I'll attach my modified libsms.so as soon as I got home so that the first step isn't necessary.

hedayat 2015-07-01 15:00

Re: Emojifix (iOS/Android Emoji SMS fix)
 
1 Attachment(s)
sorry, I forgot this thread.:(
My libsms-utils is attached.

Iryus 2015-07-05 00:47

Quote:

Originally Posted by hedayat (Post 1475387)
sorry, I forgot this thread.
My libsms-utils is attached.

Hello, I can confirm It works without problems, thanks mate ��

biketool 2015-07-05 19:40

Re: Emojifix (iOS/Android Emoji SMS fix)
 
Can these changes also be applied to the N900 SMS fix? It would be nice to be able to send or send on emoji in SMS without erroring out.
Is there an emoji virtual keyboard for the N9?

hedayat 2015-07-05 21:47

Re: Emojifix (iOS/Android Emoji SMS fix)
 
Quote:

Originally Posted by biketool (Post 1475776)
Can these changes also be applied to the N900 SMS fix? It would be nice to be able to send or send on emoji in SMS without erroring out.
Is there an emoji virtual keyboard for the N9?

Notice that this fix is for *receiving* SMSes with Emoji characters. For sending, there is Harmoji package for N9, which provides appropriate font(s) and also an emoji virtual keyboard. But I'm not sure if there is an equivalent package for N900.

peterleinchen 2015-07-05 21:59

Re: Emojifix (iOS/Android Emoji SMS fix)
 
hedayat,
what is the benefit switching from UCS-2 to UTF-16?

As the fix is working for me already.
I did not get really why this should be necessary.

peterleinchen 2015-07-05 22:08

Re: Emojifix (iOS/Android Emoji SMS fix)
 
@biketool
as hedayat said this fix is mainly to enable receiving emoticoned SMSes.
It works on the N900, too. But you need to copy (”install”) the android emoticon font manually to the N900. Afaik there is no emoticon keyboard available for the N900 (but I may be wrong).
You may send SMS with emoticons but you need to copy them from a received one.

biketool 2015-07-06 04:31

Re: Emojifix (iOS/Android Emoji SMS fix)
 
Quote:

Originally Posted by peterleinchen (Post 1475787)
@biketool
as hedayat said this fix is mainly to enable receiving emoticoned SMSes.
It works on the N900, too. But you need to copy (”install”) the android emoticon font manually to the N900. Afaik there is no emoticon keyboard available for the N900 (but I may be wrong).
You may send SMS with emoticons but you need to copy them from a received one.

In the relevant thread we(I) tested sending emojis and the SMS send fails, I forget the exact error. The emojis I used were cut/pasted, and displayed on the N900 from wikipedia after installing the fonts and fix.

hedayat 2015-07-06 09:34

Re: Emojifix (iOS/Android Emoji SMS fix)
 
Quote:

Originally Posted by peterleinchen (Post 1475786)
hedayat,
what is the benefit switching from UCS-2 to UTF-16?

As the fix is working for me already.
I did not get really why this should be necessary.

No, this is not necessary. I said it in the first post: this is an *alternative* fix. What the original fix does is exactly switching from UCS-2 to UTF-16, so I'm essentially doing the same fix. The only difference is that I use a much simpler hack.

I only uploaded my own libsms-utils because I found someone (lryus) interested in trying my hack. Everybody else can ignore my posts in this thread. :)

Quote:

In the relevant thread we(I) tested sending emojis and the SMS send fails, I forget the exact error. The emojis I used were cut/pasted, and displayed on the N900 from wikipedia after installing the fonts and fix.
If you are talking about harmoji, there is an important note that you should pay attention to: the latest version *doesn't work*, you should try harmoji-0.6.6

peterleinchen 2015-07-06 14:03

Re: Emojifix (iOS/Android Emoji SMS fix)
 
@hedayat
Thanks for clarification!
(also reread thp's explanation what he did 😃)

@biketool
Yes, I know. See my last post from relevant thread.
I got a SMS from an iPhone user with tens of emoticons (from which even a not so small amount were not displayed correctly).
But I agree, the ones where it works are not the ones you/we would like to use daily.

Iryus 2015-07-06 15:09

@peterleinchen

The advantage is you can use without worry Harmoji the latest build (0.7.3) ... send sms containing emojis is now possible.

saleki 2015-07-07 08:06

Quote:

Originally Posted by Iryus (Post 1475830)
@peterleinchen

The advantage is you can use without worry Harmoji the latest build (0.7.3) ... send sms containing emojis is now possible.

So as I understand, deb is for all those who don't have openmode and is compatible only with Harmoji 0.6.6?

And for those with openmode is hedayat's solution wich works with Harmoji 0.7.3. and also can send emojis?

hedayat 2015-07-07 16:17

Re: Emojifix (iOS/Android Emoji SMS fix)
 
Really? I should try then, but I'm not sure that my fix will make harmoji 0.7.3 working. I should check why harmoji > 0.6.6 doesn't work, but it doesn't seem to be related to the fix in this thread which is about receiving emoji smses.

My solution, (& 'raw' thp solution) also doesn't require 'openmode'. You can apply my solution after installing aegis install hack & opensudo. You need to manually update refhashlist though.

Iryus 2015-07-07 20:31

@hadayat

I forgot to mention that my N9 is openmode, Kernel Plus and aegis install hack.

Then I installed libsms-utils0_0.5.17.3 0m7_armel-mod.deb. I was in Harmoji 0.6.6 because I could not send text messages with the latest version...few weeks later, thanks to you, i copy paste libsms-utils.so.0.0.0 in /usr/lib and voila!

Send sms/mms containing emojis with Harmoji 0.7.3 works perfectly :)

PS : Switching from UCS-2 to UTF-16 it was THE solution.

Furthermore, I'll test with my second N9 without openmode & hacks ;-)

OVK 2015-07-08 05:43

Re: Emojifix (iOS/Android Emoji SMS fix)
 
Quote:

Originally Posted by Iryus (Post 1475998)
@hadayat
Furthermore, I'll test with my second N9 without openmode & hacks ;-)

Excellent. I have got lost in all these instructions&solutions which some need openmode, some need something else...

peterleinchen 2015-07-08 07:31

Re: Emojifix (iOS/Android Emoji SMS fix)
 
Quote:

Originally Posted by OVK (Post 1476014)
Excellent. I have got lost in all these instructions&solutions which some need openmode, some need something else...

You do not need open mode!
http://talk.maemo.org/showpost.php?p...1&postcount=25

So, you might try this out
http://talk.maemo.org/showpost.php?p...1&postcount=26
as Iryus confirmed to work (just above).

hedayat 2015-07-08 09:02

Re: Emojifix (iOS/Android Emoji SMS fix)
 
Quote:

Originally Posted by Iryus (Post 1475998)
@hadayat

I forgot to mention that my N9 is openmode, Kernel Plus and aegis install hack.

Then I installed libsms-utils0_0.5.17.3 0m7_armel-mod.deb. I was in Harmoji 0.6.6 because I could not send text messages with the latest version...few weeks later, thanks to you, i copy paste libsms-utils.so.0.0.0 in /usr/lib and voila!

Send sms/mms containing emojis with Harmoji 0.7.3 works perfectly :)

PS : Switching from UCS-2 to UTF-16 it was THE solution.

Furthermore, I'll test with my second N9 without openmode & hacks ;-)

Thanks for the clarification. However, while open mode is not required, aegis-install-hack (or any other method which allows you to update your refhashlist IS required. If you replaced your libsms-utils, make sure that you update refhashlist before rebooting/powering off your phone; or your phone will not boot (I've not tried such a scenario, but others say that your phone will enter into reboot loop; so you'll probably prefer to not try it too!). ).

hedayat 2015-07-08 11:58

Re: Emojifix (iOS/Android Emoji SMS fix)
 
Yes, sending SMSes containing real Emoji characters (as used by harmoji 0.7.3) works for me too! :)
An important improvement of harmoji 0.7.3 compared to 0.6.6 is that 0.7.3 uses different unicode characters which will be displayed correctly on Android phones (and probably everywhere!). Thanks to Iryus tests, packaging my libsms-utils (or a patcher) probably makes sense now!

There is one remaining problem though: as soon as you insert an Emoji character into your SMS, the SMS count and remaining characters count will become zero. But I successfully sent an SMS with Emoji and it was received at the other side. However, I've not tried sending a multi-part SMS with Emoji.

My "guess" is that libsms-utils was also trying to send SMSes using UCS-2, and my hack has fixed both sending & receiving.

What about color Emoji? Well, I think "at least" it requires Freetype 2.5 according to its release announcement. So, updating freetype is probably the first step towards that.

Iryus 2015-07-08 16:52

Re: Emojifix (iOS/Android Emoji SMS fix)
 
@hedayat

Niiiice, good to know! :)

You're welcome, I haven't made big thing unlike you. About color emojis, why not, nobody will say no :D

@peterleinchen

I think aegis hack is mandatory, you confirm that? Because I cannot install "libsms-utils0_0.5.17.3 + 0m7_armel-mod.deb"

Also I tried update cheksum (not found) and refhashlist via terminal in devel-su or root without success...permission denied for my second N9 (no hacks), is it normal or did i something wrong? :/

hedayat 2015-07-08 18:15

Re: Emojifix (iOS/Android Emoji SMS fix)
 
I didn't either, because the problem (UCS-2) was discovered by others. :)

Yes, as I said in post #62, you need "real" root access to update refhashlist; which can be achieved using opensudo, which in turns requires aegis-hack to be installed.

coderus 2015-07-08 18:24

Re: Emojifix (iOS/Android Emoji SMS fix)
 
I know no any working solution for linux to get color emoji fonts working.

peterleinchen 2015-07-08 18:40

Re: Emojifix (iOS/Android Emoji SMS fix)
 
Quote:

Originally Posted by Iryus (Post 1476089)
@peterleinchen

I think aegis hack is mandatory, you confirm that? Because I cannot install "libsms-utils0_0.5.17.3 + 0m7_armel-mod.deb"

Also I tried update cheksum (not found) and refhashlist via terminal in devel-su or root without success...permission denied for my second N9 (no hacks), is it normal or did i something wrong? :/

About using aegis-hack I cannot confirm (as my device is in open mode) but I am quite sure it is needed.
When doing manually above quoted post should give you the pointers.
get the new sha1sum of libsms-utils
put that in /var/lib/aegis/refhashlist
and do the accli command

You need to do that as root (devel-su), possibly you need also to enter develsh.

peterleinchen 2015-07-08 18:56

Re: Emojifix (iOS/Android Emoji SMS fix)
 
@hedayat
I really appreciate your findings and tinkering with hex Editor (reminds me of Symbian times :)).
Did not check myself but believe you two guys that SMS sending also works.

But I would like thp's opinion about that.
Furthermore I would like him to ask to update his solution in following way:
Quote:

The wrapper function is straightforward - just replace fromcode with "UTF-16"
when when function is called with tocode="UTF-8" and fromcode="UCS-2":
Code:

    iconv_t
    xconv_open(const char *tocode, const char *fromcode)
    {
        if (strcmp(tocode, "UTF-8") == 0 && strcmp(fromcode, "UCS-2") == 0) {
            fromcode = "UTF-16";
        }

        return iconv_open(tocode, fromcode);
    }


to
Code:

iconv_t
    xconv_open(const char *tocode, const char *fromcode)
    {
        if (strcmp(tocode, "UTF-8") == 0 && strcmp(fromcode, "UCS-2") == 0) {
            fromcode = "UTF-16";
        }
      if (strcmp(tocode, "UCS-2") == 0 && strcmp(fromcode, "UTF-8") == 0) {
            tocode = "UTF-16";
        }

        return iconv_open(tocode, fromcode);
    }

This should do the trick!?

coderus 2015-07-08 19:09

Re: Emojifix (iOS/Android Emoji SMS fix)
 
refhashlist patcher: http://talk.maemo.org/showpost.php?p...9&postcount=70

hedayat 2015-07-08 21:51

Re: Emojifix (iOS/Android Emoji SMS fix)
 
@coderus: Freetype 2.5 says that it supports color emoji fonts (http://freetype.org/). However, it seems that upper layers should support it too and I have not yet seen "color" emojis while I'm able to use google's Noto Color Emoji font in gedit, it is monochrome and also it doesn't work in many other applications. So, you probably are right; but I didn't want to say that for sure. (It might need changes in Qt itself too).

@peterleinchen Thanks. And I also think that your proposed modification to thp's code will work too.

thp 2015-07-09 11:31

Re: Emojifix (iOS/Android Emoji SMS fix)
 
Quote:

Originally Posted by peterleinchen (Post 1476115)
Furthermore I would like him to ask to update his solution in following way:

...

This should do the trick!?

Yes, indeed I haven't thought about the sending Emoji SMS path. hedayat's fix (replacing all occurences of UCS-2 with UTF16) probably fixed that as a side effect, so to fix that in my solution, there needs to be a code updated as suggested by peterleinchen:

https://github.com/thp/emojifix/comm...d6306343645f39

I'll try to update the binaries (updated libxconv library) soon.

If anybody feels motivated, one could update the patcher to find the string table in the ELF file and replace "UCS-2" with "UTF16" (hedayat's solution):

https://github.com/thp/emojifix/blob.../src/patcher.c

Of course, the easier way in that case would just be using
Code:

sed -e 's/UCS-2/UTF16/g'
on the .so ;)

thp 2015-07-09 14:19

Re: Emojifix (iOS/Android Emoji SMS fix)
 
New binary build now available here:

http://thp.io/2014/emojifix/emojifix...5-07-09.tar.gz

To reproduce this build from source, just build it in the Harmattan SDK:

Code:

git clone git://github.com/thp/emojifix.git
cd emojifix
scp n9:/usr/lib/libsms-utils.so.0.0.0 \
  original/libsms-utils.so.0.0.0.harmattan
make


hedayat 2015-07-09 18:59

Re: Emojifix (iOS/Android Emoji SMS fix)
 
Just one question: I was going to use 'sed', but I was unsure if it'll work on binary files (specially since it is line based). Is using sed safe? If it is, that'll be great. :)

peterleinchen 2015-07-09 19:27

Re: Emojifix (iOS/Android Emoji SMS fix)
 
Hooray,
just sent a SMS with an iPhone emoticon -that did not work before- from N900 to N9 (and vice versa with some added harmoji 0.6.6)! :D

Thanks thp (and hedayat).

--edit
just one (maybe) negative thing now:
the char counter is f*#cked up
on N900 it goes immediately from 160 to 67 after inserting an emoticon (which is pretty normal)
and/but also jumps from 160 to 68 on inserting a normal character
--edit
and goes back to 158 after inserting second ASCII character. So, as I assume, no one will send a one-char SMS all good on N900

on N9 the counter goes to zero on inserting an emoticon

no idea whether those counters are reliable now (possibly using utf16 'eats' resources, 92 chars????)

peterleinchen 2015-07-09 19:39

Re: Emojifix (iOS/Android Emoji SMS fix)
 
Quote:

Originally Posted by hedayat (Post 1476238)
Just one question: I was going to use 'sed', but I was unsure if it'll work on binary files (specially since it is line based). Is using sed safe? If it is, that'll be great. :)

using sed on binary should also work (content is one big line?)
but I am not sure if thp's command
Quote:

sed -e 's/UCS-2/UTF-16/g'
will work. Exchanging (hex editing) a binary and changing lengths is dangerous. Possibly he meant
Quote:

sed -e 's/UCS-2/UTF16/g'
But just go ahead and try 😜

thp 2015-07-09 22:32

Re: Emojifix (iOS/Android Emoji SMS fix)
 
Quote:

Originally Posted by peterleinchen (Post 1476240)
using sed on binary should also work (content is one big line?) [...] but I am not sure if thp's command [...] will work. Exchanging (hex editing) a binary and changing lengths is dangerous.

Using sed on a binary will work; and yes, shouldn't change the string size then, as all offsets after it would become invalid; updated my post accordingly.

hedayat 2015-07-09 22:44

Re: Emojifix (iOS/Android Emoji SMS fix)
 
Quote:

Originally Posted by peterleinchen (Post 1476239)
--edit
just one (maybe) negative thing now:
the char counter is f*#cked up
on N900 it goes immediately from 160 to 67 after inserting an emoticon, and/but also jumps from 160 to 68 on inserting a normal character
on N9 the counter goes to zero on inserting an emoticon

no idea whether those counters are reliable now (possibly using utf16 'eats' resources, 92 chars????)

Jumping from 160 to 67 is normal when you type non-ASCII (e.g. Persian) SMSes (not related to Emoji's), so that's correct. But it should not happen if you write ASCII SMSes; and the counter should jump back to x/160 state rather than x/67.

thp 2015-07-10 07:59

Re: Emojifix (iOS/Android Emoji SMS fix)
 
Not sure if there's anything additional to SMS encoding (each part in a multi-SMS gets less space than a single non-multi-SMS), but in general for UCS-2 vs UTF-16:

UCS-2 can only encode codepoints between 0 and 2^16 (that's the reason why some Emoji characters outside of this range don't work). Each character takes up 16 bits (2 bytes). UCS-2 is defined as big endian, so usually no byte order mark is necessary(?).

UTF-16 can encode all unicode codepoints, using either 16 bits (2 bytes) if it fits, or 32 bits (4 bytes) otherwise. UTF-16 can be big endian and little endian, so a byte order mark might be necessary (not sure if the endianness is defined for SMS and UTF-16/UCS-2).

The README file contains some links to SMS encoding webpages related to UTF-16/UCS-2.

biketool 2015-07-10 12:45

Re: Emojifix (iOS/Android Emoji SMS fix)
 
Will this fix go to CSSU testing?

peterleinchen 2015-07-10 20:17

Re: Emojifix (iOS/Android Emoji SMS fix)
 
Quote:

Originally Posted by biketool (Post 1476278)
Will this fix go to CSSU testing?

Unfortunately MeeGo/Harmattan has no CSSU! ;)

But definitely worth to be integrated into Maemo/N900 CSSU.
As it is fix for Nokia blob, it probably will end up as patcher utility deb. But this will be decision of maintainer.
We (you?) should contact CSSU maintainer...


All times are GMT. The time now is 20:31.

vBulletin® Version 3.8.8