yashsingh1/xdaforums huggingface dataset:
[Verizon Samsung Galaxy S 4] k1mu:
Here's probably a lot more than you need to know in the way of understanding the issues with AOSP builds and what would need to be done to get more ROMs running on Safestrap.

The Linux kernel that's used by Android is what controls the hardware devices on the phone, manages storage, operates the radios, etc. Those hardware devices are controlled by device drivers. Each device (audio, radio, display, touchscreen, etc.) has a unique device driver that has to be loaded by the kernel for it to work.

Device drivers can be built into the kernel itself, or stored in the file system as a external loadable module. For Android, those modules are stored in /system/lib/modules. One of the devices that uses an external driver module is the wifi chip.

When Safestrap boots a ROM, what it does is wait until the stock ROM starts booting with the stock kernel loaded and in control. It jumps into the picture early enough to "trick" the base kernel into thinking that the root of the file system is actually the base of the ROM slot that you create using Hashcode's tools. Basically, it virtualizes the root of the filesystem into the ROM slot. So now, when that kernel starts running the start-up scripts, it's running the stuff that you installed in the ROM slot, not in the base ROM's area.

So, cool. You can now boot your own ROM. However, once that ROM gets started and tries to turn on the Wifi, it's going to look in the /system/lib/modules directory of your new ROM for the driver for that WiFi device. That's what these module loads do: they populate the modules folder in the active slot so the drivers can be found.

So, what's the problem with using the MDK versions of CM and AOSP under Safestrap? Well, the various frameworks build the Linux kernel with different features enabled. The existing AOSP and CWM builds depend on kernels with the right features enabled to allow the kernel to provide the services it needs. Touchwiz ROMs have similar requirements. So, you can't run the existing GS4 AOSP ROM using a Touchwiz kernel. Now, if we had an unlocked bootloader, we could just flash an AOSP kernel and be done. But on our phones, we can't flash a custom kernel unless you're using MDK. So, until someone modifies those ROMs to use the Touchwiz kernel, no AOSP or CM for Safestrap.

Not all is lost. Similar to the filesystem virtualization that Safestrap uses, there's also a mechanism in Linux to allow a kernel to boot another kernel and hand control to that. That's called kexec. However, the kernel that Samsung ships is quite locked down and will only allow the use of modules and kernels that Samsung has signed. So, the search is on for finding ways of bypassing that signature verification to allow Safestrap to kexec arbitrary kernels.

What Hashcode has done with these pretty tightly locked down devices is impressive. Getting more flexibility without a leak of some kind looks rather unlikely, but never give up hope.
[Verizon Samsung Galaxy S 4] drewski83:
Very good description of how modules and drivers work on Android devices. Why I love this site so much. So many smart individuals, coming together to make this awesome community. "Knowledge is Power"

-Drew
[Verizon Samsung Galaxy S 4] IMGetwired:
No more "Custom" on boot

Easy to do, sir. On your rooted S4:

1) Install Xposed Framework: http://xdaforums.com/showthread.php?t=1574401

2) Install Wanam module: http://xdaforums.com/showthread.php?t=2383484

3) Activate Wanam module

4) Reboot.

5) Open Wanam app, go to Security Options

6) Check "Fake System Status".

Subsequent reboots will NOT show as "Custom".

You're welcome. :)
[Verizon Samsung Galaxy S 4] supr2nr:
Does anyone know if anyone is working on the MI1 modules to fix the auto rotation or is it just thats the way its going to be?
[Verizon Samsung Galaxy S 4] bikedude880:
"Aren't possible" is a really strong statement. And quite frankly wrong.

All I can say is that this section is very wrong. It is 100% possible to run AOSP or CM (slightly modified albeit) on a TW kernel. I'm fairly surprised that no-one has done it yet since the Moto guys proved that it was possible years ago. Yes, we still need to use the stock kernel modules that we were supplied and we also can't (yet) load our own modules, but that does /not/ mean that we will never be able to run a non-TW rom on the device.

The problem with kexec in this instance, as you pointed out, is the module signing. After that you still need developer interest in the phone after kexec is possible (which could be upwards of a year from now).
[Verizon Samsung Galaxy S 4] k1mu:
OK, so I stand corrected - would it be more accurate to say that "you can't run the existing AOSP or CM ROMs on Safestrap because they require a custom kernel"?

That reason for why CM/AOSP won't work - because they're not compatible with the stock kernel - has been stated several times in this forum. Are those assertions corrrect?

Yup. I'm hoping, but not very hopeful, that a fix for this can be found.
[Verizon Samsung Galaxy S 4] bikedude880:
Not entirely. While it /is/ correct that you cannot run an unmodified CM on the stock modules, it is possible to figure out which kernel TW is based on and find the appropriate repos to use for the device. If I had more time I would work on the build I have as it is a POC that CM 10.1 built from source will boot on our devices under Safestrap/ME7.
[Verizon Samsung Galaxy S 4] k1mu:
OK, thanks. I've updated my post to hopefully correct the errors.
[Verizon Samsung Galaxy S 4] UK_Wildcats_Fans:
Great write up. I was just explaining this to someone this weekend and it is a lengthy discussion depending on base knowledge.
[Verizon Samsung Galaxy S 4] michaelg117:
Herr [MENTION=4243514]Hashcode[/MENTION],

Any update on work for flashing 4.3 ROMs through SS?
[Verizon Samsung Galaxy S 4] bikedude880:
Current work (for me) is focused on 4.2.2 as that is the most compatible with our current system.
[Verizon Samsung Galaxy S 4] michaelg117:
Hyperdrive should be upgraded to 4.3 in the coming weeks, that's why I asked.
[Verizon Samsung Galaxy S 4] bikedude880:
If it's based on tw, there should be fewer issues. I'm personally working with source.
[Verizon Samsung Galaxy S 4] michaelg117:
It is tw
[Verizon Samsung Galaxy S 4] bikedude880:
Test out and find out! :P

Looking forward to some original development in the coming months.
[Verizon Samsung Galaxy S 4] michaelg117:
I don't know enough about this kind of stuff to do anything with it. And he hasn't released it yet :P
[Verizon Samsung Galaxy S 4] trook:
Factory reset did it for me
[Verizon Samsung Galaxy S 4] gqskrub:
Is there a way to change default save location for browser/camera to the actual extsdcard and not sdcard?
[Verizon Samsung Galaxy S 4] michaelg117:
Thinking of going back to stock until ss is good for mj7, is there any rooted no wipe Odin zips someone can point me to?
[Verizon Samsung Galaxy S 4] todd3835:
This is exactly why I asked. Coming from HTC devices, many times before the source for the kernel's dropped, we could run AOSP based rom's, but we were stuck on a Sense kernel for a while. Or there were bugs, typically with either camera or wifi (or both). So that's what I was wondering, Is it possible to pair say the current 4.2.2 kernel, with a 4.2.x build of AOSP. Yeah, running KitKat would be awesome, but I'd settle at this point for CM or PAC or something of the sort. Miss having full theme support.....
[Verizon Samsung Galaxy S 4] Lou 270:
I'm puzzled I don't understand why we are not able to run Cynogen mod on SS well I know why but why hasn't anyone made it so we could and I only ask because I used it on my bionic which I was running SS on also and I really hate not being able to flash it since it is my favorite rom ever followed by liberty and eclipse grrrrrrr
[Verizon Samsung Galaxy S 4] decaturbob:
Since devs donate their time mostly..I figure they try to address what most people want. Finding an exploit in gs4 me7 was a difficult task for hash to accomplish... I am glad we have what we got.....

powered by hashcode safestrap hyperdrive 10.2
[Verizon Samsung Galaxy S 4] bikedude880:
Getting CM to boot can be a complex puzzle. A lot of devs I've worked with in the past wouldn't touch CM until it booted on the target device. I'm personally devoting what time I can to solving this puzzle. It booted a couple months ago and now it doesn't, so need to figure out why. Don't expect anything until at least mid-December.

