yashsingh1/xdaforums huggingface dataset:
[AT&T Samsung Galaxy S 4 General] rebel1699:
Good to see you here by accident, or however! Yeah, it could be rom problems, but not totally sure. I know using the following process.......

Update to nb1 4.4.2

Downgrade back to mk2 using ap odin file

Re-root, install safestrap.

Install 4.3 rom and go as normal, only wifi is scrapped.

So what we have at that point is a 4.3 system, 4.3 kernel and a 4.4 bootloader.

Now, you can go back into safestrap and flash a custom 4.4 rom to stock slot, flash modules and reboot to download. Odin 4.4 boot.img. Rom will boot to boot animation, but just loops. After this, safestrap will no longer mount /system, and will brick if you try to flash any rom. However, if you first odin back to 4.3 boot.img and then restore your 4.3 custom rom, all is fine.

Just wanted to lay out what i know so far.
[AT&T Samsung Galaxy S 4 General] aasanders617:
http://xdaforums.com/showthread.php?t=2577273 - Note 3 rom built from KK leak

http://xdaforums.com/showthread.php?t=2654992 - Note 3 rom ported over from same dev above

I am basically in the same boat right down to the wifi not working with the MLD 4.4 bootlader... I think what it boils down to is needing a rom compatible with the stock 4.4 boot.img...
[AT&T Samsung Galaxy S 4 General] jeboo:
Sup guys, I got a message from ted asking for some input on this thread. If you guys are trying to revert back to MK2 after updating to NB1, you will likely need bypasslkm to get wifi modules working. The ROM queries TZ (part of the BL) to authenticate the wifi module, so MK2 ROM with NB1 TZ will not work.

Another option would be flashing certain parts of the MK2 BL, but don't try this unless you have a JTAG (high risk of hard brick).

If you get the phone restored to a state where only the wifi is not working, try running bypasslkm and see if it's fixed. Unfortunately, z-patched kernels cannot be used with these BLs.
[AT&T Samsung Galaxy S 4 General] aasanders617:
Have tried flashing TZ as well as entire MK2 BL with MLD 4.4 boot.img with no luck getting wifi working...
[AT&T Samsung Galaxy S 4 General] rebel1699:
Thks is exactly what recovery.log was stating. Tz queries were failing immediately. As soon as i get a few minutes, I will read on bypasslkm.

---------- Post added at 11:40 PM ---------- Previous post was at 11:35 PM ----------

Yeah, my thought was the 4.4 aboot was still arguing with the other 4.3 parts of the bl that may be flashed.

---------- Post added at 11:50 PM ---------- Previous post was at 11:40 PM ----------

[MENTION=2471504]jeboo[/MENTION] Sorry to quote this again, but i have an observation/question.

When downgrading from nb1 to mk2, if you flash the cp file (modem.bin , non-hlos.bin) the mk2 wifi module does indeed work with the 4.4 tz. But, you lose sound and phone function in the process. What in the non-hlos file is fixing wifi, but killing sound and phone function?
[AT&T Samsung Galaxy S 4 General] aasanders617:
Hey guys, I'm off to bed now but if you haven't found a fix by tomorrow I will go back through my different combos of flashables to see if something I have tried in the past will fix your problem... since it wasn't my goal I may have a fix up my sleave and didn't even notice...

also a question for you guys since I'm new to S4 forum, any ideas on a dev that's takes requests and might be willing to do a build based on ATT KK or port their rom to work with stock kernal?
[AT&T Samsung Galaxy S 4 General] rebel1699:
We have a rom, but it loops at bootani as well. Im reading the thread you posted to see if we can use the same procedure with it, since we have (i think) all the needed odin files.
[AT&T Samsung Galaxy S 4 General] aasanders617:
I have tried method from the tread with all TW based KK roms including SHOs. Both shostck and kangakat would get to bootani and then stop. All others just blank screen, but maybe you'll find something I missed, good luck... ill be back tomorrow...
[AT&T Samsung Galaxy S 4 General] jeboo:
That's a really strange finding, but I have not looked into the actual TZ authentication.
[AT&T Samsung Galaxy S 4 General] Surge1223:
The TZ version doesn't matter unless they've added new security. Otherwise people would have had these same issues when they would downgrade from MK2 to MJ7 or MF3. I think the issue is in the way these tar files are flashed.

