Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[KERNEL] [09-10-13] - SM-N9005 - SELinux Permissive - Working WiFi

OP danieljamie

5th October 2013, 11:35 PM   |  #1  
danieljamie's Avatar
OP Senior Member
Thanks Meter: 167
 
600 posts
Join Date:Joined: Mar 2011
More
KERNEL FOR SM-N9005 - SNAPDRAGON 800 MODEL

Successfully changed SELinux status to permissive. Able to restore apps with Titanium Backup with data without force closes.

This is the stock samsung kernel source, but changed the SELinux policy from enforcing to permissive.
In the settings app, it still shows as "Permissive", see the attached image.

Flash at your own risk. Please have an available flashable tar file of a working boot.img just in case, however it works fine on my phone!
Link to stock kernels: http://forum.xda-developers.com/show...ght=stock+roms

Known Issues
Wifi and exfat external storage not working
WiFi not working. To fix: modify build.prop ro.securestorage.support=true - Change to false. WiFi works on reboot (Thanks to freeza)
ExFAT external storage not working. To fix: Use https://github.com/dorimanx/exfat-nofuse

Download Here: https://www.dropbox.com/s/8ze2xzk2mc...005_KERNEL.tar

TODO:
- Add ExFAT to kernel
- Add Busybox / init.d capability
- Add CPU overclocking



For other kernel devs, there is new feature in Snapdragon 800 mtd where you need a different version of mkbootimg tools.
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2013-10-05-23-11-26.jpg
Views:	6941
Size:	26.2 KB
ID:	2304804  
Last edited by danieljamie; 9th October 2013 at 01:09 PM.
The Following 16 Users Say Thank You to danieljamie For This Useful Post: [ View ]
6th October 2013, 12:00 AM   |  #2  
danieljamie's Avatar
OP Senior Member
Thanks Meter: 167
 
600 posts
Join Date:Joined: Mar 2011
More
More Information

Some more info:

In the build config specified by Samsung, there is the following:

Code:
CONFIG_SEC_RESTRICT_ROOTING=y
CONFIG_SEC_RESTRICT_SETUID=y
CONFIG_SEC_RESTRICT_FORK=y
CONFIG_SEC_RESTRICT_ROOTING_LOG=y
And the build notes for the kernel say this:

$ make VARIANT_DEFCONFIG=msm8974_sec_hlteeur_defconfig msm8974_sec_defconfig SELINUX_DEFCONFIG=selinux_defconfig

And if we look at the SELINUX Makefile:
Code:
ifeq ($(SEC_BUILD_OPTION_SELINUX_ENFORCE),true)
EXTRA_CFLAGS += -DCONFIG_ALWAYS_ENFORCE=true
endif
My guess is that because we are "supposed" to build with the SELinux flag, then the Makefile picks this up and sets ALWAYS ENFORCE to true. So I am now rebuilding kernel now to try it without that line.
Last edited by danieljamie; 6th October 2013 at 12:04 AM.
The Following User Says Thank You to danieljamie For This Useful Post: [ View ]
6th October 2013, 04:32 AM   |  #3  
Junior Member
Thanks Meter: 5
 
21 posts
Join Date:Joined: May 2007
it dose not work on my stock rom
6th October 2013, 05:05 AM   |  #4  
bubbl3's Avatar
Senior Member
Flag Shanghai
Thanks Meter: 34
 
115 posts
Join Date:Joined: Jul 2010
More
After flashing over Omega ROM 1.0 i lost WIFI (could not activate it) and external storage access.

Still SELinux was indeed permissive and data restore with Titanium was working.
6th October 2013, 11:08 AM   |  #5  
danieljamie's Avatar
OP Senior Member
Thanks Meter: 167
 
600 posts
Join Date:Joined: Mar 2011
More
Quote:
Originally Posted by bubbl3

After flashing over Omega ROM 1.0 i lost WIFI (could not activate it) and external storage access.

Still SELinux was indeed permissive and data restore with Titanium was working.

Thankyou I will look at fixing this. I also realised lost wifi.

Sent from my SM-N9005 using xda app-developers app
The Following User Says Thank You to danieljamie For This Useful Post: [ View ]
6th October 2013, 06:16 PM   |  #6  
Senior Member
Thanks Meter: 10
 
459 posts
Join Date:Joined: May 2006
Quote:
Originally Posted by danieljamie

Thankyou I will look at fixing this. I also realised lost wifi.

Sent from my SM-N9005 using xda app-developers app

Woa, how can you able to flash kernel with locked bootloader ?, how do i create tar and boot.img from the zImage ?

Thanks
Last edited by rheza02; 6th October 2013 at 06:21 PM.
6th October 2013, 07:57 PM   |  #7  
danieljamie's Avatar
OP Senior Member
Thanks Meter: 167
 
600 posts
Join Date:Joined: Mar 2011
More
Quote:
Originally Posted by rheza02

Woa, how can you able to flash kernel with locked bootloader ?, how do i create tar and boot.img from the zImage ?

Thanks

boot.img consists of the kernel and ramdisk. You need ramdisk compiled from source, or ripped from a current working boot.img.

Then use tool mkboot to package zImage and ramdisk into boot.img (not just any mkboot, there is a special one updated for usage with snapdragon 800).

Then just use tar command in linux: tar -cvf mykernel.tar boot.img

Then flash in odin
The Following 2 Users Say Thank You to danieljamie For This Useful Post: [ View ]
6th October 2013, 09:47 PM   |  #8  
AllGamer's Avatar
Retired Forum Moderator
Flag buried under loads of work IRL
Thanks Meter: 1,580
 
11,521 posts
Join Date:Joined: May 2008
Donate to Me
More
Does this work with SM-N900W8 version?
The Following User Says Thank You to AllGamer For This Useful Post: [ View ]
7th October 2013, 04:33 AM   |  #9  
Senior Member
Thanks Meter: 10
 
459 posts
Join Date:Joined: May 2006
Sorry for Out of topic,

do you compile the boot.img with the dt.img ?
Thanks
Last edited by rheza02; 7th October 2013 at 10:59 AM.
7th October 2013, 02:46 PM   |  #10  
danieljamie's Avatar
OP Senior Member
Thanks Meter: 167
 
600 posts
Join Date:Joined: Mar 2011
More
Quote:
Originally Posted by rheza02

Sorry for Out of topic,

do you compile the boot.img with the dt.img ?
Thanks

Yes...

Use this:

https://github.com/xiaolu/mkbootimg_tools

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes