How to delete script from init.d - Desire Q&A, Help & Troubleshooting

Hello all, I have the latest "]RUNNYCRUX RSK TEAM ★ with AMAZE CAM" rom on my phone. I'm trying to enable logcat because I need to to debug an application I'm developing. I have commented all parts in external scripts that deal with logcat but there is one left in init.d. the 02Logger which does an rm on the logcat file. How can I disable or delete this script? I get a "read only file system" when I'm trying to delete it.
Is it possible or do I have to delete it before flashing the rom?

U can simply remove it from .zip before flashing ROM, or use file explorer with SU rights like Root Explorer to mount system r/w and remove the script within ROM.
This is not forum for asking questions btw, it's development section..

Code:
su
mount -o remount rw system
cd system/etc/init.d
rm (not sure if have to include -rf) 02logger
Done
Sent from my HTC Desire using xda app-developers app

Related

Adfree not working

It's more of a question as to how some ROMs get it working without S-OFF (such as MIUI). How is this achieved?
I've made my own ROM and it's all up and running nicely and AdFree installs/updates to /data by symlinking but ads still appear. Anyone have a solution as I don't really wanna S-OFF unless absolutely neccessary (nearly bricked my phone reverting to stock last time so cba to do it again)
And I've search 'adfree not working' and didn't get an answer for this query so don't flame me - if I'd found the answer this thread wouldn't exist. If there IS a thread detailing how to fix it then if you can direct me I'd appreciate it
OK, I'm a dumbass. Changed my search criteria and found the fix but no idea how to write it into the ROM (want everything in one ROM so don't have to flash multiple ZIPs). Anyone wanna give me a hand or is it as simple as adding it the update script?
I know there is an update.zip in the old cm6 nightly thread for setting up adfree. I think it just copied hosts to data then created the link. There's no reason why you can't add this to the end of the update.zip in your rom...but clearing data will probably break adfree so you may aswell make a second update.zip for adfree so you can flash it when you clear data.
Sent from my HTC Desire using XDA App
Use root tools to manage not to get ads from the integrated ad blocker.
Sent from my LeeDroided Desire HD
I've rooted (last night) on my Desire using unrevoked 3.21 - S-On still - installed AdFree and it didn't seem to do anything - still seem to be getting Ads - is this because I need to S-Off then or install a custom rom instead of the standard 2.29.405.5?
You either need S-OFF or use a ROM which includes the symlink from the /system/etc location to your SD card. I can't work out how to include it in a ROM myself but others have successfully
Can't you push the hosts file using ADB?
ok I thought as much from my googling...
is there a 'newbie's guide to S-Off' anywhere obvious?
Just started downloading the ISO from here: http://alpharev.nl/ just couldn't see any instructions...
cheers
EddyOS said:
You either need S-OFF or use a ROM which includes the symlink from the /system/etc location to your SD card. I can't work out how to include it in a ROM myself but others have successfully
Click to expand...
Click to collapse
just use this symlink in ur Rom script.
for old update-script...
Code:
symlink /data/data/hosts SYSTEM:etc/hosts
for new edify updater-script
Code:
symlink("/data/data/hosts", "/system/etc/hosts");
for manually...
Boot into recovery. mount sdcard, system n data then
cp /sdcard/hosts /data/data/hosts
rm /system/etc/hosts
ln -s /data/data/hosts /system/etc/hosts
but u need to have hosts file in ur sdcard for that...
symlink("/data/data/hosts", "/system/etc/hosts");
I did that the other way round - d'oh!!
This happens if I run a check on the update-script:
66/120: symlink /data/data/hosts SYSTEM:etc/hosts
>> WARNING: data/data/hosts not found in working folder
And then I get this if I do add it:
66/120: symlink /data/data/hosts SYSTEM:etc/hosts
>> ERROR: system/etc/hosts found in working folder
EDIT: Sorted, deleted from /system/etc
EddyOS said:
This happens if I run a check on the update-script:
66/120: symlink /data/data/hosts SYSTEM:etc/hosts
>> WARNING: data/data/hosts not found in working folder
And then I get this if I do add it:
66/120: symlink /data/data/hosts SYSTEM:etc/hosts
>> ERROR: system/etc/hosts found in working folder
EDIT: Sorted, deleted from /system/etc
Click to expand...
Click to collapse
No.No...
just remove hosts file from system/etc and place ur ad block hosts file in data/data folder thats all...n symlink it
Code:
symlink /data/data/hosts SYSTEM:etc/hosts
if u trying to run 9. check update-script for errors than u always getting this error...
Code:
66/120: symlink /data/data/hosts SYSTEM:etc/hosts
>> WARNING: data/data/hosts not found in working folder
forget it...

