Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,740,943 Members 52,919 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
danieljamie
Old
(Last edited by danieljamie; 9th October 2013 at 12:09 PM.)
#1  
danieljamie's Avatar
Senior Member - OP
Thanks Meter 158
Posts: 558
Join Date: Mar 2011
Default [KERNEL] [09-10-13] - SM-N9005 - SELinux Permissive - Working WiFi

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:	6086
Size:	26.2 KB
ID:	2304804  
Samsung Galaxy Note 3 SM-N9005

Previous Devices
Samsung Galaxy S3 GT-I9300
Sony Ericsson Xperia Play (R800i)
The Following 14 Users Say Thank You to danieljamie For This Useful Post: [ Click to Expand ]
 
danieljamie
Old
(Last edited by danieljamie; 5th October 2013 at 11:04 PM.)
#2  
danieljamie's Avatar
Senior Member - OP
Thanks Meter 158
Posts: 558
Join Date: Mar 2011
More Information

Some more info:

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

Code:
Select 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:
Select 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.
Samsung Galaxy Note 3 SM-N9005

Previous Devices
Samsung Galaxy S3 GT-I9300
Sony Ericsson Xperia Play (R800i)
The Following User Says Thank You to danieljamie For This Useful Post: [ Click to Expand ]
 
dreamteam
Old
#3  
Junior Member
Thanks Meter 4
Posts: 19
Join Date: May 2007
it dose not work on my stock rom
 
bubbl3
Old
#4  
bubbl3's Avatar
Member
Thanks Meter 21
Posts: 93
Join Date: Jul 2010
Location: Shanghai
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.
 
danieljamie
Old
#5  
danieljamie's Avatar
Senior Member - OP
Thanks Meter 158
Posts: 558
Join Date: Mar 2011
Quote:
Originally Posted by bubbl3 View Post
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
Samsung Galaxy Note 3 SM-N9005

Previous Devices
Samsung Galaxy S3 GT-I9300
Sony Ericsson Xperia Play (R800i)
The Following User Says Thank You to danieljamie For This Useful Post: [ Click to Expand ]
 
rheza02
Old
(Last edited by rheza02; 6th October 2013 at 05:21 PM.)
#6  
Senior Member
Thanks Meter 10
Posts: 459
Join Date: May 2006
Quote:
Originally Posted by danieljamie View Post
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
oh, hello...
 
danieljamie
Old
#7  
danieljamie's Avatar
Senior Member - OP
Thanks Meter 158
Posts: 558
Join Date: Mar 2011
Quote:
Originally Posted by rheza02 View Post
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
Samsung Galaxy Note 3 SM-N9005

Previous Devices
Samsung Galaxy S3 GT-I9300
Sony Ericsson Xperia Play (R800i)
The Following 2 Users Say Thank You to danieljamie For This Useful Post: [ Click to Expand ]
 
AllGamer
Old
#8  
AllGamer's Avatar
Retired Forum Moderator
Thanks Meter 1576
Posts: 11,521
Join Date: May 2008
Location: buried under loads of work IRL

 
DONATE TO ME
Does this work with SM-N900W8 version?

Donation is appreciated but not required, a cup of Coffee would suffice

Samsung i9000m: on CM10
Samsung Nexus S: on JB 4.2.2
Samsung Galaxy S II SGH-T989: on CM10
Samsung Galaxy NOTE SGH-i717r: on CM10
Samsung Galaxy NOTE 3 SM-N900W8: stock 4.3
The Following User Says Thank You to AllGamer For This Useful Post: [ Click to Expand ]
 
rheza02
Old
(Last edited by rheza02; 7th October 2013 at 09:59 AM.)
#9  
Senior Member
Thanks Meter 10
Posts: 459
Join Date: May 2006
Sorry for Out of topic,

do you compile the boot.img with the dt.img ?
Thanks
oh, hello...
 
danieljamie
Old
#10  
danieljamie's Avatar
Senior Member - OP
Thanks Meter 158
Posts: 558
Join Date: Mar 2011
Quote:
Originally Posted by rheza02 View Post
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
Samsung Galaxy Note 3 SM-N9005

Previous Devices
Samsung Galaxy S3 GT-I9300
Sony Ericsson Xperia Play (R800i)

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes