[ROM][AOSP][CM][SafeStrap]Cyanogenmod 11 for SafeStrap with locked bootloaders

Search This thread

AlaskaLinuxUser

Senior Member
Oct 23, 2015
1,950
4,098
Fairbanks
alaskalinuxuser3.ddns.net
Hmmmm, that's interesting. CM11 is missing most of the init scripts in the SS AOSP roms in the system. Have you tried slapping the missing scripts in to see what happens?

I have put them in and updated the OP with a download link for the new zip. It does not have an immediate effect, but it will most likely help. I added some details to the change log also. This may have been why our other attempts / changes did not work....
 

AlaskaLinuxUser

Senior Member
Oct 23, 2015
1,950
4,098
Fairbanks
alaskalinuxuser3.ddns.net
Not all of the Qcom scripts are helping!

So after some testing, I have learned that while all of those scripts were missing, and most of them are in other SS roms, like the GPE roms, not all of those scripts are helpful.

The Bluetooth fails because of the BT and BTDUN qcom scripts, so I have removed them and the Bluetooth once again works. I have updated the OP with a new link.

This does help us though, because we can start using/ruling out some of the scripts that don't apply to this particular rom.

Happy Easter!
 

AlaskaLinuxUser

Senior Member
Oct 23, 2015
1,950
4,098
Fairbanks
alaskalinuxuser3.ddns.net
This works on other AOSP roms also!

Team,
While I do not wish to get distracted from the CM11 SS mod we are building, I did take some time this weekend to apply some of our "workarounds" to another AOSP Kit Kat rom. In this case I tested out AOKP. It would appear that JFLTE Unified development AOSP roms can also be used in SS using the tools we have figured out so far. While there were other bugs present, and some more functional items, the AOKP did boot, and functioned. In that case, the WiFi would work to scan for networks, but would fail if you tried to connect, and the internal storage did not mount properly. So, I do think that the principles of our work here will open up some new avenues for the SGS4 with the locked bootloader.

Now if we could just figure out the cellular part........
 
  • Like
Reactions: Lpfan83

AlaskaLinuxUser

Senior Member
Oct 23, 2015
1,950
4,098
Fairbanks
alaskalinuxuser3.ddns.net
Logcat errors

Logcat issues and as much of a breakdown as I can discern:

<6>[ 314.568237] MDP: unknown ioctl (cmd=40146da2) received!
According to https://code.google.com/p/android/issues/detail?id=63823 this is a problem with the graphical interface. Probably related to why we need to check Disable HW overlays, and why it imporves performance to check force GPU rendering.

<3>[ 314.969726] hsicctl hsicctl0: rmnet_ctl_open: Timeout opening hsicctl0
As far as I can tell, this reference is for rmnet, or the cellular interface. It requires opening /dev/hsicctl0. Which, I have verified does exist in our /dev tree on CM11. However, it obviously has an issue opening it and eventually gives up. It later will attempt to open it several more times, as seen in the logcat, and subsequently fails.

Relevant files:
Code:
/dev/hsicctl3
/dev/hsicctl2
/dev/hsicctl1
/dev/hsicctl0

/sys/devices/virtual/hsicctl
/sys/devices/virtual/hsicctl/hsicctl0
/sys/devices/virtual/hsicctl/hsicctl0/dev
/sys/devices/virtual/hsicctl/hsicctl0/power
/sys/devices/virtual/hsicctl/hsicctl0/power/control
/sys/devices/virtual/hsicctl/hsicctl0/power/runtime_active_time
/sys/devices/virtual/hsicctl/hsicctl0/power/autosuspend_delay_ms
/sys/devices/virtual/hsicctl/hsicctl0/power/runtime_status
/sys/devices/virtual/hsicctl/hsicctl0/power/runtime_suspended_time
/sys/devices/virtual/hsicctl/hsicctl0/subsystem
/sys/devices/virtual/hsicctl/hsicctl0/uevent
/sys/devices/virtual/hsicctl/hsicctl0/modem_wait
/sys/devices/virtual/hsicctl/hsicctl1
/sys/devices/virtual/hsicctl/hsicctl1/dev
/sys/devices/virtual/hsicctl/hsicctl1/power
/sys/devices/virtual/hsicctl/hsicctl1/power/control
/sys/devices/virtual/hsicctl/hsicctl1/power/runtime_active_time
/sys/devices/virtual/hsicctl/hsicctl1/power/autosuspend_delay_ms
/sys/devices/virtual/hsicctl/hsicctl1/power/runtime_status
/sys/devices/virtual/hsicctl/hsicctl1/power/runtime_suspended_time
/sys/devices/virtual/hsicctl/hsicctl1/subsystem
/sys/devices/virtual/hsicctl/hsicctl1/uevent
/sys/devices/virtual/hsicctl/hsicctl1/modem_wait
/sys/devices/virtual/hsicctl/hsicctl2
/sys/devices/virtual/hsicctl/hsicctl2/dev
/sys/devices/virtual/hsicctl/hsicctl2/power
/sys/devices/virtual/hsicctl/hsicctl2/power/control
/sys/devices/virtual/hsicctl/hsicctl2/power/runtime_active_time
/sys/devices/virtual/hsicctl/hsicctl2/power/autosuspend_delay_ms
/sys/devices/virtual/hsicctl/hsicctl2/power/runtime_status
/sys/devices/virtual/hsicctl/hsicctl2/power/runtime_suspended_time
/sys/devices/virtual/hsicctl/hsicctl2/subsystem
/sys/devices/virtual/hsicctl/hsicctl2/uevent
/sys/devices/virtual/hsicctl/hsicctl2/modem_wait
/sys/devices/virtual/hsicctl/hsicctl3
/sys/devices/virtual/hsicctl/hsicctl3/dev
/sys/devices/virtual/hsicctl/hsicctl3/power
/sys/devices/virtual/hsicctl/hsicctl3/power/control
/sys/devices/virtual/hsicctl/hsicctl3/power/runtime_active_time
/sys/devices/virtual/hsicctl/hsicctl3/power/autosuspend_delay_ms
/sys/devices/virtual/hsicctl/hsicctl3/power/runtime_status
/sys/devices/virtual/hsicctl/hsicctl3/power/runtime_suspended_time
/sys/devices/virtual/hsicctl/hsicctl3/subsystem
/sys/devices/virtual/hsicctl/hsicctl3/uevent
/sys/devices/virtual/hsicctl/hsicctl3/modem_wait

<3>[ 341.679626] mmc1: CMD52: Command CRC error
According to http://forum.xda-developers.com/showthread.php?t=2579229&page=223 these errors appear to relate to the mmcblk storage and/or filesystems. There are some differences seen in this comparison between a regular SS rom and the CM11SS rom:

Code:
OmegaRom
Filesystem               Size     Used     Free   Blksize
/dev                   908.7M    72.0K   908.6M   4096
/dev                   908.7M    72.0K   908.6M   4096
/sys/fs/cgroup         908.7M    12.0K   908.7M   4096
/sys/fs/cgroup         908.7M    12.0K   908.7M   4096
/mnt/secure            908.7M     0.0K   908.7M   4096
/mnt/secure/asec        59.7G    23.2G    36.5G   131072
/mnt/secure            908.7M     0.0K   908.7M   4096
/mnt/secure/asec        59.7G    23.2G    36.5G   131072
/mnt/secure/asec        59.7G    23.2G    36.5G   131072
/mnt/asec              908.7M     0.0K   908.7M   4096
/mnt/asec              908.7M     0.0K   908.7M   4096
/mnt/asec/com.quoord.tapatalkxda.activity-1     5.0M     3.8M     1.2M   4096
/mnt/obb               908.7M     0.0K   908.7M   4096
/mnt/obb               908.7M     0.0K   908.7M   4096
/datamedia               9.7G     5.2G     4.5G   4096
/ss                      9.7G     5.2G     4.5G   4096
/system                  2.7G     1.7G   938.4M   4096
/data                    2.4G     1.4G     1.0G   4096
/cache                 298.6M     3.5M   295.1M   4096
/efs                    13.4M     4.3M     9.2M   4096
/persdata/absolute       8.9M     4.1M     4.8M   4096
/firmware               86.0M    11.5M    74.4M   16384
/firmware-mdm           86.0M    49.6M    36.3M   16384
/mnt/shell/container     2.4G     1.4G     1.0G   4096
/mnt/shell/emulated      2.4G     1.5G   911.7M   4096
/storage/emulated      908.7M     0.0K   908.7M   4096
/mnt/media_rw/extSdCard    59.7G    23.2G    36.5G   131072
/storage/extSdCard      59.7G    23.2G    36.5G   131072
/storage/emulated/0      2.4G     1.5G   911.7M   4096

CM11SS
Filesystem               Size     Used     Free   Blksize
/dev                   908.7M   136.0K   908.6M   4096
/sys/fs/cgroup         908.7M    12.0K   908.7M   4096
/mnt/secure            908.7M     0.0K   908.7M   4096
/mnt/secure/asec       908.7M     0.0K   908.7M   4096
/mnt/asec              908.7M     0.0K   908.7M   4096
/mnt/obb               908.7M     0.0K   908.7M   4096
/system                  2.7G   454.4M     2.2G   4096
/data                    9.7G     5.2G     4.5G   4096
/cache                   2.0G    39.0M     2.0G   4096
/efs                    13.4M     4.3M     9.2M   4096
/persdata/absolute       8.9M     4.1M     4.8M   4096
/firmware               86.0M    11.5M    74.4M   16384
/firmware-mdm           86.0M    49.6M    36.3M   16384
/storage/extSdCard      59.7G    23.2G    36.5G   131072
/mnt/shell/container     9.7G     5.2G     4.5G   4096
/mnt/shell/emulated      9.7G     5.2G     4.5G   4096
/storage/emulated      908.7M     0.0K   908.7M   4096
/storage/emulated/0      9.7G     5.2G     4.5G   4096
/storage/emulated/legacy     9.7G     5.2G     4.5G   4096
/storage/emulated      908.7M     0.0K   908.7M   4096
/storage/emulated/0      9.7G     5.2G     4.5G   4096
/storage/emulated/0/Android/obb     9.7G     5.2G     4.5G   4096
/storage/emulated/legacy     9.7G     5.2G     4.5G   4096
/storage/emulated/legacy/Android/obb     9.7G     5.2G     4.5G   4096

<4>[ 341.688049] bcmsdh_sdmmc: Failed to Write byte F1:mad:0x1001f=01, Err: -84
http://talk.radxa.com/topic/1073/bcmsdh_sdmmc-read-write-errors-in-dmesg/3 Shows this error as being related to the WiFi or Bluetooth driver. The WiFi and Bluetooth both work, so I don't know if this is a valid concern.

<6>[ 367.801483] binder: 1031:1447 transaction failed 29189, size 4-0
<6>[ 367.801544] binder: send failed reply for transaction 9357, target dead
These are binder issues http://elinux.org/Android_Binder that cause a breakdown in the IPC, or inter process communication. This may be a problem, but it is sporatic in the logcat.

So my goal is to focus on the hsicctl0 error, as I feel this is the most relavent for our inability to use the cellular.
 
  • Like
Reactions: Sterben Pistole

AlaskaLinuxUser

Senior Member
Oct 23, 2015
1,950
4,098
Fairbanks
alaskalinuxuser3.ddns.net
Team,
In this case I tested out AOKP. It would appear that JFLTE Unified development AOSP roms can also be used in SS using the tools we have figured out so far. While there were other bugs present, and some more functional items, the AOKP did boot, and functioned........

So, more to learn, more information to share:

An oddity to me while attempting to use the settings menu in CM11 is that it crashes anytime you look at the mobile network settings. It also crashes if you try to look at "about phone" in settings. The text messaging app, message, also crashes when you try to open it. Before today, I had concluded that these errors happened because the radio was not on, causing a crash condition. Now I realize that this is not so.

While testing AOKP KK, all of the above work, despite the fact that there is not a working modem/radio yet. While the radio does not function, you can still open the message app, you can still look at the mobile network and about phone settings.

Likewise, if you remove the sim card completely from any rom, you can still access these settings and apps. It would appear to me that these apps and settings have an error unrelated to the communication with the radio/sim card issue.

It may be that the base rom I chose for porting has issues of its own. To be honest, since I do not have an unlocked bootloader, I am unable to test the original nightly to see if it works under normal conditions. If anyone with an unlocked bootloader or loki-enabled bootloader would like to try it and report back to me, here is the original nightly:
http://www.mediafire.com/download/77m4w21caj0ib7z/cm-11-20151115-NIGHTLY-jflte.zip

And if such an individual was willing, here is a link to the new nightlies for the JFLTE phones:
https://download.cyanogenmod.org/?device=jflte

That would be very helpful to us as you could let us know if the original nightlies have a working radio.
 
  • Like
Reactions: Sterben Pistole

Evant28

Member
Jan 22, 2013
34
37
Welp, we can't let this die so easily...
Has anyone looked at the report crash button logs? It has a bunch of stuff that I haven't been able to make much sense of but maybe someone who knows more can.
 
  • Like
Reactions: cicuye

AlaskaLinuxUser

Senior Member
Oct 23, 2015
1,950
4,098
Fairbanks
alaskalinuxuser3.ddns.net
The problem is not Safe Strap.

As most could probably already assure us, I have proven to myself that the problem with the radio/cellular is not SafeStrap.

I took the time to test both the original nightlies, and our custom rom, as well as a few others without SafeStap by using Flashfire. Flashfire works great by the way. However, the outcome was exactly the same as what we saw in SafeStrap. So, that rules out SafeStrap as having any negative affect on this rom.

Unfortunately, that took a lot of my time, as after these sort of tests I have to rebuild my phone from the ground up. Especially in some of the roms/nightlies where wifi or internal/external storage was not working, and I could not load SafeStrap (because it was wiped) or Flashfire (because I could not load the app).

While I am still working on this, it would seem that unless we get some more assistance, an immediate fix is doubtful. :(
 

AlaskaLinuxUser

Senior Member
Oct 23, 2015
1,950
4,098
Fairbanks
alaskalinuxuser3.ddns.net
No longer actively developed.

Sorry to have to post this, but we can't figure it out.

We've come to a brick wall. We got the rom loading, and several features working, but we can't get the cellular to function. As you know, a cell phone that can't make phone calls isn't worth a whole lot.

We just wanted to let you know that we have officially stopped work on this project. The links will stay up for as long as there is space on my media fire account, and any reading this are welcome to download and play with this as much as you like. You are also welcome to borrow and use anything we've put into the rom if it helps you do anything in your roms.

We apologize for any dashed hopes, ours went down in flames too.
 

AlaskaLinuxUser

Senior Member
Oct 23, 2015
1,950
4,098
Fairbanks
alaskalinuxuser3.ddns.net
Seems like a preety old thread . but I have an old s4 that I can use, I currently have a note 5,

So what am I saying?
I'm going to try and get CM11 on Safestrap
What are the chances of it working?
I have some experience in ROM development I'm running my own ROM rn on my note 5.

So I thought I'd give this thread some fresh air :D


I no longer have an att s4, but anything I can do to help, just let me know.

Looking back now, this *may* be doable as is.

At the time, we were flashing other modems and boot loader to try to get this working, but that failed. However, now I build roms for the note edge, which requires that I flash data zips to make them work on other variants. Perhaps, if I send you the data zip, but you use the files from your stock att s4, you can flash it after flashing the rom to make the cell work.

Also, task 650’s AOKP kk worked very well for this project also, but has the same issues.

Hope that helps.
 
  • Like
Reactions: darazor

AlaskaLinuxUser

Senior Member
Oct 23, 2015
1,950
4,098
Fairbanks
alaskalinuxuser3.ddns.net
I no longer have an att s4, but anything I can do to help, just let me know.

Looking back now, this *may* be doable as is.

At the time, we were flashing other modems and boot loader to try to get this working, but that failed. However, now I build roms for the note edge, which requires that I flash data zips to make them work on other variants. Perhaps, if I send you the data zip, but you use the files from your stock att s4, you can flash it after flashing the rom to make the cell work.

Also, task 650’s AOKP kk worked very well for this project also, but has the same issues.

Hope that helps.
The 0326 version is still up on media fire, if you need to download it.
 
  • Like
Reactions: darazor

AlaskaLinuxUser

Senior Member
Oct 23, 2015
1,950
4,098
Fairbanks
alaskalinuxuser3.ddns.net
i opened up a github repo for this. "https://github.com/Leoism/android_device_samsung_SafeStrap_jflteatt" you can check here. this is my secondary project so i only do this when i have time. but one question did u guys ever have any type of sources? as i searched and saw nothing

---------- Post added at 04:40 AM ---------- Previous post was at 04:34 AM ----------

oh and i remembered u said something aboout a unified jflte build. Do u know if there were any sources for that too?

Great questions.

Um no we didn't use source, we were porting from jflte unified build ROMs.

So we too already built jflte ROMs, downloaded them and modified the files in the zip and flashed them.
 
Last edited:
  • Like
Reactions: darazor

Top Liked Posts

  • There are no posts matching your filters.
  • 6
    [ NO LONGER ACTIVELY BEING DEVELOPED - SORRY, READ THE POSTS FOR INFORMATION ]

    Yes, you read that right. What we have here is a semi-functional CM11 (Kit Kat 4.4.4) for those with the locked boot loader using Safe Strap. I have been working on this for about a month, and this is what has come of that work. However, I need some help. I am not Android savvy enough to fix all of these problems to make this a fully functioning phone.
    That being said, the phone does boot up and appears to mostly work. At this time, it is not a stable daily driver.
    I did search all the threads, and I believe that this is not covered in another thread, so please forgive me if there is another CM11 thread that is for SS users on AT&T's locked boot loader phones. I don't see any.

    How I got here:
    Well, I wanted Cyanogenmod on my AT&T locked boot loader Safe Strapped phone. Every thread says we can't do that, and I just don't like hearing people tell me we can't do something and not provide any reasons. So I decided to try for myself. For the most part, they are right, but with enough perseverance, anything could happen.
    I wanted to still use my phone as my daily driver, so I needed SafeStrap to work without having to bounce between kernels.
    I was currently using Safe Strap with the NB1/NC1 kernels, and running Joe-Tech's GPE 4.4.4, so I decided that I should start with a 4.4.4 variant of CM, which lead me to CM11. I tried all of them, the nightlies, the home builds, the official builds, and I stumbled across one particular CM11 nightly (20151115) that would boot and then crash as soon as it booted. So I decided to use that as a base.
    Reviewing the situation/logs/errors after each crash, I slowly removed, edited, or replaced something until it would not receive that error and would move on to the next error. By the grace of God it was slowly coming together! Hence why the built in camera app is gone and replaced with open camera, etc.
    If we get this working, we may be able to use these hacks or tricks to get higher versions such as CM12 or perhaps (fingers crossed) CM13. I know this is kind of lofty, but perhaps we could get something going here. Once we identify the key problems, perhaps we can also apply these tricks to other AOSP variants, such as Slim Roms.
    However, let's stick to putting one foot in front of the other right now and focus on CM11.

    The Setup:
    AT&T boot loader locked phone with NB1/NC1 kernel and modules flashed.
    Safe Strap 3.75, currently using Rom Slot 1 for this, as my daily driver is on the stock slot, however I have done it both ways, and it works either way.
    Download the below CM11 zip and put it on your phone.
    In Safe Strap, choose stock or rom slot, then wipe and flash the CM11 zip.
    After flashing the zip, flash the wifi modules for your kernel.

    Once it boots:
    Go to the settings->about phone->tap on build to enable developer mode.
    Then, in developer menu, choose "Disable HW overlays" to always use GPU for screen compositing. (To improve graphics performance, you may find playing with the other graphics options help also.)
    Then disable the lock screen by changing "slide" to "none" (To prevent sleep of death until we fix it.) Thanks @Sterben Pistole

    Temporary Root:
    Simply open the KingoRoot app and click on the padlock. This will take roughly 3-5 minutes, but it will successfully give you root permissions. After reboot, root permission will be lost, but you can simply open KingoRoot and give yourself root permissions again.

    Download link:
    http://www.mediafire.com/download/at7iw100uawi74k/CM11-20160322-SS.zip
    OR This version, which includes the qcom scripts (testing):
    http://www.mediafire.com/download/nb98rtkk2j0vjpa/CM11-20160326-SS.zip

    Screenshots:

    Check the following posts for issues and known working items. If you have an idea of how to solve the item, the best thing to do would be to download this CM11 and try it out. If you can't do that, or if you did and found a solution, just post your thoughts/trials/2 cents here in the forum and we can hopefully integrate it into the final product!

    Team Members and Contributors: (People who have contributed to the project.)
    @Sterben Pistole
    @Evant28

    Beta testers: @DeadlySin9

    Huge special thanks to @jmsq and @Joe-Tech for permission to use things we need from their GPE roms!
    3
    No problem, it was a pleasure working for you guys. Good luck with the project, i can see success already:good::D:p
    3
    I'm really glad you guys still supporting this device, finally a taste of CM. Nice job guys, keep up the good work:p
    Too late for a third?[emoji14]

    Sent from my GT-I9505G using Tapatalk
    3
    To be fair, some of those people saying it wasn't possible did specify that it would require plenty of work that most people don't want to/can't do. Kitkat probably is the best option since we did get those GPE's working though, and I certainly applaud your efforts. I'm no developer myself or I'd help out, but I think a good way to get some things working since we can't change the kernel is to try and build and load modules for it using bypasslkm. I don't know the viability of that, but I know at least for the storage issue I've seen a case where a module was loaded in order to allow mounting.
    2
    Known problems

    Here is a list of the Known issues:

    SYSTEM:
    -USB - MTP, UMS, and PTP are not currently working properly. The PTP may be working, but my Linux computer cannot connect to it. The UMS will not mount. The MTP says the connection is taking too long and resets (on my computer).
    -Sleep of Death - Lock screen causes sleep of death and reboot errors. Must disable the lock screen to prevent this. Thanks @Sterben Pistole !
    -Mounting external SD card - Currently the extSdCard is mounted, however it requires root privileges to use it.
    -SU - Currently, @Sterben Pistole has found a SU temporary work around, however, it is lost on reboot.
    -GPS - Not currently functioning.
    -APN settings - Since that portion of the settings crashes, I thought we could edit the xml file directly and set a default option for the carrier of choice. Not ideal, but perhaps a good work around?
    -TeleService.apk has been removed, it causes too many crashes, this apk is really important for phone calls/radio control, so this would really need to be replaced.

    APPS:
    -GPS Status - The app works, but GPS does not appear to be functioning.
    -Messaging - Crashes when you open it. I think due to settings issue with connectivity to network.
    -Settings - Mostly works, a few settings options cause it to crash, most importantly, the mobile network settings for APN's etc. crashes.
    -Torch - Torch apk does not function at this time. Found that during CM kernel init, changes are made to facilitate the torch.apk, which are not done by the stock kernel init. However, it is possible that these could be written in as a init.d script.