Installing a custom ROM on Asus Zenfone Max M1 ZB555KL X00P X00PD

I own an Asus Zenfone Max M1
model ZB555KL

The codename of this phone appears to be X00PD in some places, but X00P in others. I haven’t been able to figure out whether those codes are supposed to refer to different phones.

I would like to describe how I managed to install a custom ROM on it (Lineage OS).
I didn’t figure any of this out myself but rather work entirely off the work of some amazing developers whose links are included in the various steps below.
These steps will void your warranty and they may make your phone unusuable; however in my case it works fine.

Step 1 : Set up your system

You will need a PC with adb (platform-tools) installed. You can find easily anywhere on the net how to do it.
I did this on a Linux machine.

Then you need to enter development mode in your phone, which is really easy and described here:

To test that it works, once you connect your phone with your PC and you type in the shell:

adb devices

It should tell you it found your device.

Step 2 : Update to the latest firmware

Download the vendor firmware for Android 9 given here:

For your convenience this is the direct download link of the firmware zip file:

Put the firmware zip file in the root of your phone file system. I did it using USB file transfer from my PC.
Then reboot your phone. A message should appear that there is a system update or something and it will walk you through it.
I think this may wipe all data from your phone, so make a backup first!

Reference: this is the “manual” update method as described here:

Step 3 : Unlocking the bootloader

I’m not sure if this is actually required or not. It will wipe all the data from your phone so first back it up.

I got this from the following video:
which also contains a link somewhere in the comments to a google drive zip file.

One of those files is the .apk from Asus, “UnlockTool_ASUS_Android_signed_E300_1.apk”. I think this file comes originally from Asus but I haven’t been able to find it on their site strangely enough. Not sure what’s going on there.

I installed this by connecting the phone USB cable with my PC and then typing:

adb install UnlockTool_ASUS_Android_signed_E300_1.apk

That seemed to have worked. But caution: it will basically reset the phone to “zero”.
Oh right —

Step 4 : Installing TWRP

Then I install custom recovery, which is basically a system that allows you to make backups of your entire system and install a new operating system.

Download the file supplied here:

Yes it says X00P (not X00PD) but it worked for my phone.

Ensure your phone is connected with USB and run this on your PC:

adb reboot bootloader

Then the phone should reboot into the bootloader. Once there you can type:

sudo fastboot flash recovery twrp-3.3.1-0-X00P.img

Or replace `twrp-3.3.1-0-X00P.img` with whatever version you downloaded.

Now switch off the phone. Caution! You need to boot *immediately* into recovery (i.e. TWRP) upon the first boot, otherwise the phone will wipe it and you have to re-do this step (as described in the link above). To boot into recovery, when the phone is powered off, press the power on button and volume down button simultaneously. Once the screen turns on, release the power button but keep pressing the volume down button until you enter the recovery environment. You should see the TWRP logo.

Then when booting into TWRP, it says it cannot decrypt data. Following something I read somewhere on a forum, I just pressed cancel to enter TWRP and it seemed to work ok.

Once you know it works, you can power off the phone again.

Step 5 : Download and install the custom ROM

Now it’s time for the fun part: installing the new system!

I followed the instructions here:

That is, download (1) the LineageOS Zip file and (2) GApps.

Gapps: (ARM64 9.0 Nano Recommended)

Place both zip files on a micro SD card that you stick into your phone.

Boot into TWRP (i.e. hold down power + volume down as described above).

Press Wipe and select System, Data, Dalvik, Cache. Don’t Wipe Vendor. Press the slider to wipe.

Then go back to Install and select the two zip files that you placed on the micro SD.

That’s it, for me it worked! I hope it works for you too.

LG K4 (M151)

I needed a new phone so I bought the LG K4, wanting a phone that was relatively cheap and could do the basic things (e-mail, messaging, basic surfing, music). The phone comes with little internal memory and a lot of “bloatware” (apps by LG that you don’t need) so I felt it needed some hacking. I did some surfing and was only moderately succesful, but wanted to present you the main findings and links, because some things I found didn’t work and others did. Please let me know if you find out things I haven’t listed here.

Image from


Installing ADB under Linux

You can use ADB to control your phone from a PC: reboot it, copy files, etc. If you’re on Linux, here is a great installation guide.

ADB also allows you to copy files to and from the phone. This worked better for me than MTP which gave errors and stopped working in the middle of copying files. Not sure why – maybe it’s support under Linux is limited? There is a nice tool AAFM that allows you to do the copying using ADB through a graphical interface.


Removing bloatware

Once you have ADB installed, you can remove bloatware, as described in this great recipe. You don’t need root access for this.

Inside adb shell, type

pm list packages

THen choose the app you want to uninstall, say <name> and type

pm uninstall -k --user 0 <name>

You can get more info about a particular package using

adb shell dumpsys package my.package

And yet more info here.


Download mode

Managed to get into Download mode by switching off, holding the volume up button and then plugging in the USB cable to the PC. Then it says updating firmware and in the bottom you see “633A B100” (or some similar number). Then nothing happens anymore. The phone does show up as a USB device, but ADB cannot connect to it. To get out of this mode, I just removed the battery.

To communicate with the phone in this state, you use an interface called LAF, which appears to be specific to LG. Peter Wu “Lekensteyn” made a terrific set of command-line tools that allow you to interface with the phone through LAF, and you can download his tools here. Through those tools, you can execute shell commands on your phone. However, in more modern phones (such as the one I have) the commands you can run are extremely limited. If you run a command that is restricted, you will see:

Hello, I am LAF. Nice to meet you.

See this issue for more detailed discussion of this phenomenon. I wanted to use the LAF mode to root the phone but eventually just gave up.



Recovery mode
Unclear how to put the phone in recovery mode.

Here they say: press Volume UP, Power button and Home button simultaneously





I wanted to get root access to this phone but I had no luck yet. Some forums say I should try KingRoot but that doesn’t work. It’s just an annoying app on your phone.

There is this forum post claiming they rooted the LG K4 but it looks like you require to purchase a box of some sort.




I did not have luck getting into fastboot mode either.

It seems LG phones have LAF instead of Fastboot (if I understood that correctly). I didn’t manage to get anything useful from that but here is the link. There may be a way to wipe (remove) the LAF partition, in which case the phone should revert to using Fastboot which should give you more control.


Making Asus UX305CA touchpad work in Ubuntu (temporary fix!)

Hello everyone – I acquired a fine Asus UX305C “ultrabook” but I was somewhat disappointed to find that its touchpad, the ELAN1000, doesn’t work under Ubuntu.

A bit of Googling taught me that this is a widespread problem. It seems to come down to a bug in the i2c driver, and relating to some timing delay not being respected. It’s likely also to get fixed in the major next Linux kernel (4.5), but I don’t know when that one will come along. Anyway, as you can hear from the way I talk about it I have no clue what the actual problem is, but I found Kevin Fenzi’s fix here (and thanks to Benjamin Tissoires for pointing me to it):

The problem is at the above link it’s only explained how to do this for Fedora. Here I’ll show how to do this under Ubuntu.

This is a workaround – it’s not a real fix. The problem is expected to be actually solved in the 4.5 kernel but for the time being, you can use the instructions here as a workaround.

First, get ready to download, build and install a custom kernel. This is nowhere near as scary as it sounds. Follow the instructions here:

It may be a wise idea to test that you can get this custom kernel compiled, installed and running using the instructions above. It won’t actually solve your problem but once you manage to, you’re almost there.

Now in the kernel sources that you downloaded in the above tutorial, open the file


In this file, find the following section:

static int dw_i2c_acpi_configure(struct platform_device *pdev)
        dw_i2c_acpi_params(pdev, "SSCN", &dev->ss_hcnt, &dev->ss_lcnt, NULL);
        dw_i2c_acpi_params(pdev, "FMCN", &dev->fs_hcnt, &dev->fs_lcnt,
        return 0;

Depending on the source you downloaded, there may be some extra lines before the return statement, but that’s irrelevant. Now after the two lines that start with dw_i2c_acpi_params, add the following line:

dev->sda_hold_time = 30;

When this is done, save the file. Now you just need to recompile the kernel sources and install them as explained in the kernel building tutorial, and then boot into the new kernel, and voilà, your touchpad should work. Booting into the new kernel is fairly easy: if you followed the steps in the tutorial then it should appear in your boot menu.

Confirmed to work for XUbuntu 15.10 on UX305.

Faema Family Grinder – When the adjustment is stuck

I wanted to share some of my experiences taking apart the Faema Family grinder. When I got it second-hand, I did not manage to adjust the grind. Normally you can turn the plastic bean hopper left or right to adjust the grind coarseness.


So here I’ll jot down what I did hoping that it may help somebody in the future with a similar problem.

I took off the lid from the bean hopper and undid the three screws, taking out the little black cap shown in the picture below:


Now the trick came. Below this hopper, I found the burrs that do the actual grinding. These are two metal elements on top of one another. In the following picture you can see the top one. It is supposed to be able to turn to make the grind finer or coarser, or, if you keep making it coarser, the entire top burr will come off which is great for cleaning. The trick is that it turns the opposite way from how a usual screw works: to loosen it, you turn it clockwise. I have illustrated this in the following picture:


Since these burrs were really stuck, I had to stick in a metal plate that had the right size and then use it as a kind of screwdriver. I got this idea from this forum, which I recommend to have a look at for further detail:

Then the burrs started coming apart and finally I could take the top burr out completely. Here is what that looked like:


Then it was a matter of lots and lots of cleaning and putting it together, and lo and behold, the grinder adjustment mechanism is fully functional again!

Rawstudio photo editing app on Ubuntu 15

Rawstudio is a great app for editing your RAW photos on Linux. However, its home site seems to be offline these days. You can still get the program from github at:

The program doesn’t seem to be available for Ubuntu 15 on PPAs yet so you’ll need to compile it yourself. Grab the code from the repository above, put it somewhere on your computer. You will probably need to install some packages. For me, I had to install some dependencies using the following command (you can run this in the terminal):

sudo apt-get install libtool libtool-bin libgtk-3-dev libgconf2-dev liblensfun-dev \
liblcms2-dev libexiv2-dev libfftw3-dev enfuse libtiff5-dev libxml2-dev sqlite3 \
sqlite3-dev libsqlite3-dev libgphoto2-dev

Then, go to the directory where you extracted the Rawstudio github source code, and run:


If you’re lucky and no errors are shown, you can proceed with:


cd src


And that should do it! Hope this is helpful.

Hooking up a MIDI keyboard to Ubuntu

I have a MIDI-capable keyboard and a MIDI-to-USB converter. Today it finally worked under Ubuntu Linux. The MIDI-to-USB converter was quite cheap and no-name, but in case this is of help for anyone, the vendor ID was: VF-21-USB-MIDI-KYBD-CBLE-A43

From Linux, the usb device looks as follows (type lsusb in the terminal to get this info):

Bus 002 Device 004: ID 1a86:752d QinHeng Electronics CH345 MIDI adapter

If you plug it in, it pretty much works straight out of the box. Here is the dmesg output:

[ 582.546409] usb 2-1.3: USB disconnect, device number 3
[ 613.878085] usb 2-1.3: new full-speed USB device number 4 using ehci-pci
[ 613.971701] usb 2-1.3: New USB device found, idVendor=1a86, idProduct=752d
[ 613.971709] usb 2-1.3: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 613.971714] usb 2-1.3: Product: USB2.0-MIDI

For me, this creates a device node under /dev/snd/midiC1D0 (but the exact name might depend on other MIDI-capable devices present in your system, so simply look in /dev/snd/ to see what devices appear or disappear when you plug or unplug the USB cable). This device can then be read by Jack and hooked up to Fluidsynth or Rosegarden for your MIDI enjoyment!

Installing FTAP for finger tapping synchronisation experiments (OR: How to use FTAP in the 21st century)

Steve Finney made a neat Linux program for running sensorimotor synchronisation tapping experiments. In tapping experiments, you typically have a participant tap her or his finger along with a metronome. Finney’s program FTAP is a C-based program that will read the taps from a MIDI interface and that can generate metronome sounds. However, the program was developed in the early 2000s and the Linux landscape has changed somewhat. These days I’m installing FTAP on my friend’s Linux box. I figured the world might learn something from our errors.

First of all, make sure you start with a 32-bit version of Linux. It seemed to us that the binaries (pre-compiled executables) that come with FTAP don’t work under 64-bit Linux (which nowadays is the standard). When you download FTAP it should come with source code, which should allow you to compile it, but this didn’t work out of the box for us. Also, it should be possible to run the 32-bit FTAP executables in 64-bit Linux but we were too lazy to figure out how. So make your life easy and install 32-bit Linux.

Second, install a realtime Linux kernel. Current Linux versions by default have a kernel that allows you to come close to real time (called lowlatency) but I got the impression that for the very best timing performance you need the kernels called “realtime” which you can get from abogani’s PPA archive. Note that this works for Ubuntu 12.04 but maybe not for newer versions. For details:

Third, download FTAP: Extract it and you should be ready to roll! Note that FTAP can only read the MIDI device /dev/midi. So if your MIDI device somehow gets mapped to another device node, make sure you install a symbolic link in /dev/midi to the actual device node.

A final note (please learn from our stupidity): When we ran FTAP on a particular day, we found incredible delays (up to several seconds) between the MIDI input and MIDI output. These delays persisted when FTAP wasn’t even running, and the computer was set up (using aconnect) to immediately forward the MIDI signal back to the USB-MIDI device. It turned out to be due to the fact that Windows (which was also installed on the computer in a dual-boot set up) had not been shut down but was in hibernation mode. Apparently this meant that Windows was still using resources and this caused massive delays in the MIDI processing. Lesson learned: don’t hibernate Windows while you are running an experiment under Ubuntu!

One-trick “Oh Hell” – what are you chances of winning?

On a holiday day Meaghan Fowlie and I decided to figure out your chances of winning in a one-trick “Oh Hell” game. “Oh Hell” is a variant to the Whist game; if you want to know the rules in more detail, check out the Wikipedia page.

So let’s assume that there is only one trick to play (each player has one card). Trumps are decided by a card that is flipped face up (so we know that is one less card in the trump suit in the game). What are the chances that you’ll win this trick? It depends of course on which of the following situations you are in:

– You don’t have a trump, but you are leading (you are the first to play). This is marked as nontrump.leading in the graph below.

– You don’t have a trump, and you are not leading. This is marked as nontrump.not.leading.

– You have a trump. Furthermore, it is higher than the card that is turned face up. This is called trump.turned.card.below.

– You have a trump, and it is lower than the card that is turned face up. This is called trump.turned.card.above.

If you’ve decided what case you are in, you can use the graph below to decide how likely you are to win the trick. The horizontal panels indicate the number of players (between 2 and 6). The x-axis indicates the card you hold. The lines indicate the probability that you’ll win. So if you play “optimally”, you’d bid 1 if the chance is greater than 0.5 and 0 otherwise.



Of course, this is true only if you have no other information. Once other players place their bids, your estimation of your chances of winning should change. Maybe we’ll address this some other holiday day.