Cheers!
[Verizon Samsung Galaxy S 4] awskier08:
someone should put this in the OP

http://xdaforums.com/showthread.php?t=2496027
[Verizon Samsung Galaxy S 4] bikedude880:
Progress update:

According to logcat the system is fully booted and registers on the cell network. The only blocking bug is that the graphics panel doesn't seem to initialize and therefore there is no display. This causes SurfaceFlinger to loop and ultimately makes the entire system boot-loop. This is a good thing as it means that the time-frame I posted in this previous message has now condensed considerably.

Happy (hacking) holidays.
[Verizon Samsung Galaxy S 4] klick37:
Any chance we can get "jfltevzw-MJ7-modules.zip" so we can try flashing MJ7 roms if we're rooted on MJ7?
[Verizon Samsung Galaxy S 4] Lou 270:
U get it going I will test it or whatever needs to b done
[Verizon Samsung Galaxy S 4] decaturbob:
If I understand correctly, isn't MJ7 Android 4.3? In that case, safestrap will not work yet until Hsh finds an exploit. MJ7 is locked down more so than ME7 was. Having MJ7 module will be of no use yet.
[Verizon Samsung Galaxy S 4] michaelg117:
It may be a long shot but what would we have to do to get MIUI V5 up and running on this?

I'm willing to flash to stock slot if that's what it takes, but I'm sure it will be more then that.
[Verizon Samsung Galaxy S 4] Hashcode:
MI1 modules are in the "Download" section
[Verizon Samsung Galaxy S 4] Hashcode:
Safestrap UPDATE:

I'm back to working on the next version of Safestrap which will hopefully be compatible w/ SELinux enforcing.

I have a loaner MDK S4, so I'm setting up the MJ7 ROM (for MDK users) found here (http://xdaforums.com/showthread.php?t=2517611)

Hopefully, this will leave me with a SElinux enforcing Samsung environment on 4.3 but have the backdoor of being able to go into TWRP and rescue myself as I need to.
[Verizon Samsung Galaxy S 4] decaturbob:
Thanks for update hash.

powered by hashcode safestrap hyperdrive 10.2
[Verizon Samsung Galaxy S 4] bikedude880:
Fantastic news! I really need to get an mdk phone...
[Verizon Samsung Galaxy S 4] ct_tec313:
thank you for trying will be donating soon thank you!!!!!!!
[Verizon Samsung Galaxy S 4] lazer9:
Thanks for the update Hash! Looking forward to your excellent work and progress. Good so far on ME7. Hoping to be able to upgrade when you get things ironed out and most of all be able to upgrade my favorite ROM when it's progression makes it to 4.3 which seems in the future also. :angel:
[Verizon Samsung Galaxy S 4] michaelg117:
Hey guys,

Would it be at all possible to get MIUI running on this?
[Verizon Samsung Galaxy S 4] TheScarySnail:
i will test as well, currently running Eclipse TW edition on my vzw gs4 on MI1, CM 11 would be awesome but i plan on getting a note 3 on att so CM is supposedly coming to that soon on the installer so hopefully that will flash CM 11 and not 10.2
[Verizon Samsung Galaxy S 4] todd3835:
Have they unlocked anything on the Note3? From what I heard, ATT is just as locked down as verizon. If you want something you can flash, T-Mobile is the way to go, then you could use it on ATT
[Verizon Samsung Galaxy S 4] TheScarySnail:
they are locked down, but according to the CM team, there should be installer support soon. and Tmobile only sells unlocked right? that's a lot of money
[Verizon Samsung Galaxy S 4] neur0tk:
Wish these devices were truly unlocked I want CM and custom kernels on my s4 so bad
[Verizon Samsung Galaxy S 4] inkdaddy66:
Same here and I'm sure a lot of us share the same feeling.

53N7 FR0M M4 DMAXX V1A 7A9A7A7K
[Verizon Samsung Galaxy S 4] bikedude880:
CM requires time and patience. The current build I have for SafeStrap does not fully init the graphics. Gralloc and Hwcomposer both load so it's most likely a framework or subsystem issue.
[Verizon Samsung Galaxy S 4] Black6spdZ:
so I'm a little confused.. are we saying SS only works correctly for phones < ME7? I have been running the older GPE ROM on my ME7 S$ and looking for options on something newer.. I see a lot talking about 4.3 based ROMs but I was under the assumption I can only run 4.2.2 TW kernel based ROMs?
[Verizon Samsung Galaxy S 4] k1mu:
Less than MJ7, not ME7. As far as 4.3 ROMs go, there are people porting the 4.3 ROMs to use the existing 4.2.2 kernel.
[Verizon Samsung Galaxy S 4] Black6spdZ:
I know there are firmware's newer than ME7, but thought SS didn't work with those yet, only ME7 based or older?
[Verizon Samsung Galaxy S 4] k1mu:
You said: "are we saying SS only works correctly for phones < ME7?"

That means "Are we saying SS only works correctly for phones less than ME7?"

And "less than ME7" means before ME7, and that means MDK. You don't need Safestrap for < ME7. Safestrap works with ME7 and MI1.

If you still fail to understand, please post a question in the Q&A section. This isn't appropriate here.
[Verizon Samsung Galaxy S 4] bikedude880:
Phones =< ME7
[Verizon Samsung Galaxy S 4] todd3835:
Odd, if CM is coming to the Note 3 on AT&T, I'm guessing it won't be much work to get it working the S4 also.....
[Verizon Samsung Galaxy S 4] ajm2387:
I accidentally flashed over the STOCK slot. Is there anything I can do? The phone is still in recovery and I haven't rebooted yet.
[Verizon Samsung Galaxy S 4] michaelg117:
I'm flashed in stock slot and everything works GREAT. A lot better then using slots. So try just going with it
[Verizon Samsung Galaxy S 4] ajm2387:
Oh, somewhere earlier I read that you shouldn't flash over the stock slot? Maybe it was an older thread. Everything's working great thanks!
[Verizon Samsung Galaxy S 4] Addiso:
It's at your own risk since you don't have a save haven to go to if something messes up, that's the purpose of having slots since it is hijacked you can always go back to your stock.
[Verizon Samsung Galaxy S 4] :
Hmmm, do you have the whole 16 gb internal?
[Verizon Samsung Galaxy S 4] michaelg117:
Yes, but I have no other slots in place, so I'm able to use all 16
[Verizon Samsung Galaxy S 4] decaturbob:
if you want to take OTAs to the stock rom....one reason why to leave it alone...though you can always ODIN . I have HD, Beans 7 and stock rom and no problem with my 16gb phone. I have a 64gb ext-sd card I keep all data on
[Verizon Samsung Galaxy S 4] AlpineMan:
He can always ODIN back to stock ME7 and root/reinstall Safestrap if something happens.

On my Note 3, I also intentionally flashed Hyperdrive on the stock slot cuz I wanted to have full storage use of the phone. The Safestrap splash screen is still there. I can still go in and out of Safestrap. Knox is still showing 0x0. I did a wipe on cache, dalvik, data, and system partition on the stock ROM slot before installing Hyperdrive. It's working great. I intend to do the same thing for my son's S4 when I get the chance.

*** UPDATE ***

I just did my son's S4. It was originally at ME7. Rooted it...then installed Safestrap. Booted to Safestrap, wiped cache, dalvik, data, and system partitions on stock slot. Then installed Hyperdrive on stock slot. Rebooted...reinstalled Safestrap. I can still see the Safestrap splash screen...can go in and out of Safestrap through that splash screen. Hyperdrive ROM working great on stock ROM slot. I have full use of the entire phone's storage.
[Verizon Samsung Galaxy S 4] blustosa:
Hey all,

I´m having a couple of different issues with the safestrap;

in one ROM the phone will lock and when I try to unlock it a black screen will show and it will never truly wake up, although the buttons do light up. It will only go back to normal once I hard reboot it.

And also there is an issue with another ROM in which the wifi will never truly turn on, it will be stuck between turning on and off, not allowing
[Verizon Samsung Galaxy S 4] AlpineMan:
It sounds like an issue with the ROMs you have... Not an issue with Safestrap.
[Verizon Samsung Galaxy S 4] decaturbob:
OK...which Roms r u talking about?

powered by hashcode safestrap hyperdrive 10.2
[Verizon Samsung Galaxy S 4] michaelg117:
I don't know if its a SS issue, but using the latest ss I can't flash Any of [MENTION=4055140]reggie cheeks[/MENTION] themes to HD 10.2

They "install" correctly, but aren't actually applied on boot.

Any suggestions ?
[Verizon Samsung Galaxy S 4] blustosa:
Hyperdrive 10.1 has the issue of not waking up.

Hyperdrive 10.2 has the issue with the wifi.
[Verizon Samsung Galaxy S 4] decaturbob:
you aren't running any type of encryption are u?

also what baseband version is your phone and r we talking verizon or ATT???
[Verizon Samsung Galaxy S 4] blustosa:
No encription, and Vz
[Verizon Samsung Galaxy S 4] decaturbob:
OK...well I have been running HD since hash put out SS without any problems u r describing

I take it you ME7?

I would suggest delete the ROM slot and start completely over . .

Make sure the ROM download is good with MD5 check

Select stock kernel...for safestrap and don't overdue aroma selections.

I also install kernel patch immediately after rom install before first boot even when I select the safestrap kernel option.

After letting phone run for an hour or so, I reinstall apps cleanly and then I restore data only via titanium

Never any problems for me.

powered by hashcode safestrap hyperdrive 10.2
[Verizon Samsung Galaxy S 4] TheScarySnail:
yeah, i accidentally wiped the stock ROM slot without thinking about a month and a half ago and i just had to flash the stock firmware with odin
[Verizon Samsung Galaxy S 4] Quentin.Sheley:
The wifi issue is a known issue with Hyperdrive. If you cannot use wifi you could try to flash the ME7 .zip file that is provided in another thread named "Roms the work with SafeStrap" under the General Android Sections.

I couldn't tell you about the 10.1 version but just so you know there's also a thread created by SBreen made specifically for his ROMs. You could find this under the Q&A sections.
[Verizon Samsung Galaxy S 4] michaelg117:
[MENTION=4243514]Hashcode[/MENTION] ,how's work for 4.3 flashing and compatibility coming along sir? :P
[Verizon Samsung Galaxy S 4] vdub2pt0:
When you guys installed in the stock slot, what did you set the partition sizes to in order to get the full 16 Gb of storage? I only show 9 Gb
[Verizon Samsung Galaxy S 4] AlpineMan:
You don't touch the partition sizes on the stock ROM slot. You automatically get all available storage in this slot.

Even with a stock ROM alone with no Safestrap, you don't get the full 16gb due to overhead.
[Verizon Samsung Galaxy S 4] vdub2pt0:
I thought that was the case. Silly question. Thanks
[Verizon Samsung Galaxy S 4] crazysoccerman:
I'm rooting for you Hashcode to find an MJ7 workaround.

People like you keep the mod community alive while corporations try to crush it.

Thank you for your time and effort :)
[Verizon Samsung Galaxy S 4] Hashcode:
My MJ7 device should probably be here at the end of next week-ish. I'll be able to fix the 4.3 SS function then (hopefully).
[Verizon Samsung Galaxy S 4] Quentin.Sheley:
Awesome!!!
[Verizon Samsung Galaxy S 4] tshelby73:
Sweet. Do you work on su also I'm not sure I trust vroot
[Verizon Samsung Galaxy S 4] todd3835:
Do you mean we will be able to stay on me7 and flash a 4.3 Rom, or install ss on 4.3, our both?
[Verizon Samsung Galaxy S 4] scryan:
install SS on 4.3

