Is there a way to fix all permissions on init.d script ? - Samsung Galaxy S (4G Model)

Hi,
I am trying Beta 3.1 SMS KJ6 kernel.
I went to General Section -> "random reboots" after having some, and was told
that it was caused due to inability to write to system, so i was told to add
systemctl init.d script this line :
mount -oremount,rw /dev/block/stl9 /system
just before line
sysctl -p
Other than that i need to "fix permissions".
but doing this once did not prevent further reboots.
My question is : Is there a way to fix all permissions on init.d script,
so it will be done on every boot ?
will it even help ?
Thanks.

itzik2sh said:
Hi,
I am trying Beta 3.1 SMS KJ6 kernel.
I went to General Section -> "random reboots" after having some, and was told
that it was caused due to inability to write to system, so i was told to add
systemctl init.d script this line :
mount -oremount,rw /dev/block/stl9 /system
just before line
sysctl -p
Other than that i need to "fix permissions".
but doing this once did not prevent further reboots.
My question is : Is there a way to fix all permissions on init.d script,
so it will be done on every boot ?
will it even help ?
Thanks.
Click to expand...
Click to collapse
You can if you know what all permissions are 'fixed' when CWM does that. I'm sure by looking at CWM source we could figure it out then add the necessary commands after the mount and before the sysctl -p line.

itzik2sh said:
Hi,
I am trying Beta 3.1 SMS KJ6 kernel.
I went to General Section -> "random reboots" after having some, and was told
that it was caused due to inability to write to system, so i was told to add
systemctl init.d script this line :
mount -oremount,rw /dev/block/stl9 /system
just before line
sysctl -p
Other than that i need to "fix permissions".
but doing this once did not prevent further reboots.
My question is : Is there a way to fix all permissions on init.d script,
so it will be done on every boot ?
will it even help ?
Thanks.
Click to expand...
Click to collapse
You can try putting this into a script and calling it in your init.d
http://forum.xda-developers.com/showthread.php?t=1221591
Although I believe permissions shouldn't be lost when you reboot, so your problem is likely something else.

ignacioxd said:
You can try putting this into a script and calling it in your init.d
http://forum.xda-developers.com/showthread.php?t=1221591
Although I believe permissions shouldn't be lost when you reboot, so your problem is likely something else.
Click to expand...
Click to collapse
+1 to that.

Hi
I saw that post...
Unlike mounting system as read/write, which is really easy to validate,
how can i know it was actually performed ?

You can manually changea file you know is supposed to be fix in the script b4 running it, than run it and see if it changed back
Sent from my SGH-T959V using XDA App

Thanks mate, I'll give it a try...
Sent from me

Welcome :-D
Sent from my SGH-T959V using XDA App

itzik2sh said:
Hi,
I am trying Beta 3.1 SMS KJ6 kernel.
I went to General Section -> "random reboots" after having some, and was told
that it was caused due to inability to write to system, so i was told to add
systemctl init.d script this line :
mount -oremount,rw /dev/block/stl9 /system
just before line
sysctl -p
Other than that i need to "fix permissions".
but doing this once did not prevent further reboots.
My question is : Is there a way to fix all permissions on init.d script,
so it will be done on every boot ?
will it even help ?
Thanks.
Click to expand...
Click to collapse
Doesnt Valhalla Final already do that? i checked whitehawkx OP and that is included in the features.

Related

[DEV] Script for tweaks (version 1.02) 18-12-2010

