help with bypasslkm for surges nc5>mk2

Search This thread

JTSDeveloper

Member
Apr 28, 2014
28
2
can someone explain how to use bypasslkm in further detail. i looked through multiple threads but im stilll not getting the handle on it,
 

sfgrimes

Member
Aug 31, 2012
27
16
127.0.0.1
Open your terminal emulator on your phone (download one from Google play if you don't have one) open the terminal and type the following commands (Pressing enter to execute each one)

su (sands for switch user, used alone will switch you to the "root" user. Equilivent to Admin in windows)

cd /data/local/temp (cd - change directory, followed by the complete folder path you want to navigate to)

chmod 755 bypasslkm (not going to get too in depth with this one because I could go on for a while with it but "chmod 755" changes the permissions to read, write, execute for the root user and read/execute for everyone else)

. /bypasslkm (. / tells the system to look in the current directory and, in this case, execute bypasslkm)

Hope this helps clear some things up for you! :)

Sent from my SCH-I545 using XDA Premium HD app
 

JTSDeveloper

Member
Apr 28, 2014
28
2
Open your terminal emulator on your phone (download one from Google play if you don't have one) open the terminal and type the following commands (Pressing enter to execute each one)

su (sands for switch user, used alone will switch you to the "root" user. Equilivent to Admin in windows)

cd /data/local/temp (cd - change directory, followed by the complete folder path you want to navigate to)

chmod 755 bypasslkm (not going to get too in depth with this one because I could go on for a while with it but "chmod 755" changes the permissions to read, write, execute for the root user and read/execute for everyone else)

. /bypasslkm (. / tells the system to look in the current directory and, in this case, execute bypasslkm)

Hope this helps clear some things up for you! :)

Sent from my SCH-I545 using XDA Premium HD


I keep getting a message saying that there is no such directory after trying to execute "chmod 755 bypasslkm"
 
Last edited:

Surge1223

Recognized Contributor
Nov 6, 2012
2,622
7,466
Florida
Google Pixel 6 Pro
To add to the above post, after downloading that just execute this in terminal

Code:
su
mount -o remount,rw /system
find . -name "bypasslkm" -exec cp {} /data/local/tmp \;
find /data/local/tmp -name "bypasslkm" -type f -exec chmod 755 {} \;
./data/local/tmp/bypasslkm
insmod /system/lib/modules/dhd.ko
exit
 

JTSDeveloper

Member
Apr 28, 2014
28
2
To add to the above post, after downloading that just execute this in terminal

Code:
su
mount -o remount,rw /system
find . -name "bypasslkm" -exec cp {} /data/local/tmp \;
find /data/local/tmp -name "bypasslkm" -type f -exec chmod 755 {} \;
./data/local/tmp/bypasslkm
insmod /system/lib/modules/dhd.ko
exit

I got the following error trying to execute after downloading the bypasslkm file and doing what you said
 

Attachments

  • Screenshot_2014-05-17-16-40-30.png
    Screenshot_2014-05-17-16-40-30.png
    116.3 KB · Views: 149

Surge1223

Recognized Contributor
Nov 6, 2012
2,622
7,466
Florida
Google Pixel 6 Pro
I got the following error trying to execute after downloading the bypasslkm file and doing what you said

Thats not an error. If you had bypasslkm anywhere on your phone, it should now be in /data/local/tmp with the right permissions and should have executed. Make sure you downloaded the bypasslkm binary linked above

Edit: Also just copy and paste the whole script to make things easier

Sent from my SCH-I545 using XDA Premium 4 mobile app
 

JTSDeveloper

Member
Apr 28, 2014
28
2
Thats not an error. If you had bypasslkm anywhere on your phone, it should now be in /data/local/tmp with the right permissions and should have executed. Make sure you downloaded the bypasslkm binary linked above

Edit: Also just copy and paste the whole script to make things easier

Sent from my SCH-I545 using XDA Premium 4 mobile app

It's still not working. Any ideas? Should I move it directly into /data/local/tmp
 

JTSDeveloper

Member
Apr 28, 2014
28
2
Thats not an error. If you had bypasslkm anywhere on your phone, it should now be in /data/local/tmp with the right permissions and should have executed. Make sure you downloaded the bypasslkm binary linked above

Edit: Also just copy and paste the whole script to make things easier

Sent from my SCH-I545 using XDA Premium 4 mobile app
I downloaded the binary from above and pasted it directly in data/local/tmp then tried it and it still didn't work :/ what should the permissions on the file be? I'm a noob at this stuff
 

k1mu

Senior Member
Apr 11, 2011
1,945
1,620
Virginia
I downloaded the binary from above and pasted it directly in data/local/tmp then tried it and it still didn't work :/ what should the permissions on the file be? I'm a noob at this stuff

