Flashing and Rooting a Samsung Galaxy S4 from Linux

I recently found need to update the OS on an old Samsung Galaxy S4 (GT-I5905) from the stock Android 7 to Android 11 (if you're interested, it was for this).

I decided to use LineageOS as the phone's new Android distro and also installed Magisk to root the phone so that I could install a custom CA certificate into the system root store.

This short post details the process of using a Linux laptop to flash Lineage OS onto a Samsung Galaxy S4 before loading the Google Apps, rooting with Magisk and installing a custom CA certificate (you don't need to do that bit).

If you're running Windows or a Mac, the process should be much the same, but you'll need Windows/Mac versions of the tools instead.

Note that this process will wipe any existing data, so be sure to take a backup first.

You'll need your phone, a Linux laptop and a USB cable.

Read more…

Password Manager Can't Autofill on Xiaomi Android Devices

Like many others, I store my credentials in a password manager.

I previously used KeepassXC but have since migrated most credentials over to 1Password because of the ability to share vaults (this forms part of my approach to avoiding lockout, as well as helping ensure continued access if something nasty were to happen to me).

There isn't/wasn't an Android build of KeepassXC, so I was using the Keepass2Android app on my phone.

Although very good password managers, both Keepass2Android and 1Password encountered issues on my Android phone.

Both apps worked flawlessly, initially, but at some point their respective integrations stopped working and it was no longer possible to have them insert credentials into login forms for me. Instead, I had to switch into their app, copy the credentials to the clipboard, switch back to the browser and attempt to paste (hoping that the site I was on hadn't stupidly disabled paste on it's login form).

The broken behaviour was quite odd, a prompt would still be shown detailing available and relevant credentials

Screenshot of 1Password listing available credentials for a login form

Selecting an option did nothing, credentials weren't filled and choosing Open 1Password didn't result in the app being opened.

I tried variations, but it didn't work even if I logged into the password manager app first. Inter-app communication clearly worked, because the prompt always showed options relevant to the current page, it just seemed unable to push passwords into the form.

This post details the cause and the annoyingly simple fix for this issue.

Read more…

Xiaomi MIUI "Can't Connect To Internet" on Wireless Network

Google's Android OS used to have an annoying feature - smart network switch - which would inevitably lead to it sitting there, not using your wireless network, displaying the message "No network access".

This usually happened as you got home, because it had picked up your wifi at the very extreme edge of it's reach, and the test probes had failed as a result.

The functionality works by placing some test HTTP requests when connected to a wifi network - if those requests fail, it's considered that the wifi doesn't have network access. This (fairly flawed) methodology doesn't properly account for a range of possible failures in the test itself.

 

Read more…

Asus Nexus 7 Charger Port Repair

The ASUS/Google Nexus 7 suffers from an issue where the USB charging port wears out, so the charger no longer makes proper contact and the device won't charge. The headphone socket (which is on the same board) can also fail.

In order to repair this, a small board must be replaced (which will mean replacing the headphone port as well). Replacement boards are available on Amazon for about £8. It's a pretty straightforward process, and doesn't require any special tooling.

This documentation will walk you through the necessary steps (there's a video at the bottom for those who'd prefer a video guide) to remove the old USB charging port and install a new one.

 

Read more…

Android: Protecting your network data from local snooping

There's been a lot of news of late about the likes of NSA and GCHQ passively listening to Internet traffic. The steps in this post won't protect you from such a well resourced attacker, but will prevent others on open wifi networks and your mobile data provider from looking at the content of your phone's network traffic.

A good example of the data that can easily be collected can be seen in this recent Ars Technica post.

In this post, we'll be configuring an Android phone to conditionally connect to an OpenVPN server, dependant on whether it's associated with a specific WLAN

 

Read more…

Howto root the Samsung Galaxy S2 from Linux

One of the first things I do when I receive an Android phone is to root it, primarily so that I can use OpenVPN but it does carry some other benefits (including getting rid of the rubbish the carrier installs on your behalf!). This documentation has been sitting in my to-do pile for a little while, but for any looking to root a Samsung Galaxy S2 from a Linux machine, I hope it's of help (I know my article on rooting the Sony Xperia has been well visited!). 

Read more…

Removing pre-installed Apps from a rooted Android Phone

So I've got a newly rooted Xperia X8, and it's time to get rid of the useless apps that Three UK have decided to foist on users!

Irritating as it may be, thankfully it's an incredibly simple process!

 

The Apps I want to remove are;

  • Spotify
  • Roadsync
  • Foursquare
  • Postcard
  • Wisepilot
  • All other Three related garbage

 

There are but two requirements before we can begin the process;

  • Phone must be rooted
  • BusyBox must be installed (if you haven't installed it yet, grab it from Android Market)

 

Assuming the pre-requisites are fulfilled, go back to Android Market and search for Titanium Backup, there should be a free app called "Titanium Backup (root)". Download and install it, then once installation is complete run the app.


Note: You are more than able to brick your phone if you remove the wrong app. Be very, very careful!

 

  • Choose the button at the top - Backup/Restore
  • The Apps are listed in alphabetical order so scroll down to the first that you wish to remove (I hit Foursquare first)
  • Select the app and a dialog will appear, choose "Uninstall App"
  • Confirm that you wish to remove it (and you know the risks of removing the incorrect thing)
  • The App is removed, repeat for all the rubbish that your provider has installed!

 


Note: You are more than able to brick your phone if you remove the wrong app. Be very, very careful!

Finding the Application

Removing the application

 

Howto root the Sony Erricson Xperia X8 (Android 2.1) from Linux

I recently bought a new X8, and unlocked it from Three. Unfortunately, when branding the phone they decided to install all manner of crud that the user won't necessarily need. Apps such as Spotify load whether you want them to or not, and there's nothing you can do about it!

Well, nearly, you can root the phone and then uninstall the problem apps.

There's plenty of guides out there on how to root the X8 from Windows, but information regarding Linux and Mac systems is much harder to find! Let's begin;

  • Download and install the Android SDK
  • Create a folder (in your home directory) called X8_root
  • Download SuperOneClick (below) - Credit to XDA Developers
  • Save SuperOneClick to our new folder

Open a BASH shell and run the following commands

/home/$USER/X8_root
unzip SuperOneClickv1.9.1-ShortFuse\[1\].zip
cd SuperOneClickv1.9.1-ShortFuse\[1\]/

Now switch on your phones USB Debugging mode (Settings --> Applications --> Development --> USB Debugging)

Unmount the SD Card (Settings --> SD Card --> Unmount SD Card)

Connect your phone to the computer using the USB lead, when the phone asks chose "Charge Phone".

Now back to BASH;

adb push Exploits/psneuter /data/local/tmp/psneuter
adb push Root/su-v2 /data/local/tmp/su                          # See Note 1 below
adb push Root/superuser.apk /data/local/tmp/superuser.apk
adb shell
cd /data/local/tmp
chmod 755 psneuter
./psneuter

Once this has run, the adb shell will close and you'll need to reconnect;

adb shell
cd /data/local/tmp
mount -o remount,rw -t yaffs2 /dev/block/mtdblock0 /system
cat su > /system/bin/su
cat superuser.apk > /system/app/superuser.apk
chmod 06777 /system/bin/su
chmod 777 /system/app/superuser.apk
reboot # See Note 2 below

Assuming all went well, your phone is now rooted. When it reboots, you should see a new menu item called "Superuser". The easiest way to check that you've gained root access (as you'll probably need to install this anyway) is to access Android Market and install BusyBox. Once it's downloaded, run the BusyBox Installer app from your menu and follow the instructions, it'll soon tell you if you don't have root!

You can now enjoy the benefits of having root access, such as removing those irritating pre-installed apps!

 

Notes

  1. The Zip file contains three versions of su (su-v1, su-v2 & su-v3). I originally used su-v1 but couldn't gain root access, you may find the reverse. The easy way to find out is to run the command in Note 2, and if necessary adapt the push command to push one of the other versions
  2. To check that you've installed the correct version of su, you can run one other command before issuing the reboot command;
    su
    if you are returned to the shell, you are good to go and can run reboot. If, however, you receive an error like this

    reloc_library[1245]:  2381 cannot locate '_ZNK7android6Parcel15setDataPositionEj'...CANNOT LINK EXECUTABLE

    you need to use one of the other versions of su stored within the Root folder.
  3. Although I've not tested it, this process should work for Mac users as well, in fact with a little tweaking there's no reason it shouldn't work on Windows (although the ZIP file also contains the easy one-click method for Windows users)

 

File: SuperOneClick.zip