Jump to content

Emode without ZTEDialer


Guest FelixL

Recommended Posts

Guest FelixL

It's possible to build a small app that starts the emode-tests, without the need for the zte dialer.

After asking t0mm13b I had to learn that this will still not work for CM7 since the Emode.apk won't work on a VMSPLIT3G. Still don't understand why, but I believe him ;)

Nonetheless I want to ask if anybody want's something like this before doing it. It would be an easy clickable list with all 74 (!) codes. Don't know if all 74 have an effect, but there are 74 mentioned in the Emode.apk-code.

The technical bits (if anybody else want's to do his first small app, it's quite easy):

Original ZTE-Code:

case 2131099740://that's from a switch-case in an OnClickListener which checks which view was pressed, should be the view with the "#"

      playTone(11);

      keyPressed(18);

      String str1 = this.mDigits.getText().toString();//dialed number gets converted to a string

      int i = str1.length();

      String str2 = "****Emodenumber=" + str1 + "   length=" + i;//just for debugging

      int j = Log.e("Dialer_EMode", str2);

      if (i <= 0)//if nothing was dialed...do nothing

        return;

      if (str1.charAt(0) != 42)//probably checks for the first character to be "*"

        return;

      int k = i - 1;

      if (str1.charAt(k) != 35)//probably checks for the last sign to be "#"

        return;//If everything fits the following gets done

      Intent localIntent1 = new Intent("android.intent.action.emdoe");//Notice the wrong spelling -.-

      Intent localIntent2 = localIntent1.putExtra("com.zte.smartdialer.input", str1);//Number gets attached to an intent, by the way that's bad programming here, localIntent2 is useless.

      sendBroadcast(localIntent1);//Emode get's started by a broadcast

      return;
So you only need these three lines:
Intent localIntent1 = new Intent("android.intent.action.emdoe");

        localIntent1.putExtra("com.zte.smartdialer.input", "*983*477#");//Hardcoded just for proof of concept

        sendBroadcast(localIntent1);
Available codes:
  const/4 v3, 0x1


    const/4 v2, 0x0

[...]

new-array v0, v0, [Ljava/lang/String;

    const-string v1, "*983*0#"

    aput-object v1, v0, v2

    const-string v1, "*983*3640*01#"

    aput-object v1, v0, v3

    const/4 v1, 0x2

    const-string v2, "*983*25#"

    aput-object v2, v0, v1

    const/4 v1, 0x3

    const-string v2, "*983*31#"

    aput-object v2, v0, v1

    const/4 v1, 0x4

    const-string v2, "*983*26#"

    aput-object v2, v0, v1

    const/4 v1, 0x5

    const-string v2, "*983*850#"

    aput-object v2, v0, v1

    const/4 v1, 0x6

    const-string v2, "*983*86#"

    aput-object v2, v0, v1

    const/4 v1, 0x7

    const-string v2, "*983*84#"

    aput-object v2, v0, v1

    const/16 v1, 0x8

    const-string v2, "*983*07*01#"

    aput-object v2, v0, v1

    const/16 v1, 0x9

    const-string v2, "*983*07*02#"

    aput-object v2, v0, v1

    const/16 v1, 0xa

    const-string v2, "*983*3470#"

    aput-object v2, v0, v1

    const/16 v1, 0xb

    const-string v2, "*983*81#"

    aput-object v2, v0, v1

    const/16 v1, 0xc

    const-string v2, "*983*890#"

    aput-object v2, v0, v1

    const/16 v1, 0xd

    const-string v2, "*983*26*#"

    aput-object v2, v0, v1

    const/16 v1, 0xe

    const-string v2, "*#06#"

    aput-object v2, v0, v1

    const/16 v1, 0xf

    const-string v2, "*983*27274#"

    aput-object v2, v0, v1

    const/16 v1, 0x10

    const-string v2, "*#08#"

    aput-object v2, v0, v1

    const/16 v1, 0x11

    const-string v2, "*#09***#"

    aput-object v2, v0, v1

    const/16 v1, 0x12

    const-string v2, "*983*1275#"

    aput-object v2, v0, v1

    const/16 v1, 0x13

    const-string v2, "*983*7#"

    aput-object v2, v0, v1

    const/16 v1, 0x14

    const-string v2, "*983*3640#"

    aput-object v2, v0, v1

    const/16 v1, 0x15

    const-string v2, "*983*636#"

    aput-object v2, v0, v1

    const/16 v1, 0x16

    const-string v2, "*983*28#"

    aput-object v2, v0, v1

    const/16 v1, 0x17

    const-string v2, "*983*477#"

    aput-object v2, v0, v1

    const/16 v1, 0x18

    const-string v2, "*983*21#"

    aput-object v2, v0, v1

    const/16 v1, 0x19

    const-string v2, "*983*70#"

    aput-object v2, v0, v1

    const/16 v1, 0x1a

    const-string v2, "*#18#"

    aput-object v2, v0, v1

    const/16 v1, 0x1b

    const-string v2, "*#19#"

    aput-object v2, v0, v1

    const/16 v1, 0x1c

    const-string v2, "*983*36#"

    aput-object v2, v0, v1

    const/16 v1, 0x1d

    const-string v2, "*983*57#"

    aput-object v2, v0, v1

    const/16 v1, 0x1e

    const-string v2, "*983*473#"

    aput-object v2, v0, v1

    const/16 v1, 0x1f

    const-string v2, "*#23#"

    aput-object v2, v0, v1

    const/16 v1, 0x20

    const-string v2, "*983*10#"

    aput-object v2, v0, v1

    const/16 v1, 0x21

    const-string v2, "*#25#"

    aput-object v2, v0, v1

    const/16 v1, 0x22

    const-string v2, "*983*2726#"

    aput-object v2, v0, v1

    const/16 v1, 0x23

    const-string v2, "*983*37#"

    aput-object v2, v0, v1

    const/16 v1, 0x24

    const-string v2, "*983*6726#"

    aput-object v2, v0, v1

    const/16 v1, 0x25

    const-string v2, "*983*154#"

    aput-object v2, v0, v1

    const/16 v1, 0x26

    const-string v2, "*983*07#"

    aput-object v2, v0, v1

    const/16 v1, 0x27

    const-string v2, "*983*5182#"

    aput-object v2, v0, v1

    const/16 v1, 0x28

    const-string v2, "*983*7469#"

    aput-object v2, v0, v1

    const/16 v1, 0x29

    const-string v2, "*#26***#"

    aput-object v2, v0, v1

    const/16 v1, 0x2a

    const-string v2, "*983*7936#"

    aput-object v2, v0, v1

    const/16 v1, 0x2b

    const-string v2, "*987*0#"

    aput-object v2, v0, v1

    const/16 v1, 0x2c

    const-string v2, "*#27***#"

    aput-object v2, v0, v1

    const/16 v1, 0x2d

    const-string v2, "*983*87274#"

    aput-object v2, v0, v1

    const/16 v1, 0x2e

    const-string v2, "*983*06#"

    aput-object v2, v0, v1

    const/16 v1, 0x2f

    const-string v2, "*983*564738#"

    aput-object v2, v0, v1

    const/16 v1, 0x30

    const-string v2, "*983*93#"

    aput-object v2, v0, v1

    const/16 v1, 0x31

    const-string v2, "*983*2377#"

    aput-object v2, v0, v1

    const/16 v1, 0x32

    const-string v2, "*983*24474636#"

    aput-object v2, v0, v1

    const/16 v1, 0x33

    const-string v2, "*983*73564#"

    aput-object v2, v0, v1

    const/16 v1, 0x34

    const-string v2, "*987*123456#"

    aput-object v2, v0, v1

    const/16 v1, 0x35

    const-string v2, "*983*205#"

    aput-object v2, v0, v1

    const/16 v1, 0x36

    const-string v2, "*#0000#"

    aput-object v2, v0, v1

    const/16 v1, 0x37

    const-string v2, "*983*1#"

    aput-object v2, v0, v1

    const/16 v1, 0x38

    const-string v2, "*983*2#"

    aput-object v2, v0, v1

    const/16 v1, 0x39

    const-string v2, "*983*3#"

    aput-object v2, v0, v1

    const/16 v1, 0x3a

    const-string v2, "*983*8284#"

    aput-object v2, v0, v1

    const/16 v1, 0x3b

    const-string v2, "*983*7668#"

    aput-object v2, v0, v1

    const/16 v1, 0x3c

    const-string v2, "*983*7278466#"

    aput-object v2, v0, v1

    const/16 v1, 0x3d

    const-string v2, "*983*9434622#"

    aput-object v2, v0, v1

    const/16 v1, 0x3e

    const-string v2, "*983*288384#"

    aput-object v2, v0, v1

    const/16 v1, 0x3f

    const-string v2, "*983*288385#"

    aput-object v2, v0, v1

    const/16 v1, 0x40

    const-string v2, "*983*1234#"

    aput-object v2, v0, v1

    const/16 v1, 0x41

    const-string v2, "*983*1233#"

    aput-object v2, v0, v1

    const/16 v1, 0x42

    const-string v2, "*983*7336#"

    aput-object v2, v0, v1

    const/16 v1, 0x43

    const-string v2, "*983*7337#"

    aput-object v2, v0, v1

    const/16 v1, 0x44

    const-string v2, "*983*79482436#"

    aput-object v2, v0, v1

    const/16 v1, 0x45

    const-string v2, "*983*72346373#"

    aput-object v2, v0, v1

    const/16 v1, 0x46

    const-string v2, "*983*24736#"

    aput-object v2, v0, v1

    const/16 v1, 0x47

    const-string v2, "*983*24737#"

    aput-object v2, v0, v1

    const/16 v1, 0x48

    const-string v2, "*983*4740#"

    aput-object v2, v0, v1

    const/16 v1, 0x49

    const-string v2, "*983*74883696#"

    aput-object v2, v0, v1

    sput-object v0, Lcom/zte/emode/MatchingReceiver;->EmodeArray:[Ljava/lang/String;

Link to comment
Share on other sites

Guest t0mm13b

Are you trying to get ZTE dialler specific stuff into CM7? Such as specific testing routines etc...?

Is that the mission you are on?

Link to comment
Share on other sites

Guest FelixL

Are you trying to get ZTE dialler specific stuff into CM7? Such as specific testing routines etc...?

Is that the mission you are on?

I would have liked too, not the Dialer (don't like it :P) but the test routines, yes. But if you are sure there is no way to get the Emode.apk to work...

------------------------------------------------------

Could somebody try this file?

http://db.tt/K67TM8D

Just install it (doesn't need to be pushed to /system or something like that). It needs Emode.apk and one of the leak based ROMs underneath.

Please don't test the codes without explanation unless you want to brick your blade for science :P

I'm not responsible if the app wipes your Blade or sets it on fire.

@wbaw: could you make an update.zip like the one here:

but with the difference that it should not swap the dialer and contacts and all, that just pushes the Emode.apk to system/app? Than we could be sure my app works without the dialer.

I'm currently on CM7 and don't have the time to try anything further today, gf complaining ;)

Link to comment
Share on other sites

@wbaw: could you make an update.zip like the one here:

but with the difference that it should not swap the dialer and contacts and all, that just pushes the Emode.apk to system/app? Than we could be sure my app works without the dialer.

emode.zip

Link to comment
Share on other sites

After asking t0mm13b I had to learn that this will still not work for CM7 since the Emode.apk won't work on a VMSPLIT3G. Still don't understand why, but I believe him ;)

Have you actually tried it? The VMSPLIT3G/2G stuff usually just seems to break a few lib files, native code stuff, I can't see why it wouldn't work. We wouldn't have a lot of things if everybody listened to t0mm13b saying 'it wont work'.

Edited by wbaw
Link to comment
Share on other sites

Guest FelixL
Have you actually tried it?

adb install says libraries missing, the mainfest says:

<uses-library android:name="com.android.qualcomm.qcrilhook"/>

<uses-library android:name="com.android.qualcomm.qcnvitems"/>

There are two libs in /system/lib that have names that suggest they are meant. They exist in both CM7 and the leak.

An app that starts straight into that *983*0# test menu would be useful.

For what?

Nonetheless, you have three options I can build for you:

First, I can just edit the Emode.apk to show this menu as an entry point in the launcher. Neither my app nor the Dialer would be needed.

Second, I can built a small app that directly opens this menu, without changes in the Emode.apk.

Third, I can edit my app so you only need to hit the menu-button to open the *983*0# test menu.

Whatever you want, takes probably 5 minutes (not sure if the first one works, signing and all...but since it's in /system signing shouldn't matter, right?).

Link to comment
Share on other sites

Emode wont install on zte roms either, need to push it to /system/app/

I think number 2. That menu seems to have the main useful tests, including proximity sensor calibration. It seems like some people sometimes need to calibrate their proximity sensor, it's good to be able to do that without the zte dialler. If you make it just a simple launcher as a separate app then you could even put it on the android market or something & it should work on zte roms with emode installed.

Edited by wbaw
Link to comment
Share on other sites

maybe adding those libs to the emode apk would create an installable apk.

really just need to find the bit that does the sensor calibration & rip that out into a separate app.

Link to comment
Share on other sites

Guest k0zmic

I think number 2. That menu seems to have the main useful tests, including proximity sensor calibration. It seems like some people sometimes need to calibrate their proximity sensor, it's good to be able to do that without the zte dialler.

I agree, personally it's the only reason I used the ZTE Dialer. It seems to be the same case for other users as well.

It might also save people time.

Link to comment
Share on other sites

Guest crblues

The apk that wbaw shared in is gsf b18 works. it needs polishing ( the menus are repeated) but it definitely works! so it maybe needs to be an system app?

Link to comment
Share on other sites

Did you test it on CM7, too?

Edit: aborts installation on cm

Only tested it on gsf before I posted. It doesn't work on CM7. It could be the kernel version, rather than the vmsplit 2g thing, as it doesn't work on froyo either, might be worth trying a froyo version, or maybe t0mm13b was right about the vmsplit 2g thing.

Somebody (not me) should write a sensor calibration app.

Link to comment
Share on other sites

there are also a couple of qcrilhook & qcnvitems files in /system/framework/ & /system/etc/permissions/ adding the gsf versions to cm7 didn't make it work though...

Link to comment
Share on other sites

Guest FelixL

there are also a couple of qcrilhook & qcnvitems files in /system/framework/ & /system/etc/permissions/ adding the gsf versions to cm7 didn't make it work though...

I'll have a look at the sensor calibration and on CM7 tomorrow.

Link to comment
Share on other sites

Guest Tom G

Proximity sensor calibration is fairly simple. I'll have a proper solution for CM7 done shortly.

VMSPLIT should only break prelinked native libs.

Is proximity sensor calibration an issue on any other roms? I know ZTE roms have a calibration facility, is that present in all roms (eg. the ones based on the gingerbread leak). If calibration is also needed in other roms I could try to make the CM7 solution a generic solution that will work on all roms.

Edited by Tom G
Link to comment
Share on other sites

It looks like there is a proximity sensor calibration tool run at startup on the gingerbread leak, but it looks like it should write a file to /data & doesn't. I've never had to calibrate my proximity sensor. There is another proximity sensor issue in the gingerbread leak, it seems to not work if ambient light is too bright (light & proximity sensor conflict?). Some people have claimed calibration helps, but I have never needed it myself, on any rom.

Edited by wbaw
Link to comment
Share on other sites

Guest Geree

Somebody (not me) should write a sensor calibration app.

Tom already did that... you can find it in this thread... http://code.google.com/p/cyanogenmod/issues/detail?id=3955&q=blade&colspec=ID%20Type%20Status%20Version%20Model%20Network%20Owner%20Summary%20Stars%20Priority proxycal.zip - it works on CM7 for sure

there is a nother one for originally Desire HD...I haven't tried it..(doesn't work on CM7): http://forum.xda-developers.com/showthread.php?t=951858

Link to comment
Share on other sites

Tom already did that... you can find it in this thread... http://code.google.com/p/cyanogenmod/issues/detail?id=3955&q=blade&colspec=ID%20Type%20Status%20Version%20Model%20Network%20Owner%20Summary%20Stars%20Priority proxycal.zip - it works on CM7 for sure

there is a nother one for originally Desire HD...I haven't tried it..(doesn't work on CM7): http://forum.xda-developers.com/showthread.php?t=951858

It looks like zte roms load some proximity sensor init app at startup, but a few people still complain about the bug on ginger stir fry. so i'm not sure if the zte version works on the gingerbread leak, it looks like it should write a file, but the directory is empty on my phone, maybe it's just because it's not needed on my phone.

I've not had any proximity sensor problem, on 3 blades. It seems to only affect a small minority of phones, or bright light has also been mentioned as a possible factor. I don't really know anything about the problem, except what other people have said, I've never seen it, so I can't test anything out.

TomG also said that app is not going to be included in cm7 because it could cause trouble for people who don't have a problem currently. It might not even work at all in gsf or it might cause more problems. It looks like some newer blades have a hardware change, if you read #47 & #49.

I'd agree it wants a basic ui too, especially if the setting can survive a reboot (afaik, the zte one does).

FelixL's emode helper app does the job (for zte roms with emode), I'm just worried there are too many options & we don't know what a few of them do, it could be pretty hard to get emode working on cm7 too.

Edited by wbaw
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.