Related
Alright, so I bought my Milestone II then realized what MOTO had done. What a shame.
So after looking around, I found Freemymoto.com. Droid X kexec module based off MS1 kexec code (look on google, the original is still available).
So this got me thinking and working. I got a development suite on to my MS2. (Debian chroot with Sid and GCC 4.2.1) Pulled the kernel sources from MOTO GPL and went to work. After a couple of mins, its clear the Droid X and MS2 kernel code bases are slightly different.
So after an hour of modifying the code for the MS2, I have been able to compile a kexec module and kexec-tools, insert the module and load the the "new" (from GPL sources) kernel in to the kernel space...
This is where I need some help/advise from the experts.
I get an /proc/atags not found. (not a huge deal just means I should not get bootargs, can work on that later with my setup) But when I go to hit the kexec -e to execute the new kernel, the usb disconnects and the screen freezes for 20 seconds or so. Then it takes me back to the moto bootloader and boots in to the standard kernel.
Bummer.
So any advice on catching the kernel panic and subsequent reboot in logs or serial? I'm not sure how to diagnose the problem. The problem compounds itself since I don't even know if I am producing a functional kernel.
I am pretty new at kernel hacking but amateur programming for years. Not to mention, I've only have had an android phone for about 2 months now.
Thanks
PizzaRoll
There there are not many (or not even a single) dev on this forum, you should take a look at the IRC of And-Developers: irc.freenode.net #milestone-modding
Scrylax_CZ (cant rly spell his name) hes a dev i believe
89% of them are MS1 modders, but they work on the MS2 aswell (just not that much) but still, they are good as i noticed, just try asking in their channel
PS: also visit and-developers.com
Thanks, I'll have a look.
Sent from my MotoA953 using XDA App
PizzaRoll,
I don't know if this will be of any help, but I think you can apply the 2ndinit + sh hijack technique to have some logs stored in /data. I was able to apply this on the Motorola Stock ROM, so I can Overclock and Undervolt my Milestone2 at boot time. The binaries from Milestone1 works quite well on my Milestone2, even the overclocking modules.
I was also trying to Port MIUI for Milestone2 and used the 2ndinit technique to be able to read the logcat after the system failed reboot.
What I've done:
- Installed Droid2 Bootstrap: to have custom recovery and to be able to boot into this recovery mode after the system crashes.
- Installed 2ndinit and sh hijack manually.
- Copied original logwrapper binary to mylogwrapper and modified the init.rc in /system/etc/rootfs. This was needed because Droid2 Bootstrapper conflicts with sh hijack technique.
- In init.rc, after mounting /data and after booting or not into clockwork recovery I added a line like this: exec /log-init.sh. Where log-init.sh just runs "/system/bin/logcat >> /data/logcat.log &"
If you need more detailed info I can provide that later. I will need to review my steps.
Also, I too am a developer skilled in C/C++ and linux, but I have no experience at all in kernel development. Also I an quite busy, but I may be able to provide some help
r2beta0 said:
PizzaRoll,
I don't know if this will be of any help, but I think you can apply the 2ndinit + sh hijack technique to have some logs stored in /data. I was able to apply this on the Motorola Stock ROM, so I can Overclock and Undervolt my Milestone2 at boot time. The binaries from Milestone1 works quite well on my Milestone2, even the overclocking modules.
I was also trying to Port MIUI for Milestone2 and used the 2ndinit technique to be able to read the logcat after the system failed reboot.
What I've done:
- Installed Droid2 Bootstrap: to have custom recovery and to be able to boot into this recovery mode after the system crashes.
- Installed 2ndinit and sh hijack manually.
- Copied original logwrapper binary to mylogwrapper and modified the init.rc in /system/etc/rootfs. This was needed because Droid2 Bootstrapper conflicts with sh hijack technique.
- In init.rc, after mounting /data and after booting or not into clockwork recovery I added a line like this: exec /log-init.sh. Where log-init.sh just runs "/system/bin/logcat >> /data/logcat.log &"
If you need more detailed info I can provide that later. I will need to review my steps.
Also, I too am a developer skilled in C/C++ and linux, but I have no experience at all in kernel development. Also I an quite busy, but I may be able to provide some help
Click to expand...
Click to collapse
would it be possible to port MIUI for the MS2? that would be awesome
Bigdaddy168 said:
would it be possible to port MIUI for the MS2? that would be awesome
Click to expand...
Click to collapse
Without the sources, I don't think so.
I was trying to Merge the Milestone1 MIUI version into the Milestone2 Stock ROM, but my efforts were not able to produce a stable version. It consisted into disassembling both frameworks and adding into MIUI's support for the Native methods required by motorola proprietary libs. I was able to boot into MIUI, but not for long. The system crashed a few moments after booting due to invalid calls to the graphics library. I was stuck at that point and gave up due to a lack of time. But the experience was good to increase my knowledge about android inner structure
Unfortunately, I haven't had much time this week to playground with 2ndboot and the sh hack. I like the idea. Im still working on what the problem is exactly.
The old saying is true. Defining your problem (root cause) is the most difficult part.
Sent from my MotoA953 using XDA App
oh rad, 2ndinit works on MS2? that's helpful to know
smacky_wolf said:
oh rad, 2ndinit works on MS2? that's helpful to know
Click to expand...
Click to collapse
Yeps, it works on mine. I'll take some time to write a guide from the scratch and post it here on XDA. I'm also trying to help santiemanuel to get it to work on his ROM, but I may be missing some detail.
r2beta0 said:
Yeps, it works on mine. I'll take some time to write a guide from the scratch and post it here on XDA. I'm also trying to help santiemanuel to get it to work on his ROM, but I may be missing some detail.
Click to expand...
Click to collapse
I just got the MS2 a couple days ago, so I'm really interested in custom ROMs for it, but I'm a total n00b when it comes to xda and custom ROMS, only having the experience of downloading and flashing ROMs for other phones in the past. With that said, I'd be VERY intersted in a guide for the MS2. Please let us know when its up! Thanks
PizzaRoll said:
Unfortunately, I haven't had much time this week to playground with 2ndboot and the sh hack. I like the idea. Im still working on what the problem is exactly.
The old saying is true. Defining your problem (root cause) is the most difficult part.
Sent from my MotoA953 using XDA App
Click to expand...
Click to collapse
I've just finished my guide on how to enable 2nd-init on MS2. You can check it out here. Maybe this can help you into defining the root cause of the problem, as you can add logcat and dmesg to custom init before calling the kexec. I store my logs at /data so I can read them on the next reboot (getting into clockwork recovery and being able to use adb shell).
If you have received errors like
Set ISCAN for wl_iw_combined_scan_set failed with -22
or your wifi turn on switch hangs, this is the solution for you
its appear that ICS is unable to set right frequency when your sim card country isnt US or EU, odd thing, but common thing about us (people who have wifi issue with ics) is that we don't live in us or eu.
fix is fairly simple, you need sqlite (which i got from http://forum.xda-developers.com/showthread.php?t=1067944)
and all you need is to run
sqlite3 /data/data/com.android.providers.settings/databases/settings.db "INSERT INTO secure (name, value) VALUES ('wifi_country_code', 'EU');"
turn wifi on and off, then you are good to go until next reboot.
the thing is i wonder where i should put this command to make it run *at right time* on next login, /system/etc/init.d/99nexusinit didn't did the trick, any idea?
Sql you used is just for one session, use the one i added 1 line to and it should stick on reboot.
INSERT INTO secure (name, value) VALUES ('wifi_country_code', 'EU');
Commit;
Sent from my Nexus S using xda premium
i received this error
SQL error: cannot commit - no transaction is active
Can read out of the database with
Select * from secure;
If not then there might be somethin wrong with the connection.
In this case add commit; to the original code you used.
Sent from my Nexus S using xda premium
can you give a step by step instruction how to do this?
thanks
Thanks a lot dude , worked for me
can you tell me how you did it? step by step please..
just get the mentioned file from the link and run it , thats it , but you need to make sure you have a root access first !
raminchit said:
just get the mentioned file from the link and run it , thats it , but you need to make sure you have a root access first !
Click to expand...
Click to collapse
ok so i plug in my phone with wifi not working and run the .bat file?
thats is?
yeap , thats what I did , with usb debugging enabled
raminchit said:
yeap , thats what I did , with usb debugging enabled
Click to expand...
Click to collapse
it didnt work for me. i ran the tool it says succes but wifi doesnt work.
OP, can you please inform kernel developers about possible solution for us (with wifi iasues) so they incorporate it in their kernel's next versions?
Sent from my Nexus S using XDA App
thegtfusion said:
it didnt work for me. i ran the tool it says succes but wifi doesnt work.
Click to expand...
Click to collapse
emm
use adb push to upload sqlite3 to /mnt/sdcard, run the sqlite command under the adb shell.
lio02 said:
OP, can you please inform kernel developers about possible solution for us (with wifi iasues) so they incorporate it in their kernel's next versions?
Sent from my Nexus S using XDA App
Click to expand...
Click to collapse
I don't know many developers around here, feel free to contact them on your own, fix is really simply enough.
arminzoup said:
emm
use adb push to upload sqlite3 to /mnt/sdcard, run the sqlite command under the adb shell.
Click to expand...
Click to collapse
Can you give a step by step instructiom? Plz plz im a noob at adb..
Sent from my Nexus S using xda premium
thegtfusion said:
Can you give a step by step instructiom? Plz plz im a noob at adb..
Sent from my Nexus S using xda premium
Click to expand...
Click to collapse
Same here - did not work for me
amangoenka said:
Same here - did not work for me
Click to expand...
Click to collapse
try this one: http://forum.xda-developers.com/showthread.php?t=1403801
Found by laidaxin , from w.w.w.591fan.c.o.m
for us that are noobs, what exactly is this?
dingding2012 said:
Found by laidaxin , from w.w.w.591fan.c.o.m
Click to expand...
Click to collapse
Doesn't work for me.
Sent from my MB860 using XDA App
thebluetoothkid said:
for us that are noobs, what exactly is this?
Click to expand...
Click to collapse
Its supposed to be a working recovery for flipside. I can't get it to work however.
Sent from my MB860 using XDA App
I tried and it was a working recovery for my 508.
I installed it.
when reboot, I continued clicking the volumn down button, and the entered.
Sorry for my poor English.
dingding2012 said:
I tried and it was a working recovery for my 508.
I installed it.
when reboot, I continued clicking the volumn down button, and the entered.
Sorry for my poor English.
Click to expand...
Click to collapse
I am able to do all that also, but can't backup and can't install anything. I get error can't mount data/recovery and aborts.
ok... so i'm trying for the 100th time to install this silly thing... and for some reason... when i try to run it... it kicks me out...
i'm not sure what i'm doing wrong...
when i attempt to pause the install process... i get a screen full of if i type adb without an argument...
if someone could gimme a hand with this or tell me what the hell i am doing wrong... i'd appreciate it...
i wanna try to get laidaxin's cm7.2 working on my phone...
i dunno if it matters... but i am attempting to install from a windows xp machine...
Hello!
First, Thanks to all people around this work, specially Laidaxin for good work.
Well, sadly... I also still stuck on install the FlipSide recovery option of the first post... I did all te proccess by eleven times, testing different details that may be not clear for me (as run as administrator, with abd CMD screen closed and opened, if the version of adb never shows me the logs that appears in cmd screenshot... several times I got on the FlipSide the screens talking about su and later 2ndinit script got superuser permissions... but the screens of cmd generated by the script are so fast that was not able to read or check if the 2ndinit script was succesfull or if there something else that may be failing/missed... so by now still no luck)
as a resume, in hope that may help to test from new friends around here:
1) I reflashed my FlipSide to stock with sbf from the other thread tutorial (I use sbfflash in linux and everything works fine, using Power+UParrow in keyboard to enter in bootloader mode my Flipside)... and then I insert my SIM and SD card wiped with only the CM7-Laidaxin.zip file on it, ...complete setup as minimal possible in order to be able to set USB mode to memory access, and turn on usb development in applications menu.
2) Then I ROOT with SuperOneClick version 2.1.1!!! and connect my phone in normal use screen home (NOT bootloader mode!) with UBS debugging turn on and with USB mode set to memory card access (NOT Moto Portal No Media access...), the other methos with Z4root and newer versions of SuperOneClick FAILS for me...
3) I then try to install recovery with Laidaxin installer and procedure, but as I said after some attemps I still not success in get the recovery working, also try diferent ways... removing battery then reboot with VolumeDown pressed, Turn off normal and repeat, turning ON AND AFTER see the Red Moto press the VolDown key short time, later maintained it long, then pressing it several times, etc...
So, I made this resume in order to share info from my side and hope to save some time to other friends that may want to test the CM7 from Laidaxin, than in fact seems like a GREAT work for our Flips... so please if any help to get this fully working and tested will be very gratefull...
Best regards!
Ok... since I still can't get the automated installer working... I would really appreciate if someone could direct me to the forum/website that that installer came from... I would love to try to push it myself... but I'd have to do some reading...
Sent from my MB508 using Tapatalk
rignfool said:
Ok... since I still can't get the automated installer working... I would really appreciate if someone could direct me to the forum/website that that installer came from... I would love to try to push it myself... but I'd have to do some reading...
Sent from my MB508 using Tapatalk
Click to expand...
Click to collapse
Hi!
Ok, I am not totally sure, but I suspect that this is the original link of this recovery, however, just now I need to go to my work, so, I do not have chance right now to check it, but hope may be usefull.
http://forum.xda-developers.com/showthread.php?t=944543
Best regards!
You should be able to install it like this:
- Extract everything in the "data" folder into a folder called "bootmenu" on your sdcard
- Then use either "adb shell" from a command prompt, or Terminal Emulator on the phone should work:
Code:
su
cp -R /sdcard/bootmenu /data/bootmenu
cd /data/bootmenu
chmod 0755 *
./install.sh
And it should say "Install complate...."
You can also remove the folder(s) if you want:
Code:
rm -R /data/bootmenu
rm -R /sdcard/bootmenu
Then to get into it, reboot the phone and once the notification light turns on, hit volume down
You my friend.... are the ****ing man...
FYI
Use the touchpad to select
Sent from my MB508 using Tapatalk
One thing doesn't work though... it can't unmount system... so I was unable to do a nandroid restore... rather depressing....
Sent from my MB508 using Tapatalk
rignfool said:
One thing doesn't work though... it can't unmount system... so I was unable to do a nandroid restore... rather depressing....
Sent from my MB508 using Tapatalk
Click to expand...
Click to collapse
I ran into the same problem but mine also stopped me from installing any other rom to test, run, or otherwise. I'm at a standstill in terms of helping test.
rignfool said:
One thing doesn't work though... it can't unmount system... so I was unable to do a nandroid restore... rather depressing....
Sent from my MB508 using Tapatalk
Click to expand...
Click to collapse
laidaxin's rom replaces this recovery with one that doesn't quite work perfectly yet...
You should be able to boot back into CM7 and re-run the above commands and it'll work again
That doesn't change anything for me... it still won't unmount system...
I think if I read the output from the script install...
Our recovery installs to system... since Motorola doesn't love us
Sent from my MB508 using Tapatalk
Maybe try "rm -R /system/bootmenu" then install it...
rignfool said:
That doesn't change anything for me... it still won't unmount system...
I think if I read the output from the script install...
Our recovery installs to system... since Motorola doesn't love us
Sent from my MB508 using Tapatalk
Click to expand...
Click to collapse
It does the same for me, which is what's keeping me from trying CM7, as I have no way to restore my current nandroid. The defy installs their recovery to /system as well and I gather that it works as intended, I wonder if it's that we need our own build of CWM. Do we know if whoever built CWM for the defy has their source tweaks available?
Unless you have something irreplacable in your /system or /data... I would just have RSD lite and an sbf ready... and take the plunge...
Because....
When you use CM7... apps2sd moves not only the apk... but also the lib files to the sd card...
As long as you switch the 'network operator' to GSM only (in wireless and networks)... laidaxin's kang runs beautifully... much much faster than stock
Sent from my Filpside using Tapatalk
Link2SD has no problem moving the lib files in our stock rom... I'm no stranger to reflashing with RSD Lite, it's just tedious to get everything set back up JUST right, and this is exactly the kind of thing nandroid is great for.
I have been looking into slow "cold-start" gps locks & in some peoples cases, complete lack of gps.
In testing, everything I've found so far, seems to be pointing at the lack of Broadcom's proprietary long term orbit data (lto.dat) used by the GPS Daemon on our devices...
These chips are in the a500/a200/a100 devices (101 & 501 devices use an ericsson GPS)
For the sake of not regurgitating a whole heap of info, you can read more about the lto.dat file in plenty of places across the web.
pacificwing recently bought this up in crypted's aGPS patch thread, some discussion on the subject starts around page 30.
The attached, recovery flashable zip will patch your system with a *workaround* to automate the download & update of lto.dat...
It is derived from past work in CyanogenMod for the aries (& other) devices.
It should be compatible with most ROM's, but may need adjusting if your busybox wget applet can't resolve dns. (see notes in the script)
What it does:
Installs the script "get-gps-lto" to /system/bin
Creates a service entry in the init.<boardname>.rc file which runs the script on a semi regular basis. (triggered by network connectivity)
The script is tunable by a number of variables, modify as you see fit.
Or, flash & forget... messages are sent to logcat so you can check up on it easily.
This zip has only been tested on a500, cm9, ics bootloader & cwm recovery.
Mileage may vary on other combinations, the zip patches your boot.img so please make a nandroid backup to be safe. (only need to restore /boot if there's a problem)
Installation problem? please let me know & provide a recovery.log so I can make adjustments to the zip if need be.
Standard disclaimers apply, flash at your own risk.
Oh nice I can build in my rom and the kernel before I release it.
Thanks in advance! I'll flash it in a bit!
civato said:
Oh nice I can build in my rom and the kernel before I release it.
Click to expand...
Click to collapse
Not a problem, you'll be sure to test it before releasing the rom I hope?
Anyone has this working yet? Btw, thank you waydownsouth
waydownsouth said:
Not a problem, you'll be sure to test it before releasing the rom I hope?
Click to expand...
Click to collapse
No
waydownsouth said:
The attached zip will patch your system with a *workaround* to automate the download & update of lto.dat...
It is derived from past work in CyanogenMod for the aries (& other) devices.
It should be compatible with most ROM's, but may need adjusting if your busybox wget applet can't resolve dns. (see notes in the script)
> Download here <
Click to expand...
Click to collapse
So that explains why I could never get my wget script to work....
Sent from my A500 using XDA Premium HD app
would it be possible to port this to another device? nice job by the way
waydownsouth said:
It should be compatible with most ROM's, but may need adjusting if your busybox wget applet can't resolve dns. (see notes in the script)
Click to expand...
Click to collapse
Other than hard coding the IP address (which worked for me by the way) is there a better solution to fixing the busybox DNS problem? I've read that putting a resolve.conf file in /system/etc that contains the Google DNS nameservers should work but I tried it and no luck.
Also, any reason you're not using the 30 day file rather than the 7 day? With the 30 day you wouldn't have to run the script all that often... Is the 30 day less accurate or something?
In any event, thanks.
Sent from my A500 using XDA Premium HD app
I build in my kernel for RF1
civato said:
No
Click to expand...
Click to collapse
azoller1 said:
would it be possible to port this to another device? nice job by the way
Click to expand...
Click to collapse
possible, yes... the installer zip will only work for the picasso, picasso_e & vangogh devices... I could add more devices to the installer if need be?
Only thing I could see being a problem is the where the service entries get written to in the init.<boardname>.rc
The device would need to use a boot.img for it's ramdisk too... Most Samsungs are very different in that regard
BakaNeko59 said:
Other than hard coding the IP address (which worked for me by the way) is there a better solution to fixing the busybox DNS problem? I've read that putting a resolve.conf file in /system/etc that contains the Google DNS nameservers should work but I tried it and no luck.
Also, any reason you're not using the 30 day file rather than the 7 day? With the 30 day you wouldn't have to run the script all that often... Is the 30 day less accurate or something?
Click to expand...
Click to collapse
Most statically compiled generic busyboxes will be like that on android, in the case of CyanogenMod, the busybox has been compiled against the android bionic lib & has a number of modifications for Android compatibility.
I stuck to the 7day data so it will stay a bit fresher... I figured that 60kb isn't much to download every few days.
It's easy enough to change those parameters in the script to point to the 30day
Also, haven't yet had time to test how effective the 30day data is after 20 + days... since I only made this yesterday.
What has been your experience?
waydownsouth said:
possible, yes... the installer zip will only work for the picasso, picasso_e & vangogh devices... I could add more devices to the installer if need be?
Only thing I could see being a problem is the where the service entries get written to in the init.<boardname>.rc
The device would need to use a boot.img for it's ramdisk too... Most Samsungs are very different in that regard
Most statically compiled generic busyboxes will be like that on android, in the case of CyanogenMod, the busybox has been compiled against the android bionic lib & has a number of modifications for Android compatibility.
I stuck to the 7day data so it will stay a bit fresher... I figured that 60kb isn't much to download every few days.
It's easy enough to change those parameters in the script to point to the 30day
Also, haven't yet had time to test how effective the 30day data is after 20 + days... since I only made this yesterday.
What has been your experience?
Click to expand...
Click to collapse
it actually is a samsung, the galaxy player 5.0 so you dont have to do it you could pm me a short tut.
i
This works great! Thanks!
waydownsouth said:
Most statically compiled generic busyboxes will be like that on android, in the case of CyanogenMod, the busybox has been compiled against the android bionic lib & has a number of modifications for Android compatibility.
I stuck to the 7day data so it will stay a bit fresher... I figured that 60kb isn't much to download every few days.
It's easy enough to change those parameters in the script to point to the 30day
Also, haven't yet had time to test how effective the 30day data is after 20 + days... since I only made this yesterday.
What has been your experience?
Click to expand...
Click to collapse
Well,since I've never gotten my sManager script method to work I've just been manually downloading the 30 day one every every now and then. I haven't actually been using my GPS much so I can't say how good it's been.
Is there a busybox installer on the market that you think would be better than the generic one? Or is it possible the CM one would work with Flexreaper?
Sent from my A500 using XDA Premium HD app
BakaNeko59 said:
Well,since I've never gotten my sManager script method to work I've just been manually downloading the 30 day one every every now and then. I haven't actually been using my GPS much so I can't say how good it's been.
Is there a busybox installer on the market that you think would be better than the generic one? Or is it possible the CM one would work with Flexreaper?
Sent from my A500 using XDA Premium HD app
Click to expand...
Click to collapse
I build IT in flexreaper RF1 and the kernel of RF1. Release maybe tomorrow.
BakaNeko59 said:
Is there a busybox installer on the market that you think would be better than the generic one? Or is it possible the CM one would work with Flexreaper?
Click to expand...
Click to collapse
I think all the busybox installers have generic, compiled for arm versions, they will likely have the same problem.
The cm/bionic one is dynamically linked, so depends on some libs in the rom. You could compile a static version against the android source (or ndk), but probably won't work on different versions of android.
Other option, there are real wget binaries compiled for android floating about which aren't neutered like the busybox version... they have no problems resolving dns.
delete the busybox wget symlink & drop in the binary...
waydownsouth said:
I think all the busybox installers have generic, compiled for arm versions, they will likely have the same problem.
The cm/bionic one is dynamically linked, so depends on some libs in the rom. You could compile a static version against the android source (or ndk), but probably won't work on different versions of android.
Other option, there are real wget binaries compiled for android floating about which aren't neutered like the busybox version... they have no problems resolving dns.
delete the busybox wget symlink & drop in the binary...
Click to expand...
Click to collapse
Well, in my 53 years of existence I've grown lazy. I think I'll just use your solution and stop worrying about my own since yours works like a charm.
Sent from my A500 using XDA Premium HD app
I think that gpsfix needs some more fixing comparing with manually downloading lto.dat and copying it at system/gpsconfig file..lr data/gps file..........
mine wouldn't find location at all before on cm9 but with this, after initial long lock, other locks only took ~5 secs. thanks!
drharisis said:
I think that gpsfix needs some more fixing comparing with manually downloading lto.dat and copying it at system/gpsconfig file..lr data/gps file..........
Click to expand...
Click to collapse
This downloads the lto.dat file to the default location /data/gps/
If your gpsconfig.xml file has been modified to point to /system rather than /data, then it won't work.
You could modify the script to point to /system, but, you would also need to include code to mount /system rw before attempting to update.
I think that's what your post was about?
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