[Q] Help needed

I just rooted my phone and i am trying to delete some of the apps that come with the phone.
I have found these steps in the forms but the problem is that, if I open a CMD and type this, it is not accepted.
I am guessing there is a step missing
1. type in the command line on your PC
Code:
adb shell
2. now you need to get super user rights:
Code:
su
3. you need to remount the system partition
Code:
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
4. change to the /system/app directory and you can now rename/delete all files in there
I hope you make a copy of this folder, so you can always revert back to factory default. A hardreset doesn't restaure the deletet apps, so be carefull. Also you need to check on your own IF you can really delete a app or not. I don't know what features you use.
hamd3000 said:
I just rooted my phone and i am trying to delete some of the apps that come with the phone.
I have found these steps in the forms but the problem is that, if I open a CMD and type this, it is not accepted.
I am guessing there is a step missing
1. type in the command line on your PC
Code:
adb shell
2. now you need to get super user rights:
Code:
su
3. you need to remount the system partition
Code:
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
4. change to the /system/app directory and you can now rename/delete all files in there
I hope you make a copy of this folder, so you can always revert back to factory default. A hardreset doesn't restaure the deletet apps, so be carefull. Also you need to check on your own IF you can really delete a app or not. I don't know what features you use.
Click to expand...
Click to collapse
You can use root explorer, an apk that uses superuser permissions, or, maybe you didn't reboot the cellphone, when you root your, always reboot, in order to take the "effect"
try freezing app. Easier and safer. If you want to delete. Root explorer or try super manager.
Sent from my MB525 using XDA App
I do have super user permission , but i still dont know what to do
hamd3000 said:
I do have super user permission , but i still dont know what to do
Click to expand...
Click to collapse
Did you try with Titanium Backup ?, I think you can freeze, clear data and unninstall it !, let me know if I'm wrong
Download supermanager app from market. Enable root function. Get to phone dir. System then app
Sent from my MB525 using XDA App
tava2003 said:
Did you try with Titanium Backup ?, I think you can freeze, clear data and unninstall it !, let me know if I'm wrong
Click to expand...
Click to collapse
worked like a charm

Root explorer

Hey guys.
What root file managers do you use?
I've tried both ecs and yaffs and both fail to do what I want them to, I've been trying to chmod system/app to 777 so that I can copy stuff into that folder.
Sent from my HTC Wildfire using XDA App
You need to remount the system with read-write access, then you'll be able to put apps in it.
And to answer the question, I swear by ES File Explorer. You can set hem to automaticly mount /system as read/write, so no problems with editing system files.
Erwin

after the 1 click root - not able to mount some directories in root explorer?

