PDA

View Full Version : [Script] power_button_menu.nrx



danwood76
08-10-2004, 08:38 AM
Hi

I have just finished my latest nokix script so enjoy
It patches the menu that comes up when you press the power button
very handy for shortcuts I thought :)

I have not tried but I think you should be able to add at least 10 new mwnu lines which should be enough for anyone ;)

if you find any bugs post em here ;)

here is a dump of the info from my file:

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


power_button_menu.nrx Version 1.0
------------- Copyright (c) 2004 Danwood76 ;)

This Patch sets your own menu items in the power menu
Very handy for shortcuts etc.

This only works on 3310 v6.33 for now
in future I will write for others too but I am just learning nokix
scripting :)

Special Thanks to Nokdoc, Kontact, mestrini and everyone @ Nfree!!

Im not sure how to use parameter files yet so you will need to edit
the first few lines of the script to suit your menus

For example if you wanted inbox as menu loc #2
The Text ID is 0x003199ED
The Function is 0x5E0
The Function ID is 0x1E

the hex code is: 003199ED000005E00000001E
the menu line would be:
menu_.2 = x2c(003199ED000005E00000001E)

you also need to change the menu count, just change the number inside
the brackets (at the moment it is 2)

if you need more than 6 menu lines just copy and paste the menu line
you need changing the number up respectivly

Also it is possible to set this script to skip your profile menus
so you just have your chosen menus

Simply change the line that says
my_b=x2c(E016)
to
my_b=x2c(E070)

any bugs etc post 'em up in nokix section on nfree ;)

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

you will need to change the name from power_button_menu.nrx.txt to power_button_menu.nrx

regards,
Danny

dvirus666
08-10-2004, 08:52 PM
The script works BUT for me I changed the E016 to E070 & had created 6 menus but only 2 showed up. :(

I looked at the file and changed the mask for the 'power_menu_start' & 'old_menu' it should now work on the 3330/3350. :-P

danwood76
09-10-2004, 12:29 AM
I can get at least 4 menus up

you must change this value:
menu_count=x2d(2)

for 6 you would change to:
menu_count=x2d(6)

dvirus666
09-10-2004, 01:17 AM
thanks. i will try again :D

danwood76
09-10-2004, 09:33 AM
High this is my latest version of the script

it has 8210 support added
and other slight modifications

again you need to change name of file to get rid of the extra .txt

regards,
Danny

danwood76
09-10-2004, 11:45 AM
Here is another version with 3410 support aswell :)

BTW switch off menu lines are:

Switch off line 3310:
menu_.1 = x2c(003195B20000032200000000)

Switch off line 8210:
menu_.1 = x2c(0032E4120000032200000000)

Switch off line 3410:
menu_.1 = x2c(004924190000032200000000)

can anyone confirm if it is working with 8210?
my 8210 flasher head is bust :(



/*
power_button_menu.nrx Version 1.3
------------- Copyright (c) 2004 Danwood76 ;)

This Patch sets your own menu items in the power menu
Very handy for shortcuts etc.

This only works on 3310 v6.33, 8210 v5.31 and 3410 v5.42 for now
(it may work on different sw versions for those models but not
tested)
in future I will write for others too but I am just learning nokix
scripting :)

Special Thanks to Nokdoc, Kontact, Mestrini and everyone @ Nfree!!

Im not sure how to use parameter files yet so you will need to edit
the first few lines of the script to suit your menus

For example if you wanted inbox as menu loc #2
The Text ID is 0x003199ED
The Function is 0x5E0
The Function ID is 0x1E

the hex code is: 003199ED000005E00000001E
the menu line would be:
menu_.2 = x2c(003199ED000005E00000001E)

you also need to change the menu count, just change the number inside
the brackets:

menu_count=x2d(2)
to have 4 you would have:
menu_count=x2d(4)

if you need more than 6 menu lines just copy and paste the menu line
you need changing the number up respectivly

Also it is possible to set this script to skip your profile menus
so you just have your chosen menus

just change the line
profiles="1"
to
profiles="0"

any bugs etc post 'em up in nokix section on nfree ;)

*/


regards,
Danny

danwood76
13-10-2004, 09:57 PM
Hi guys thanks to mestrini you can now put your menus in a description file
a lot easier than old method

Also I have added 3210 support



power_button_menu.nrx Version 1.6
--------------------- Copyright (c) 2004 Danwood76 + Mestrini ;)