Ted & co,

I would suggest you guys put all the files into one tar and make it odin flashable (note the tar file has to be of the USTAR format) and once the tar is flashed boot into recovery right away and wipe cache before allowing it to boot to the system.

The second option here is to use the method you are currently using, then reboot to recovery wipe cache, and then reboot in download mode and flash the modem .bin files (NON-HLOS.bin and modem.bin) in Odin with CP again.

Another issue may be that the partition sizes could have changed, thus making the use of a PIT file a necessity, also my logic for the suggestions above has to do with how the modem and hlos especially (since its loaded by sbl2 first) are loaded at boot and the role of cache in the process. Another reason could be in how the /efs is constructed, since hlos and modem are mounted to /firmware and /firmware-mdm then verififed by the tzapps loaded through sbl2 during the boot process.

If these methods dont work please pastebin a log of dmesg and cat /proc/last_kmsg and you might consider starting a logcat prior to attempting to turn on wifi and then pastebin that too. If you guys need help repackaging the tars let me know.

Also I should ask, not that it matters much in this case but you guys did depad the trailing zeroes from the NB1 boot partitions correct?

Edit: Corrected to say CP instead of AP for modem flashes
[AT&T Samsung Galaxy S 4 General] rebel1699:
I did not depad the trailing zeros from the nb1 boot partitions. further, I have no clue yet what that is. :) As far as the odin files, all we have is the 4.3 non-hlos.bin and modem.bin. That, I think, is the biggest problem. Only 4.4 has of those are the delta updates in the nb1 ota zip. All I can think of is if those files from the 4.4.2 leak would work with the nb1 bootloader. Yes, I would need help making the odin files. I made a few the other night that worked fine, but your mention of USTAR format is something I know nothing about. My nb1 boot.img that I made for odin seems to work ok. At least, it flashes without error. whether it is flashing right is beyond me.

EDIT: Yeah, I think my odin packages are ok. The 4.3 boot.img I made allows safestrap to operate correctly again after flashing it.
[AT&T Samsung Galaxy S 4 General] Maribou:
Here is a 16g PIT file that I pulled with Heimdall.

https://mega.co.nz/#!zgR2mJTY!x-SLed8sFMp4bWd8YbsPHN4QkqnuWRqXMDLclyXThmE

If you need TAR files let me know. I can tar them up, but will the files need to be tared in a specific order?
[AT&T Samsung Galaxy S 4 General] jeboo:
Yeah, it makes sense the actual function in TZ likely hasn't changed between versions. But it's more curious what are they using to ensure the ROM matches the BL (could it be modems?). I'll see what I can find in my IDB.

And I agree with Surge, you guys need to post logs. Run this command right before attempting to enable wifi: dmesg | grep 'lkmauth'
[AT&T Samsung Galaxy S 4 General] Surge1223:
HLOS seems like the likely culprit but regardless, one log will likely tell us exactly what the issue us lol.
[AT&T Samsung Galaxy S 4 General] crazy_dragonlady:
Thank you guys for working so hard on these issues!! :D

I have no idea what most of the processes y'all are using mean but I do find it very interesting to follow along while you figure it all out!

ttfn

CDL
[AT&T Samsung Galaxy S 4 General] Maribou:
[MENTION=833788]rebel1699[/MENTION] ,

So all we need to downgrade 4.4 OTA to 4.3 is to flash the AP tar from MK2?

This will give us phone functions and sound, but WIFI does not work correct?

If we somehow mess up, and need a fresh install, do we just flash the Part 1 and 2 file from the OP, and follow the instructions for upgrading to 4.4?

Sorry for all the questions. I just want to make sure I am understanding everything that is going on. :good:
[AT&T Samsung Galaxy S 4 General] rebel1699:
That is exactly right. I have found that if you flash cp (non-hlos.bin modem.bin) at any time, sound and phone die. I also recommend flashing the pit with the ap.
[AT&T Samsung Galaxy S 4 General] Maribou:
Awesome, thank you!

The PIT from the MK2 files?
[AT&T Samsung Galaxy S 4 General] rebel1699:
Yeah, thats what i use.

Also, I got bored before reading the posts from jeboo and surge. Odin'd the non-hlos from the mld leak. That one kills sound, phone AND wifi. Once I downgrade back to mk2, ill run the dmesg they mentioned and see what comes up when trying to enable wifi. Now, if someone will kindly tell me where to find the log after doing so......lol
[AT&T Samsung Galaxy S 4 General] Maribou:
dmesg | grep 'lkmauth' > /mnt/extSdCard/dmesg.txt ( Or wherever you want the output file to go)

I might be wrong. :laugh:
[AT&T Samsung Galaxy S 4 General] rebel1699:
[MENTION=2471504]jeboo[/MENTION] [MENTION=4939386]Surge1223[/MENTION]

Here is the dmesg. Ran in stock rooted mk2, with nb1 bootloader.

http://pastebin.com/mJAPbSCN
[AT&T Samsung Galaxy S 4 General] jeboo:
Yep, you can fix that check using the method described at the end of my post for bypasslkm:

http://xdaforums.com/showpost.php?p=48683844&postcount=1
[AT&T Samsung Galaxy S 4 General] rebel1699:
Ok, will do. Only questioin, what is the module name i am patching. Sorry for bugging the crap out of you
[AT&T Samsung Galaxy S 4 General] Surge1223:
So I guess something does change in the TZ afterall lol. I wonder if flashing the MK2 TZ would also solve this problem...
[AT&T Samsung Galaxy S 4 General] rebel1699:
No clue. I didnt know you could flash just tz. I thought bootloader parts had to flash in order. That would also be something i am willing to try. Holding off on bypasslkm, because i have no idea which .ko i would be running the patch on.

EDIT: Nevermind, I got it going. Used

adb push bypasslkm /data/local/tmp

cd /data/local/tmp

chmod 755 bypasslkm

./bypasslkm

Wifi turned on immediately.

Thanks [MENTION=2471504]jeboo[/MENTION] !!!!!
[AT&T Samsung Galaxy S 4 General] dolph8886:
[MENTION=833788]rebel1699[/MENTION] nice, I must have done something wrong or it was my restored backup causing problems because I was getting

return of insmod : ret = -1, Exec format error
[AT&T Samsung Galaxy S 4 General] rebel1699:
I never even ran the insmod line of the code. Didnt need it. Last line i entered was ./bypasslkm wifi worked.
[AT&T Samsung Galaxy S 4 General] Maribou:
Navigate to /sys/module/, and /system/lib/modules for a list of modules.

Maybe you can kind of narrow it down.
[AT&T Samsung Galaxy S 4 General] dolph8886:
I did not check wifi after executing bypasslkm, it might have been working.

does this persist across reboots or will have to load in an init?
[AT&T Samsung Galaxy S 4 General] Maribou:
You have to run bypasslkm after every reboot.

Or add it to init.

But, [MENTION=2471504]jeboo[/MENTION] says:
[AT&T Samsung Galaxy S 4 General] Dhs92:
Off topic, but would pushing SU to the system partition work? Or would ADB error out?
[AT&T Samsung Galaxy S 4 General] Maribou:
If you downgrade, you don't have to push anything. You can just run saferoot again.

If you are on the OTA you will not be able to push anything to system because we don't have a root method for it yet.

You can push all you want, but you will get the permission denied error.
[AT&T Samsung Galaxy S 4 General] Dhs92:
Mkay, was just wondering, would flashing the SU file work? I've already tried flashing the SuperUser zip
[AT&T Samsung Galaxy S 4 General] dolph8886:
without finishing this with ./bypasslkm -r will this be long term solution if started in an init script?

" THIS CAN LEAVE YOUR OS IN A VULNERABLE STATE TO MALWARE. Ideally, you would run the patch, insert your module, then run the patch with -r."
[AT&T Samsung Galaxy S 4 General] jeboo:
Well, since this is being used as a persistent fix, you can't really disable it (or wifi will stop working). I included the disclaimer as a remote warning, it's highly unlikely you would ever be exploited in such a manner.
[AT&T Samsung Galaxy S 4 General] Maribou:
Says the hacker... ;)
[AT&T Samsung Galaxy S 4 General] ted77usa:
Huge thank to [MENTION=2471504]jeboo[/MENTION] [MENTION=4939386]Surge1223[/MENTION] [MENTION=833788]rebel1699[/MENTION] [MENTION=4980764]Maribou[/MENTION] [MENTION=1375880]dolph8886[/MENTION] .....and others that helping to get Wifi to work after downgraded to MK2 from NB1.....and u know what..... IT WORKED NOW.... :thumbup:

Swyped From MK2 Dark Venom Hybrid SS Edition
[AT&T Samsung Galaxy S 4 General] Kamaole:
Would a similar fix work for anyone who downgraded from mld and doesnt have audio or has a freezing lockscreen?
[AT&T Samsung Galaxy S 4 General] Maribou:
Glad to help. I learned something new. :cool:

But, we can't forget [MENTION=1375880]dolph8886[/MENTION]. Him and [MENTION=833788]rebel1699[/MENTION] did all the dirty work.

Thanks guys!:good:

---------- Post added at 10:03 PM ---------- Previous post was at 09:46 PM ----------

Has anyone found a fix for the Samsung keyboard force closing?

Or am I the only one having this issue?
[One (M7) Q&A, Help & Troubleshooting] Jamesdbritt:
ok I am new here and I have messed up my phone. I can get to bootloader but i'm lost after that. the PC doesn't see the SD card the phone has TWRP but there isn't anything in it to recover to

what should I do. I see a lot about cmd prompt but I know nothing about getting to the phone that way.
[One (M7) Q&A, Help & Troubleshooting] cr1960:
if you can get to bootloader you're not bricked.

don't fiddle with your phone - just leave it like it is.

someone here who knows way more about this stuff than I do will be able to tell you what you need to do.
[One (M7) Q&A, Help & Troubleshooting] raghav kapur:
get into fastboot mode and type "fastboot getvar all" in Command Prompt without the inverted commas. Post the output AND REMOVE IMEI AND SERIAL NO.

This is necessary to obtain a little more info abt the phone's current condition
[One (M7) Q&A, Help & Troubleshooting] Jamesdbritt:
How do I get into Carrboro from command?

Go step by step like talking to a four year old..Lol I'm 28
[One (M7) Q&A, Help & Troubleshooting] alray:
Download and install latest android sdk http://developer.android.com/sdk/index.html

download in install latest htc sync (for drivers installation) then uninstall it, the drivers still be installed. http://www.htc.com/www/software/htc-sync-manager/

go to the folder you installed the android sdk then ---> sdk/platform-tools. Adb.exe and fastboot.exe should be in this folder. Always work in this folder (where adb and fastboot.exe are).

boot your phone in bootloader mode, select fastboot and connect usb cable to computer

Right click on a blank space in the folder where fastboot/adb are then select ''open a cmd prompt here''

in the command prompt type

fastboot getvar all

and copy paste output here MINUS IMEI AND SN

and please tell us what operating system are you using on your ocmputer? windows 7, 8.0 or 8.1?
[One (M7) Q&A, Help & Troubleshooting] Jamesdbritt:
How do I get into fastboot mode?
[One (M7) Q&A, Help & Troubleshooting] alray:
and how did you messed your phone?

---------- Post added at 03:26 PM ---------- Previous post was at 03:25 PM ----------

when you are in bootloarder mode, select ''fastboot''. use vol up and down to navigate then power button to select.

When in fastboot mode you'll have a screen similar to this with fastboot highlighted in red:
[One (M7) Q&A, Help & Troubleshooting] Jamesdbritt:
When I right click there is no cmd option
[One (M7) Q&A, Help & Troubleshooting] alray:
sry my bad

hold left SHIFT + right click ;)
[One (M7) Q&A, Help & Troubleshooting] Jamesdbritt:
Ok found cmd typed above and it came with a list of commands

Update

Flashall

Etc..
[One (M7) Q&A, Help & Troubleshooting] alray:
please can you make a screenshot of your cmd prompt and post it here? I want to see the command you typed and the ouput
[One (M7) Q&A, Help & Troubleshooting] Jamesdbritt:
commands:

update <filename> reflash device from

flashall flash boot + recove

flash <partition> [ <filename> ] write a file to a f

erase <partition> erase a flash parti

format <partition> format a flash part

getvar <variable> display a bootloade

boot <kernel> [ <ramdisk> ] download and boot k

flash:raw boot <kernel> [ <ramdisk> ] create bootimage an

devices list all connected

continue continue with autob

reboot reboot device norma

reboot-bootloader reboot device into

help show this help mess

options:

-w erase userdata and

if supported by par

-u do not first erase

formatting

-s <specific device> specify device seri

or path to device p

-l with "devices", lis

-p <product> specify product nam

-c <cmdline> override kernel com

-i <vendor id> specify a custom US

-b <base_addr> specify a custom ke

default: 0x10000000

-n <page size> specify the nand pa

2048

-S <size>[K|M|G] automatically spars

an

size. 0 to disable
[One (M7) Q&A, Help & Troubleshooting] alray:
type this command:

fastboot devices

what is the output?
[One (M7) Q&A, Help & Troubleshooting] Jamesdbritt:
C:\Users\James\SDK\adt-bundle-windows-x86_64-20131030\sdk\platform-tools>FASTBO

T GETVAR ALL

usage: fastboot [ <option> ] <command>

commands:

update <filename> reflash device from update.zip

flashall flash boot + recovery + system

flash <partition> [ <filename> ] write a file to a flash partition

erase <partition> erase a flash partition

format <partition> format a flash partition

getvar <variable> display a bootloader variable

boot <kernel> [ <ramdisk> ] download and boot kernel

flash:raw boot <kernel> [ <ramdisk> ] create bootimage and flash it

devices list all connected devices

continue continue with autoboot

reboot reboot device normally

reboot-bootloader reboot device into bootloader

help show this help message

options:

-w erase userdata and cache (and format

if supported by partition type)

-u do not first erase partition before

formatting

-s <specific device> specify device serial number

or path to device port

-l with "devices", lists device paths

-p <product> specify product name

-c <cmdline> override kernel commandline

-i <vendor id> specify a custom USB vendor id

-b <base_addr> specify a custom kernel base address

default: 0x10000000

-n <page size> specify the nand page size. default:

2048

-S <size>[K|M|G] automatically sparse files greater t

an

size. 0 to disable

C:\Users\James\SDK\adt-bundle-windows-x86_64-20131030\sdk\platform-tools>
[One (M7) Q&A, Help & Troubleshooting] alray:
fastboot is case sensitive don't use capitals letter unless specified

type

''fastboot getvar all'' NOT ''FASTBOT GETVAR ALL''

and there is a letter missing at fastboot
[One (M7) Q&A, Help & Troubleshooting] Jamesdbritt:
C:\SDK\ADT\sdk\platform-tools>fastboot devices

FA39DS900733 fastboot

C:\SDK\ADT\sdk\platform-tools>
[One (M7) Q&A, Help & Troubleshooting] alray:
ok so now type ''fastboot getvar all'' DON'T USE CAPITALS!
[One (M7) Q&A, Help & Troubleshooting] Jamesdbritt:
C:\SDK\ADT\sdk\platform-tools>fastboot getvar all

(bootloader) version: 0.5

(bootloader) version-bootloader: 1.55.0000

(bootloader) version-baseband: 1.12.41.1112_2

(bootloader) version-cpld: None

(bootloader) version-microp: None

(bootloader) version-main: 2.10.605.1

(bootloader) version-misc: PVT SHIP S-OFF

(bootloader) serialno: FA39DS900733

(bootloader) imei: xxxxxx

(bootloader) meid: xxxxxx

(bootloader) product: m7_wlv

(bootloader) platform: HBOOT-8064

(bootloader) modelid: PN0731000

(bootloader) cidnum: VZW__001

(bootloader) battery-status: good

(bootloader) battery-voltage: 3769mV

(bootloader) partition-layout: Generic

(bootloader) security: off

(bootloader) build-mode: SHIP

(bootloader) boot-mode: FASTBOOT

(bootloader) commitno-bootloader: dirty-3c88cdd7

(bootloader) hbootpreupdate: 11

(bootloader) gencheckpt: 0

all: Done!

finished. total time: 0.063s

C:\SDK\ADT\sdk\platform-tools>
[One (M7) Q&A, Help & Troubleshooting] alray:
ok so you want to go back to stock rom or you want to install a custom rom?
[One (M7) Q&A, Help & Troubleshooting] Jamesdbritt:
stock right now I know SuperSU is not installed if that means anything

I was having data connection problems before all this started
[One (M7) Q&A, Help & Troubleshooting] alray:
ok so download this file This is the ruu for verizon. Save it to the same folder where adb and fastboot exe are and rename it to ruu (ruu.zip) <----- very important.

then type this: (remember this is case sensitive so respect lower/upper case

fastboot oem rebootRUU

your phone will reboot in RUU mode, you will see a black screen with the HTC logo.

then type:

fastboot flash zip ruu.zip
fastboot flash zip ruu.zip <----- yes the same command twice!
fastboot reboot

Then download the ota updates.

Note that this process

will delete all your personal data

. Your phone will be completely stock like out of the box.
[One (M7) Q&A, Help & Troubleshooting] Jamesdbritt:
I already have ViperOne_5.0.0.zip downloaded but I would like the stock one loaded so I can make a backup of it first
[One (M7) Q&A, Help & Troubleshooting] alray:
so go ahead with what I said in my previous post.

Flash the ruu then aplly ota.

then flash twrp again and make a nandroid backup of your stock rom and flash Viperone after. Good idea to make a copy of your backup on your computer.
[One (M7) Q&A, Help & Troubleshooting] Jamesdbritt:
do I save it to the platform tools folder?

how do I apply over the air updates?

where do I get the TWRP file to flash and how?

make a backup on my PC and what is nandroid?
[One (M7) Q&A, Help & Troubleshooting] alray:
yes, that folder where adb and fastboot are.
[One (M7) Q&A, Help & Troubleshooting] Jamesdbritt:
after the file is downloaded should I extract the files or leave them?
[One (M7) Q&A, Help & Troubleshooting] alray:
no don't extract the zip file. Just rename it ''ruu'' so the complete file name will be ruu.zip
[One (M7) Q&A, Help & Troubleshooting] Jamesdbritt:
how do I apply over the air updates?

where do I get the TWRP file to flash and how?

make a backup on my PC and what is nandroid?
[One (M7) Q&A, Help & Troubleshooting] Jamesdbritt:
[MENTION=4654136]alray[/MENTION] how do I apply over the air updates?

where do I get the TWRP file to flash and how?

make a backup on my PC and what is nandroid?
[One (M7) Q&A, Help & Troubleshooting] alray:
go to settings/about phone/updates, search for ota and aplly them. Note that you need the stock recovery to update your phone so don't flash twrp yet, wait for your device to apply all available ota updates

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

save it to your adb/fastboot folder

fastboot flash recovery <name_of_file>.img
fastboot erase cache
fastboot reboot

A nandroid is a backup you make from twrp. When you have done it, connect your phone to your computer and open the file explorer. Go to twrp folder a copy paste your backup on your computer.
[One (M7) Q&A, Help & Troubleshooting] Jamesdbritt:
C:\SDK\ADT\sdk\platform-tools>fastboot flash zip ruu.zip

target reported max download size of 1526722560 bytes

sending 'zip' (1153811 KB)...

OKAY [ 41.311s]

writing 'zip'...

(bootloader) zip header checking...

(bootloader) shift signature_size for header checking...

FAILED (remote: 32 header error)

finished. total time: 50.401s
[One (M7) Q&A, Help & Troubleshooting] Jamesdbritt:
[MENTION=4654136]alray[/MENTION]

C:\SDK\ADT\sdk\platform-tools>fastboot oem rebootRUU

...

(bootloader) Start Verify: 0

OKAY [ 0.050s]

finished. total time: 0.050s

C:\SDK\ADT\sdk\platform-tools>fastboot flash zip ruu.zip

target reported max download size of 1526722560 bytes

sending 'zip' (1153811 KB)...

OKAY [ 41.351s]

writing 'zip'...

(bootloader) zip header checking...

(bootloader) shift signature_size for header checking...

FAILED (remote: 32 header error)

finished. total time: 41.551s