Related
As some of you might have seen or even used, I have created an application that allows executing of shell scripts from within Android and it will even allow you to create a direct shortcut on your homescreen to a script ( for example to start Debian or reboot your phone ).
I know a lot of developers ( I also didnt at first ) don't look in the "applications and games" section, but i thought it was the best place to post the actual application.
I will keep updating that post with the actual application process/updates, but ive created this thread to see if people ( I think most of the actual linux experienced people are in this section ) would like to share their linux knowledge to other peoples uploading useful .sh files ( for backing up stuff etc etc ), so that less experienced can just load them in to my application, without risking all typos.
So if you have a nice script that is useful please upload it so we can all benefit from it.
The actual application can be found here:
http://forum.xda-developers.com/showthread.php?t=486486
Please dont ask question or place suggestions about the application in this thread, but use the one Ive created for the actual development and keep this thread for scripts only.
Regards,
Rob
I was thinking about starting a thread just like this one-- for everyone to post up their scripts. Don't know why I didn't. Anyway, I asked the question awhile back how to create a script for remounting the file system as read/write, which led to my discovery of GScript. In any case, here's what I was told to use:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
Click to expand...
Click to collapse
Be advised that I have no idea if this actually works or not. Perhaps someone could test and post the results?
tubaking182 said:
that takes to long, i find it easier when i am using the comp to just click my terminal(which is almost always up and running) and type reboot_phone(i have a script on the computer that contains the comand adb shell reboot) and also another for rebooting into recovery and one more for bootloader
i guess i'm lazy but if i can find a way to automate anything i do in life i go ahead and do it. i have a script for nearly everything i do to my phone.
on a more on-topic note, i was hoping someone would post the command to reboot and apply an update.zip, i know it is in the JF autoupdater, but i just want to be able to hit a shortcut on my home screen to apply themes as well.
Click to expand...
Click to collapse
Code:
su
echo "boot-recovery
--update_package=/sdcard/update.zip" > /cache/recovery/command
reboot recovery
Untested, you might have to play around with the /sdcard/update.zip to get it to load properly, I'm not sure exactly how you put the path in there. This will, for sure, reboot it into recovery mode, and tries to automatically apply an update.zip.
Edit:
--update_package=sdcard:update.zip
Should do it. I hope.
Here's a script I built to make a rom into the "lite" version needed by many of the themes. It's not much but it's my first one.
Code:
mount -o rw,remount -t yaffs2, /dev/block/mtdblock /system
rm -r /system/media/audio/ringtones
rm -r /system/media/audio/notifications
reboot
Gary13579 said:
Code:
su
echo "boot-recovery
--update_package=/sdcard/update.zip" > /cache/recovery/command
reboot recovery
Untested, you might have to play around with the /sdcard/update.zip to get it to load properly, I'm not sure exactly how you put the path in there. This will, for sure, reboot it into recovery mode, and tries to automatically apply an update.zip.
Edit:
--update_package=sdcard:update.zip
Should do it. I hope.
Click to expand...
Click to collapse
You don't need the "su" at the beginning. Gscript has a checkbox to indicate if SU is needed and will add it on it's own. Putting it in causes the script to hang.
Anyway to make it close the script window when the script completes? Right now I have it doing an app backup and echoing DONE. But I'd like to automate the process if possible.
Exit doesn't seem to work.
Gary13579 said:
Code:
su
echo "boot-recovery
--update_package=/sdcard/update.zip" > /cache/recovery/command
reboot recovery
Untested, you might have to play around with the /sdcard/update.zip to get it to load properly, I'm not sure exactly how you put the path in there. This will, for sure, reboot it into recovery mode, and tries to automatically apply an update.zip.
Edit:
--update_package=sdcard:update.zip
Should do it. I hope.
Click to expand...
Click to collapse
It does reboot into recovery mode but I get the error "Can't mount /sdcard/Update.zip Installation aborted."
I'm able to just apply the update by pressing Alt+S but would be nice if it was all automated.
wpbcubsfan said:
It does reboot into recovery mode but I get the error "Can't mount /sdcard/Update.zip Installation aborted."
I'm able to just apply the update by pressing Alt+S but would be nice if it was all automated.
Click to expand...
Click to collapse
Same result for me.
Got it!!!
ok!
used this as script to change theme
cp /sdcard/themes/aero/update.zip /sdcard/
echo "boot-recovery
--update_package=SDCARD:update.zip" > /cache/recovery/command
reboot recovery
Needed to use caps for SDCARD!!!
found it poking around the recovery.c file
better still no need to copy over update.zip in root Just in case of emergency.
Code:
echo "boot-recovery
--update_package=SDCARD:themes/aero/update.zip" > /cache/recovery/command
reboot recovery
beagz said:
ok!
used this as script to change theme
cp /sdcard/themes/aero/update.zip /sdcard/
echo "boot-recovery
--update_package=SDCARD:update.zip" > /cache/recovery/command
reboot recovery
Needed to use caps for SDCARD!!!
found it poking around the recovery.c file
better still no need to copy over update.zip in root Just in case of emergency.
Code:
echo "boot-recovery
--update_package=SDCARD:themes/aero/update.zip" > /cache/recovery/command
reboot recovery
Click to expand...
Click to collapse
Dude, you rock! Thanks!
Clear Caches
I use this script to clear almost all of the app caches
Code:
#Deletes all caches in one fell swoop :]
#Locations of the caches were taken from various sites, including xda and androidcommunity.com
#written by indiekid97
#Deletes browser cache
rm -R /data/data/com.android.browser/cache/webviewCache
#Deletes Maps cache
rm -R /data/data/com.google.android.apps.maps/files
#Deletes StreetView
rm -R /data/data/com.google.android.street/cache
#Deletes Market cache
rm -R /data/data/com.android.vending/cache
#Deletes Tunewiki cache
rm -R /data/data/com.tunewiki.lyricplayer.android/cache/webviewCache
#Deletes Myspace cache
rm -R /data/data/com.myspace.android/files
#Deletes GMail cache
rm -R /data/data/com.google.android.gm/cache/webviewCache
Copy from /system/app
I get get the phone to copy from data app and private however, when I try to copy apps from /system/app it does nothing.
Mod_edit
any ideas?
I also tried to cd in the script to navigate to the data and still it only runs the first two copy commands.
removed copyright procedureYou can not display procedures concerning the two app folders being transferred to Fat32 portion of card.
a1t said:
I get get the phone to copy from data app and private however, when I try to copy apps from /system/app it does nothing.
Mod_edit
any ideas?
I also tried to cd in the script to navigate to the data and still it only runs the first two copy commands.
Click to expand...
Click to collapse
Woops
Sorry dudes. If we can still talk about any possibilities, I'm down. if not, oh well. now on eggshells
looking for script to move a specific directory on /system to a location on my sdcard
if anyone is interested PM me.
What would the script be to disable USB mounting to the computer? It's a hassle for me to have to un-plug the USB cable when I want to unmount, it would be very beneficial to have a quick press of an icon on the Home screen to do this
*Edit: after tinkering around with it for a bit, I see that this cannot be done- I tried mounting the SD card to computer and then running a script, *any* script will not load because GScript requires /sdcard/gscript_tmp.sh to be accessable in order to run a script.
Mounting to computer and then running a script from GScript simply shows an error:
Code:
Error:
/sdcard/gscript_tmp.sh
SO, in order for it to work, GScript would probably have to be configured to search for the script elsewhere to load while the SD card is mounted.
Here is a small script to back up current system sounds to the SD card, probably most useful if you do this prior to using the Make Lite script:
Code:
cp -r /system/media/audio /sdcard/audio
If there are any errors please let me know.
Once they're backed up, you can merge the folder into /sdcard/media for proper use with Ringdroid.
I'm not sure whether to use cp -r or cp -a, so I will stick with -r for now and see if anyone has any other suggestion.
quick question....
where can i find out what the "flags" mean.
-a
-t
and so on.
Mikey1022 said:
quick question....
where can i find out what the "flags" mean.
-a
-t
and so on.
Click to expand...
Click to collapse
I found this link useful to your question, might want to scroll down a bit to see the most direct answer to what you were wondering:
http://www.freeos.com/articles/4414/
Hope that helps
a start
http://www.computerhope.com/unix/ucp.htm
a1t said:
http://www.computerhope.com/unix/ucp.htm
Click to expand...
Click to collapse
Proxin said:
I found this link useful to your question, might want to scroll down a bit to see the most direct answer to what you were wondering:
http://www.freeos.com/articles/4414/
Hope that helps
Click to expand...
Click to collapse
Thank you to both of you
Hi trying to change my boot animation but original zip will not delete or rename please advise. thanks
deckercymru said:
Hi trying to change my boot animation but original zip will not delete or rename please advise. thanks
Click to expand...
Click to collapse
need to mount /data/local as RW (or /system if it is in /system/custom depending on ROM).
Then delete it
Sorry to ask how do I make it read, write. Thanks
deckercymru said:
Sorry to ask how do I make it read, write. Thanks
Click to expand...
Click to collapse
NP sorted thx
deckercymru said:
Sorry to ask how do I make it read, write. Thanks
Click to expand...
Click to collapse
Assuming that your Sensation is already rooted you have 2 ways to make system partition r/w:
1. use Root Explorer app and click Mount R/W button in right top corner and then perform action you want (move file, remove file, etc.)
2. using command line tool called adb (Android Debug Bridge):
Code:
adb remount
which will make your android system partition writeable and then:
Code:
adb shell
and then perform action you want in command line interface.
Hey Guys,
here is the stock kernel from XXKQ7 including init.d and custom bootanimation support.
Root and Busybox needed
HOW-TO
1. Download one of the following zips
2. Put the zip on your internal SDCard
3. Shut down your phone
4. Go into Recovery-Mode: First power off your Phone, then hold Power + VolumeUp. Release the two buttons 3 seconds after the samsung logo is shown.
5. "install zip from sdcard" -> "choose zip from internal sdcard" -> "stockkernel_init.d_bootanimation_KQ7"
6. Reboot your phone
Downloads
KQE Kernel
KQB Kernel
KQ7 Kernel
Further Instructions
1. Create /system/etc/init.d place some script in it or flash any other init.d script package
2. To change the bootanimation place your favorited sanim.zip in /system/media/
After that you can flash Thunderbolt or AdrenalineShot and use their advantages.
Please give some Feedback it is working correctly because im really new to this stuff. I have a GT-I9001 and at the moment everything seems to run as it should. I had no bootloops as it sometimes was the case with FeaMod or N00b.
what’s this kernel‘s CPU frequency ,OC?
Why you are concerned?
Sent from my GT-I9001 using XDA App
crybert said:
Why you are concerned?
Sent from my GT-I9001 using XDA App
Click to expand...
Click to collapse
sorry, some mistakes in front of my words
Nice, been looking all over for stock kernel..How its prforming? Im currently on latest feacore, with batt drain all the time. Can u post ur batt stats pic?Would love to have usable phone than some short lived super fast phone..
Nice man......thansk is ok on my phone.
can i use it on another phone???
safwanjin said:
can i use it on another phone???
Click to expand...
Click to collapse
u can't be serious , right ?
safwanjin said:
can i use it on another phone???
Click to expand...
Click to collapse
I'm soooo tempted to say yes... but dude, the answer really is NO WAY MAN (unless you want a device which can only be used for throwing in your neighbors windows)
For the ones that want to automate uploading boot.img, here's a batchfile (untested). Just use attached, drag your boot.img ontop of it and ready it is...
Code:
for %%i in (%1) do set onlyfilename=%%~nxi
adb push %1 /sdcard/%onlyfilename%
adb -d remount
adb -d shell dd if=/sdcard/boot.img of=/dev/block/mmcblk0p8
adb -d remount
echo all ok?
echo rebooting...press a key to continue...
pause >nul
adb -d reboot
pause
crybert said:
Hey Guys,
I cooked this Kernel with dsixda's Android Kitchen because I wanted a stock kernel with init.d. So here it is.
Root and Busybox needed.
How-To with TerminalEmulator
1. Download boot.img here
2. Place boot.img on your SD-Card
3. Download TerminalEmulator from Market: https://market.android.com/details?id=jackpal.androidterm
4. Run TerminalEmulator and type:
Code:
su
dd if=/sdcard/boot.img of=/dev/block/mmcblk0p8
reboot
How-To with adb
1. Download boot.img here
2. Place boot.img on your SD-Card
3. Connect your Phone to your PC with the USB-cable (USB-Debugging has to be enabled)
4. Download adb-tools on your PC and extract the files to C:/adb
5. Run cmd on your PC and type
Code:
cd c:/adb
adb shell
su
dd if=/sdcard/boot.img of=/dev/block/mmcblk0p8
reboot
After that you can flash Thunderbolt or AdrenalineShot and use their advantages.
Please give some Feedback it is working correctly because im really new to this stuff. I have a GT-I9001 and at the moment everything seems to run as it should. I had no bootloops as it sometimes was the case with FeaMod or N00b.
Click to expand...
Click to collapse
hmm I can install this over your ROM ?
chasemyass said:
hmm I can install this over your ROM ?
Click to expand...
Click to collapse
You should be able to install it over any rom. Although as you are asking this, I wonder why you'd need it
nikagl said:
You should be able to install it over any rom. Although as you are asking this, I wonder why you'd need it
Click to expand...
Click to collapse
well because I think it could be same kernel version or maybe better than mine if it`s not same
chasemyass said:
well because I think it could be same kernel version or maybe better than mine if it`s not same
Click to expand...
Click to collapse
it's only if you want to tinker with init.d stuff ... and trust me: you don't
nikagl said:
it's only if you want to tinker with init.d stuff ... and trust me: you don't
Click to expand...
Click to collapse
maybe...maybe not i will see
@Crybert:Y dont u integrate CF-ROOT ramdisk with ur kernel,it makes things a hell lot easier
Can be fixed in kernel skype issue with upside-down video from front camera?
prescott66 said:
Can be fixed in kernel skype issue with upside-down video from front camera?
Click to expand...
Click to collapse
just turn the phone around
nope!
what is 'vbus_wake_lock', 'msm_otg' and 'usb_bus_active'?
this 3 kernal are the huge cause of my wakelock.
annoymous1234 said:
what is 'vbus_wake_lock', 'msm_otg' and 'usb_bus_active'?
this 3 kernal are the huge cause of my wakelock.
Click to expand...
Click to collapse
whoa,these are not kernels!
So, as the name says, OTA-Updater (Script) for LG Optimus One (no, every device )
You can also use it on Linux, e.g. Ubuntu, Debian and Mint!
You need:
- A server:
I'm using Square7
- A rooted phone
- Busybox
- Terminal Emulator
This Script will not search for updates in background, you need to start the script (via Terminal Emulator) to check for updates
I'm not responsible for any damage to your phone.
PLEASE READ EVERYTHING CAREFULLY BEFORE POSTING SOMETHING LIKE
'This doesn't work!' or 'That's spamming!!!'
Guys, there is a REPORT-button, use it instead spamming the thread!!!
1. First, create your own server, I'm using Square7 or you can also use Funpic;
I recommend that you use Square7
2. Install Busybox from Play Store (Busybox Installer), if not installed. It's pre-installed on almost every ROM
3. Create a file called "version.xml"(what file (e.g. xml,txt) doesn't matter) on your server, and type in it the latest available version.
YOU NEED TO EDIT THE FILE EVERYTIME YOU UPDATED THE ROM
4. Now, create a file called "update.xml" on your phone, located in /system/ (Don't forget to mount system) and type in it the running version on the phone
So, now the script
The script should start with this:
Code:
#!/system/bin/sh
___
Check if user is running as root;
If no, then message "You are not running this scripts as root."; Abort:
Code:
id=`id`; id=`echo ${id#*=}`; id=`echo ${id%%\(*}`; id=`echo ${id%%gid*}`
if test "$id" != "0" && test "$id" != "root"; then
echo " You are not running this script as root."
exit 0
fi
___
Mount system read-write:
Code:
busybox mount -o remount,rw /system
___
Now, the script should search for updates; first download a file (I'm using .XML file; doesn't matter what file):
Code:
wget -q http://your-server.server.com/version.xml -P /sdcard/Folder/
___
Compare downloaded file with "update.xml" on /system/:
If files are the same (No update), Message: "No update available."; Abort
Else (Update available), Message: "Update available"
Code:
if diff /sdcard/Folder/version.xml /system/update.xml
then
echo "No update available"
echo "Aborted"
exit 0
else
echo "Update available!"
fi
___
Clean up folder:
Code:
rm /sdcard/Folder/*
___
Update available, download "update.zip" (Read everything carefully, if you read everything carefully, you'll know what the file should contain...):
Code:
wget -q http://your-server.server.com/update.zip -P /sdcard/Folder/
___
Unzip "update.zip":
Code:
unzip -q /sdcard/Folder/update.zip -d /sdcard/Folder/
___
Set permissions:
Code:
chmod 0777 /sdcard/Folder/updater.sh
___
Update ROM:
Code:
sh /sdcard/Folder/updater.sh
First phase done, save the file as "update" (Not .TXT or XML, nothing) and copy the file to /system/bin/ and set permissions
___________
Update.zip
So, now the update.zip:
This file contains system-files, the new update.xml and the updater-script (.sh, not the updater-script in flashable packages!!!)
So, first, you need to SAVE the files to the update.zip, I mean do not compress or something else, only SAVE, else "Unzip" wont work
SAVE all changed files to update.zip
Upload the update.zip to your server. You need to edit the update.zip everytime, when you updated the ROM
Now, the updater.sh:
It should start with this:
Code:
#!/system/bin/sh
___
Now, the changed files should be copied to them right location:
I've only changed the build.prop, it's a example, you can change everything you want:
Code:
cp -f /sdcard/Folder/build.prop /system/
___
COPY THE NEW update.xml TO SYSTEM :
Code:
cp /sdcard/Folder/update.xml /system/
___
Reboot:
Code:
reboot
___
And done!
If you want to update:
1. Start Terminal Emulator
2. Type su and press ENTER
3. Type update and press ENTER
4. Updating...
Customize it, and add more functions, but I'll update this script anyway.
___
My "Update" in /system/bin/ looks like this:
Code:
#!/system/bin/sh
id=`id`; id=`echo ${id#*=}`; id=`echo ${id%%\(*}`; id=`echo ${id%%gid*}`
if test "$id" != "0" && test "$id" != "root"; then
echo " You are not running this script as root."
exit 0
fi
busybox mount -o remount,rw /system
wget -q http://cloudos.square7.ch/Update/One/version.xml -P /sdcard/CloudOS/update/
if diff /sdcard/CloudOS/update/version.xml /system/update.xml
then
echo "No update available"
echo "Aborted"
exit 0
else
echo "Update available!"
fi
rm /sdcard/CloudOS/update/*
wget -q http://cloudos.square7.ch/Update/One/update.zip -P /sdcard/CloudOS/update/
unzip /sdcard/CloudOS/update/update.zip /sdcard/CloudOS/update/
chmod 0777 /sdcard/CloudOS/update/updater.sh
sh /sdcard/CloudOS/update/updater.sh
And my updater.sh:
Code:
#!/system/bin/sh
cp -f /sdcard/CloudOS/update/build.prop /system/
cp -f /sdcard/CloudOS/update/update.xml /system/
reboot
If you want to use my work, then your work must be open-source, too!
CHANGELOG:
06/08/12:
- Added "Check root before updating"-feature
04/08/12:
- Initial release
Plans:
- Better thread-design
- Improved script
Smart kid, LOL XD
Nice work kid, this is actually cool!
Soon we shall have ROMs 10mb-30mb
This is what i want to tell you: made a useful thing for the community.
Great Job!
thachtunganh said:
This is what i want to tell you: made a useful thing for the community.
Great Job!
Click to expand...
Click to collapse
And I did it
Will upload next update tomorrow, changelog:
- Check root before updating
- Will upload completed files
- Better thread-design
Gesendet von meinem LG-P500 mit Tapatalk 2
Tach is right you have contributed much to this subforum
Sorry for my english
JeduRocks said:
Tach is right you have contributed much to this subforum
Sorry for my english
Click to expand...
Click to collapse
He said great job, I don't understand what you mean...
fd1999 said:
He said great job, I don't understand what you mean...
Click to expand...
Click to collapse
Use Google translate xd
Enviado desde mi LG-P500 usando Tapatalk 2
JeduRocks said:
Use Google translate xd
Enviado desde mi LG-P500 usando Tapatalk 2
Click to expand...
Click to collapse
Lol, I can speak English as well, but this is my first post in this subforum (Original Android development) and you said I posted to much in this subforum ?!?
fd1999 said:
Lol, I can speak English as well, but this is my first post in this subforum (Original Android development) and you said I posted to much in this subforum ?!?
Click to expand...
Click to collapse
He said you contributed much to this subforum!! It's a good thing keep it up little buddy :thumbup:
Sent from my LG-P500 using xda premium
thedoginme87 said:
He said you contributed much to this subforum!! It's a good thing keep it up little buddy :thumbup:
Sent from my LG-P500 using xda premium
Click to expand...
Click to collapse
Okay, I misread his post
I thought he said 'posted' instead 'contributed', I was scrolling at the moment
How you did to create the version.xml file on the server? And in what server you bases the update? Magic update?
Enviado desde mi Galaxy Nexus usando Tapatalk HD
fd1999 said:
Lol, I can speak English as well, but this is my first post in this subforum (Original Android development) and you said I posted to much in this subforum ?!?
Click to expand...
Click to collapse
Subforum: LG Optimus One
Enviado desde mi LG-P500 usando Tapatalk 2
edinrh said:
How you did to create the version.xml file on the server? And in what server you bases the update? Magic update?
Enviado desde mi Galaxy Nexus usando Tapatalk HD
Click to expand...
Click to collapse
Just create a version.xml, type in the,latest available version (e.g. 1.0.1) and upload it. Square7, I said. Read my post.
Script updated, Changelog:
- Added "Check root before updating"-feature
EDIT: I'm senior member, now
fd1999 said:
Just create a version.xml, type in the,latest available version (e.g. 1.0.1) and upload it. Square7, I said. Read my post.
Click to expand...
Click to collapse
My question is: how to upload that file on Square7?
Enviado desde mi Galaxy Nexus usando Tapatalk HD
edinrh said:
My question is: how to upload that file on Square7?
Click to expand...
Click to collapse
Well, you apparently missed the purpose of this script. :laugh:
Just read...
edinrh said:
My question is: how to upload that file on Square7?
Enviado desde mi Galaxy Nexus usando Tapatalk HD
Click to expand...
Click to collapse
You can google for it, but some guys are too lazy...
So, create a server on Square7 and download FileZilla or also another FTP Client.
Start FileZilla, and configure it like this(in this example, my server is "cloudos.square7.ch"):
Server: cloudos.square7.ch
Username: cloudos
Password: Don't think I'm stupid
Port: Don't enter anything
And press "Connect". Now you have access to the server. On the left side, you see your files, located on the PC.
On the right site, the files on your server. On the left site, search for the file you want to upload and douple-click it
or drag & drop it to your server. Done!
Hello.
1. I can't find development/enable USB debugging. Where did it go?
2. I found '/sys/module/sync/parameters/fsync_enabled'.
I assume kernel support for fsync control is available.
Is that exposed in a UI? Or do I have to set it via a script?
What is the recommended way to execute stuff at start up? [I don't see /etc/rc.local available ]
BTW, executing 'exit' in terminal seems to get stuck here. Can someone confirm?
* I'm experience in GNU/Linux and *nix in general but I'm new to Android.
tf700_13 said:
Hello.
1. I can't find development/enable USB debugging. Where did it go?
2. I found '/sys/module/sync/parameters/fsync_enabled'.
I assume kernel support for fsync control is available.
Is that exposed in a UI? Or do I have to set it via a script?
What is the recommended way to execute stuff at start up? [I don't see /etc/rc.local available ]
BTW, executing 'exit' in terminal seems to get stuck here. Can someone confirm?
* I'm experience in GNU/Linux and *nix in general but I'm new to Android.
Click to expand...
Click to collapse
1. Go to settings and about, click the build number 7 times and developer options will be made available.
2. Usually set it via a startup script. Assuming the cm10 kernel supports it.
sbdags said:
1. Go to settings and about, click the build number 7 times and developer options will be made available.
Click to expand...
Click to collapse
Done! Thanks.
2. Usually set it via a startup script. Assuming the cm10 kernel supports it.
Click to expand...
Click to collapse
Is there a recommended way/app to manage startup scripts?
And just to make sure, /sys/module/sync/parameters/fsync_enabled is set to 1. I need to set it to 0 to disable fsync (not some other value), right?
tf700_13 said:
Done! Thanks.
Is there a recommended way/app to manage startup scripts?
And just to make sure, /sys/module/sync/parameters/fsync_enabled is set to 1. I need to set it to 0 to disable fsync (not some other value), right?
Click to expand...
Click to collapse
Yes set it to 0. Just echo it in a script. In my ROM I use init.d enabled scripting to achieve this. I think cm uses the same theory but does it slightly differently.
I'll post my script later when I get home.
sbdags said:
Yes set it to 0. Just echo it in a script. In my ROM I use init.d enabled scripting to achieve this. I think cm uses the same theory but does it slightly differently.
I'll post my script later when I get home.
Click to expand...
Click to collapse
I know how to write scripts And yes, /etc/init.d/ is used.
So all I need is adding a file there (e.g. 80disablefsync) with content:
Code:
#!/system/bin/sh
echo 0 > /sys/module/sync/parameters/fsync_enabled
Assuming that is correct, I'm stuck now at writing a file there.
The *nix way 'mount -o remount,rw /' is not working.
Read-only file system error didn't go away.
tf700_13 said:
The *nix way 'mount -o remount,rw /' is not working.
Read-only file system error didn't go away.
Click to expand...
Click to collapse
You have to remount /system, not /.
Another workaround: You could use /data/userinit.d instead (don't know if that is the exact name).
_that said:
You have to remount /system, not /.
Another workaround: You could use /data/userinit.d instead (don't know if that is the exact name).
Click to expand...
Click to collapse
I could have sworn I didn't see a mount point for /system earlier.
Anyway all is good now.
Thank you guys.
The only problem remaining is C-d not exiting in terminal. and executing exit afterwards gets stuck. But that's not a big deal.
tf700_13 said:
The only problem remaining is C-d not exiting in terminal. and executing exit afterwards gets stuck. But that's not a big deal.
Click to expand...
Click to collapse
Preferences -> Close window on exit [x] ?
_that said:
Preferences -> Close window on exit [x] ?
Click to expand...
Click to collapse
That's already checked and works.
The problem is, CTRL-d is an escape sequence that should exit and it's not working when you're root.