c++nokia

How to get Nokia S30+'s MRE vxp file to run on nokia 225?


The setup

Ok let's me talk a bit about the setup:

I have installed Visual Studio 2008 (the edition that let you try for 90 days), MRE SDK 3.0 from this Github issue, Sourcery Codebench Lite for ARM EABI and also ARM Realview Development suite 3.1 (but it requires license, and I am too lazy to cr@ck it, also I prefer the open source GCC to that commercial software). I set the compiler to Sourcery Codebench's GCC.

I can compile and run vxp file on Mediatek's emulator without any problem.

The problem

After compile for ARM platform, here's the output in [project_dir]\arm: vxp

I tried copying the Default.vxp to my Nokia 255's SD card, then open that file on my phone, but the phone said Can't open this app at the moment.

I also try creating an appmanager folder on my SD card, then my phone's internal storage, then copy the vxp file there, but in the app list, there is still no app other than stock apps, and the vxp file still not run.

Other vxp files

I downloaded some vxp files from http://shifat100.xtgem.com/, put to my SD card and run from it. Some will work, for example the Asphalt 6 Game, but some won't, for example the Gold rush game, they yelt Can't open this app at the moment.

I checked the format of the Asphalt 6 game 's vxp with the file command, and it said data. But I check my Default.vxp, it was ELF. I think this is the problem, but don't know how to convert/pack ELF to vxp.

Using binwalk with the Asphalt 6 game 's vxp, I get 2 zlib compressed files and 2 GIFs, which are icons of the game. The two compressed files, after unpack, one contain many names, for example

splash_320x240.bsprite
splash_menu_320x240_200k.bsprite
splash_menu_split_320x240_200k.bsprite
splash_title.bsprite
hollywood_320x240_200k.bsprite
new.png
font_small.bsprite
font_large.bsprite
interface_font.bsprite
copter.bsprite
car_tourist.bsprite
cars_fx.bsprite
cars_shadow.bsprite

so I think this is the resource file. The other might contain code, I found some exception strings in it, for example

Unknown signal
Invalid Operation
Divide By Zero
Overflow
Underflow
Inexact Result
: Heap memory corrupted
Abnormal termination
Arithmetic exception:
Illegal instruction
Interrupt received
Illegal address
Termination request
Stack overflow
Redirect: can't open:
Out of heap memory
User-defined signal 1
User-defined signal 2
Pure virtual fn called
C++ library exception

and some (maybe) S30+ platform APIs, for example

vm_get_mre_modules
vm_get_mre_total_mem_size
vm_get_mre_version

So what might be the problem? Screen resolution? I changed it but still not work. SDK version? I also tried all 3 version, but no luck. File format? Compiler difference? (Note that I'm using GCC while most tutorial left on the internet suggest using RVCS) I don't know.

Any ideas? Thanks!

If you need to get any files, tell me and I will put it here.


Solution

  • Delivered from my answer at RE.SE


    First I want to say thanks to people at 4pda forum. See their thread here.

    Can you figure out informations about the MRE VXP format

    Well I haven't found yet, need further research

    how to get it signed

    Short answer:

    Step 1: Get your SIM 1's IMSI number (NOT IMEI, they are DIFFERENT!)

    You can do this in multiple ways, but the easiest way is to plug the SIM 1 in to an Android phone and read. I personally use ADB to read IMSI (worked on Android 6+ without root):

    adb shell service call iphonesubinfo 7
    

    Step 2: Go to https://vxpatch.luxferre.top/ and input the IMSI number you got in step 1. Then select your VXP file, click 'Patch' and you should be able to download a patched version.

    or

    You can enter the IMSI number in the project setting, but REMEMBER TO ADD 9 BEFORE THE IMSI NUMBER

    imsi

    Step 3: Move the patched version into a SD card and plug it in your phone Step 4: Find the vxp file and click open, your app should run now!

    Long answer: Some apps doesn't require specify the IMSI, they just work on any devices. That's because they use another way of signing, using RSA key.

    If you are interested, read here. The text is in Russian, so use Google Translate if you want to.

    I have tested with ADS 1.2 compiler (I cracked myself, if you want it then tell me) and GCC (Smaller size + work very well) and Nokia 225, will continue to test further!

    The apps in S30+ platform are written in C (and optionally C++), so you can port many apps to S30+

    Again, a great thanks to people at 4pda forum!

    An image of the app running after signing:

    image of the app