Blog update v2.0

I remember a few years ago on here I would do ‘blog updates’, where I would change some stuff on my blog like the theme and design to make it more user friendly and modern.

This was a few years ago however, so I’m not going to dig up what version number I got up to back then. Today, I changed my blog’s theme and introduced a new logo for the blog. The blog looks more modern, more clear, and more user friendly so I consider this a major update for the blog.

Welcome to EpicChasGamer.com 2.0, I hope you enjoy reading my articles and navigating the site. I will also do more polls to collect viewers opinions on tech-related topics.

How to restore Lenovo devices on stock firmware on Linux

Ever since various custom ROMs began being released for the Lenovo Tab 4 8 Plus, I have rarely gone back to stock. However, after a ROM installation went wrong, I had to. I tried using the Lenovo Rescue and Smart Assistant (LMSA) but for some reason it failed to restore and did not detect a device. I could not get out of Emergency Download Mode. I feared the worst for my Lenovo Tablet, first released in 2017.

However, a month later, I found a solution in the name of QDL (Qualcomm Download). This works on all Qualcomm Lenovo devices. It runs on Linux, and you must build from source. With it, I successfully restored my Lenovo Tab 4 8 Plus back to stock firmware, allowing me to reinstall an Android 10 custom ROM on it which worked fine.

You must be running Linux and have a copy of your tablet’s firmware. I got my firmware by downloading using the LMSA and then copying it over to my Linux partition. I’m running Ubuntu, but any modern Linux OS should work fine.

Change directory (cd) to the folder your firmware is at. In my case, that is:

Now we have to build QDL. Do so by running the following:

git clone https://git.linaro.org/landing-teams/working/qualcomm/qdl.git
cd qdl
cd ..

Now you must find the mbn file. Go into the folder of the firmware and find a file along the lines of prog_emmc_ddr.mbn. In my case it was prog_emmc_firehose_8953_ddr.mbn. Make a note of that file, it is very important.

Make sure your device is in QDL mode. Run lsusb, if you see something along the lines of “Qualcomm, Inc. Gobi Wireless Modem (QDL mode)” then you’re good. If you don’t, make sure your device is unplugged, powered off, and then press the volume up button and connect to PC at the same time. Then run lsusb again and a QDL device should show.

Now run:

qdl/qdl --debug --include 'PATHTOFIRMWARE' 'PATHTOFIRMWARE/device.mbn' 'PATHTOFIRMWARE/rawprogram_upgrade.xml' 'PATHTOFIRMWARE/patch0.xml'

Your device should now restore. It may take a few minutes. Once your device has finished it will boot up. Your device should now be recovered. Enjoy!

Happy New Year!

2020 has been a different sort of year. Because of the COVID pandemic, many tech events were cancelled or postponed. Hopefully, 2021 will be better. Many things are expected in 2021 including the Galaxy S21, OnePlus 9, and iPhone 13, as well as new operating systems such as Android 12 and iOS 15. I hope to blog here more with new great posts in 2021. Happy New Year!

Python tutorials – Basic validation

Hello again everybody, I am sorry that I have not posted in the last couple of weeks. It’s December now, and Christmas time is approaching. In the meantime, here is a new Python tutorial about validation.

What is validation? It’s a way of checking whether something is a certain value or not, and executing code depending on the result. Code uses validation all the time. If you are signing up for an email address, it may ask you for your phone number, for example. If you type in an invalid phone number (for example, if you put a letter in the number) then it will refuse to continue until you’ve corrected this mistake.

For this tutorial, I will be using a very basic example. The program will ask the user to enter in a lowercase letter. Once the user has done so, the program will check if the character is in a list of specified lowercase letters. If it is, the program will say that the input is valid, and exit. If it isn’t, the program will declare the input not valid, and ask the user to try again.

Here is the code:

validchars = "abcdefghijklmnopqrstuvwxyz"

valid = False

while valid == False:

letter = input("Enter a lowercase letter: ")

if letter in validchars:

print("That is a valid character.")

valid = True


print("Sorry, that's invalid.")

Let’s take a look at the code. The first line creates a variable called validchars, consisting of all the valid characters that can be used. The second line creates a boolean variable called valid, and sets it to False.

The third line, while valid == False: declares that as long as valid is equal to False, the following code will run. The next line asks for the user to type in a lowercase character and stores it in variable letter.

The fifth line, if letter in validchars:, checks if the user-inputted letter variable is in the string validchars. The next two lines of code will be executed if this is the case. The next lines print out telling the user it is valid, and then set valid to True. If this code is executed, the program will end as the while loop will no longer work with valid as something other than False.

The final lines will be executed if letter isn’t in validchars. It tells the user the character is invalid, and does not update valid to True. As a result, the program will repeat again until letter is found to be in validchars, and then the program will exit.

I hope this tutorial helped you in some way. This is only the basics, and there are many more things you can do with validation that I may cover in a future tutorial. Goodbye! 🙂

Python tutorial – While loops basics

In Python, while loops allow you to repeat things forever, or up until a certain point. Here’s an example:

keep_going = True
while (keep_going == True):
print("Hello world!")

This will print “Hello world!” indefinitely. The keep_going value is set to True, and the while loop checks continuously check that the keep_going value is equal to True. As long as it is, it will keep repeating.

Let’s try modifying the code so that it only repeats 9 times. Let’s try:

count = 1
while (count < 9):
print("Hello world!")
count = count + 1

The count value is set at 1 at the start. The while loop checks if count is less than 9, which it is. It then prints “Hello world!” and adds 1 to count. It keeps repeating, until Python reaches the while loop and realised count is no longer less than 9, so it skips and exits.

Now, let’s try adding user input into the code. An example is a counting program. Python asks the user what they want to count to, they enter it, and Python counts to it.

count_to = int(input("Count to: "))
count_to = count_to + 1
count = 1
while (count < count_to):
count = count + 1

This program asks the user what they want to count to, then it adds 1 to it as it will count up to a number 1 less than it, which will be the original number the user entered. This is stored in count_to. It then sets count to 1, and then the while loop checks if count is less than count_to, and prints out count and adds one. It should count up all the way to the number specified in count_to, and then stop once it reaches the number.

You can experiment further with while loops, these are just the basics and while loops can be found in all sorts of Python programs. Enjoy!

How to emulate Raspberry Pi in QEMU

QEMU is an open source emulator that can emulate operating systems from all architectures, including ARM, the architecture of the Raspberry Pi. You can even emulate it on an x86 PC, but it will be slower than on a Raspberry Pi itself since the code is being converted from ARM code to x86 code through QEMU in order to run on the PC. However, it is still nice for trying some Raspberry Pi software and the OS out and even better, you can get a feel of Raspbian and other Raspberry Pi OSes before buying the device itself.

DISCLAIMER: This only works with ARMv6 Pi OSes and only Linux ones. So this won’t work on ARMv7 Linux distros such as Ubuntu MATE and Server, or non-Linux OSes such as RiscOS. While there is a raspi2 machine for QEMU that can run ARMv7 OSes, this machine is still in early development and things such as mouse, keyboard, and internet do not yet work on it, so I will be using an ARMv6 generic machine instead.

First of all, open up a terminal and create a folder for the virtual machine:

mkdir rpi-vm && cd rpi-vm

Next, let’s download the QEMU kernel adapted for Raspberry Pi images

git clone https://github.com/dhruvvyas90/qemu-rpi-kernel.git

Now we need to extract our desired image to the folder. In my case it will be Raspbian Buster Lite, downloadable from here. You can run any Linux ARMv6 OS on it though, provided you use the right kernel in the folder which you can experiment with.

By default, the OS images are very small and only really contain space for the operating system itself.  So, let’s add 4GB of space to the image with the following command:

dd if=/dev/zero bs=1M count=4096 >> 2020-08-20-raspios-buster-armhf-lite.img

Replace 2020-08-20-raspios-buster-armhf-lite.img with whatever your image is called.

We may have added space to the image, but the partitions of the image itself remain the same. So, mount the image as a loopback device with the following command:

sudo losetup -f -P --show 2020-08-20-raspios-buster-armhf-lite.img

Now run gparted /dev/loopX or install the gparted package first if you do not have it installed. Right click on the ext4 partition and expand it to all of the remaining space. Click apply and then close.

Because this kernel is adapted for a virtual machine board, and not a Pi, we must change the fstab so the OS runs well with the kernel. Let’s mount the ext4 root partition with the following command:

sudo mount -o rw /dev/loopXp2 /mnt

Now, let’s edit the fstab file

sudo nano /mnt/etc/fstab

Replace all mentions of mmcblk0p with sda and save. For the image to be compatible with the QEMU VM and kernel, we must also edit another file. Run:

sudo nano /etc/ld.so.preload

Comment out the line and save the file. Then unmount with the following commands:

sudo umount /mnt

sudo losetup -d /dev/loopX

Now, run the VM with the following command:

qemu-system-arm -M versatilepb -cpu arm1176 -m 256 -kernel qemu-rpi-kernel/kernel-qemu-4.19.50-buster -hda 2020-08-20-raspios-buster-armhf-lite.img -append "dwc_otg.lpm_enable=0 root=/dev/sda2 console=tty1 rootfstype=ext4 elevator=deadline rootwait" -dtb qemu-rpi-kernel/versatile-pb-buster.dtb -no-reboot -serial stdio

Of course, if you are running an OS other than Raspbian Buster Lite, you will have to change the image. If you are running an older OS, you may also have to use an older kernel which you can find in the qemu-rpi-kernel folder.

The output should look a little like this:

In my case, I chose to install the LXDE desktop. You can also install a desktop environment if you like, see this for instructions on how to do this with Raspbian Lite.

Here is my setup:

Of course, if running this on an x86 host, it will be slow since QEMU has to translate ARM code to x86 and also because the hardware being emulated itself is slow too. If running on an ARM host with KVM enabled in kernel, it may be faster, but multitasking in the virtual OS and memory intense programs will either way will be a struggle. It’s a nice thing to play around with though, and you can try it with any ARMv6 Pi Linux OS you want. Enjoy!

Python tutorial – How to create basic functions

In Python, a function is a block of code that only runs when it is called later on in the code. Data can be passed into the functions too. One example of a function is print. It runs when it is called in the code, and the text you put inside the bracket is the data being passed into the function.

Continue reading “Python tutorial – How to create basic functions”

Happy 25th birthday to Windows 95!

On this day in 1995, Windows 95 was released. Windows 95 included new features such as the taskbar and start menu, and it was the first version of Windows to run as its own operating system, rather than on top of MS-DOS. It was also the first 32-bit, rather than 16-bit, Windows operating system.

Support for Windows 95 ended, along with several other Windows versions, on the 31st December 2001, however Windows 95 remains a key point in the history of Microsoft Windows.

Here are some pictures of Windows 95:

Windows 95 welcome screen
Paint on Windows 95
Solitare on Windows 95
Internet Explorer on Windows 95
Notepad on Windows 95
Windows 95 startup screen
Happy 25th birthday, Windows 95!

Galaxy Unpacked to take place on 5th August

Galaxy Unpacked, Samsung’s announcement event that happens twice every year, will take place on the 5th August. At Galaxy Unpacked, they are likely to announce the Galaxy Note 20 along other stuff.

The livestream will be taking place at 5pm BST live on the 5th August. This year because of coronavirus, it will only be happening live. You can watch it from Samsung’s website when it starts.

Galaxy Note20

The Galaxy Note20 is expected to be announced at Galaxy Unpacked as the successor of last year’s Note10.

The specs for the Galaxy Note20 are expected to be:

  • CPU: Exynos 990 (Most of the world), Snapdragon 865 (USA, China, Hong Kong, Latin America).
  • RAM: 8GB
  • Screen refresh rate: 120Hz
  • Screen size: 6.42 inches
  • Storage: 128GB
  • Rear cameras: 12MP main, 64MP telephoto, and 12MP ultrawide
  • Battery size: Between 4000mAh and 4300mAh

There is also expected to be a Galaxy Note20 Plus/Ultra with more advanced specs:

  • CPU: Exynos 990 (Most of the world), Snapdragon 865 (USA, China, Hong Kong, Latin America).
  • RAM: 12GB
  • Screen refresh rate: 120Hz
  • Screen size: 6.87 inches
  • Storage: 256GB/512GB
  • Rear cameras: 108MP main, 13MP telephoto, and 12MP ultrawide
  • Battery size: Between 4500mAh and 5000mAh

The Galaxy Note20 is expected to also be the first range of Samsung flagship phones to not have a separate 5G variant and for 5G to be integrated into the main models.

Galaxy Fold

The successor to the Galaxy Fold, which had many issues when released in 2019, is also expected to be announced at Unpacked. The specs are expected to be as follows:

  • CPU: Snapdragon 865
  • RAM: 12GB
  • Screen refresh rate: 120Hz
  • Screen size: 7.7 inches
  • Storage: 256GB
  • Rear cameras: 12MP Quad Camera
  • Battery size: 4500mAh

I certainly hope the Galaxy Fold 2 won’t have the same issues the original one did, and I’m sure many people will be skeptical about this new phablet.

Are you excited for Galaxy Unpacked? I sure am! If you want to watch it live, then go to the Samsung website on the 5th August. I’m excited to see what else Samsung may announce at Unpacked this year.

Apple supporting the iPhone 6S in iOS 14 just shows how far behind Android really is

On the 23rd June at WWDC 2020, which of course due to the current circumstances being held online, Apple announced iOS 14 and iPadOS 14, the new iOS versions. Home screen widgets, no more full screen calls, and a redesigned Siri are just a few of the changes Apple’s new OS includes. The update supports all iPhones as old as the iPhone 6S and iPadOS 14 supports all iPads as old as the iPad Mini 4 and iPad Air 2. This just shows one thing: how far behind Android really is when it comes to better software updates.

Continue reading “Apple supporting the iPhone 6S in iOS 14 just shows how far behind Android really is”

OneUI 2.1 released for Galaxy S9

The OneUI 2.1 update with June 2020 security patch has been released for Galaxy S9 and S9+ phones.

Currently, the update is only available to download in Germany, Taiwan, and Korea, but we can expect to see it roll out to further countries during the coming weeks.

The update includes features such as Quick Share, which is similar to Apple AirDrop; Music Share, which allows you to share your phone’s Bluetooth audio connection with other devices; and in the camera app, there are a ton of new features too including Single Take as well as the pro video mode removed in OneUI 1.0 making a comeback.

With the update also comes a new AR Zone app which puts all the great AR camera features of the Galaxy S9 in a single app.

These are just a few of the many features the S9 has received in the OneUI 2.1 update. However, the update is currently not available in many countries but hopefully will roll out soon to more countries. The update also includes the June 2020 security patch, so it’s recommended you download it.

Sadly, the S9 will probably not be getting Android 11 when it is released on Samsung phones, as it is still following a strict schedule for software updates with only two major OS upgrades, but this could be a sign that Samsung are reconsidering their two major OS upgrades policy for the future.

If you live in Germany, Taiwan, or Korea, then you can download the update now. Otherwise, you will have to wait a little while but hopefully it will come out soon for more countries and carriers soon, as I and I’m sure a lot of you would love to try it.

When OneUI 2.1 gets released in the UK I will not hesitate to do a review on the update, as it definitely sounds good. For now though, I will just have to wait.

Enjoy the update if you can, and if you can’t get it, then please enjoy it when you do get it.