Hi all.
This syu.ms.apk mod main function is to extend control of steering wheel controls plus some extra.
It is two part mod :
- factory com.syu.ms.apk must be replaced with this modded syu.ms.apk - easiest way is to use lsec mathod . If you don't know how see post #15
- Mod Config App (install like every apk ) - the configuration tool for this mod.
- Accessibility Service . This is optional. It will be required only for touch actions and split screen.
Here you have last version of my mod.Based on 17.05.23 version of syu.ms.apk
What is working :
- managing steering wheel buttons (CAN and Analog) and Head unit buttons (Need to enable this in misc page)
- assigning an APK
-assigning User Sources
-assigning Split Screen Apps
-assigning a Touch Action
-assigning Key Event : send system wide selected key code.
- assigning two functions action : "PREV / Call" and "NEXT / Hang"
- switchable No Kill
- external assets
- block some Write_to_Mcu
Config App has in built help and a language selector.
Also i attached strings.xml packaged as strings.zip .
NOTE: if the accessibility service gets killed add : "mod.accessibility.service = -15" to the skipkillapp.prop
Hi @seb21 nice idea to open a new thread as it is a complete project
can you please tell me what did you improve in com.syu.ms related to your previous version ? (SORRY IS IN THE CHANGELOG LOLOLOL)
Cheers !
@seb21 I think this one is still killing apps
public static void h(String str) {
ActivityManager n = ae.n();
try {
if (str.startsWith(":")) {
str = str.substring(0, str.indexOf(":"));
}
if (!p.a(str)) {
k(str);
n.forceStopPackage(str);
a.o.c.a(str);
}
} catch (Exception e2) {
e2.printStackTrace();
}
}
File smali/app/aj.smali
seb21 said:
[...]
And i have a question. Maybe someone of you can help me.
I try to make my dashboard display to show navigational data (distance,directions, e.t.c) - so far no success. I have 2 canbus boxes : simplesoft (XP) and raise (RZC) .Do someone of you know a place where i can get the full functions list for the canboxes ???
Click to expand...
Click to collapse
Thank you so much for the tag, and also for the modified apk. Can't wait to try it out tomorrow.
As for your question:
Does that kind of dashboard panel support the displaying of the navigation data? Even if it looks like it should, there could be different hardware and software revisions of the display with different functionalities.
When I upgraded my display first time in my Peugeot 308, I made a mistake of not checking the actual software number on the back of the new unit. While some of the functionality was present, I wasn't able to connect the radio bluetooth (yes, the radio, which is a separate unit) because of the old software on the display.
daviddosa said:
Thank you so much for the tag, and also for the modified apk. Can't wait to try it out tomorrow.
As for your question:
Does that kind of dashboard panel support the displaying of the navigation data? Even if it looks like it should, there could be different hardware and software revisions of the display with different functionalities.
When I upgraded my display first time in my Peugeot 308, I made a mistake of not checking the actual software number on the back of the new unit. While some of the functionality was present, I wasn't able to connect the radio bluetooth (yes, the radio, which is a separate unit) because of the old software on the display.
Click to expand...
Click to collapse
Yes,it does. I have Leon 3 and with the original multimedia station i had the possibility to display navigational data on the dashboard. As i switched to android unit first i had simplesoft canbox and i was able to send media info but not navi nor compass. On their web site (only chinese) there is info that my canbox can send navi data to the dashboard. But there are not one piece of documentation. Now i have raise and from start the compass started working but still no navi.
mariodantas said:
@seb21 I think this one is still killing apps
public static void h(String str) {
ActivityManager n = ae.n();
try {
if (str.startsWith(":")) {
str = str.substring(0, str.indexOf(":"));
}
if (!p.a(str)) {
k(str);
n.forceStopPackage(str);
a.o.c.a(str);
}
} catch (Exception e2) {
e2.printStackTrace();
}
}
File smali/app/aj.smali
Click to expand...
Click to collapse
It's not.
killAppWhenSleep() -> KillAllAppButSome() -> killApp(String)
Class aj n() -> o() -> h(String)
I call in n() my method that calls (or not) o()
I'm using h(String) to kill aps in the user sources (kill switch)
I see the difference on my unit. When i switch on No Kill then after evrey sleep my unit is performing boot, probably because i have low end unit UIS 8581 with only 2 gigs of RAM.
seb21 said:
Hi all.
I decided to make separate thread with my modded ms.apk.
@surfer63 Please change the link in your first post. I will no longer clutter your thread. It is to help people with different problems.
And i have a question. Maybe someone of you can help me.
I try to make my dashboard display to show navigational data (distance,directions, e.t.c) - so far no success. I have 2 canbus boxes : simplesoft (XP) and raise (RZC) .Do someone of you know a place where i can get the full functions list for the canboxes ???
Click to expand...
Click to collapse
I changed the link.
Thanks for this great contribution.
I don't consider something this useful as cluttering of "my" thread, but it is indeed better to separate it so that your app gets the attention it deserves.
I have read somewhere about a person who had an arduino connected to read all CANbus codes. I already searched frantically the last hour, but could not find it. I will continue my search.
New contrib, French strings translation (values-fr/strings.xml)
mariodantas said:
New contrib, French strings translation (values-fr/strings.xml)
Click to expand...
Click to collapse
Thanks. Config App is updated.
surfer63 said:
I changed the link.
Thanks for this great contribution.
I don't consider something this useful as cluttering of "my" thread, but it is indeed better to separate it so that your app gets the attention it deserves.
I have read somewhere about a person who had an arduino connected to read all CANbus codes. I already searched frantically the last hour, but could not find it. I will continue my search.
Click to expand...
Click to collapse
Thanks.
But don't waste your time on this. I have searched this forum on every topic related to canboxes and i have not found nothing that could help me. Beside this can loggers is not what I'm looking for. Unfortunately canbox functions having nothing common with can bus commands - different canboxes have different command ID for the same can bus commands ID
seb21 said:
Thanks. Config App is updated.
Click to expand...
Click to collapse
Thanks to you fellow for this amazing project !
And the Dutch translation.
I have the idea that "User Apk" is not yet a translatable string (but I suppose everyone can translate that)
And the original English <string name="Out_Of_Range">Argument of out integer range !!!</string>
should be "Argument out of integer range", but personally I would have used "Argument outside integer range"
surfer63 said:
And the Dutch translation.
I have the idea that "User Apk" is not yet a translatable string (but I suppose everyone can translate that)
And the original English <string name="Out_Of_Range">Argument of out integer range !!!</string>
should be "Argument out of integer range", but personally I would have used "Argument outside integer range"
Click to expand...
Click to collapse
Thanks. File updated.
And i also added whole buttons names list to strings file.
Thanks for pointing me this mistake.
Does anyone know how one would install this? And other note would this allow me to change the default action from pressing the volume button on the car. right now it turns off the screen. but leaves the sound on. If i press the power button on the radio itself on the side it turns the screen off AND mutes it. Thats what I want the volume button to do. Just like it used to do with the OEM radio.
stealthee said:
Does anyone know how one would install this? And other note would this allow me to change the default action from pressing the volume button on the car. right now it turns off the screen. but leaves the sound on. If i press the power button on the radio itself on the side it turns the screen off AND mutes it. Thats what I want the volume button to do. Just like it used to do with the OEM radio.
Click to expand...
Click to collapse
I have packed everything into this ZIP file. All you need to do is to unpack it directly onto a FAT32 formatted USB drive, plug the drive into your headunit, and wait for it to install.
The installer will make a copy of the original file into the "backup" folder.
In case something goes wrong, and you want to restore the original file, all you need to do is to copy the files 7862lsec.sh and 8581lsec.sh from lsec_updatesh\restore_script to lsec_updatesh to replace the already existing ones.
Once done, just unplug and plug back in the USB storage and wait for it to complete.
Spoiler: Used commands
If you want to write the code for yourself, use the commands below.
Save it as 7862lsec.sh and also as 8581lsec.sh
Copy modified to system
Code:
#make backup to "backup" folder on USB storage
cp -rf /oem/app/190000000_com.syu.ms/190000000_com.syu.ms.apk /storage/sdcard1/backup/190000000_com.syu.ms.apk
#copy modded file from USB storage to headunit
cp -rf /storage/sdcard1/190000000_com.syu.ms_modded.apk /oem/app/190000000_com.syu.ms/190000000_com.syu.ms.apk
#set ownership and permissions
chown -R 0.0 /oem/app/190000000_com.syu.ms/190000000_com.syu.ms.apk
chmod 0755 /oem/app/190000000_com.syu.ms
chmod 0644 /oem/app/190000000_com.syu.ms/190000000_com.syu.ms.apk
Restore original
Code:
#restore backup from "backup" folder
cp -rf /storage/sdcard1/backup/190000000_com.syu.ms.apk /oem/app/190000000_com.syu.ms/190000000_com.syu.ms.apk
#set ownership and permissions
chown -R 0.0 /oem/app/190000000_com.syu.ms/190000000_com.syu.ms.apk
chmod 0755 /oem/app/190000000_com.syu.ms
chmod 0644 /oem/app/190000000_com.syu.ms/190000000_com.syu.ms.apk
File updated on 06/11/2022 22:47 GMT
Installers added for JOYING and MEKEDE separately, updated with newer files on 21/12/2022 20:09 GMT
stealthee said:
Does anyone know how one would install this? And other note would this allow me to change the default action from pressing the volume button on the car. right now it turns off the screen. but leaves the sound on. If i press the power button on the radio itself on the side it turns the screen off AND mutes it. Thats what I want the volume button to do. Just like it used to do with the OEM radio.
Click to expand...
Click to collapse
You can't change the functions of Vol Up and Vol Down buttons, all others buttons you can change.
seb21 said:
You can't change the functions of Vol Up and Vol Down buttons, all others buttons you can change.
Click to expand...
Click to collapse
its the volume up volume down knob but if you press it . oem radio would turn off the oem radio. With this head unit it leaves the volume on and turns off the screen. Would like it to mute and turn off the screen the android unit power button on the top left if i touch that it turns off the screen and mutes.
stealthee said:
its the volume up volume down knob but if you press it . oem radio would turn off the oem radio. With this head unit it leaves the volume on and turns off the screen. Would like it to mute and turn off the screen the android unit power button on the top left if i touch that it turns off the screen and mutes.
Click to expand...
Click to collapse
When you install the app and also the modified app, you will be able to see what action is assigned to the volume button press. It's only the volume up and volume down actions which are locked, the rest should be configurable.
Do you have a CANBUS decoder, or you had to connect the Key1 Key2 wires?
It's easy to install using the method in my previous post, and also gives you a backup in case something goes wrong.
stealthee said:
its the volume up volume down knob but if you press it . oem radio would turn off the oem radio. With this head unit it leaves the volume on and turns off the screen. Would like it to mute and turn off the screen the android unit power button on the top left if i touch that it turns off the screen and mutes.
Click to expand...
Click to collapse
Pressing the volume knob sends signal Black Screen (or something like that), and yes you can assign to it function Power
daviddosa said:
When you install the app and also the modified app, you will be able to see what action is assigned to the volume button press. It's only the volume up and volume down actions which are locked, the rest should be configurable.
Do you have a CANBUS decoder, or you had to connect the Key1 Key2 wires?
It's easy to install using the method in my previous post, and also gives you a backup in case something goes wrong.
Click to expand...
Click to collapse
I have a canbus decoder . Silly Dodge Journey. Without a decoder I was stuck with a OEM radio.
Related
I have a few questions, and I'm sure the answers are here somewhere but filtering through these forums is rather daunting, so I hope you'll suffer a fw questions.
After installing WM6, there's no t9 input language. So there are seperate cabs for each language, but it seems that if I install 2 cabs, it overwrites the first language and I'm left with only one (the last) language installed.
How do I get to languages for input, like English and Spanish?
Just to clarify, I'm using andot's perfect wm6 ROM.
If I copy my contacts off my SIM, is this data going to be stored on my SD or in the memory?
Similar question for documents, temp files and ringtones. How do I keep all of this off the ROM/RAM?
Hardware Questions:
I found one copy of the i-mate PDF manual for this device, which turned out to be exactly like the paper copy I already had for Qtek.
Oddly, there's no picture of the device itself with arrows pointing at all the buttons, bells and whistles.
The jack on the bottom of the phone, is that 2.5mm? Is it just for hands free, or can it use a stereo headset for music?
The tiny hole right by that... is that for a hard reset?
WTF is the little slot-like gap in the top of the phone between the power button and the windows logo?
What do you call the internet and media player control buttons and is there an app to reasign them?
There are 3 led light holes on the face, what do they signal?
Install a T9 wich you can find in the extras.zip in phils BETA-thread. That will enable input.
The jack on the bottom is 2,5mm. You can buy 2,5 ->3,5mm adapter, or a headset with 2,5mm. Yes stereo hp is supported.
Tiny hole next to that is prolly a mic.
Slot-like? I'm not sure, but can imagine it's for use in a car. There is a button-fix in the before-mentioned extras.zip.
The green LED blinks to show that you have coverage. Blue LED for bluetooth, and the third blinks when wifi is activated. When charging your phone, one LED turns red.
Exitao said:
I have a few questions, and I'm sure the answers are here somewhere but filtering through these forums is rather daunting, so I hope you'll suffer a fw questions.
After installing WM6, there's no t9 input language. So there are seperate cabs for each language, but it seems that if I install 2 cabs, it overwrites the first language and I'm left with only one (the last) language installed.
How do I get to languages for input, like English and Spanish?
Just to clarify, I'm using andot's perfect wm6 ROM.
If I copy my contacts off my SIM, is this data going to be stored on my SD or in the memory?
Similar question for documents, temp files and ringtones. How do I keep all of this off the ROM/RAM?
Hardware Questions:
I found one copy of the i-mate PDF manual for this device, which turned out to be exactly like the paper copy I already had for Qtek.
Oddly, there's no picture of the device itself with arrows pointing at all the buttons, bells and whistles.
The jack on the bottom of the phone, is that 2.5mm? Is it just for hands free, or can it use a stereo headset for music?
The tiny hole right by that... is that for a hard reset?
WTF is the little slot-like gap in the top of the phone between the power button and the windows logo?
What do you call the internet and media player control buttons and is there an app to reasign them?
There are 3 led light holes on the face, what do they signal?
Click to expand...
Click to collapse
2.5mm, any other 2.5mm headphone can be used
There isnt any hard reset button for that phone, to hard reset, you either use the software or press the two soft key and on the phone
The 3 LED light holes? I think you mean the top there
There are 5 holes, the left most one is for power status, yellow for normal, orange for charging, red for low power, the right most hole is for connectivity, yellow for WiFi, blue for BT, the 3 in the middle is simply the earpiece, while the hole above is the loudspeaker
Thanks for the replies guys! Just a few clarification questions and a bit of repeating things back to ensure I have it correct.
In regards to the language thing:
I did find the Extras.zip and did use the "English xT9.cab", but this only gives me one language input option when I hold down the * key. If I install a Spanish T9 after the English T9, I only get the Spanish language option when inputting text. I want them both... Is there any place to get the full western language(s) WM5 T9 cab?
Audio Jack:
It's good to hear that the jack is stereo. So I could get a set of stereo headphones/handsfree combo for music. Now I just have to wait for someone to hack support for bigger than 2gb of miniSD (I know there are some that still work, but the newer ones are faster...)
So, onto the lights:
To be clear, I'm not talking about the LCD display, just the lights in the hardware fascia.
Top Left
blinks green for GSM service
solid amber when connected to USB charger/PC
Top Right
blinks green for WiFi
blinks green for WiFi
Centre Bottom (under the "0+" key)
I've seen it lit when the keypad was lit for bootloader. I don't know when else it lights up
.
The T-Mobile quickstart guide says that middle bottom one is the mic, which makes no sense as mine is filled with that plastic like the other LED lights. More likely the mic is the hole between the headphone jack and the pound (#) key .
The slot-like opening on the top back of the phone is the ringer/loud-speaker.
Along the narrow outer side of the phone, going clock-wise, we have 3 buttons:
volume toggle
comm manager
power/quicklist key
camera button
So the left and right-most buttons on the Start/Home row of buttons under the LCD are the "soft keys."
On the face above the standard numeric keypad and beneath the LCD, from top to bottom:
Start, Home, Back, Contacts/Menu/Context
Internet, Rewind, FF and Play/Pause
Extended press of Start key does nothing.
Extended press of Home starts Celetask (what would it start if no Celetask, and how would I configure it?)
Extended press of Back key does nothing.
Extended press of Contacts key does nothing.
Extended press of ie and windows media buttons do nothing, when not playing media, all 3 media buttons do nothing except start windows media player (and because these buttons are bigger than the more useful row above, windows media player starts a lot).
Is there more configurability for changing purpose of Media buttons when at Home screen or there is no Media context?
Is there any more configurability for adding extra extended key-press function for home/start row keys?
The "button fix" cab is to do what? Just make the buttons work properly with WM6, or to allow reassignment?
There's no way to disable all function (i.e. backlighting) of thumbstick while phone is locked?
I guess this is more of a WM6 question, but this type of smart phone doesn't use the Today screen with tabs?
--------
I'm actually a little surprised that there's no diagramming anywhere of button functions and that most binaries released don't have NFO files or that there's no list of what these standard files everybody downloads do. There's a couple nice lists of files to download, with some reference links, but a lack of information about their purposes.
That's why I was hoping that somewhere there was a Quick Start guide for the phone. Actually, I just found T-Mobile's here (clicky)
What's really stupid is that every other provider/reseller than T-Mobile of this handset makes you sign up for a "club" to access these PDFs and if your IMEI or serial number isn't in their database, you can't join the club.
Again guys, thanks for the info and I look forward to being able to contribute in the future.
I think they have to make you sign up for a club because it contains the ROM upgrade and the ROM are licensed, hence they just can't publish it publicly. Same reason why the ROM archive in xda-devs was told to be taken down months back ( but we dont give a damn )
karhoe said:
I think they have to make you sign up for a club because it contains the ROM upgrade and the ROM are licensed, hence they just can't publish it publicly. Same reason why the ROM archive in xda-devs was told to be taken down months back ( but we dont give a damn )
Click to expand...
Click to collapse
I applaud that. I really hope they can't do anything against you.
I still have a few hanging questions.
I read somewhere about the Bluetooth stereo needing a registry hack. Does the hardware audiohone jack also require a hack? Is it proper stereo or joint stereo?
I'm still interested in changing functions of media buttons and adding extended keypress function to otther buttons like Celetask uses with the Home key.
Exitao said:
Centre Bottom (under the "0+" key)
I've seen it lit when the keypad was lit for bootloader. I don't know when else it lights up
.
The T-Mobile quickstart guide says that middle bottom one is the mic, which makes no sense as mine is filled with that plastic like the other LED lights. More likely the mic is the hole between the headphone jack and the pound (#) key .
The slot-like opening on the top back of the phone is the ringer/loud-speaker.
Click to expand...
Click to collapse
that's the light sensor.
and about the xt9 thing i think in smartphone general forum it's a sticky topic about this. now i write from mobile and don't have the mood to 'research' :-D
DSF said:
that's the light sensor.
and about the xt9 thing i think in smartphone general forum it's a sticky topic about this. now i write from mobile and don't have the mood to 'research' :-D
Click to expand...
Click to collapse
The files there are for Vox and Xcalibur (sp?), do they work for Tornado too?
I found my answer to the English Spanish question here:
http://forum.xda-developers.com/showthread.php?t=271641&highlight=t9+spanish+english
* Extract T9SpanishLdb.dll and T9ImeRes.Dll040a.mui from t9_tornado.rar to \Windows
* [HKEY_LOCAL_MACHINE\T9 Input Method\LDBs], add string value '040a' with data 'T9SpanishLdb.dll'
* [HKEY_LOCAL_MACHINE\T9 Input Method\MUI\Languages], add '040a' to the list of 'Available', so the data will be '0409,040a' (or whatever your phone uses.. just add the one for the language you're installing)
Click to expand...
Click to collapse
Any updates on re-mapping the media buttons? I would love to re-assign these keys to Messaging and other apps I use frequently.
On my Samsung Blackjack, there is actually a function in the Windows Mobile Settings called "Buttons", which allows me to reassign the buttons to pretty much anything. Does anyone know if there is a small app or something that could do this on my SDA (I have upgraded it to WM6 using the posted sticky instructions - thanks you guys, awesome work!)
bigern79 said:
Any updates on re-mapping the media buttons? I would love to re-assign these keys to Messaging and other apps I use frequently.
On my Samsung Blackjack, there is actually a function in the Windows Mobile Settings called "Buttons", which allows me to reassign the buttons to pretty much anything. Does anyone know if there is a small app or something that could do this on my SDA (I have upgraded it to WM6 using the posted sticky instructions - thanks you guys, awesome work!)
Click to expand...
Click to collapse
I don't know anything yet and no one has answered here.
The buttons are pretty stoopid. I didn't buy this phone for mulitmedia. I bought it for productivity apps. And these media buttons are so big that it's hard to miss them when using softkeys.
So until someone gives an answer, I guess we have to find our own answers and there's a bit of a learning curve for me.
I think I found it - check out post #4 in this HowardForums thread:
http://www.howardforums.com/showthread.php?t=865189
These exact instructions worked for me on my SDA running WM6 Perfect English Edition. I changed the last button to go to Messaging (tmail.exe).
Exitao said:
I found my answer to the English Spanish question here:
http://forum.xda-developers.com/showthread.php?t=271641&highlight=t9+spanish+english
Click to expand...
Click to collapse
This wasn't the full answer to my question.
There's also a reg key:
[HKEY_LOCAL_MACHINE\T9 Input Method\Settings] Options
Changing the d-word value to 1033 (00000409 should work too) from 00003317 is what gave me my language settings back.
It took a bit of looking to find out what 00003317 was. 3317 is a ghost script name for a Chinese simplified font, as far as I can tell.
The one thing you'll notice as you look at that string is that key shares that string with a another dword entry, "chinese pinyin."
As I don't read or speak putonghua, or any hua, I thought it might be nice to delete this key. But it just keeps turning up over nad over, like a bad penny.
there's another string elsewhere:
[HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\TOUCH] Which could probably be safely removed from the ROM.
I wonder if we collected a list of all useless registry entries and had someone remove them from a future ROM, how much space could we save?
bigern79 said:
I think I found it - check out post #4 in this HowardForums thread:
http://www.howardforums.com/showthread.php?t=865189
These exact instructions worked for me on my SDA running WM6 Perfect English Edition. I changed the last button to go to Messaging (tmail.exe).
Click to expand...
Click to collapse
Yes, you did find it. Yay!
Short_AP1
Short_AP2
Short_AP3
Short_AP4
Click to expand...
Click to collapse
The files are in the Windows directory and they're just shortcuts. Easy to edit.
Just make sure that you use the button fix if your upgrade mod requires it, otherwise those shortcuts don't exist.
We'll also have to find out if it interferes with media player when it's the active app/window.
Hi guys,
My digitizer has died, and till the new one comes I was thinking of how I could use my T7272, I can write the SMS fine, but I can't send them out, cause the button is on the screen itself... is there a rom I could use freely w/o using the touchscreen?
P.S.
Is the digitizer hard to replace?
You could check out AE Button; it has some options like button presses that will activate soft buttons. I suspect you could send sms's using it. You could also try using mortscripts with AE button that will do stuff you need. There are some pretty simple scripts that will simulate screen taps, and you could assign them to a button push. I'd rather have a working touchscreen, though.
Here are some of the commands:
# 91: startmenu (on some devices it might be home button)
# 92: back key (not the backspace key but back key for closing applications which is available on some devices such as diamnd or blackstone)
# 93: menu key
#112: left softkey
#113: right softkey
#114: accept call (green button)
#115: hang up (red button)
#117: volume up
#118: volume down
#126: data disconnect
#127: toggle speaker
#133: devicelock
#223: power off
I use one to lock the device. Basically, you just put this:
Code:
sendspecial(133)
in a .txt file, and change the extension to .mscr. I call it Lock.mscr, and I have it assigned to a few different actions (like when a call comes in, a script locks the phone). So, sendspecial(112) and sendspecial(113) might help you out. There's also one for hitting 'Ok' in popups, which would probably work for you. I can't find it, though (google 'sendspecial' and you'll find it, it's all on msdn).
Anyway, if you install mortscript (maybe you already have it) as well as AE Button, you could assign button pushes to carry out those actions. Just stick the scripts somewhere easy, like the start menu, and it will be easy to set up.
If you want to get more complicated, there are also mortscript commands that simulate button pushes on the screen. You could set one up that would do just about anything. Also, SK Schema does similar stuff. You can write fairly simple sequences of button pushes that will do just about anything. This is one that I use that runs SK Tools Pim backup (I have it scheduled to run every night in the middle of the night).
#r(\windows\sktstart.exe) #p(STH:20)
#tap(146;602) #sleep(15000)
#tap(110;533) #sleep(500)
#tap(339;455) #sleep(500)
#tap(126;604) #sleep(500)
#tap(114;84) #sleep(500)
#tap(146;99) #sleep(5000)
#tap(310;254) #sleep(90000)
#tap(433;602) #sleep(10000)
#pwr() #sleep(10000)
Click to expand...
Click to collapse
Basically, the backup tool gets launched in line 1, then there are a bunch of screen taps (w/ delays, to make sure everything is ready) in the menus to get the right options selected, followed by turning the device off.
I`m not sure... But i saw somewhere app that emulate a mouse (cursor) and you will be able to control this mouse with your D-pad... But I can be wrong...
I can't install that mortscript w/o the touchscreen though..damn it..: )..
Get MyMobiler, and use it to run your device off of a pc. You should be able to get that working.
WARNING! THIS PROFILE IS IN BETA. DO NOT INSTALL UNTIL YOU HAVE READ BELOW!
Beta
When creating this profile I experienced bootloops and splash-screen freezes. If you are not comfortable with how to restore your device from these states, then please wait until it has been thoroughly tested before applying the profiles and tasks.
Testers
If there are any of you left after reading the above I was unable to totally identify what caused the crashes. I hope that through my own testing I have removed the probable causes, but I cannot promise. Read on if you’re still game and post below to let me know you’re in!
New to Tasker? Download your free trial from here
Theory
Have full media control using your device’s hardware buttons when the screen is off. Normal functionality restored when the screen is on.
Current Shortfalls/Work-in-progress
Fast reboot required to allow for system changes (15 second reboot).
- To my knowledge, system changes require this to take effect. Please tell me if you know different? As a consequence, the profiles take about 25 seconds from start to finish to activate and deactivate.
Hardware keys control media at all times, not just when the screen is off.
- A revert profile currently takes care of this, so it’s still more than usable.
Unable to configure hardware keys to only perform actions on long-hold
- I’m working on this, but I think it may be down to Gingerbread/kernel restrictions?
Unable to get trackpad click to perform an action
- Again, Gingerbread/kernel/ROM restrictions?
Ability to skip music folder commands unknown
- I’m working on this
Pop up menu tasks are ugly
- I’ll sort out a suitable background image and work out how to change the icons.
Preparation
This may look like another mammoth, ball-ache of a tutorial, but it’s pretty simple really – make yourself a coffee and by the time you’ve finished it, you’ll be done.
You must have full root read/write access.
1) Ensure you are running the latest version of busybox free from the Market. Even if your current ROM comes with it preinstalled, the Market version allows for this and will update it according. This is essential, as a probable cause of the bootloops I experienced. Reboot after updating it.
2) Install the Locale Execute Plugin free from the Market
3) Download Button Saviour Root free from the Market. We will be messing with the hardware keys, so if you lose control of them, this application will save you by displaying them on the screen. Have a play with this application and make sure you are fully versed with using it just in case.
4) Nandroid backup after you’ve done the above so you don’t have to reinstall everything again should things go wrong {We will be mounting the system for full write access}.
Installing and Customisation
Basically, we will be creating a file with the media controls in and asking Tasker to overwrite the existing file when we want to use it – simple.
Using a file explorer, create a folder within the sdcard/Tasker folder called ‘mediacon’. Within this folder, create another called ‘orig’. Navigate to
Code:
system/usr/keylayout/
Take a copy of the file bravo-keypad.kl (bravo will be replaced with your device name (unless you have a bravo!)). Paste it in the ‘mediacon’ folder you created. Paste another copy in the ‘orig’ folder. Open the file in the mediacon folder with a text editor on your phone (or alternatively copy/push it to your pc and view it there).
From the .zip file below, view the bravo-keypad.kl file on your pc using an application such as Notepad ++ (download free from here) or a simple text editor (although the layout may be a little confusing).
You’ll need to compare the two and see what the differences are. The most important additions to the bravo-keypad.kl to enable the media actions on the hardware keys are:
Code:
key 139 MENU WAKE_DROPPED
key 158 BACK
key 217 SEARCH
To:
Code:
key 139 MEDIA_PLAY_PAUSE WAKE
key 158 MEDIA_PREVIOUS WAKE
key 217 MEDIA_NEXT WAKE
The hardware key numbers and the remaining content of the file will no doubt be different from device to device, I assume it will also be different betweens ROMs and user settings too. You will need to preserve the remainder of the file.
Please can I ask you to post the contents of this file in ‘code’ tags if you can’t see that someone has done this for your device already. Could you also detail your ROM and Kernel. It will help others to quickly edit the file with the correct settings without scratching their heads too much – community spirit and all of that.
As you can see all we are doing is changing the three hardware buttons (menu, back and search) to perform media controls instead. You’ll need to edit the file in the ‘mediacon’ folder (either on your device or drag/push to your pc and then back again) to reflect this. Make sure you do not change the file in the ‘orig’ folder! Remember, your device may have different key numbers for the hardware buttons, this won’t matter, just edit the ones listed as menu, back and search and not the ones that have a # before them.
So, now you have your edited file done and your original file stored safely. We’re nearly there!
Install the profiles and tasks and make sure they are unchecked until you have edited them for your needs. The Tasker Media Control V1.zip folder contains the following two profiles:
MediaBoot
MediaControl
It contains the following 8 tasks:
ResetMedVar
MediaMenu
MediaContBoot
MediaContOff
MediaContOn
FastReboot
FastBootConfirm
ContState
The triggers for the tasks are:
Device Boot
Headset Plugged
If you currently have any other profiles that load music apps or perform other tasks when the headset is connected, please disable these.
Firstly, open the task MediaContOn. Click on action 4 (execute action) and select edit. You’ll see two mentions of the bravo-keypal.kl. Replace ‘bravo’ with your device name, or alternatively with whatever the original file was named in system/usr/keylayout/ (I assume it is your device name?). You’ll need to press the back button once you’re done.
Secondly, do exactly the same in the task MediaContOff.
Finally, open the task MediaContBoot and alter action number 2 to the music application you use (if you don’t use the stock android player).
That’s it! You’re done!
Terminal Command Information
There will be a number of terminal commands running, to copy and overwrite files which will mount the /system as read/write. This of course always has its risks, so ensure you have that nandroid backup just in case….
In the task FastReboot, there is the terminal command
Code:
Killall system_server
This command is not without its risks too, but it is the only way to avoid a full reboot in order to apply the system changes.
Running the task for the first time.
In the profiles and tasks, two variables are created:
%EARP – This is set to 2 when the headset is connected and 1 when it is disconnected. By removing the headset (%EARP =1), you will trigger the exit task which will begin to revert the media button changes.
%MEDIACONT – It was necessary to create this variable to avoid Tasker reacting to the headset plugged trigger after the reboot and wanting to start copying the files all over again. If %MEDIACONT = 2, Tasker will therefore know you are already controlling the hardware buttons and it will prevent the headset profile running again. The variable is changed to a value of 1, once the button controls are returned to normal. Simple hey…
When testing, sometimes these variables were showing the wrong value, due to the options to ‘cancel’ at various stages of the tasks. Before you connect your headset and run the profiles for the very first time only, you will need to open the task ResetMedVar and click on ‘test’. This will set both values to 1. At any point, if your variables go out of sync, you can repeat this exercise so the headset connected/disconnected will trigger the profile/exit task accordingly.
So, open ResetMedVar and click test to set the variables to 1. Tick the MediaBoot and MediaControl profiles to activate them and apply to exit Tasker. Insert your headset!
You’ll be prompted with the first pop-up asking if you want to active the media controls. Click to activate (it will disappear in ten seconds and cancel otherwise). Shortly after, a confirmation pop-up will confirm the files have been copied correctly. Shortly after that, another pop up will confirm you wish to proceed with the fast reboot. Click to activate and you’re device will reload the system. It should take around 15-20 seconds.
When the device boots back up, the Button Saviour application will be loaded, to ensure you have button control if things go wrong. Pressing the little arrow on the right hand side of the screen will enable a back button that you can press to back out of the screen. You media player should then load. Choose a happy tune (from a folder/album/artist that has more than one song) (not forgetting you can’t use the back button other than on the screen!) and turn the screen off.
Hopefully, search will skip forward a track, back will skip back a track and menu will play/pause the playback. WHOOP!
When you’ve finished testing, switch the screen back on, unlock it if necessary and then remove the headset. Tasker will then perform the above steps again, replace the files back to the original ones before confirming the fast reboot.
15-20 seconds later, hopefully all of your hardware buttons will then perform as normal!
Job done.
Extras
I couldn’t get the trackpad/optical joystick to perform an action on my device. There is an entry at the very end of MediaContOn and MediaContOff after the STOP. These entries copy and reversely delete a curcial-oj.kl file to /system/usr/keylayout/ that is supposed to enable the trackpad to work. Drag these to position 5 if you’d like to test them on your device to see if they work. Let me know!
Credits
localh0st for the curcial-oj.kl file here
Decad3nce for his key remapping guide here
The mass of other threads I read through on XDA to gain the knowledge to do this and the devs of the free apps mentioned above - I'm sure they'd appreciate a donate.
Oh and of course the dev of Tasker! What an application.... (I'm not on commission I promise!)
FAQ
Q) I have many other Tasker questions, can I post them here??
A) To avoid clutter, probably best to use this official Google group
Q) Where can I learn more about Tasker?
A) The manual and Profiles and step-throughs on the Tasker wiki and you’ll be up to speed in no time.
Change Log
Confirming pop up tasks may be removed in V2.
Bugs
Let me know...
Future Changes/Requests
Find another way to apply system changes without the need of fast reboot.
Hardware keys to only control media when the screen is off.
Configure hardware keys to only perform actions on long-hold to avoid 'pocket-presses'.
Get trackpad/optical joystick click to perform an action
Enable the ability to skip music folders and/or directories.
Pop up menu tasks need sprucing up.
Installation Instructions
In menu options/profile data 'Import One Task':
ResetMedVar
MediaMenu
MediaContBoot
MediaContOff
MediaContOn
FastReboot
FastBootConfirm
ContState
In menu options/profile data 'Import One Profile':
MediaBoot
MediaControl
The thanks meter lets me know I'm appreciated!
Heh, looks like Brandall is taking Tasker to new heights.
Nice work mate, but I just have to add something though...
Using this can help, BUT, it can also "cripple" those Tasker scripts you've posted about battery saving.
Using Tasker for zipping files and extracting them loads my CPU to the max, also, anything that uses notifications and file reads/writes does that too, eventually, using more battery...
Using this I can see a situation where some user might just lock/unlock their screen very often and rapidly, this might cause a major stress on the CPU, ultimately, nulling and voiding your battery saving scripts and potentially causing harm to CPU/battery/device.
And in any case, turning the screen on to switch tracks is really not that much of a hassle, for me anyway.
This is how I see it, just my 2cents.
But keep up the good work buddy, you seem to have been able to utilize Tasker to a MUCH greater extent than what I was able to, will definitely follow your posts.
Gramlengo said:
Heh, looks like Brandall is taking Tasker to new heights.
Nice work mate, but I just have to add something though...
Using this can help, BUT, it can also "cripple" those Tasker scripts you've posted about battery saving.
Using Tasker for zipping files and extracting them loads my CPU to the max, also, anything that uses notifications and file reads/writes does that too, eventually, using more battery...
Using this I can see a situation where some user might just lock/unlock their screen very often and rapidly, this might cause a major stress on the CPU, ultimately, nulling and voiding your battery saving scripts and potentially causing harm to CPU/battery/device.
And in any case, turning the screen on to switch tracks is really not that much of a hassle, for me anyway.
This is how I see it, just my 2cents.
But keep up the good work buddy, you seem to have been able to utilize Tasker to a MUCH greater extent than what I was able to, will definitely follow your posts.
Click to expand...
Click to collapse
Hi Gramlengo, I guess I can count you out as a Beta Tester!?
The logcat/zipping entries should be deleted from the other profiles if you aren't analysing them anymore to see what your phone is up to. As you said, you will use much less resource that way (they will be removed in next release)!
I do a lot of running, so being able to skip track through my pocket (without waking the phone) is essential = my motivation for working this out. For me, being in screen off state therefore won't clash with the other profiles... although saving battery power wasn't a consideration in this profile - there is plenty to spare these days The notifications are for testing and user interaction - I don't use them in my profile, it just overwrites the file and reboots...
I'm running out of ideas for the next profile, I'm open to suggestions! Good to hear you're following my posts, I'll look forward to your feedback - now sign up for this beta, you know you want to....!
Heh, I'd love to be beta testing your ideas!
Gramlengo said:
Heh, I'd love to be beta testing your ideas!
Click to expand...
Click to collapse
Looks like you might be alone there!!
Alright, finally got a time to test this one:
First, I plugged in my headset and got the two pop-up questions which I clicked activate on. Then, nothing happened. After about 10-15 seconds I got a superuser request for the locale execution plugin which i clicked allow and remember my choice on. Still nothing happened. After another 10-15 seconds I got another superuser request from busybox and quickly after a superuser request from locale execution plugin, both which I clicked allow and remember my choice on.
Then the phone finally fast-rebooted. When it was back up and fully loaded, the music application started. I started a tune, switched off my phone screen, and clicked the back button, nothing happened. I clicked the search button, nothing happened. I turned the screen back on, and hey, the back button still functioned as a back button, and the search button still worked as a search button.
What did I do wrong?
My device is a desire HD running leedroid Hd (latest version and kernel).
Does this have something to do with the Desire HD having capacitive buttons?
Will try again, but this time by remapping the physical volume buttons and the physical power button.
I have also attatched the original keymapping file, and my modified one.
Edit: That didn't work. Opened root explorer to see if the values were right, and they were. I also noticed another keymapping file called "spade-keypad-v0.kl" (without the "). Will try to edit the values in this file to see if that will work.
Edit2: Editing the back,menu and search button in spade-keypad-v0.kl didn't work. Will try to remap the volume and power keys.
Edit3: Ok, two more combinations to test: Editing the capacitive buttons in both files, and afterwards editing the physical keys.
Edit4: No luck, I have attatched the other spade-keypad-v0.kl for you to look at. Hope you can fix this!
torsrex said:
I have also attatched the original keymapping file, and my modified one.
Edit: That didn't work. Opened root explorer to see if the values were right, and they were. I also noticed another keymapping file called "spade-keypad-v0.kl" (without the "). Will try to edit the values in this file to see if that will work.
Edit2: Editing the back,menu and search button in spade-keypad-v0.kl didn't work. Will try to remap the volume and power keys.
Edit3: Ok, two more combinations to test: Editing the capacitive buttons in both files, and afterwards editing the physical keys.
Edit4: No luck, I have attatched the other spade-keypad-v0.kl for you to look at. Hope you can fix this!
Click to expand...
Click to collapse
Appreciate your testing torsrex. Nothing's ever simple is it... Did you fast reboot every time you applied changes to the files?
In the file spade-keypad-v0.kl, did you set them like this:
Code:
key 102 HOME WAKE_DROPPED
key 139 MEDIA_PLAY_PAUSE WAKE
key 158 MEDIA_PREVIOUS WAKE
key 217 MEDIA_NEXT WAKE
Check they had applied with a file explorer first and then fast rebooted?
Let me know!
I checked that the files were changed every time with root explorer. I also tried a normal reboot if the fast reboot didn't work (Did this all the times I had changed a file), and I tried copying the files manually with root explorer.
I tried to change the values of the spade-keypad-v0.kl to what you typed, but that didn't work either. Maybe I should also mention that after I changed the back-key, menu-key and the search-key to media controlls, the home button also won't work.
Does this have something to do with having capacitive buttons and not physical buttons (I think the button turns them self off when I put on the screen lock)?
torsrex said:
I checked that the files were changed every time with root explorer. I also tried a normal reboot if the fast reboot didn't work (Did this all the times I had changed a file), and I tried copying the files manually with root explorer.
I tried to change the values of the spade-keypad-v0.kl to what you typed, but that didn't work either. Maybe I should also mention that after I changed the back-key, menu-key and the search-key to media controlls, the home button also won't work.
Does this have something to do with having capacitive buttons and not physical buttons (I think the button turns them self off when I put on the screen lock)?
Click to expand...
Click to collapse
Ok, sounds like you've been pretty thorough. I knew the set-up would be different device to device, but didn't think it would be difficult to establish how.
I guess all we can do is use an app to discover the changes that need to be applied on your device. Check out ButtonRemapper and after it applies the updates, take copies of the files it has adjusted (assuming the app works for you!). Let me know!
Tried the buttonRemapper application from the market, and It worked! The buttons (menu, back and search) got remapped, but I noticed that the screen needed to be turned on before I could press them (no need to enter any pin code or dragging down the slider, just pressing the unlock button). I have atattched all of the kl-files.
torsrex said:
Tried the buttonRemapper application from the market, and It worked! The buttons (menu, back and search) got remapped, but I noticed that the screen needed to be turned on before I could press them (no need to enter any pin code or dragging down the slider, just pressing the unlock button). I have atattched all of the kl-files.
Click to expand...
Click to collapse
Ok, I'm confused now... I can't see any difference between what you did to what the app has done...? Can you?
When the changes are applied in the app, it must take a copy of the original files it's about to change and store them somewhere. Is there a ButtonMapper folder on the SD card? Perhaps have a look in there when the controls are changed for media? See if there is just one file, or if there's an additional one we haven't considered..?
Then we'll solve the screen off use!
Hm, can't find the backup folder, it isn't on the sd card and it's not in the keylayout folder.
torsrex said:
Hm, can't find the backup folder, it isn't on the sd card and it's not in the keylayout folder.
Click to expand...
Click to collapse
Damn it! I'm going to have a search around and see what I can come up with... I'll be back...
Is your device fine after the fast reboots? That's why I put this as a beta as I didn't know how stable it would be compared to a full reboot...
Using the buttonremapper application, I didn't face any issues. Using the tasker-profiles (editing the files manually) caused the home button, back button, menu button and search button to not function any more and I had to restore a nandroid backup. Maybe you should get the correct setup files for each phone before you take it out of beta
By the way, I sent a message to the developer asking him where the buttonremapper application saves it's backup-files, hopefully I will get a quick answer!
torsrex said:
Using the buttonremapper application, I didn't face any issues. Using the tasker-profiles (editing the files manually) caused the home button, back button, menu button and search button to not function any more and I had to restore a nandroid backup. Maybe you should get the correct setup files for each phone before you take it out of beta
By the way, I sent a message to the developer asking him where the buttonremapper application saves it's backup-files, hopefully I will get a quick answer!
Click to expand...
Click to collapse
Good work! And thanks for testing... I need a lot more volunteers like you for each different device, but I don't see them flocking!
Just got a reply from the developer: "in its data directory in the subdirectory files: /data/data/com.beansoft.buttonremapper/files."
So here you go.
torsrex said:
Just got a reply from the developer: "in its data directory in the subdirectory files: /data/data/com.beansoft.buttonremapper/files."
So here you go.
Click to expand...
Click to collapse
Good work again Sir! I'll take a look at the files and see what else is needed for devices with capacitive buttons (which I'm hoping is the only difference...).
Someone just released a trackpad wake for all AOSP ROMs (without messing with the kernel?) over in the Desire forum, so I'm currently looking at that too...
Always something to do... speaking of which, I need you over here next
So I was bored tonight and thought I'd try and revive this project.
What I've got is still a work in progress, but it basically involves using Buttonremapper to reassign volume_up and volume_down to fast_forward and rewind, then use Tasker's 'state: media button pressed' to forbid any other apps from responding to those two buttons and have them act out Tasker tasks only.
One button is set to play/pause media (if screen is off) and raise volume (if screen is on) and the other set to skip forward media (if screen is off) and lower volume (if screen is on). The end result is almost full media control from hardware buttons without having to look at the phone or take it out of your pocket: use the volume up and down buttons to skip and pause tracks, or press power to turn the screen on and change their function to volume up or down temporarily before reverting back to skip and pause as the screen times out. You don't need to be looking at the screen while this is happening.
The problems at the moment are:
1) While two buttons have effectively been made into four, there are five necessary functions - volume up, volume down, play/pause, next track, previous track. I figured previous track was the least important but it would be nice to have it as well.
2) Normally the volume buttons in Android are context-sensitive, changing media or system or whatever volume depending on where you are. With this they're always assigned to media volume, so you'd need an app like Audiomanager or something to change the volume of other things.
3) Other problems that I haven't realised yet.
One other thing, Tasker's 'state: media button pressed' lets you set both long presses and short presses, but they don't seem to play nice together. I think both the long press and short press tasks activate and conflict when the button is held down, but I haven't had a look at this yet.
Can anyone advise on how I could ho about changing the list of apps that gets started by the Mode function on my Xtrons unit (MTCD GS PX5 oreo)?
I know someone has done something similar with a Joying unit, but as far as I can see, they replaced the "Sofia-1-C9-Server... apk) with an alternative version.
I've pulled all the system apps to my PC via ADB (root) via WiFi, and I can see apps like MTCControlSettings.apk and MTCContolInfo.apk but there are no apks with "server" in their name
So I'm not sure where to start looking for the APK which handles the steering wheel control "Mode" handling.
Does anyone know how this is handled ?
are you able to resolve it? im having the same problem. btw my unit is a MTCE_CSN thanks
slidefriday said:
are you able to resolve it? im having the same problem. btw my unit is a MTCE_CSN thanks
Click to expand...
Click to collapse
I've not had time to investigate this.
For the moment, I've just set my Mode button to be the Home button, as thats better the cycling through a load of useless "modes" like the AV input and their useless audio and video players.
I did try to work out how the radio communicated with the system apps, but I'm having a lot of difficulty de-odex'ing (decompiling) even the radio app. Because the apps are Oreo versions, and most of the decompilers don't fully support Oreo odex (compiled application program) files
I did post a question to the general Dev part of XDA about de-odex'ing Oreo files but didnt get any responses
I would be interested in this if you figure it it out as I'd like to get dab in the list of apps it cycles through.
RogerClark said:
I've not had time to investigate this.
For the moment, I've just set my Mode button to be the Home button, as thats better the cycling through a load of useless "modes" like the AV input and their useless audio and video players.(
Click to expand...
Click to collapse
That would be enough for me, but with onboard apps or settings i haven't found a way to change it. I can use my Wheel control for changing volume and skipping music in any music app I am using, but the mode button always switches throug radio, ac input, mediaplayer and dvd.
The app for steering wheel control which was preinstalled on my head unit, doesn't react to any button and the firmware settings only to the hardware buttons of my head unit.
So, how did you do it?
nadkp said:
That would be enough for me, but with onboard apps or settings i haven't found a way to change it. I can use my Wheel control for changing volume and skipping music in any music app I am using, but the mode button always switches throug radio, ac input, mediaplayer and dvd.
The app for steering wheel control which was preinstalled on my head unit, doesn't react to any button and the firmware settings only to the hardware buttons of my head unit.
So, how did you do it?
Click to expand...
Click to collapse
In the Settings, ( think its in the Car) section, is the setting (app) which allows you to associate specific steering wheel buttons with specific actions.
I thought all generic units had this app, because the steering wheel button for each car operate differently.
My Subaru only has one wire from the steering wheel, and has 6 buttons. Each button has a different electrical resistance, and you have to press each button, and then associate a Short Press and a Long Press, on that button, to a specific action.
The controls like Volume + and - and Track + and - and Mute are pretty standard.
The only other button I have is the Mode button, and I assigned that to the "Mode" action in the settings. However the Mode operation, cycles though a predefined list.
So I simply reassigned the Mode button to the Home action.
I did try a few other things, like seeing if I could press 2 buttons at the same time e.g Mode and Track +, but it either treated this as a press on the Mode button or a press on the Track + button. So that didn't work.
If I get time, I'll have another go at decompiling the system apps, but last time I tried to do that, I could not see anything that looked like the list of apps.
If I had programmed it, I'd probably put the app names into a string resource, but goodness knows what the programmed did who wrote the system apps in these units.
RogerClark said:
In the Settings, ( think its in the Car) section, is the setting (app) which allows you to associate specific steering wheel buttons with specific actions.
Click to expand...
Click to collapse
Thanks for the quick reply. I already tried the factory settings but my steering wheel buttons won't work there. I only can set action to the buttons on my radio. Sadly I have to wait for any other solution. But thanks again for sharing your experience :good:
What brand and model of HU do you have?
Hey,
Opel/Vaux/Chevy cars have canbus hard mapped buttons.
Mine can't be configured through the in-built apps or factory settings either.
One would have to examine the canbus.apk / MTCManager to maybe update the xposed for MTCDTools.
MTCD Tools can see the button codes (3 digits), but can't map any other function or even intercept.
---------- Post added at 16:43 ---------- Previous post was at 16:43 ----------
Hey,
Opel/Vaux/Chevy cars have canbus hard mapped buttons.
Mine can't be configured through the in-built apps or factory settings either.
One would have to examine the canbus.apk / MTCManager to maybe update the xposed for MTCDTools.
MTCD Tools can see the button codes (3 digits), but can't map any other function or even intercept.
RogerClark said:
What brand and model of HU do you have?
Click to expand...
Click to collapse
I have a Xtrons PB78QSFP-B which is designed for a Ford Focus and came with a standard canbus adapter for ford. But I have the old model of the HU which has only 2GB Ram not 4.
My guess is, that Ford has hard mapped buttons too, like Xorit said it about Opel/Vaux etc
update guys! mtcdtools will do the trick! though the old mapping will flicker but still the newly assigned actions will prevail.
i can live with this already. maybe ill just find the solution to delete the factory set MODE actions :laugh:
slidefriday said:
update guys! mtcdtools will do the trick! though the old mapping will flicker but still the newly assigned actions will prevail.
i can live with this already. maybe ill just find the solution to delete the factory set MODE actions :laugh:
Click to expand...
Click to collapse
Did your have to root your unit or install anything like Xposed etc? Or does it just work with the stock firmware?
works with stock fw. im not yet doing any firmware mods
slidefriday said:
works with stock fw. im not yet doing any firmware mods
Click to expand...
Click to collapse
Good to know
Hi there,
after struggling around with the mcte utils settings.ini file to remap buttons, I tought I might share what I learned.
This assumes, you have installed xposed, activated the mtce-utils module and placed the settings.ini file at your internal sc card (/storage/emulated/0).
Here's how to remap buttons:
PHP:
[android.microntek.service#keys]
# In this section, you have to put all GLOABL remap functions into. You can use the following ways or remapping:
# note: xxx always stands for the mtc-keycode. If you do not know them, you can use MTCD Tools -> Creata new bnding -> Obtain key sequence to get the key codes.
app_xxx=com.spotifiy.music
#--> this defines to launch any app, e.g. app_257 would in my case launch spotify when pressig OK button.
keycode_xxx = 4
# ---> with the keycode command, you can assign android keycodes. For example "4" is the back button, "87" is media next.
# a full list of android codes can be found here: https://android.googlesource.com/platform/frameworks/native/+/master/include/android/keycodes.h
activity_xxx = com.zoulou.dab/com.zoulou.dab.MainActivity
# --> this is to launch any activity. Always put a pair of app/activity with a slash in between. My example starts the DAB App.
intent_xxx= [any android intent action]
#--> this is to assign an intent. Couldn't test it yet.
keymtc_xxx= yyy
# --> this is used to reassign another mtc key.
[com.microntek.radio#keys]
# to remap buttons within specific apps, create an extra section which contains the app name [B][app.name#keys][/B]
# same as with global remapping, put the codes here as you which to reassign keys within special apps.
Well hope that makes the settings more clear for you.
BR
Christian
I just made some small corrections to the above post and want to share my settings with you:
What did I actually do?
I changed the two steering wheel keys "Mode" and "List" to Keycodes 219 and 4. 219 launches Google Assitant, 4 is to go back. This way, I can easily launch Google Assistand for calls, navigation and spotify, tunein and can minimize if needed.
I assigned keycodes 87/88 to both forward/backwards keys, so that I in most apps can go forward/backward
I assigned my favorite apps to the buttons 1-6, which are DAB, TuneIn, Spofity, FM Radio app, Google Maps and Bluetooth Phone
So I can switch easily between all those apps. As the radio app has its own buttons assigned, here the keys 1-6 are still used as usual.
What doesn't work is the part where I wanted to fix wrong forward/backward keys in radio app. Assigning backward to forward and vice versa leads to a crashing radio app (behaves like non ending loop then)
PHP:
[android.microntek.service#keys]
activity_331=com.zoulou.dab/com.zoulou.dab.activity.MainActivity
keycode_365=4
keycode_276=87
keycode_278=88
keycode_256=219
activity_283=com.zoulou.dab/com.zoulou.dab.activity.MainActivity
app_284=tunein.player
activity_285=com.spotify.music/com.spotify.music.MainActivity
activity_286=com.microntek.radio/com.microntek.radio.MainActivity
app_287=com.google.android.apps.maps
app_288=com.hb.dialer.free
[com.microntek.radio#keys]
keycode_276=90
keycode_278=89
activity_331=com.zoulou.dab/com.zoulou.dab.MainActivity
Hope this helps!
Christian
I can not make settings.ini work, do you paste the file in / storage / emulated / 0 directly or put it in the mtce-utils folder?
Hy @gforums,
thanks for the little tutorial.
Unfortunately, changing the steering wheel buttons does not work.
I am currently using Android Oreo with the Malaysk Rom.
Enclosed my settings.ini
Code:
[android.microntek.service#keys]
keycode_258=87
keycode_316=88
@elavaro19:
as I understand it you have to put the ini file directly into the directory /storage/emulated/0.
BR
gary822
@gary822 I'll try like this, I can not assign buttons for canbus and I want to remap some buttons between them the aux button to home
Dude, this is awesome stuff! Thank you so much for sharing what you learned!
But where can i find out wich key on my sterlingwhel has wich keycode?
kaderekusen said:
But where can i find out wich key on my sterlingwhel has wich keycode?
Click to expand...
Click to collapse
I've used mtcd tools, option to select a new binding and then pressing the key I want to assign. Mtcd tools should show you the mtce key code then.
kaderekusen said:
But where can i find out wich key on my sterlingwhel has wich keycode?
Click to expand...
Click to collapse
gary822 said:
Hy @gforums,
thanks for the little tutorial.
Unfortunately, changing the steering wheel buttons does not work.
I am currently using Android Oreo with the Malaysk Rom.
Enclosed my settings.ini
Code:
[android.microntek.service#keys]
keycode_258=87
keycode_316=88
@elavaro19:
as I understand it you have to put the ini file directly into the directory /storage/emulated/0.
BR
gary822
Click to expand...
Click to collapse
Did you reboot after changing the settings.ini? This is needed. Have you also activated the xposed-mtce-utils module? And checked whether the mtce key codes used are the right ones?
Are you on Malaysk?
I think I may have found the solution to this. I'll post it here if it works.
mattj949 said:
I think I may have found the solution to this. I'll post it here if it works.
Click to expand...
Click to collapse
hello, Any news ?
Thank you very much for this! I was able to figure out how to remap most of the keys on my CAN bus steering wheel controls. I'm now trying to figure out how to find an apps key codes so I can assign them to other keys on the head unit... How did you find out what the key codes are for your DAB key codes in the very last section of the settings.ini?
I have 2 apps I'm trying to figure out. One I'm trying to do is the FM radio app; [com.microntek.music#keys] and would like to make to when I press and hold the "next or previous" buttons that changes the presets, then just a single press will seek the next FM station. Do you know if there is any command lines that can be added to make it use the press and hold of a button? So that a single button can do 2 actions? I've played around with some of the units key study that has the ability to change the units buttons and can assign a single press, and press and hold, but the list of keys that can be assigned is limited.
The other I need to figure out is one button in a special app that tells it's special USB to send a signal to turn on the factory DSP amplifier. That app has button within the app that can manually send the signal, but I can't figure out how to find it's key code. And there is no Activity for it that I can use that I can find. I use an app called QuickShortcutMaker to identify an apps Activities name that it has.
Thanks.
Hey guys,
can any1 please share respectively upload the latest mtce-utils? Can't find them...
Thanks in advance
look on git hub
whitewolf8111 said:
Thank you very much for this! I was able to figure out how to remap most of the keys on my CAN bus steering wheel controls. I'm now trying to figure out how to find an apps key codes so I can assign them to other keys on the head unit... How did you find out what the key codes are for your DAB key codes in the very last section of the settings.ini?
I have 2 apps I'm trying to figure out. One I'm trying to do is the FM radio app; [com.microntek.music#keys] and would like to make to when I press and hold the "next or previous" buttons that changes the presets, then just a single press will seek the next FM station. Do you know if there is any command lines that can be added to make it use the press and hold of a button? So that a single button can do 2 actions? I've played around with some of the units key study that has the ability to change the units buttons and can assign a single press, and press and hold, but the list of keys that can be assigned is limited.
The other I need to figure out is one button in a special app that tells it's special USB to send a signal to turn on the factory DSP amplifier. That app has button within the app that can manually send the signal, but I can't figure out how to find it's key code. And there is no Activity for it that I can use that I can find. I use an app called QuickShortcutMaker to identify an apps Activities name that it has.
Thanks.
Click to expand...
Click to collapse
--> activity_331=com.zoulou.dab/com.zoulou.dab.MainActivity
The keycode from the key I want to assign can be obtained my "mtcd key tool" or in hal9k rom, where you can activate that keycodes are displayed by key press. In my case, key 331 is the "1"-key from my orginal radio.
the app/activity combination can by obtained by the app "package name viewer" that lists you app names / activities of your insalled apps.
I do not know, how you can change behaviour between short and long press.
Also, how to change the behaviour of the keys within an app, is difficult. You can work with Intents, but I am not used to it.
gforums said:
--> activity_331=com.zoulou.dab/com.zoulou.dab.MainActivity
The keycode from the key I want to assign can be obtained my "mtcd key tool" or in hal9k rom, where you can activate that keycodes are displayed by key press. In my case, key 331 is the "1"-key from my orginal radio.
the app/activity combination can by obtained by the app "package name viewer" that lists you app names / activities of your insalled apps.
I do not know, how you can change behaviour between short and long press.
Also, how to change the behaviour of the keys within an app, is difficult. You can work with Intents, but I am not used to it.
Click to expand...
Click to collapse
Thank you for your help! I think I have most of it all working the way I want now, but I will keep playing around with it some more. :good:
@gforums or anyone with the answer, has anybody been able to remap a wireless keyboard/remote? Mainly I'm trying to get the volume and mute to work. I know that the volume is controlled by the MCU and the remote want's to control the media volume which does nothing on our units. I'm just not quite sure how it should be written for the mtce-utils .ini file.
MCU volume up/down codes for MTCE are: 273/281 respectively. And the remote/native android codes for volume up/down are: 24/25 respectively.
has anyone already tried get this running on android 9 (PX5)?
As xposed is needed and in android 9, xposed only can be installed as magisk module, I can't get it working.
So currently I do not know a way to change canbus keys in Android 9.
Anyone of you does?
Best regards,
Christian
Hi,
I'm running android 9, I installed Xposed, but how do you instal mtce-utils ? Can't find them anywhere.
Thanks