running 4.3 on ME7 will need Kexec, which is another step entirely. Right now just get safestrap working for each update.
[Verizon Samsung Galaxy S 4] hakisac78:
Forgive me I'm slow...so safestrap on mj7 means you can install 4.3 roms? For instance hyperdrive rls11?
[Verizon Samsung Galaxy S 4] michaelg117:
Im no dev but i believe this would work because your stock system would still be running on 4.3

[MENTION=4243514]Hashcode[/MENTION] , What if we were to try to flash a 4.3 rom onto our stock slot?

So that technically we have no ME7 Kernel to load up before the rom?

It makes sense that it would work but im not ballsy enough to try it. :P
[Verizon Samsung Galaxy S 4] scryan:
Hell I am slow too...

But yeah the issue I think is that when android is booting the kernel gets loaded by the boot loader.

Hash can trick the boot process to look elsewhere for the system/rom/whatever the official term for it is, but (I think) the kernel was loaded by the boot loader.

With the kernel already loaded, the rom has to use that kernel. If the rom needs additional support from an updated/different kernel then the rom cannot run.

This is why we are limited in roms, we cannot currently install the appropriate kernel for what ever, so we install something that matches what we have.

Once your ugraded to 4.3 and running a 4.3 TW kernel, your safestrap rom will have to match that. So not only will you be able to upgrade to a 4.3 rom... I think you will have to upgrade, as any older rom wont work with your kernel?

kernel

michaelg117,

I was thinking that too to be honest, though I am sure there are reasons it wont work...I know the bootloader loads a kernel, but is that the main kernel it loads? Is bootloader modified with each patch? Does it load a particular, signed file so that when we flash the kernel wouldn't be found?

I mean I would hope someone would have thought of that and given that safestrap has been used on many other devices I would think hash would have realized this was an option... because at that point we would basically have a full custom recovery.
[Verizon Samsung Galaxy S 4] michaelg117:
Well, the way I understood it to work was it basically loaded your stock slots kernel, then your ROM slots ROM.

And when I flashed HD to the stock slot I went with stock optimized kernel, which I went snooping around in the files and seems to be the only possible kernel for my phone to be booting from.

So, it seems that once we have a SS built by Mr. [MENTION=4243514]Hashcode[/MENTION] , that is enabled and/or capable of flashing 4.3 ROMs, it'll just work. Hell. It might work now, but I'm not ballsy enough to try it as I rely on my phone too much.

Hopefully someone else here will be willing to try that out.

Although.. I could be absolutely incorrect on every scale as well. Either way, I think it should still be tested :P
[Verizon Samsung Galaxy S 4] Lou 270:
What is the process of flashing a rom in the stock slot and does it really help with memory and performance
[Verizon Samsung Galaxy S 4] jackcarroll3:
Less memory, performance about the same. It gives you security by leaving the stock rom in the main slot.
[Verizon Samsung Galaxy S 4] Quentin.Sheley:
And if you like to tamper with the ROM a lot then it can give you an " emergency " safe mode if you want to say.
[Verizon Samsung Galaxy S 4] Lou 270:
Either I am not understanding or I didn't make my self clear but I thought I read where some one or some people flashed a rom (Hyperdrive) in the stock slot not 123or 4 but the slot where your stock phone is and I wanted to know if that was true and does it hold any value when doing it
[Verizon Samsung Galaxy S 4] Quentin.Sheley:
Yes people do, but I was saying that doing so takes away your back up and he was saying it only saves space on your internal memory. There is no noticeable difference to performance. I have not done this due to wanting to keep my stock but once the MJ7 safe strap comes out I probably will because you can just re Odin your phone.
[Verizon Samsung Galaxy S 4] Lou 270:
Ok thank you I'm a little slow and I want to fully understand what I'm doing plus I have never done Odin due to the fact I don't know which on to get or where to get the file to flash but I have done rsd to my other phones a million times and the two look similar but thanks for the tips
[Verizon Samsung Galaxy S 4] Quentin.Sheley:
Yeah do some searching on here for Odin tips. Hope all goes well.