[Q][DEV] Kernel modules loading at boot-time : which framework ? - Eee Pad Transformer Q&A, Help & Troubleshooting

Hi,
Usually on linux, there is a kernel loading modules at boot-time framework, cf. modules.conf.
No longer present in android.
When typing lsmod, there is two modules loaded by default : tntfs, and bcm4329 (and voodoo_sound
if you have it).
I'm trying to figure out what is the standard procedure on android : I've noticed on the
init.rc that the tntfs.ko is loaded, but can't figure out when bcm4329.ko is loaded.
Any idea ?
Moreover, I know that voodoo controller is able to load his own kernel module (voodoo-sound)
at boot-time. Anyone knows how the voodoo dev did that ?
My current idea is to modify init.rc to source a new file - let's say init.rc.local - to keep my custom mod. It'll
allow minimal changes when updating+root : just copy the init.rc.local and change the init.rc...
Sounds like we're recreating linux boot framework. lol.

This is something I've done on the HTC Incredible and the Droid 1 in the past, but in honeycomb, this is different, not very obvious yet:
Rather than try to emulate whatever Redhat or Ubuntu has done, which usually doesn't work, I either would use the line where tntfs.ko is insmod'd in /init.ventana.rc (sorry, think that's the filename), and add in the modules you want to add right there. Make sure to save the original file so you'll have a shot at fixing it if you make a mess.
The other thing is just to find some developer that appears to know what they're doing, and download their ROM, like Roach. I just downloaded his prime 1.6 ROM and unpacked it, then noticed immediately that he's got this in there:
/system/etc/init.d/01init{stuff},
Well that seems pretty important, so I did a grep 'init.d' * -R from the / level, and could only see little of importance, not any shell file like initrc pointing to it, just that busybox is linked to it, etc.
I figured it's worth a shot to create the same file structure on the stock ROM (/system/etc/init.d/0X{name} and see if it executes :: Start it with the usual #!/system/bin/sh
# load some modules
/system/bin/inmod /system/lib/modules/cifs.ko (or whatever)
and see what happened, if anything.
Better yet, I'd just send a message to Roach or some other ROM developer and ask.
Good luck -
altsyst said:
Hi,
Usually on linux, there is a kernel loading modules at boot-time framework, cf. modules.conf.
No longer present in android.
When typing lsmod, there is two modules loaded by default : tntfs, and bcm4329 (and voodoo_sound
if you have it).
I'm trying to figure out what is the standard procedure on android : I've noticed on the
init.rc that the tntfs.ko is loaded, but can't figure out when bcm4329.ko is loaded.
Any idea ?
Moreover, I know that voodoo controller is able to load his own kernel module (voodoo-sound)
at boot-time. Anyone knows how the voodoo dev did that ?
My current idea is to modify init.rc to source a new file - let's say init.rc.local - to keep my custom mod. It'll
allow minimal changes when updating+root : just copy the init.rc.local and change the init.rc...
Sounds like we're recreating linux boot framework. lol.
Click to expand...
Click to collapse

Tested.
Does not work, because modified room probably calling busybox run-parts.
Anyway I've found a hack, I'm posting it on general section.

Related

[THINK TANK] Toggle between RHack and NonRamHack

Hey Everyone,
I was just wondering that if we have a build to which we have BOTH RamHack kernels and the non-ramhack kernel, would there be a way to write a quick app or script to switch between them.
I guess we could store both kernels on the /sdcard and use a .sh script to flash_image between them, and reboot. I dont believe we can "hot-swap" between kernels, but if anyone knows a method, please respond here
If anyone can think of a better or more efficient method of doing this, I believe the whole community would benefit. Lets see if we can get something like this going....
zimphishmonger said:
Hey Everyone,
I was just wondering that if we have a build to which we have BOTH RamHack kernels and the non-ramhack kernel, would there be a way to write a quick app or script to switch between them.
I guess we could store both kernels on the /sdcard and use a .sh script to flash_image between them, and reboot. I dont believe we can "hot-swap" between kernels, but if anyone knows a method, please respond here
If anyone can think of a better or more efficient method of doing this, I believe the whole community would benefit. Lets see if we can get something like this going....
Click to expand...
Click to collapse
is it really that hard to boot into recovery and flash an update.zip?
I guess this is what you're looking for:
http://wootroot.com/blog/?page_id=1463
Ive seen it implemented on one other rom on xda, but can't remember which one ..
I am trying to make it easier and more efficient to switch between them. The uneek switch seems exactly what im looking for
I put together a version of uneeks script that can be flashed over SuperD or FastTest3.1.
ISSUE THOUGH, I cant get it to flash correctly, as I get the "update-script not found" error, even though I signed it and created the appropriate META-INF directories.
Here is the file, if anyone thinks they can fix it
Uneek Script (needs to be fixed\signed) : http://www.4shared.com/file/257220832/8b6c2940/uneek.html
Alpha release
Here is a very alpha release of a working port of uneek's RamHack/NonRamHack Toggle script ported to SuperD 1.10.2 by myself.
http://www.4shared.com/file/257253893/a61182a2/Uneek_Script.html
Instructions
extract zip file to /sdcard/uneek
Launch terminal
type 'su'
type 'sh /sdcard/uneek/install-uneek.sh' -should see no errors/messages
execute 'uneek' from /system/bin
Chose Ram option or JIT (not tested) options, all others prob dont work as I didnt modify them
reboot (you must do so to see effects take place, the kernel doesn't "hot-swap" :-( )
WiFi still works, CC & Swap work.
Issues
Switch breaks boot screen - not sure why as its stored in framework-res.apk, but still a bug
Leave me feedback\ improvements\whatever......
You still have to boot into recovery so you might as well flash a zip containing a rhack or noram-hack kernel.
I did some scripts based off Kings,
get gscript from the market ( donate if you like it )
and drop script into the gscript folder
with a little uname query you could have just one script, which switches based on the current running kernel
Edit: , actually if your kernel needs different kernel modules, then you will have to build in a copy ( which I suspect is where king got his rwsystem bit from , he copied from a script which updates the kernel modules )
Firerat said:
...<snip>...
my faster, much safer script
Code:
#!/system/bin/sh
if [ -e /data/kernels/full3d.img ];
then
if [ "`md5sum /data/kernels/full3d.img|cut -d " " -f1`" != "061284119d4ce46cbe0b585e0a8b2d0b" ];
then
echo "/data/kernels/full3d.img isn't the version I was expecting"
echo "I'm not going to flash it, as it may have become corupt"
exit 1
else
flash_image boot /data/kernels/full3d.img
echo "full3d Kernel Flashed..."
echo "Rebooting now"
sleep 1
shutdown -r now
fi
else
echo "Sorry, /data/kernels/full3d.img"
echo "seems to be missing....."
exit 1
fi
and yeah, I could never spell corrupt , is it one or two 'r's?
PS , the md5sums in the scripts are for the power off fix boot.img's I did for you guys
if you are wanting to switch to different boot.imgs then update the md5sum its checking for ( or remove the check )
Click to expand...
Click to collapse
If you have an engineering SPL installed, there isn't any need for the recovery partition, so might as well install your second kernel to the recovery partition. Boot normal = normal, boot recovery = ramhack.
lbcoder said:
If you have an engineering SPL installed, there isn't any need for the recovery partition, so might as well install your second kernel to the recovery partition. Boot normal = normal, boot recovery = ramhack.
Click to expand...
Click to collapse
and then have a script switch wlan.ko if incompatible
might as well switch with script and keep recovery for the odd times when you just want to quickly flash some zips from a list and not at your pc.
yeap, I've downloaded and flashed a rom while 'out and about' before.
Firerat said:
and then have a script switch wlan.ko if incompatible
might as well switch with script and keep recovery for the odd times when you just want to quickly flash some zips from a list and not at your pc.
yeap, I've downloaded and flashed a rom while 'out and about' before.
Click to expand...
Click to collapse
If the only difference is ramhack on one but not the other, then the wlan module will be fine -- there is NO REASON to be switching modules around with your kernel unless you use a kernel that is binary incompatible -- which means DIFFERENT VERSION.
lbcoder said:
If the only difference is ramhack on one but not the other, then the wlan module will be fine -- there is NO REASON to be switching modules around with your kernel unless you use a kernel that is binary incompatible -- which means DIFFERENT VERSION.
Click to expand...
Click to collapse
yeap, true but why not keep options open?
What if they decide they want to switch between binary incompatible kernels?
They would need to switch kernel modules anyway.
so get a script that works, and is simple to 'generate'.
I know you are trying to keep it simple, but you are actually needlessly setting up restrictions, which would then require a script to get around.
So why not use a script from the start, keeping the added convenience of a recovery image?
Firerat said:
yeap, true but why not keep options open?
What if they decide they want to switch between binary incompatible kernels?
They would need to switch kernel modules anyway.
so get a script that works, and is simple to 'generate'.
I know you are trying to keep it simple, but you are actually needlessly setting up restrictions, which would then require a script to get around.
So why not use a script from the start, keeping the added convenience of a recovery image?
Click to expand...
Click to collapse
If the only objective is to be able to easily toggle between ramhack and noramhack, then the recovery solution is (1) more reliable, (2) doesn't require reflashing NAND, (3) just easier to activate. With the reflashing approach, you have to either go into recovery and flash something, or pause-and-wait-and-autoreboot.
lbcoder said:
If the only objective is to be able to easily toggle between ramhack and noramhack, then the recovery solution is (1) more reliable, (2) doesn't require reflashing NAND, (3) just easier to activate. With the reflashing approach, you have to either go into recovery and flash something, or pause-and-wait-and-autoreboot.
Click to expand...
Click to collapse
did you ever read anything?
the script is as easy as a couple of taps, maybe home button, swipe tap tap.
( the key app here is gscript )
the flash is over very quickly, it checks md5sum first, it reboots.
you have to reboot with the recovery method anyway
recovery method restricts to binary compatible kernels, or require a script to switch kernel modules.
It is a no brainer imo, keep it flexible and keep the convenience of a true recovery.img
ok, so nand only gets what, on average 10,000 writes, is it really going to reduce its life in practice?
I like your idea, it will work but it just isn't as flexible as a script.
It is however more suited to an mt3g, offering duel ROM
I'm thinking mtdblock3 for one ROM, block4 for the other
errm, data , yeah might need to section that up somehow
any reason why a loopback can't sit on yaffs?
oh, and the ramdisk will need tweaking, obviously.
Sorry back on topic
Guys,
Either will work, if you do have incompatible kernels, and are having problems with scripts just let me know, I can probably make a script to generate a script for you.
1) Booting into recovery to change out your kernel image is totally unnecessary. You can do it via CLI with the flash_image command -- most every modded ROM already includes it.
2) Removing the recovery image just to put up a second install also seems somewhat overkill for devices as heavily limited on storage as most Android phones -- especially the G1.
3) I don't know about loopback on yaffs2 -- but I don't see any reason why it couldn't work.
4) It really seems to me that what we need is some kernel hacker who's familiar with hotswapping patched files -- a la ksplice ( http://www.ksplice.com/ ) -- to hack together a genuine, non-rebooting, RAMhack switch.
5) In all seriousness; what makes gscript superior to ASE ( http://code.google.com/p/android-scripting )?
IConrad01 said:
5) In all seriousness; what makes gscript superior to ASE ( http://code.google.com/android-scripting )?
Click to expand...
Click to collapse
Nothing, apart from its easy, it works and I haven't looked at ase yet
btw , you missed a p/ in that link
http://code.google.com/p/android-scripting/
btw , you missed a p/ in that link
http://code.google.com/p/android-scripting/
Click to expand...
Click to collapse
>_<
Pesky perniciously persistently phantasmagoric P!!!
I just keep on seeing people referring to gScript when ASE is a vastly more robust offering. It can run its scripts as daemons, run in background, run in terminal, it offers the same desktop shortcut option -- and more importantly, it can run Python, Perl, JRuby, Lua, BeanShell, JavaScript, Tcl, and shell scripts. (It loads the interpreters onto your /sdcard.) I've asked this question more than once before and I've never gotten an answer. It really seems like people just aren't aware of ASE -- which is kinda sad, considering the fact that ASE is still seeing continuing development whereas development ended on gScript sometime at the end of last year.
IConrad01 said:
>_<
Pesky perniciously persistently phantasmagoric P!!!
I just keep on seeing people referring to gScript when ASE is a vastly more robust offering. It can run its scripts as daemons, run in background, run in terminal, it offers the same desktop shortcut option -- and more importantly, it can run Python, Perl, JRuby, Lua, BeanShell, JavaScript, Tcl, and shell scripts. (It loads the interpreters onto your /sdcard.)
Click to expand...
Click to collapse
no, I am very interested in it,
I have been meaning to have a proper look at it for sometime
, I think I first saw it on @google
gscript is just handy,
unzip this, gscript from market,add, load, tick su, save , tap
But I promise , I will look at ASE
Firerat said:
and then have a script switch wlan.ko if incompatible
might as well switch with script and keep recovery for the odd times when you just want to quickly flash some zips from a list and not at your pc.
yeap, I've downloaded and flashed a rom while 'out and about' before.
Click to expand...
Click to collapse
Glad this is getting your attention....My script was pretty dirty anyways.
Anyway you can package it up in signed-zip format for easy access and modification of boot.imgs. Im having some issues with the update-script portion during the signing process tos keeping me from getting mine to be "flashable"
zimphishmonger said:
Glad this is getting your attention....My script was pretty dirty anyways.
Anyway you can package it up in signed-zip format for easy access and modification of boot.imgs. Im having some issues with the update-script portion during the signing process tos keeping me from getting mine to be "flashable"
Click to expand...
Click to collapse
still having update-script issues?
if you post it, I'll be happy to take a look for you
Oh, I've started a kernel switch script
I'll do some testing when its done and post it here for you

[Q] archos gen8_gpl_froyo kernel build

Just for fun and because I can, I started to work on recompiling the kernel for my Archos 10.1 (gen8) device.
I'm working with the Archos provided gen8_gpl_froyo source tarball.
Apart from some small stuff I could work out, like unterminated double quoted strings in config.in files, patches that don't apply to sources because the sources contain symlinks where files are expected, and of course the rounds of what-do-I-need-on-my-host (automake, texinfo, ...) - I got both a working kernel compile, and all the rest of the build.
I proceeded to menuconfig in some stuff I'd like to have in the kernel, as modules, like netfilter conntracking / NAT support, advanced (policy) routing, namespaces, nfsd. Also went smoothly.
I can successfully start that kernel on an existing Uruk 0.7 install, by untarring my self built modules over what Uruk comes with in /lib/modules/2.6.29-omap1/kernel, depmod that, and use the Uruk's /root/initramfs.cpio.gz together with my self built zImage for flashing through the recovery menu.
The system then boots up fine, I can verify it is running the kernel, I can load the netfilter conntracking / NAT modules, and even install an state ESTABLISHED rule which does what it should.
HOWEVER - and that's why I open this thread, there is constant chatter, coming from the kernel, being written to logcat. This uses quite a bit of CPU, probably for the logging work, so I rapidly reverted to the Uruk's own kernel.
What I would like to know, is whether somebody else has seen the following kernel messages in a similar scenario, and knows what I did wrong / how I can work around that?
Code:
03-06 15:33:56.816 I/cat ( 1020): <6>tmdlHdmiTxHdcpCheck 4245
03-06 15:33:56.816 I/cat ( 1020): <3>Bad input instance value returned in hdcp_check line 729
03-06 15:33:56.847 I/cat ( 1020): <6>tmdlHdmiTxHdcpCheck 4245
03-06 15:33:56.847 I/cat ( 1020): <3>Bad input instance value returned in hdcp_check line 729
03-06 15:33:56.878 I/cat ( 1020): <6>tmdlHdmiTxHdcpCheck 4245
03-06 15:33:56.878 I/cat ( 1020): <3>Bad input instance value returned in hdcp_check line 729
It is a constant repetition of these two lines, I just showed three instances so you can get a feel for the frequency from the timestamps.
The function names / messages are nowhere to be found in the archos released source code, nor in the modules compiled from there.
They reside in two module files that lie directly in /lib/modules/, named hdmicec.ko and hdmitx.ko
The hdmitx.ko module is loaded when I boot into my kernel. Loading hdmicec.ko by hand does not improve the situation. Also, under the normal Uruk 0.7 kernel, only the hdmitx.ko is loaded.
Update 7.3.: the situation stays the same after I modified my .config to be, except for the diverse modules I additionally selected, identical to the kernel /proc/config.gz found on Uruk 0.7. There seem to be several things missing that are in Uruk 0.7, i.e. the interactive CPU governor, and filesystem caches.
I also compared the loaded modules after boot, and apart from module size, it is the same list with Uruk 0.7 and my kernel.
Trying again to use my kernel, I also noticed that the tablet freezes as soon as I try to start WLAN. Still pings (on the g_ether USB connection I use), but the GUI is frozen and ssh connections, too.
It seems to me that the gen8_froyo_gpl source released by Archos is somewhat lacking...
Where can I find the Uruk 0.7 kernel tree, or some other kernel that is Known Good?
Latest kernel source you can find here:
http://sauron.pourix.com/UrukDroid/
conntrack/nat brakes compatibility with tiwlan kernel driver - witch is not part of kernel (but can be recompiled).
Anyway - entire wifi stock is a mess .. sadly
$aur0n said:
Latest kernel source you can find here:
http sauron.pourix.com /UrukDroid/
Click to expand...
Click to collapse
Thanks! What is the build system are you using?
I'm not exactly confident that the one I built from the Archos GPL package, is good.
But it seems to work! I successfully compiled your kernel, with your .config, and run that now. Wifi is working so far, my g_ether usb network connection works, too, and no funny hdmi messages are showing.
Now I'm going to build in some of the stuff I wanted of the networking stuff, and see what breaks wifi exactly. I would _love_ to have conntrack / NAT available.
Update built again with various networking stuff enabled, advanced routing and namespaces among them, but consciously NOT with conntracking. Guess what - tiwlan_drv.ko does not load! When triggered through the UI that results in an apparent complete hang, but when trying insmod from a shell it is benign. All in all that's good - the wlan problems probably don't have anything to do with conntracking, and I have a half way easy test case to start "bisecting" which build option makes it fail. Now if I only had more time today...
Anyway, thanks again Sauron for providing such a good basis for playing!
$aur0n said:
conntrack/nat brakes compatibility with tiwlan kernel driver - witch is not part of kernel (but can be recompiled).
Click to expand...
Click to collapse
After some compile / flash / test cycles I'm pretty convinced that anything which changes the layout / size of struct net_device or struct sk_buff, breaks that binary tiwlan_drv.ko thing - which is probably to be expected...
Some googling around, did not find me any source code to that tiwlan_drv.ko, only loads of people copying it around between various systems in binary form (argh...)
Do you have source for that module available, so I could try and recompile it when the struct layout changes?
Here's a list of config defines that should probably be left alone, gleaned from looking at the struct definitions:
Code:
options that change sk_buff:
CONFIG_XFRM=y
CONFIG_NF_CONNTRACK=n
CONFIG_BRIDGE_NETFILTER=n (switches on when enabling bridge driver,
but can be switched off separately - bridge
itself builds and module loads)
CONFIG_NET_SCHED=n (so no tc / traffic shaping / queueing)
CONFIG_NET_CLS_ACT=n
CONFIG_IPV6_NDISC_NODETYPE=n?
CONFIG_MAC80211=n
CONFIG_NET_DMA=n?
CONFIG_NETWORK_SECMARK=n
options that change net_device:
CONFIG_WIRELESS_EXT=y
CONFIG_NET_DSA=n
CONFIG_NETPOLL=n (switched on / needed by netconsole... sigh)
CONFIG_NET_NS=n (would love to have that, lxc could work well then...)
CONFIG_DCB=n
CONFIG_COMPAT_NET_DEV_OPS=y
You can try with this source
http://processors.wiki.ti.com/index.php/OMAP35x_Wireless_Connectivity_Release_Notes_beta_3_release
I haven't checked it - so I cant guarantee it will work. But If you could make it work - this would give us NAT on Uruk - so....
$aur0n said:
I haven't checked it - so I cant guarantee it will work. But If you could make it work - this would give us NAT on Uruk - so....
Click to expand...
Click to collapse
Thank you! I looked into the stuff a bit, it is certainly the right code set. It's a pretty huge pack overall, packing a kernel and userlevel stuff, even a copy of the iptables source , but I already located the driver itself...
I'll see that I extract the driver only parts into your kernel tree, somewhere under staging, and get it to build and maybe even work from there.
Will need some time to do that, and I'm rather busy with other work this week - next week maybe.
tiwlan_drv rebuild - no success so far
Hi $auron,
was able to take some time yesterday and today to work on the tiwlan_drv source code you pointed out. Unfortunately I did not get it to run.
I successfully built a module, inside your kernel tree, by incrementally dumping .c and .h files from the TI code drop into a subdir of drivers/staging/ and finding out which -DEFINES it needs to build, and some small code mangling was also neccessary.
However, the resulting module fails to properly load, first with some GPIO allocation message which I could get around (not present in the .ko file from Archos), and then in a request_irq call during initialization. Looking at that second failure point I notice that the more hardware / board oriented parts of the code look not at all like what objdump can tell me about the Archos binary...
Given my nonexistent ARM assembler skills, I cannot go forward at that point with ease, so I'm trying to chicken out by asking some Archos people for the source... No idea whether that will work...
UPDATE: no reply from Archos so far...
I try to sidestep the issue by moving the problematic elements of skbuff and net_device from the middle of the struct, to the end.
Hi!
I see that the topic is quite old - but anyway: are there any news? I am trying to build gen8 kernel with conntrack/nat support but with no luck - the kernel doesn't load, it reboots the device.
Did anybody find the way to compile with that options?
Golomidov said:
Hi!
I see that the topic is quite old - but anyway: are there any news? I am trying to build gen8 kernel with conntrack/nat support but with no luck - the kernel doesn't load, it reboots the device.
Did anybody find the way to compile with that options?
Click to expand...
Click to collapse
In Uruk 1.6 kernel has compiled in conntrack/nat.
$aur0n said:
In Uruk 1.6 kernel has compiled in conntrack/nat.
Click to expand...
Click to collapse
Yes, but there are other options that are missing in your kernel - targets owner and multiport - and because of that orbot transparent proxy doesn't work
Could you please tell how did you achieve that? I mean how did you compile UD kernel with conntrack/nat support?
(btw, I have changed init and installation scripts in UD for it to work with latest archos devices - a35dm for exmple)
EDIT: did you take/recompile tiwlan_drv.ko? would standard kernel work if I just copy tiwlan_drv.ko from UD?
---------- Post added at 03:06 PM ---------- Previous post was at 02:48 PM ----------
Golomidov said:
EDIT: did you take/recompile tiwlan_drv.ko? would standard kernel work if I just copy tiwlan_drv.ko from UD?
Click to expand...
Click to collapse
Nope, it didn't work
$aur0n said:
In Uruk 1.6 kernel has compiled in conntrack/nat.
Click to expand...
Click to collapse
$aur0n, could you please share the knowledge how did you manage to compile kernel with tiwlan driver and conntrack features?
Community will appreciate it! Thanks!
Golomidov said:
$aur0n, could you please share the knowledge how did you manage to compile kernel with tiwlan driver and conntrack features?
Community will appreciate it! Thanks!
Click to expand...
Click to collapse
It's all all written somewhere in developers thread of uruk droid.
$aur0n said:
It's all all written somewhere in developers thread of uruk droid.
Click to expand...
Click to collapse
Confirmed! tiwlan has been compiled and tested with nat/conntrack and targets owners and multiport.
Since openaos is down pasting here instruction:
Code:
How to build the WLAN source provided by archos
Kernel module released at http://gitorious.org/archos/archos-gpl-gen8/trees/master/hardware/ti/wlan/wl1271
Download the above mentioned sources.
cd .../hardware/ti/wlan/wl1271/platforms/os/linux
Now setup your environment by editing wl_env.bash or do it manually on the commandline in my case it was:
export CROSS_COMPILE=/usr/src/gen8/buildroot/build_arm/staging_dir/usr/bin/arm-linux-
export ARCH=arm
export HOST_PLATFORM=zoom2
export KERNEL_DIR=/usr/src/gen8/buildroot/linux/
Then type make and wait a few minutes and you are done. The tiwlan_drv.ko will appear in .../hardware/ti/wlan/wl1271/platforms/os/linux This gives you only the module. I am still looking at how the tiwlan_loader needs to be compiled.
More info can also be found http://omappedia.com/index.php?title=Wilink_Linux&redirect=no
If you use wl_env.bash then don't forget to
# source wl_env.bash
after editing and before make
thanks everybody!

[Q] Ubuntu on tf101 - wifi files location

Recently I've been attempting to install Ubuntu on my transformer, after a couple of mis-fires I've gotten to a state of having ubuntu 12 and the Jhinta kernel installed - and running the latest NVFLASHable asus stock android rom.
Unfortunately i'm having trouble setting up the wi-fi, it seemed to set itself up on the old kernel but with Jhinta I need to manually grab the files. /dev/mmc0p7/ as mentioned on the wiki doesn't exist, and doing a search on the four mounted filesystems only reveals some of the required files. Placing these in /lib/firmware isn't enough unfortunately.
Ideally I'd just like a download of the files, but if anyone can give me a few pointers or push me towards an android rom that has the wiki's layout it'd be greatly appreciated!
johnnoz said:
Recently I've been attempting to install Ubuntu on my transformer, after a couple of mis-fires I've gotten to a state of having ubuntu 12 and the Jhinta kernel installed - and running the latest NVFLASHable asus stock android rom.
Unfortunately i'm having trouble setting up the wi-fi, it seemed to set itself up on the old kernel but with Jhinta I need to manually grab the files. /dev/mmc0p7/ as mentioned on the wiki doesn't exist, and doing a search on the four mounted filesystems only reveals some of the required files. Placing these in /lib/firmware isn't enough unfortunately.
Ideally I'd just like a download of the files, but if anyone can give me a few pointers or push me towards an android rom that has the wiki's layout it'd be greatly appreciated!
Click to expand...
Click to collapse
Hey,
I had these problems to.
Uhm i some how magicly fixed it.
Lets see:
1. /data/misc/wifi/wpa_supplicant.conf -> /etc/wpa_supplicant.conf #optional
2. Download the default kernel files. Unpack 3.1 bla bla kernel in ubuntu at the location of lib/modules i think. ( Use sudo nautilus )
3. backup the kernel filesi n the modules and then remove them.
4. now search linux for tegra.
5. download the version 15 not 16. ( i took harmony because it works well..)
6. Now cd to the folder and use :sudo ./app*.sh -r /
If ./ doesnt work use bash.
7. reboot
8. go to X11 ( idk where i will post it.)
9. and enable GLX
10. Enjoy
Note: I haven't fix the trackpad yet.
So u need a mouse D:
Thanks for the reply! unfortunately I'm not really sure what you mean about unpacking the kernel files. I'd already placed the 3.1 modules in lib/modules prior to installing the kernel if that's what you were referring to.
johnnoz said:
Thanks for the reply! unfortunately I'm not really sure what you mean about unpacking the kernel files. I'd already placed the 3.1 modules in lib/modules prior to installing the kernel if that's what you were referring to.
Click to expand...
Click to collapse
3.1.10-g8c2655b-dirty.tar
Thats folder should be in lib/modules.
Delete the others. (BACKUP!!)
/data/misc/wifi/wpa_supplicant.conf form your android to : /etc/wpa_supplicant.conf and /etc/wpa_supplicant.conf/wpa_supplicant.conf
Enjoy.
Thays how i fixed mine :]
Aha, thanks for the clarification! Unfortunately doing this did nothing for my wi-fi, but it did fix needing usb devices to be plugged in on boot.
I have gotten the wifi working though! It's hard to say what steps were actuallly needed, but I searched for nvram.txt and fw_bcm4329.bin, placed them in both /lib/firmware and /lib/firmware/bcm4329, found the bcm4329.ko in /modules/2.{I forget the version number}/ and moved it to the empty 3.1.10-g8c2655b-dirty folder in modules (I strongly suspect this step was pointless). What finally got it working was running modprobe bcm4329 to load the wifi module.

[Q] Having a litte bash instead of a full Android setup?

Hi everyone! I'd like to experiment developing little apps and run them in ARM..
I have an old HTC Polaris to play with, which originally included WinMo and now has a wiped NAND with Android Kernel...
Is it possible to, instead of running Android, having a little bash running on the device to run little scripts and compiled binaries?
I was fooling around with a custom Android setup I had, named "Not So Super Froyo RLS18". I deleted android-related files (apks, frameworks and stuff) and just left binaries, config files, libraries and firmwares...
In the root filesystem there's a sysinit.rc file, which repairs permissions, initializes services and stuff.. once it's done, I'm not sure where the boot sequence goes!
I disabled a couple services (zygote, bootanimation, for instance) and now the boot hangs in a screen saying " A N D R O I D ". At this stage, the phone started configuring some stuff and the bootanimation showed up. Well, I got there and the phone seems to be halted, even though i created a little script on /etc/init.d that echoed a hello world and called bash, but still... nothing showed up..
Is this idea kinda crazy or am I just missing something?
Cheers!
Sorry for double-posting.
I've been able to get into a bash by creating the init file at the root of /system partition, but I wasn't able to manipulate it, since ADB wasn't running in background.. So I kept untouched the sysint.rc file, and triggered from there a little bash that called "busybox run-parts [...]" to run init.d scripts.
Everything going well so far, so I tried to push it a little bit further. Since I still cannot run compiled C binaries on there (linking problems), I tried to run a minimal debian install from that little bash.
Using debootstrap, I made a little rootfs which chrooted correctly. Now I'm trying to run Xorg.
Having a configured xorg.conf file, I get "invalid argument" initializing framebuffer...
Code:
(EE) FBDEV(0): FBIOPUT_VSCREENINFO: Invalid argument
(EE) FBDEV(0): mode initialization failed
But running Xorg in verbose mode, seems to get display properties right (screen resolution, depth, etc).
Now I'm thinking about two plausible problems: Is this a permissions issue (I haven't read too much about how android handles this) or a Kernel issue (In this case, I'll have to manage and find a way to edit the NBH file)?
Any help would be appreciated..
Cheers!
PS: Sorry for double-posting.

@all Kernel devs: Removing the knox leftovers on ramdisk

Hey guys I already posted this in a few kernel devs threads but I wanted to create this thread so I can share my info more easily with all the people out there.
What I found is some leftovers of knox on the ramdisk of nearly all the kernels out there - and possibilities to get rid of some more clutter.
There is this init.container.rc file which gets called from the init.rc who's job is to set up the mount points and some symlinks etc. for knox (just take a look at it). It also contains a service called "containersetup" and which's binary is located in /system/bin/containersetup.
I dont 100% know what this containersetup thingy does - but I just renamed the binary to stop it from running with no negative side-effects at all.
Disabling/removing the init.container.rc would also get rid of those reappearing data_1, data_2, data_3 etc. folders which get created by it.
---
This one is not particulary interesting for kernel devs I think, but I also found some other binaries that are or at least appear to be rather useless:
- there is "tima_dump_log" which creates some dumps related to tima on the data partition (possibly for the knox watchdog crap) - disabled that without side effects so far.
- there is "auditd" which is the audit daemon, which logs security related stuff (wether selinux allowed or disallowed stuff etc) - also disabled without side effects.
could possibly find some more.. (bootchecker, drsservice etc.. but not 100% sure on those)
P.S: Why don't you all include init.d support into the kernel? Just wondering, no attack (hard to tell in the internet hehe). Isn't that standard on linux kernel or is it a special feature which normally gets handled by the operating system / rom? (I know how to activate init.d support myself... well its not that hard.. but still wondering lol, because when switching kernels I always have to try and test if the kernel includes init.d support so scripts dont get run twice... some do some don't ...)
Just cooked my "own" custom version of faux123 v004 with the android image kitchen. (http://forum.xda-developers.com/showthread.php?t=2073775)
Removed the init.container.rc
Removed the call to init.container.rc inside init.rc
Edited the fstab.qcom to change system partitions mount flags to "ro,noatime,noauto_da_alloc,discard,journal_async_commit,errors=panic"
(you could also add init.d support to init.rc, but I already got that in my install-recovery.sh..)
--
Repacked everything together and flashed it onto my phone. This got rid of the container folders and data_1,data_2,data_3,mnt_1, etc. plus the mount "tweaks".
Unfortunately I cannot redistribute the kernel image with the modified ramdisk (its not my work, i just edited it a tiny bit...), but with the android image kitchen you can just do it yourself - until the kernel devs include this into their kernels as well. (might not be important to you guys, but I like my phone clutter free hehe)
---
ADD: By the way - this android image kitchen is awesome! I was trying to do this stuff with other versions of kernel repack tools - which are mostly made for linux. But the resulting kernels were not working. (the addresses used are not standard, and one would have had to edit the mkbootimg.c and recompile it himself to do it... but with this thing its just idiot-safe drag n drop. Just make sure you dont do any bullcrap on the ramdisk partition..
ADD2: Does anyone know how I could completely disable selinux (not just permissive, but completely turning it off)? I know it might missbehave, but I want to give it a try. The mount script already has the option to mount the firmware partition context free for the case that se-linux is disabled - so it must be possible somehow right? (what benefit does selinux give you anyway in permissive mode other than a possible nsa backdoor or smth?)
Awesome
Enviado do meu SM-N9005 através de Tapatalk
with selinux=permissive you can also deactivate the samsung drs service (this thing handles context labeling as it appears).
It consists of an app called "drsservice" and the binary /system/bin/drs. Can/could been disabled on selinux=enforcing too, but then you needed to do restorecon yourself on some occurences.
--
so on my device I disabled the following services/binaries (please lets try to find more together ...):
/system/bin/containersetup
/system/bin/auditd
/system/bin/tima_dump_log
/system/bin/kiesexe
/system/bin/drs
---
What I would like to manage (if possible) to disable the watchdog daemon and all that bullcrap that checks if the device was tempered (the watchdog daemon is related to knox right?)
zroice said:
Just cooked my "own" custom version of faux123 v004 with the android image kitchen. (http://forum.xda-developers.com/showthread.php?t=2073775)
Removed the init.container.rc
Removed the call to init.container.rc inside init.rc
Edited the fstab.qcom to change system partitions mount flags to "ro,noatime,noauto_da_alloc,discard,journal_async_commit,errors=panic"
(you could also add init.d support to init.rc, but I already got that in my install-recovery.sh..)
--
Repacked everything together and flashed it onto my phone. This got rid of the container folders and data_1,data_2,data_3,mnt_1, etc. plus the mount "tweaks".
Unfortunately I cannot redistribute the kernel image with the modified ramdisk (its not my work, i just edited it a tiny bit...), but with the android image kitchen you can just do it yourself - until the kernel devs include this into their kernels as well. (might not be important to you guys, but I like my phone clutter free hehe)
---
ADD: By the way - this android image kitchen is awesome! I was trying to do this stuff with other versions of kernel repack tools - which are mostly made for linux. But the resulting kernels were not working. (the addresses used are not standard, and one would have had to edit the mkbootimg.c and recompile it himself to do it... but with this thing its just idiot-safe drag n drop. Just make sure you dont do any bullcrap on the ramdisk partition..
ADD2: Does anyone know how I could completely disable selinux (not just permissive, but completely turning it off)? I know it might missbehave, but I want to give it a try. The mount script already has the option to mount the firmware partition context free for the case that se-linux is disabled - so it must be possible somehow right? (what benefit does selinux give you anyway in permissive mode other than a possible nsa backdoor or smth?)
Click to expand...
Click to collapse
I followed the link to the Android Image Kitchen and successfully followed your instructions from post #2 but I was wondering if you could please let me know of a good place to find some kernel tutorials for absolute beginners? Thank you for your information as well.
@zroice: Maybe you're already thinking about doing a free rom of Knox
Silverbolt said:
I followed the link to the Android Image Kitchen and successfully followed your instructions from post #2 but I was wondering if you could please let me know of a good place to find some kernel tutorials for absolute beginners? Thank you for your information as well.
Click to expand...
Click to collapse
not sure really, this was just basic scripting and editing the boot scripts, and I just found this out by playing around with the things.
I'm sure you will find a tutorial or smth on xda or google. I have yet to compile anything for android.. so I dont have a clue.
Just sharing my findings and hoping for some interesting replies what other people find out.
what about those data_x folders in a stock image?
Hi!
I've encountered these data_1 data_2 & data_3 on my stock note 3. Is there a way to remove them?
Ibe been looking for a way to remove these processes. I dont have any knox or container agents on my phone nor doea the kt747 kernel have selinux enforcing but I do see these leftovers running around. I found this thread by searching how to disable the tima log. There doeant seem to be much info about this available anywhere. I do se something else running that I suspect is a waste is called edmaudit. I suspect is enterprise device management. Not sure tho. I changed the permissions on the files you mentioned. I know its been a year but if you happen to have any new insight on thos I'd appreciate it.

Categories

Resources