I used the post to install the one click root for the samsung epic 4g (sprint), and it appears to have worked. However - after entering root explorer, only some of the directories allow me to edit files. I click the remount as r/w button but nothing happens. Any thoughts?
sedric1 said:
I used the post to install the one click root for the samsung epic 4g (sprint), and it appears to have worked. However - after entering root explorer, only some of the directories allow me to edit files. I click the remount as r/w button but nothing happens. Any thoughts?
Click to expand...
Click to collapse
Are you sure you granted root permissions to root explorer when it first ran? Run the superuser app from the app drawer and see if root explorer is on the list of apps that are allowed root permission.
I just tried v2.17.2 and it works fine. I tried changing the permissions on /system/xbin/busybox, it said filesystem mounted ro, then I press the mount rw button and redid the permission change, this time it worked no problem.
Thanks for your response-
yes, when i ran root explorer it asked if i wanted to grant superuser and i said yes. some folders allow it to remount, but - say the /system/bin folder - it doesnt allow it at all.
for further background, i used the automated instructions here for my root:
http://forum.xda-developers.com/showthread.php?t=1342728
i did option A like 5 times and also did option C (as i have EK02).
When opening root explorer it tells me that i have super user permissions. one thing to note- if i go to /system/xbin, i do not see a busybox directory. is there something else i should be installing?
in fact, i cant mount anything under the system directory or sub directories, but above that, i was able to change to r/w mode. i could also mount the /vendor directory right beside the /system directory...
If you were able to remount "/" as r/w then the problem isn't with root. That is basicly an "I'm a little bit pregnant situation" Either you are or you aren't.
Now if you weren't able to get root in the first place, then I'd look at the root.
As to busybox, there is no directory. There should be a file /system/xbin/busybox Also there should be a bunch of symlinks from various apps it supports to busybox.
I see - yea i did validate that busybox is not allowing for a mount or any type of change on that file/directory including busybox but the file is present. any suggestions on what else may be locking down this system directory?
I don't know if root file explorer is implemented it's own concept of ro/rw to protect you from making mistakes or it is using the system facilities. If it is using the system facilities, then once you remount /system as rw, then everything under /system is automatically rw. It is all the same partition.
I would try it from "adb shell" (do not type $ or # symbols)
Code:
$ su
# mount -o remount,rw /system /system
# cd /system/xbin
# chmod 755 busybox
If it lets you do that with no errors, then you have remounted /system/xbin as rw and the problem is with root file explorer. For that, you'd have to check with them or someone more well-versed in why that might be failing.
i appreciate your help
I went off googling the adb stuff/installed it and java's jdk stuff. then figured out how to run that adb shell stuff and validated that it worked (permissions were changed in places that this app didnt allow). knowing that the problem is actually with root explorer helps a ton.. as I just assumed it was working

[Q] Deleting system file in terminal causes reboot

Hello all,
I'm trying to delete a system file using the Android terminal (as my end goal is to put it in a run shell task in Tasker) and it either reboots my phone or just doesn't delete.
Long story short, I'm using the Weak Sauce root method, but I do not have S-Off as I like how easy it is to undo the Weak Sauce root alone. This means, of course, I don't have immediate RW access to system. So here's what I've done:
Code:
# mount -o rw,remount -t yaffs2 /dev/block/mmcblk0p46 /system
# busybox rm -f /system/media/audio/ui/camera_click.ogg
# mount -o ro,remount -t yaffs2 /dev/block/mmcblk0p46 /system
When I do the first and last commands alone, the system mounts as RW and RO correctly, confirmed with # mount|grep system. But that middle command is the problem. Sometimes nothing will happen, other times my phone will reboot. I've also tried adding the following before the rm command with no success:
Code:
# chmod 777 /system/media/audio/ui/camera_click.ogg
I AM able to delete the file manually through ES File Explorer when mounted RW. But it comes back after I restart my phone, hence why I want this command to be used in Tasker.
What am I doing wrong?
PS: as for the "why" of deleting the shutter sound file, I take screenshots sometimes and the sound drives me nuts. I've tried removing the ogg file from the camera apk, but that didn't work after a reboot. I also tried replacing the ogg file with a silent one, but no success there either as the real one reloads itself when I restart.
Delete the file in recovery using TWRP
Sent from my HTC One_M8 using Tapatalk
SmiLey497 said:
Delete the file in recovery using TWRP
Sent from my HTC One_M8 using Tapatalk
Click to expand...
Click to collapse
I'm trying to do it from the terminal so I can eventually put it into Tasker. I can delete it successfully with ES File Explorer, so no need for recovery. I just need some way to get it to work through the terminal.
If the file is coming back then you don't have proper write access to system and the file isn't actually being deleted which Is why it appears to come back.
Try using root explorer instead or do it through TWRP. Make system RW then just move or rename the file rather than delete it. If you have proper write access it will stick.
heather1209 said:
I'm trying to do it from the terminal so I can eventually put it into Tasker. I can delete it successfully with ES File Explorer, so no need for recovery. I just need some way to get it to work through the terminal.
Click to expand...
Click to collapse
It comes back when you reboot. Your system is not writable you need to S-OFF. get system RW kernel, or delete through recovery.
SmiLey497 said:
It comes back when you reboot. Your system is not writable you need to S-OFF. get system RW kernel, or delete through recovery.
Click to expand...
Click to collapse
Ah, that makes sense. What's the system RW kernel you mentioned? I'm not familiar with that.
heather1209 said:
Ah, that makes sense. What's the system RW kernel you mentioned? I'm not familiar with that.
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=2701816
heather1209 said:
Ah, that makes sense. What's the system RW kernel you mentioned? I'm not familiar with that.
Click to expand...
Click to collapse
[KERNEL] [June 20] [Sense] [GPE] ElementalX 0.19 I think that'll work on stock Sense system.
heather1209 said:
Ah, that makes sense. What's the system RW kernel you mentioned? I'm not familiar with that.
Click to expand...
Click to collapse
He means flash a kernel that has write access to system enabled.
SmiLey497 said:
http://forum.xda-developers.com/showthread.php?t=2701816
Click to expand...
Click to collapse
Or yeah, the MOD can work too :good:

Categories

Resources