Oneplus 3 Nougat with R/W System

I recently upgraded my Oneplus 3 to OxygenOS 4.0.3 – which runs Android 7.0.

I discovered that I could no longer write to the hosts file to do ad blocking and this was driving me crazy, so I set about changing the OS to allow me to do this – it required a single letter tweak to a file – but, unfortunately this file is embedded in the heart of the ROM.   Other then tweeking the fstab file in the initial ramdisk image to mount /system rw I have made no changes to the source code.  (Of-course, it is possible that when I repackaged this I did something slightly wrong, being that I’ve never done this before)

Subsequent to installing this file (and SuperSu, of-course), Adaway again happily does its thing and adverts have vanished.

I am uncertain of the security implications of allowing /system to be rw – but I am sure its less of a frustration then being bombarded with adverts (and, come to think of it, it must be safer as well).  I wrote a question on android.stackexchange, which suggests the threat is not that great – certainly less then the alternative hack I came up with which required disabling selinux.

If anyone wants it, they can download it here. This file has an md5 sum of 0729ae4ba8d30ccf2a5ec0982021abb6  and a sha512 sum of e8c8e4bdbe960cfcbd0ce564710144bfac8ba663de6fd9df8a858a567f7317309bf6bad5645142feede6ae8741a5b3eaced2c4fd1214fdc6476d808f4f9b1dd9. Its a drop-in replacement for OnePlus3Oxygen_16_OTA_041_all_1702081756_f9fb218af59d4aa6.zip from the OnePlus 3 website.  I expect it is smaller then the Oneplus 3 file because of different zip file compression ?  The file is about 1.5 gigs compressed.  Usage is, of-course, at your own risk.  If you brick your device, don’t come running to me.  The only guarantee I make is that I flashed this firmware on my system and it behaved as expected.

Resolving shared WordPress Email issue

I like using a database to directly drive my virtual webhosting – this means that each account on the system has a UID and GID, but no username associated with it (ie in /etc/passwd or getent passwd)

Because of this, when users try and send an email in WordPress (eg to reset their password), WordPress does not send the message, complaining “Possible reason: your host may have disabled the mail() function.”

The underlying cause of the problem can be found by looking at the Postfix mail Logs – where you get errors like “fatal: no login name found for user ID XXXX

Fixing this problem – without relying on WordPress plugins or tweeks is simple – modify the php.ini file apache is using by adding the following line:

sendmail_path = /usr/sbin/sendmail -t -i -fwww@defaultwebaddress.goes.here

 

Hangsun S80 Lamp

I purchased one of these lamps in 2016.  Below details my findings and some help to others (maybe).

The product is not good at all – indeed if returning it were a practical option I would – but because I live down-under, shipping costs make this prohibitive – so I’ve tried to make the best I can.

Problems I encountered –

I could not download the Android App, no matter how hard I tried – I assume this is because of country restrictions set by the developer.   Luckily, I reached out to them, and they responded, and they responded with a QR code to download the app (not sure if this is a different one to the one on the base of the unit and manual, or if they updated there permissions), but here it is:

QR Code

This app seems to work a lot better then the IPad app I previously needed to use – specifically it fixes a bug where you could not set maximum brightness on the lamp, and has a cleaner interface.

The display

The display on the unit is backlit – and the backlighting only comes on when you are interacting with it – it is also blindingly bright white light – particularly in a dark room.   This means that you can’t simply look over at the clock to see its 3am.    I greatly greatly reduced this issue by adding a small red LED to the back-light (in conjunction with a 150 ohm resistor, which I attached to the top and bottom pins of the conveniently located CON6 connector to the left of the display board).   This allows me to read the light without having to turn it off.    Next time I open the unit, I intend to disconnect one of the 2 white LEDs which power the backlighting.  (Its not possible to simply replace one of these with a red LED, as they are merged into the display).

The hardware

Although very, very let down by the software, the hardware appears to be OK – although it is all plastic.  The design appears to be modular and thus somewhat hackable.

One confusing and disappointing thing though is the maximum lamp voltage is supposedly 6 watts (according to the package this is the size of the replacement lamp, and according to an email from them this is the maximum size).   The problem with this theory is that the lamp included is a 7 watt warm white dimmable LED.    While more-or-less adequate, its not fantastic, and certainly not as good as my previous jerry-rigged system which used the equivalent of a 100 watt CFL bright white light.

Other notes and letdowns

The promotional video seems to imply you can program a significant number of on-off events – this is incorrect – you are limited to a maximum of 2 events.  You can not specify which days, although you can turn the alarm on and off manually – this is nowhere near as convenient as a 7 day timer for example.

You can’t have the light come on  without an alarm – the alarm level can be set to low, but not off.  This is irritating.  I intend to install a switch so I can disconnect the speaker.