Here is a script i've made (had nothing to do, so...).
Phone must be rooted and have busybox installed.
What first menu looks like:
1 - enable/disable hardware acceleration
2 - enable/disable jit
3 - enable/disable stagefright player
4 - change heapsize
s - show status
r - revert to original configuration
q - quit (don't forget to reboot your phone!)
==================
enter your option:
Click to expand...
Click to collapse
Download:
http://www.4shared.com/file/gApTB6EG/tweaks.html
md5 b0865d9de67a82215913512cb644211d
Just copy the file to your sdcard. Then in a terminal emulator run:
su
cat /sdcard/tweaks > /data/tweaks
rm /sdcard/tweaks
cd /data/
./tweaks
If it doesn't run, type first:
chmod 755 /data/tweaks
Additional notes:
Script does not work if run from sdcard, must be in /data/ or /system/ (this one goes to allsalvati for testing)
---
If anything is wrong i will fix it, but only if you give me feedback
If you know any good tweaks, say it and i'll add them.
---
Changelog:
version 1.02:
backup/restore added
version 1.01d:
working again. sorry for the mess...
version 1.01c:
nothing new. just rearranging code
version 1.01b:
messages were not staying in output. fixed
version 1.01a:
small fix. v1.01 was not working
version 1.01:
added status menu
ruigui said:
Here is a script i've made (had nothing to do, so...). Phone must have busybox.
Download:
http://www.4shared.com/file/gApTB6EG/tweaks.html
md5 ea568c399c67ecd87db0dd790cdf0e93
Just copy the file to your sdcard. Then in a terminal emulator run:
cd /sdcard/
./tweaks
If it doesn't run, type first:
chmod 777 /sdcard/tweaks
Please give me some feedback. I don't own the phone so i can't test.
Click to expand...
Click to collapse
what the script does?
So script should be able to do:
enable/disable hw acceleration
enable/disable jit
enable/disable stagefright player
change heapsize
Yes. For now it's what it does.
The ideia is to be able to enable/disable a certain tweak, without reflashing zips, and rewriting files in phone.
But i need some feedback to know if it is working. I can't test it.
It will only change values in /data/local.prop, nothing else.
It seems that it is well written, so I will try that and let you know what's happened.
Thanks for testing. I'm still waiting to have some money so i can buy this phone...
Meanwhile, i'm "playing" with ROMs and files. I'm not good at scripting, but i'm trying to learn while doing something useful.
How much did you increase the heap size?
domenic_s said:
How much did you increase the heap size?
Click to expand...
Click to collapse
I didn't increase it. Script shows this message:
"default=24, recommended=32"
"enter new heapsize value (1-64): "
You can enter any value between 1 and 64.
If you enter any other value, or a string, character, symbol... script will show this message:
"wrong value"
"please input a value between 1 and 64"
For those who don't feel like editing this themselves this is great. Thanks for releasing it for people to try out more tweaks on stock ROMs.
i'm trying to run this script and gives me the following message: ./tweaks: permission denied
Before anything i typed su, then chmod 777 and it gave me error.
It should work be working...
Anyone else confirms this issue? Is this script running or not?
If it is working and there are more tweaks, i can easilly add them to the script.
If this is an isolated case, i really can't help. I don't own an android phone (yet), so i can't test....
allsalvati do you have busybox installed?
No, i don't.
Sent from my LG-P500h using XDA App
That may be your issue.
You must mount /system/ as read-write, then copy busybox binary to /system/xbin/, then run these commands in terminal emulator:
su
cd /system/xbin
/system/bin/chmod 755 busybox
./busybox --install -s /system/xbin
After that you can mount /system/ as read only again, and reboot your phone.
I don't know if there is another way to install it that is easier.
I downladed busybox installer from market and the app says that was installed. The. /tweaks gives me the same message.
How do i test if busybox was installed right?
Sent from my LG-P500h using XDA App
I found this:
That is a problem, you cannot chmod a script to executable on the SD card. (well some things can, but 99% no) the system is designed to prevent u executing scripts from an SD card
cp it to /system/xbin or /system/bin.
Or if u hate to see it in system', use /data/
THEN chmod it. should be fine to run
Click to expand...
Click to collapse
Try to copy the file to /data/ (so you don't mess with /system/), and then try to run it with:
cd /data/
chmod 777 tweaks
./tweaks
It should not need to be run as root
Moved to /data and worked.
I changed heap size to 32 and disabled hardware accelaration just to test.
With hw acc - 981 on Quadrant
Without - 820
So i think this is working.
Perhaps you should print the values so the user can see what is enabled or not before apply.
Thanks for your help
Sent from my LG-P500h using XDA App
Can you test something for me?
Make sure you have hardware acceleration disabled, and reboot you phone.
Then open terminal and run:
getprop | grep hw (see what it outputs)
then run the script, enable hardware acceleration on it, but DON'T reboot your phone yet.
Then exit script, and run again:
getprop | grep hw
Has the value changed, or is it the same?
I need to know if the system assumes immediately any changes (although they may not be functional until reboot).
This is needed to work on your request.
allsalvati said:
Perhaps you should print the values so the user can see what is enabled or not before apply.
Click to expand...
Click to collapse
I'll work on that and post an update after someone tries what i asked above.
Thanks for testing
EDIT: to test benchmarks, enable/disable jit. It gives greater differences in values
I tried what you say and both outputs are the same:
$getprop | grep hw
[debug.sf.hw]: [0]
[hw.keyboards.65537.devname]: [7k_handset]
[hw.keyboards.65540.devname]: [thunder_keypad]
[hw.keyboards.65541.devname]: [touch_mcs6000]
[hw.keyboards.65542.devname]: [atcmd_virtual_kbd]
Edit: Tested disabling JIT and it worked. Linpack Before 7.35 - After 4.3
So i can't rely on getprop to check current values...
If anything is changed, getprop won't give the right output till reboot.
Damn... Script was almost updated. Now i must find a new way and redo this section.
Thanks for testing again
EDIT:
New version for download at first post. status menu added.
I think it's all ok.
It seems work fine on my phone. But I can't see the status. When I choose to see current status or status after reboot, the screen of my emulator returns too fast to the selection menu (show curent status or after reboot) and I can't see anything !

[Q] some questions about the linux installer

hi there
this is about the "linux installer" app you can find on the marked.
i finally managed to install a debian squeeze into my ext2 partition on the sd card.
i managed to get my ext2 partition mounted on boot thanks to this guy after i read this post.
(actually i had to change line 2 and 7 to "/dev/stl12 /system" since im running his script on a samsung galaxy ace s5830)
in the installer i went to the settings did these changes:
install into: /data/sdext2
devicename: mmcblk0p2
with this configuration the installation process went fine.
using the android terminal app i can run my installation typing "linuxboot" but i
get soum mount errors on startup.
so i looked for the linuxboot.sh from the android terminal and located it in
/system/bin/linuxboot.sh
so far.
did anyone get this far and got the same errors?
i not shure that this is the reason for the mount problems, but the file seems to still contain some standartvalues for some reason.
for example theres this line:
export mnt=/data/data/com.galoula.LinuxInstall/mnt
Click to expand...
Click to collapse
maybe i should change it to "/data/sdext2" ? since this is what i did in the settings as well?
however theres no chance to do any changes on this file anyway since the prompt tells me that i have a readonly filesystem.
my phone runs android 2.3.3 and is rooted using this file (found on in this post), shouldnt i have write acces to the files?
EDIT:
*sigh ..ve been so stupid
to get write acces i need to remount the system folder as i did in the installation process before
su
mount -o remount,rw /dev/stl12 /system
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?p=16961006
3.3 is out. Please update, and contact me by email if any trouble. [email protected]
Galoula made a huge update; I did all translations and debug. New tutorial, new quick installation guide.
Please update, and send an email if you still get errors.
Do not leave your /system writable; after you have changed what you wanted, you shall remount ro ...

[MOD/APP] ScriptFusion (Complete Modification)

This is another of the projects I have done that was restricted to the Thunderbolt forum, but is actually compatible with quite a few devices, if not all. Some features only work for the Thunderbolt, but the script and application verify compatibility themselves.
I do not place any restriction on use of the script, components, or functions. All I ask is that the script is not used in the development of similar applications. Whether or not I am credited is at the discretion of the developer and their personal moral obligations. While this project does not include any GPL code, the theory is still relevant:
The GPL imparts great freedom for GPL end users. It ensures innovation is never stifled and no project is dependent upon any single developer.
Click to expand...
Click to collapse
Full Explanation / FAQs
Original Thunderbolt Thread
ScriptFusion AutoBot
Available on Twisted Sandbox and Android Market
This application will install the script, and if purchased from market, or unlocked with the Twisted Sanbox Shovel, it will also provide an online database of tweaks and scripts that can be run, or linked together and run, from directly inside the application.
DOWNLOADS:
AUTOUPDATE - Once the full package is installed, it will update itself (if needed) whenever it is launched. The only time the script alone needs to be reinstalled is when a new ROM is installed.
Busybox Binaries
http://twisted.dyndns.tv/BusyboxBin/
Right click / long click - Save as / save link
Script ONLY
Live script install
http://db.tt/u2gCqNO
Open terminal
Code:
su
bash /sdcard/location of script/speedtweak.sh fusion
This is the live equivalent of flashing ScriptFusion in recovery and would be considered a full install.
Once fully installed
Open terminal
Code:
su
speedtweak.sh
Live script removal
Open terminal
Code:
su
speedtweak.sh guilty
This is the live equivalent of flashing Guilty Verdict in recovery and would be considered a full removal.
Sent from my ADR6400L using Tapatalk
Just a quick breakdown for anyone asking "What about 98kickasskernel? Or "what about juwe RAM optimization?" "Don't they do the same thing?" In theory, sure... For RAM and sysctl values. Ever wonder why there are two versions of the 98kernel script to prevent bootloops? That is one key difference. This system doesn't just throw values at your device, or follow an "if you bootloop" methodology. Sure some things may cause loops because there is no reliable check (See odex/dalvikvm), but nothing is just hard-coded.
Another big difference is that those scripts cannot change screen density, tweak the CPU, change the scheduler, profile frequencies, and fix broken WiFi all in one run.
Complete means complete, simple as that. Customization means user determined customization, not what one developer recommends. Recommendations will help through the process, but they remain exactly that. There are no rules. Have some fun...
Sent from my ADR6400L using Tapatalk
Hi. Thanks for sharing.
I first read, re-read the OP and decided to download and try the trial app from the market: https://market.android.com/details?id=com.twisted.zero&feature=search_result. But the app just crashes every time when i try to launch(it gives the error: Data and sdcard required!). I am on custom ROM Froyo 2.2.2 with apps on ext2 using data2sd(both apps were on phone memory).
Then i re-re-read the OP and decided to try the script way first via Script Manager and then(if not lucky) via terminal. I had no luck with Script Manager(runing root mode). The script dont install and gives the errors:
wget: bad address '64.121.156.138:8080'
wget: can't connect to remote host (64.121.156.138:8080)
Unnable to chmod /system/xbin/wget: No such file
Invalid binaries. Please retry.
Edit: Checking the filesystem i see that at least one thing the script/app have done. Has deleted all my previous scripts on /system/etc/init.d and now there are 3 new files: 00twist_override, 01vdd_levels and 02sched_choice. Same files are now on /etc/init.d.
Same error with terminal emulator. Maybe i am very dumb and i miss something. What i am doing wrong?
Thanks in advance!
f1ng3r said:
Hi. Thanks for sharing.
I first read, re-read the OP and decided to download and try the trial app from the market: https://market.android.com/details?id=com.twisted.zero&feature=search_result. But the app just crashes every time when i try to launch(it gives the error: Data and sdcard required!). I am on custom ROM Froyo 2.2.2 with apps on ext2 using data2sd(both apps were on phone memory).
Then i re-re-read the OP and decided to try the script way first via Script Manager and then(if not lucky) via terminal. I had no luck with Script Manager(runing root mode). The script dont install and gives the errors:
wget: bad address '64.121.156.138:8080'
wget: can't connect to remote host (64.121.156.138:8080)
Unnable to chmod /system/xbin/wget: No such file
Invalid binaries. Please retry.
Edit: Checking the filesystem i see that at least one thing the script/app have done. Has deleted all my previous scripts on /system/etc/init.d and now there are 3 new files: 00twist_override, 01vdd_levels and 02sched_choice. Same files are now on /etc/init.d.
Same error with terminal emulator. Maybe i am very dumb and i miss something. What i am doing wrong?
Thanks in advance!
Click to expand...
Click to collapse
Your previous scripts are safe. They will be in data/data/scriptfusion if install didn't complete (in which case you may want to move them so a new install doesn't overwrite them) or in SDcard/ScriptFusion/backup
Alright, so a couple things happened all at once that caused your error, but to keep it simple... My server takes on the traffic of a corporate sized one packed into two computers. Occasionally I have to reboot. Your download happened during the 15 minutes or so it went down. Give it another try and let me know if it doesn't fix itself.
Sent from my ADR6400L using Tapatalk
twistedumbrella said:
Your previous scripts are safe. They will be in data/data/scriptfusion if install didn't complete (in which case you may want to move them so a new install doesn't overwrite them) or in SDcard/ScriptFusion/backup
Alright, so a couple things happened all at once that caused your error, but to keep it simple... My server takes on the traffic of a corporate sized one packed into two computers. Occasionally I have to reboot. Your download happened during the 15 minutes or so it went down. Give it another try and let me know if it doesn't fix itself.
Sent from my ADR6400L using Tapatalk
Click to expand...
Click to collapse
I keep getting this error
$ export PATH=/data/local/bin:$PATH
$su
# bash /sdcard/speedtweak.sh fusion
unknown option -- cBusyBox v1.16.2androidfull (2010-08-01 14:57:25 EDT) multi-call binary.
Usage: stat [OPTIONS] FILE...
Display file (default) or filesystem status
Options:
-f Display filesystem status
-L Follow links
-t Display info in terse form
unknown option -- cBusyBox v1.16.2androidfull (2010-08-01 14:57:25 EDT) multi-call binary.
Usage: stat [OPTIONS] FILE...
Display file (default) or filesystem status
Options:
-f Display filesystem status
_ _ ...
___ \\-//` o,*,(o o)
(o o) (o o) 8(o o)(_)Ooo
ooO--(_)--Ooo-ooO--(_)--Ooo-ooO-(_)---Ooo
____ __ __ ___ ____ _____ _ _
( ___)( )( )/ __)(_ _)( _ )( \( )
)__) )(__)( \__ \ _)(_ )(_)( ) (
(__) (______)(___/(____)(_____)(_)\_)
Android user detected! Inverting reality...
cp: can't stat '/system/customize/speedtweak.sh': No such file or directory
/sdcard/speedtweak.sh: line 332: wget: command not found
chmod: speedtweak.sh: No such file or directory
unknown option -- cBusyBox v1.16.2androidfull (2010-08-01 14:57:25 EDT) multi-call binary.
AutoUpdate Complete. Restarting...
Restart by pressing <Up>, <Enter>
sh: Can't open /system/customize/speedtweak.sh
#
Sent from my GT540 using XDA Premium App
eoghan2t7 said:
I keep getting this error
$ export PATH=/data/local/bin:$PATH
$su
# bash /sdcard/speedtweak.sh fusion
unknown option -- cBusyBox v1.16.2androidfull (2010-08-01 14:57:25 EDT) multi-call binary.
Usage: stat [OPTIONS] FILE...
Display file (default) or filesystem status
Options:
-f Display filesystem status
-L Follow links
-t Display info in terse form
unknown option -- cBusyBox v1.16.2androidfull (2010-08-01 14:57:25 EDT) multi-call binary.
Usage: stat [OPTIONS] FILE...
Display file (default) or filesystem status
Options:
-f Display filesystem status
_ _ ...
___ \\-//` o,*,(o o)
(o o) (o o) 8(o o)(_)Ooo
ooO--(_)--Ooo-ooO--(_)--Ooo-ooO-(_)---Ooo
____ __ __ ___ ____ _____ _ _
( ___)( )( )/ __)(_ _)( _ )( \( )
)__) )(__)( \__ \ _)(_ )(_)( ) (
(__) (______)(___/(____)(_____)(_)\_)
Android user detected! Inverting reality...
cp: can't stat '/system/customize/speedtweak.sh': No such file or directory
/sdcard/speedtweak.sh: line 332: wget: command not found
chmod: speedtweak.sh: No such file or directory
unknown option -- cBusyBox v1.16.2androidfull (2010-08-01 14:57:25 EDT) multi-call binary.
AutoUpdate Complete. Restarting...
Restart by pressing <Up>, <Enter>
sh: Can't open /system/customize/speedtweak.sh
#
Sent from my GT540 using XDA Premium App
Click to expand...
Click to collapse
Seems wget may have corrupted. All issue reports relate to bad download ( which once it is installed don't happen) time to look into it...
Sent from my ADR6400L using Tapatalk
twistedumbrella said:
Seems wget may have corrupted. All issue reports relate to bad download ( which once it is installed don't happen) time to look into it...
Sent from my ADR6400L using Tapatalk
Click to expand...
Click to collapse
Stupid mistake. Switched the server port on the server, but never updated the new value to the script. Download updated. Install should now update wget and proceed normally. Sorry.
Sent from my ADR6400L using Tapatalk
twistedumbrella said:
Stupid mistake. Switched the server port on the server, but never updated the new value to the script. Download updated. Install should now update wget and proceed normally. Sorry.
Sent from my ADR6400L using Tapatalk
Click to expand...
Click to collapse
Im still getting invaild binarys error.
Sent from my GT540 using XDA Premium App
eoghan2t7 said:
Im still getting invaild binarys error.
Sent from my GT540 using XDA Premium App
Click to expand...
Click to collapse
Alright, let me look into something that might avoid having to update busybox
Sent from my ADR6400L using Tapatalk
Alright, with all the recent edits, it should work to get a system with busybox 1.6.1 and up updated and running. A lot of other scripts stay at 1.6.2, but this uses 1.9 much like newer ROMs. I plan to drop back busybox, see if all the commands work, and make that part optional, but a lot of ROMs use truncated versions, so I am still working out a failsafe.
Sent from my ADR6400L using Tapatalk
Can I have a few people do the following command and post the output? Getting a baseline for a new verify
busybox | busybox head -n 1 | busybox awk '{ print $2 }'
Sent from my ADR6400L using Tapatalk
Removed the necessity of having certain versions of busybox, but with that it is fair warning that ROMs with truncated versions will not work.
Changed up the tweak menu option to be a little easier understood. While the +/- were fully explained, on smaller text sizes they were impossible to differentiate.
Sent from my ADR6400L using Tapatalk
Removed. All good now.
I got it up and running. I have a few questions. I purchased the autobot off one of the links you provided. I got working. I made a slight yet big mistake. I was looking through the speedtweak menu and somehow changed the voltages on something by mistake. I couldn't read what was on the bottom of the terminal emulator and screwed something up good. After that, the phone was really crawling and scriptfusion wouldnt open up. I just restored my old backup and then reinstalled my new rom. I got scriptfusion back on my phone but is there supposed to be an app that takes you directly into scriptfusion? I know I can get there from the terminal emulator but i was able to click on an app before to get in. Now if I click on it, it just force closes. Second question is, if I am going to be playing around with a kernel, is it best to just back it up first before I modify? I'm on gingeritis 3D that has Ziggy's latest baked in. It would be nice if I screwed something up that I could just reflash the kernel but he doesn't have the kernel by itself floating around. It seems like the backup and restore worked. I backed it up, played around a bit and tested my results then I restored and it seemed to take the kernel back to its normal state. Is this the way I should do it? Also, can you backup more than one file at a time?
I also don't know what happened to my min/max frequencies. I now only have :
1) 192000
2) 245760
3) 368640
4) 768000
5) 806400
6) 883200
7) 960000
8) 1036800
This is all I have available. I had more before I had to reflash my rom. I'm sure its my fault. How can I get the other options back? I also have enabled swap and I can see if on there but it is not being used.
ercDROID said:
I got it up and running. I have a few questions. I purchased the autobot off one of the links you provided. I got working. I made a slight yet big mistake. I was looking through the speedtweak menu and somehow changed the voltages on something by mistake. I couldn't read what was on the bottom of the terminal emulator and screwed something up good. After that, the phone was really crawling and scriptfusion wouldnt open up. I just restored my old backup and then reinstalled my new rom. I got scriptfusion back on my phone but is there supposed to be an app that takes you directly into scriptfusion? I know I can get there from the terminal emulator but i was able to click on an app before to get in. Now if I click on it, it just force closes. Second question is, if I am going to be playing around with a kernel, is it best to just back it up first before I modify? I'm on gingeritis 3D that has Ziggy's latest baked in. It would be nice if I screwed something up that I could just reflash the kernel but he doesn't have the kernel by itself floating around. It seems like the backup and restore worked. I backed it up, played around a bit and tested my results then I restored and it seemed to take the kernel back to its normal state. Is this the way I should do it? Also, can you backup more than one file at a time?
I also don't know what happened to my min/max frequencies. I now only have :
1) 192000
2) 245760
3) 368640
4) 768000
5) 806400
6) 883200
7) 960000
8) 1036800
This is all I have available. I had more before I had to reflash my rom. I'm sure its my fault. How can I get the other options back? I also have enabled swap and I can see if on there but it is not being used.
Click to expand...
Click to collapse
From everything you said, it sounds like the restore may have given you a different kernel. The kernel frequencies are read right from system. The force close should fix itself by clearing data for the app and letting it reinstall the script. You don't necessarily need to back up anything if you are near a computer because the kernel itself is never actually edited. Restore is as easy as using adb to remove /system/init.e/00twist_override Editing on the go, a recent backup of system only will revert any changes. If you enabled swap and your getting zeros either you need to reboot or the system hasn't needed the space yet.
Sent from my ADR6400L using Tapatalk
Wow that's one intense script.
It's a huge compliment you gave me when you said I motivated you in some way.
Thanks man... I'm practically speechless
zeppelinrox said:
Wow that's one intense script.
It's a huge compliment you gave me when you said I motivated you in some way.
Thanks man... I'm practically speechless
Click to expand...
Click to collapse
Thanks. It was very true. Reading over your work made me realize I was focusing too much on single items and not the whole process.
Sent from my ADR6400L using Tapatalk
Well... looks like you did it in spades
Lots of ideas floating around. New concepts for better cooperation between the app and the script. Better methods for quick scripts. New menus and graphic interface plans. It's slowly building up.
Sent from my ADR6400L using Tapatalk

[SOLVED] [Q] [CM 10.2] Two questions about USB debugging and fsync control

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.

/sbin/ric daemon

I rooted my Xperia-L using getroot method. There is a leftover from the method located at /etc/init.d/00stop_ric script.
Code:
#!/system/bin/sh
/system/xbin/busybox pkill /sbin/ric
mount -o remount,rw /
rm /sbin/ric
mount -o remount,ro /
/system/xbin/busybox pkill /sbin/ric
Does anybody have any idea what is this ric daemon for?
Its not a leftover, its a script to stop RIC from launching, its a protection thingy added by sony to prevent anybody writing to /system
TakuyaZ said:
Its not a leftover, its a script to stop RIC from launching, its a protection thingy added by sony to prevent anybody writing to /system
Click to expand...
Click to collapse
Is it added by Sony itself? Do you mean that the script was there before even I applied getroot method?
And what does this RIC daemon do?
Holmes.Sherlock said:
Is it added by Sony itself? Do you mean that the script was there before even I applied getroot method?
And what does this RIC daemon do?
Click to expand...
Click to collapse
I said already, RIC protects the system.
The root adds it. So no reboot will occur in system mount
TakuyaZ said:
I said already, RIC protects the system.
The root adds it. So no reboot will occur in system mount
Click to expand...
Click to collapse
Does RIC cause reboot if it detects write to system partition?
And, why is it being killed twice, once at the start and once at the end?
Code:
/system/xbin/busybox pkill /sbin/ric
Holmes.Sherlock said:
Does RIC cause reboot if it detects write to system partition?
And, why is it being killed twice, once at the start and once at the end?
Code:
/system/xbin/busybox pkill /sbin/ric
Click to expand...
Click to collapse
Pretty much, yes
Maybe it's a mistake, or it needs to killed twice, no idea on that
TakuyaZ said:
Pretty much, yest
Click to expand...
Click to collapse
Since I have rooted mine, rooting method has deleted the binary. Is there any means to get the binary so that I can disassemble it and have a look? Or, is the source available anywhere? I assume, it's not a standard *NIX utility.
Holmes.Sherlock said:
Since I have rooted mine, rooting method has deleted the binary. Is there any means to get the binary so that I can disassemble it and have a look? Or, is the source available anywhere? I assume, it's not a standard *NIX utility.
Click to expand...
Click to collapse
The binary should be there. Since the script kills it every boot
TakuyaZ said:
The binary should be there. Since the script kills it every boot
Click to expand...
Click to collapse
That's a mystery. Because, Xperia-L stock firmware does not have init.d support. Apparently, the script is useless.
http://forum.xda-developers.com/showpost.php?p=52669470&postcount=1
Holmes.Sherlock said:
That's a mystery. Because, Xperia-L stock firmware does not have init.d support. Apparently, the script is useless.
http://forum.xda-developers.com/showpost.php?p=52669470&postcount=1
Click to expand...
Click to collapse
You can try by making a echo command in a script for Init.d
TakuyaZ said:
You can try by making a echo command in a script for Init.d
Click to expand...
Click to collapse
I can't, because I have already enabled Init.d support by using Init.d Toggler.
It's because of to get rid of Link2SD bootloop problem. Detailed here.

Categories

Resources