Trying to purchase Galaxy S4 Mini (GT-I9195) I received S4 Mini Plus (GT-I9195I) from online retailer. After some consideration I decided to treat this as a challenge and not to return the purchase. Here is what I learned so far about hacking this tiny piece of electronics:
Getting Root
I was not able to get root on the firmware installed on the phone (I9195IXXU1AOB1). The way I fixed that was to download another firmware from SamMobile and flashed it with Kies. The highest version I was able to flash without issues was I9195IXXU1AOD2, and it immediately updated to I9195IXXU1AOG1. For both versions latest KingRoot worked just fine. SuperSu Me fixed all the damage KingRoot did, replacing it with proper SuperSu. This did not trip Knox device status, BTW.
Flashing Custom Recovery
I downloaded official TWRP recovery from teamw.in and decided to go the hard way and install the recovery doing dd fom command line (ConnectBot) - I was hoping this will help me to keep the warranty. Worked just fine, but tripped Knox bit nevertheless. NB: avoid extra hassles and just use Odin to install recovery.
Installing Xposed
Xposed install sent my device into boot loop. Fixing permissions from recovery allowed me to boot, but gapps was having permanent ANRs. Upon investigation it looks like Xposed for KK is not designed to take selinux enforcing mode into account. Specifically it installed app_process with wrong security context making device unbootable. The fix is very simple:
1. Install Xposed Installer and ES File Explorer.
2. Open Xposed Installer, go to Framework menu, select "Recovery (write zip to SD card, flash manually)" Installation mode, press "Install/Update".
3. Open ES File, navigate to /sdcard/Andriod/data/de.robv.android.xposed.installer/files. There are two files there: Xposed-Installer-Recovery.zip and Xposed-Disabler-Recovery.zip
4. Now comes the fun part: in both archives you need to modify META-INF/com/google/android/update-binary: comment or delete all "chmod", "chown" and "restorecon" commands and replace "cp XXX/app_process[.orig] XXX/app_process" with "cat XXX/app_process[.orig] > XXX/app_process". This will keep both permissions and security context of the file. Unpack, edit, repack.
5. Reboot into recovery, install Xposed-Installer-Recovery.zip, enjoy.
I will send patch to Xposed maintainer later this week. But we have not seen new releases of Xposed fo KK for over a year now, so I am not sure it will get released any time soon.
I will update the post as my adventures continue - my plan is to have CyanogenMod on this device some day. Stay tuned.
Getting Root
I was not able to get root on the firmware installed on the phone (I9195IXXU1AOB1). The way I fixed that was to download another firmware from SamMobile and flashed it with Kies. The highest version I was able to flash without issues was I9195IXXU1AOD2, and it immediately updated to I9195IXXU1AOG1. For both versions latest KingRoot worked just fine. SuperSu Me fixed all the damage KingRoot did, replacing it with proper SuperSu. This did not trip Knox device status, BTW.
Flashing Custom Recovery
I downloaded official TWRP recovery from teamw.in and decided to go the hard way and install the recovery doing dd fom command line (ConnectBot) - I was hoping this will help me to keep the warranty. Worked just fine, but tripped Knox bit nevertheless. NB: avoid extra hassles and just use Odin to install recovery.
Installing Xposed
Xposed install sent my device into boot loop. Fixing permissions from recovery allowed me to boot, but gapps was having permanent ANRs. Upon investigation it looks like Xposed for KK is not designed to take selinux enforcing mode into account. Specifically it installed app_process with wrong security context making device unbootable. The fix is very simple:
1. Install Xposed Installer and ES File Explorer.
2. Open Xposed Installer, go to Framework menu, select "Recovery (write zip to SD card, flash manually)" Installation mode, press "Install/Update".
3. Open ES File, navigate to /sdcard/Andriod/data/de.robv.android.xposed.installer/files. There are two files there: Xposed-Installer-Recovery.zip and Xposed-Disabler-Recovery.zip
4. Now comes the fun part: in both archives you need to modify META-INF/com/google/android/update-binary: comment or delete all "chmod", "chown" and "restorecon" commands and replace "cp XXX/app_process[.orig] XXX/app_process" with "cat XXX/app_process[.orig] > XXX/app_process". This will keep both permissions and security context of the file. Unpack, edit, repack.
5. Reboot into recovery, install Xposed-Installer-Recovery.zip, enjoy.
I will send patch to Xposed maintainer later this week. But we have not seen new releases of Xposed fo KK for over a year now, so I am not sure it will get released any time soon.
I will update the post as my adventures continue - my plan is to have CyanogenMod on this device some day. Stay tuned.