Jump to content


Emode without ZTEDialer

* * * * * 1 votes

  • Please log in to reply
27 replies to this topic

#1
FelixL

FelixL

    Enthusiast

  • Members
  • PipPipPip
  • 196 posts
  • Location:Germany
  • Devices:San Francisco, Moto Defy
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;


#2
wbaw

wbaw

    account closed

  • Banned
  • PipPipPipPipPipPip
  • 1,885 posts
  • Gender:Not Telling
Sounds good, I want it.  B)


#3
Andy58

Andy58

    Newbie

  • Members
  • Pip
  • 44 posts
  • Location:Portsmouth UK
  • Devices:ZTE Blade/Orange San Francisco

View Postwbaw, on 29 July 2011 - 02:00 PM, said:

Sounds good, I want it.  B)

+1


#4
johnsatt

johnsatt

    Newbie

  • Members
  • Pip
  • 13 posts
  • Gender:Male
  • Devices:sanfransisco

View Postwbaw, on 29 July 2011 - 02:00 PM, said:

Sounds good, I want it.  B)
+1

Oldgeezer

#5
t0mm13b

t0mm13b

    Hardcore

  • MoDaCo Ad Free
  • PipPipPipPipPipPip
  • 1,775 posts
  • Gender:Male
  • Location:Ireland
  • Devices:GT-S8500,Zte Blade,SE ST15i
  • Twitter:@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?

try{ not_laugh; }catch{ FAIL; }finally{ laugh; }

#6
FelixL

FelixL

    Enthusiast

  • Members
  • PipPipPip
  • 196 posts
  • Location:Germany
  • Devices:San Francisco, Moto Defy

View Postt0mm13b, on 29 July 2011 - 03:17 PM, said:

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: http://android.modac...inger-stir-fry/
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 ;)


#7
wbaw

wbaw

    account closed

  • Banned
  • PipPipPipPipPipPip
  • 1,885 posts
  • Gender:Not Telling

View PostFelixL, on 29 July 2011 - 03:31 PM, said:


@wbaw: could you make an update.zip like the one here: http://android.modac...inger-stir-fry/
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.

Attached File  emode.zip   277.47K   243 downloads


#8
wbaw

wbaw

    account closed

  • Banned
  • PipPipPipPipPipPip
  • 1,885 posts
  • Gender:Not Telling

View PostFelixL, on 29 July 2011 - 01:58 PM, said:

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, 29 July 2011 - 04:25 PM.


#9
wbaw

wbaw

    account closed

  • Banned
  • PipPipPipPipPipPip
  • 1,885 posts
  • Gender:Not Telling
Your app works on GSF with emode added back FelixL.

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


#10
FelixL

FelixL

    Enthusiast

  • Members
  • PipPipPip
  • 196 posts
  • Location:Germany
  • Devices:San Francisco, Moto Defy

Quote

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.


Quote

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?).


#11
wbaw

wbaw

    account closed

  • Banned
  • PipPipPipPipPipPip
  • 1,885 posts
  • Gender:Not Telling
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, 29 July 2011 - 06:19 PM.


#12
wbaw

wbaw

    account closed

  • Banned
  • PipPipPipPipPipPip
  • 1,885 posts
  • Gender:Not Telling
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.


#13
k0zmic

k0zmic

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 2,134 posts
  • Gender:Male
  • Location:London
  • Devices:HTC Hero & HTC Sensation XE

View Postwbaw, on 29 July 2011 - 06:12 PM, said:



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.


#14
wbaw

wbaw

    account closed

  • Banned
  • PipPipPipPipPipPip
  • 1,885 posts
  • Gender:Not Telling

View Postwbaw, on 29 July 2011 - 06:17 PM, said:

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

It does, this apk installs (after you unzip it, stupid modaco content filter blocks *.apk)

Attached File  Emode.apk_FILES.zip   142.97K   223 downloads

Edited by wbaw, 29 July 2011 - 06:54 PM.


#15
FelixL

FelixL

    Enthusiast

  • Members
  • PipPipPip
  • 196 posts
  • Location:Germany
  • Devices:San Francisco, Moto Defy
Did you test it on CM7, too?

Edit: aborts installation on cm

Edited by FelixL, 29 July 2011 - 10:33 PM.


#16
Geree

Geree

    Regular

  • Members
  • PipPip
  • 82 posts
  • Devices:ZTE Blade

View PostFelixL, on 29 July 2011 - 10:09 PM, said:

Did you test it on CM7, too?

Edit: aborts installation on cm

Doesn't work on pourtugese spring (Froyo) either...


#17
crblues

crblues

    Newbie

  • Members
  • Pip
  • 38 posts
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?


#18
wbaw

wbaw

    account closed

  • Banned
  • PipPipPipPipPipPip
  • 1,885 posts
  • Gender:Not Telling

View PostFelixL, on 29 July 2011 - 10:09 PM, said:

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.


#19
wbaw

wbaw

    account closed

  • Banned
  • PipPipPipPipPipPip
  • 1,885 posts
  • Gender:Not Telling
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...


#20
FelixL

FelixL

    Enthusiast

  • Members
  • PipPipPip
  • 196 posts
  • Location:Germany
  • Devices:San Francisco, Moto Defy

View Postwbaw, on 01 August 2011 - 06:30 PM, said:

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.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users