yashsingh1/xdaforums huggingface dataset:
[AT&T Samsung Galaxy S 4 Android Development] <*{{{{{{><:
Hello,

The problem with the 3x builds available on twrp.me is that they are not properly patched with the loki exploit. This is required in order for the recovery to not be rejected by the bootloader. The fix is simply patching the recovery image using the loki tool and procedure located here.

Here is a link to the image I patched for my own phone. If you're on the MDL bootloader, hopefully this will work for you too.

https://www.4shared.com/file/dQyYDi4sce/TWRP_302-0_jflteatt_patched.html
[AT&T Samsung Galaxy S 4 Android Development] duckredbeard:
Tried to use TWRP app to update to latest 3.0.2-0 and got the yellow triangle. After messing around with Odin and Skipsoft kit (and never really doing anything with them) my device finally booted.

I have heard that this yellow triangle has something to do with the loki patch. What was the last known good TWRP for the loki patching of the MDL version?
[AT&T Samsung Galaxy S 4 Android Development] mattgyver:
It's something to do with the TWRP official builds. If you use JDCTEAM's TWRP 3 build, you'll be fine. TriangleAway would be your best bet, if you wanted to get rid of the padlock and 'custom' text on boot.

Sent from my TARDIS
[AT&T Samsung Galaxy S 4 Android Development] <*{{{{{{><:
Where did you hear that? Possibly from the post directly above yours?

From TWRP.me, the last patched version is 2.8.7. Both 2.8.4 and 2.8.7 should work for flashing current ROMs. The functionality that you won't have is stuff like F2FS support and earlier versions have issues with encryption. You can also use either of these versions to get back to a working recovery from loading the unpatched/unsigned version of 3.0.2-0 from TWRP.me that breaks the phone.

If you would like to use 3.0.2-0, I would suggest that you try flashing the patched image that I posted above. Otherwise, 0p3nsrc's suggestion of JDC's build (3.0.0-0) will work, as will the previous versions mentioned above.

I forgot to mention that you will need to hold down power and volume down to boot the phone into download mode, and then cancel download mode in order to get out of your broken recovery and boot the system. Once you are back in your ROM, you can use flashify to flash one of the 2.8.x builds. If you are fine using Odin, feel free to just flash the image you want directly without doing those steps.
[AT&T Samsung Galaxy S 4 Android Development] mattgyver:
As someone who's used his patched version, I can tell you that's the one to use, if you want to keep with TWRP official. The JDC one, while 3.0.0-0, does have patched code for f2fs support.

Sent from my TARDIS
[AT&T Samsung Galaxy S 4 Android Development] <*{{{{{{><:
Actually, I'm glad you said that because I wasn't sure it would work for others.

The loki tool uses your phone's aboot to insert insecure code into the recovery/system image that you are patching. As I don't have a lot of experience, I wasn't sure if aboot was device specific or not - good news!
[AT&T Samsung Galaxy S 4 Android Development] bidomo:
I have a i337m upgraded to 5.0.1, can I still downgrade or do something to get TWRP? I've read somewhere you can't if the phone is updated/upgraded
[AT&T Samsung Galaxy S 4 Android Development] <*{{{{{{><:
The i337M is the Canadian version of S4 otherwise known as 'jfltecan'.

I do not believe it has a locked bootloader. Therefore, you should be able to flash a custom recovery via Odin without any additional effort. Please make sure that you use a recovery that is compatible with jfltecan - this is the jflteatt thread so

do not

use something from here.

The link to the TWRP download page for jfltecan:

https://twrp.me/devices/samsunggalaxys4canada.html

Edit:

One more thing, if your device is still under warranty, you will almost certainly trip Knox by flashing a custom recovery or custom ROM, thus voiding the warranty. This may not be a big deal for you, but to some people it is, you have been warned!
[AT&T Samsung Galaxy S 4 Android Development] <*{{{{{{><:
As with all of the 3X builds, the new version 3.1.0-0 is

not

patched with loki, and will fail signature verification by the bootloader.

If you flash the new version and get the triangle error, in order to boot back to system, press and hold power to manually restart the phone, and hold the volume down button simultaneously. This will boot you into the Download Mode prompt, choose volume down again to cancel and restart the phone. The phone should then boot the OS normally (though you will still have a broken recovery).

If anyone would like to use the new version, I have loki patched the 3.1 version, and it is available at this link. It is an image file so it can be flashed by Odin, or from an older version of TWRP (such as 2.8.7) by clicking "Install" and then "Image".
[AT&T Samsung Galaxy S 4 Android Development] Xenotrumpet:
You say you can flash images through Odin, but where exactly do you flash it? I tried to flash the image on my AT&T S4 on MDB through AP and it won't find the image, it'll only search for tars.
[AT&T Samsung Galaxy S 4 Android Development] <*{{{{{{><:
Oops - minor oversight. :)

There is now a tarball there for you.
[AT&T Samsung Galaxy S 4 Android Development] ThePublisher:
Downloaded the twrp app from the website and flashed the newest version 3.1. Now my device says unlock and that I have modified software not authorized by ATT, and I can't get to twrp or the rom I just installed. Awesome!

I see on your website it says I can't flash twrp via Odin. When I try to flash the 3.1 tar in pda I get a fail.

So how do I get back to working if I can't use Odin but can only get to download mode?

UPDATE: I am able to get back to into the rom by rebooting out of download mode. I've flashed both 3.1 files and tried 3.0.2 (I think that was next) and all the same result. Can't boot into twrp anymore. Please help.
[AT&T Samsung Galaxy S 4 Android Development] <*{{{{{{><:
Please read like the last 10 posts.
[AT&T Samsung Galaxy S 4 Android Development] ThePublisher:
Hahaha yes thank you. In my immediate frustration last night I didn't do my normal reading. Problem solved.
[AT&T Samsung Galaxy S 4 Android Development] Aqua1ung:
Unbelievable! Someone please modify the OP to state that TWRP 3.1.0-0 is not Lokied, hence please stay the hell away from it!!!!
[AT&T Samsung Galaxy S 4 Android Development] <*{{{{{{><:
Relax... I've done it for you... Image or tarball is here:

https://www.androidfilehost.com/?a=show&w=files&flid=165084
[AT&T Samsung Galaxy S 4 Android Development] Aqua1ung:
Thank you, though that was not my point. No one needs to waste their time and go through this ordeal if the appropriate caveat was posted in the OP!

Anyway, now I need instructions on how to flash recovery using Odin. Care to post a quick link to how this is to be done?

Thanks again.

---------- Post added at 05:01 PM ---------- Previous post was at 04:26 PM ----------

Odin gets stuck at "File Analysis." Any ideas as to what I may be doing wrong? Please help!
[AT&T Samsung Galaxy S 4 Android Development] <*{{{{{{><:
Connect your phone to your computer via the USB cable.

Boot into download mode by holding Volume Down while the phone starts up.

Launch Odin, it should say "<Added!>" in the output window.

Click "AP" and select the tar file.

You can have auto reboot and F-reset Time checked.

Flash it.

It's volume up to boot into recovery versus download mode as the phone is powering up. If you miss it and boot to system, just poweroff and try it again. No rush.
[AT&T Samsung Galaxy S 4 Android Development] Aqua1ung:
Thanks. I think there's something funny about your .tar file, as Odin chokes on it. Could you please post a .tar file of an earlier lokied TWRP recovery, one that is known to be working? Thank you!
[AT&T Samsung Galaxy S 4 Android Development] labamones:
How did you solve the problem ?

I tried different solutions and only I get Downloading mode.
[AT&T Samsung Galaxy S 4 Android Development] ThePublisher:
Read post 1256.

https://xdaforums.com/showpost.php?p=71471220&postcount=1256
[AT&T Samsung Galaxy S 4 Android Development] labamones:
No working for me , I flashed various versions from this page , but when I enter recovery MODE , It always enter to Downloading mode .
[AT&T Samsung Galaxy S 4 Android Development] ThePublisher:
By flash do you mean with odin? I had the same thing going on and put the recovery file from the aforementioned post into the pda slot and flashed. That made everything swell again.

If that isn't working for you I don't know. Perhaps someone with more knowledge can chime in.
[AT&T Samsung Galaxy S 4 Android Development] <*{{{{{{><:
I've loki patched the latest version. Image is available here.
[AT&T Samsung Galaxy S 4 Android Development] mkoev:
just tried flashing latest patched release.on a Samaung Galaxy s4 att with a locked bootloader, but it always reboots into download mode. Bootloader is locked so can't use Odin I guess. I tried using TWRP but no luck. Read on some other threads that flashify does the same thing :( Any help?
[AT&T Samsung Galaxy S 4 Android Development] paintballa628628:
As far as I know att sgh-i337 can't use this we have to use safestrap and a nc1 flasher app... if you go to the goldeye post in development it will guide you in the correct direction to install everything. I would say that rom is best custom rom for att users lollipop unfortunately but rom is very stable.
[AT&T Samsung Galaxy S 4 Android Development] spocko:
Thank you. I have successfully flashed this to my phone (updating from version 2.8.7).

Can you clarify what your loki patch does? Does it cause twrp to auto-loki any kernels that are flashed via twrp , or does twrp itself need the loki patch to be able to run?
[AT&T Samsung Galaxy S 4 Android Development] <*{{{{{{><:
The latter. The bootloader performs a signature check of either the kernel or the recovery, if the check fails you get the unauthorized software screen.

I haven't actually read the documentation for the loki exploit, but from memory I believe loki signs the kernel or recovery with insecure code. It doesn't "pass" the signature check, it just makes it not fail. Samsung, of course, quickly patched this exploit with the MF3 firmware release in July of 2013; and, they will probably never release their signing key to the community. This is what we're stuck with.
[AT&T Samsung Galaxy S 4 Android Development] spocko:
Thanks so much for the explanation.
[AT&T Samsung Galaxy S 4 Android Development] Haphim:
Thank you so much for all the help you've given by doing this.

Any chance we can get a patched version for v3.2.1 or v3.2.2?
[AT&T Samsung Galaxy S 4 Android Development] gorgy76:
recovery tar file

Do you have a tar format for this recovery that you patched? Can you send or attach one if you can. Thank you.
[AT&T Samsung Galaxy S 4 Android Development] y2kyasir:
what if your phones in bootloop or stuck and the only thing you can see on your phone is android system recovery

KOT49H.I337UCUFNB1

the phone wont boot in bootloader so no download page no connectivity to odin previously it did

now when i try to sideload roms i get footer error and signature verification error

one more thing if someone already has a working rom installing twrp safestrap or even through flashfire is relatively easy but *sorry no offense i know you guys put in a lot of effort

how can i get my

s4 sgh i337 atnt to work

given that i can only use the adb or is there any other thing i can do please do help please !
[AT&T Samsung Galaxy S 4 Android Development] sulpher:
Any chance some kind soul could post a Loki'ed version of 3.2?
[AT&T Samsung Galaxy S 4 Android Development] evodon84:
Refer back to the OP, just download goo manager from the Play Store and flash recovery from their. Newb proof.
[AT&T Samsung Galaxy S 4 Android Development] hyghonryce:
Something like that. my time was off and everything.
[AT&T Samsung Galaxy S 4 Android Development] geoldr:
This is due to the phone not having some kind of time chip, the time is set in software in the ROM. Something like that. Same problem on S3.

But anyways, to the guy having the error device not found 1) Are USB drivers installed? 2) Is USB debugging turned on?

And I would also like to know, if we make a backup in TWRP, does that have to be loki unlocked as well or can we just restore?
[AT&T Samsung Galaxy S 4 Android Development] david.degraw54:
The one that will flash is the one with the loki patch correct?
[AT&T Samsung Galaxy S 4 Android Development] hyghonryce:
just download Goo and it will automatically download it for you. just follow the instructions. on the OP.
[AT&T Samsung Galaxy S 4 Android Development] evodon84:
Yes goo manager will get you the correct version.

sent from tapatalk
[AT&T Samsung Galaxy S 4 Android Development] david.degraw54:
I just downloaded it and it said it flashed and then I rebooted and held down power and volume up and it booted up the phone..

Edit: it said recovery booting... then booted up my phone like normal
[AT&T Samsung Galaxy S 4 Android Development] evodon84:
With the phone off, hold volume up and power. Once it vibrates release power but continue holding volume up until you reach recovery.

If it didn't work then I'm not sure as I used romracers method. I had wondered how just getting it from goo would work unless it is also including Loki_flash witch is also required.

Try my method above it was easy if you can't get it to with straight through goo

sent from tapatalk
[AT&T Samsung Galaxy S 4 Android Development] david.degraw54:
That worked but I was definitely not in TWRP..didn't look like the pictures in the OP plus I had no option to make a backup
[AT&T Samsung Galaxy S 4 Android Development] RiNo808:
I just tried to dl the recover via goomanager and it is saying that there is no recovery found for my device... any suggestions?
[AT&T Samsung Galaxy S 4 Android Development] AxAtAx:
wow, the backup is 1.66g HUGE is this normal?...oh well, still happy.
[AT&T Samsung Galaxy S 4 Android Development] schollianmj:
ok, I just want to check that Im doing this right so as to NOT brick my phone...

Open Goo Manager

tap flash roms

tap find one for me

app asks if Im sure I want to do this? This will download and write a recovery image to your device.

Click yes

that is all there is to it to get twrp Loki version on my phone?

I read DJBliss's post about loki, and am even more confused as to what to do...

Help?:angel:
[AT&T Samsung Galaxy S 4 Android Development] rpcortazar:
Fel.

great job, congratulations
[AT&T Samsung Galaxy S 4 Android Development] brojoe11:
+1

I used GooManager and I have regular stock recovery, not TWRP...:confused::confused::confused:
[AT&T Samsung Galaxy S 4 Android Development] evodon84:
No you when in Goo, hit menu then install openrexoveryscript and select yes to the pop up
[AT&T Samsung Galaxy S 4 Android Development] C13v3r0n3:
are you trying to install a rom or are you trying to install the recovery?
[AT&T Samsung Galaxy S 4 Android Development] brojoe11:
That's exactly what I did, still no TWRP???I must be missing something here...
[AT&T Samsung Galaxy S 4 Android Development] evodon84:
Just follow my directions in post 106, I know that works.
[AT&T Samsung Galaxy S 4 Android Development] C13v3r0n3:
So after the install it reboots and when the splash screen hits are you holding the volume up button? should see a little blue message at the top left that says booting recovery then should see the twrp splash screen.
[AT&T Samsung Galaxy S 4 Android Development] david.degraw54:
When I try to move the files to /data/local/tmp I can't find those folders. The only folder there is /data
[AT&T Samsung Galaxy S 4 Android Development] brojoe11:
Yes, holding volume up and I see the tiny blue message, then it boots into normal stock recovery. Weird I know.

---------- Post added at 05:24 PM ---------- Previous post was at 05:22 PM ----------

Tap on data, then tap on local, then you'll see tmp. Hope that helps.
[AT&T Samsung Galaxy S 4 Android Development] schollianmj:
Im trying to get recovery on this.

Ok, It is downloading now. fingers crossed...
[AT&T Samsung Galaxy S 4 Android Development] evodon84:
Are you using a file manager with root access?
[AT&T Samsung Galaxy S 4 Android Development] david.degraw54:
I tapped on data but it is an empty folder. No /local/tmp
[AT&T Samsung Galaxy S 4 Android Development] brojoe11:
You are rooted right?
[AT&T Samsung Galaxy S 4 Android Development] david.degraw54:
Yes, I figured it out now. For some reason ES File explorer and X-plore were showing nothing in /data but when I used root explorer it showed everything inside of /data
[AT&T Samsung Galaxy S 4 Android Development] schollianmj:
ok, it downloaded via goo manager, but once the download was done it didnt do anything else... no flashing, no rebooting, not even any messages on the screen.
[AT&T Samsung Galaxy S 4 Android Development] evodon84:
Yeah the new es file manager is a littl confusing as you have to go to root explorer to use it with root access.
[AT&T Samsung Galaxy S 4 Android Development] brojoe11:
Great. I've gotta run for a while so I'll be back trying to get mine done alittle later.
[AT&T Samsung Galaxy S 4 Android Development] neincraft:
I too get a stock recovery screen, not TWRP. I rooted, installed GooManager, Tapped "Install OpenRecoveryScript", and restarted.

When I tap "reboot recovery" from GooManager, I just get a stock recovery screen. Any help would be appreciated :(
[AT&T Samsung Galaxy S 4 Android Development] cracjackson:
That was happening for me. I just re downloaded it , installed again and rebooted into recvoery from goo manger and it worked.
[AT&T Samsung Galaxy S 4 Android Development] C13v3r0n3:
Create local

Create tmp inside local then copy your files and try it.
[AT&T Samsung Galaxy S 4 Android Development] evodon84:
Check my post #106 and follow my directions there. Very easy. Look to post 80 for the recovery zip provides by rom racer. I got the Loki flashing utility from shabbypenguin's thread on CWM recovery.

I can try to put together a more complete how to when I get home.
[AT&T Samsung Galaxy S 4 Android Development] david.degraw54:
Your method in post #106 worked for me. Thanks!
[AT&T Samsung Galaxy S 4 Android Development] schollianmj:
well I gave goo another try and it worked. hit boot to recovery and it loaded team ins recovey! Woo Hoo!!

now Im looking for a new rom I can play with..... :)
[AT&T Samsung Galaxy S 4 Android Development] evodon84:
Great! You're very welcome.
[AT&T Samsung Galaxy S 4 Android Development] phonetechkid:
Worked too so happy. Thanks
[AT&T Samsung Galaxy S 4 Android Development] cracjackson:
Is 4.14 gb normal for twrp backup? That's how big my back up file is.
[AT&T Samsung Galaxy S 4 Android Development] neincraft:
Luckily, I just tried installing the recovery again, and it worked. I tried doing this before, but even then it didn't work. I guess that you have try multiple times for it to work. Thanks anyways for trying to help me, you are awesome!:D
[AT&T Samsung Galaxy S 4 Android Development] artjrv:
Me too. It boots up in regular recovery not TWRP
[AT&T Samsung Galaxy S 4 Android Development] evodon84:
I had a bunch of stuff frozen and deleted and mine was 2.7GB so 4GB seems possible. S much bloatware.

Huh, that's weird, glad you got it working though, and you're welcome.
[AT&T Samsung Galaxy S 4 Android Development] cracjackson:
Great! Now I'm only down to 2 gb left on my phone. Thanks buddy.
[AT&T Samsung Galaxy S 4 Android Development] t2abousa:
I downloaded GOO from the app store but when I go to install open recoveryscript from the menu button, it says no recoveries were found for the device, shouldnt this prompt it to download it? (AT&T)
[AT&T Samsung Galaxy S 4 Android Development] sikalb:
im getting this message after i nlticed it didint do jack after i downloaded it..

what am i missing??
[AT&T Samsung Galaxy S 4 Android Development] evodon84:
Read through the previous page
[AT&T Samsung Galaxy S 4 Android Development] niceppl:
2.5.0.2 loki moded...? only for ATT and Verizon version? or even the CAN version of twrp are loki moded as well?
[AT&T Samsung Galaxy S 4 Android Development] Dallenn:
I just followed the instructions in i believe it was post 80. used terminal on my mac, did it all on my computer

only thing i had to do was delete the extension on the file, by chooseing "get info" choosing the "sharing & extensions" tab, and deleted the .txt extension on the loki_flash file

then just copied the commands from his post

worked like a charm, now to flash a rom
[AT&T Samsung Galaxy S 4 Android Development] ChronoReverse:
Canadian version doesn't need LOKI. We have an unlocked bootloader already.

Flashed 2.5.0.2 using ODIN. Working great and the keyboard no longer double taps in my short test.
[AT&T Samsung Galaxy S 4 Android Development] niceppl:
thank...but...i'm just asking...cause add loki will cause issue for canadian aboot.....i just flashed 2.5.0.2 seems to work fine. so just wondering if the candian twrp is moded or not.

also means we cant flash att twrp anymore?
[AT&T Samsung Galaxy S 4 Android Development] :
It installs it in the background just go to boot recovery and it should work.
[AT&T Samsung Galaxy S 4 Android Development] Orion575:
It worked flawless for me, booted to TWRP from the first time, thanks !
[AT&T Samsung Galaxy S 4 Android Development] t2abousa:
Unfortunately, it didnt download. I used Goo on another phone previously and I could see it downloading in my status bar. Here it does nothing and just lets me know no recoveries exist. Also, it boots to the regular recovery. Can someone post the 2.5.0.2 so I may flash it? or put it in the folder GOO would if it downloaded it?

Thanks
[AT&T Samsung Galaxy S 4 Android Development] rfb813:
Didn't work the first time Did it again and Goo to Go. Did a Nandroid. Great!

0KT90614J8044733T
[AT&T Samsung Galaxy S 4 Android Development] fix-this!:
just flashed via goomanager and it worked great.
[AT&T Samsung Galaxy S 4 Android Development] :
I had it flash but when doing the button combo Power+vol up+Home it just says rebooting into recovery then nothing. it restarts and boots into the rom.

Only way I can do it is through goo.manager and reboot to recovery...

what gives? lol
[AT&T Samsung Galaxy S 4 Android Development] Rotary Parts:
let go of the power button when the phone turns on. cont. to hold home and volume up until you see recovery in small blue letters in upper left hand corner of screen then let go of rest.
[AT&T Samsung Galaxy S 4 Android Development] spectrumfox:
Worked like a charm on AT&T Galaxy S4!
[AT&T Samsung Galaxy S 4 Android Development] brojoe11:
Yahooooooooo

I got it!!! I got it!!! I got it!!! :D:D:D:D:D

Thanks everybody who helped. You guys are the best. Thanks doesn't do you justice.
[AT&T Samsung Galaxy S 4 Android Development] titaneds73:
if anyone can give me some help,read some 20 pages back to my understanding all we have to do to get recovery and unlock is to dl through goo?or do we still have to do all the steps with terminal emulator if some one could clarify this i would really appreciate that thank you for your time
[AT&T Samsung Galaxy S 4 Android Development] Rotary Parts:
Root your phone! and then download goo manager from playstore open it hit menu key tap install open recovery. it will go to download page. it will download when its done it will tell you! then reboot holding the volume up and home cont. to hold till you see recovery in little blue letters in upper left hand screen then let go!! and enjoy!!
[Sprint HTC EVO 4G LTE] Magnum_Enforcer:
Take a look at this:

http://xdaforums.com/showthread.php?t=2197909

It doesn't matter that your Hboot & baseband don't match up.
[Sprint HTC EVO 4G LTE] jocarog:
You can get all the RUU's from here: http://androidfiles.org/ruu/?developer=Jewel

Or use ViperRuu: http://xdaforums.com/showthread.php?t=2197909

Edit: Looks like Finz beat me to post about viperRuu, lol
[Sprint HTC EVO 4G LTE] jawknee530:
You guys are heroes. Thanks for the responses.