[Q] how init.d support is implemented in cyanogenmod? - Android Q&A, Help & Troubleshooting

Can someone explain how init.d support is implemented in CyanogenMod? Link to the relevant github source file/files would be the best.
Is is supported for all devices automatically or a special section (something like busybox run-parts) needs to be added to init.rc file in android_device_<VENDOR>_<NAME> repository?

If anyone interested I think I found the answer to my question:
In a device specific init.rc (e.g. https://github.com/CyanogenMod/android_device_sony_montblanc-common/blob/ics/config/init.rc) there is usually a call to sysinit:
Code:
exec /system/bin/sysinit
and sysinit is a script that runs run-parts: https://github.com/CyanogenMod/android_vendor_cm/blob/ics/prebuilt/common/bin/sysinit

Related

[Q] [WEBTOP] Can't start WiMAX usb device

Hi!
ROM - NottachTrix1.3.1
Kernel - 2.6.32.56-MB860-faux123-GB-024 1.30GHz
WebTop - GenTop2-20120509
I've tried to work with SWC-U200 - install madwimax, it can find device, but can't work with (see screenshot).
What should I do?
you need to git pull faux's kernel than enable tun tap in the menuconfig as modules and compile the modules, than copy them and the other files to the nonexistant dir that the system complains about.
crnkoj said:
you need to git pull faux's kernel than enable tun tap in the menuconfig as modules and compile the modules, than copy them and the other files to the nonexistant dir that the system complains about.
Click to expand...
Click to collapse
Nice idea, but why faux123 wrote:
faux123 said:
Version 0.0.1 (deprecated)
Added FakeShmoo OC/UV
Compiled with Tegra2 specific VFP optimizations, Tegra2 specific optimizations
Added BFQ I/O Scheduler
Added SLQB memory allocator
Added EXT4 support (NOT ENABLED YET)
Added CIFS + UTF-8 support (for windows shares)
Added TUN/TAP support directly
Added FUSE (file system in user space)
Added AVP overclock (system bus)
Merged WiFi Module into kernel source tree
Click to expand...
Click to collapse
I don't know that, maybe ask him ) anyhow that file is missing, and so you need to procure it. Probably the best way to do that, is to either crosscompile it or do just the modules on the atrix itself. Depending on your knowledge and a Linux pc with a cross toolchain either is the better idea
Resolved:
# mkdir /dev/net
# mknod /dev/net/tun c 10 200
# /usr/sbin/madwimax -qdo

[Q] Enabling bootanimation from kernel source (P6810 7.7 samsung gtab)

Hi all !
I'm trying to release a custom kernel for the P6810 7.7 samsung tab with bootanimation support. I managed so far to enable init.d scripts support, undervolting and governor's stuff which is a good start.
However, I don't get why the bootanimation method is not working. I tried to take bootanimation.zip from cm9, cm10 (from Locerra which work with his kernel) and others. All I have is a black screen.
This is what I did (I took this from the eZnow) :
I copied bootanimation and samsungani from the cm10 bin folder to mine : I tried with stock files and theses one but none of them worked.
I added this to the init.rc :
Code:
service samsungani /vendor/scripts/bootanimation.sh
class main
user graphics
group graphics
disabled
oneshot
and this is the bootanimation.sh :
Code:
#!/sbin/sh
if [ -f /system/media/bootanimation.zip ]; then
/system/bin/bootanimation
else
/system/bin/samsungani
fi;
Permissions' files have been checked and are 755 for all of them.
What am i missing ? Should I enable some option(s) in the kernel's configuration ?
Thanks for your answers !

Help adding CIFS support to kernels?

Often I find myself really liking a particular kernel for a particular device. The common problem I have found is that no CIFS support is added to the kernel.
I have donated to several kernel devs. I don't expect anything from them, I just wanted to show my appreciation.
However, usually my CIFS inquiries go unnoticed.
I would like to add CIFS support to other people's kernels for my personal use on my device.
I presume I will have to decompile and recompile kernels in the process?
Here is the specific case that I have :
Current setup:
Phone - Verizon Galaxy Note 2
ROM - Beans build 22 (Touchwiz)
Kernel - Perseus 36
I would like to use Imnuts' PBJ kernel. It doesn't support CIFS, whereas Perseus does.
So in theory I could extract the CIFS modules and inject them into PBJ? Any ideas? Any help would be appreciated. I would also be willing to donate to someone willing to build one for me (mods, let me know if that isn't cool to mention. ) I don't have a Linux box or the current means of acquiring a Linux box until early next year. I am curious if this can be done on Windows 7?
xdadevnube said:
Often I find myself really liking a particular kernel for a particular device. The common problem I have found is that no CIFS support is added to the kernel.
I have donated to several kernel devs. I don't expect anything from them, I just wanted to show my appreciation.
However, usually my CIFS inquiries go unnoticed.
I would like to add CIFS support to other people's kernels for my personal use on my device.
I presume I will have to decompile and recompile kernels in the process?
Here is the specific case that I have :
Current setup:
Phone - Verizon Galaxy Note 2
ROM - Beans build 22 (Touchwiz)
Kernel - Perseus 36
I would like to use Imnuts' PBJ kernel. It doesn't support CIFS, whereas Perseus does.
So in theory I could extract the CIFS modules and inject them into PBJ? Any ideas? Any help would be appreciated. I would also be willing to donate to someone willing to build one for me (mods, let me know if that isn't cool to mention. ) I don't have a Linux box or the current means of acquiring a Linux box until early next year. I am curious if this can be done on Windows 7?
Click to expand...
Click to collapse
There may be a simpler method of doing this using insmod and downloadable cifs.ko module rather then taking the developers kernel source and then compiling it to include the cifs.ko module, using the following steps:
1. Make sure you have the latest version of Busybox installed
2. Download this .7z file and extract it's contents the modules you want are md4.ko and cifs.ko (Even though the .zip says Nexus 10 it should still work on your device).
3. Take the md4.ko module and cifs.ko module and place them in your /system/lib/modules folder (Make sure to mount the /system folder as read/write first and if the /system/lib/modules folder doesn't exist make sure to create it and set the proper permissions which should be the same as the /system/lib folder).
4. Now that you have placed the md4.ko and cifs.ko module in the /system/lib/modules folder run the following command:
Code:
insmod /system/lib/modules/md4.ko
insmod /system/lib/modules/cifs.ko
5. After that completes you should now be able to use the cifs.ko module to perform your desired task.
Let me know if you still have questions I'll be happy to help you out.
shimp208 said:
There may be a simpler method of doing this using insmod and downloadable cifs.ko module rather then taking the developers kernel source and then compiling it to include the cifs.ko module, using the following steps:
1. Make sure you have the latest version of Busybox installed
2. Download this .7z file and extract it's contents the modules you want are md4.ko and cifs.ko (Even though the .zip says Nexus 10 it should still work on your device).
3. Take the md4.ko module and cifs.ko module and place them in your /system/lib/modules folder (Make sure to mount the /system folder as read/write first and if the /system/lib/modules folder doesn't exist make sure to create it and set the proper permissions which should be the same as the /system/lib folder).
4. Now that you have placed the md4.ko and cifs.ko module in the /system/lib/modules folder run the following command:
Code:
insmod /system/lib/modules/md4.ko
insmod /system/lib/modules/cifs.ko
5. After that completes you should now be able to use the cifs.ko module to perform your desired task.
Let me know if you still have questions I'll be happy to help you out.
Click to expand...
Click to collapse
I'm trying to do this on my Nexus 10 with stock 5.1.1 rooted and busyboxed but i get the following error when attempting to insmount the modules:
255|[email protected]:/ # insmod /system/lib/modules/md4.ko
insmod: init_module '/system/lib/modules/md4.ko' failed (function not implemented)
Click to expand...
Click to collapse
modules folder and files are chmod 777, btw.
Did you ever find a solution to this? I'm stuck at the same error message.

Building Alcatel ROM from Source!

Hello guys,
Since i couldn't find any Custom or Stock rom for OT-993 (not 993D), I'm trying to compile it form the source code,
Only found an open source firmware, Which need to be compiled first in order to be flashed via custom recovery,
Here is the file info,
File name: OT_993_ICS_20130130.tar.xz
Link: HERE
Content:
-Folders:
Code:
external kernel system
--External:
Code:
bison dbus genext2fs jpeg qemu
blktrace dnsmasq grub libffi quake
bluetooth e2fsprogs hostap libpcap webkit
bluez elfutils iproute2 libpng wpa_supplicant
chromium esd iptables ppp wpa_supplicant_6
--Kernel:
Code:
AndroidKernel.mk crypto init MAINTAINERS samples virt
arch Documentation ipc Makefile scripts
block drivers Kbuild mm security
chromeos firmware Kconfig net sound
COPYING fs kernel README tools
CREDITS include lib REPORTING-BUGS usr
--System:
Code:
arith.c
I just need to know how to compile it so i can flash it via recovery and get the phone working again,
So, if someone knows about this, Please consider helping me in this,
Thanks in advance.
No one care enough to help in this ?? or no one knows what i'm talking about ??
k.japko.eu/alcatel-otf-hackers-guide-1.html - I think this guide may be helpfull

Dev Tools AARCH64 - bash, busybox, ssh srv/client, rsync, nano, live ramdisk patcher

Here we have a collection of development tools I've either created/painstakingly compiled or scavenged from other developers that I've found useful for this device. All of these files can be run directly from the device (via adb) without the need for external tools. Obviously this goes without saying, but you need to run a lot of this stuff as root for it to be useful. Theoretically they should work on any device with the aarch64 architecture.
bash
Good old BASH interpreter. Pretty sure I compiled this one myself. I think I statically linked it too so it should work in TWRP.
busybox
Self explanatory. Scavenged from elsewhere (probably cyanogenmod).
patchboot script
Made this myself; you have to edit the script to your own purposes prior to using it. Place the script in its own directory with the busybox and bash binaries. Basically what this does is take a boot.img file in the same directory as the script, splits it up into its components, decompresses the ramdisk, recompresses the ramdisk, and reconstitutes it into newboot.img. The whole purpose of this is to allow you to modify the ramdisk contents live on the device. Needs to be run with bash interpreter (./bash patchboot), and depends on busybox binary in the same directory. I've added some useful ### comments with an example of how to pull the current boot.img, how to add binary services to the boot image to run as as root at startup, and how to flash the new boot image back to the device.
dbserver script
Script to start an SSH server via the dropbear binary (pulled from SSHDroid app) in public key authentication mode. I have this start up automatically on my device via patchboot script above. 4 things to be aware of:
You need a dropbear_rsa_host_key file including a pub/priv key for SSH.
You allow clients in via the .ssh/authorized_keys file
Use the 'root' user to login.
This will create a /data/data/berserker.android.apps.sshdroid/home/ directory - so you probably shouldn't use this AND have SSHDroid installed at the same time.
ssh
dropbear SSH client. Scavenged it from an unknown source on XDA. dropbear is an enormous pain in the ass to compile for aarch64 - credit to whoever made this.
nano - Compiled this one myself.
Holy crap! nano text editor! No more annoying adb push/pull for on-device script editing Only works if you're ssh'ed into the device (I couldn't get it to work via ADB). Depends on the nano_bin file and terminfo directory (should be placed in the same directory as the nano script).
rsync
Compiled this myself. I set this up using the patchboot script above to backup my device to an rsync server daily (using the ssh client above).
dropbear multibinary added in a separate zip to the first post (recompiled it myself). Tested and operational for ssh client/server purposes (so you no longer need two separate binaries). It looks for the .ssh directory (containing known_hosts and authorized_keys files) in the current working directory at the time of binary execution.

Categories

Resources