yashsingh1/xdaforums huggingface dataset:
[Android Head-Units] jakejm79:
So I just did some more playing.

Using keytest.apk I get:

Keycode: 0
KeyEvent: KeyEvent{action=0 code=0 repeat=0 meta=0 scancode=165 mFlags=8}

When using my joycon exr and pressing the button mapped to the track prev function, weirdly I also get the same when just using the in built steering wheel controls.

When I press a button I have mapped to + I get the following:

Keycode: 70
KeyEvent: KeyEvent{action=0 code=70 repeat=0 meta=129 scancode=13 mFlags=8}

So it seems like the android OS can see the physical keypress but there is no function assigned to it so it doesn't know how to process it.

Since the result was the same for the standard controls and the EXR I am wondering if there is a file we can edit that allows android to recognize scancode 165 and tell give it a Keycode number.

I have tried a physical USB keyboard with multimedia keys and I get the same results as using my EXR, all the letters/numbers work, but the media function keys do nothing.

It appears that scancode=165 is correct for media prev, but I don't know how to get the system recognizing scancode=165 to become keycode=165
[Android Head-Units] jakejm79:
So I got it working, actually without the JoyCon EXR at all (at least for basic functions). Confirmed it working in both the standard AOSP GB music player and Music Player Pro.

Basically in the system/usr/keylayout/ folder there is a qwerty.kl file, this is the default key layout file for android. If you open it up you will notice there is no mention of media controls functions. Adding the following lines and a reboot got it working.

key 163 MEDIA_NEXT
key 165 MEDIA_PREVIOUS

If you want to add other functions, just set whatever function you want to a SW button in the settings/general/sw controls interface, go into the KeyTest app (see attached apk) and press the button (it will display the scancode) and then add the line with the function you want into the qwerty.kl file.

i.e.

key XXX MEDIA_PLAY_PAUSE

Where XXX is the scancode you fount in the KeyTest app.

Here is a list of some of the basic Android media functions:

MEDIA_PLAY_PAUSE

MEDIA_STOP

MEDIA_NEXT

MEDIA_PREVIOUS

MEDIA_REWIND

MEDIA_FAST_FORWARD

Though I am sure others can be used.

KeyTest.apk is attached.

Also make sure that none of the native apps are active (i.e. radio) when searching for keycodes, it appears that when one of them is it intercepts keypresses and they never make it to android, which is nice since Google Play Music (and others) have a habit of starting if you press next track even when they are in a closed state.

Here is a quick youtube video showing it working in Music Player Pro, sorry for the awful music, I only have the stuff it came with on there.

http://www.youtube.com/watch?v=Pb4aee8Lhq4
[Android Head-Units] KID52:
Glad you got it working :good:

This is exactly the simple and easy solution I was hoping for with the AN-21 U unit, however the steering wheel controls register nothing in the Keytest app.
[Android Head-Units] jakejm79:
Make sure that you dont have the radio (or any of the other apps, music, ipod etc) open just kill them with a long press of the back button. My wouldn't register anything either with those apps active.
[Android Head-Units] jakejm79:
Figured I would update the ROM to include steering wheel controls for all Android apps (there is only Next, Prev and Play/Pause, since there is no steering wheel control function for Stop and FFWD and RWD don't seem to work).

There are 4 versions:

Resistive USB OBDII SW Controls.zip - This is for resistive screen units that use a USB OBDII dongle with Torque Pro

Resistive BT OBDII SW Controls.zip - This is for resistive screen units that use a BT OBDII dongle with Torque Pro

Capacitive USB OBDII SW Controls.zip - This is for capacitive screen units that use a USB OBDII dongle with Torque Pro

Capacitive BT OBDII SW Controls.zip - This is for capacitive screen units that use a BT OBDII dongle with Torque Pro

For anyone that doesn't want to flash a full rom, you can just place the keypad.kl file in the /system/usr/keylayout/ folder.

Controls will only work when none of the native apps (Ipod, Radio, DVD, TV, AuxIn, etc) are active, controls have been tested with Pandora, AOSP Gingerbread Music Player and Muisc Player Pro, but should work with pretty much any media player.

Credit to [MENTION=5389783]donaldta[/MENTION] for helping me figure out the correct name for the keylayout file

Use at your own risk. The updates

don't

include any MCU update so you should be safe to flash regardless of your MCU version.

This firmware is for the Ouku unit.

For the sake of completeness I will update this post to show everything included in the most recent ROM:

Based on the one from 7/16/13 originally edited by Hal9K_

Built in root (Superuser)

Support USB Bluetooth dongle to connect to the OBD2 ELM327 adapter with Bluetooth interface.

Support OBD2 ELM327 adapters with USB interface based on FTDI and pl2303 chips.

Ability to connect to Wi-Fi networks using the mode AdHoc, including OBD2 ELM327 adapters with Wi-Fi interface.

Supports large disks with NTFS through FUSE module

Automatically create APN settings in 3G-modem

/cache fix allows downloading of large apps from the Play Store.

Added cp210x.ko module for support of additional USB OBD2 adapters.

Added keypad.kl file for support of SW controls in all Android apps.

Torque Pro USB versions include:

carit_version2 file in /system/etc folder this allows Torque Pro to automatically use the supported USB OBD2 adapters.

If you don't plan on using Torque Pro you can download either version for your screen type.
[Android Head-Units] daveaus:
Awesome work, thanks! Can I ask which ROM this is based on?
[Android Head-Units] jakejm79:
It was based on Hal9K's rom from 7/16 that I modified back in November to support USB OBDII dongles in Torque Pro and now have added the steering wheel controls. I believe Hal9K's rom was based on the most recent 2.3.7 stock release that units ship with currently, there have never been any roms based on anything else than the stock firmware.
[Android Head-Units] daveaus:
Ok thanks, Hal9K's rom actually bricked my device. Peter Chan sent me another update which fixed it and tin2001 managed to root that rom somewhere in this thread. I suspect this rom isn't for me but I will try the keys file.
[Android Head-Units] QATX:
I'm about to root my unit. OBDII will be here tomorrow. Wanted to triple check that I'm using the right Rom. I've downloaded from post #2108 I think it was and extracted the files and I'm ready to go. My resistive head unit 2.3.4 MCU 2.10.6.1-10-1 system version 2.12.35. I'm I using the right update Rom to unit my unit?
[Android Head-Units] jakejm79:
What is the model number of your headunit? or at least a picture of it.

Check the previous page, there was an update that includes support for steering wheel controls in 3rd party apps.
[Android Head-Units] QATX:
Here is an image of my model ...pretty sure it's TH8581
[Android Head-Units] jakejm79:
Yes it should work, my unit is the TH8581GA.
[Android Head-Units] QATX:
Thanks

Posted an image on post 2246. Thanks Again
[Android Head-Units] scubee:
wanting to root for torque pro bt

hi guys I'm using the TH8581 but its the dual core a9 version... I'm wondering if this i would be able to update and root my device? trying to get torque pro and the obdlink mx BT to work...

my head unit is this

aliexpress.com/snapshot/307854624.html

Operation System: Android 4.1

CPU: FREESCALE I.MX535D Cortex A9 Dual Core 1GHz

CAPACITIVE Touch
[Android Head-Units] KID52:
See the thread linked below.

http://xdaforums.com/showthread.php?t=2528349

It's possible to root the device, but not to use Bluetooth yet. People have managed to use Torque with USB OBDII scanners though.
[Android Head-Units] SWEUP:
Unfortunately I cant share my LTE connection from my smartphone (ouku cant use it). Is there any walk around this or is it hardware related?
[Android Head-Units] jakejm79:
That would be on your smartphone end, unrelated to the headunit, there are hacks for changing the ip tables to get LTE tethering working depending on your phone.
[Android Head-Units] SWEUP:
Thx, any hint were to start looking?
[Android Head-Units] donaldta:
Shooting from the hip here, but maybe try "<your phone model> lte tethering" with Google web search.
[Android Head-Units] jakejm79:
Or the forum specific to your phone.
[Android Head-Units] boozy5646:
You guys are on a roll so .......

This is the piece of **** I bought my gf for xmas, so she will remove the cell phone from the side of her head while she drives :victory:

But alas, the Bluetooth will not work. I try to turn it on in the Wifi& Networks under settings, but the BT stays gray and will not turn on. I am pretty decent with android and CM on phones, but these stereos scare the **** out of me. I spent alot of money on this and I doubt i would ever be able to unbrick this if it came to that.

So if you can help, here are the deets!

Model Number CSDVI

Android 2.3.4

Build Number

QDROID 2.3.4 GRJ22 en.cusp@20130918

All the thanks in the world gents!
[Android Head-Units] jakejm79:
I'm trying to fix the problem with the way the external mSD card is mounted, or rather the way it is named and the trouble media players have finding data on it.

Currently it is mounted in a folder on the internal card, i.e. /sdcard/extsd

What structure is the correct way, i.e. what folders do most media players scan on gingerbread.

Media players find the included files on /sdcard is it just ignoring files in the /sdcard/extsd, i.e. if it was called /sdcard/music it would find them or is it actually using the fs path (i.e. /devices/platform/mxsdhci.0/mmc_host/mmc0) so regardless of what I name/label it it wont help.
[Android Head-Units] boozy5646:
Also, I cant link the specific link I bought it from, but you can google ISD-AB003L......

Is there any way to install CWM recovery to something like this?
[Android Head-Units] tin2001:
I tried fixing that too, but didn't really get time to fiddle with it. My understanding is there is a list of "external" storage in one of the build files, and that's how Android determines if it's removable or not (and how to name it in the storage info page, etc).

I also found the mounts are done as part of an init script on these units. Not sure if that's normal or not for Android. I tried making my USB stick mount into a different location by editing the init script, but it didn't seem to work. Can't remember why not, but I just flashed back and put up with it for now.

One other thing I've been wondering... Does the Android media library scan do just removable storage, or would it work to have the USB/SD card mounted in a place that doesn't come up as removable? That way the "preparing SD card" thing wouldn't come into it (the init script would just mount it)... Or does simply using EXT3 on the USB/SD card instead of FAT fix that step?
[Android Head-Units] jakejm79:
Actually I got it to work, by just putting all my music (organized in a /artist/album/song.mp3 format) in a music folder in the root of the mSD card. My problem is with the embedded album art, I can get it to show up if I play around with it, but after a reboot it is gone again.
[Android Head-Units] daveaus:
Has anyone worked out a work around to sound not playing unless one of the native apps are open? It used to work for me but stopped for some reason, I just did a factory reset and the problem remains. At the moment I have to wait for the music app to open pause it then go into Pandora.

Thanks
[Android Head-Units] hmosquera:
about firmwares...

i have Ouku unit (special for honda crv 2013) and your file works perfect!! thank you very much for your work friend!!

i have a question about the firmwares that you uploade..... i have capacitive screen and i not use torque (usb or Bt) but i want the mod of google play for download larger files.....

This versions... includes this modification also?

Again thank you very much :good:
[Android Head-Units] jakejm79:
Yes all 4 versions include the /cache fix for downloading large apps from the play store.
[Android Head-Units] sciallo:
Could you please tell me how you got in touch with the manufacturer? The contact allison@szcreat.com on their site never got me a response, I have another problem I will have to hopefully get them to help me with...
[Android Head-Units] jakejm79:
Can anyone recommend any music players that have a 2x2, 3x3 or 4x4 widget and use their own database?

I'm having a hard time with album art not showing up after a reboot using any player that uses Android's built in media database, I have found one or two that use their own database, but they either don't have a widget that works for me or they seem to take control of all the media button presses even if they aren't actively playing a track, i.e. if Pandora is player and I pause it, if I then try to resume it, Gonemad will start playing instead. I don't have this problem with the standard AOSP music player but that doesn't work well with the loss of album art.
[Android Head-Units] monk2413:
Does anyone have a link to the newest ROM from Hal9k? I tried using the link from post #1969 but apparently it's been deleted.
[Android Head-Units] Prdie:
Hi guys, I've flashed the resistive file from jakejm79 (few post above). Everything works well, except I've lost the Calibration option from General menu (and I've calibrated the screen badly upon the first start). Could you help me, how to get this function back ?

Also, I've got this unit, which is very simple and clean looking :

http://www.ebay.com/itm/6-2-Inch-Android-Capacitive-Screen-Car-Stereo-GPS-Navigation-DVD-Bluetooth-USB-/131087505752?pt=US_Video_In_Dash_Units_w_GPS&hash=item1e856c9958

But the VOL+ button ceased to function after an hour usage. It clicks and behaves physically normally, but it works only in conjunction with the press of VOL- below. Did someone experienced similar problem ?

I don't want to send it back, I'm thinking about remapping the button to the eject one (which I don't use), but I would be of course glad id there's any possibility of repair.

Thanks for any suggestions

Prdie
[Android Head-Units] jakejm79:
Have you tried doing a factory reset?
[Android Head-Units] Prdie:
After the flash ? Nope. After the flash, the calibration function just popped up and I've made it once (badly). Do you think that I can regain the menu option opon factory reset (it was the first option in General menu in the stock rom, just before steering wheel config - which is now the first) ? Or do you mean that I can make the calibration once after the reset as usual ?

Thank you

P
[Android Head-Units] :
Is there any consensus as to what the best (or maybe the top three) unbranded units are? I'm really hoping to buy and install one soon, but I don't know what one is considered a safe bet.

Any help would be great,

thanks guys!
[Android Head-Units] kschumake83:
You said that you flashed the resistive file but the link you posted clearly states capacitive. That may be your issue, not? If you do have the resistive one, I would give the factory reset a shot.
[Android Head-Units] Prdie:
Im one of victims of false advertising, the title of my auction stated capacitive, but in specs it was mentioned resistive. but I dont have a problem with display function. Im easily able to operate the unit, however my afterflash calibration was a bit inaccurate. it wouldnt be a problem previously in stock rom, because there was an option in the settings general menu which launched calibration again. now its missing. thats my problem. how to recalibrate the screen with the updated rom in place, without factory reset (eg how to reenable screen calibration menu option). Thanks
[Android Head-Units] jakejm79:
I'd just reflash again and it should prompt again to do the calibration at boot up, making sure its accurate this time.
[Android Head-Units] Prdie:
Ok, but then I must recustomize the android (however with android assistant and ADW backup it seems pretty easy).

Jake, do you have the calibration option in the general menu ?
[Android Head-Units] the_tesseract:
Alright so it is rooted! Yay!

Everything worked fine! I used the resistive usb obdii drivers!

Can someone now point me to a cheapish usb hub that is confirmed to work. A usb dongle, and i guess a usb obdii dongle so i can use torque!

I want usb to work along with obdii and bluetooth dongle!

Thanks!
[Android Head-Units] jakejm79:
I have a capacitive unit (which doesn't need calibrating), but when I did have a resistive one I believe the setting was there using this firmware.

Try flashing just this file (just unzip to the root of mSD card) and see if it makes a difference, I don't think I mixed up any of the u-boot files between screen types, but it is possible.
[Android Head-Units] Prdie:
I'll do that today. Just to mention if it does apply - I don't have problems with first boot time calibration - it was there. Just general menu option which allowed me to do recalibration on demand is not there.

Thank you

Prdie
[Android Head-Units] preston-i-c-e:
IGO 2.0 Android

Is it possible to run igo in full screen mode ? I have exactly the same problem. The bottom of the screen is cut off please help !!!
[Android Head-Units] QATX:
Same screen calibration issue with my TH8581 but using a mouse has been useful when toying around with torque settings, till something is figured out. I also have a resistive screen.
[Android Head-Units] preston-i-c-e:
S150 Android IGO PROBLEM

I have a S150 Android also. I need some advice regarding the igo software I have running on the s150. The problem is at the bottom of the screen in igo is cut off is there anyway of getting the igo to run in full screen mode or someway of changing the resolution so it fits the screen properly ?
[Android Head-Units] jakejm79:
Yes I think that file is just to enable first time boot calibration, but it could be used to flag the system as a resistive screen model and enable it in the settings menu. It is also possible that the newer firmware from Hal9k (that mine was based on) removed that option too.
[Android Head-Units] Prdie:
Reflashed with the last boot file, but the option is not still there. It doesn't really matter, reflash and restore is done in 10 minutes. Weird is that I've looked into settings.apk in the image and the string Touch calibration is there (in between Steering controls and factory setting if I remember correctly). But really thanks for help anyway.
[Android Head-Units] Prdie:
I've got another one : since I've got problems with physical volume button VOL+ and my SWC integration is not done yet I would like to ask whether is there any possibility to adjust the volume programatically (ie by a widget).

I've tried several volume control apps but none of them is controlling the main volume (even with root access) - that's probably because the basic HU functions are bypassing the android api.

Thanks for any help

Prdie
[Android Head-Units] jakejm79:
Under the extra settings menu (PW=123456) you can remap the physical buttons on the unit so you should be able to swap the tune and volume buttons around (you can still use the seek buttons for tuning).
[Android Head-Units] Prdie:
Yep, this is last resort. Thank for pointing it out. But my unit is somehow lacking number of buttons ;) I've got only Power/Menu, Home, Eject, Back, Vol+,Vol-. So I'm thinking about remaping Vol+ to Eject. But software slider should be ok as well.
[Android Head-Units] donaldta:
I believe he's talking about the soft keyboard when entering in those numbers. Although if the touch screen is miscalibrated, you might have to figure out how much the off shift is and work it out in your head where the appropriate touch position is relative to the on-screen button. Alternatively, you could also use a USB HID keyboard in order to enter them as well if it will make it easier for you.
[Android Head-Units] Prdie:
No Donald, calibration is sorted by reflash, I've got a problem with physical VOL+ button, so I'm asking about any way to control main volume via software. Thank you anyway.
[Android Head-Units] donaldta:
Sorry, my bad. I thought you were having difficulty entering the password to the settings menu which allowed you to alter the function of the buttons.

Btw, if you're having a problem with the physical button then why don't you exchange it instead of trying to work around the problem? I'm not sure how much luck you'll have about getting Android to control the volume. Based on the feedback the volume is actually being controlled by the MCU which also controls things like SWC configuration, front panel button/dials, volume levels, and "native" music apps.

Btw, is the configuration of the Ouku similar to the AN 21-U which allows you to program multiple functions to a button press depending if its quick, long, or super long?
[Android Head-Units] jakejm79:
The ability to set the function is there for both SW and panel controls, but it only works for the panel buttons not for the steering wheel controls, i.e. if I set << on the head unit to be mute on long press it will mute, but if I set volume down long press on my steering wheel to mute it doesn't work, also the vol controls on the steering wheel automatically set to repeat for a long press, but I always have to tap the control to get it to repeatedly change the volume not just hold it down.
[Android Head-Units] QATX:
Mic Vol

So I had to open my TH8581 unit in order to replace the mini port on the front face. In the process I the mic solder broke so I decided to use a better mic I had lying around as well as extend it outside to unit i hopes to improve use of text to speech while the car is moving. Though the quality was greatly improved the mic picks up absolutely zero audio while the car is in motion, at 10/15 Mph. Is there something turning the mic off when the car is in motion that I change? Is this a hardware thing or a software thing?

Thanks in advance
[Android Head-Units] jakejm79:
Is it a volume knob or do you have physical buttons? What model is it since the Ouku has quite a few panel buttons.

I assume your car doesn't have steering wheel controls, you can always add them after the fact, plenty of kits on line for simple resistive setups which would wire directly into the headunit.

---------- Post added at 11:52 AM ---------- Previous post was at 11:50 AM ----------

How is the cabin noise? I had the exact same issue with the internal mic (though it would be with the engine running not just when driving, engine off, mic worked fine, engine on picked up nothing), adding the external mic helped tho.
[Android Head-Units] donaldta:
​

By his description, it sounds more like the AN 21-U than the Ouku unit featured in this thread. Though, as I understand these generic Chinese head units seem to be using different faceplates for different resellers or vehicle types, so maybe knowing the actual processor (Ouku/Freescale vs AN 21-U/Mstar) should be the actual differentiator. Unless Ouku is now selling the newer head units with the dual core Mstar processors as well.
[Android Head-Units] QATX:
---------- Post added at 11:52 AM ---------- Previous post was at 11:50 AM ----------

[/COLOR]

How is the cabin noise? I had the exact same issue with the internal mic (though it would be with the engine running not just when driving, engine off, mic worked fine, engine on picked up nothing), adding the external mic helped tho.[/QUOTE]

Yep, as far as call quality, I don't have to speak up at all, even when the car is moving. Try using the mic for things like Google Voice Search or Speech 2 Text while moving and it picks up nothing.The cabin noise use almost nothing at that speed and with the windows up and air off. Sure people thought I was crazy seeing my yelling in my car driving through the parking lot. But even yelling the mic picks up nothing. :( would love to figure out what the issue is to find a solution that will allow the mic to pick up audio while the car is in motion or find a doable work around.

Thanks
[Android Head-Units] NickNoltePop:
original Music app

Is there any chance, to change the original Apps of Music,Phone and Radio to a peraonalized app. Or to the original Apps of a Samsung Galaxy S4?

System is on 2.6.60. I hope you can help me.