GTA: Vice City Mobile Modding - Android Apps and Games

GTA: Vice City Mobile Modding​
While the Android version of GTA: Vice City has yet to be released, that shouldn't stop us from preparing for it. Below is what we know so far about the iOS version and most of it should be interchangeable between both iOS and Android. Update: The Android version has been pushed back till sometime next week.
.SET file modding
The gta_vc.set file contains many graphics settings that you can edit. Find your gta_vc.set file and edit it with hex editor like XVI32.
--
View Distance
Offset: 0x5D1
Options:
"66 66 E6", Maximum drawing distance
"66 66 DE",
"66 66 D6",
"66 66 CE",
"66 66 C6",
"66 66 BE",
"66 66 B6 ", *
" 66 66 AE ", Medium drawing distance
" 66 66 A6 ",
" 66 66 9E ",
" 66 66 96 "
" 66 66 8E ",
" 66 66 86 ",
" CC CC 7C ",
" CC CC 6C ",
" CC CC 5C ",
" CD CC 4C ", Minimum drawing distance *
" CC CC A4 ", iOS A4 chipset drawing distance (some sort of custom value)
" CC CC AC", iOS Custom Value (From a GTA3 3GS set file)
* denotes a tested value. Other values may or may not work
Found by Gamerzworld
Click to expand...
Click to collapse
--
Car lights, Traffic lights, Lamps and Flashing Lights
Offset: 0x6E5
Options:
00 = off,
02 = on
Found by Gamerzworld
Click to expand...
Click to collapse
--
Detailed Shadows and Blood
Offset: 0x6E1
Options:
00 = off,
01 = on
Found by Gamerzworld
Click to expand...
Click to collapse
--
Debris
Offset: 0x6E6
Options:
00 = off,
01 = on
Found by Gamerzworld
Click to expand...
Click to collapse
--
Frame Limiter
Offset: 0x5D7
Options:
00 = off,
01 = on
*Can't really test if it still works or not as my 3GS is a frame limit in of itself The game does seem different though when enabled. Should be able to properly test the value when the game releases on Android.
Found by Gamerzworld
Click to expand...
Click to collapse
SCM
Additional opcodes are needed decompile and re-compile original mobile main.scm. Add the following to your VICESCM.INI file in your copy of SannyBuilder.
Code:
VERSION=2.2.Mobile
PUBLISHER=ThirteenAG
DATE=06.12.12
[OPCODES]
03A8=1,save_float_to_debug_file %1d%
03A9=0,save_newline_to_debug_file
0454=3,useless_store_debug_camera_position_to %1d% %2d% %3d%
0463=3,useless_store_debug_camera_target_point_to %1d% %2d% %3d%
0488=1, *model %1o% exists
04B0=2, *%1d% > %2d%; $ > any
04B1=2, *%1d% > %2d%; @ > any
04B2=2, *%1d% > %2d%; any > $
05A9=1,get_debug_state_to %1d%
05AA=1,%1d%
05AB=0,unknown
05AC=1,%1d%
Thanks to ThirteenAG and SilentPL.
Click to expand...
Click to collapse

Great! Can't wait for it to be released!
Sent from my HTC Sensation Z710e using xda app-developers app

The game will be released next week as reported by few blogs. I really thank your for this effort. I'm waiting to buy it.

arafat21 said:
The game will be released next week as reported by few blogs. I really thank your for this effort. I'm waiting to buy it.
Click to expand...
Click to collapse
Yeah it's been confirmed by Rockstar on their website. Kinda disappointing but oh well. I'll try doing some more modding this weekend, I've got a few papers to write for class that are due tomorrow.

This should come in handy for people with devices that aren't as powerful as some of the newer models

GTA
Who know, there is txd files on gta3.img. I think it on gta3img.dxt.dat and other dat files, but how open this?

vice city best
very tanx,vice city is best

I copied with iFunBox files of GTA VC (iPhone4) to the hard drive but on Sanny Builder 3 after adding Additional opcodes, is it looking for a GTA SA Directory and is not accepting GTA VC backup from my hard drive( Documents, gta3vc.app, Library,... in a Folder). Im using VICESCM in VC Folder of C:///Sanny Builder
I want the car lights
greetings
I dont get it, why the porters are disabling light effects for A4 devices. I already enabled all on gta III and there were no laggs
https://www.youtube.com/watch?v=M_-mZa_2an8

Can someone provide a maxed out settings for android device?
thanks in advance.

I got the game but theres too many bugs
Sent from my SGH-T989 using xda app-developers app

This might be a pipe dream, but anyone here remember the PC mods for this game? I wonder if they still have a big IMG file with all the models and textures... if that was accessible and compatible with all the existing car and weapon mods... that would be spectacular!

BlindLemon77 said:
This might be a pipe dream, but anyone here remember the PC mods for this game? I wonder if they still have a big IMG file with all the models and textures... if that was accessible and compatible with all the existing car and weapon mods... that would be spectacular!
Click to expand...
Click to collapse
I remember it... I spent hundreds of hours modding it
There is no gta3.img file. It has been split into few smaller containing txtures. models etc.

I hope someone could look into the Marina car garage mod, that one is so nice! I only can't seem to get it in GTA VC...
Edit: I tried decompiling the main.scm in SannyBuilder but I have to choose a 'valid' game directory which I can't seem to set... Can anybody help me?

how can i edit keyboard layout?

Hmm. Well there is a gta3.img file is the good news, but it only has .dff files, no txd texture files. I cant seem to find any archives (that i know how to open) with the txds! =[[ i WILL make it work haha. i hope.

For galaxy y??
$eNt FrØm JeLLy BlA$T 3.4
WaItIn FoR NemESiS...!!

Related

.DSM files?

Whether you are building a ROM with or without a 'kitchen' there are lots of .DSM files. Some of these are 0Bytes, others are tiny (2-3Bytes). What are they? I understand the .RGU files (registry entries), but the .DSM files I don't yet understand. I thought they were referenced by the 'option.xml' file in the \SYS folder (in most kitchens anyway?), however some are, others aren't.
Anyone have any details on this?
Thanks
Andy
ADB100 said:
Whether you are building a ROM with or without a 'kitchen' there are lots of .DSM files. Some of these are 0Bytes, others are tiny (2-3Bytes). What are they? I understand the .RGU files (registry entries), but the .DSM files I don't yet understand. I thought they were referenced by the 'option.xml' file in the \SYS folder (in most kitchens anyway?), however some are, others aren't.
Anyone have any details on this?
Thanks
Andy
Click to expand...
Click to collapse
I dont know what they are, but i do know 100%, that you delete these and you will kill your rom! These holder data that is needed in some case but in other not!!
funman said:
I dont know what they are, but i do know 100%, that you delete these and you will kill your rom! These holder data that is needed in some case but in other not!!
Click to expand...
Click to collapse
I don't want to delete them, however I am trying to resolve my L2TP/IPSec issue and I am now grasping at straws......
Andy
Good morning class, today we will be learning about dsm files...
Q:What are dsm files?
A:dsm files are thought to contain important encrypted information about file association.
eg What files are associated with the bluetooth function of your device? Well there's btdrt.dll, bthlink.dll, bthutil.dll, configmanager.dll, configmanager2.dll and so forth. We know this because we've researched the functioning of bluetooth with much detail, using such high tech methods as "What happens if i remove this file...**** my bluetooth doesnt work anymore...."
But how does your device know what files are associated with bluetooth functioning? Well in addition to the info contained in the .exe files it looks inside associated dsm files and decrypts the info thats in there.
Q: This seems confusing, is there some organised way of knowing what dsm files i have? or are they all just randomly put in my rom?
A:.dsm files are referenced by packages.sof. All of them are inside packages.sof
Q: packages.sof looks like a mess, how on earth do i read that?
A:the dsm filenames are just rearranged,
eg
9a6a05e1-cfde-4d32-9a82-85052c4d9de7.dsm appears as
E1 05 6A 9A DE CF 32 4D 9A 82 85 05 2C 4D 9D E7
So basically starting from the left side of the file name you split the first section of the dsm file name into pairs then swap the outside pair, then swap the inside pair.
eg 9a6a05e1 = 9a 6a 05 e1 = E1 05 6A 9A
Then you take the next section and swap the order of the pairs.
eg cfde = cf de = DE CF
Leave the next section alone
eg 9a82 = 9A 82
The last section isnt rearranged either. Its just split into pairs.
eg 85052c4d9de7 = 85 05 2C 4D 9D E7
So adding up all our sections we see that 9a6a05e1-cfde-4d32-9a82-85052c4d9de7.dsm is represented by E1 05 6A 9A DE CF 32 4D 9A 82 85 05 2C 4D 9D E7 inside packages.sof
Q: But how do i know what files are associated with my .dsm files?
A: A mysterious and clever man known only as bepe, gave us some tools. Some say that bepe fell from heaven, others say he was raised by a pack of wild german ladies with boobs as big as car tyres. Ask your history teacher about bepe.
Homework
Write a two-page report detailing why some dsm files (eg b50d833e-7d3f-44ac-615f-2da2c715cd93.dsm) appear in packages.sof but apparently dont reference any files....
Class dismissed, if anybody wants to ask me any questions, i'll be at the bar drinking beer.
Disclaimer: I wrote this with my best intentions, just a bit of fun. This is what i know about dsm files, it is immensely far from being 100% proven theory yet. I know the theory is flawed but it is a work in progress. If you think im wrong then feel free to correct me.
peter petrelli said:
Good morning class, today we will be learning about dsm files...
Q:What are dsm files?
A:dsm files are thought to contain important encrypted information about file association.
eg What files are associated with the bluetooth function of your device? Well there's btdrt.dll, bthlink.dll, bthutil.dll, configmanager.dll, configmanager2.dll and so forth. We know this because we've researched the functioning of bluetooth with much detail, using such high tech methods as "What happens if i remove this file...**** my bluetooth doesnt work anymore...."
But how does your device know what files are associated with bluetooth functioning? Well in addition to the info contained in the .exe files it looks inside associated dsm files and decrypts the info thats in there.
Q: This seems confusing, is there some organised way of knowing what dsm files i have? or are they all just randomly put in my rom?
A:.dsm files are referenced by packages.sof. All of them are inside packages.sof
Q: packages.sof looks like a mess, how on earth do i read that?
A:the dsm filenames are just rearranged,
eg
9a6a05e1-cfde-4d32-9a82-85052c4d9de7.dsm appears as
E1 05 6A 9A DE CF 32 4D 9A 82 85 05 2C 4D 9D E7
So basically starting from the left side of the file name you split the first section of the dsm file name into pairs then swap the outside pair, then swap the inside pair.
eg 9a6a05e1 = 9a 6a 05 e1 = E1 05 6A 9A
Then you take the next section and swap the order of the pairs.
eg cfde = cf de = DE CF
Leave the next section alone
eg 9a82 = 9A 82
The last section isnt rearranged either. Its just split into pairs.
eg 85052c4d9de7 = 85 05 2C 4D 9D E7
So adding up all our sections we see that 9a6a05e1-cfde-4d32-9a82-85052c4d9de7.dsm is represented by E1 05 6A 9A DE CF 32 4D 9A 82 85 05 2C 4D 9D E7 inside packages.sof
Q: But how do i know what files are associated with my .dsm files?
A: A mysterious and clever man known only as bepe, gave us some tools. Some say that bepe fell from heaven, others say he was raised by a pack of wild german ladies with boobs as big as car tyres. Ask your history teacher about bepe.
Homework
Write a two-page report detailing why some dsm files (eg b50d833e-7d3f-44ac-615f-2da2c715cd93.dsm) appear in packages.sof but apparently dont reference any files....
Class dismissed, if anybody wants to ask me any questions, i'll be at the bar drinking beer.
Disclaimer: I wrote this with my best intentions, just a bit of fun. This is what i know about dsm files, it is immensely far from being 100% proven theory yet. I know the theory is flawed but it is a work in progress. If you think im wrong then feel free to correct me.
Click to expand...
Click to collapse
OK, thanks for that. That is the first time I have seen that........
Another couple of questions then if you will oblige me?
1. In the various Kitchens that are out there, there is usually an 'option.xml' file in the \SYS directory that describes the various system packages that can be included in the ROM so they can be selected or excluded. The file is broken up into sections - transcriber, Enterprise, Games, Office etc. Listed in each of these sections are GUID's with a type and a GUID. Type is either 'p' or 'i'; 'p' references the .RGU file containing the registry settings. However the entries with the type 'i' don't seem to reference any GUID-named files I can see? I have applied the conversion logic you detail and the .DSM files don't tie-up with the GUID references, these may be unrelated though? For example the Autoupdate section:
Code:
<Item name="Autoupdate" group="System" checked="true">
<Guid type="p">8be73c02-3437-4c06-88c9-0a2e25bfaf2c</Guid>
<Guid type="i">c05687f7-7d0a-4738-9ecd-e043658f40cd</Guid>
</Item>
I can see the .RGU file (8be73c02-3437-4c06-88c9-0a2e25bfaf2c.rgu), however the second .DSM file is '89fc53c1-ec65-4648-9972-24afb3dcad3c.dsm', if the conversion logic you list is correct it should begin with c153fc89? Unless of course these are unrelated, however the number of GUID's listed always ties-up with the number of .DSM/.RGU files in each package (in different folders - e.g. Autoupdate, Autoupdate_Lang_0409).
2. How do you read the packages.sof? It just appears as few lines of unreadable characters in either Notepad or Wordpad?
3. Can .DSM files be transferred between ROM sources? In my quest to get L2TP/IPSec VPN working in the 5.2.1413 ROM I have been transferring the Enterprise files (ipsec.dll, ipsecsvc.dll, scard.dll & winscard.dll) from earlier ROMs (and other device ROMs) but have not had any (much?) success. Is there some logic to transferring files between ROMs?
Thanks
Andy
1. At this point in time I have no explanation as to why there are absent dsm's. I cant locate the dsm file you describe in any rom, i can only locate references to it. I can only speculate about why this is so.
2. Use a hex editor.
3. Yes you can trasfer dsm files but with mixed results. I have swapped some dsm files but when i did i moved the files associated with them as well. I had mixed success doing this.
I have exams on at the moment so I will look into this matter further towards the end of the month. Sorry my answers to your questions are so short. Good luck with your L2TP/IPSec VPN.

WormsWorldParty Button Fix

How to fix the button issue with games like worms world party on pocket pc
Install buttonfinder (freeware) on ppc and use it to get the codes for each button, when you press them one by one. (codes are like oxC1, just write down the last 2 digits.)
Install Skhexed (trial) and open it. open wwpsave.dat file from the worms directory on your pda.
the file need to be edited to make the game understand device buttons.
Find line 104 (or 109 for some devices especially hp). the line would seem like that:
---> 104 00 00 C1 C4 C4, (if line 104 seems like that: ''104 00 01 00 00 00'', then you have to search for an other line with the codes C1 etc ,and that would usually be the line 109. In that case the line 109 looks like this: 109 00 C1 C3 C3 00)
the 3 codes (Cx, x=number) would be usually in the last 3 colymns but maybe in the inner 3 ,like above. Those codes represent the buttons codes, used for fire, jump and jump2. (from left to right) and we have to change those codes with the codes we had written down from buttonfinder.
Save the changes and enjoy!
On some devices (especially HP like mine, but other brand also) that may dont work, or work for one or two buttons. in that case,the codes need to be changed with CC instead of C1, CD instead of C2 etc.
Click to expand...
Click to collapse
I have uploaded the .dat file modded for Universal,simply download it and replace the one you have on pda.
Feel free to post for other devices as well.

Help with UC and xml.

Hello I'm trying to use xmlprovisioning to customize some features of S2U2.
An example of one key I'm having problem with is the following:
<parm name="ShowOwnerInfo" datatype="binary" value="01"/>
I just cannot get the value of 01 to stick. When I go back into S2U2 registry setting it is still showing as value not being set (according to CeRegistryEditor).
I don't have any problems changing other datatypes, such as: integer and string.
Am I don't something wrong?
Thank you in advance for all you guy's help.
Okay, I think I found out the reason:
"Binary values are a PITA since they're encoded Base 64 (see my entry for Owner Information above). If you want to set owner information as I did in the example, then you need to convert Unicode to Base64."
from: http://forum.xda-developers.com/showthread.php?t=366337&highlight=user+customization+binary
Can someone walk me through how to do this?
Is this any good?
Unicode to Base64 Convertor
Thank you for the suggestion.
I have already tried the tool, but what it gives me does not generate the effect that I'm looking for
Maybe I need to manipulate the value some how and then put it into the encoder??
Hi,
just an idea:
Binary data are hex ... so i attached a little txt ... just rename it and import to your registry.
It show how Binary-Values work (as far as i understood them )
In HKLM you'll find a Key (Folderlike) called "fwt"
Therein are three values
1. Capital
2. SmallLetter
3. Test
1. => FWT as binary data => 46,57,54
2. => fwt as binary data => 66,77,74
3. => all signs (letters, numbers, symbols) from 00 to FF
Space is 20
CapitalLetter start with 41
SmallLetters start with 61
Just use CeRegistryEditor and you can see them clearly .
I hope this helps!

[REVERSING] Old Android stuff

Hey guys!
Just figured out that with the new Android Developer page, Google made all the oooooold releases of the SDK available, including the ancient Milestone 3 and Milestone 5 (Astro Boy and Bender) releases. These are the ones what had the original Cylon style boot animation, and I decided to grab it.
Problem is: none of the current APK reverse tools support or even recognize the old magic header. The dex header is the following:
Code:
64 65 78 0A 30 31 33 00
This is for Milestone 5.
I really want to reverse this, only for the Cylon code, so if ANYONE knows a solution, please, post it!

reading vechicle sensor data in Android app? (CANBUS input)

Dear devs,
I have MTCD PX5 MX (Witson).
I would like to make some small utility apps to enhance HU functionality based on vehicle data.
I would like for example to read the vehicle speed in my app (without using GPS or OBD). I know it's available somewhere in the OS because you can see it in the factory "Vehicle Info" app which seems to be the same for all MTCD units.
Is it some /proc file to be read? Some broadcasts? Some android API additions or some native library calls?
Thanks!
rumburake said:
Dear devs,
I have MTCD PX5 MX (Witson).
I would like to make some small utility apps to enhance HU functionality based on vehicle data.
I would like for example to read the vehicle speed in my app (without using GPS or OBD). I know it's available somewhere in the OS because you can see it in the factory "Vehicle Info" app which seems to be the same for all MTCD units.
Is it some /proc file to be read? Some broadcasts? Some android API additions or some native library calls?
Thanks!
Click to expand...
Click to collapse
The only way is decompilation of an app (you have to find one which deals with CANBUS) and analysis of decompiled source code. There is no API for such things in these devices.
rumburake said:
Dear devs,
I have MTCD PX5 MX (Witson).
I would like to make some small utility apps to enhance HU functionality based on vehicle data.
I would like for example to read the vehicle speed in my app (without using GPS or OBD). I know it's available somewhere in the OS because you can see it in the factory "Vehicle Info" app which seems to be the same for all MTCD units.
Is it some /proc file to be read? Some broadcasts? Some android API additions or some native library calls?
Thanks!
Click to expand...
Click to collapse
You need a canbus decoder. If you buy a canbus decoder for VW golf/Jetta mk5/mk6 I can tell you which messages you need to send to the canbus decoder for the vehicle info apk and for door information, and you can easily send messages with Arduino (with canbus board) or with teensy 3.1 (with can transeiver) or other microcontroller.
I notice by default, (after installing Titanium Backup) that the Vehicle App is "frozen" and when I unfreeze it to run, it doesn't really stay open. I do have a CANBus interface for my 08 Mitsubishi Lancer Evolution X. I noticed in Factory Settings>CANBus, it has options (standard/swap) for front door, back door and air conditioning. Is there any way to have the data displayed somehow? Is the vehicle info app supposed to show it?
Sent from my Nexus 9 using Tapatalk
verkion said:
I notice by default, (after installing Titanium Backup) that the Vehicle App is "frozen" and when I unfreeze it to run, it doesn't really stay open. I do have a CANBus interface for my 08 Mitsubishi Lancer Evolution X. I noticed in Factory Settings>CANBus, it has options (standard/swap) for front door, back door and air conditioning. Is there any way to have the data displayed somehow? Is the vehicle info app supposed to show it?
Sent from my Nexus 9 using Tapatalk
Click to expand...
Click to collapse
In my case (mazda cx5) the vehicle.apk is not the one for showing information
When I open any door it is displayed on the unit.
Even having the same options (air conditioning) like you air conditioning info is not displayed.
Enviado desde mi D6603 mediante Tapatalk
Oh. OK. Hrm...must be controlled somewhere else then. I wonder how I can get it to begin to display that type of info.
Sent from my Nexus 9 using Tapatalk
I'm also in the topic for some weeks, and there is no api or information to access the canbus from the unit.
To reverse engineer the can bus app was the only suggestion provided also.
I think the aim should be to create a android socket can bus api driver for the unit.
Thanks for your interest guys, I managed to get the data by examining the "Vehicle" app (MTCControlInfo.apk). :victory:
There's a broadcast "com.microntek.sync" which contains a byte[] extra called "syncdata". The array has 20 byte values of which I decoded the speed, revs, voltage, temperature and total mileage. When data[2] == 2, the data is:
Code:
// RPM
int rpm = (0xFF & data[3]) * 256 + (0xFF & data[4]);
// SPEED
double speed = ((0xFF & data[5]) * 256 + (0xFF & data[6])) * 0.01d;
// BATTERY
double battery = ((0xFF & data[7]) * 256 + (0xFF & data[8])) * 0.01d;
// TEMP
double temp = (0xFF & data[9]) * 256 + (0xFF & data[10]);
if (temp >= 32768) {
temp -= 65536;
}
temp /= 10;
// DISTANCE
int distance = (0xFF & data[11]) * 65536 + (0xFF & data[12]) * 256 + (0xFF & data[13]);
The problem is the Broadcast doesn't come unless the "Vehicle" app is started. They seem to either:
flip a switch like this:
Code:
Settings.System.putInt(this.getContentResolver(), "com.microntek.controlinfo.door", 1); // in onCreate() and onStart()
and
Code:
Settings.System.putInt(this.getContentResolver(), "com.microntek.controlinfo.door", 0); // in onStop()
I couldn't get my app to do this, you're not allowed to do this unless you're a system app.
or get the CarManager (which is in another app which I didn't get yet to examine), to do some command, perhaps another Broadcast.
I can get continuous data Broadcasts if I start the "Vehicle" app, then go to home screen, then start my app. Since onStop() would be called I believe it's the second method of switch that really happens.
As soon as you explicitely exit the "Vehicle" app the Broadcasts stop coming.
I'm using Bytecode Viewer, but it has quite a few errors translating to Java. A better disassembler would come in handy.
TBC...
rumburake said:
Thanks for your interest guys, I managed to get the data by examining the "Vehicle" app (MTCControlInfo.apk). :victory:
There's a broadcast "com.microntek.sync" which contains a byte[] extra called "syncdata". The array has 20 byte values of which I decoded the speed, revs, voltage, temperature and total mileage. When data[2] == 2, the data is:
Code:
// RPM
int rpm = (0xFF & data[3]) * 256 + (0xFF & data[4]);
// SPEED
double speed = ((0xFF & data[5]) * 256 + (0xFF & data[6])) * 0.01d;
// BATTERY
double battery = ((0xFF & data[7]) * 256 + (0xFF & data[8])) * 0.01d;
// TEMP
double temp = (0xFF & data[9]) * 256 + (0xFF & data[10]);
if (temp >= 32768) {
temp -= 65536;
}
temp /= 10;
// DISTANCE
int distance = (0xFF & data[11]) * 65536 + (0xFF & data[12]) * 256 + (0xFF & data[13]);
The problem is the Broadcast doesn't come unless the "Vehicle" app is started. They seem to either:
flip a switch like this:
Code:
Settings.System.putInt(this.getContentResolver(), "com.microntek.controlinfo.door", 1); // in onCreate() and onStart()
and
Code:
Settings.System.putInt(this.getContentResolver(), "com.microntek.controlinfo.door", 0); // in onStop()
I couldn't get my app to do this, you're not allowed to do this unless you're a system app.
or get the CarManager (which is in another app which I didn't get yet to examine), to do some command, perhaps another Broadcast.
I can get continuous data Broadcasts if I start the "Vehicle" app, then go to home screen, then start my app. Since onStop() would be called I believe it's the second method of switch that really happens.
As soon as you explicitely exit the "Vehicle" app the Broadcasts stop coming.
I'm using Bytecode Viewer, but it has quite a few errors translating to Java. A better disassembler would come in handy.
TBC...
Click to expand...
Click to collapse
Use this decompiler:
http://www.javadecompilers.com/apk
According to CarManager - it is located inside framework.jar. You can see example usage in my app here:
https://github.com/f1xpl/MtcdTools
To use it in your project, simply copy source code loated at app/src/main/java/android/microntek/ except f1x dir to your project directory.
Cool you've got something.
But it looks like some processed data and not the raw can you will need for full controll so you have to mine deeper.
iwl said:
But it looks like some processed data and not the raw can you will need for full controll so you have to mine deeper.
Click to expand...
Click to collapse
As said in the original post what I want is this data. Don't put your hopes into me digging into the canbus as it's not my purpose.
rumburake said:
As said in the original post what I want is this data. Don't put your hopes into me digging into the canbus as it's not my purpose.
Click to expand...
Click to collapse
I have been looking into this also.
My unit is an MTCD PX5 MX, currently using Malaysk rom 5.0 and MX mcu 2.59. The car is a Peugeot 407.
I get air condition data: temperature readings from both sides of the car, air flow direction only from the driver's side, and the temperatures are off by 4 degrees (ie. showing 17C when the temp is set at 21C).
Steering wheel keys: Volume up/down always work, the other keys, Next, Prev, Source, and the "clicky wheel button" (which should change radio preset, change folder in music player etc.) only work if they are the very first button pressed after a reboot - it seems like something crashes on the first press, and after that only the volume buttons work.
I tried going into setup, factory settings, and using 'logcan' as password, the can logger starts, showing me that it does receive data on all the steering wheel keys, even if they no longer perform any action on the head unit after the first press.
The keys send data like the following:
Source: 2e 02 11 ...
Next: 2e 02 12 ...
Prev: 2e 02 13 ...
Volume up: 2e 02 14 ...
Volume down: 2e 02 15 ...
Volume up+down (should do Mute): 2e 02 16 ...
Clicky wheel button: 2e 02 03 ... or 2e 02 04 ... depending on the direction.
I want to modify the can bus apk, making it add 4 to air con temperature readings before showing, and I would also like to figure out, what happens when I press a steering wheel key for the first time, since everything works initially and then stops after the first press.
My unit is an MTCD PX5 MX, currently using Malaysk rom 5.0 and MX mcu 2.59. The car is a Peugeot 407.
Click to expand...
Click to collapse
Where did you get this MCU? AFAIK 2.55 is the latest MCU available for MX (according to: https://forum.xda-developers.com/an...opment/mtcd-px5-headunits-repository-t3619906)
MCUs from different models (HA etc) present minor incompatibilities such as different key setups / fascias between models. It may well be your problem with the buttons!
OK I got it now to work properly. :victory:
To get messages you need to send a request using CarManager. I have used the CarManager code from MTCDTools (thank you @f1x !)
In the case of a canbus adapter config 1 (VW/Skoda) you can send this message periodically to receive a data response (including the speed, rpm etc):
Code:
canbus_rsp=46,144,2,65,2,42
These numbers are made by functions specific to the canbus adapter type which you can find in the "Vehicle" app. I could obviously test this only on my car.
For this canbus config there are 2 other sequences, that return other data too:
Code:
canbus_rsp=46,144,2,65,3,41
canbus_rsp=46,144,2,65,1,43
To send a message you can call:
Code:
CarManager.setParameters(String par);
I hope this helps other people.... I will post again when I build something useful on this.
Interesting thread, would be nice to see the speed data applied to other apps (like Graser's Dasaita or F1x' sound to speed adjust, or Malaysk's screensaver), without the need to get GPS data.
But I guess not all MTCx units will have the speed data, so using GPS will be more generic. I do think the speed data from canbus will be more reliable when the unit supports it.
rumburake said:
Code:
canbus_rsp=46,144,2,65,2,42
Code:
CarManager.setParameters(String par);
Click to expand...
Click to collapse
Does this altogether mean : ?
Code:
CarManager.setParameters("canbus_rsp=46,144,2,65,2,42");
logcan as factory settings password is such valuable information....
---------- Post added at 01:48 ---------- Previous post was at 01:31 ----------
if code logcan starts the canlog app, may be this app is to find, smaller and more easy to decompile / hack.
logcan Can Bus Logger How To ?
KlausBJ said:
'logcan'
Click to expand...
Click to collapse
I'm just playing around with the factory settings pw logcan Can-Logger, but get nothing shown.
I've tried to send with 125000 Baud and 500000 Baud.
What number do you have choosen in the upper right corner there is No, 01, ..., FF ?
How have you used the bottom Buttons, I pressend Start, changing to stop then, what is TX RX for?
I'm also confused.
What's supposed to be inside the String when
Code:
CarManager.setParameters()
is called?
With this method is it possible to write to the CanBus or just read from it?
I'm asking because I'm trying to find a way to control the fade on my factory amp and this seems like the perfect way to do it if writes are possible.
I am now working on a volume setting app using the car speed and rpm. The volume is relative to the one set by user. I got promising results so far.
But I'm stuck at setting the HU volume, it does not sync with the manual controls: suppose volume is 5, then I set it programmatically to 10, then the user turns the knob up it becomes 6 (because it starts from 5)!
 @f1x you do have experience with this, could you please advise? I have tried all of the following:
This is for setting the real volume in the hardware (a volume value mapped from 0% to 100%):
Code:
carManager.setParameters("av_volume="+mtcLevel);
This is temporary and the Android OS doesn't know the volume was changed.
This setting seems to be used for saving the system known volume (0-30):
Code:
android.provider.Settings.System.putInt(ctx.getContentResolver(),"av_volume=",level);
But doesn't seem to have effect and I get this warning: You shouldn't keep your settings in the secure settings. This will soon become an error.
The same volume used to send a broadcast (also 0-30):
Code:
Intent intent = new Intent("com.microntek.VOLUME_CHANGED");
intent.putExtra("volume",level);
ctx.sendBroadcast(intent);
This probably it's just for notifying other apps (it's also how I get the volume changes in my app).
Anyhow what I mean is to set the volume to 10 and when I turn the knob up to find it at 11. Thanks!
rumburake said:
I am now working on a volume setting app using the car speed and rpm. The volume is relative to the one set by user. I got promising results so far.
But I'm stuck at setting the HU volume, it does not sync with the manual controls: suppose volume is 5, then I set it programmatically to 10, then the user turns the knob up it becomes 6 (because it starts from 5)!
@f1x you do have experience with this, could you please advise? I have tried all of the following:
This is for setting the real volume in the hardware (a volume value mapped from 0% to 100%):
Code:
carManager.setParameters("av_volume="+mtcLevel);
This is temporary and the Android OS doesn't know the volume was changed.
This setting seems to be used for saving the system known volume (0-30):
Code:
android.provider.Settings.System.putInt(ctx.getContentResolver(),"av_volume=",level);
But doesn't seem to have effect and I get this warning: You shouldn't keep your settings in the secure settings. This will soon become an error.
The same volume used to send a broadcast (also 0-30):
Code:
Intent intent = new Intent("com.microntek.VOLUME_CHANGED");
intent.putExtra("volume",level);
ctx.sendBroadcast(intent);
This probably it's just for notifying other apps (it's also how I get the volume changes in my app).
Anyhow what I mean is to set the volume to 10 and when I turn the knob up to find it at 11. Thanks!
Click to expand...
Click to collapse
Take a look at this remark:
Checks if the specified app can modify system settings. As of API level 23, an app cannot modify system settings unless it declares the WRITE_SETTINGS permission in its manifest, and the user specifically grants the app this capability. To prompt the user to grant this approval, the app must send an intent with the action ACTION_MANAGE_WRITE_SETTINGS, which causes the system to display a permission management screen.
Click to expand...
Click to collapse
https://developer.android.com/refer...System.html#canWrite(android.content.Context)

Categories

Resources