yashsingh1/xdaforums huggingface dataset:
[AT&T Samsung Galaxy S 4 Android Development] RK:
[MENTION=4666971]Phil3759[/MENTION] there seems to be some error in the auto Loki functionality in the latest 6.08.9 version. When I flash a non loki'd kernel (ktoonz kernel for i9505 for example) I get this error:

Installing: /sdcard/Download/KT-SGS4-KK4.4-TWGE-INTL-01.05.2014.zip

Finding update package...

I:Update location: /data/media/0/Download/KT-SGS4-KK4.4-TWGE-INTL-01.05.2014.zip

Opening update package...

Installing update...

about to run program [/sbin/busybox] with 3 args

mounting system

copying modules

unmounting system

Flashing Kernel

script result was [0.100000]

Checking if loki-fying is needed

/dev/block/platform/msm_sdcc.1/by-name/boot needs lokifying.

[+] loki_patch v2.1

E:[-] Failed to mmap aboot.

E:Error loki-ifying the boot image.

The loki-doki zip works tho..
[AT&T Samsung Galaxy S 4 Android Development] RK:
[MENTION=4666971]Phil3759[/MENTION] I re downloaded and re flashed the recovery just to be sure but the above issue is reproducible.
[AT&T Samsung Galaxy S 4 Android Development] RK:
Nevermind. It's my device. Even the older version of recovery which worked well before is now having the same exact issue. I guess it's Odin back to stock time...
[AT&T Samsung Galaxy S 4 Android Development] nhugh406:
Really, because I'm getting the sane thing :(

Let me know how Odin works out
[AT&T Samsung Galaxy S 4 Android Development] RK:
[MENTION=4666971]Phil3759[/MENTION], FYI I ODINed back to stock, did a factory reset and did a fresh install of the latest version of the recovery. I still get the same error as above with the auto loki function. It says "failed to mmap aboot"
[AT&T Samsung Galaxy S 4 Android Development] Dyaus:
Running 6.08.9 and have no problems with the auto-loki feature.
[AT&T Samsung Galaxy S 4 Android Development] RK:
Interesting... It was working for me on 6.07.9. I updated to 6.08.9 and it stopped working. Now even if I revert back to 6.07.9, auto loki says

"Error: Failed to mmap aboot"

The loki-doki.zip works perfect though so I am sure there is nothing wrong with my aboot.. Also, the recovery is not pre-loki'd. The recovery installer cwm zip pulls data from the aboot partition and uses it to loki the recivery image so if there was something wrong with my aboot partition, I would not be able to run the recovery at all.

I have MDL aboot. Which one do you have? MDL or MDB?
[AT&T Samsung Galaxy S 4 Android Development] Dyaus:
Strangely, I had the same issue you are having when I was on 6.07.9 and I went all the way back to 6.00.8 since that's what I had before trying 6.07.9. Once 6.08.9 came out, I flashed that and didn't have any problems.

My aboot is also based on the MDL firmware.
[AT&T Samsung Galaxy S 4 Android Development] JLopez149:
I had the same error. Flashed back to an older version and it works fine now.
[AT&T Samsung Galaxy S 4 Android Development] OneOfMany07:
Now I'm worried to upgrade from my ancient 5.x version (from my ROM's suggested recoveries thread). Guess I can revert it if it doesn't work, and I think I understand the steps of the manual loki process (just flash the extra file).

Not sure if you guys already did, but it might be good to post these in the main Philz Touch thread in case he doesn't look through each device specific one.
[AT&T Samsung Galaxy S 4 Android Development] Obartuckc:
:bump: looks like this is up to 6.12.xx now.

~Sent from my AT&T Samsung Galaxy S4 Badass~
[AT&T Samsung Galaxy S 4 Android Development] jrccomputer:
How do I unlock the bootloader and install this recovery on MF3??

Sorry...and thank you
[AT&T Samsung Galaxy S 4 Android Development] Obartuckc:
You can't. You're stuck with using SafeStrap.