This Patch sets your own menu items in the power button menu
(Very handy for shortcuts ;) )

The code is made specially for 3210 v6.00, 3310 v6.33, 8210 v5.31 and
3410 v5.42 but it may work on different sw versions for those models,
although not tested

Special Thanks to Nokdoc, Kontact, Mestrini and everyone @ Nfree!!


***************** How to configure *****************

Use a text file to configure the menu options with
the following strings format:
@menu=<hex_menu_code>
---------------------

For example if you want Inbox as a power button menu
you have to get the following info:
Text ID ----------> 0x003199ED
Function ---------> 0x5E0
Function ID ------> 0x1E

Then convert it to a 12 bytes hex code by adding 0's before each
parameter (if needed): 003199ED|000005E0|0000001E (24 digits!!)

So the final result must be:
@menu=003199ED000005E00000001E

The menu counting is automatic now so no need to change the number
of menus to add like in previous version. To have more menus just
copy and paste the '@menu=' line ;)

It's also possible to set the script to suppress the original profiles list
so that you just have your chosen menus. To do that just use the string
'@No_profiles' before the menu lines.

any bugs etc post 'em up in nokix section on nfree ;)

enjoy :)


regards,
Danny

mestrini
14-10-2004, 12:17 AM
Hi guys,

to ease things even more i leave you an example text file to use with this script. All you have to do is change values to your needs


cheers

Ice Draagon
14-10-2004, 03:00 AM
I tried adding a checking for NSM-1 (6150). Obviously it didn't work. Any samples using it on a 6150 v5.23? Tnx.

danwood76
14-10-2004, 08:45 AM
I tried adding a checking for NSM-1 (6150). Obviously it didn't work. Any samples using it on a 6150 v5.23? Tnx.

Unfortunatly it is a little more complicated than just adding a check
But I will look into the 6150 and add it to the next update

regards,
Danny

danwood76
14-10-2004, 07:34 PM
Here is file with 6150 added :)

regards,
Danny

Ice Draagon
15-10-2004, 03:11 AM
Here is file with 6150 added :)

regards,
Danny

Thanks but still it didn't work. And also, there's a bug on line 143 and fixed it:

if phone_type="NSM-1" then do

Still, it didn't work. When I press the power button, the phones hangs.

Here's the text file as parameter:


# This is the file with new power_button_menus
# definitions.
#
# To know how to add shortcuts just read the
# info ('i') of power_button_menu.nrx
#
# Remember to remove the '#' char to include
# that menu in the patching and be sure that
# the code is 24 digits long!!


#@no_profiles

######### MENUS DEFINITIONS #########

# Switch Off! Menu Line
@menu=003195B20000032200000000

# Inbox Menu Line
@menu=002D6117000005E00000001D

#
#@menu=000000000000000000000000

#
#@menu=000000000000000000000000

#
#@menu=000000000000000000000000


First, I used the sample text file posted by mestrini. The effect was the same as of that above. I tried locating the address for the inbox menu line title text and hence the:
@menu=002D6117000005E00000001D

Still it didn't work. Maybe it's the:

# Switch Off! Menu Line
@menu=003195B20000032200000000

Tried searching the 0x00319B52 but didn't find it on the flash of 6150 v5.33, so I suspect this is the culprit.

I don't know how to search for the power menu pattern in order to change the above.

mestrini
15-10-2004, 06:39 AM
Hi ICE,

the switch off code you get from the example file is valid for 3310 v6.33 only :lol: You can use the func (322) and ID (00) but must use specific address.
to get the correct address for you model you must search the string as you did for Inbox. Look for "Switch Off!" ;)

cheers

danwood76
15-10-2004, 08:22 AM
if phone_type="NSM-1" then do