The light seems to turn on at random times – but without sound.  Interestingly this has stopped after I unplugged the unit for an extended period out of frustration of it coming on in the middle of the night.

On my unit, you can’t output sound over Bluetooth to the device.  (You are supposed to be able to do this according to the manual).  Not sure why this is, the unit is paired, just no sound output, regardless of volume!

The amazon  account has a number of 5 star reviews – if you look at the reviewers though, they are all (as of the time of this post) shills, having all posted exactly 2 reviews on the same 2 products.   The other reviews stand at 1 – except for mine, which I need to upgrade to 2 (I’m doing  that as part of a deal I’ve done with them to get the QR code and confirmation of the maximum wattage – and to be honest, the unit is kinda useable)

BD-F6500 region free upgrade – Firmware 1010 / 1017 note

In case anyone has the same issue –

A few months ago I purchased a SamsungBD-F6500 from Noel Leemings (A whiteware retailer in New Zealand).   A few days ago, we purchased some DVDs which were “region 2” and would not play on our NZ/AU – region 4 player(s).

I attempted to region unlock the DVD using the method on the Internet, ie Start the DVD player, open and close [empty] dvd drive, press repeat, enter in “7 6 8 8 4“, then “9” for region free.   This failed to work a number of times.

With nothing to loose I upgraded the firmware to 1017, and was able to unlock the drive using the above process without issue on the first attempt.

(Of-course, friends who download their content using filesharing networks don’t have these issues – and the media industry wonder why movie piracy is so common ?)

nn1

Linux and Samsung CLX-3185FN

I recently acquired a Samsung CLX-3185FN colour laser MFC. Although the device claims to work with Linux, it is a bit of a mixed bag.  Below are my views and outcomes of lessons learned thus far.

Background and Review

FWIW I use Ubuntu 12.04 64-bit, and am only interested in connecting the device across a network.    I am blown away by the speed and quality of the printer for black-and white laser printing relative to my Brother Fax2820 [laser printer] and multi-page scanning relative to my HP Officejet 6500 [ scanner, theoretical occasional color printing which never worked because cartridges dried up ].

For black-and-white scanning to email this device outperforms the OKI MB470 I use at work, and leaves the HP Officejet 6500 for dust.  Using the defaults it produces very clear pdfs of small size.  I find the scanning interface unnecessarily clunky, for example defaulting to USB scanning when no USB device is connected, with no apparent way to change the default behaviour or set up a “speed scan” button – at least with the firmware installed.

Colour scanning (using the flat bed) is very slow relative to the HP Officejet, but produces (subjectively) impressive images.

I don’t like the exorbitant prices of replacement toners and the “DRM” implemented in the printer and cartridges to extort this – a set of cartridges (let alone drum) will set me back more then the printer.   I am aware of ways to hack this device to use much cheaper toner – something I will be experimenting with soon.

Unsolved Issue –  Printing Graphics

Even using the latest driver from Samsung, printing images in draft mode worked fine, however printing normal or high quality images did not work for the most part (but regular documents worked OK).

I did manage to get a couple of pictures to work, and thought I had solved the problem, but have been unable to reproduce the feat, and Samsung offered exactly no help (see below).   I have, however come up with a work-around – Despite what the manual says, it is possible to print colour jpg files from a USB key plugged into the front of the device.  Its not fast or particularly convenient, but it works.

For reference, the presenting problem is/was that the image was duplicated twice on the page, stretched to full length, with white gaps.  The higher the quality of the image sent to the printer, the bigger the gaps.

Both GIMP and GTHUMB exhibited the same problem.

I have not had a chance to pursue it (I have a great HL5340D black and white printer, and am using the Samsung for scanning – and the very occasional picture for my son), but it looks like there may be an unofficial forum which can help – http://www.bchemnet.com/suldr/forum/

Solved Issues

Scanning

Initially I could not get the printer to work with XSANE, no matter what drivers I tried to use from Samsung or what I configured, however the solution turned out to be trivial to fix – The solution was simply a matter of adding the line “tcp 10.0.3.247” to /etc/sane.d/xerox_mfp.conf  – This works a charm – pity the manual is devoid of any hint of this solution.  It almost goes without saying that you would replace 10.0.3.247 with the IP address of your scanner.

Other

I installed other Samsung Linux software – Smartpanel and PSU.  Neither of these pieces of software provided any meaningful functionality and I would not bother with them again.

Also of note was Samsungs complete cop-out when it comes to supporting Linux. In response to a reasonably detailed email asking for help with the issues I was having with colour printing, their response (grammatical errors and all) was:

Thank you for your email, Unfortunately we can’t suppor Linux as it’s all open source

WE provide the drivers for the unit you have but can’t provide any further support on the operating system

All I can suggest is that you try and install the unit on a PC and see if you’re stull getting the same problem IF you are then return the unit back to the store as there may be a fault with it