yashsingh1/xdaforums huggingface dataset:
[MTCB Software Development] agentdr8:
Discontinued

Due to a lack of free time and newer hardware (MTCD), I am no longer supporting this module. The code is freely available on my github.

XposedMTC -- mods for Huifei/RM/KLD/GS/JY headunits

Right now, the mod consists of the following features:

Change preferred music app from MTCMusic to something else

Change preferred video app from MTCMovie to something else

Ability to override the default mode switch behavior to include only the sources you want (in addition to Music)

Overridden mode switching can add your selected Nav app (in Settings->Gps) to the rotation

Ability to apply Loudness on boot (newer system images persist this setting)

Time-based dimmer and adjustable brightness level when time is outside dimming period

Ability to automatically set dimming start and end times based on current date, timezone, and GPS location (no data connection required)

Ability to learn your radio presets and re-apply them if/when the presets get lost (usually on hard-reset)

3 replacement launchers for user-selected Music, Videos, and Radio apps for non-SWC vehicles

Preference to allow all BT OBD adapters to pair with headunit

Intents to start and stop the XMTC service

Preference to override the stock volume OSD and place volume level in the statusbar

Launcher to manually start the reverse camera view (BackView) -- disabled for now

Screen Filter integration for ultimate dimming control

Changelog

v1.0 - Initial release

v1.0.1 - Added Playerpro control intents -- forgot to change startService to sendBroadcast for Playerpro -- redownload this if you previously downloaded it

v1.2 - Added dimmer control, debug preference

v1.2.1 - Fixed switchpreference controls that were disabling themselves

v1.2.5 - Added replacement launchers for Music, Video, and Radio for non-SWC users

v1.3.0 - Rolled all beta and experimental changes into a stable build

v1.4.2 - Fixed BT OBD override (tested on latest Malaysk rom with a generic BT ELM327 v1.5 adapter with name CBT.)

Things for the future

Hard button remapping -- mtc-keys works for this

Add user-selected app to the mode switch rotation (e.g. Torque)

Fix system crash when Line-In (AUX) source is added to modeswitch rotation

Figure out a way to turn off the backlight completely, and allow it to be mapped to a button press/long press -- Screen Filter integration allows for complete backlight adjustment

Add preference to enable full backlight brightness when BackView is foreground

Add preference to enable dimmer control via headlight switch/illumination wire

Translations

If anyone would like to submit a translation in their native language (or one other than US English), please visit this link and contribute. Thanks!

Completed translations (thanks!)

Hungarian - [MENTION=6178031]peti007[/MENTION]

This module requires that you first install the Xposed Framework and enable the app_process.

Added the module to the Xposed Repo for easy updating from the headunit.
[MTCB Software Development] Syphe:
Don't know if this is the right place for this, but I've searched around and can't find an answer.

Am having a problem setting default Music app, i've changed it to poweramp, and it works great, however have noticed that when I start the radio app, then switch to poweramp, the radio app doesn't stop. Is there anything else I have to setup to get the radio app to mute when changing a music app?
[MTCB Software Development] agentdr8:
How are you switching between PA and Radio? Mode button or launcher icon?

If you're not using a mode button on steering wheel controls, then you have to use the included launchers called MyMusic, and MyRadio in order to properly switch audio sources.
[MTCB Software Development] Syphe:
My unit has hardware buttons which launch the sources, so I use those, I did notice launching MyMusic did mute the radio (think it launched MTCMusic), but the "Media" button on the unit just launched poweramp (after changing default app in xposedmtc) and left the radio going.
[MTCB Software Development] agentdr8:
Oh I see. You can use mtc-keys to remap those buttons to launch the MyMusic and MyRadio activities.
[MTCB Software Development] Syphe:
cheers, I'll give that a try next time I get in the car :)
[MTCB Software Development] agentdr8:
I believe the proper mtc-keys.ini syntax would look something like:

activity_##=com.dr8.xposedmtc/.activities.Music

activity_##=com.dr8.xposedmtc/.activities.Radio

Where ## is the keycode of that particular button.
[MTCB Software Development] WestlakeSt:
Hi,

I have been having similar issue with my Pumpkin head unit which also has hard buttons. I'm running XposedMTC and mtc-keys modules and I'd already used mtc-keys to map my "MEDIA" hard button to music app directly as XposedMTC on its own didn't do it for my chosen music app. When I switch from music app (Mixzing) to Radio the music app is still playing.

