[MOD]user configurable userinit.sh V0.1.5.3 for CM. [UPDATED 9/05]

Search This thread

tutech

Senior Member
Mar 1, 2009
101
11
Boca Raton, FL
CM 4.2.14.1 incompatibility

I noticed after updating to CM 4.2.14.1 that the userinit.sh v0.1.5.3 in the OP of this thread no longer works nicely.

Here's some output:

adb shell sh /system/sd/userinit.sh -s
unknown option -- 1BusyBox v1.15.3android (2010-01-29 01:54:08 EST) multi-call b
inary

Usage: tail [OPTIONS] [FILE]...

Print last 10 lines of each FILE to standard output.
With more than one FILE, precede each with a header giving the
file name. With no FILE, or when FILE is -, read standard input.

Options:
-n N[kbm] Print last N lines instead of last 10
-f Output data as the file grows

=== user.conf ===
*** general ***
apps2sd=1
media2sd=0

*** CompCache ***
compcache_en=1
cc_memlimit=24
cc_disksize=32
cc_backingswap_en=0
cc_backingswap=/dev/block/mmcblk0p3
swappiness=30

*** Swap File ***
swap_file_en=0
linux_swap_file_size=32
linux_swap_file=/system/sd/swap.file

*** Linux Swap ***
linux_swap_en=0
linux_swap_partition=/dev/block/mmcblk0p3

*** VM ***
sys_vm_en=0
page_cluster=0
laptop_mode=0
dirty_expire_centisecs=3000
dirty_writeback_centisecs=500
dirty_background_ratio=5
dirty_ratio=10

*** CPU ***
proc_cpu_en=0
scaling_min_freq=128000
scaling_max_freq=528000
sampling_rate=2000000
powersave_bias=200
up_threshold=40

=== CompCache status ===
CompCache version 0.6+
!!!ERROR Compcache disabled
unknown option -- 1BusyBox v1.15.3android (2010-01-29 01:54:08 EST) multi-call b
inary

Usage: tail [OPTIONS] [FILE]...

Print last 10 lines of each FILE to standard output.
With more than one FILE, precede each with a header giving the
file name. With no FILE, or when FILE is -, read standard input.

Options:
-n N[kbm] Print last N lines instead of last 10
-f Output data as the file grows

CompCache: DiskSize (system) 32768(user)
CompCache: cc_swappiness - 30(system) 30(user)

=== CompCache status output ===
stats: Not a typewriter
[: 20100201192453: out of range
[: 20100201192454: out of range
[: 20100201192455: out of range
[: 20100201192457: out of range
[: 20100201192458: out of range
[: 20100201192459: out of range
[: 20100201192500: out of range
[: 20100201192500: out of range
[: 20100201192501: out of range
[: 20100201192502: out of range
[: 20100201192502: out of range
[: 20100201192508: out of range
[: 20100201192509: out of range
[: 20100201192511: out of range
[: 20100201192512: out of range
[: 20100201192514: out of range
[: 20100201192515: out of range
[: 20100201192517: out of range
[: 20100201192523: out of range
[: 20100201192526: out of range
[: 20100201192529: out of range
--- dexopt-wrapper /data/app/com.shazam.android.odex
--- BEGIN '/data/app/com.shazam.android.apk' (bootstrap=0) ---
--- waiting for verify+opt, pid=5862
--- would reduce privs here
--- END '/data/app/com.shazam.android.apk' (success) ---




I realize that the busybox binary included in this CM build is most likely the only culprit causing this but I have not had an opportunity to delve into this fairly complex shell script to debug/fix.

Has anyone else worked on getting this to work as well as it always has in prior CM builds?
 

overpower

Senior Member
Sep 15, 2008
60
0
it looks like the only incompatibility was with the compcache section...i dont use compcache, so i should probably be ok, right?

Yah, I think you'll be fine even if you did use compcache.

As for what happened, in this version of CM there are two issues.

  1. tail has a more stringent syntax. The script uses "tail -1" which is invalid. The correct syntax is "tail -n1". This can be fixed easily.
  2. "rzscontrol /dev/block/ramzswap0 -s" no longer works. Instead it throws the "stats: Not a typewriter" error. A quick google search shows that's a hard to track down error and I suspect it has to do with the compile environment.
CompCache should continue to function, you just can't pull stats out of it which throws a bunch of stuff off in the script.

As for
Code:
[: 20100201192453: out of range
[: 20100201192454: out of range
[: 20100201192455: out of range
[: 20100201192457: out of range
[: 20100201192458: out of range
errors. I haven't tracked it down myself so maybe someone else can figure out why.
 

BoomBoomPOW

Senior Member
Dec 16, 2009
576
27
Uranus
Hope someone updates the script to be compatible with CM's latest. I, for one prefer a cc/backing swap setup. But if you state that cc will still be able to function correctly, then it's good.
 

stellarman

Senior Member
Feb 9, 2009
284
1
Clearwater, FL
Updates for CM5?

What changes are needed to keep this compatible with the new CM5. I hope someone can make the changes and verify the new locations in which these files need to be placed.
 

sup3rst4r

New member
Oct 6, 2010
4
0
i can push the files using adb, but when i try and chmod i get:

"chmod: /system/sd/userinit.sh: Not a directory"

and when testing i get:

"sh: can't open '/system/sd/userinit.sh'"

Any ideas guys? I'm running CM6 on a GSM Desire with appstosd and i'm trying to get media2sd working...
 
Last edited: