FORUMS

Voices Of XDA: Orbiting The Earth With Android

Editor’s note: This week’s feature has been written by forum … more

CloudPlayer: DIY HiFi Music Streaming Solution

In our Helpful Guide to Music Streaming Services, we mentioned several different services … more

Optimize Battery Life with This Useful App

Battery life is an important aspect of your smartphone, especially if you use it for more … more

The OnePlus 2 & The Year of Smartphone Compromises

We are very close to entering the last third of 2015, and we have now seen many of … more

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

646 posts
Thanks Meter: 177
 
By danieljamie, Senior Member on 5th October 2013, 10:35 PM
Post Reply Subscribe to Thread Email Thread
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:	8209
Size:	26.2 KB
ID:	2304804  
Last edited by danieljamie; 9th October 2013 at 12:09 PM.
The Following 16 Users Say Thank You to danieljamie For This Useful Post: [ View ]
 
 
5th October 2013, 11:00 PM |#2  
danieljamie's Avatar
OP Senior Member
Thanks Meter: 177
 
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; 5th October 2013 at 11:04 PM.
The Following User Says Thank You to danieljamie For This Useful Post: [ View ]
6th October 2013, 03:32 AM |#3  
Junior Member
Thanks Meter: 5
 
More
it dose not work on my stock rom
6th October 2013, 04:05 AM |#4  
bubbl3's Avatar
Senior Member
Flag Shanghai
Thanks Meter: 44
 
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, 10:08 AM |#5  
danieljamie's Avatar
OP Senior Member
Thanks Meter: 177
 
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, 05:16 PM |#6  
Senior Member
Thanks Meter: 10
 
More
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 05:21 PM.
6th October 2013, 06:57 PM |#7  
danieljamie's Avatar
OP Senior Member
Thanks Meter: 177
 
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, 08:47 PM |#8  
AllGamer's Avatar
Retired Forum Moderator
Flag buried under loads of work IRL
Thanks Meter: 1,592
 
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, 03:33 AM |#9  
Senior Member
Thanks Meter: 10
 
More
Sorry for Out of topic,

do you compile the boot.img with the dt.img ?
Thanks
Last edited by rheza02; 7th October 2013 at 09:59 AM.
7th October 2013, 01:46 PM |#10  
danieljamie's Avatar
OP Senior Member
Thanks Meter: 177
 
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
7th October 2013, 05:03 PM |#11  
sachinaik's Avatar
Senior Member
Flag Bangalore
Thanks Meter: 203
 
More
Can you please do it for SM-900 version also ?

Sent from my SM-N900 using XDA Premium 4 mobile app

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

Advanced Search
Display Modes