I hadn't spotted the "MyMusic" and "MyRadio" activities in the app drawer screen before (only had the unit just over a week) but even using these these instead of the hard buttons the music app still plays over the radio and vice versa (i.e one doesn't stop the other). Shame as when I found your posts above I thought these activities would be the solution to my issue and I could just remap hardware buttons to these with mtc-keys. :crying:
[MTCB Software Development] agentdr8:
Originally the only supported media player in XMTC was Poweramp, but I've since added PlayerPro, and few others that utilize generic Android intents for control. It's possible Mixzing doesn't listen for these intents, and specific support would need to be added.
[MTCB Software Development] WestlakeSt:
Hi agentdr8,

Thanks for the information. I will try Poweramp and PlayerPro as Mixzing is just one of a few alternative apps I'm trying out so not committed to keeping it at this stage. If Poweramp or Player Pro work well for a car head unit in terms of user interface and hardware abilities (i.e. hard buttons working as I want) then I will purchase one or the other.

Will get the trials for each app and give them a try tomorrow.

Kind regards,

Steve
[MTCB Software Development] WestlakeSt:
Hi agentdr8,

I have now tried Poweramp and PlayerPro and both will switch the radio off if I use the MyMusic/MyRadio icons. So I tried using the above syntax in the mtc-keys.ini for the appropriate key codes but this doesn't appear to work. I amended them on the off chance that it may have needed to be "MyMusic" and "MyRadio" at the end of each line (as that is what the icons are called in the app drawer part) but either way nothing is triggered on pushing the buttons.
[MTCB Software Development] agentdr8:
Hmm. I may have to export those activities in the manifest, based on what I read on the mtc-keys info.

EDIT: Since I have an intent filter on those activities, they should be exported by default. The mtc-keys syntax might need tweaking. Try activity_##=com.dr8.xposedmtc.activities/Radio
[MTCB Software Development] robertut:
[MENTION=434511]agentdr8[/MENTION], can you please add a dark theme to this app? I mean, black background and white text?

It kills my eyes every time I open it...

Cheers!
[MTCB Software Development] agentdr8:
I'll add it to my list for the next release.
[MTCB Software Development] robertut:
Many thanks in advance.
[MTCB Software Development] Syphe:
I'm getting the same thing. When I change mtc-keys, my home screen just receives a home key press (I think).

If I change activity to app and set a package name, it loads the app, so just an issue with activity_xx not resolving.
[MTCB Software Development] WestlakeSt:
Hi again,

Just to update. I am still not having much luck with getting the hardware keys to work. I have tried the following combinations in the mtc-keys.ini file (only one pair at a time) and rebooted the unit each time

43 is my "MEDIA" button and 42 is my "BAND" button which I would like to map to Poweramp and Radio respectively.

activity_43=com.dr8.xposedmtc/.activities.Music

activity_42=com.dr8.xposedmtc/.activities.Radio

activity_43=com.dr8.xposedmtc/.activities.MyMusic

activity_42=com.dr8.xposedmtc/.activities.MyRadio

activity_43=com.dr8.xposedmtc.activities/Music

activity_42=com.dr8.xposedmtc.activities/Radio

activity_43=com.dr8.xposedmtc.activities/MyMusic

activity_42=com.dr8.xposedmtc.activities/MyRadio

activity_43=com.dr8.xposedmtc.activities/.Music

activity_42=com.dr8.xposedmtc.activities/.Radio

activity_43=com.dr8.xposedmtc.activities/.MyMusic

activity_42=com.dr8.xposedmtc.activities/.MyRadio

NB: I tried "MyMusic" and "MyRadio" since that is the name of the icon if you go to the apps drawer.

With some of the above, pushing the hardware button would take me back to the home screen, but wouldnt stop anything playing or launch anything else. To be clear, if I'd launched Poweramp with the MyMusic activity in the app drawer and then pushed the BAND hardware button, the unit would return to the home screen, but poweramp would still be playing and the radio would not launch.

Other combinations would do nothing at all.

Are there any other possible combinations I could try i.e. dots and slashes being in different places?

Just for information to anyone who is going to try and suggest help I know next to nothing about android programming or how apps work behind the scenes so please feel free to be very patronizing in how to possibly get this working in the mtc-keys ini file. :fingers-crossed:
[MTCB Software Development] agentdr8:
I'll take a look at mtc-keys and figure out what the proper syntax is. It definitely wouldn't be the My* names, as those are just the labels for the launcher icons. The activity classes are named Music and Radio.
[MTCB Software Development] p_mike83:
You can try writing app_43=package name instead of activity_43=activity. You can find the package name of the application using an app from play store, search for package name viewer.
[MTCB Software Development] agentdr8:
For most packages, that's fine, as there's only a single activity within it. But with XMTC, the default activity is the preferences, and then there's the 3 My* activities.
[MTCB Software Development] treech:
I rooted my pumpkin (3188 chip, 1024x600 res, 4.4.4 org rom) unit a few days ago with the *#htc#whatever code so i could use the xposed framework with works fine.

Thing is that when i press the source button on my swc it sometimes reboots the unit, and when that happens it seems to get stuck with the bootlogo (the H for honda in my case) until i force it into a cold reboot (so that the kitkat blabla 4.4 logo shows) It does this even when i'm *not* forcing an override of the input source i think, i need to test more. Might also be a good idea to enable the debuf function and check the logs i guess.

I would very much like to have just 2 sources to pick from, radio and the default media player (google music in my case)

i *think* that if i uninstall xposedmtc the HU starts behaving like it should/normaly when i press source button, i'll get to it and check tomorrow, but if i do that i don't think the swc work like they should when i try to control google play on the HU, i'll try some more stuff out but i'm asking for a bit of advice :)

Is this something of a know bug?

I read that it can do strange thing if i select aux as a valid source, if i'm understanding it correctly.
[MTCB Software Development] agentdr8:
Yes, it's a known bug, and that whole mode switching method is being rewritten from scratch. It was discussed sometime ago in the main thread, but I'll update the OP to reflect this.
[MTCB Software Development] treech:
Any workaround for it so it dosen't reboot my HU? i can ofc disable the module from xposed, witch should do the trick, but i think i need it so car service actually works with google play, i like to use the next/last track on my swc :)

I'll try that later and see what happens.

I'de happily pay a few $ to make it work as stated above, so if you get a payed app out and it does the magic on your todo + any other stuff you're able to fix i'll be a happy camper :)
[MTCB Software Development] agentdr8:
You can just disable the mode switch override in the preferences. It'll get fixed, sooner or later.
[MTCB Software Development] Mr Bigglesworth:
Hi all, installed this last night - only had a few mins to play. The switching issue did the same for me (crash). Will have to take a look at the mode switch override to get rid of that for now!

Autodim works great, Thanks!
[MTCB Software Development] WestlakeSt:
Hi agentdr8,

I've managed to work out the correct text for the mtc-keys.ini file to launch the XposedMTC music & radio activities.

I used an app called Package Info which listed the activity names as "com.dr8.xposedmtc.activities.Music -a" and "com.dr.xposedmtc.activities.Radio -a"

So in the ini file used

activity_43=com.dr8.xposedmtc/com.dr8.xposedmtc.activities.Music

activity_42=com.dr8.xposedmtc/com.dr8.xposedmtc.activities.Radio

Not sure what the -a bit is but didn't require it. Also it is case sensitive (at first didn't use capitals on Music and Radio and it didn't work).

So it just needed the full package name after the / which was missing before.

So all working 100% how I want it now thanks to your great Xposed app and the chap who created the mtc-keys module. :good:

Kind regards,

Steve
[MTCB Software Development] wanxu:
Hi, is it working for AN-21 U devices? Thanks!
[MTCB Software Development] agentdr8:
No, and it'll likely never be compatible. I didn't think the AN-21U devices had the same MTC apps or MCU integration.
[MTCB Software Development] phil001:
Hi

Thanks for your work on this.

I am also getting the crashing, even when aux is not selected in the mode switching list.

Another thing that is happening when I enable this module, when I skip tracks in poweramp using steering wheel controls, the track goes to the next one and starts playing but there is no audio until I press volume up or down.

Any ideas?

Thanks!

I'm on malaysk rom by rhe way
[MTCB Software Development] agentdr8:
I don't believe that behavior has been reported before. Does your vehicle use SWC via canbus or resistance wires? The only thing that comes to mind is maybe it's sending track next and a mute at the same time.
[MTCB Software Development] phil001:
Hi its just resistance wires.

Also noticed when changed mode from radio to Poweramp and skipping to next track, I think it still skips to next station within the radio app too. As when I next go to radio, its on a different station... Strange!

Not getting a mute message in screen, maybe I'll try re-assigning the buttons.

I'm just using the standard SWC setup screen not the xposed keys or whatever its called.

Cheers
[MTCB Software Development] agentdr8:
Interesting. Can you please enable debugging in XMTC preferences, reboot and provide me the error.log from Xposed Installer->Log.
[MTCB Software Development] phil001:
Sure, it won't be till tomorrow now though.

It's quite possible I've done something wrong as Im pretty new to this so sorry if it ends up being a waste of your time!
[MTCB Software Development] phil001:
sorry for the delay

file is attached, hope thats what you wanted

cheers :good:
[MTCB Software Development] agentdr8:
I don't think that's right...this is what I see in that file:

Reviews

Synopsis
Michel Thomas's approach to language learning aims to provide in a few hours a functional working knowledge of a language without books, note-taking or conscious memorizing. This CD provides an eight-hour course in French.
About the Author
Michel Thomas is a world-famous language teacher with an incredible skill to teach in days what usually takes years to learn. A psychology graduate, Michel survived starvation in French concentration and slave-labour camps, endured torture at the hands of Klaus Barbie and, after the war, hunted Nazis as an officer with US Counter Intelligence.

These unique, challenging and varied experiences helped him to forge his revolutionary learning system that is in demand from heads of industry and movie stars alike.
[MTCB Software Development] phil001:
Haha, how the hell has that happened?!

Ill try again later

I'm about ready to throw this head unit out of the widow anyway, everytime i start the car i get 'Poweramp has stopped' crash message about 3 times now, and poweramp won't re start at all.

Think i'll be doing a fresh wipe/install of rom and start again when i get time (even though ive just done that!)
[MTCB Software Development] Piaband:
When I try to open "MyMusic" app, nothing happens. Do I need to map that icon to the radio app? Any other reason why that would happen?
[MTCB Software Development] agentdr8:
Did you set your preferred media player in XMTC preferences? It's just a launcher for that (with a bit of wrapper code for source switching). Make sure you also set a video player.
[MTCB Software Development] Piaband:
THANK YOU! The software on these units/ROMs is so abnormal. Its hard to keep everything straight.
[MTCB Software Development] coudu:
Hi agentdr8,

Did you try the last KLD fw posted on the mega repository (KLD_rk3066_p_2015-11-27.rar)?

It seems to break compatibility with your Xposed module... Shortcuts does not launch selected apps and volume override does not work either (at least this is what I use, I don't know for other features of your module).

Here is Xposed error log with debug on for XposedMTC:

-----------------
16 déc. 2015 10:08:49 UTC
Loading Xposed v54 (for Zygote)...
Running ROM 'rk3066-eng 4.4.4 KTU84Q eng.root.20151117.104105 test-keys' with fingerprint 'rockchip/rk3066/rk3066:4.4.4/KTU84Q/eng.root.20151117.104105:eng/test-keys'
Loading modules from /data/app/com.dr8.xposedmtc-1.apk
Loading class com.dr8.xposedmtc.MTC
java.lang.NoSuchFieldError: android.microntek.service.MicrontekServer#am
at de.robv.android.xposed.XposedHelpers.findField(XposedHelpers.java:80)
at de.robv.android.xposed.XposedHelpers.getObjectField(XposedHelpers.java:611)
at com.dr8.xposedmtc.MTC$3.afterHookedMethod(MTC.java:470)
at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:645)
at android.microntek.service.MicrontekServer.onCreate(Native Method)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2558)
at android.app.ActivityThread.access$1800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at com.android.server.ServerThread.initAndLoop(SystemServer.java:1132)
at de.robv.android.xposed.XposedBridge.invokeOriginalMethodNative(Native Method)
at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:631)
at com.android.server.ServerThread.initAndLoop(Native Method)
at com.android.server.SystemServer.main(SystemServer.java:1225)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:801)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:617)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132)
at dalvik.system.NativeStart.main(Native Method)
[2015-12-16 11:09:12] XMTC: hooked radioservice

It seems that petro's RK3066 HeadUnit service also has trouble to set volume based on speed with this KLD version...

Thanks for looking at this.
[MTCB Software Development] agentdr8:
Hey hey [MENTION=853627]coudu[/MENTION], long time no see. It would seem that KLD has modified the MTCManager.apk recently, and the existing Xposed modules can't find fields or methods.

Can you post that apk? I can see what changed and what needs to be added in to address it.
[MTCB Software Development] coudu:
Yes no more time for rom modding :rolleyes: but I still use my HU and I try to keep it up to date and to follow threads about it :p

Here is the "new" MTCManager.apk

thanks.
[MTCB Software Development] walld:
I can't seem to activate the auto-dimmer setting. I know it should be easy but can someone please let me know how to set it.
[MTCB Software Development] agentdr8:
This should get you going...

Install/Enable Xposed Framework (including the app_process)

Enable XposedMTC module (don't reboot yet)

Open XposedMTC preferences, enable the Dimmer and which settings/options you want

Go into Settings->Date/Time and uncheck the Auto Date/Time and manually set your timezone

Using the PCV app, enable the XposedMTC Sunrise Service for auto-restart

Reboot

If all goes well, when the headunit comes back up, you should have the XMTC Sunrise service running (round notification icon with headphones). If you're doing this during the day, it should automatically update the start and end times within 5 minutes or 10 miles of driving. After a few minutes, drag the notification window down and take a look at the persistent notification for XMTC. It should show the next sunset/sunrise times.
[MTCB Software Development] Mr Bigglesworth:
Forgot to add, that whether I have mode switch override on or off (and have made sure only DVD and Radio selected), the unit still crashes so but confused by what I should be doing. Had to disable the mod for now in Xposed.
[MTCB Software Development] carbonad:
Anyone having issues using Spotify as the default music application? It doesn't seem to take in steering wheel control inputs (track skip). I tested with Poweramp and that works so it seems XposedMTC is working.
[MTCB Software Development] jbleasdale:
You need to install Car Service for Spotify control from the steering wheel.
[MTCB Software Development] carbonad:
Ok, thanks. Will try that shortly.
[MTCB Software Development] jbleasdale:
http://xdaforums.com/showpost.php?p=53678587
[MTCB Software Development] carbonad:
Thanks again. Just installed Car Service and now Spotify works with my SWC.
[MTCB Software Development] phil001:
I'm getting this too, crashes whether I enable move switching or not.

Also, I've set Poweramp as the default music player but when I press 'my music' icon, it does nothing

Any ideas?

I've just started using booroondook ROM, but had no success setting this up on malaysk either tbh.

Thanks
[MTCB Software Development] agentdr8:
If the ROM came with the module (like malaysk does), try uninstalling and reinstalling. Then re-enable it in Xposed installer, and configure preferences, and reboot.
[MTCB Software Development] phil001:
thanks for the reply.

I tried this this morning, uninstalled, and reinstalled the one from this thread (1.4.2), but still 'My Music' does nothing.

Guess i've missed something?!

Thanks again
[MTCB Software Development] Malaysk:
Hi agentdr8, in firmware FUSE (one memory) module XposedMTC stopped working. MVG70 he also stopped two modules work, but he already corrected.
[MTCB Software Development] agentdr8:
What is the FUSE firmware? Can you provide me a link?
[MTCB Software Development] agentdr8:
And you're not installing the module to external sdcard right? The MyMusic launcher just fires off the start application intent for whichever app is selected in the preferences, but if that isn't getting saved correctly, then it's possible it's not able to launch anything.

Can you provide the Xposed Installer error.log? And also the contents of /data/data/com.dr8.xposedmtc/shared_prefs/com.dr8.xposedmtc_preferences.xml
[MTCB Software Development] phil001:
Yes I'll do that ASAP thanks.

No not installing to SD card

Maybe this is related to what malaysk was saying though as the rom I am using (booroondook) is 'fuse' too I believe.

http://xdaforums.com/android-auto/mtcb-software-development/rom-fuse-support-t3274272

thanks
[MTCB Software Development] phil001:
apologies for the delay, log file attached

i dont seem to have the other file/location on my device?!

thanks for the help
[MTCB Software Development] agentdr8:
Which firmware/rom are you using? It's not finding specific objects in MTCManager, and that seems to be the case on certain roms.
[MTCB Software Development] phil001:
Hi,

I am using this ROM currently http://xdaforums.com/android-auto/mtcb-software-development/rom-fuse-support-t3274272

Thanks