~Sent from my AT&T Samsung Galaxy S4 Badass~
[AT&T Samsung Galaxy S 4 Android Development] jrccomputer:
I have absolutely what SafeStrap is!! Sorry :(

Would you mind filling me in?? I came from an GS3 and am lost.
[AT&T Samsung Galaxy S 4 Android Development] hednik:
Find a FAQ in general and read that. Bootloader can't be unlocked
[AT&T Samsung Galaxy S 4 Android Development] ozziedog:
Check over in the General Section SafeStrap is probably the only way to do anything semi custom to MF3. I don't have it on my phone so I do very little reading on SafeStrap. So lots of reading before you brick it. Good luck. Also check I think the title starts with "Hash" in General.
[AT&T Samsung Galaxy S 4 Android Development] Phil3759:
6.13.1

fix hang on boot

uploading... refresh in a while
[AT&T Samsung Galaxy S 4 Android Development] ChronoReverse:
Hang on boot? Is that when booting to the recovery or the Hang on the Samsung screen when booting normally bug?
[AT&T Samsung Galaxy S 4 Android Development] Phil3759:
This a recovery,

For ROM issues, ask your ROM maker
[AT&T Samsung Galaxy S 4 Android Development] Completely_Clueless:
Hey Phil, thanks for getting around to us S4 users :). I see version 6.13.1 on the Goo.im page, but I'm wondering if the jflteatt variant ("philz_touch_6.13.1-jflteatt.zip", located here) is Loki patched? The reason I ask is because in your OP, you've left the part that says "Loki patched during install" blank. I just want to be sure about this before I flash anything.
[AT&T Samsung Galaxy S 4 Android Development] RK:
It will Loki patch on install.
[AT&T Samsung Galaxy S 4 Android Development] Completely_Clueless:
Heh, guess I've been out of the loop and read through that too quickly. He used to have two links in his OP, one for Loki patched and one for non Loki-patched, but I guess recently it became a one-for-all version. Regardless, that's good news, and I appreciate the fast response.
[AT&T Samsung Galaxy S 4 Android Development] tvos:
Hello Completely_Clueless,

Would I download for m919 or i9500?

I think this is the correct link for PhillZ recovery:

http://goo.im/devs/philz_touch/CWM_Advanced_Edition/i9500

Since I already have TWRP on the rom, will it cause any problems flashing PhilZ recovery with ODIN? In other words, just over-write twrp recovery.

I did think about the recoveries like twrp, cwm, philz but didn't take it a step further on this.

Please advise and thank you for your help

tvos
[AT&T Samsung Galaxy S 4 Android Development] tommyb227:
Sorry new to this phone. How do I get past Knox?
[AT&T Samsung Galaxy S 4 Android Development] zerogun:
What version phone do you have? AT&T or the Tmobile? Note that most ROMs and recoveries refer to their devices via their code names (Nexus 5 = Hammerhead, etc).

If you have the AT&T phone, then download the JFLTEATT version.

If you have the T-Mobile phone, then download the JFLTETMO version.

Also, if you have TWRP installed, then just flash the .zip file in TWRP. It will then overwrite the TWRP recovery and you will have Philz touch as a recovery instead.
[AT&T Samsung Galaxy S 4 Android Development] tvos:
My phone is T-Mobile and flashed with philz_touch_6.07.9-i9500.tar.md5

I couldn't enter recovery mode. Although, I still have root access and able to boot into my rom.

Is there a version of PhilZ recovery spcific for M919 TMobile that someone can point me in that direction?

Please advise

tvos
[AT&T Samsung Galaxy S 4 Android Development] zerogun:
Yeah, the 6.07 version hung on recovery boot. Also, you are using the wrong on. Use the tar.md5 version here:

http://goo.im/devs/philz_touch/CWM_Advanced_Edition/jfltetmo

Flash it through Odin, since you can't boot into your recover.
[AT&T Samsung Galaxy S 4 Android Development] tvos:
that worked.... ;)

Thank You for the help on this. Maybe I will have better success with MIUI flashing this rom. I also noticed ColorOS rom that looks attractive.

We shall see!

tvos
[AT&T Samsung Galaxy S 4 Android Development] zerogun:
Good to know you're back up and running. As for ROMS, just make sure your flashing for the T-Mobile specific ROMS, right?
[AT&T Samsung Galaxy S 4 Android Development] tvos:
yah, t-mobile m919 rom that I have been flashing.

tvos
[AT&T Samsung Galaxy S 4 Android Development] tvos:
Okay, I am not using PhilZ recovery and flashed two roms and they failed. At least it didn't reboot and I had the pain flashing the stock, root, and recovery all over again...

miui_i9505_shiro_4.1.24_7b2594ec6b_4.2.zip

format() expects 5 args, got 4

error in rom.zip

Status 7

So I decided to install MIUI rom for m919 "MIUI 3.11.22.zip" and works perfectly fine.

I am just thinking that what ever I do, this updated rom will not work with tmoble sgiv m919.

Not that too big of a deal, but would like to be on the latest release...

Almost ready to throw in the towel unless someone else has idea..;)

Thank You for your help guys..

tvos
[AT&T Samsung Galaxy S 4 Android Development] Phil3759:
You are bricking your phone

I9500 is exynos, nothing to do with jflte variants

You were lucky this time...
[AT&T Samsung Galaxy S 4 Android Development] RK:
Read the FAQ
[AT&T Samsung Galaxy S 4 Android Development] tvos:
never had bricked a winOS, iphone, or sgiv yet .;) thought I came close a few times but fate was on my side.

anyways, if there isn't a m919 rom, then i won't journey into the i9500 roms for flashing.

tvos

---------- Post added at 10:17 AM ---------- Previous post was at 10:15 AM ----------

trust me i have been...;)

i am sticking with my m919 version of miui... just would be nice to have the latest update for this..

appreciate your help.

tvos
[AT&T Samsung Galaxy S 4 Android Development] RK:
Straight from FAQ:

[/QUOTE]11- script aborted: format() expects 5 args, got 4

format() expects 5 args, got 4

Read FAQ 10

Also, currently, no fix is possible except editing updater-script and fixing to new syntax:

This is the new format required:

exp:

format("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "0", "/system");

[/QUOTE]
[AT&T Samsung Galaxy S 4 Android Development] Phil3759:
Update v6.15.4

There is a toggle now to overcome this ;)
[AT&T Samsung Galaxy S 4 Android Development] tvos:
well this is above me on the rom, programming software part of it.. I leave you guys to have fun with that! lol

tvos

---------- Post added at 12:22 AM ---------- Previous post was at 12:18 AM ----------

unfortunately, I have to disagree with you about the bricking. tried this various times with this rom i9500 on m919, then tried another one PrismColorOS. there was never a issue flashing the stock and then running through the whole process: root, recovery, and flash back to MIUI for my device. now, I could see bricking the phone by re-partitioning...;-(

thank you,

tvos
[AT&T Samsung Galaxy S 4 Android Development] Phil3759:
Now: one common recovery for all: jflte

The below specific variants are no more updated, use jflte common variant
[AT&T Samsung Galaxy S 4 Android Development] MrMarkEdward:
Updating to latest jflte common variant on AT&T S4 I got yellow triangle I am assuming cause its not lokid.
[AT&T Samsung Galaxy S 4 Android Development] Sc4ryB3ar:
Same here. I was on 6.15.4 jflteatt w/Loki support enabled. Flashed as usual. Rebooted back to recovery. Unauthorized triangle.

How can I flash just a recovery image so I don't have to heimdall to stock and start all over?
[AT&T Samsung Galaxy S 4 Android Development] Phil3759:
Sorry, the zip no more lokifies on install. You must enable it in recovery
[AT&T Samsung Galaxy S 4 Android Development] Sc4ryB3ar:
Important information to have known before hand.

But as my post stated I had Loki support enabled, I was under the impression that was what turned auto-loki on and off.

As for my second question. I believe I can put it in download mode and connect via adb and push a recovery image that way.

Would you please verify that is correct at this point?
[AT&T Samsung Galaxy S 4 Android Development] RK:
Reboot to download mode, and cancel download mode by pressing volume down. Then you should be able to boot into your ROM.

If that does not work then go into download mode till you press volume up to get the do not turn target off screen then either battery pull or long press power button and you will boot into your ROM.

Once in your ROM, install goomanager and flash TWRP via goomanager. Then reboot to TWRP and flash philz older version that auto Loki's on install.
[AT&T Samsung Galaxy S 4 Android Development] Sc4ryB3ar:
Thank you so very much, the first option worked like a charm.
[AT&T Samsung Galaxy S 4 Android Development] RK:
Phill, I have been having this issue with the auto Loki. I tried to flash 6.15.6 from 6.15.4 with auto Loki enabled, and I got this error:

Error: failed to mmap aboot

I get that error on any attempted auto Loki. Your recovery versions (< 6.15.6 that loki on install have always installed fine.)

Log here:

https://www.dropbox.com/s/anar3pcpdu383pb/last_log.txt

---------- Post added at 10:32 PM ---------- Previous post was at 09:40 PM ----------

I did some further testing using a recovery loki'ing cwm zip I made based on your zips. I did the following:

-went back to 6.15.4

-enabled auto Loki

-flashed 6.15.6

Here auto loki failed.

-flashed my loki-doki equivalent zip to Loki the recovery

Here the auto Loki told me that everything was loki'd and fine.

-reboot to recovery

Booted into philz 6.15.6 without issues.

This log shows auto Loki failing and conventional Loki working.

https://www.dropbox.com/s/h0d1vfgu5zhy7si/last_log.1

This log shows boot up to 6.15.6

https://www.dropbox.com/s/bvhaywfwu7nj6vi/last_log

EDIT: for anyone else in my situation, I have uploaded the zip I used here:

http://d-h.st/dMX

This is an equivalent of the loki-doki.zip except that this will ONLY Loki your recovery. (This will NOT Loki your ROM or KERNEL. Only recovery)
[AT&T Samsung Galaxy S 4 Android Development] jayrod88:
This also worked for me. Thanks.
[AT&T Samsung Galaxy S 4 Android Development] Phil3759:
Samsung patched their bootloaders against loki on latest hlte. Maybe it is the case here too!
[AT&T Samsung Galaxy S 4 Android Development] RK:
I can still Loki kernels and recoveries using loki-doki though. It's just the auto Loki that does not work. Any ideas?
[AT&T Samsung Galaxy S 4 Android Development] MrMarkEdward:
TY worked as advertised

---------- Post added at 06:46 AM ---------- Previous post was at 06:45 AM ----------

Ty for the awsome recovery.
[AT&T Samsung Galaxy S 4 Android Development] jthrasher47:
Man you can NOT flash 19500 roms you Can flash 19505 roms you will for certain brick your phone iPhone and Windows Phones are very different that is why you haven't in the past... If you flash i9500 rom it will write to wrong partition...

Sorry Phil for the off topic hopefully he will listen
[AT&T Samsung Galaxy S 4 Android Development] tvos:
well, so far no problems and phone isn't bricked...;) will I do this again, probably not.

done this many times and never a problem. sgiv, iphone, windows phone etc..

tvos
[AT&T Samsung Galaxy S 4 Android Development] Phil3759:
can you stop posting such advises in this thread?

you were already asked, so STOP

We said you can brick it, no need to continue the discussion. Do what you want with your phone but do not suggest to noobs to do the same crap you do
[AT&T Samsung Galaxy S 4 Android Development] tvos:
Phil,

No disrespect to your knowledge and hard work. I am just stating that I was able to flash the rom, but with no repercussions except having to flash the stock.

Earlier in the discussions before I even attempted I did consult this forum and got bad advice that the hardware is the same, so it should not make a difference. Obviously it does..;)

I was all set and ready to leave this thread alone until jthrasher47 jumped in. So this is nothing on my part for continuing the discussion as records show.

Anyways, I do appreciate the help and suggestions of the group.

All the best and keep up the good work.

tvos
[AT&T Samsung Galaxy S 4 Android Development] kizildur:
Can I install Philz recovery on I337 with MK2?

Sorry for a newbie question.

My I337 is rooted. I'm trying to install Philz recovery (odin 307+ http://goo.im/devs/philz_touch/CWM_Advanced_Edition/jflteatt as directed, phone is in download mode) and installation fails. Odin error message is FAIL! (Auth).

I would greatly appreciate any help making progress with this installation.
[AT&T Samsung Galaxy S 4 Android Development] gravedigger76:
If you are on MF3 or MK2 baseband you can not flash any recovery. You have locked boot loader. Read up on those basebands and safestrap before you brick you're device.
[AT&T Samsung Galaxy S 4 Android Development] buggerritt:
I've tried downloading and flashing latest: philz_touch_6.15.4-jflteatt.zip

and each time come up with an error staying that the file is bad.
[AT&T Samsung Galaxy S 4 Android Development] RK:
THe latest recovery is here:

http://goo.im/devs/philz_touch/CWM_Advanced_Edition/jflte
[AT&T Samsung Galaxy S 4 Android Development] RK:
I tried the new 6.17.9 and everything I tried worked perfect. (I did not do restore. Just backup.)

However, I still have the failed to mmap aboot error with auto loki. It happened when I flashed 6.17.9 using 6.16.9.

I have attached another log that shows auto loki failure. As you will see in the log, I used a CWM zip similar to loki-doki right after auto loki failed, and that worked.

I posted these logs before but received no comments. Is this because i am being a noob and am missing something obvious or because you do not know why auto loki is not working on my device? Either ways, its not a big issue. Just wondering why I am the only one who seems to have this problem...
[AT&T Samsung Galaxy S 4 Android Development] Phil3759:
maybe you updated bootloader and it is now loki proof
[AT&T Samsung Galaxy S 4 Android Development] RK:
I did not. If you see this section of the log

Loki'ing Recovery...20480+0 records in
20480+0 records out
10485760 bytes (10.0MB) copied, 0.478882 seconds, 20.9MB/s
[+] loki_patch v2.1
[+] Detected target AT&T Samsung Galaxy S4 build JDQ39.I337UCUAMDB or JDQ39.I337UCUAMDL
[+] Original kernel address: 80208000
[+] Original ramdisk address: 82200000
[+] Output file written to /tmp/loki/recovery.lok

[+] loki_flash v2.1
[+] Loki validation passed, flashing image.
[+] Loki flashing complete!
script result was [1.000000]
Done, reboot recovery...
I:Cannot open /data/philz-touch/philz-touch_6.ini
I:apply_loki_patch set to default (1)
Checking if loki-fying is needed

Install from sdcard complete.

It shows that using a zip file that grabs recovery image and aboot using dd, loki's the recovery and writes the loki'd recovery back using dd, loki works on my device. Your auto loki detects in the end that everything is loki'd.

My bootloader is MDL. I can use loki'd kernels. I can also flash kernels that are not loki'd and then flash loki-doki.zip later to loki them on-device.

The only time I get that error is when using auto-loki.

I am doing the following in your recovery to loki newer versions of your recovery:

1. Flash the recovery (here, auto-loki reports "failed to mmap aboot")

2. Flash a zip that runs the following script:

dd if=/dev/block/platform/msm_sdcc.1/by-name/aboot of=/tmp/loki/aboot.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/recovery of=/tmp/loki/recovery.img
/tmp/loki/loki_patch recovery /tmp/loki/aboot.img /tmp/loki/recovery.img /tmp/loki/recovery.lok || exit 1
/tmp/loki/loki_flash recovery /tmp/loki/recovery.lok || exit 1
rm -rf /tmp/loki
exit 0

This works every time!
[AT&T Samsung Galaxy S 4 Android Development] Phil3759:
not owning a loki device makes it a bit Chinese for me !

can you explain the issue a bit more precisely:

- try to turn off auto-loki in recovery, then flash my zip files

- else, try to flash the recovery.img without my zip installer (it has a lokifying script for people flashing recovery for the first time)
[AT&T Samsung Galaxy S 4 Android Development] RK:
I am sorry i will try to be clear. Here is what happens:

Auto-loki OFF:

After flashing a ROM, I have to flash loki-doki.zip (attached) and it works.

After flashing recovery I have to flash loki-recovery.zip (attached) and it works.

Auto-loki ON:

After flashing a ROM, the recovery correctly identifies that boot.img is not loki'd. The recovery then tries to loki-patch boot.img, but fails with the output

Checking if loki-fying is needed
/dev/block/platform/msm_sdcc.1/by-name/boot needs lokifying.
[+] loki_patch v2.1
E:[-] Failed to mmap aboot.
E:Error loki-ifying the recovery image.

After this, I flash loki-doki.zip, which loki-paches boot.img correctly without errors, and I can boot into the ROM.

After flashing your unified jflte recovery, the recovery correctly identifies that recovery.img is not loki'd. The recovery then tries to loki-patch recovery.img, but fails with the output

Checking if loki-fying is needed
/dev/block/platform/msm_sdcc.1/by-name/recovery needs lokifying.
[+] loki_patch v2.1
E:[-] Failed to mmap aboot.
E:Error loki-ifying the recovery image.

After this, I flash loki-recovery.zip which loki-paches recovery.img correctly without errors.

Both loki-doki.zip and loki-recovery.zip are doing the exact same thing that auto-loki tries to do, i.e., copy aboot.img and boot.img (or recovery.img) to a temporary folder, patch boot.img (or recovery.img) using aboot.img and reflash boot.img (or recovery.img) to the boot (or recovery) partition, and yet, the zips succeed and auto-loki fails.

Hope this helps. As i said, its not a big deal since i have the zips and flashing them is just one extra step..
[AT&T Samsung Galaxy S 4 Android Development] Phil3759:
thank you for the details

What is latest recovery version that was working?
[AT&T Samsung Galaxy S 4 Android Development] RK:
This is the interesting part. 6.07.9 definitely worked. The problem started with 6.08.9. However, now even if I flash back to 6.07.9, the issue persists. I will try some 5.xx versions and report back.
[AT&T Samsung Galaxy S 4 Android Development] Phil3759:
Well, then, definitely not related to my sources

Will look at it later
[AT&T Samsung Galaxy S 4 Android Development] RK:
EDIT. Did some testing. 6.00.8 works 6.07.9 does not. Please disregard last post.

Logs:

https://www.dropbox.com/sh/8b45dcyl9todxr7/CapR0UG-13

The only visible difference is that the auto-loki with version 2.1 fail. The older ones work.

EDIT: to be clear 6.00.8 and everything before work, 6.07.9 and everything after does not. Nothing between 6.00.8 and 6.07.9 was released for jflteatt so can't test those.
[AT&T Samsung Galaxy S 4 Android Development] Phil3759:
thank you a lot :good:

Will look at it when I have time
[AT&T Samsung Galaxy S 4 Android Development] buggerritt:
Yes. That is exactly where I downloaded 6.18.7 several times. Each time I try to flash the zip, it fails. With an error saying that the file is bad. I'm currently using 6.00.8 and haven't had an issue with anything. Just wanting to get with the latest.
[AT&T Samsung Galaxy S 4 Android Development] RK:
Weird I downloaded and flashed from there yesterday without issues..
[AT&T Samsung Galaxy S 4 Android Development] buggerritt:
What recovery did you use to flash it with? Or, did you Odin flash?

---------- Post added at 08:43 AM ---------- Previous post was at 08:42 AM ----------
[AT&T Samsung Galaxy S 4 Android Development] RK:
I used philz :)
[AT&T Samsung Galaxy S 4 Android Development] buggerritt:
Please disregard all my previous talk on the subject. I downloaded via PC and it flashed just fine. My bad. :)
[AT&T Samsung Galaxy S 4 Android Development] Phil3759:
Update 6.19.3

Hope it flashes your loki thing fine now

I activated back the loki script in zip installer
[AT&T Samsung Galaxy S 4 Android Development] buggerritt:
I just flashed it and when i try to reboot into recovery, I get the at&t triangle. What to do now?
[AT&T Samsung Galaxy S 4 Android Development] buggerritt:
Well, i got twrp from goo manager and flashed the previous working philz but now i have the Samsung custom nag screen when i boot. Is there a way to get rid of that without odin back to stock or triangle away?
[AT&T Samsung Galaxy S 4 Android Development] RK:
Not that I know of. Triangle away works like a champ tho..
[AT&T Samsung Galaxy S 4 Android Development] buggerritt:
Do i just reset flash counter and it's all good? No more custom screen with the opened lock image? I've never actually used it before.