Thursday, 15 March 2018

MightyText for tablets on android

I've been using MightyText for a while now, it's an app you install on your phone and register with, it then sends your SMS to their servers and you can login to your account from your browser and send/receive messages.
It works really well, just does what it's supposed to, and despite that meaning 'they' have a copy of all your text messages, it's a great idea and I use it regularly to type a message from my computer instead of phone screen.

Therefore when I needed an app for my tablet I went for MightyText for tablets, thinking this is great, an app for the tablet that will work the same, let me send and receive. However, everytime I tried to use it, you couldn't see the messages as the screen was so cluttered:

This is the popup window that appears when a message comes in. The text of the message is missing, it should appear below the time and above the "Type message" prompt, but due to the screen being in landscape orientation it appears like that.

If you then open MightyText itself you see messages, but again not much room:

You can make the message out this time, but only the first line of it. If you then go to reply the keyboard then squeezes the screen so none of the message is visible.

This initially just looks like how the dialogues are generated and perhaps the font/text being used. I therefore contacted MightyText about it:

    Hi, the view on the tablet app causes messages to not be visible due to a
    very small message window due to all the other dialogues.
    I've attached a couple of photos showing both the popup message alert and
    the main window.
    Please can advise how to fix this display problem?

And I got a reply from their tech support:
Sorry to hear that. Just confirming, is your Tablet in landscape mode when you 
see this issue?

Which I confirmed, and I then received this reply:
Got it, this is currently the expected behavior. We may change this in the future.

So that's it, basically they know this, they do it on purpose (Expected behaviour?) and that they aren't really doing anything about it.

Really disappointing this, so I'm on the lookout for a similar app that will work correctly on my tablet screen.

Monday, 12 February 2018

Xtrons 3" Single Din Car Radio

This was something I bought for my wife as a present, to upgrade her car radio. She has a Vauxhall Corsa and wanted similar to mine to play music from an SD-card or USB stick.
I searched and found the XTRONS 3" HD Car Stereo 1 DIN Head Unit Radio MP3 Player USB SD AUX FM + Camera input.

This looked ideal, single DIN to fit a facia for her car, inputs for USB, SD card and AUX too, FM tuner (No CD but that's generally not a problem) and it had phone buttons too.

It was at a decent price too (Under £80), so I ordered it as a present. It was only when I got to fitting it that the problems began.

Firstly, no i hadn't noticed the writing along the bottom of this photo stating "Attention: this car stereo doesn't have Bluetooth function", so I'd missed that, my fault, so I was annoyed at myself already!
After powering it up for the first time, I found the first problem. It's so non-intuitive to use. The arrows don't search/scan on FM at all, there are two preset station buttons 1 and 2, there are up to 10 but you have to get to them by cycling through using the arrow buttons.
It also doesn't have RDS, Radio text or anything like that, so whilst tuned into a station you only get the frequency displayed. This also means it won't auto-hop between frequences if you cross regions or anything like that.

The physical buttons are clicky and rattle in their sockets, which doesn't give a good feel, but it's a nice positive click when you press them which is good for driving. The multi functions of the buttons aren't very intuitive, so you have to work out long-pressing and short pressing do two different actions which isn't always obvious to get into the menu you want.

The volume button presses in, and a short press allows tone and balance control, a long press gets you into the setup menu.

I fed a rear camera into it, and selected reverse (I already had the wiring in) and the radio did switch to a video input and muted the audio, but no matter what I did, I constantly had "NO SIGENAL" showing. Yes that was spelt incorrectly! I'm going to investigate further to verify the camera signal input, but it did work (from a dashcam) so I'm not sure if there is something wrong with the head units camera/reverse input signal.

After tuning to the FM stations I wanted, I stored them into 1 and 2, the signal was good (The antenna conversion kit I used had an inline booster so this probably helped get a really good signal) and the audio was decent quality with a good bit of volume.
The volume adjustment wasn't great, it uses a huge volume scale, so you have to twist the volume knob many turns before you went between very quiet to very loud!

Going into the setup menu, there was little to configure, date/time, language and audio preferences (balance, fader, equaliser settings) so nothing really needed to tweak in there. You can set brightness and contrast separately though to get the best out of the 3" screen, which was back-lit well and pretty clear.

Boot up speed was quick, from standby and from completely disconnected, which you'd expect as the unit isn't running any complex operating system, it appears to be running it's own custom firmware from xtrons.

All in all, I'm pretty disappointed, it was supposed to be an upgrade but I'm sat wondering if due to it's difficult to navigate UI and clunky buttons that it's not really an upgrade at all. I was even contemplating putting the Vauxhall unit back in as I was that unhappy with the results I'd achieved in an afternoon of wiring.
(The Vauxhall wiring is not great, there is no switched +12v from ignition so you have to manually wire into the aux/cigarette lighter socket)

UPDATE1 - The very next day after installation we went out to the car and was going to show the unit off to my wife for the first time. Turned ignition on, radio powered on and the radio channel I left it on started playing, but the screen was totally white. Several power on and off's and it just wouldn't do anything. So this wasn't a good sign, it appears the screen has given up, with less than 1hr of use!
The next day my wife used the car and the screen came on, so I'm not sure if this is related to temperature or it's got an intermittent fault.

UPDATE2 - The screen has failed again with a totally white display.

UPDATE3 - March 2018 - It's a pile of trash! Don't waste your money. The white screen issues continue and more often than not it's a white screen (I think it's related to temperature, cold temperatures) and even when it's not the biggest problem.
You cannot navigate folders/choose songs from folders. The music from SD/USB simply searches the Sd card/USB for all music it can play, and then gives that to you in a huge list. You can skip songs, but without being able to jump, search or choose with any more refinement, that's as good as it gets.

Avoid at all costs is my advise on this one!

Chrysler dash bulb replacements

This is a quick bit of info on how I replaced the bulbs on my Chrysler Grand Voyager 2.8CRD, this may seem odd, but Chrysler in their infinite wisdom decided to solder bulbs straight onto most circuit boards, so panel illumination is handled by this design.
So when the bulbs give up, the panel goes dead and you can't easily replace them, so I've done a few replacements over the years trying to find the best solution and I think I have now found it! Replacing with LEDs is the obvious solution, but getting small and 12v versions was the challenge.

First, here's the challenge. This is the heated seats, wiper and emergency indicators panel, easily removed from the dashboard with 3 hex screws, then gently unclipping the back of the unit (Keep it flat, the buttons are held in but you need to keep them in the same position to avoid complications when putting back together).
Once open you can see the front of the circuit board as below. You can see one blue panel illumination LED shown, the hazard bulb has been removed, adn the right heated seat I've placed an LED bar/hobby LED bar to give an idea on scale.

So the problem, remove the old blue bulbs (They're white bulbs with a blue rubber cover over them) and replace, however they are small and not very tall, so a regular LED would be too big, and also these run at 12v so need to have an inline resistor somewhere too.
The LED bar shown is a hobby/train set illumination which at first looked ideal, it had an inline resistor and two LEDs on a flexible circuit, however even this small size was too big to comfortably fit.

So the second solution was to use SMD LEDs, and I found some in the form of replacement speedo/cluster illumination panels.

These come with the base black plastic fitting for your dash, then the green plastic casing topped with a square SMD LED and inline resistor. Gently pulling the package apart we can see this:

This was perfect, cutting the legs down to just at the resistor let it sit around the same height as the original bulbs. Cover one leg with heatshrink to avoid any shorts when you push it back together, solder it onto the main board and problem solved!
For reference, when you have the board sat like the top image, positive is on the LEFT, so I wrapped the negative lead in heatshrink and soldered it on, you can see the end result below:

These worked great, fit back in no problems and they look super bright. The problem now is that the rest of the dashboard illumination is too dark by comparison!

NOTE: On the above the one missing indicator was the hazard warning LED, this was due to a mistake when soldering, so I've removed and replaced that one and now it's lit up!

The parts I used were old, from Amazon but you can probably source similar parts easily.

There are many similar on ebay which are much smaller (You could use SMD resistors too on the back of the LED package, which would make them much more compact) so hope this helps!

Friday, 9 February 2018

Cheap Fitness Bands

I've recently been in the market for a fitness band for myself, at Christmas I bought my wife a fitness band from China and she's been impressed with it. Looking at the accuracy it's never perfect, sleep and active amounts seem to be out but in the main it works, picks up heartrate, etc, so does the job nicely.
All of these fitness bands use BLE which is Bluetooth Low Energy, so they don't have much smarts themselves, they rely on a phone/tablet to sync with and do the main work, but they will store data whilst out of reach and then sync the data back (Seems to be no information on how much/how long it will cope though!).

Xiaomi Miband 2
So onto the tests and comparisons. Firstly the one I bought my wife was the Xiaomi Miband 2:
They generally retail around the £30 in the UK (Importing from China you can almost halve that amount, but expect Chinese instructions!). Setting it up is easy, just install the app to your phone - MiFit and let it search and find the band. After that it's pretty much done.
The build of this fitness band is really good, the strap easy to fit and feels secure, and easily fixed. The Miband 2 fits into the strap so it's easily changeable. To charge you remove it from the band and clip it into it's little charger wire, this is probably the worst design feature if I'm being picky as you can lose the charger cable/cradle, and you might not carry it everywhere with you, but this is really minor.

The screen is OLED and nice and clear, the finger/touch button then cycles through the different screens showing you: Time, Steps/Pedometer, Heart-Rate. When on Heart-Rate it will start the detection, flashing the cursor on screen whilst it calculates and after a few seconds it displays heart rate. Again a downside here is it only samples once seemingly, so it can mis-read.
The unit will also notify you to incoming calls or messages, displaying the number on the screen and vibrating, it doesn't display the message, phonebook of who is calling, so it's more of a notification than being anything more than that.
The app MiFit is clear, yet simplistic. You can also change the settings for the band by switching settings on and off, changing units, etc. Notifications can be set on and off here too so you can disable the TXT, phone, etc if you don't need them. On the main screen you get the steps counter, distance, estimated calories, etc.

We took time to go through it and it covers everything you want to view regularly, so in summary it gives you all the basics. It also lets you set (and alert you) to your goals, and map your sleep. We're unsure how accurate the sleep tracker is though with no frame of reference other than anecdotal!

Otherwise this is a very capable band, and one part to note is the amazing battery life. This unit lasts at least a week! That's constant wrist wearing, syncing and looking at the screen occasionally.
This is amazing for a gadget these days, lasting this amount of time and really is a superstar feature.

ID115 fitness band
This is the cheap band that I decided to buy, it's readily available, mine was bought from ebay for around £10. The band itself is much simpler than the above, but the app seems to have a few more features. Firstly the physical appearance:
The first thing to note is that this is NOT exactly what it looks like! There appears to be a few variations to the casing, button and display. Mine looks very close to the above, but by default the display is vertical not horizontal,
The app you use for this is "DayDay Band" and is again a pseudo-Chinese application, that lets you join the band to your phone, set the band up, setup notifications, etc. By default is shows you your Steps and goals, estimated Calories, etc. Sleep data on Deep, Light and Awake times, and finally your heart rate results and a BEGIN button to do an immediate detection.
In settings you can enable the Lost function, posture reminder, screen time, bright screen and alarm clock. Note that sometimes these settings do crash the application, I'm not sure if this is a buggy application, or means the feature isn't available on my band. A few settings are interesting, firstly the heart beat option where it will do monitoring every 2 hours, which is an improvement on the other application. It also appears to take several samples of your heart rate and averages them out, I assume this is to avoid false readings as much as possible. It also has the ability to export data to Google Fit, although it's a manual export rather than automatic, but again this works as you'd expect.
The app displays the 3 main areas on a large screen, and is easy to follow:

The downsides to this, firstly the band itself, it uses quite a rigid plastic band with a push-fit to secure. I found it quite difficult to fasten onto my very skinny wrists (using the smallest hole setting), but this is more just awkward, and it never seems to sit fully flush which may affect my heart rate values. This is partly because of the plastic tabs that fasten the band onto the strap, these are solid plastic 'ears' and so don't flex, meaning the band has to lay flat along this part until the strap then bends round.
This photo slightly shows the issue:
Each end of the band sticks out slightly. It's worse on my wrist which is thinner than that!
One advantage is the charging method, you unclip the strap and there is a USB connector built into the plastic, which you just plug straight into a USB connector. Whilst it's not a great fit, so you need to align it and make sure it's not knocked, this does allow you to charge wherever you can find a USB socket which is handy.
another disadvantage so far is the battery life. I'm only getting 1-2days out of the band so charging it a lot more than I expected, which of course means I lose data whilst charging.
I think this is because I have the periodic heart rate monitor enabled, which uses battery power, and also that when you move your arm around the display lights up. I've yet to be able to display the display lighting up as whenever you go into this setting the app crashes, I need to investigate this a little further which may help the battery life. Still nowhere near the other units amazing battery life. This is probably the one feature that lets this unit down unfortunately.
So all in all they are very capable little units, and at the price they are very well priced.

UPDATE - March 2018
So after living with the units for a while now, the biggest issue has appeared from the ID115 band. It's battery life. It gives up after just over a day, takes ages to charge and so is becoming less and less useful as time wears on, I feel it's on charge more than it's on my wrist, so for this instance I'd not recommend it for normal use.

Wednesday, 7 February 2018

More on the Hizpo Android car radio/headunit

After a few months of ownership I thought it was about time to write an update, to give you an idea what I thought, where I was with it and how I've solved a few problems, also some interesting bits I've discovered along the way.
Firstly, my thoughts on it, to me it's a great unit, yes it requires some tweaks that the average user won't be able/willing to do so would I recommend it to end-users, probably not, but for the more seasoned Android/Linux tweaker, I'd say yes definitely worth it. I've found after making a few tweaks the unit performs excellently, plays music from SD without effort, Radio, navigation and I'm starting to increase the functionality I'm using.

So my current position with the the Hizpo Android (MTCD_XRC sofia3gr) is:

  • Radio functioning
  • Startup and shutdown almost instantly as the unit sleeps/wakes at ignition
  • Very little idle draw due to sleep working well
  • Music from SD-card working
  • Navigation using Google Maps working without crashes and navigation audio mutes radio during navigation events, maps notifications, travel times, traffic, etc
  • Navigation using Waze - slightly slow, GPS seems to drift and audio doesn't mute radio, this appears to be issues with Waze not the head unit
  • Automatic bluetooth tethering to phone to provide internet access to headunit working
  • Bluetooth connection to phone working reliably
  • Reverse camera - switches when in reverse and mutes car radio.
  • Calls work, however small issue when radio/music is playing and you answer a call, the remote end doesn't hear you, seems the phone doesn't switch to the right bluetooth profile (Not sure if this is phone or head unit problem)
  • adb over wifi with root working
  • SU/root access working
  • Ability to have apps/services run after wake (Newly tested!)
And the problems
  • Occasional hang (I think this is related to my car battery going low and working hard at starting the big diesel engine, so it dips power too low and the unit crashes) - It normally automatically reboots after a minute or so and recovers itself
  • At full/hard reboot (not wake after sleep) needing to set the Kernel OOM settings each time, need to find the right hook to script this
  • No steering wheel control - This is due to not having the ODB connection, and probably not being able to interface with Chryslers' proprietary protocols.
  • Small plastic dimple on volume knob - from mould manufacture, just needs slight sandpapering to solve.
  • Phonecall quality - Several people have mentioned my audio quality isn't great on phone calls, need to check as I've plugged in an external mic and not sure if it's this or the bluetooth stream to the phone
So now onto how I achieved some of my goals!

Apps terminating/closing:
The first being apps terminating themselves. Tracking this down it was due to the Kernel OOM killer, there are various settings you set (by echo'ing them to the /proc filesystem) that control how light/heavy this operates. By default this unit only has 1Gb of RAM so manufacturer has set this to be a bit too protective, killing foreground apps too often. Google maps is a good example, it uses a lot of resources so even when it's the only app running it will get killed. I found using the app "Kernel Adiutor" by Grarak is excellent, lets you tweak the settings easily and the presets are ideal for this. So load it up, grant it root access and then from the menu choose "Low Memory Killer" and for me I choose the preset very_light. Apply on boot doesn't appear to work (I believe it tries to hook into rc.local or similar init.rc but these don't work on this platform), so for now whenever I have a cold/full boot I have to re-apply. This should be easily solved.

ADB over wifi:
This one is a simple one to get right, firstly get your wifi working, I joined the car headunit to

Automatic bluetooth tethering:
This one I had working manually but I wanted it automatic. So firstly, get it working manually. On your phone go into Settings, bluetooth and firstly make sure you have the devices paired. Once paired go into MORE on your phone and go into "Mobile network sharing", and into "Bluetooth tethering", follow the prompts to set it up and let it enable. With the car head unit, go into bluetooth and you'll see your paired device. Click the gear icon and you can then tick the "Internet" access box. It should tick and stay ticked (If it unticks then it means that your phone isn't accepting the link so go back and check the sharing). If it stays ticked click OK and test, you should be able to access the internet. Now you've got manual working, it's time for automatic! I found the "blueballs.apk" app on xda-developers did the job, this keeps the connection running when your specified bluetooth device is connected. ( Install this on your phone first and set it up, tick the box for your car unit. Then to install it on the head unit follow the guide:

adb connect <ip address of head unit>
adb push BluetoothTethering.apk /sdcard/
adb shell
$ su
# mount -o remount,rw /system
# mkdir /system/priv-app/BluetoothTethering
# cp /sdcard/BluetoothTethering.apk /system/priv-app/BluetoothTethering/
# chmod 755 /system/priv-app/BluetoothTethering
# chmod 644 /system/priv-app/BluetoothTethering/BluetoothTethering.apk
# sync
# reboot
Then the app will autostart and show a bluetooth icon along the top status bar. This worked great for me, and bluetooth tethering worked straight away, after sleep, etc.

Apps being killed by sleep:
This one is a tricky one, when the device goes into sleep (When ignition is turned off) it will terminate most services and apps, sync filesystems so the system can sleep correctly. Unfortunately this causes a problem, as the method it uses to terminate the services will not resume them (The app receives an ondestroy which terminates and doesn't re-spawn). This is a problem for bluetooth background apps, etc, so the solution appears to be with the bluetoothtethering method above, install the app using root privileges to the /system/priv-app/ as these will be restarted automatically. I've not fully tested other applications with this other than the above bluetoothtethering though.

Discovering how it's all working:
Underneath the head unit is a fairly typical android build, so using adb over wifi I poked about and found how it's basic file structure, boot process, etc, works. It is pretty standard Android with very little changed. It's running "toybox" which is a busybox like clone for file and system functions that you can hook into.

Some additional debugging, shows how the unit functions, watching adb and logging we can see the suspend and wakeup calls:

[ 6145.758644] suspend step=12
[ 6145.758723] PM: suspend exit 2018-02-06 19:59:09.947279628 UTC
[ 6145.758787] suspend step=13
[ 6195.758443] PM: suspend entry 2018-02-06 19:59:59.946989170 UTC
[ 6195.758557] suspend step=1
[ 6195.758607] PM: Syncing filesystems ... done.
[ 6195.777951] PM: Preparing system for mem sleep
[ 6195.783221] Freezing user space processes ... (elapsed 0.010 seconds) done.
[ 6195.793560] Freezing remaining freezable tasks ... (elapsed 0.006 seconds) done.
[ 6195.800118] suspend step=2
[ 6195.800173] PM: Entering mem sleep
[ 6195.800225] Suspending console(s) (use no_console_suspend to debug)
[ 6195.805419] rpmb_rpc: rpmb partition suspended
[ 6195.868220] xgold-sdhci e2800000.emmc: Set tap values to mode 0, val = 0x080400f5
[ 6195.870533] PM: Wakeup pending, aborting suspend
[ 6195.870590] active wakeup source: alarm
[ 6195.870663] PM: Some devices failed to suspend, or early wake event detected
[ 6195.993203] xgold-sdhci e2800000.emmc: Set tap values to mode 1, val = 0x08040004
[ 6195.995946] xgold-sdhci e2800000.emmc: Set tap values to mode 5, val = 0x000400b5
[ 6195.996857] rpmb_rpc: rpmb partition resumed
[ 6195.997746] PM: resume of devices complete after 127.017 msecs

And the normal process listing (With the unit at idle):

USER      PID   PPID  VSIZE  RSS   WCHAN            PC  NAME
root      1     0     3060   628   SyS_epoll_ 00000000 S /init
root      2     0     0      0       kthreadd 00000000 S kthreadd
root      3     2     0      0     smpboot_th 00000000 S ksoftirqd/0
root      5     2     0      0     worker_thr 00000000 S kworker/0:0H
root      7     2     0      0     rcu_gp_kth 00000000 S rcu_preempt
root      8     2     0      0     rcu_gp_kth 00000000 S rcu_sched
root      9     2     0      0     rcu_gp_kth 00000000 S rcu_bh
root      10    2     0      0     smpboot_th 00000000 S migration/0
root      12    2     0      0     smpboot_th 00000000 S watchdog/0
root      13    2     0      0     smpboot_th 00000000 S watchdog/1
root      14    2     0      0     smpboot_th 00000000 S migration/1
root      15    2     0      0     smpboot_th 00000000 S ksoftirqd/1
root      17    2     0      0     worker_thr 00000000 S kworker/1:0H
root      19    2     0      0     smpboot_th 00000000 S watchdog/2
root      20    2     0      0     smpboot_th 00000000 S migration/2
root      21    2     0      0     smpboot_th 00000000 S ksoftirqd/2
root      23    2     0      0     worker_thr 00000000 S kworker/2:0H
root      25    2     0      0     smpboot_th 00000000 S watchdog/3
root      26    2     0      0     smpboot_th 00000000 S migration/3
root      27    2     0      0     smpboot_th 00000000 S ksoftirqd/3
root      29    2     0      0     worker_thr 00000000 S kworker/3:0H
root      31    2     0      0     rescuer_th 00000000 S khelper
root      32    2     0      0     vdump_thre 00000000 S vdump Thread
root      33    2     0      0     console_th 00000000 S kconsole
root      34    2     0      0     rescuer_th 00000000 S writeback
root      35    2     0      0     ksm_scan_t 00000000 S ksmd
root      36    2     0      0     rescuer_th 00000000 S bioset
root      37    2     0      0     rescuer_th 00000000 S kblockd
root      38    2     0      0     hub_thread 00000000 S khubd
root      54    2     0      0     fmdev_fifo 00000000 S iui_fm
root      55    2     0      0     ion_heap_d 00000000 S system-heap
root      56    2     0      0     mvpipe_dev 00000000 S ion_secvm_handl
root      57    2     0      0     irq_thread 00000000 S irq/303-rk818
root      58    2     0      0     rescuer_th 00000000 S rk81x_otg_work
root      59    2     0      0     rev_thread 00000000 D rev_thread
root      60    2     0      0     rockchip_f 00000000 S fb-vsync
root      61    2     0      0     kthread_wo 00000000 S rockchip-fb
root      62    2     0      0     cpufreq_in 00000000 S cfinteractive
root      63    2     0      0     irq_thread 00000000 S irq/320-car-rev
root      64    2     0      0     irq_thread 00000000 S irq/321-car-acc
root      65    2     0      0     rescuer_th 00000000 S rk81x-battery-w
root      66    2     0      0     rescuer_th 00000000 S car_wq
root      67    2     0      0     rescuer_th 00000000 S goodix_wq
root      89    2     0      0         kswapd 00000000 S kswapd0
root      90    2     0      0     fsnotify_m 00000000 S fsnotify_mark
root      91    2     0      0     rescuer_th 00000000 S crypto
root      105   2     0      0     rescuer_th 00000000 S bl_wq
root      106   2     0      0     irq_thread 00000000 S irq/40-rga
root      107   2     0      0     vnvm_serve 00000000 S vnvm
root      108   2     0      0     mvpipe_dev 00000000 S VUSB_SE_FE_MEX_
root      110   2     0      0     down_inter 00000000 S vsec
root      111   2     0      0     rescuer_th 00000000 S idi_error_work_
root      112   2     0      0     irq_thread 00000000 S irq/110-vpu.177
root      113   2     0      0     irq_thread 00000000 S irq/111-vpu.177
root      114   2     0      0     irq_thread 00000000 S irq/38-hevc.178
root      115   2     0      0     rescuer_th 00000000 S dwc2
root      116   2     0      0     rescuer_th 00000000 S uether
root      117   2     0      0     rescuer_th 00000000 S adv_wq
root      119   2     0      0     rescuer_th 00000000 S dm_bufio_cache
root      121   2     0      0     mmc_queue_ 00000000 S mmcqd/0
root      122   2     0      0     mmc_queue_ 00000000 S mmcqd/0boot0
root      123   2     0      0     mmc_queue_ 00000000 S mmcqd/0boot1
root      124   2     0      0     mmc_queue_ 00000000 S mmcqd/0rpmb
root      125   2     0      0     rescuer_th 00000000 S binder
root      126   2     0      0     intel_adc_ 00000000 S adc-thread
root      128   2     0      0     oct_thread 00000000 S OCT Thread
root      129   2     0      0     rescuer_th 00000000 S dvd_wq
root      130   2     0      0     irq_thread 00000000 S irq/108-dsp_int
root      131   2     0      0     irq_thread 00000000 S irq/107-dsp_int
root      132   2     0      0     irq_thread 00000000 S irq/99-dsp_int3
root      133   2     0      0     rescuer_th 00000000 S ipv6_addrconf
root      134   2     0      0     rescuer_th 00000000 S fuel_gauge.187
root      136   2     0      0     rescuer_th 00000000 S deferwq
root      139   2     0      0     irq_thread 00000000 S irq/283-jack_ir
root      140   2     0      0     irq_thread 00000000 S irq/284-button_
root      141   2     0      0     rescuer_th 00000000 S f_mtp
root      142   2     0      0     rescuer_th 00000000 S setExposure_que
root      143   2     0      0     rescuer_th 00000000 S measurement_que
root      144   2     0      0     rescuer_th 00000000 S bat_hal-0
root      147   1     2540   288   poll_sched 00000000 S /sbin/ueventd
root      150   2     0      0     worker_thr 00000000 S kworker/1:1H
root      151   2     0      0     kjournald2 00000000 S jbd2/mmcblk0p14
root      152   2     0      0     rescuer_th 00000000 S ext4-rsv-conver
root      153   2     0      0     worker_thr 00000000 S kworker/0:1H
root      154   2     0      0     worker_thr 00000000 S kworker/2:1H
root      158   2     0      0     worker_thr 00000000 S kworker/3:1H
root      159   2     0      0     kjournald2 00000000 S jbd2/mmcblk0p15
root      160   2     0      0     rescuer_th 00000000 S ext4-rsv-conver
root      164   2     0      0     kjournald2 00000000 S jbd2/mmcblk0p13
root      165   2     0      0     rescuer_th 00000000 S ext4-rsv-conver
logd      166   1     15360  3644  sigsuspend 00000000 S /system/bin/logd
root      167   1     12664  1416  hrtimer_na 00000000 S /system/bin/vold
root      173   2     0      0     kauditd_th 00000000 S kauditd
root      182   1     2932   268   SyS_epoll_ 00000000 S /sbin/healthd
root      183   1     4308   612   SyS_epoll_ 00000000 S /system/bin/lmkd
system    184   1     4116   572   binder_thr 00000000 S /system/bin/servicemanager
system    185   1     59340  3680  SyS_epoll_ 00000000 S /system/bin/surfaceflinger
root      186   1     2284   8     hrtimer_na 00000000 S /sbin/watchdogd
radio     187   1     5648   560   SyS_epoll_ 00000000 S /system/bin/rpcServer
root      193   2     0      0     rescuer_th 00000000 S cfg80211
root      194   2     0      0     worker_thr 00000000 S kworker/u9:1
shell     196   1     4328   584   n_tty_read f7672b80 S /system/bin/sh
radio     197   1     16668  1080  hrtimer_na 00000000 S /system/bin/rild
radio     198   1     16156  704   hrtimer_na 00000000 S /system/bin/rild
root      199   1     17372  1476  hrtimer_na 00000000 S /system/bin/netd
root      200   1     4936   832   __skb_recv 00000000 S /system/bin/debuggerd
drm       201   1     25160  1192  binder_thr 00000000 S /system/bin/drmserver
media     202   1     138240 10172 binder_thr 00000000 S /system/bin/mediaserver
root      203   1     4216   672   unix_strea 00000000 S /system/bin/installd
keystore  205   1     7692   936   binder_thr 00000000 S /system/bin/keystore
system    206   1     7960   680   binder_thr 00000000 S /system/bin/pluginservice
system    207   1     4276   572   atdev_ioct 00000000 S /system/bin/startIpcsd
radio     208   1     6536   532   fmdev_fifo 00000000 S /system/bin/fmd
gps       209   1     4328   632   sigsuspend 00000000 S /system/bin/sh
root      210   1     827376 28380 poll_sched 00000000 S zygote
system    211   1     7364   844   binder_thr 00000000 S /system/bin/gatekeeperd
root      212   1     4240   716   hrtimer_na 00000000 S /system/xbin/perfprofd
root      214   1     8612   1080  poll_sched 00000000 S /system/vendor/bin/crashlogd
root      216   1     6560   812   devkmsg_re 00000000 S /vendor/bin/log-watch
root      238   1     3876   180   __skb_recv 00000000 S daemonsu:mount:master
gps       253   209   21528  2160  futex_wait 00000000 S /system/bin/lbsd
root      258   1     6196   368   __skb_recv 00000000 S daemonsu:master
radio     279   1     15060  764   hrtimer_na 00000000 S /system/bin/rpc-daemon
root      284   2     0      0     kjournald2 00000000 S jbd2/mmcblk0p5-
root      285   2     0      0     rescuer_th 00000000 S ext4-rsv-conver
radio     286   1     8300   740   nvmdev_ioc 00000000 S /system/bin/nvm_useragent
shell     294   1     9360   184   poll_sched f7703b80 S /sbin/adbd
root      338   2     0      0     irq_thread 00000000 S irq/289-gnss_wa
root      340   2     0      0     irq_thread 00000000 S irq/291-gnss_er
root      342   1     4328   632   sigsuspend 00000000 S /system/bin/sh
root      363   342   5572   940   __skb_recv 00000000 S /system/vendor/bin/logcatext
root      422   2     0      0     irq_thread 00000000 S irq/293-wlan_ir
system    558   210   879544 85412 SyS_epoll_ 00000000 S system_server
root      707   2     0      0     mvpipe_dev 00000000 S VUSB_SE_FE_LINK
root      708   2     0      0     n_tty_read 00000000 S VUSB_SE_FE_LINK
root      709   2     0      0         msleep 00000000 D VUSB_SE_FE_MODE
root      742   2     0      0     rescuer_th 00000000 S vs-2
media_rw  799   167   7900   600   inotify_re 00000000 S /system/bin/sdcard
radio     802   210   697124 33080 SyS_epoll_ 00000000 S
u0_a21    818   210   746476 54508 SyS_epoll_ 00000000 S
u0_a9     1088  210   669656 22552 SyS_epoll_ 00000000 S
u0_a22    1374  210   958284 23208 SyS_epoll_ 00000000 S
u0_a43    1393  210   707868 41320 SyS_epoll_ 00000000 S
u0_a10    1437  210   859896 77880 SyS_epoll_ 00000000 S
root      1456  1     4328   476   sigsuspend 00000000 S /system/bin/sh
system    1467  210   672660 23476 SyS_epoll_ 00000000 S android.microntek.canbus
root      1504  2     0      0     rescuer_th 00000000 S vs-0
root      1514  1456  86168  1972  poll_sched 00000000 S /system/bin/adb-ec
u0_a10    1521  210   691816 29600 SyS_epoll_ 00000000 S
root      1551  1     4328   632   poll_sched 00000000 S /system/bin/sh
u0_a22    1577  210   973232 35336 SyS_epoll_ 00000000 S
u0_a13    1645  210   702792 44380 SyS_epoll_ 00000000 S
u0_a10    1674  210   1059600 81412 SyS_epoll_ 00000000 S
root      1818  258   6196   176   __skb_recv 00000000 S daemonsu:10087
u0_a60    1858  210   696304 41280 SyS_epoll_ 00000000 S
system    1911  210   668872 23420 SyS_epoll_ 00000000 S
u0_a40    2013  210   670856 21412 SyS_epoll_ 00000000 S android.rockchip.update.service
u0_a10    2252  210   788532 24856 SyS_epoll_ 00000000 S
u0_a37    2455  210   694508 41236 SyS_epoll_ 00000000 S com.microntek.bluetooth
root      2670  258   7228   176   __skb_recv 00000000 S daemonsu:10092
u0_a10    4729  210   805684 42848 SyS_epoll_ 00000000 S
root      6102  2     0      0     worker_thr 00000000 S kworker/3:0
root      6439  2     0      0     worker_thr 00000000 S kworker/3:1
root      6576  2     0      0     worker_thr 00000000 S kworker/u8:3
root      7158  2     0      0     worker_thr 00000000 S kworker/2:0
root      7235  2     0      0     worker_thr 00000000 S kworker/1:2
root      7289  2     0      0     worker_thr 00000000 S kworker/u8:1
root      7298  2     0      0     worker_thr 00000000 S kworker/u9:0
u0_a10    7359  210   801780 51212 SyS_epoll_ 00000000 S
root      8029  2     0      0     worker_thr 00000000 S kworker/0:2
root      8059  2     0      0     worker_thr 00000000 S kworker/u8:2
root      8100  2     0      0     worker_thr 00000000 S kworker/2:2
root      8101  2     0      0     worker_thr 00000000 S kworker/1:0
root      8149  2     0      0     worker_thr 00000000 S kworker/0:0
root      8155  2     0      0     worker_thr 00000000 S kworker/2:1
root      8158  2     0      0     worker_thr 00000000 S kworker/1:1
root      8177  2     0      0     worker_thr 00000000 S kworker/u9:2
root      8188  2     0      0     worker_thr 00000000 S kworker/3:2
u0_a8     8294  210   684960 33392 SyS_epoll_ 00000000 S
root      8341  2     0      0     worker_thr 00000000 S kworker/u8:0
root      8342  2     0      0     worker_thr 00000000 S kworker/u8:4
root      8343  2     0      0     worker_thr 00000000 S kworker/u8:5
root      8345  2     0      0     worker_thr 00000000 S kworker/u8:6
root      8377  2     0      0     mmc_queue_ 00000000 S mmcqd/1
bluetooth 8379  210   719896 40080 SyS_epoll_ 00000000 S
wifi      8386  1     8788   3228  poll_sched 00000000 S /system/bin/wpa_supplicant
media_rw  8415  167   8148   2156  inotify_re 00000000 S /system/bin/sdcard
root      8437  2     0      0     irq_thread 00000000 S irq/286-btif_mu
root      8438  2     0      0     irq_thread 00000000 S irq/288-btip_wa
u0_a93    8585  210   701280 38720 SyS_epoll_ 00000000 S
root      8626  2     0      0     worker_thr 00000000 S kworker/0:1
u0_a1     8765  210   672964 29124 SyS_epoll_ 00000000 S
root      8793  2     0      0     worker_thr 00000000 S kworker/1:3
shell     8798  294   4328   1468  sigsuspend f7734b80 S /system/bin/sh
shell     8802  8798  4224   1136           0 f7744b80 R ps
The next task is to identify what is called at boot time. Looking at the root filesystem we can see:

-rw-r--r--  1 browna browna    1144 Feb  6 20:18 default.prop
-rw-r--r--  1 browna browna 1477328 Feb  6 20:17 init
-rw-r--r--  1 browna browna     369 Feb  6 20:17 init.bluetooth.rc
-rw-r--r--  1 browna browna     346 Feb  6 20:17 init.coredump.rc
-rw-r--r--  1 browna browna     554 Feb  6 20:17 init.crashlogd.rc
-rw-r--r--  1 browna browna     686 Feb  6 20:17 init.debug-charging.rc
-rw-r--r--  1 browna browna     178 Feb  6 20:17 init.debug.rc
-rw-r--r--  1 browna browna     891 Feb  6 20:17 init.environ.rc
-rw-r--r--  1 browna browna     300 Feb  6 20:17 init.gnss.normal.rc
-rw-r--r--  1 browna browna     323 Feb  6 20:17 init.gnss.ptest.rc
-rw-r--r--  1 browna browna    1790 Feb  6 20:17 init.hct.rc
-rw-r--r--  1 browna browna     198 Feb  6 20:17 init.kernel.rc
-rw-r--r--  1 browna browna     207 Feb  6 20:17 init.ksm.rc
-rw-r--r--  1 browna browna    1477 Feb  6 20:17 init.logs.rc
-rw-r--r--  1 browna browna      95 Feb  6 20:17 init.log-watch.rc
-rw-r--r--  1 browna browna   22934 Feb  6 20:17 init.ptest.rc
-rw-r--r--  1 browna browna   26697 Feb  6 20:17 init.rc
-rw-r--r--  1 browna browna    1089 Feb  6 20:17 init.recovery.sofiaboard.rc
-rw-r--r--  1 browna browna     334 Feb  6 20:17 init.sofia3gr_car.rc
-rw-r--r--  1 browna browna   22899 Feb  6 20:17 init.sofiaboard.rc
-rw-r--r--  1 browna browna    9977 Feb  6 20:17 init.sofiaboard.usb.rc
-rw-r--r--  1 browna browna     249 Feb  6 20:17 init.stt_trace.rc
-rw-r--r--  1 browna browna    1921 Feb  6 20:17 init.trace.rc
-rw-r--r--  1 browna browna    9283 Feb  6 20:17 init.usb.configfs.rc
-rw-r--r--  1 browna browna    5339 Feb  6 20:17 init.usb.rc
-rw-r--r--  1 browna browna    1601 Feb  6 20:17 init.wifi.normal.rc
-rw-r--r--  1 browna browna     537 Feb  6 20:17 init.wifi.ptest.rc
-rw-r--r--  1 browna browna     322 Feb  6 20:17 init.zram.rc
-rw-r--r--  1 browna browna     342 Feb  6 20:17 init.zygote32.rc
(Ignore the user/group there, that's because I transferred these to sdcard and onto my laptop to review). The files of note here:
init - ELF 32-bit LSB executable - This is the main init process
init.rc - This looks like the main setup for the environment, it imports the other rc files first, environments, usb, hardware and then runs through various "on init" and other tasks.
In the init.rc there are stanzas that contain different functions, near the bottom are "service" tasks that appear to call daemons and set their user, group and restart/pid functions. Above that are on property settings which I'm unsure what these function as. There in also an "on boot" stanza, which looks the most useful, this seems to bring up loopback interface, set memory permissions, file and system ownership, etc. In several other sections there are "trigger boot" and similar commands which refer to the different stanzas, so based around this, the last one to be called is the "boot" section.
From Android documentation you can add backgrounded exec calls, so the suggestion is using
exec_background [ <seclabel> [ <user> [ <group>\* ] ] ] -- <command> [ <argument>\* ]
Which when added to the boot stanza this should allow you to call your own scripts and commands. My suggestion is to use it like this:
on boot
[other on boot entries]
  exec_background root root -- /etc/rc.local
NOTE: This is currently untested!

Good luck, and I'd love to hear your experiences in the comments.

Monday, 29 January 2018

Chrysler Grand Voyager 2.8CRD rear drum backing plate

Here's a quick one after a recent panic with my Chrysler Grand Voyager 2.8CRD (This will be the same on all caravan/models up to and around the 2006 facelift change). At the rear the handbrake operates an ancient style drum brake.
The drum brake is adjusted through a small toothed wheel you access from the inside of the backing plate, and often will be seized up or just plain useless, so taking the whole thing apart cleaning it, freeing it and sorting will help you achieve better hand brake operation (And help you pass MOT) however there is something that seems to rust and fail. The backing plate.

On here you can see the two brake pads at either side. These have a pivot point in the middle which is held in by a spring and a pin with a forked end and spade fitting. The idea is you push it on (allen key) against the spring push through a slot and twist to lock it.

That's the spring and the pin you can see the wide end to the top of the photo that pushes into the backing plate to secure it.
And now on mine below you'll see the problem:

That hole rusts and becomes wider, eventually the pin just pushes straight through and stops holding the brake pad in place, rendering it useless.

Panic then sets in as you need to replace the whole backing plate, which would be a pain as taking the hub off and all sorts! Replacements are also difficult to find and expensive as it's a whole chunk of metal and depending on what you can find may require the bearing or not. Either way it would be tricky to replace and could be pricey.
Below is one I'd found on ebay:

So what is the solution? Some cars have a similar design but have a slotted washer that goes on the rear of this backing plate to act as the binding point, this seemed ideal as a retro-fit, so a slight modification of it (Flattening it out) and that works great. At the same time using different springs helped as the standard fitting kit for rear brakes has a spring that at fully compressed is only just the right length to let the pin push through, a different compression spring works better allowing the pin to push through further and get a better purchase without as much tension on the spring.

This is what we used, unfortunately I don't have a reference for them as they were in my dads pile of bits from other cars and jobs in the past. We flattened them in the vice and they worked great for this!

Wednesday, 17 January 2018

Youtube removing my monetisation

This came out of the blue, I've had an email from Youtube stating they're applying changes to the YouTube partner program. This is a program that Youtube users can sign into and apply banner adverts, etc, to their videos and make a small revenue from that.

To give you an idea, my videos aren't doing huge numbers of hits, but over the years they've done OK, and every few months I do receive payment from Youtube. It's only around £50 but it's a welcome addition, and a bit of a thank you from all those people watching my HOWTO videos and information, so makes me enthusiastic to make more.

So now, Youtube has stated:

"Under the new eligibility requirements announced today, your YouTube channel, Andy Brown, is no longer eligible for monetisation because it does not meet the new threshold of 4,000 hours of watch time within the past 12 months and 1,000 subscribers. As a result, your channel will lose access to all monetisation tools and features associated with the YouTube Partner Program on 20 February 2018"

Which is a little sad. I believe I'm getting the number of hours watching (at times), but unfortunately up until now I've not chased after subscribers really because it's not been important to me. I'm happy that people search and find my videos, repairing cars, dishwashers, washing machines, talking about electronics and generally just whatever I'm working on features.

So now I need to gain subscribers and don't really know how other than pleading with the general public, or anybody that watches my videos to subscribe so I can receive this very small advertising revenue to help pay for the video cameras, tripods, microphones and other kit that I use for making my videos!

And YouTube if you're listening, this is a pretty poor move. The smaller providers are the ones that grow and provide you with good revenue, why cut off the people just starting off? Surely incentivising us small content producers will make us WANT to do more on your platform? I'm seriously looking at alternative distribution platforms now, such as Patreon which is gaining momentum now.

So if you do want to help me along, please do subscribe to my YouTube channel and hopefully I can meet their targets!

Also, support me on Patreon to help me create more videos and content you want!

Monday, 18 December 2017

Chrysler - Audio system, amplifier and head units

I've finally got round to getting my new Android head unit for the car (Thanks to my wife for my birthday present!) and so this has got me onto figuring out the audio system for my Chrysler Grand Voyager, and boy is it not simple!
Firstly, a standard ISO harness/converter adapter won't work as I've found out before when trying to fit my Bluetooth Parrot phone kit ( )

So I'm now starting to look seriously into how to wire in a new head unit, taking the back off the existing head unit I find the usual block of audio wires which are:

  • Front left (+/-)
  • Front right (+/-)
  • Rear left (+/-)
  • Rear right (+/-)
So I started out by modifying (cutting!) an ISO harness cable, that lets me disconnect one by one the wires and then feed in an alternative audio source. That way I can test each speakers input and feed it to make sure audio works.
I started by disconnecting the rear left output wires, and NO DIFFERENCE! Rear left still worked. I then did the same to rear right and again nothing happened, rear was still working! Playing with the fader and balance on the radio and it managed to still fade between front and rear, left and right. How odd! So next I cut the front left, and BOTH front and rear went off. Doing the same to right and the same, both front and rear went off.
I then fed new audio into front left and audio started to come out of the front and rear speakers correctly, doing the same to right showed the same. So this looks like it's ONLY feeding a left and right signal to the amplifier.
Now I do know this car has an amplifier hidden in the rear panels of the car, so next job was to locate it and see what it was up to!
Taking apart the rear panels I found the amp tucked away in the right hand side behind the speaker.
As you can see that also identified the speakers as Infinity, which nothing else had pointed to until this moment, so another point is to check the back of the speakers. I couldn't find any official specs for these, but testing I found them to be 2ohm speakers (Which is quite low, and would fit with them being decent/high performance. But bear in mind that means you need a decent amp/head unit to power them).

You have to take quite a bit of the panels off to get at it, unless you can contort your hand into the panel to get at the fastening nuts (I did this in the end!)
Here is the amplifier out of the mounts, at the top are two connector blocks.

You can see the two connector blocks (I'd removed one) and at the top right of photo is the connector for the rear right speaker I'd disconnected to get into the hole where the amplifier was.

The connector I've removed (I'll call it the right side connector) contains MOST of the speaker outputs. This car has 8 speakers. Front left (top speaker), front left (bottom speaker), front right (top speaker), front right (bottom speaker), rear left (top), rear left (bottom), rear right (top), rear right (bottom). The more observant of you will spot only 6 speaker pairs on that connector, they continue on the other connector (Chrysler mustn't be able to source connectors with more than a certain number of pins!).
So by feeding audio into each of these I discovered these directly drive the speakers around the car, and so can send audio to speakers direct, irrespective of if the ignition is on, amp is on, etc, which is good news.
Now I started to look into the audio from the head unit and by testing and following wires I found 4 wires coming from the head unit, left (+/-) and right (+/-) so that matched my findings that the amp simply got a left and right. So how did it handle fader/balance? The answer was on one of the other mystery wires.
There were 2 black (Both ground) 2 yellow with red stripe (Both had 12v constantly, irrespective of ignition or radio on or off) and a further two wires. One is white with a purple/violet stripe. This is the interesting wire as it doesn't show a voltage or anything. My suspicion is this is the CANBUS network data wire, and is sending digital data from CANBUS to the amp to interpret. That means the existing head unit will be sending a message into CANBUS (Power amp on, fader volume level, left/right speaker levels, etc) and the amp is then reading and responding to these commands on it's own.
That means a simple head unit swap isn't going to work, as firstly nothing will be telling the AMP to turn on, secondly even if it was turned on it wouldn't control the fader/balance settings.

That leaves me with two choices:
  • Run a wiring loom from the new head unit at the front, round to where the factory amp is, remove the factory amp and wire direct into the speakers. That way the new head unit completely controls the speakers direct and avoids the amp
  • Replace the factory amp with my own, still just use left and right (So new head unit couldn't control fader between front and rear) but it would be amplified output to the speakers.
At the moment I'm unsure which option to take.

So I've started to document the wiring I've discovered.
Here is the connector at the infinity amp end. As above I'm calling them connector 1 and 2, connector 1 on the left of the photos above mainly contains power and inputs, and connector 2 mainly speaker outputs. So the connector wiring goes like this:
PINConnectorwiring colourFunction/use
x1green/blue stripeFront Left top +
x1green/yellow stripeFront Left top -
x1grey/blue stripeFront Right top +
x1grey/yellow stripeFront Right top -
x1yellow/red stripeConstant 12v + supply
x1blue/pink stripeignition 12v + supply
x1white/purple stripeCANBUS/Data supply
x1green/orange stripeFrom radio left channel +
x1green/blue stripeFrom radio left channel -
x1grey/orange stripeFrom radio right channel +
x1grey/blue stripeFrom radio right channel -
x2black/green stripeFront left lower +
x2greenFront left lower -
x2grey/brown stripeFront right lower +
x2greyFront right lower -
x2grey/green stripeRear left main +
x2light greenRear left main -
x2green/light green stripeRear right main +
x2green/grey stripeRear right main -
x2green/pink stripeRear left upper +
x2green/blue stripeRear left upper -
x2grey/yellow stripeRear right upper +
x2grey/blue stripeRear right upper -

And now the head unit wiring:

The plug looks like this:

So I've documented what I've found:
PINChrysler wire colourISO/Aftermarket harness colourAftermarket head-unit colourFunction/use
xgreen/orange stripen/aWhiteFront Left +
xgreen/blue stripen/aWhite/BlackFront Left -
xgrey/orange stripen/aGreyFront Right +
xgrey/blue stripen/aGrey/BlackFront Right -
xblue/pink stripen/an/aIgnition +12v
xwhite/purple stripen/an/aCANBUS data line
xorangeorangeorange ILLIllumination
xredredRed Acc-inIgnition/switched +12v
xyellowyellowYellow B++12v constant
xblackblackBrown/Black and Black-12v ground constant

A couple of other points, I've noticed quite a few wires with black electricians tape (Not the fabric factory-fit type, but aftermarket, like the stuff I use!) around wires, notably around the factory amp speaker outputs, in the head unit, etc. I've also spotted a RED wire coming out of the head unit that goes off into the front bulkhead. I'm now wondering if this goes off to the fusebox and to the NBS relay. This is apparently the relay that switches the amp on and off (It stands for Name Brand Speakers, i.e. the infinity system) so I'm going to check as my guess is this car has had an alternative system in at some point and the relay was forced on when power was given to the radio (Or ignition) so I'll check that relay out.
That makes me think replacing the factory amp with aftermarket might be the way to go without having to rewire the entire car.

This is constantly a work in progress, so hopefully it's useful and I'll keep adding to it as I do more and get further on my path!

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
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 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 "". 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 
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.

Wednesday, 15 November 2017

Car fuse splitters - warning!

I needed to add an extra item to one of my car fuses recently, this was to power my daylight running LEDs (DRLs) and so I found the easiest option was to wire into the ACC fused function in the fusebox. In my car it's in the bonnet to the side so exactly where I need it.

A colleague recommended a nifty fuse splitter that he'd used previously. You take the existing fuse (mini spade fuse on mine) and replaced it with the splitter, which contains two fuses (the original and new one) and a flying lead with crimp connector on. Ideal for this sort of job! (Just be careful not to overload the fuse outlet as the fuse holders were only rated for the original, so an original 20amp if you use 2x20amp and it pulls all 20amp each of them the fuse socket will carry 40amp so may be too much for the wiring, etc!).
So I searched ebay and found what I wanted:

As you can see these are nifty little units, plug them in and add your new fuse. They do go at an angle so it may be tricky to fit in place depending on the size of fuse holder, whats around it, etc, but that should work great.

Unfortunately my cheap-ness then cut in and I started looking for cheaper than £4.49 for 4.
I found some for £3.79 for 4 and with faster delivery, so I duly ordered them. However when they arrived, I think I found why they were cheaper!

The fuse pins themselves have additional plastic around them, almost to the full depth of the pins, so these won't push into a regular mini fuse holder. In addition the fuse sockets on the device itself also have poor connectors and don't hold the fuses properly in place, not securely enough for them not to rattle out during normal driving.
You can see on the photo above the black plastic tab that extends down to the full length of the pins, rendering these useless!
I tried to cut away at this plastic to make them useful, but this ended up with the whole thing exploding and the pins not being secured, so in the end I've given up for now.

Will buy the better ones at some point and do this job again properly!
BTW naming and shaming the dodgy ones the ebay item id is 122558391093.

NOTE: To be fair, now I've looked at the pictures of the ebay sale item they do show this plastic lip, so the photos are accurate!