Related
im trying to set up a linux_swap partition, but i dont want to use apps2sd, nor do i want to use cache2sd.
can someone point me in the right direction?
kchau said:
im trying to set up a linux_swap partition, but i dont want to use apps2sd, nor do i want to use cache2sd.
can someone point me in the right direction?
Click to expand...
Click to collapse
Just create the linux-swap partition and not the ext partition.
will i have to wipe?
and what is the recommended size?
supremeteam256 said:
Just create the linux-swap partition and not the ext partition.
Click to expand...
Click to collapse
Does that work now? I know it depends on how you are doing it, but assuming a build with auto apps2sd, the script just looks at partition number and will screw up if you do that. I think cyanogen has made adjustments in his experimental line.
im running cyanogen 4.0.4. will it work?
kchau said:
im running cyanogen 4.0.4. will it work?
Click to expand...
Click to collapse
if the script does that couldnt you create a 1mb ext2/3/4?
You also need to edit the user.conf file.
linux_swap_en=1 # enable(1) or disable(0) linux swap
linux_swap_partition=/dev/block/mmcblk0p2 # swap partition device
The usual setting is mmcblk0p3 but you need to set it to mmcblk0p2 because your linus swap part is going to be 2 instead of 3
This is for swap only with no compcache
#compcache related parameters
compcache{
compcache_en=0 # enable(1) or disable(0) compcache
cc_disksize=32 # Ram swap disksize - any number between 1 to 95 should work
cc_memlimit=18 # Limite the memory usage when backing swap is used
cc_backingswap_en=0 # enable or disable backing swap
cc_backingswap=/dev/block/mmcblk0p2 # pointing to the backingswap partition device
cc_swappiness=60 # default 60
}
#Linux swap parameters
#
# linux swap can only be enabled if cc_backingswap_en is set to "0"
#
linux_swap{
linux_swap_en=1 # enable(1) or disable(0) linux swap
linux_swap_partition=/dev/block/mmcblk0p2 # swap partition device
swappiness=60 # default 60
}
will compcache improve speed while running background applications?
so do i have to create an ext3 partition to put the userconf in there?
wait, where do i put the user.conf file then?
i read around and i think im supposed to put the user.conf file into /system/sd
i also enabled compcache. let me know if that is not advised.
with a 64mb swap
#compcache related parameters
compcache{
compcache_en=1 # enable(1) or disable(0) compcache
cc_disksize=70 # Ram swap disksize - any number between 1 to 95 should work
cc_memlimit=18 # Limite the memory usage when backing swap is used
cc_backingswap_en=0 # enable or disable backing swap
cc_backingswap=/dev/block/mmcblk0p2 # pointing to the backingswap partition device
cc_swappiness=60 # default 60
}
#Linux swap parameters
#
# linux swap can only be enabled if cc_backingswap_en is set to "0"
#
linux_swap{
linux_swap_en=1 # enable(1) or disable(0) linux swap
linux_swap_partition=/dev/block/mmcblk0p2 # swap partition device
swappiness=60 # default 60
}
i have an issue with a boot loop at th eandroid screen now
ok, so, if i dont boot with the sd card inserted, it boots, but then i get to the home screen and it says none of my apps are installed.
so i go to recovery, remove the user.conf file. and same thing
so i restore, and boot with the sd card in. same thing, bootloop.
and now im restoring, but not booting with sd card.
what happened? was i not supposed to enable compcache? or keep the cc_disksize at 32?
so, ive been following this thread
http://forum.xda-developers.com/showthread.php?p=4379172
with this a2sd, it doesnt boot:
Code:
#!/system/bin/sh
#
# Apps2SD using symlinks and bind mounts
# [email protected] (cyanogen)
#
echo "--- Welcome to Android/CyanogenMod!";
sysctl -p
# execute any postinstall script then kill it
if [ -e /data/firstboot.sh ];
then
echo "--- Executing firstboot.sh";
/system/bin/sh /data/firstboot.sh;
rm -f /data/firstboot.sh;
fi;
if [ -e /dev/block/mmcblk0p2 ];
then
echo "--- Checking ext filesystems";
# fsck the sdcard filesystem first
e2fsck -y /dev/block/mmcblk0p4;
# set property with exit code in case an error occurs
setprop cm.e2fsck.errors $?;
# mount and set perms
busybox mount -o noatime,nodiratime -t auto /dev/block/mmcblk0p4 /system/sd;
busybox chown 1000:1000 /system/sd;
busybox chmod 771 /system/sd;
# clean up any old symlinks, create data directories
for i in dalvik-cache data;
do
if [ -h /data/$i ];
then
rm /data/$i;
fi;
if [ ! -d /data/$i ];
then
mkdir /data/$i;
busybox chown 1000:1000 /data/$i;
busybox chmod 771 /data/$i;
fi;
done;
# don't allow /data/data on sd because of upgrade issues - move it if possible
if [ -d /system/sd/data ];
then
busybox cp -a /system/sd/data/* /data/data/;
busybox rm -rf /system/sd/data;
fi;
# move apps and dalvik cache from internal memory to sdcard
for i in app app-private dalvik-cache;
do
if [ ! -d /system/sd/$i ];
then
mkdir /system/sd/$i;
fi
busybox chown 1000:1000 /system/sd/$i;
busybox chmod 771 /system/sd/$i
if [ -d /data/$i ] && [ ! -h /data/$i ];
then
busybox cp -a /data/$i/* /system/sd/$i/;
busybox rm -f /data/$i/*;
fi;
done;
# symlink app dirs - they must be on the same filesystem
for i in app app-private;
do
if [ -d /data/$i ] && [ ! -h /data/$i ];
then
busybox rm -rf /data/$i;
busybox ln -s /system/sd/$i /data/$i;
fi;
done;
# bind mount dalvik-cache so we can still boot without the sdcard
busybox mount -o bind /system/sd/dalvik-cache /data/dalvik-cache;
busybox chown 1000:1000 /data/dalvik-cache;
busybox chmod 771 /data/dalvik-cache;
# clean up old whiteouts
for i in local misc property system tombstones data;
do
if [ -h /system/sd/$i ]; then rm -f /system/sd/$i; fi
done;
# please don't put odex files in the app directory people!
# it causes dexopt to crash when switching builds!
busybox rm -f /system/sd/app/*.odex
# call a userinit.sh script if it's present on the sdcard
# otherwise just enable compcache with no backing swap
if [ -e /system/sd/userinit.sh ];
then
echo "--- Executing userinit.sh"
busybox chmod +x /system/sd/userinit.sh
/system/bin/sh /system/sd/userinit.sh;
else
modprobe ramzswap;
/system/bin/rzscontrol /dev/block/ramzswap0 --init
swapon /dev/block/ramzswap0
fi
setprop cm.a2sd.active 1;
echo "+++ Apps-to-SD successfully enabled";
else
# replace symlinks with directories so we can boot without sd
for i in app app-private;
do
if [ -h /data/$i ];
then
rm -f /data/$i;
mkdir /data/$i;
busybox chown 1000:1000 /data/$i;
busybox chmod 771 /data/$i;
fi;
done;
modprobe ramzswap;
/system/bin/rzscontrol /dev/block/ramzswap0 --init
swapon /dev/block/ramzswap0
setprop cm.a2sd.active 0;
fi;
sync;
setprop cm.filesystem.ready 1;
with this a2sd, no swap shows up when i go adb shell free:
Code:
#!/system/bin/sh
#
# Apps2SD using symlinks and bind mounts
# [email protected] (cyanogen)
#
echo "--- Welcome to Android/CyanogenMod!";
sysctl -p
# execute any postinstall script then kill it
if [ -e /data/firstboot.sh ];
then
echo "--- Executing firstboot.sh";
/system/bin/sh /data/firstboot.sh;
rm -f /data/firstboot.sh;
fi;
if [ -e /dev/block/mmcblk0p2 ];
then
echo "--- Checking ext filesystems";
# fsck the sdcard filesystem first
e2fsck -y /dev/block/mmcblk0p2;
# set property with exit code in case an error occurs
setprop cm.e2fsck.errors $?;
# mount and set perms
busybox mount -o noatime,nodiratime -t auto /dev/block/mmcblk0p2 /system/sd;
busybox chown 1000:1000 /system/sd;
busybox chmod 771 /system/sd;
fi;
sync;
setprop cm.filesystem.ready 1;
and with the default a2sd, no boot.
and this is my user.conf
Code:
# General parameters
general{
apps2sd=0 # this is useless here, require a modified a2sd script
media2sd=0 # moves the medias to sd if /system/sd/media exists
}
#compcache related parameters
compcache{
compcache_en=1 # enable(1) or disable(0) compcache
cc_disksize=70 # Ram swap disksize - any number between 1 to 95 should work
cc_memlimit=18 # Limit the memory usage for backing swap (cc .5x known issue-defaults to 15% of total RAM)
cc_backingswap_en=0 # enable(1) or disable(0) backing swap
cc_backingswap=/dev/block/mmcblk0p2 # pointing to the backingswap partition device
cc_swappiness=60 # default 60
}
#Linux swap parameters
#
# linux swap can only be enabled if cc_backingswap_en is set to "0"
#
linux_swap{
linux_swap_en=1 # enable(1) or disable(0) linux swap
linux_swap_partition=/dev/block/mmcblk0p2 # swap partition device
swappiness=60 # default 60
}
partition 1 is my fat32 which is whatever 8 gigs minus 64
partition 2 is 64 megs of linux_swap
WOW,
You have completely over complicated this. remove the user.conf file from every location you put it in, remove all partitions and leave it with none, boot in recovery and wipe, then reflash cyan 4.0.4. reboot. everything should be normal with no swap and it should ask you if you want to format the sd card. when you get it working normal post back here.
my whole point is not to wipe, and i dont want a2sd.
wiping and doing what you said above will enable a2sd.
what part of my previous post would enable apps2sd?
if you don't want to wipe, then at least do everything else i posted
ok, i removed all the user.conf and repartitioned my sdcard
now what?
reflash cyan 4.0.4 and boot so it will format the card
what is the make, size, and class of your sdcard?
why no apps2sd?
Per the Nookie Froyo thread they have a suggestion to increase the refresh rate to 68000 to stop/reduce flicker.
I noticed a similar flicker on "stock" 2.1 and checked /sys/devices/omapdss/display0/timings only to find out it is also set at 48000. I increased it to 68000, but it is reset after each reboot.
What is the proper refresh rate? Anyone else notice a flicker on the stock ROM?
jleecong said:
Per the Nookie Froyo thread they have a suggestion to increase the refresh rate to 68000 to stop/reduce flicker.
I noticed a similar flicker on "stock" 2.1 and checked /sys/devices/omapdss/display0/timings only to find out it is also set at 48000. I increased it to 68000, but it is reset after each reboot.
What is the proper refresh rate? Anyone else notice a flicker on the stock ROM?
Click to expand...
Click to collapse
what process did you use to modify the file?
paleh0rse said:
what process did you use to modify the file?
Click to expand...
Click to collapse
I used the following from the thread I linked.
Code:
adb shell echo 68000,1024/70/200/40,600/10/11/10 > /sys/devices/omapdss/display0/timings
jleecong said:
I used the following from the thread I linked.
Code:
adb shell echo 68000,1024/70/200/40,600/10/11/10 > /sys/devices/omapdss/display0/timings
Click to expand...
Click to collapse
Did you su and mount as r/w first?
paleh0rse said:
Did you su and mount as r/w first?
Click to expand...
Click to collapse
You don't remount /sys
so does anyone know how to make this stick after boot?
dennisi01 said:
so does anyone know how to make this stick after boot?
Click to expand...
Click to collapse
See the thread I just made: http://forum.xda-developers.com/showthread.php?t=901791
jleecong said:
I used the following from the thread I linked.
Code:
adb shell echo 68000,1024/70/200/40,600/10/11/10 > /sys/devices/omapdss/display0/timings
Click to expand...
Click to collapse
Originally Posted by dennisi01
so does anyone know how to make this stick after boot?
See the thread I just made: http://forum.xda-developers.com/showthread.php?t=901791
Click to expand...
Click to collapse
Thank you both. Seems to work. Now I know how to run my own scripts afterboot.
Does that mean we add the
adb shell echo 68000,1024/70/200/40,600/10/11/10 > /sys/devices/omapdss/display0/timings
Click to expand...
Click to collapse
at the end of the clrbootcount.sh text to have it run that command to fix the refresh and make it stick?
I did this (as I posted in the nook flicker thread):
I did a CAT on immediately after, and it had defaulted instead to 66461 instead of 68000 (maximum rate for the chip?)
Of course it also cleared upon reboot. Should I have seen a flicker improvement right away?
After clearing up all the posted suggestions listed here is what worked for me
greenmky said:
I did this (as I posted in the nook flicker thread):
I did a CAT on immediately after, and it had defaulted instead to 66461 instead of 68000 (maximum rate for the chip?)
Of course it also cleared upon reboot. Should I have seen a flicker improvement right away?
Click to expand...
Click to collapse
I also get 66461
------------------------
increase the refresh rate to 68000/66461 to stop/reduce flicker.
---------------------------------------------------------------------------
adb pull /system/bin/clrbootcount.sh
gedit clrbootcount.sh (assume you stay in specific dir)
add this to end of file and save
---------------------------------------------------
#run other commands
setprop persist.service.mount.umsauto 0
---------------------------------------------------
NEXT
adb shell mount -o rw,remount -t ext2 /dev/block/mmcblk0p5 /system
adb push clrbootcount.sh /system/bin/clrbootcount.sh
adb shell chmod 755 /system/bin/clrbootcount.sh
adb shell mount -o ro,remount -t ext2 /dev/block/mmcblk0p5 /system
adb shell reboot
--------------
NEXT
adb shell - NOW AT THE su # PROMPT (HAD NO LUCK WITH THE ADB SHELL and then commands all in one line)
cat /sys/devices/omapdss/display0/timings
mount -o remount,rw /dev/block/mmcblk0p5 /system
chmod 0755 /sys/devices/omapdss/display0/timings
echo 68000,1024/70/200/40,600/10/11/10 > /sys/devices/omapdss/display0/timings
mount -o ro,remount -t ext2 /dev/block/mmcblk0p5 /system
reboot
-----------------------------------------------
NEXT
cat /sys/devices/omapdss/display0/timings
66461,1024/70/200/40,600/10/11/10
----------------------------------------------
Three reboots and I still have the changes...
Read all the posting listed if you want/need more details....
here.david said:
adb shell - NOW AT THE su # PROMPT (HAD NO LUCK WITH THE ADB SHELL and then commands all in one line)
cat /sys/devices/omapdss/display0/timings
mount -o remount,rw /dev/block/mmcblk0p5 /system
chmod 0755 /sys/devices/omapdss/display0/timings
echo 68000,1024/70/200/40,600/10/11/10 > /sys/devices/omapdss/display0/timings
mount -o ro,remount -t ext2 /dev/block/mmcblk0p5 /system
reboot
Click to expand...
Click to collapse
You do not need to remount /system to write to /sys, and if you have chmod at all (unlikely) it would not be 755, it would be 644.
here.david said:
I also get 66461
------------------------
increase the refresh rate to 68000/66461 to stop/reduce flicker.
---------------------------------------------------------------------------
adb pull /system/bin/clrbootcount.sh
gedit clrbootcount.sh (assume you stay in specific dir)
add this to end of file and save
---------------------------------------------------
#run other commands
setprop persist.service.mount.umsauto 0
---------------------------------------------------
NEXT
adb shell mount -o rw,remount -t ext2 /dev/block/mmcblk0p5 /system
adb push clrbootcount.sh /system/bin/clrbootcount.sh
adb shell chmod 755 /system/bin/clrbootcount.sh
adb shell mount -o ro,remount -t ext2 /dev/block/mmcblk0p5 /system
adb shell reboot
--------------
NEXT
adb shell - NOW AT THE su # PROMPT (HAD NO LUCK WITH THE ADB SHELL and then commands all in one line)
cat /sys/devices/omapdss/display0/timings
mount -o remount,rw /dev/block/mmcblk0p5 /system
chmod 0755 /sys/devices/omapdss/display0/timings
echo 68000,1024/70/200/40,600/10/11/10 > /sys/devices/omapdss/display0/timings
mount -o ro,remount -t ext2 /dev/block/mmcblk0p5 /system
reboot
-----------------------------------------------
NEXT
cat /sys/devices/omapdss/display0/timings
66461,1024/70/200/40,600/10/11/10
----------------------------------------------
Three reboots and I still have the changes...
Read all the posting listed if you want/need more details....
Click to expand...
Click to collapse
Tried all that and it did not stick. The final CAT showed a reversion to 48000. Still don't understand how the change to the clrbootcount.sh is supposed to make it stick but it isn't working.
DatterBoy said:
Tried all that and it did not stick. The final CAT showed a reversion to 48000. Still don't understand how the change to the clrbootcount.sh is supposed to make it stick but it isn't working.
Click to expand...
Click to collapse
It wouldn't. The change to the clrbootcount.sh only changes the automount, the change to the /sys var is completely temporary. I assume one could also put it in the clrbootcount.sh, assuming it isn't modified later by the system (negating the change made from the clrbootcount.sh script).
Yeah. not sure how anyone is getting this to work but i can't figure it out. As a warning, modifying the clrbootcount.sh and trying to incorporate the fefresh change script has force firmware into boot loop to needing a factory reset twice now. Wonder if anyone else had the same experience.
The flicker is annoying and the refresh change works, but just won't stick.
To get it to stick, follow the steps on my other thread http://forum.xda-developers.com/showthread.php?t=901791.
When you edit clrbootcount.sh, add the following to the end:
Code:
echo 68000,1024/70/200/40,600/10/11/10 > /sys/devices/omapdss/display0/timings
The final file (if you also want to disable automounting), will look like:
Code:
#!/system/bin/sh
##################################################################################
#
# File clrbootcount.sh
# Description Clear the bootcount variable to 0 on successful boot
#
##
# Run potential hook first.
/data/boot_complete_hook.sh
# Zero the boot count
dd if=/dev/zero of=/rom/devconf/BootCnt bs=1 count=4
#run other commands
setprop persist.service.mount.umsauto 0
echo 68000,1024/70/200/40,600/10/11/10 > /sys/devices/omapdss/display0/timings
While I've never really looked at this, but isn't the "refresh" "rate" largely irrelevant with LCD based screens? I'd always just assumed that even assigning them a "refresh" "rate" was just a place holder to make things work and not break CRT compatibility in drivers/display engines.
Did all this from a super clean root. Did not hold.
cutterjohn said:
While I've never really looked at this, but isn't the "refresh" "rate" largely irrelevant with LCD based screens? I'd always just assumed that even assigning them a "refresh" "rate" was just a place holder to make things work and not break CRT compatibility in drivers/display engines.
Click to expand...
Click to collapse
Don't know if that is true, but I have seen flicker on other LCD panels that could be addressed with refresh changes. The echo command does work instantly on the NC but just won't hold for me.
I have been playing with this and while the changes in clrbootcount.sh do stick, I'm unable to get it to either set the refresh rate or run a script that sets the refresh that I KNOW works from the terminal. Seems idealy this should be set in the ROM. Back to the terminal...
I should add I'm running 1.0.1 (Auto-Nooter 2.12.25) and also tried it in Nookie Froyo.
Here is an easy way to run commands after each boot.
In the init.rc file, the file /system/bin/clrbootcount.sh always gets run after a successful boot. Since it isn't trivial to change the init.rc file, we will use clrbootcount.sh to run commands after a boot. Since people are having issues with modifying clrbootcount.sh, we will choose a safer method.
clrbootcount.sh will always attempt to call /data/boot_complete_hook.sh, which doesn't exit. We are going to create this file and use that to run commands.
Create a file named boot_complete_hook.sh with the following contents (On Windows, use Notepad++):
Code:
#!/system/bin/sh
##################################################################################
#
# File boot_complete_hook.sh
# Description Run any commands that you want to be run after boot
#
##
setprop persist.service.mount.umsauto 0
echo 68000,1024/70/200/40,600/10/11/10 > /sys/devices/omapdss/display0/timings
Save and close.
Now, execute the following commands to put the file on your nook:
Code:
adb push boot_complete_hook.sh /data/boot_complete_hook.sh
adb shell chmod 755 /data/boot_complete_hook.sh
Note:
Before you reboot verify that the file will run properly. Open up a shell via adb shell. Inside that run the following:
Code:
setprop persist.service.mount.umsauto 1
getprop persist.service.mount.umsauto
You should see 1 as the output. Now run:
Code:
sh /system/bin/clrbootcount.sh
You should see an output similar to:
Code:
4+0 records in
4+0 records out
4 bytes transferred in 0.010 secs (400 bytes/sec)
Now run:
Code:
getprop persist.service.mount.umsauto
If 0 is printed out, exit the shell.
If 0 is not printed out, something went wrong and the file will not be run properly on the next boot. If you do reboot in this state 8 times, the boot count won't be reset and you will hit the factory reset. While you are trying to get the script working, you could always manually reset the boot count by executing (from a shell):
Code:
dd if=/dev/zero of=/rom/devconf/BootCnt bs=1 count=4
Now reboot:
Code:
adb shell reboot
As you are rebooting, run:
Code:
adb shell getprop persist.service.mount.umsauto
It will return 1 since the init.rc file sets it to 1 explicitly. However, once you are fully booted it will return 0.
Didn't work for me.
JoshMiers said:
Here is an easy way to run commands after each boot.
In the init.rc file, the file /system/bin/clrbootcount.sh will always gets run after a successful boot. Since it isn't trivial to change the init.rc file, we will use clrbootcount.sh to run commands after a boot.
Do:
Code:
adb pull /system/bin/clrbootcount.sh .
Open the file (on Windows, don't use Notepad) and you should see:
Code:
#!/system/bin/sh
##################################################################################
#
# File clrbootcount.sh
# Description Clear the bootcount variable to 0 on successful boot
#
##
# Run potential hook first.
/data/boot_complete_hook.sh
# Zero the boot count
dd if=/dev/zero of=/rom/devconf/BootCnt bs=1 count=4
Add the following to the end of the file:
Code:
#run other commands
setprop persist.service.mount.umsauto 0
Save and close.
Now, execute the following commands to put the file back on your nook:
Code:
adb shell mount -o rw,remount -t ext2 /dev/block/mmcblk0p5 /system
adb push clrbootcount.sh /system/bin/clrbootcount.sh
adb shell chmod 755 /system/bin/clrbootcount.sh
adb shell mount -o ro,remount -t ext2 /dev/block/mmcblk0p5 /system
adb shell reboot
As you are rebooting, run:
Code:
adb shell getprop persist.service.mount.umsauto
It will return 1 since the init.rc file sets it to 1 explicitly. However, once you are fully booted it will return 0.
Click to expand...
Click to collapse
Wouldn't this screw up the 8X "back to stock firmware" sequence since that depends on having the boot counter increment up to 8?
docfreed said:
Wouldn't this screw up the 8X "back to stock firmware" sequence since that depends on having the boot counter increment up to 8?
Click to expand...
Click to collapse
The script file is already there and already being called after each successful boot. The 8x boot counter logic happens with 8 failed boots. Regardless, the instructions just show you how to append a custom command to be run after the stock commands run, no other booting logic is affected.
>DARKMAN< said:
Didn't work for me.
Click to expand...
Click to collapse
What didn't work? Run the following and paste your output:
Code:
adb shell cat /system/bin/clrbootcount.sh
Code:
adb shell ls -l /system/bin/clrbootcount.sh
Awesome, thanks for the tip! Been wondering how to put in my own stuff into the init, I'd love to modify the path but I suspect this won't be the way, but regardless it's good info.
BTW, I have found that disabling this USM property seems to disable the SD card automounting but the Nook itself might still automount... But that's for another thread I suppose
Worked perfectly
This is exactly what I was looking for.
Thanks
Sent from my LogicPD Zoom2
There seems to be a little confusion over at the refresh rate thread http://forum.xda-developers.com/showthread.php?t=901294.
To be explicit, if you want to disable auto-mounting as well as change the refresh rate, you would edit clrbootcount.sh to have the following contents:
Code:
#!/system/bin/sh
##################################################################################
#
# File clrbootcount.sh
# Description Clear the bootcount variable to 0 on successful boot
#
##
# Run potential hook first.
/data/boot_complete_hook.sh
# Zero the boot count
dd if=/dev/zero of=/rom/devconf/BootCnt bs=1 count=4
#run other commands
setprop persist.service.mount.umsauto 0
echo 68000,1024/70/200/40,600/10/11/10 > /sys/devices/omapdss/display0/timings
If you don't want to disable auto-mounting, just remove the line with
Code:
setprop persist.service.mount.umsauto 0
I ran what was posted and it still returns 1.
Sent from my HAXSUNG Moment
JoshMiers said:
What didn't work? Run the following and paste your output:
Code:
adb shell cat /system/bin/clrbootcount.sh
Code:
adb shell ls -l /system/bin/clrbootcount.sh
Click to expand...
Click to collapse
Screen shot attached (1.0.1 Auto-Nooter 2.12.25).
# cat /system/bin/clrbootcount.sh
cat /system/bin/clrbootcount.sh
#!/system/bin/sh
################################################################################
##
#
# File clrbootcount.sh
# Description Clear the bootcount variable to 0 on successful boot
#
##
# Run potential hook first.
/data/boot_complete_hook.sh
# Zero the boot count
dd if=/dev/zero of=/rom/devconf/BootCnt bs=1 count=4
#
# ls -l /system/bin/clrbootcount.sh
ls -l /system/bin/clrbootcount.sh
-rwxr-xr-x root root 338 2011-01-06 19:50 clrbootcount.sh
#
edit double post oops
I lost my backup of clrbootcount.sh
and now it won't reset the boot count.
any help would be greatly appreciated.
adb shell getprop persist.service.mount.umsauto
Click to expand...
Click to collapse
always returns 1 during and after complete reboot. The echo command for screen does not persist. Have followed your instructions super letter by letter multiple times and leading up to the reboot everything is exactly as you say.
Right now, I am most concerned that whatever I have done will not reset the boot count since it stays at 1 and does not go to 0. I've already lost my entire setup twice and had to start from scratch trying to make this work. At least I know how to reset to 0 with the line command script but how do I ensure i don't need to worry about it?
I think this process may be a bust.
I am on 1.0.0 and have been using this since I posted it and both the refresh rate and automount values are sticking between reboots.
>DARKMAN< said:
# cat /system/bin/clrbootcount.sh
cat /system/bin/clrbootcount.sh
#!/system/bin/sh
################################################################################
##
#
# File clrbootcount.sh
# Description Clear the bootcount variable to 0 on successful boot
#
##
# Run potential hook first.
/data/boot_complete_hook.sh
# Zero the boot count
dd if=/dev/zero of=/rom/devconf/BootCnt bs=1 count=4
#
# ls -l /system/bin/clrbootcount.sh
ls -l /system/bin/clrbootcount.sh
-rwxr-xr-x root root 338 2011-01-06 19:50 clrbootcount.sh
#
Click to expand...
Click to collapse
I am assuming you are using the new method, which would mean you need to post your /data/boot_complete_hook.sh
>DARKMAN< said:
I lost my backup of clrbootcount.sh
and now it won't reset the boot count.
any help would be greatly appreciated.
Click to expand...
Click to collapse
The clrbootcount.sh file that you posted is the default file. I will post it again:
Code:
#!/system/bin/sh
##################################################################################
#
# File clrbootcount.sh
# Description Clear the bootcount variable to 0 on successful boot
#
##
# Run potential hook first.
/data/boot_complete_hook.sh
# Zero the boot count
dd if=/dev/zero of=/rom/devconf/BootCnt bs=1 count=4
Also, the original post explains how to manually reset the boot count. Here it is:
If 0 is not printed out, something went wrong and the file will not be run properly on the next boot. If you do reboot in this state 8 times, the boot count won't be reset and you will hit the factory reset. While you are trying to get the script working, you could always manually reset the boot count by executing (from a shell):
Code:
dd if=/dev/zero of=/rom/devconf/BootCnt bs=1 count=4
jleecong said:
Screen shot attached (1.0.1 Auto-Nooter 2.12.25).
Click to expand...
Click to collapse
It appears you are running Windows, so I am hoping that you did not use Notepad to edit this file.
Since you are running 1.0.1, post your /init.rc file.
Thought I may have been doing something wrong since I used notepad but downloaded Notepad++ and created the new .sh file. Still no go. Screen still flickers and USB still automounts. Maybe 1.0.1 just is not commpatible with this process. Only difference I can see.
The getprop persist.service.mount.umsauto also indicates 1 after full boot and not 0. Pretty sure this will wipe everything out after 8 boots, going to wipe it all out now and proactively prevent it.
I am running sparks mod 1.6.4 compcache 32% hack.
I want to change the swappiness to 60.
How would I go about doing this?
Don't do it, it's much too high. I would suggest something around 10-20, i.e. type in terminal:
su
echo 10 > /proc/sys/vm/swappiness
Sent from my Gingerbread on Sapphire using XDA App
Why so low? Just seeking some wisdom.
Thanks.\
Also is this a permanent change or do i have to do this every boot?
This is not a permanent change, you have to apply this every time you reboot your phone. If you want it permanent, you should include it into the /system/bin/compcache script.
Swappiness defines, when data will be put into the swapfile. 100 means, all inactive data can be put into the swap, 0 means, that cached data will be removed first before using the swap. Disadvantage when too much data is within swap: the system speed goes down ... so you have to find a good compromize.
AndDiSa said:
This is not a permanent change, you have to apply this every time you reboot your phone. If you want it permanent, you should include it into the /system/bin/compcache script.
Swappiness defines, when data will be put into the swapfile. 100 means, all inactive data can be put into the swap, 0 means, that cached data will be removed first before using the swap. Disadvantage when too much data is within swap: the system speed goes down ... so you have to find a good compromize.
Click to expand...
Click to collapse
ok so i edited the file and pushed it.
now compcache is not starting and when i type it in the terminal it says permission denied.
Any help?
should i try inputting the command you first gave me into compcache?
After the modification, the compcache file should look something like
...
start)
echo 3 > /proc/sys/vm/drop_caches
modprobe $MODULE
rzscontrol $DEV --disksize_kb=32576 --init
swapon $DEV
echo 10 > /proc/sys/vm/swappiness
;;
...
this is what i have
#!/system/bin/sh
#
# Compcache manager
# [email protected] (cyanogen)
#
DEV=/dev/block/ramzswap0
MODULE=ramzswap
MODULES_DIR=/system/modules/lib/modules/`uname -r`
case "$1" in
start)
echo 3 > /proc/sys/vm/drop_caches
echo 30 > /proc/sys/vm/swappiness
modprobe $MODULE
rzscontrol $DEV --disksize_kb=$2 --init
swapon $DEV
;;
stop)
swapoff $DEV >/dev/null 2>&1
rmmod $MODULE >/dev/null 2>&1
;;
stats)
rzscontrol $DEV --stats
;;
*)
echo "Usage: $0 {start <size>|stop|stats}"
exit 1
esac
exit 0
I cant seem to get it to work.
this is the original too.
it just keeps saying permission denied
You are running the script as root, i.e
> su
# /system/bin/compcache start
to start the script manually?
Before modifing the script, you have to remount /system to set it read-write, otherwise it's read only!
try to fix the permission
Sogarth's webtop2sd will be released soon, you really should wait and install that instead of this! Thanks -The Management
No longer breaks on 1.83, thanks to Romracer
Update: This script worked on my phone. Mind you I was installing it from a fresh SBF flash, but it should work on your phone too. Absolutely no guarantees as usual.
Update 11th April 2011, 06:59 PM: Won't be getting CWM package because it'd be huuuuuuuuuge.
Update 28th April 2011. 16:38 PM: Removing BETA tag since there have been no issues with the script for quite some time.
First off I would like to thank Sogarth for making this script in the first place as well as Romracer for fixing it for 1.83. Since he is busy doing more important work I decided to do this little hack for those of us that updated to 1.5.7 and dont feel like flashing back to earlier versions to get full Ubuntu working.
Again, this is only necessary if you're already running 1.5.7 or 1.8.3.
Secondly, I am still working on this script so it may not work for you. If you have a problem you may post in the thread or PM me showing exactly the error message, word for word, that you receive.
Updates will be included in the OP from time to time as I fix errors.
Instructions:
1) install.bat (from your computer)
2) adb shell (get a shell on your phone)
3) su (get root on your phone in that shell)
4) . /data/local/tmp/install.sh (run the install script *on your phone* don't forget the "." and the space after the dot, or you will have to chmod 755 the shell script manually)
5) ?????
6) profit\
Noob instructions, written by Viamonte (I take no credit or responsibility):
Thanks again for all your help. Now the noob instructions:
"1-Download "Terminal Emulator" from the market, on your phone (or any other terminal), and the file anexed in this thread to your computer.
2-Connect the Atrix to the computer via USB, configuring the connection mode to "None" and enabling USB Debugging mode (Settings>Applications>Development>USB debugging)
3-Unzip the file you downloaded on your pc, and run Install.bat. This will push the script to your phone.
4-Go back to your phone and open the emulator you downloaded. Then type "su" (without quotes) and press enter. Then type ". /data/local/tmp/install.sh" (without quotes) and press enter again.
The script should begin running now. It will stop in two moments where you'll be instructed to get a cup of coffee, and may take several minutes to continue form this point. When finished, the Atrix will reboot.
To check if this worked, use the Webtop either on your multimidia dock or your lapdock and verify if new itens appeared on your task bar and on the right upper side of the screen"
0.3.1 release
0.2 release
0.1 first release
Changelog
0.3.1 fix to gconf file's mdate so it does what its supposed to do =)
0.3 Small typo fixes and cpp package install fix by romracer, now works on 1.83 =)
0.2 Fixed some typos in uninstall.sh and make sure the %gconf file wound up in the right spot.
0.1 - first version. NOT CWM install but ready to be packaged for that more or less
Nice, I'll give this a shot later.
Ill give it a shot when I get home!
Sent from Motorola Atrix on TELUS.
My phone is working perfectly, so why not ruin it?
I'm giving this a try right now!
1.4.57 - Rooted and gingerblurred with HDMI Mirroring and Webtop hack.
I'll update as progress goes along:
Edit 1:
Initial try gave me this
Checking device state...
Obtaining temporary root access...pushing shell scripts
A filesystem file already exists. Reset it? [n] y
Mounting the filesystem...
07.sh
--------------------------------------------
EXECUTION FAILED
Unable to mount the filesystem file. ERR 07
--------------------------------------------
Press any key to continue . . .
Edit 2:
Ok, it doesnt work with resetting it. How about removing?
Checking device state...
Obtaining temporary root access...pushing shell scripts
A filesystem file already exists. Reset it? [n] n
A filesystem file already exists. Delete it? [n] y
Deleting the filesystem file...
--------------------------------------
EXECUTION FAILED
Unable to delete the filesystem file.
--------------------------------------
Press any key to continue . . .
Edit 3:
Ok, only one option left then.
Checking device state...
Obtaining temporary root access...pushing shell scripts
A filesystem file already exists. Reset it? [n] n
A filesystem file already exists. Delete it? [n] n
--------------------------------------------------------------------------
EXECUTION FAILED
The filesystem file already exists, but no operations have been selected.
--------------------------------------------------------------------------
Press any key to continue . . .
=====================================================================
Edit 4:
Since execution is failing I'm trying to find the problem. Using ADB Shell i tried to manually run the shell scripts and stumbled here:
(I tried chmod 777 @ 02.sh to see if that was the problem, no change is results)
# ls -l
...
...
-rwsr-sr-x shell shell 87 2011-04-06 12:13 03.sh
-rwxrwxrwx shell shell 82 2011-04-06 12:11 02.sh
-rwsr-sr-x shell shell 251 2011-04-06 12:04 01.sh
# pwd
pwd
/data/tmp/shell
# /data/tmp/shell/02.sh
/data/tmp/shell/02.sh
/data/tmp/shell/02.sh: not found
I had the same issue as flybob when I tried to run the script.
Sent from my MB860 using XDA Premium App
Good effort, but 1.57 changes how we have to run commands as root. On a normal linux box, I'm sure your methods would work fine, but we're not dealing with a normal su binary. You should look into doing this as CWM as opposed to .bat files. I had a hell of a time getting around the restrictions since the psneuter exploit was closed.
Ah, I did not think about that Ririal, thanks for the info. I am not familiar with CWM though.
Why is the /tmp directory in /data ? That would certainly cause every script to fail.
I'll look at this some more tonight.
Ririal said:
Good effort, but 1.57 changes how we have to run commands as root. On a normal linux box, I'm sure your methods would work fine, but we're not dealing with a normal su binary. You should look into doing this as CWM as opposed to .bat files. I had a hell of a time getting around the restrictions since the psneuter exploit was closed.
Click to expand...
Click to collapse
How about a shell script that we can run in terminal emulator ? and the output goes to screen and a log file for debug !
molotof said:
How about a shell script that we can run in terminal emulator ? and the output goes to screen and a log file for debug !
Click to expand...
Click to collapse
most of the script is now run by shell scripts, no reason you couldn't run them in the terminal emulator, just get the order right. There are also a few lines I didn't translate to shell so you'd have to enter them by hand.
In any case I'll keep working on this until Sogarth releases his version with union mounts =D
You might be interested to know this;
# cd /tmp
cd /tmp
# pwd
pwd
/data/tmp
# ls -l /tmp
lrwxrwxrwx root root 2011-04-09 14:47 tmp -> /data/tmp
I'll happily help with the script, i know tons of linux and got my Atrix ready to be bricked
flybob said:
You might be interested to know this;
# cd /tmp
cd /tmp
# pwd
pwd
/data/tmp
# ls -l /tmp
lrwxrwxrwx root root 2011-04-09 14:47 tmp -> /data/tmp
I'll happily help with the script, i know tons of linux and got my Atrix ready to be bricked
Click to expand...
Click to collapse
That's just a symlinked directory. I won't make a difference if you call either.
Yes, just replied to the previous question
Why is the /tmp directory in /data ? That would certainly cause every script to fail.
I'll look at this some more tonight.
Click to expand...
Click to collapse
However, why doesn't the scripts run as wanted...?
# cat /tmp/shell/02.sh
cat /tmp/shell/02.sh
#!/bin/sh
/system/bin/su
/bin/rm /data/ubuntu.disk > /dev/null 2>&1 && echo PASS#
# ls -l /tmp/shell/02.sh
ls -l /tmp/shell/02.sh
-rwxrwxrwx shell shell 82 2011-04-06 12:11 02.sh
# /tmp/shell/02.sh
/tmp/shell/02.sh
/tmp/shell/02.sh: not found
flybob said:
Yes, just replied to the previous question
However, why doesn't the scripts run as wanted...?
# cat /tmp/shell/02.sh
cat /tmp/shell/02.sh
#!/bin/sh
/system/bin/su
/bin/rm /data/ubuntu.disk > /dev/null 2>&1 && echo PASS#
# ls -l /tmp/shell/02.sh
ls -l /tmp/shell/02.sh
-rwxrwxrwx shell shell 82 2011-04-06 12:11 02.sh
# /tmp/shell/02.sh
/tmp/shell/02.sh
/tmp/shell/02.sh: not found
Click to expand...
Click to collapse
Ah ok my mistake, you didn't quote anything I didn't realize that's what you were responding too
Likely noexec flag causing that issue.
Also, you can't invoke su from inside a shell script. It just doesn't work with this su binary.
yeah, I guess not. I hadn't realized that it wasn't a real 'su' before making this... too bad.
If anyone figures out how to get around that we'll be in business Unfortunately that's way beyond my expertise.
Okay, after fiddling a little bit and talking to a friend I may have solved some of the problems, mainly with the scripts executing and su working.
I will have to rewrite a bunch of things but should report back tonight.
the2dcour said:
Okay, after fiddling a little bit and talking to a friend I may have solved some of the problems, mainly with the scripts executing and su working.
I will have to rewrite a bunch of things but should report back tonight.
Click to expand...
Click to collapse
su -c "command"
You'll have to allow superuser on the phone for every single command.
PM'd you my error. I tried manually editing the permissions, but that didn't work.
Running on GladAtrix2 v3
USB debugging on; USB set to none
Checking device state...
Obtaining temporary root access...pushing shell scripts
-------------------------
EXECUTION FAILED
Unable to chmod scripts.
-------------------------
Press any key to continue . . .
Changed /sdcard-ext to /sdcard in script. Got this error
Checking device state...
Obtaining temporary root access...pushing shell scripts
-------------------------
EXECUTION FAILED
Unable to chmod scripts.
-------------------------
* server not running *
Press any key to continue . . .
Running BETA_ubuntu-1.0.6.4.zip. File extracts to BETA_ubuntu-1.0.6.2 directory. Ran ubuntu-1.5.7.bat
Moved BETA_ubuntu-1.0.6.2 to C:\ Same error
The only easy workaround to that I can see at the moment is to
Code:
adb shell
su
chmod 777 /path-to-scripts/*
ls -l /path-to-scripts/*
make sure all the files are executable (should say rwxrwxrwx)
then remove the bit of code from 1.5.7.bat
Code:
set retval=
for /f "tokens=*" %%l in ('%~dps0adb.exe shell "/bin/chmod 6755 /mnt/sdcard-ext/shell/* > /dev/null 2>&1 && echo PASS"') do set retval=%%l
if "%retval%" neq "PASS" set message=Unable to chmod scripts. && goto abort
If anyone can help me fix this problem I should be able to automate the chmod process using ririal's suggestion of su -c. The problem is that there are too many nested quotation marks in this section of the batch file, and I can't for the life of me figure out how to escape quotes so they pass through to adb:
Code:
set retval=
for /f "tokens=*" %%l in ('%~dps0adb.exe shell "/system/bin/su -c [U]'/bin/chmod 6755 /mnt/sdcard-ext/shell/*'[/U] > /dev/null 2>&1 && echo PASS"') do set retval=%%l
if "%retval%" neq "PASS" set message=Unable to chmod scripts. && goto abort
The underlined bit is where I need to escape either single or double quotes.
the2dcour said:
The only easy workaround to that I can see at the moment is to
Code:
adb shell
su
chmod 777 /path-to-scripts/*
ls -l /path-to-scripts/*
make sure all the files are executable (should say rwxrwxrwx)
then remove the bit of code from 1.5.7.bat
Code:
set retval=
for /f "tokens=*" %%l in ('%~dps0adb.exe shell "/bin/chmod 6755 /mnt/sdcard-ext/shell/* > /dev/null 2>&1 && echo PASS"') do set retval=%%l
if "%retval%" neq "PASS" set message=Unable to chmod scripts. && goto abort
If anyone can help me fix this problem I should be able to automate the chmod process using ririal's suggestion of su -c. The problem is that there are too many nested quotation marks in this section of the batch file, and I can't for the life of me figure out how to escape quotes so they pass through to adb:
Code:
set retval=
for /f "tokens=*" %%l in ('%~dps0adb.exe shell "/system/bin/su -c [U]'/bin/chmod 6755 /mnt/sdcard-ext/shell/*'[/U] > /dev/null 2>&1 && echo PASS"') do set retval=%%l
if "%retval%" neq "PASS" set message=Unable to chmod scripts. && goto abort
The underlined bit is where I need to escape either single or double quotes.
Click to expand...
Click to collapse
^ escapes batch, \ escapes shell. Hope this helps. If you zip up and send me the whole process in a single .sh file I can wrap it up in CWM for you.