Tutorial "Build Customized Permissive Kernel in Ubuntu" - Galaxy Tab Pro 12.2, 10.1, 8.4 General

This is the work of Graeme H, from the P-900 forum, I have nothing to do with it, but for ripping the article that I though could be useful in the T-XXX forum:
Graeme H said:
Hey everyone. I bought this device specifically because I do a lot of work on linux in command line world and I though it would be the perfect device when combined with the Logitech Pro keyboard and Complete Linux Installer (it's an app on Google Play). It turned out to be quite a bit of work getting everything working because of Knox and SELinux. Eventually I got a custom kernel working that allows me to toggle SELinux between permissive and enforcing.
I attached an Odin flashable tar that works on the SM-P900 (wifi version). I am on the North American version, so I have no idea whether it will work in other regions. If you flash this kernel then there are a few things you need to know:
I'm assuming you already have root on your device.
When you boot it will still be in "Enforcing" mode. This change simply allows you to use the "setenforce" terminal command or any of the apps on Google Play that do this for you.
You might experience some wifi weirdness after you flash the kernel. You just need to open up /system/build.prop and change ro.securestorage.support from true to false and then reboot to resolve the issue.
If you have a different version of the device or want to compile it yourself for any reason I wrote an article describing how I compiled it here:
http://graemehill.ca/compiling-permissive-android-kernel/
I also did a few other things to fix the keyboard and get linux running properly, so if you're interested in that I described my setup in more detail here:
http://graemehill.ca/turning-a-galaxy-note-pro-into-a-linux-laptop/
Click to expand...
Click to collapse

Related

[Nook Simple Touch][FW1.2.1] Kernel with Two Point Touch Mod for Download

Hi all,
Thanks to the huge discount on Nook Simple Touch earlier this month in UK, hopefully the device will regain some popularity and draw more attention from the XDA community. Unfortunately all the new devices come with firmware v1.2.0 while most posts in the forum were for the outdated v1.1.x, including the brilliant multitouch mod from wheilitjohnny. I know there is a way to downgrade to v1.1.x but I still prefer v1.2.1 after I tried v1.1.0. So I decided to port wheilitjohnny's mod to v1.2.1. After one week's hard work as I'm a newbie to the Linux world, I finally built the kernel and saw no more boot loop. All the multitouch test tools from Market correctly reported up to 2 fingers.
Before put the kernel to your device, make sure it's already running 1.2.1 firmware and rooted. You can find the link to the official upgrade file in the forum and you can use Nook Manager to root your device which is also available in the forum.
Then please found the kernel attached as zip file. You need to unzip the file and follow arkusuma's post on how to install it.
http://forum.xda-developers.com/showthread.php?p=24168019#post24168019
All credits go to wheilitjohnny. It's all his work.
One lesson I learned for all the developers who may be interested in more mod development is, to make a bootable kernel you MUST use toolchain from "http://www.codesourcery.com/sgpp/lite/arm/portal/release1293". Select the IA32 GNU/Linux TAR one (MD5: c6930d14801b4fab6705d72df013e58b). Any other toolchains including Google's own or even another version from codesourcery won't work. The generated kernel built with any other toolchains will only cause boot loop.
[UPDATE] Oh forgot to say, you need to add one more line to your /etc/permissions/required_hardware.xml on your device. You should be able to find the first line already in the file, just add the second line.
<feature name="android.hardware.touchscreen" />
<feature name="android.hardware.touchscreen.multitouch" />
More info please check http://forum.xda-developers.com/showthread.php?t=1563645
Does this kernel work with NoRefresh (I assume debug2 version for FW 1.2.x)?
koltshin said:
Does this kernel work with NoRefresh (I assume debug2 version for FW 1.2.x)?
Click to expand...
Click to collapse
Yes. I have NoRefresh_Debug2 and Fast Mode mod running together with this kernel. No problem so far.
Thx. Does this kernel works for both Nook Simple Touch and the Glow light model?
Sent from my GT-N7100 using xda app-developers app
waynesi said:
Hi all,
One lesson I learned for all the developers who may be interested in more mod development is, to make a bootable kernel you MUST use toolchain from "http://www.codesourcery.com/sgpp/lite/arm/portal/release1293". Select the IA32 GNU/Linux TAR one (MD5: c6930d14801b4fab6705d72df013e58b). Any other toolchains including Google's own or even another version from codesourcery won't work. The generated kernel built with any other toolchains will only cause boot loop.
I've had good success with the toolchain on Ubuntu; just install the gcc-arm-linux-gnueabi packages, and add the Makefile and head.S changes that were in the fastmode2 patch; I've not tried building this touch mod, but it has let me build my own kernels with usb host and with TLS support.
Click to expand...
Click to collapse
I can confirm that this kernel works on a NST with Glowlight on FW. 1.2.1 Thanks for the hard work.
Can I use this kernel for 2 fingers zoom in? I tried it with aldiko, but do not work with pdf.
You need to unzip the file and follow arkusuma's post on how to install it.
http://forum.xda-developers.com/showthread.php?p=24168019#post24168019
Click to expand...
Click to collapse
Could somebody please help me installing this without adb over wifi? Because i have internet only over ethernet. I was thinking of CWM.
Thanks
Sagittarius0 said:
... without adb over wifi?
Click to expand...
Click to collapse
Well, how about ADB over USB?
Renate NST said:
Well, how about ADB over USB?
Click to expand...
Click to collapse
Can you please help me exactly how to do it? I have tried it once for some other reason and it didn't work... :crying: And after that I searched for it here and found a post which said that adb works only over wi-fi.
And I am quite new with android so please explain the process well.
waynesi said:
Yes. I have NoRefresh_Debug2 and Fast Mode mod running together with this kernel. No problem so far.
Click to expand...
Click to collapse
Fast Mode don't works on my NST fw 1.2.1. What app exactly are you using to activated the fastmode?
update: this kernel don't have / sys/devices/platform/omap3epfb.0/graphics/fb0/fmode so fastmode is not possible
tebra said:
Fast Mode don't works on my NST fw 1.2.1. What app exactly are you using to activated the fastmode?
Click to expand...
Click to collapse
http://forum.xda-developers.com/showpost.php?p=39529578&postcount=140
Step one, use noogie and do a full backup of your Nook.
It should be almost 2GB file size.
Using noogie, copy uRamdisk.
Use bootutil.exe (in signature):
Code:
bootutil /x /v uRamdisk init.rc
[i]edit init.rc[/i]
bootuil /r /v uRamdisk init.rc
The line you edit out (with a number sign) is
Code:
[color=red]#[/color] setprop service.adb.tcp.port 5555
(uncomment this line to go back to using WiFi ADB)
Copy uRamdisk back to the Nook.
Reboot your Nook.
Read up about getting the ADB drivers working on your desktop here:
http://forum.xda-developers.com/wiki/BN_Nook_Simple_Touch/Installing_ADB
This thread is old, I know, but hopefully someone will spot this. So I took the plunge and installed Multi-Touch (running FW 1.21 and rooted). I followed the instructions for the ADB wireless method and also changed the required_hardware.xml file, resetting the permissions of the edited file to match those of the original.
Nothing is different? My original hope was that the pinch-zoom function in Dolphin 10.2.6 might work with this mod. It doesn't seem to work on either Android or Desktop settings in that browser. I can't see that it works anywhere. Maybe I need to reinstall Opera Mobile and test it there?
...
O.K., I just reinstalled Opera Mobile. No effect at all that I can discern.
Hmm....I am underclocking with No-frills CPU Control to 300 MHz. Is that the problem? Nope....changed back to 800 MHz and no effect.
So...what am I missing? Is there something I can check to be sure I did the ADB thing correctly (after I'm done using the "shell" do I just close it down or is there some closing command I should have used?). Does this mod have to be used in conjunction with something else?
I usually jump out of an ADB shell with ^C
There's an interim release of UsbMode-1.7a.apk in the signature.
If you touch the left 3/4 of the screen it will report touch coordinates.
It will indicate multiple touches.
That's the easiest way to see how many simultaneous touches your device supports.
My Nook: 2, my Kyocera: 4, my ZTE: 5
I installed a multi-touch test app from the Market and it showed that two fingers were recognized (no more), although the recognition was somewhat spotty.
I've been fussing around with it and sure enough it has begun to work with Opera Mobile, both at 800 MHz and 300 MHz (no discernible difference there). It also works very well with Perfect Viewer. It does not work with Google News and Weather (which really needs it), at least not the version that came with NookManager rooting.
Alas, it does not work with Dolphin, which was my main impetus for trying this. I've got Dolphin to the point where it is much more reliable than Opera Mobile but the only way to zoom is via a gesture which requires going to a blank screen, drawing the gesture and then returning to the current page. It makes one want to draw gestures that are not found in children's books. Although Dolphin claims pinch-to-zoom, it doesn't seem to work with the NST, at least not this version of Dolphin. Maybe I need to delve back into the past versions (which will probably be less stable in other respects...).
Well, anyway it works. I'll have to see if it affects the battery life in any significant way (I read on my Nook, too!). If not, I may as well keep it although its utility to me is limited.
Now to look at "no-refresh"......
nmyshkin, what about Google Maps?
Yes, I forgot to mention Google Maps (I was using "Places" but it amounts to the same thing). That works with multi-touch as well. I also noticed that to some extent multi-touch zooming in Opera Mobile is web-site dependent. For example, it does not seem to work at all on Wikipedia but worked OK on some other sites I tried. I just wish it would work in Dolphin
I just tried it with Orion Viewer (which I like for PDFs) and it also works there. It seemed to want to work with Kingsoft Office on the same PDF file but then the app crashed. There are other ways to magnify in both, of course.
I finally tried NoRefresh, and while it worked, I was left wondering what it is for other than as a "we can do this" feature. Lots of flickering while it made up its mind as a white-listed app was launched and then the image degradation thing. After I exited the app my screen was such a mess I had to reboot. I guess I'm used to the way the e-ink display sort of tears when scrolling (or even zooming now, for that matter). The NoRefresh just doesn't seem to give me anything I want. I have not tried FastMode. As I currently underclock to 300 MHz I am reluctant to overclock the Nook just so it will (sort of) work like something it is not and run down the battery really fast.

SELinux Permissive Kernel [SM-P600]

For those of you who want SELinux Permissive, I built this a couple of weeks ago. Set ro.securestorage.support=false in your build.prop if wifi is not working (Credit Morfic).
Flash via Odin
Disclaimer: I'm not responsible if for whatever reason you brick your device
Download
aironite said:
For those of you who want SELinux Permissive, I built this a couple of weeks ago. Set ro.securestorage.support=false in your build.prop if wifi is not working (Credit Morfic).
Flash via Odin
Disclaimer: I'm not responsible if for whatever reason you brick your device
Download
Click to expand...
Click to collapse
Thanks, this is really useful. Have you considered posting this in development?
Also do you plan to do more kernel development, for our device?
Sent from my SM-P600
LMMT said:
Thanks, this is really useful. Have you considered posting this in development?
Also do you plan to do more kernel development, for our device?
Sent from my SM-P600
Click to expand...
Click to collapse
I do plan on moving forward with developing this kernel as soon as Samsung releases kernel updates for their big.LITTLE technology. Namely Heterogenous Multi-Processing.
Wroth hug if samsung doesn't support our device do you think you could adapt their code from the new devices that will? If samsung won't give it to us I imagine a device can
Sent from my SM-P600 using XDA Premium 4 mobile app
I'll continue to develop this kernel and look at posting an update to the dev thread in the next few days. If samsung makes improvements on other devices with the Exynos 5 series, it can surely be ported to our p600's.
Duly.noted said:
Wroth hug if samsung doesn't support our device do you think you could adapt their code from the new devices that will? If samsung won't give it to us I imagine a device can
Sent from my SM-P600 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
aironite said:
I'll continue to develop this kernel and look at posting an update to the dev thread in the next few days. If samsung makes improvements on other devices with the Exynos 5 series, it can surely be ported to our p600's.
Click to expand...
Click to collapse
Thanks for the reply. I really need to turn off auto correct. It always mangles my words when I don't check before I post.
aironite said:
For those of you who want SELinux Permissive, I built this a couple of weeks ago. Set ro.securestorage.support=false in your build.prop if wifi is not working (Credit Morfic).
Flash via Odin
Disclaimer: I'm not responsible if for whatever reason you brick your device
Click to expand...
Click to collapse
This is great. No problems installing. I did need to set ro.securestorage.support=false in /system/build.prop for wifi to work. Now VPNroot and sshdroid work correctly.
I could not find an appropriate place to turn selinux off during boot (i.e. setenforce 0). /init.rc and everything in / seems to revert to original version on boot. I tried sticking it in one of the unrelated startup scripts in the /system folder, but that failed as well. Any suggestions?
Thanks a bunch!
aironite said:
For those of you who want SELinux Permissive, I built this a couple of weeks ago. Set ro.securestorage.support=false in your build.prop if wifi is not working (Credit Morfic).
Flash via Odin
Disclaimer: I'm not responsible if for whatever reason you brick your device
Download
Click to expand...
Click to collapse
Does SElinux Permissive allow us to use Linux Deploy to install linux in chroot on note.
https://play.google.com/store/apps/details?id=ru.meefik.linuxdeploy
My note is running on mk1 rooted with autoroot , however I can't use Linux Deploy to install linux in chroot, maybe SELinux enforcing is the cause.
robertchow said:
Does SElinux Permissive allow us to use Linux Deploy to install linux in chroot on note.
--cut url--
My note is running on mk1 rooted with autoroot , however I can't use Linux Deploy to install linux in chroot, maybe SELinux enforcing is the cause.
Click to expand...
Click to collapse
I am able to use Linux on Android (linuxonandroid.org), which I couldn't before installing this kernel. Also used SeLinuxModeChanger (in playstore) to have selinux set permissive on boot.
Hope that helps.
Linux Works
robertchow said:
Does SElinux Permissive allow us to use Linux Deploy to install linux in chroot on note.
https://play.google.com/store/apps/details?id=ru.meefik.linuxdeploy
My note is running on mk1 rooted with autoroot , however I can't use Linux Deploy to install linux in chroot, maybe SELinux enforcing is the cause.
Click to expand...
Click to collapse
I can say that with this kernel you get a fully functional Linux install. I have not tested Linux Deploy, because I use the Complete Linux Installer(linuxonandroid) and by using the kernel in this thread and then ether use Wanam Xposed and set the system to disable SELinux so it is always Permissive or by using the command "setenforce 0" in a terminal before Linux use then use getenforce it shows Permissive and allows for full Linux function. The command getenforce is not needed to run just for verification.
THANK YOU for this kernel!!!!
Many Thanks for this Kernel
I only registered to say thanks for this kernel. Had to use the build.prop tweak in order to get Wifi back. With this, Selinux Mode Changer, and Complete Linux Installer I was able to get Fedora 19 running on the note. Working great. So, thanks again for your work.
How to install
Can someone tell me please how i can flash this Kernel via Odin?
Amadyl said:
Can someone tell me please how i can flash this Kernel via Odin?
Click to expand...
Click to collapse
Flash it under AP
Sent from my SM-P600 using Tapatalk
---------- Post added at 11:35 PM ---------- Previous post was at 11:34 PM ----------
robertchow said:
Does SElinux Permissive allow us to use Linux Deploy to install linux in chroot on note.
https://play.google.com/store/apps/details?id=ru.meefik.linuxdeploy
My note is running on mk1 rooted with autoroot , however I can't use Linux Deploy to install linux in chroot, maybe SELinux enforcing is the cause.
Click to expand...
Click to collapse
Linux Deploy is working with this flashed.
Sent from my SM-P600 using Tapatalk
Thanks for the help and a big thank you to the developer
It worked
This is very nice i will try to install ubuntu now
Thank you very much !
Amadyl said:
It worked
This is very nice i will try to install ubuntu now
Click to expand...
Click to collapse
You might want to check the Linux thread and especially this post
http://forum.xda-developers.com/showpost.php?p=49347734&postcount=9
It tells of problems with Ubuntu even with Selinux Permissive. In any case, do post your experience there. I prefer RPM based systems as these are my daily work in commercial setups. As openSUSE ARM is still beta, I went for Fedora and it works nicely.
aironite said:
For those of you who want SELinux Permissive, I built this a couple of weeks ago. Set ro.securestorage.support=false in your build.prop if wifi is not working (Credit Morfic).
Flash via Odin
Disclaimer: I'm not responsible if for whatever reason you brick your device
Download
Click to expand...
Click to collapse
what did you change in menuconfig? I am working on enabling some drivers within the kernel and I dont want to lose the chroot linux ability. Thanks.
Sent from my SM-P600 using Tapatalk
Thank you very much for the Kernel, I think i'll try flashing it.
Do you know something about converting ROMs between familiar devices? (The Note 3 and our Note)
Edit:
When trying to install Ubuntu via LinuxOnAndroid, i'm getting the error "Unable to create loop device" (and i already installed the Kernel!).
Help?
ilayron8 said:
i'm getting the error "Unable to create loop device" (and i already installed the Kernel!).
Help?
Click to expand...
Click to collapse
The kernel only allows you to change SELinux mode, it does not change the default mode. Have you switched selinux mode to permissive via a root terminal "setenforce 0" or via an app like SelinuxModeChanger from Play?
caferick said:
The kernel only allows you to change SELinux mode, it does not change the default mode. Have you switched selinux mode to permissive via a root terminal "setenforce 0" or via an app like SelinuxModeChanger from Play?
Click to expand...
Click to collapse
I installed the app and i got from Debian the error "Unable to mount the loop device, after it FOUND the loop.
In Ubuntu, I'm now getting the error "Unable to attach image to loop device".
ilayron8 said:
I installed the app and i got from Debian the error "Unable to mount the loop device, after it FOUND the loop.
In Ubuntu, I'm now getting the error "Unable to attach image to loop device".
Click to expand...
Click to collapse
help?

[HELP] ADB Tools not working? Check here.

So you probably have the same problem as i had not long ago, you try using a Tool like Android Command, or SGN3ModTool, or kn0x0ut, or Android AIO Flasher or what not, and it just wont work, and you dont have any idea, why. The answer is pretty simple, yet very hidden and not thought about that much, i first figured it out very lately, and it took some time, so if you are one of them having one of the listed problems above, welcome to my help thread
Q: I get "Device Not Found"
A: Install the latest ADB drivers for all Android Phones, found here: http://adbdriver.com/downloads/
Q: Now i installed all drivers for my Device, but it still wont work. Why?
A: Are you pretty sure "USB Debugging" is enabled in the Developer Options? If not, enable it.
Q: I dont find the "Developer Options" on my Device. How do i get them?
A: I assume you got Android 4.2 or higher, since then, you have to press 7 times on the build number. Go to the "Device Info" tab, and scroll down to "Build Number" and press 7 times in a row on that, it will tell you, that the "Developer Options" have been enabled.
Q: Ok so now i did that, but it STILL wont work, WHY!?
A: Well then i guess you came to the points i landed at, where i didnt know the problem, lucky for you, i found the yet simple, but a bit "Im a Noob, idk that" fix. To fix this, first check your "SELinux Status" under "Device Options", if it is on "Permissive" then it should work for you now, and your good to go, if your in the situation of "Enforced", then you came where i was, no way. How to fix it? Easy, either you can try option 1 or 2. Or just ignore the fact its there and try finding out what it is, until you die trying to find it out
1: (This option might NOT work for some! Samsung Devices, i know it says all in the list, but Samsung Deviced without KNOX will work anyway, and some with KNOX even will, if you disabled KNOX with SuperSU or any other ROOT Tool). Install SELinux Mode Changer
App: https://play.google.com/store/apps/details?id=com.mrbimc.selinux&hl=de
After its installed, enter the app and change it to "Permissive". Reboot your Device, and now try again to connect with USB ADB, it will work guaranteed
2: Install a KERNEL that has SELinux status set to "Permissive" incase the first option does NOT work for you. (Samsung Galaxy Note 3 SM-N9005 ONLY!)
KERNEL 1: http://forum.xda-developers.com/showthread.php?t=2540246
KERNEL 2: http://forum.xda-developers.com/showthread.php?t=2471416
To be honest, i prefer the first KERNEL more, more options and also it has no bugs known for now, the second has some bugs, but less features, if you try staying close to STOCK.
That was all from me for now, if you need more info or help, your welcome to ask.
PM: Want to know what SELinux is? Here: http://en.wikipedia.org/wiki/Security-Enhanced_Linux
Short description: SELinux was invented by the NSA and MAC, to provide more security for Android system, to say it short: To simply **** up the life for Developers . "Enforced" means all request are denied instantly, so thats why ADB USB wont work, cause all requests to the Device are blocked. With "Permissive" this though, makes it so all requests are allowed, but logged and being watched, but still can be run, without problems.
While this is a list with common things that you can do to enable ADB it is still a little misleading - there is ABSOLUTELY no requirement that you NEED to be SELinux permissive for standard ADB to work - that is only the case in certain cooked ROMs + certain kernels, but if you are on stock and you have things installed OK on the PC it will work perfectly with SELinux set to enforcing.
The other thing that is missing is the fact that the latest ADB (since 4.2.x I think) is also doing an extra security-check on the phone - so you need a special adb program on the PC (so that the program can correctly answer to the extra check), and then you need to answer YES when the phone asks if you want to allow ADB rights for that ID (which normally the phone will remember and not ask again).
xclub_101 said:
While this is a list with common things that you can do to enable ADB it is still a little misleading - there is ABSOLUTELY no requirement that you NEED to be SELinux permissive for standard ADB to work - that is only the case in certain cooked ROMs + certain kernels, but if you are on stock and you have things installed OK on the PC it will work perfectly with SELinux set to enforcing.
The other thing that is missing is the fact that the latest ADB (since 4.2.x I think) is also doing an extra security-check on the phone - so you need a special adb program on the PC (so that the program can correctly answer to the extra check), and then you need to answer YES when the phone asks if you want to allow ADB rights for that ID (which normally the phone will remember and not ask again).
Click to expand...
Click to collapse
Thats not correct, i run STOCK ROM, i cannot run any ADB tools without having SELinux set to Permissive, i only want to help people who have the same problem, most people arent like you, who know everything in the world, so they need a bit of help, thats all i wanted to help them with.

My setup with Ubuntu and a custom permissive Kernel

Hey everyone. I bought this device specifically because I do a lot of work on linux in command line world and I though it would be the perfect device when combined with the Logitech Pro keyboard and Complete Linux Installer (it's an app on Google Play). It turned out to be quite a bit of work getting everything working because of Knox and SELinux. Eventually I got a custom kernel working that allows me to toggle SELinux between permissive and enforcing.
I attached an Odin flashable tar that works on the SM-P900 (wifi version). I am on the North American version, so I have no idea whether it will work in other regions. If you flash this kernel then there are a few things you need to know:
I'm assuming you already have root on your device.
When you boot it will still be in "Enforcing" mode. This change simply allows you to use the "setenforce" terminal command or any of the apps on Google Play that do this for you.
You might experience some wifi weirdness after you flash the kernel. You just need to open up /system/build.prop and change ro.securestorage.support from true to false and then reboot to resolve the issue.
If you have a different version of the device or want to compile it yourself for any reason I wrote an article describing how I compiled it here:
http://graemehill.ca/compiling-permissive-android-kernel/
I also did a few other things to fix the keyboard and get linux running properly, so if you're interested in that I described my setup in more detail here:
http://graemehill.ca/turning-a-galaxy-note-pro-into-a-linux-laptop/
Thank you for this!
Sent from my SM-P900 using Tapatalk
trying to build kernel
I'm trying to follow your guide to compile a kernel from source. I have installed (on my Win 8.1_64 PC) Android SDK/NDK. GnuWin32, JavaJRE, and downloaded SM-P900 kernel source.
I'm getting errors at "Apply Kernel Config" step.
here's the output: http://pastebin.com/yFqDrNY8
Thanks for your help
Don :good:
dodo99x said:
I'm trying to follow your guide to compile a kernel from source. I have installed (on my Win 8.1_64 PC) Android SDK/NDK. GnuWin32, JavaJRE, and downloaded SM-P900 kernel source.
I'm getting errors at "Apply Kernel Config" step.
here's the output: http://pastebin.com/yFqDrNY8
Thanks for your help
Don :good:
Click to expand...
Click to collapse
It looks like you're in Windows. To my knowledge it is not possible to compile a Linux kernel in windows. I would recommend downloading virtual box and installing some Linux distro in there. This is what I was talking about in the "environment" section at the top of the article.
For android development I find that you need access to a lot of tools where some are only available on Windows and others are only available on Linux so a Windows PC with a Linux VM is ideal in my opinion.
Oh ok, no problem. I just misread the guide. I've setup a build environment in a vm before to compile aosp for my Nexus 10. Shouldn't be too hard to do it again. I recently rebuilt my pc so the vm I had got nuked.
Sent from my SM-P900 using Tapatalk
ok I got my Ubuntu VM up and running using this guide
http://forum.xda-developers.com/showpost.php?p=50748836&postcount=25
installed android NDK to ~android/NDK, and unzipped the kernel source to ~android/kernel
followed your guide to build a SELinux permissive kernel but i'm getting some errors when trying to compile. here's the output:
http://pastebin.com/Npdu7J5h
EDIT: retried doing the EXPORT command and now it seems to be compiling
dodo99x said:
EDIT: retried doing the EXPORT command and now it seems to be compiling
Click to expand...
Click to collapse
When you export a variable in the terminal it only exists for that one session, so if you open a new terminal instance you need to run the command again. If you want to set it permanently normally you can just put the export command into ~/.bashrc
Oh I see. I'll give that a try. I was able to create a new boot.img following the rest of your guide. I have yet to try flashing it though. Will have to find some info about all the kernel options that can be set. Hopefully be able to integrate HMP to get all eight cores running at the same time.
Sent from my SM-P900 using Tapatalk
Cool, let us know how that goes. I wonder how much it would affect battery life.
Graeme H said:
Hey everyone. I bought this device specifically because I do a lot of work on linux in command line world and I though it would be the perfect device when combined with the Logitech Pro keyboard and Complete Linux Installer (it's an app on Google Play). It turned out to be quite a bit of work getting everything working because of Knox and SELinux. Eventually I got a custom kernel working that allows me to toggle SELinux between permissive and enforcing.
I attached an Odin flashable tar that works on the SM-P900 (wifi version). I am on the North American version, so I have no idea whether it will work in other regions. If you flash this kernel then there are a few things you need to know:
I'm assuming you already have root on your device.
When you boot it will still be in "Enforcing" mode. This change simply allows you to use the "setenforce" terminal command or any of the apps on Google Play that do this for you.
You might experience some wifi weirdness after you flash the kernel. You just need to open up /system/build.prop and change ro.securestorage.support from true to false and then reboot to resolve the issue.
If you have a different version of the device or want to compile it yourself for any reason I wrote an article describing how I compiled it here:
http://graemehill.ca/compiling-permissive-android-kernel/
I also did a few other things to fix the keyboard and get linux running properly, so if you're interested in that I described my setup in more detail here:
http://graemehill.ca/turning-a-galaxy-note-pro-into-a-linux-laptop/
Click to expand...
Click to collapse
I tried to install this using VBox Odin and I couldnt get it to work. Tried using BOOTLOADER and also PDA. Not sure the correct one but neither worked for me. Also, Moblie ODin hasnt yet worked but when it does, things will be much easier for me at least.
I have a newly rooted SM-900. I will have to find time someday to compile the kernel against what I have. Must be a slightly newer version than the one you posted. That is only thing I can think since I just got my 12.2. Thanks for the detailed info.
Camera?
Hey, thanks for the great kernel. It's working as expected to enable permissive mode, but I'm having one issue with it. When I use your kernel, the camera is disabled (says something like "Camera Failed"), and it won't work even when trying different software besides stock, like Google Camera. Anyway, clearing cache, etc. doesn't do anything, but the camera works again when I flash the stock kernel. Is this related to permissive mode or something else with the settings?
aarstar said:
Hey, thanks for the great kernel. It's working as expected to enable permissive mode, but I'm having one issue with it. When I use your kernel, the camera is disabled (says something like "Camera Failed"), and it won't work even when trying different software besides stock, like Google Camera. Anyway, clearing cache, etc. doesn't do anything, but the camera works again when I flash the stock kernel. Is this related to permissive mode or something else with the settings?
Click to expand...
Click to collapse
The camera fails for me too. I dumped a logcat and isolated the issue here:
W/ActivityManager( 2746): Permission Denial: get/set setting for user asks to run as user -2 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL
V/ApplicationPolicy( 2746): isApplicationStateBlocked userId 0 pkgname com.google.android.GoogleCamera
But... the camera is not a huge deal. It did, however, break wifi. I did not get a logcat of that yet, but I would assume it is also a permission issue.
Wifi works for me using the fix mentioned in the OP. Also, thanks for looking into the camera issue. I agree it's not a big deal, and it's easily fixed by flashing the stock kernel, until someone figures out a proper fix.
aarstar said:
Wifi works for me using the fix mentioned in the OP. Also, thanks for looking into the camera issue. I agree it's not a big deal, and it's easily fixed by flashing the stock kernel, until someone figures out a proper fix.
Click to expand...
Click to collapse
Wow, I totally missed that entire line in the OP... You literally just made my whole day. I fought this all day long, desperate to get ubuntu working. Thank you for pointing that out.
I get "xt_mark.h" is missing (no such file or directory) error. Any idea why that may be?
I'm using the source for p900 international hoping that I may sidestep the camera issue that way (by enabling permissive to the international kernel I mean), but as it stands it does not compile.
I've googled it but until now it was/is to no avail...
Graeme H said:
Hey everyone. I bought this device specifically because I do a lot of work on linux in command line world and I though it would be the perfect device when combined with the Logitech Pro keyboard and Complete Linux Installer (it's an app on Google Play).
Click to expand...
Click to collapse
Hey Graeme H,
we both have the same intention. I am downloading the international Kernel at the moment and will compile it again for you guys. The download takes a little longer as I am at vacations.
I am going this route: doviak.net/debian-kit/debian-kit_p00.html . In the future I would like to have arch linux running on this device but a customized debian would be okay for the beginning, too.
Eventually I will try to use framebuffer instead of vnc or something like that. I would love to use sublime-text and dwm on that device with that resolution
Good luck guys. I will try to update.
Edit: hehe I have dwm in front of me now and the resolution is so high that I am barely able to read
Compiled the kernel and flashed in on my device but my camera is still not working. Maybe we need to edit the config:
# Camera sensor devices
#
# CONFIG_VIDEO_OV7670 is not set
# CONFIG_VIDEO_VS6624 is not set
# CONFIG_VIDEO_MT9M032 is not set
# CONFIG_VIDEO_MT9P031 is not set
# CONFIG_VIDEO_MT9T001 is not set
# CONFIG_VIDEO_MT9V011 is not set
# CONFIG_VIDEO_MT9V032 is not set
# CONFIG_VIDEO_TCM825X is not set
# CONFIG_VIDEO_SR030PC30 is not set
# CONFIG_VIDEO_NOON010PC30 is not set
CONFIG_VIDEO_S5K6B2=y
# CONFIG_S5K6B2_CSI_C is not set
CONFIG_S5K6B2_CSI_D=y
CONFIG_S5K6B2_POSITION_FRONT=y
# CONFIG_S5K6B2_POSITION_REAR is not set
CONFIG_VISION_MODE=y
# CONFIG_VIDEO_M5MOLS is not set
# CONFIG_VIDEO_S5K6AA is not set
Click to expand...
Click to collapse
Rather than each people compiles its kernel, could someone put a link to download the international kernel compiled? I think this would allow more people to get this kernel. Thank
PHP:
smylion said:
Rather than each people compiles its kernel, could someone put a link to download the international kernel compiled? I think this would allow more people to get this kernel. Thank
Click to expand...
Click to collapse
Compiled from Kitkat source. [ur#l]erhan.es/upload/sm-p900-permissive-intl.tar[/url] (odin)
Thank you but the link does not work
smylion said:
Thank you but the link does not work
Click to expand...
Click to collapse
Sorry, it is erhan.es/upload/sm-p900-intl-permissive.tar

Linux deploy causes reboot.

Hi
I want to use linux deploy app on my s7 edge. When I click on on install in my linux deploy app after configuring a container, phone powers off about 10 seconds after that and then I have to manually reboot it. Any fix for that? And before it powers off it totally freeses. Not just the app but whole phone. It does not even react to physical buttons anymore.
Anyone?
unfortunately, I have same problem. I doubt meefik reads this thread though
Same issue here, post on his github page. Which Linux packages are you trying to run?
I suggest if debian has the repo for it to run gnuroot debian. It works the same but no root required. Since you are rooted you change selinux to permissive which allows more functions
EternalSeekerX said:
Same issue here, post on his github page. Which Linux packages are you trying to run?
I suggest if debian has the repo for it to run gnuroot debian. It works the same but no root required. Since you are rooted you change selinux to permissive which allows more functions
Click to expand...
Click to collapse
The solution was to install TGP kernel where SELinux enforceing was disabled.
https://forum.xda-developers.com/s7-edge/development/kernel-tgpkernel-t3501571
--
I know it's already old and dead topic but I am posting this so that of anyone googles that issue, he might find this answer.

Categories

Resources