Friday, 24 November 2017

Hizpo Android car head unit MTCD_XRC sofia3gr

* Update 27/11/17 (See end of page)

I received this as a present from my wife for my birthday, I'd chosen it and ordered it but it was still my birthday present as I wanted a project and loved the idea of getting an android head unit for the car.
I knew it would be a project as it's not as simple as swapping the ISO (Wiring) harness in my make of Chrysler and making it work, making it fit into the dashboard, etc. But that's in a separate post.
This is all about the head unit itself which is from a company called Hizpo and was from ebay. Pricing was good for an Android 6.0.1 head unit, for around £100 with all the extra cables, inputs, etc.
The unit is double DIN and it's specs are below.




Android 6.0.1 Marshmallow
A-MEDIA AUTO (1024x600)
Baseband: SF3GR_M-26.3
Kernel: 3.14.0+ rocky@hctr930 #55
Build number: sofia3gr_car_64-userdebug
MCU: MTCD_XRC_V2.58_1
Memory: 918MB

I knew it wasn't going to be amazing performance as it's only a 1Gb unit, and things have moved on in Android so 1Gb is total minimum. So after getting the unit and using it? It's not bad, except for a few niggles that I'm working on.
The biggest problem is that there is a task killer somewhere in the stock ROM that seems to kill any app it deems as using too much resources. That means using Google Maps (which is a big memory hog) gets killed randomly, or other apps do whilst maps is running (e.g. music playing can get stopped whilst navigating). This is the biggest annoyance I've found so far.
So I'm now determined to get all the niggles fixed, so onto how to get around it!


  • ADB over wifi
The first bit is to get into ADB and the shell of the unit, this seemed tricky at first. You can't get to developer options by tapping the build multiple times as the ROM developer has removed that option, so in this case you have a few different ways of doing it. Firstly there is a menu "Factory settings" in the main android settings menu. Tapping on it you get a password box. This password box accepts different passwords for different settings.
126 goes into head unit specific settings
adbon enables ADB
3368 i've not yet tested.
I'm unsure if the adbon alone worked, so I also installed a terminal application and at the terminal put in the setting for adb over IP:

setprop persist.adb.tcp.port 5555
I then went to reboot. After reboot, I connected my laptop and the head unit to a wifi access point and then ran adb connect 192.168.x.x (being the IP the head unit picked from DHCP). If you're not sure what IP it is, install "ADB wireless (no root) by Henry", that will show you your IP and also try to enable adb over tcp too, so quite handy. Doing that, I got a shell (adb shell).
  • Rebooting
This isn't as obvious as it first seems! Turning the ignition off runs a 'shutdown' event on the head unit, but in reality it's going into a deep sleep (with processes killed) mode. So it doesn't do a full reboot on power on (This is GOOD as it stops it taking ages when you turn your car on). So pressing and holding the volume knob, that did the same put it into sleep.
I found that if you press the recessed RESET (with a pen or similar point) that causes a reboot of the device.
Some people with different MCU versions (mine came with 2.58_1) report their shutdown and wake-up are buggy and have problems. I can confirm my MCU version here appears to sleep and wake-up really well. Initial boot time is a few minutes (from total battery off), then when you turn the ignition off the unit displays "Shutting down" and goes into a deep sleep. Switching ignition back on and the unit is back running withing 10 seconds and will resume the last music action, normally playing from where you left off.

  • Root/Su/Sudo
After getting a shell, I tried to get root with su, sudo, etc, and as usual it wasn't already installed. Therefore we need to root it. I'm going to use SuperSU as there are a few methods and scripts out there to do the install. One method is using https://hvdwolf.github.io/Joying-RootAssistant/rooting.html which is a modified version of what I'll be doing.
I can confirm I've got root using the simple method using the file "SuperSU-Joying-Intel-v2.82SR1-patch2.zip". Use the script and adb over wifi and this works great, root confirmed.

  • Developer options/tools
This used to be in the play store as "Spare Parts" but it's since changed it's name, and how to get to the developer options in our modified ROM? It doesn't appear to be available from any menus or able to be enabled. However it is there, you just need to be able to load it! So I installed "Developer Options from uDroid". That creates a link and clicking it will load the developer options screen. Checking through this didn't yield anything that would help me, and in fact I made things worse by causing apps to suspend as soon as they lost activity/focus, but there are various settings in there should you need them!


  • Recovery menu (for rom flashing, etc)
To get to a recovery menu for these units:

* Press reset button and hold until you see the button lights blinking (10 secs approx.)
* Release and press again until you see the lollipop logo
* Release and wait to the recovery menu.
Once into recovery, use the reset button for:
* Move along the options (short press)
* Select an option (long press)
  • Custom ROM
This one has currently eluded me, I cannot find a custom/alternative ROM for these Intel Sofia units, which unfortunately may mean I need to 'cook' my own, which isn't something I've done in a lot of years now! (Going back to the google g1/HTC Dream phone)

  • Bluetooth to phone
This was easily setup, go into normal android bluetooth settings menu, pair with phone, allow for calls, phonebook, etc. So I can then click on the "Bluetooth" button on the home-screen/widget and it will show my dialler screen, load contacts, search contacts, etc. Dialling and using it as handsfree worked great, call quality was reasonable. I've since plugged in an external MIC which has improved the audio quality further.
One problem I keep finding though, is that when the unit goes into standby it seems to switch off bluetooth. I've since installed an app "Bluetooth Auto Connect" by "UniqTec" that keeps enabling it and forcing the connection to my phone. This seems to have solved the problem. However no matter how much I select for PAN (Networking) it doesn't seem to enable this. If I go into Settings > Bluetooth and click the cog beside my phone pairing, the "Use internet access" is always unticked and I have to tick it, this then lets the head unit use my phone for it's internet connection. (As an addition on my phone I've installed "Blue Car Tethering" which keeps the tethering enabled on my phone connection ready to accept the connection from the car.
  • Text/SMS alerts
This is one I'm really looking to solve. My phone is paired via bluetooth to the head unit when driving, so I've got handsfree calling, the head unit also uses my phone for internet via bluetooth PAN. However I've not yet found a good way of getting text messages read out to me by the head unit when they arrive. Firstly you need to 'push' the messages to the head unit. I'm currently trying "Tablet SMS 4 Phone" by estang, but the problem is when the head unit goes into shutdown/sleep it kills all background tasks and won't reload them when it powers back on!

I'm continuing to find out more and figure out these bugs, so I'll keep updating this post when I get more!
For now, here are some images of the unit itself:









* Update 27/11/17
So I've continued to investigate, and by watching adb logging whilst carrying different actions, I've come to the conclusion that ART (The newer equivalent of DALVIK) is doing the application killing. In this case I suspect the default has been set as a little too aggressive and is killing application intents at too high a memory level.
The idea is that the kernel has a built-in application killer that will trigger based on several key triggers. These can be seen/set using the /sys/ filesystem:
cat /sys/module/lowmemorykiller/parameters/minfree 
2350,4700,7050,9400,11750,14100
So this shows the different current settings I'm testing.
x1, x2, x3, x4, x5, x6, where each (x) is a memory threshold and 
x1 represents Foreground Applications, x2 Visible Applications, 
x3 Secondary Server, x4 Hidden Applications, 
x5 Content Providers and x6 Empty Applications
This is in memory pages, so to get actual values the formula is [(M*1024)/4=MP].
Where M is the value in Mb and MP is the memory page values.

So far, this has stopped maps from killing and switching between this and music it seems to have solved the issue. Whether this causes a total system failure due to letting memory get too low remains to be seen.

14 comments:

  1. This comment has been removed by a blog administrator.

    ReplyDelete
  2. Not a ton of info on this, but take a look. Apparently Sofia3gr custom Rom.
    https://forum.xda-developers.com/android-auto/android-head-units/rom-lbdroid-gtx-rom-2017-12-22-t3725421

    ReplyDelete
  3. Btw, a thank you for the write up. I have EXACT same HIZPO unit as you. I like it so far, just wish hizpo had a support network like JOYING does, next unit ill pay the extra 20-30 bucks. I ended up here while searching specifically for why Google Maps shuts down, thanks so much for your concise, easy to understand explanation. I may try the custom ROM stated above, but I need to confirm at least a couple people with sofia and 1gb running it successfully. THANKS

    ReplyDelete
    Replies
    1. Hi, glad it's been useful. Don't forget you can stop the app killer relatively easily using the steps above, so you don't need a custom ROM yet, after the settings to minfree mine runs great, so just make that quick change and it should make a huge difference to you.

      Delete
  4. Hi, you think you could extract that build, mine is older and I have bluetooth problems, I hear people but all they hear is static...

    ReplyDelete
  5. from outsider lead suppliers and stock based sites yet it doesn't mirror the similarly esteemed advantages being offered to enhance their R.O.I. from their individual S.E.O. https://www.uberafricaforum.com/uber-office-cape-town/

    ReplyDelete
  6. On the off chance that you are searching for proficient and dependable administrations for auto repair in Fairfax VA, look no further. Mohammad Amani

    ReplyDelete
  7. Saw you in a supermarket yesterday. What's going on Dave? You look quite thin and weak. Guess your car insurance business is not going well. Dave

    ReplyDelete
  8. The drive prepare or control prepare guarantee just covers a little level of the car parts.World's local classifieds

    ReplyDelete
  9. This comment has been removed by the author.

    ReplyDelete
  10. For many people, going to a mechanic is a hit-and-miss affair. If you don't know much about the inner workings of your engine, you have probably resigned your self to never knowing if you're getting a good deal on your car service and repairs. Alice

    ReplyDelete
  11. It's a ticket to the super rich way of life while you sit back substance in the information that it's solitary procured and it won't cost you the huge sticker price of these cars. rent a ferrari in italy

    ReplyDelete
  12. A great content material as well as great layout. Your website deserves all of the positive feedback it’s been getting. I will be back soon for further quality contents. Best Android Car Stereos

    ReplyDelete
  13. Measurably, they cut different drivers off three times more than ladies. With regards to liquor, among men engaged with deadly crashes, 27% had been drinking. The level of ladies is 12.5.Appeal to the Medical Institute Requests from drivers ערעור על המכון הרפואי

    ReplyDelete