The permissions should be 755, as Surge said.

If you KNOW it's in /data/local/tmp, then do this in a terminal emulator window:
Code:
su
mount -o remount,rw /system
chmod 755 /data/local/tmp/bypasslkm
/data/local/tmp/bypasslkm
insmod /system/lib/modules/dhd.ko
mount -o remount,ro /system
exit

If this doesn't work, DO NOT post just "it didn't work". Say what you did, why you think it failed. Capture the output and reply here with it.
 

EinGlo

Member
May 18, 2014
13
2
Solution to the 755 bypasslkm issue!!!!!

The permissions should be 755, as Surge said.

If you KNOW it's in /data/local/tmp, then do this in a terminal emulator window:
Code:
su
mount -o remount,rw /system
chmod 755 /data/local/tmp/bypasslkm
/data/local/tmp/bypasslkm
insmod /system/lib/modules/dhd.ko
mount -o remount,ro /system
exit

If this doesn't work, DO NOT post just "it didn't work". Say what you did, why you think it failed. Capture the output and reply here with it.

I figured it out! Here is exactly what I did:

after downloading the bypasslkm.bin from the dropbox link, I used ES File Explorer (WITH ROOT ENABLED) to move the bypasslkm file to directly to the data/local/tmp location. NOTE: there are a few places marked "data" and "local" on the phone, so when you open a "data" folder, make sure you find the path in the right order [ i.e. first data, then local, and then tmp]

Using a ROOT FILE EXPLORER app (because ES doesn't have what you will need) go to the bypasslkm file, long press, and select permissions. It will display with permissions are currently set. At the bottom, it SHOULD display the total sum of the permissions selected. Basically, that means by selecting the right boxes, you can change the permissions to 755 !

7 5 5
user group world
r+w+x r+x r+x
4+2+1 4+0+1 4+0+1 = 755

These setting will give you the 755 that you need to pull this off .

When you have the permissions changed to 755, the last step was actually very easy. But if you want to play it safe, then I will tell you the root file browser I specifically used to do the last step.

I used the app Root Browser version 2.2.3 ( i literally googled for any generic root file explorer and this came up )

ok, so when you have the permissions changed, long press on the bypasslkm file.
select "Open With" and then select the option "Open As.."
At the bottom of the options is "script file" select it.
after doing so, select the option "Execute" and... Voila! I immediately regained my WIFI !!!!! \>w</

I hope this guide helped everyone out. I tried to be as specific as possible.
 
  • Like
Reactions: JTSDeveloper

JTSDeveloper

Member
Apr 28, 2014
28
2
I figured it out! Here is exactly what I did:

after downloading the bypasslkm.bin from the dropbox link, I used ES File Explorer (WITH ROOT ENABLED) to move the bypasslkm file to directly to the data/local/tmp location. NOTE: there are a few places marked "data" and "local" on the phone, so when you open a "data" folder, make sure you find the path in the right order [ i.e. first data, then local, and then tmp]

Using a ROOT FILE EXPLORER app (because ES doesn't have what you will need) go to the bypasslkm file, long press, and select permissions. It will display with permissions are currently set. At the bottom, it SHOULD display the total sum of the permissions selected. Basically, that means by selecting the right boxes, you can change the permissions to 755 !

7 5 5
user group world
r+w+x r+x r+x
4+2+1 4+0+1 4+0+1 = 755

These setting will give you the 755 that you need to pull this off .

When you have the permissions changed to 755, the last step was actually very easy. But if you want to play it safe, then I will tell you the root file browser I specifically used to do the last step.

I used the app Root Browser version 2.2.3 ( i literally googled for any generic root file explorer and this came up )

ok, so when you have the permissions changed, long press on the bypasslkm file.
select "Open With" and then select the option "Open As.."
At the bottom of the options is "script file" select it.
after doing so, select the option "Execute" and... Voila! I immediately regained my WIFI !!!!! \>w</

I hope this guide helped everyone out. I tried to be as specific as possible.
worked perfectly and all my confusion is now gone thank you.
 

EinGlo

Member
May 18, 2014
13
2
Fix works but new issue

worked perfectly and all my confusion is now gone thank you.


Thanks for the support. Glad I could help. Has your WIFI remained on, though? The solution I posted works, but only for a short amount of time. rebooting the system undoes the work I did and I have to go back into the root browser and execute the file all over again to get wifi.

Can Surge or someone else offer any expertise?

with the permissions changed properly, I tried executing the code, and still not working.

I have safestrap enabled, and I have sound restored. I am currently on android 4.3 from the downgrade provided by Surge. Its rooted.
If I were to upgrade to the rooted version of NC5, would that help fix the wifi issue, or would it carry over?

Any input going forward is appreciated!
 

k1mu

Senior Member
Apr 11, 2011
1,945
1,620
Virginia
Thanks for the support. Glad I could help. Has your WIFI remained on, though? The solution I posted works, but only for a short amount of time. rebooting the system undoes the work I did and I have to go back into the root browser and execute the file all over again to get wifi.

Can Surge or someone else offer any expertise?

with the permissions changed properly, I tried executing the code, and still not working.

I have safestrap enabled, and I have sound restored. I am currently on android 4.3 from the downgrade provided by Surge. Its rooted.
If I were to upgrade to the rooted version of NC5, would that help fix the wifi issue, or would it carry over?

Any input going forward is appreciated!

It is possible to automate this.

Create a file with the following contents:
Code:
#!/system/bin/sh
/data/local/tmp/bypasslkm
insmod /system/lib/modules/dhd.ko
exit

Save this file as /system/etc/install-recovery-2.sh.
Make sure that the bypasslkm file is in /data/local/tmp.
Reboot, and you should now have WiFi again.

[Note: this assumes SuperSU has it's custom copy of /system/etc/install-recovery.sh in place. If that's not there, it's still possible to edit /init.rc to add a stanza to run this command.]
 

EinGlo

Member
May 18, 2014
13
2
Issue with auto-running my solution

It is possible to automate this.

Create a file with the following contents:
Code:
#!/system/bin/sh
/data/local/tmp/bypasslkm
insmod /system/lib/modules/dhd.ko
exit

Save this file as /system/etc/install-recovery-2.sh.
Make sure that the bypasslkm file is in /data/local/tmp.
Reboot, and you should now have WiFi again.

[Note: this assumes SuperSU has it's custom copy of /system/etc/install-recovery.sh in place. If that's not there, it's still possible to edit /init.rc to add a stanza to run this command.]

I do NOT have supersu's install recovery 2 file in the location you said. I only have the regular install recovery file.

What I should I do? Could I create the file in laptops termial?

The first line of code gave me the error "file not found"
 

EinGlo

Member
May 18, 2014
13
2
update

I do NOT have supersu's install recovery 2 file in the location you said. I only have the regular install recovery file.

What I should I do? Could I create the file in laptops termial?

The first line of code gave me the error "file not found"

I tried again.
Ok, so I figured out the coding a little bit. Im not used to this, so forgive my ignorance.

I did the code as u typed it. BUT I made a change. Because I kept getting the "file not found " error. I added ".bin" to the end of the bypasslkm code line. It generated a real response. I felt relieved. I went ahead and typed the last line of code.

THEN I was told the file already exists... I have attached a picture of what I got in android Terminal
 

Attachments

  • Screenshot_2014-05-18-10-54-39.png
    Screenshot_2014-05-18-10-54-39.png
    180.5 KB · Views: 45

k1mu

Senior Member
Apr 11, 2011
1,945
1,620
Virginia
I do NOT have supersu's install recovery 2 file in the location you said. I only have the regular install recovery file.

What I should I do? Could I create the file in laptops termial?

The first line of code gave me the error "file not found"

You should have /system/etc/install-recovery.sh
It will run /system/etc/install-recovery-2.sh if it exists. What I would do is to create the file on your PC, put it onto your SDcard on the PC, then use Root Explorer to put it into place.

The "file exists" error is because you already have the WiFi module installed. That won't happen when this script runs at boot.
 

EinGlo

Member
May 18, 2014
13
2
Question

You should have /system/etc/install-recovery.sh
It will run /system/etc/install-recovery-2.sh if it exists. What I would do is to create the file on your PC, put it onto your SDcard on the PC, then use Root Explorer to put it into place.

The "file exists" error is because you already have the WiFi module installed. That won't happen when this script runs at boot.

Ok. I'll try that tonight.
But I have a few questions

Im basically trying to autostart the wifi module when the phone boots up right? Are there any apps that can accomplish this specific task?

Also about the downgrade in general. Did anyone get their SD card permissions restored after downgrading? I donwgraded to 4.3, rooted the phone, and somehow I STILL cant move apps to the sd card! Im beginning to suspect that thr issue may be with the card itself, which can be fixed with formatting the sd card. But has anyone had any problems with moving apps to the sd card?

Finally, the bug question concerning the wifi issue.
Is this probkem specific only to those with the downgrade? If so, should upgrading to Surge's rooted kitkat (with sd card permissions and tethered enabled) resolve the wifi issue?

I also noticed that I had wifi access when the phone had no sound. Only when I flashed the Non-HLOS bin file did I encounter this wifi issue.

Thanks for the feedback so far, I just need to understand whrre to go from here
 

k1mu

Senior Member
Apr 11, 2011
1,945
1,620
Virginia
Ok. I'll try that tonight.
But I have a few questions

Im basically trying to autostart the wifi module when the phone boots up right? Are there any apps that can accomplish this specific task?

I'm sure there are programs that can be set up to run scripts as root during boot; However, that's complicated since you want this to run while the phone is booting, before there's any opportunity to allow SuperSU to ask for permission.

Also about the downgrade in general. Did anyone get their SD card permissions restored after downgrading? I donwgraded to 4.3, rooted the phone, and somehow I STILL cant move apps to the sd card! Im beginning to suspect that thr issue may be with the card itself, which can be fixed with formatting the sd card. But has anyone had any problems with moving apps to the sd card?
That's a problem that's fixed by an edit to /system/etc/permissions/platform.xml, adding a stanza that permits external storage write access.


Finally, the bug question concerning the wifi issue.
Is this probkem specific only to those with the downgrade? If so, should upgrading to Surge's rooted kitkat (with sd card permissions and tethered enabled) resolve the wifi issue?

I also noticed that I had wifi access when the phone had no sound. Only when I flashed the Non-HLOS bin file did I encounter this wifi issue.

Thanks for the feedback so far, I just need to understand whrre to go from here
The need to run the "bypasslkm" program is because of the downgrade. If you go to a clean rooted Kit Kat ROM, it shouldn't have any issues with WiFi being enabled. That may be the easiest way to fix this.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    Open your terminal emulator on your phone (download one from Google play if you don't have one) open the terminal and type the following commands (Pressing enter to execute each one)

    su (sands for switch user, used alone will switch you to the "root" user. Equilivent to Admin in windows)

    cd /data/local/temp (cd - change directory, followed by the complete folder path you want to navigate to)

    chmod 755 bypasslkm (not going to get too in depth with this one because I could go on for a while with it but "chmod 755" changes the permissions to read, write, execute for the root user and read/execute for everyone else)

    . /bypasslkm (. / tells the system to look in the current directory and, in this case, execute bypasslkm)

    Hope this helps clear some things up for you! :)

    Sent from my SCH-I545 using XDA Premium HD app
    2
    To add to the above post, after downloading that just execute this in terminal

    Code:
    su
    mount -o remount,rw /system
    find . -name "bypasslkm" -exec cp {} /data/local/tmp \;
    find /data/local/tmp -name "bypasslkm" -type f -exec chmod 755 {} \;
    ./data/local/tmp/bypasslkm
    insmod /system/lib/modules/dhd.ko
    exit
    1
    I keep getting a message saying that there is no such directory after trying to execute "chmod 755 bypasslkm"

    I had the same issue. Here is the binary from Surges dropbox https://www.dropbox.com/s/9rdz9ff6x5foech/bypasslkm

    Make sure you copy it to the right directory and follow all the commands. :)

    Sent from my SCH-I545 using XDA Premium HD app
    1
    Solution to the 755 bypasslkm issue!!!!!

    The permissions should be 755, as Surge said.

    If you KNOW it's in /data/local/tmp, then do this in a terminal emulator window:
    Code:
    su
    mount -o remount,rw /system
    chmod 755 /data/local/tmp/bypasslkm
    /data/local/tmp/bypasslkm
    insmod /system/lib/modules/dhd.ko
    mount -o remount,ro /system
    exit

    If this doesn't work, DO NOT post just "it didn't work". Say what you did, why you think it failed. Capture the output and reply here with it.

    I figured it out! Here is exactly what I did:

    after downloading the bypasslkm.bin from the dropbox link, I used ES File Explorer (WITH ROOT ENABLED) to move the bypasslkm file to directly to the data/local/tmp location. NOTE: there are a few places marked "data" and "local" on the phone, so when you open a "data" folder, make sure you find the path in the right order [ i.e. first data, then local, and then tmp]

    Using a ROOT FILE EXPLORER app (because ES doesn't have what you will need) go to the bypasslkm file, long press, and select permissions. It will display with permissions are currently set. At the bottom, it SHOULD display the total sum of the permissions selected. Basically, that means by selecting the right boxes, you can change the permissions to 755 !

    7 5 5
    user group world
    r+w+x r+x r+x
    4+2+1 4+0+1 4+0+1 = 755

    These setting will give you the 755 that you need to pull this off .

    When you have the permissions changed to 755, the last step was actually very easy. But if you want to play it safe, then I will tell you the root file browser I specifically used to do the last step.

    I used the app Root Browser version 2.2.3 ( i literally googled for any generic root file explorer and this came up )

    ok, so when you have the permissions changed, long press on the bypasslkm file.
    select "Open With" and then select the option "Open As.."
    At the bottom of the options is "script file" select it.
    after doing so, select the option "Execute" and... Voila! I immediately regained my WIFI !!!!! \>w</

    I hope this guide helped everyone out. I tried to be as specific as possible.