hehe
Sorry I was deleting stuff in the patch obviously deleted wrong bit

The code should work 100% as it is only one bit different to the 8210

at the moment I am working on adding bitmaps to the menus
that could be quite cool

I have fixed the little problem above and changed the version checker as I know it works on earlier versions of the 3310 and 8210

also fixed a small 3410 bug mestrini found/created ;)

regards,
Danny

danwood76
15-10-2004, 06:50 PM
Mestrini has just finished v2 of the script

This script allows you too use menu names/functions that are stored by other scripts
Very Powerful!! :)

I have removed all older versions from the thread as they are not compatible with latest version

I have included an example description file also



power_button_menu.nrx Version 2.0
--------------------- Copyright (c) 2004 Danwood76 & mestrini
Special Thanks to Nokdoc, Kontact and everyone @ Nfree!!

This Patch sets your own menu items in the power button menu
(Very handy for shortcuts ;) )

The code is made specially for 3210 v6.00, 3310 v6.33, 3410 v5.42,
6150 and 8210 v5.31 but it may work on different sw versions for
those models, although not tested.

The script's configuration is in a new (and much easier) level. :)
No more adding zeros or finding the address of a text string!!!
It works like 'write_main_menu' and 'shortkeys' description files
that allows to add shortcuts to your own menus - not existing in
original firmware - all in one patching session.


***************** How to configure *****************
Two situations can occur:

CASE 1: (menu already exists in firmware)

-->@menu title=<string_number> func=<func> arg=<func_ID>

For example if you want Inbox as a power button menu
you have to get the following info:
String num. ----------> 1107
Function ------------> 0x5E0
Function ID ----------> 0x1E

So the final result must be:
@menu title=1107 func=5E0 arg=0x1E


CASE 2: (menu is being created by another patch)

-->@menu title=<text_var> func=<func> arg=<var_name>

In this case the 'text_var' is the same (case sensitive) used in
add_ppm_strings and 'var_name' is the same (also case sensitive)
given by the patch (5E0 id!!)

So the final result can be something like this:
@menu title=text/reboot func=5E0 arg=sw_reset


The menu counting is automatic now so no need to change
the number of menus to add like in previous version. To have
more menus just copy and paste the '@menu=' line ;)

It's also possible to set the script to suppress the original
profiles list so that you just have your chosen menus. To do
that just use the string '@No_profiles' before the menu lines.

any bugs etc post 'em up in nokix section on nfree ;)

enjoy :)


regards,
Danny

Ice Draagon
17-10-2004, 12:16 AM
Tried and still didn't work. The phone still hangs when you press the power button.

Maybe the function in 6150 is not 322? I don't know.

Anyway, thanks for the help guys. ;-)

danwood76
17-10-2004, 01:30 AM
There was a slight bug in previous version
Mestrini fixed ;)

Here is latest v2.1

@Ice Dragon

The 0x322 is the switch off in all dct3 I think
Anyway it was copied from the original menu

Unfortunatly I have no 6210 to test
all I had was numbers on my monitor

I will have another look at 6210 flash this week :)

regards,
Danny

Ice Draagon
20-10-2004, 09:15 AM
Still wont work on the 6150 :???:

I guess I have to wait for other's comments if it works on their 6150.

vikus
25-11-2004, 03:54 PM
I have problem. :x

Nead patching scipt i have error:

# Processing: power_button_menu.nrx THE_END
Reading parameters file...
#String 1387 -[0x056B] not found! Aborting....now!

What it is bad ?

This is flash 3310 v6.33

danwood76
25-11-2004, 05:07 PM
It cannot find the text string you specified
Check the number and re-try

regards,
Danny

vikus
25-11-2004, 07:03 PM
It does not it understand :mad:

This as parameter to script

#@no_profiles
# Switch Off! Menu Line 1
@menu title=746 func=322 arg=0x00

# Reboot Menu Line 2
@menu title=text/reboot func=5E0 arg=sw_reset

# Reminders Menu Line 3
@menu title=145 func=0x5E0 arg=0x62
--------------------------------------------

And script add_ppm_strings.nrx and in him:

@text var=text/reboot
ENGL:Reset
POLI:Reset

What I have to wrong.

Sorry for my english :roll:

spaceimpact33
26-11-2004, 07:12 AM
Nokix Just becomes more powerfull every day :D

Thanks Danny :grin:

mestrini
27-11-2004, 02:14 AM
New version with some fixes and now compatible with add_5e0_id.rx v2.0

For those experiencing some problems with previous patching try this version to see if they get solved :-P


...
v 2.3 - fixed error calculation of "func" value
code is now compatible with add_5e0_id.rx v2.0
description file has new format for "func" (read below!)


***************** How to configure *****************
Two situations can occur:

CASE 1: (menu already exists in firmware)

-->@menu title=<string_number> func=<func> arg=<func_ID>

For example if you want Inbox as a power button menu
you have to get the following info:
String num. ----------> 1107
Function ------------> 0x5E0
Function ID ----------> 0x1E

So the final result must be:
@menu title=1107 func=0x5E0 arg=0x1E
NOTE: 'func' must have the "0x" before the value

CASE 2: (menu is being created by another script)

-->@menu title=<text_var> func=<func> arg=<var_name>

In this case the 'text_var' is the same (case sensitive) used in
add_ppm_strings and 'var_name' is the same (also case sensitive)
given by the script (5E0 id!!)

So the final result can be something like this:
@menu title=text/reboot func=0x5E0 arg=sw_reset
NOTE: 'func' must have the "0x" before the value
...



enjoy :)

kraze1984
27-11-2004, 10:48 PM
@mestrini:
or you are allPOWERfull or you have many time to do all those scripts :p

Thanx alot for work you are doing for the community!

grreetz

danwood76
28-11-2004, 12:24 AM
Thanx alot for work you are doing for the community!


Thanks also to nokdoc and I for this too ;)

mestrini
28-11-2004, 02:52 AM
@mestrini:
or you are allPOWERfull or you have many time to do all those scripts :p

Thanx alot for work you are doing for the community!

grreetz


thx m8. :D
I do spend more time than i should with the scripts (wife's opinion :lol: ) but it's mostly because i do need very few hours of sleep and because i carry my laptop wherever i go and even in working hours i manage to find some ocasions to reverse :P

btw, as Dan said, there is a lot of effort from other guys too (u too); specially YAK who made this great tool called nokix and is developing big time also :D

cheers

kraze1984
28-11-2004, 10:56 PM
if phone_type="NHM-5" & version="V 06.07" then do
menu_code =

x2c(480E90022000900390044680480D900520FF307A4682466846518301466948078348200B9007A9082010700

8200D2100AA02F000F800)
if profiles=1 then do; my_b=x2c(E016); end
else do; my_b=x2c(E070); end
good_flash=1
end


Then script also works with 3310 v.6.07

Another thing: people must know also the string for power off, otherwise they obtain Power off menu without power off :)

My example:
(for 3310 v 6.07)
First string is power off string.

Problem: if i add the string with add_ppm_strings (not with other script, but only with it) and then point to it with this script, it cannot find this string. i must before make in file the change of type 040567...

danwood76
28-11-2004, 11:43 PM
The script will work with all 3310 versions I think
I tried on 5.57 and it worked

Here is a slightly updated version which gives you the Switch off! text ID for use in the menus
Also I deleted the version identifier on the NHM-5 line so it can be used with other SW versions

Enjoy ;)

regards,
Danny

domimat
29-11-2004, 09:18 PM
hi

there should be one line changed:

runatend "power_button_menu_2.4.nrx" "THE_END" (-140)

otherwise "can't open script" error!

and one more thing... it can't use added strings :(
e.g. @menu title=text/init_sim"

danwood76
29-11-2004, 11:42 PM
You must have the script in the nokix/scripts/ directory otherwise the runatend wont work

This will be the cause of your error
It can use added strings

That is what the last bit is for ;)

regards,
Danny

mestrini
30-11-2004, 12:08 AM
i'm sorry dan but domimat is right.

the runatend call must be for the new file name which is: power_button_menu_2.4.nrx ;-)

it won't give errors if u have version 2.3 in same nokix folder (the one being called :lol: )

cheers

danwood76
30-11-2004, 09:46 AM
Ahh
I see

Mine works because it is still called 2.3 in the scripts dir
Im updating the script below so re-download if you need it ;)

Also I noticed that I was getting add_PPM_str problems so I made the priority -160 instead of -140

regards,
Danny

mestrini
30-11-2004, 12:26 PM
i must be getting dumb because i can't understand kraze's problem with switch off string and can't get the add_ppm_strings error u guys tlak about :-?

can anyone be more clear about these issues? thanks

cheers

danwood76
30-11-2004, 05:10 PM
For some reason my add_ppm_strings is not adding the strings properly

I couldnt work out why it wasnt finding the newly added PPM strings

So I only added the strings and did a manual search and chunk export
In both cases I didnt find the added string

But when I patch this with my menu it works fine??? :-?

Nokix has confused me again :o

Also I solved krazes problem it was simply about finding out the 'switch off!' text ID so I made the patch dump it itself ;)
This way you can patch once and find your values and add them to your menu
Patch again and it is all working :)

Anyway I will keep playing with nokix till I get so annoyed I just delete it!!

regards,
Danny

mestrini
30-11-2004, 05:52 PM
well, my add_ppm_strings give no errors but i haven't checked if the strings are added :???:

as for kraze's problem, what u have done i think is no solution because we'd have to do it for all the users that can't find a string :razz: Sometimes it's a matter of flashing and seeing the result and then try again with other values; besides, makes no sense to patch same script twice to get one result. just my opinion though :-)

cheers

domimat
30-11-2004, 11:01 PM
still the same... :-x


# Processing: power_button_menu_2.4.nrx THE_END
Reading parameters file...
#String 1384 -[0x0568] not found! Aborting....now!

# Script error!


that's what happens when I try to add some text like this:

@text var=text/init_sim
ENGL:Init SIM
POLI:Init SIM

@menu title=text/init_sim func=0x5E0 arg=init_sim_card

danwood76
30-11-2004, 11:21 PM
Thats the error I keep getting :(

I am still playing ;)

regards,
Danny

mestrini
01-12-2004, 02:10 AM
I see now what u guys complain about and it's for sure related to the anonimous_access.nrx script (i think it's not saving itself to the 5e0 table)

Still, while we wait for someone to fix that i release a new version of this thread's script that helps those that have trouble in finding the text id for the switch off function.
All u have to do is enter the text: "text/switch_off" (case sensitive) in the title and the script finds the value, loads it to the pool and then calls it. No hassle, no fuzz :D

The credits for the idea go to Dan and i get the hard work to make it work :P (thanks dan)

cheers

enjoy

danwood76
01-12-2004, 09:35 AM
The credits for the idea go to Dan and i get the hard work to make it work :P (thanks dan)


Thanks Mestrini
Knew you could do it ;)

regards,
Danny

mestrini
01-12-2004, 12:50 PM
i solved the anonymous access so called "bug" ! :grin:


And after reading this u guys should be embarressed :lol:

Nokix doesn't add a string to the flash until write_main_menu.nrx does the job. So no matter if u add the string with add_ppm_string.rx because it never gets written to the firmware code ;)

This isn't the same as adding a 5e0 id to a shortkey that doesn't require to have a menu entry because you're cloning a menu entry into the power_menu "folder"

Just try to add a menu entry and see results

cheers

danwood76
01-12-2004, 01:46 PM
Nokix doesn't add a string to the flash until write_main_menu.nrx does the job. So no matter if u add the string with add_ppm_string.rx because it never gets written to the firmware code ;)


Seems very strange :?
Maybee Yak needs to re-name the script

doesnt_actually_add_PPM_string_until_menu_patch.rx

actually that is a little long :P

thanks mestrini ;)

szczuru
03-07-2005, 09:35 AM
Anybody Have Working script with 3330?

-=PBCNX=-
14-07-2005, 03:19 PM
script does not work on nokia 3330. :???: