[RECOVERY] TWRP 2.6.3.0 for Samsung Galaxy S4 Mini LTE (GT-I9195)

johanneszab

Senior Member
Jun 3, 2010
54
43
0
UPDATE: Do not flash cm-11 roms with the current stable version (2.6.3.0) of TWRP. It won't work. I will create new builds for the I9195 and the I-9190 after someone this issue.

Hi!

I've compiled a TWRP 2.6.3.0 for the Samsung Galaxy S4 Mini LTE (GT-I9195) with crypto support. I've attached a screencapture during an installation of an cyanogenmod update from my encrypted /data partition using goomanager. So i thought, maybe someone can use this because i didn't find any build for the device yet.
I'm not sure if you can use it with encrypted stock samsung roms (I've included some samsung libs, but i couldn't test it), but for cm it should work. And any unencrypted devices..

Should work for the GT-I9190 and GT-I9192 as well, as written on page 4.

Installation as usual (Odin (tar.md5.zip - needs to be unzipped) or Heimdall (.img)):

For Odin:
  • Download the recovery-twrp-2.6.3.0-serranoltexx.tar.md5.zip and unzip it
  • Turn off the phone.
  • Press and hold home, volume down and power. Download screen should appear.
  • Connect USB cable, and press volume up
  • Start Odin, uncheck "F. Reset Time" and "Auto Reboot", and then click AP button.
  • Select extracted "recovery.tar.md5" file and press Start button.
  • A blue transfer bar will appear on the device showing the recovery being transferred. Check the Message Window in Odin for: "All threads completed. (succeeded 1 / failed 0). The transfer has successfully completed.
  • Long press the power botton to turn it off.
  • Hold volume up, home button and power buttons simultaneously to boot into recovery mode.

Sorry, i couldn't post in the Developer Forum and no direct links (< 10 Post for me). And a special thanks to @Dees_Troy for helping me getting the right crypto options.
I hope the image works, first time building a TWRP for me. At least it won't brick your device ;)

_____________
Edit 18.09.2013. (Already Fixed) If the screen locks in the recovery after a few minutes idle (without userinput), the screen gets greyish after the unlock, but the recovery still seems to work properly (see post #4 for image). I've asked in the twrp channel on freenode and tried a fix, that didn't help. :(. So, it seems more cosmetic. I wonder if someone else gets this, because they said in the channel, they've never seen something like that before.

_____________
Edit 19.09.2013: Sourcecode with my modifications here: https://github.com/johanneszab
Its mainly the BoardConfigCommon.mk and recovery.fstab for TWRP and enryption in the msm8930-common repo and the crypto libs in the recovery directory in the serranoltexx repo.

_____________
Edit 20.09.2013: New recovery.img without Screentimeout, so no more messed up screen after screenlock.

_____________
Edit 28.09.2013: Added SELinux and exfat and removed USB-OTG Support. Recovery should be ready for Android 4.3 with this settings. You won't lose SELinux contexts if you should ever make a backup and then restore it. Thanks to @Dees_Troy for the SELinux informations!

_____________
Edit 19.10.2013: Recreated, reuploaded and tested .tar.md5.zip file with odin since i somehow completely ****ed it up (post #12 and so forth). I'm so sorry for all those broken files without testing and thanks for the Info!

Code:
 $ md5sum recovery-twrp-2.6.3.0-serranoltexx.img
9262c28bf81632c66ff1133d6078c8c6  recovery-twrp-2.6.3.0-serranoltexx.img

 $ md5sum recovery-twrp-2.6.3.0-serranoltexx.tar.md5.zip
e5014d5e230a5bb1103771b30dd2a159  recovery-twrp-2.6.3.0-serranoltexx.tar.md5.zip
 

Attachments

Last edited:

johanneszab

Senior Member
Jun 3, 2010
54
43
0
Can I confirm that an alternative to heimdall would be using Odin to flash, as we used to with CWM?
Yap, I think that should work. I've read that heimdall is just an open source replacement for odin and i used heimdall because i've followed the cyanogenmod install instruction for the serranoltexx. They flashed the cwm-recovery with heimdall and it worked. So, i think, it will do it :)

Its my first samsung device, i've just got it 2 weeks ago, and for my old N1 there wasn't much flashing lately.. so many changes for me ;)
 

ratelutz

Senior Member
Jan 23, 2010
600
77
48
Can I confirm that an alternative to heimdall would be using Odin to flash, as we used to with CWM?
in odin it is not possible to select an .img file fpr flashing. i found this thread that discribes how to convert a .img to an odin flashable file

edit: i converted the file and flashed it successfully with odin. recovery works. i did a backup => ok
two issues / questions:
1) the graphic gets messed after the screen goes off ( i cant supply a screenshot right now)

2) backups going to the internal sdcard. is it possible to change the backup path to the external sdcard? - found it myself

finally i took a screenshot can you please check this
 

Attachments

Last edited:

johanneszab

Senior Member
Jun 3, 2010
54
43
0
edit: i converted the file and flashed it successfully with odin. recovery works. i did a backup => ok
two issues / questions:
1) the graphic gets messed after the screen goes off ( i cant supply a screenshot right now)

2) backups going to the internal sdcard. is it possible to change the backup path to the external sdcard? - found it myself

finally i took a screenshot can you please check this
Ah, thanks for clarifying odin for me :)

Okay, since i'm not the only one with that screentimeout issue, i've modified the image and completely disabled it for now. I think it's anyways not really necessary in a recovery. Well, as it seems to only happen with the S4 mini and happened to you as well, it's maybe driver/chipset related and would take some more time to fix. And i'm not so much into that code..

I reuploaded the image in my first post. Works fine for me now.
 

labbe-

Senior Member
Jun 4, 2012
535
250
0
Turku
Iirc, Mobile Odin is capable flashing .img files? Going to test it after i switch roms and report back.

E: Ah, silly me, should've known our device is not supported by Chainfire :(
 
Last edited:

johanneszab

Senior Member
Jun 3, 2010
54
43
0
Iirc, Mobile Odin is capable flashing .img files? Going to test it after i switch roms and report back.

E: Ah, silly me, should've known our device is not supported by Chainfire :(
Okay, i used these simple 3 steps to make that .zip into a .tar.md5 and attached it in my first post:

Code:
$ tar -H ustar -c recovery.img > recovery.tar
$ md5sum -t recovery.tar >> recovery.tar
$ mv recovery.tar recovery.tar.md5
Hope that file works with Odin now.
 
Last edited:

Battlehero

Senior Member
Aug 3, 2013
2,857
3,752
203
London
www.youtube.com
Can I flash CyanogenMod with this?

My question is that can I flash CyanogenMod with this recovery as in the installation of CyanogenMod it says only install with
"Use ClockworkMod Recovery.
Warning: Only use this recovery to flash CM-10.2. Otherwise, you risk bricking your phone!"
I just wanted to clarify.
 

btnetro

Senior Member
Jul 22, 2013
193
51
0
This is very interesting when I try to flash it via odin, odin stops responding and I have to close it.

Nevermind used heimdall and flashed it. The long awaited twrp is here. I made several post asking for this and I love it. Finnaly a real useful recovery
 
Last edited:

ne0zone75

Senior Member
May 25, 2013
1,400
2,749
0
Can I confirm that an alternative to heimdall would be using Odin to flash, as we used to with CWM?
Yes you can confirm that this build of TWRP is an alternative to CWM through Odin :D BUT the provided .tar.md5 crash Odin everytime !

The solution i've found is : (Linux required...)
-> download the .img file attached to this post and rename it to recovery.img
-> then create the .tar.md5 from the previous file using this code :

Code:
tar -H ustar -c recovery.img > recovery.tar
md5sum -t recovery.tar >> recovery.tar
mv recovery.tar recovery.tar.md5
Code which has already been given by @johanneszab on his post !

I have then an Odin flashable & working TWRP build ... i can attach it to this post if anybody wants to ;) I've tested it a little bit : partitions successfully seen, wiped cache & dalvik and finally backed up stock SAMSUNG ROM OK :thumbup:

Have a nice day :)

Tapatalked from my TF300T

PS : Great work @johanneszab :thumbup:
 
Last edited:

ladislav.heller

Senior Member
Apr 25, 2012
837
513
113
Bratislava
Yes you can confirm that this build of TWRP is an alternative to CWM through Odin :D BUT the provided .tar.md5 crash Odin everytime !

The solution i've found is : (Linux required...)
-> download the .img file attached to this post and rename it to recovery.img
-> then create the .tar.md5 from the previous file using this code :

Code:
tar -H ustar -c recovery.img > recovery.tar
md5sum -t recovery.tar >> recovery.tar
mv recovery.tar recovery.tar.md5
Code which has already been given by @johanneszab on his post !

I have then an Odin flashable & working TWRP build ... i can attach it to this post if anybody wants to ;) I've tested it a little bit : partitions successfully seen, wiped cache & dalvik and finally backed up stock SAMSUNG ROM OK :thumbup:

Have a nice day :)

Tapatalked from my TF300T

PS : Great work @johanneszab :thumbup:
Did you also a restore from backup. Worked the phone well after restore?
 

ladislav.heller

Senior Member
Apr 25, 2012
837
513
113
Bratislava
Is it possible to flash recovery-twrp-2.6.3.0-serranoltexx.img via dd command directly from Terminal Emulator?
Anybody tried?

The command should be something like this:
dd if=/sdcard/recovery-twrp-2.6.3.0-serranoltexx.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery bs=512

But I am not sure whether the above is correct.
 
Last edited:

Keon91

Senior Member
Jun 25, 2010
178
28
0
hmm, strange stuff :). Thanks for that info! I had even checked md5sums and the command history for the file. Didn't test it with odin though, still haven't it installed. So, i recreated the file, maybe this time it works, ..
Odin still craches right afther you hit "start"....

EDIT:

Installed the recovery using heimdall, but I'm still not able to mount the USB-OTG....

Does anyone have the same problem, have the same with CWM-recovery?
 
Last edited:
  • Like
Reactions: johanneszab

johanneszab

Senior Member
Jun 3, 2010
54
43
0
Odin still craches right afther you hit "start"....

EDIT:

Installed the recovery using heimdall, but I'm still not able to mount the USB-OTG....

Does anyone have the same problem, have the same with CWM-recovery?
I'm so sorry for those crap odin files :(. I'm going to install odin now, make a third new image and flash it once to make sure it works. This is so strange because those 3 commands are no brainer :). Maybe ubuntu messed up their tar .. i don't know :/.

I've turned off USB-OTG in the build, because i thought that the S4 Mini doesn't support it (and it depends on some hardware?!). I've no clue about USB-OTG, but i've read in the forums here in some posts that the S4 Mini doesn't support it and i couldn't try it in my first builds that included USB-OTG, because i don't have any hardware for it, ..
 

ne0zone75

Senior Member
May 25, 2013
1,400
2,749
0
I'm so sorry for those crap odin files :(. I'm going to install odin now, make a third new image and flash it once to make sure it works. This is so strange because those 3 commands are no brainer :). Maybe ubuntu messed up their tar .. i don't know :/.

I've turned off USB-OTG in the build, because i thought that the S4 Mini doesn't support it (and it depends on some hardware?!). I've no clue about USB-OTG, but i've read in the forums here in some posts that the S4 Mini doesn't support it and i couldn't try it in my first builds that included USB-OTG, because i don't have any hardware for it, ..
As i posted above, i've created successfully a flashable Odin file using your IMG one AND i used Ubuntu 12.04.3 x64 to perform this so Ubuntu is not involved in the difficulties you're facing for creating a working TAR.MD5; i'd like to suggest that those difficulties are maybe caused by the filename you give to the input / output of your shell commands ... in my experience they have to be the same and short (only filename extension differs of course).

That said you did a really great job with your TWRP build :thumbup: ... i know this is a difficult task to build one ;)

PS : I still do not have tested the restore process of my device's nandroid backup i made earlier this week using your TWRP build ...

Tapatalked from my TF300T
 

Keon91

Senior Member
Jun 25, 2010
178
28
0
I'm sorry , I don't mean usb-otg but how can I Mount my storage sdcard and / or internal storage to my pc, trough USB?

Sent from my GT-I9195 using xda app-developers app