Or as an alternative title “Liberating your Galaxy S4 Hardware from Samsung Bloatware”.
Unfortunately there is lots of (ad-infested) blogs and forums with dodgy pieces of information on this topic and I found it pretty hard to get descent concise information. So hopefully this might help some poor Linux User liberate their phone. Whilst this has been tested on a Samsung GT-I9505 S4 International LTE device (JFLTEXX series) it should be applicable to other similar Samsung phones that are not fastboot capable (ie. all but the Galaxy Nexus range).
NOTE: If you have encrypted your device do yourself a favor and do a factory reset BEFORE you start the process (otherwise you will be stuck in a boot-loop as the encryption key will be gone and the device will not start without it). See note below to recover to stock Samsung image if you need to.
This area is the hardest to get decent (Ubuntu relevant) information. However (contrary to some forum entries out there) Heimdall is the most workable solution to use from Ubuntu – binary .deb packages are available from https://bitbucket.org/benjamin_dobell/heimdall/downloads. There is both a commandline package as well as a GUI available for Ubuntu 12.10 and 13.04 as well as other Linux distros.
Make sure the device has Developer mode enabled
- Go to Application > Settings.
- In the upper-right corner of your screen, tap on “More” button.
- Navigate to the bottom and select About.
- Tap “Build number” several times until you see a message that says “Developer mode has been enabled“.
- Tap the Back button and you will see the Developer options menu under the “System” heading, you can now set Developer options.
- Check the USB debugging box under Developer options and you are ready to use your Samsung Galaxy S4 in debugging mode.
A very big THANK YOU to Benjamin Dobell from Glass Echidna. Can’t comment on the blog – your work is much appreciated.
Flash cf-auto-root images
Download the I9505 images from http://autoroot.chainfire.eu/ and extract.
Boot the device into download mode (Press POWER ON + VOLUME DOWN + HOME simultaneously and then when the green Android appears VOLUME UP)
This part took me a while to get right as there was not a lot of decent information around (NOTE: CASE-sensitive PIT partition name). You also need to have the “–no-reboot” flag as you need to boot straight into recovery as a reboot will revert back to the Samsung recovery image.
heimdall flash --no-reboot --RECOVERY recovery.img --CACHE cache.img.ext4
Reboot manually into Recovery Mode (Press POWER ON + VOLUME UP + HOME simultaneously) and the rooting process should complete.
Install Recovery Image
As per recommendation from the XDA Forums I used PhilZ recovery. The GT-I9505 files are at http://d-h.st/users/philz_touch/?fld_id=16685#files
Extract the recovery.img file from the ZIP and flash the recovery partition
heimdall flash --no-reboot --RECOVERY recovery.img
Install AOSP Google Play Edition
Boot into the Touch Recovery Boot (Press POWER ON + VOLUME UP + HOME simultaneously) and load the following file with
adb sideload 20130629-GoogleEdition.zip
If you are stuck with an error message that reads: error: closed
: Google Play Edtion ROM’s did not work for me (no data connection other than WIFI) – would be great to hear if this works for other people with Australian radios. Ended up using PAC Man ROM – https://plus.google.com/communities/103029729817409918322
which appears the most stable AOKP style firmware. So far looks good – no bloat & squishy noises !
: Since the PAC Man ROM had problems with audio on some calls I have switched back to an AOSP Google Play Edition ROM. I have in the meantime worked out that the reason the original Google Play Edition install did not work was simply the missing APN settings for Telstra. D’oh!! I am now running the 4.3 S4 Google Edition ROM from: http://forum.xda-developers.com/showthread.php?t=2348272
Here is the TELSTRA (Australia) APN Settings:
Name: Telstra Internet
MMS Proxy: 10.1.1.180
MMS Port: 80
Authentication Type: CHAP
APN Type: default,mms
Reverting back to Samsung Stock ROM
If there are no backups you need to download the Stock ROM’s from http://www.samfirmware.com/ or similar site
heimdall flash --no-reboot --RECOVERY recovery.img --BOOT boot.img --SYSTEM system.img.ext4 --CACHE cache.img.ext4 --HIDDEN hidden.img.ext4
Note: you need to boot into recovery mode and do a facory reset to remove device encryption completely.