As the title says...How would one create a directory under sys/ ?
Its for the elusive Meizu M9 rom
Sent from my ADR6300 using XDA App
Use Root Explorer app and mount sys as R/W
gr8nole said:
Use Root Explorer app and mount sys as R/W
Click to expand...
Click to collapse
I've done that, however the changes won't stick. Even something as elementary as renaming another folder almost instantly gets rewrote back to the original. Even through adb, it doesn't work. It must be something far deeper than root explorer can touch, driver maybe?
i am also facing the same problem.....plz help
aavisangle said:
i am also facing the same problem.....plz help
Click to expand...
Click to collapse
Some root directories such as /sys are part of the ramdisk compiled within a kernel. These folders are rewritten every boot. In order to add a folder to /sys you would need to unpack the kernel, extract the ramdisk, and then edit / add a command to init.inc.rc to create the folder at boot. However you would also have to add commands to populate any files / folders you plan on putting in the new folder to the init.inc.rc file othere wise they will be over written at boot also. Then once edited you would have to recompile and flash the modified kernel.
i just want to change the file "/sys/class/switch/h2w/state" content to 0
state - 0 for unplugged, 1 for plugged.
could you please guide me through the process...........
thanks in advance....
aavisangle said:
i just want to change the file "/sys/class/switch/h2w/state" content to 0
state - 0 for unplugged, 1 for plugged.
could you please guide me through the process...........
thanks in advance....
Click to expand...
Click to collapse
If you are just editing files already there you may be able to use a script run at boot to change the files contents. What is your ultimate goal here? Are you trying to listen to the fm app without headphones or what? I tried setting the state files flag to 0 with a script but was unable to do so, it wouldnt stick. However if you go to /sys/class/htc_accessory/fm and edit the flag file to say disable, it sets the /sys/class/switch/h2w/state file to 0. Not sure if this helps you or not. To set this every boot create a script that says
Code:
echo "disable" >> /sys/class/htc_accessory/fm/flag
Then pop it in the init.d folder if your rom has init.d support, if not get script manager from the market and set it to run the script at boot and as superuser.
my problem is that my phone is detecting headphone by default.....that's why whenever i play songs or video on phone it goes to headphone and didn't go on phones speaker........just in short my problem is i cant play songs on phone speaker....just because headphone is detected by default............
this problem persists after flashing and reflashing different roms.......
so i am trying to undetect my headset.........
plz guide me.......if i am wrong
aavisangle said:
my problem is that my phone is detecting headphone by default.....that's why whenever i play songs or video on phone it goes to headphone and didn't go on phones speaker........just in short my problem is i cant play songs on phone speaker....just because headphone is detected by default............
this problem persists after flashing and reflashing different roms.......
so i am trying to undetect my headset.........
plz guide me.......if i am wrong
Click to expand...
Click to collapse
Did you try what i posted in my last post? That should make it think headphones arent plugged in.
cmlusco said:
Some root directories such as /sys are part of the ramdisk compiled within a kernel. These folders are rewritten every boot. In order to add a folder to /sys you would need to unpack the kernel, extract the ramdisk, and then edit / add a command to init.inc.rc to create the folder at boot. However you would also have to add commands to populate any files / folders you plan on putting in the new folder to the init.inc.rc file othere wise they will be over written at boot also. Then once edited you would have to recompile and flash the modified kernel.
Click to expand...
Click to collapse
Don't do this. The file structure in sys is based on the build of the kernel and not actually part of the ramdisk, just the sys folder itself might be in the ramdisk. Definitely don't attempt to add directories to it. Sys has its own filesystem, sysfs, which isn't a typical filesystem. These files are created at every boot. You can edit existing files (not all of them though) but not create new ones.
---------- Post added at 12:18 AM ---------- Previous post was at 12:14 AM ----------
aavisangle said:
my problem is that my phone is detecting headphone by default.....that's why whenever i play songs or video on phone it goes to headphone and didn't go on phones speaker........just in short my problem is i cant play songs on phone speaker....just because headphone is detected by default............
this problem persists after flashing and reflashing different roms.......
so i am trying to undetect my headset.........
plz guide me.......if i am wrong
Click to expand...
Click to collapse
It should only detect headphones if something is actually plugged in. If it does otherwise, something sounds wrong. Unless you're trying to have it play through the phone speaker when you have headphones pluged in?
tiny4579 said:
Don't do this. The file structure in sys is based on the build of the kernel and not actually part of the ramdisk, just the sys folder itself might be in the ramdisk. Definitely don't attempt to add directories to it. Sys has its own filesystem, sysfs, which isn't a typical filesystem. These files are created at every boot. You can edit existing files (not all of them though) but not create new ones.
Click to expand...
Click to collapse
My bad I havent really ever tried messing with kernels to much, i just remember seeing the sys folder in there and assumed that if you needed to add a folder or files that would be the plave to do it. Shows ya how much i know, guess ya learn something new every day.
Related
if i edit my build.prop with astro, on a reboot the changes are lost, the file is marked r-w, so something altering it on bootup, anybody know where the source comes from??
Download Root Explorer and use that. Trust.
tried that, it keeps getting overwritten with some king of backup.
mallard729 said:
tried that, it keeps getting overwritten with some king of backup.
Click to expand...
Click to collapse
If that's the case, then it's a problem specific to the ROM. I haven't tried it on my TP2 but it worked flawlessly on my G1.
Lemme take a look once I get a second.
why cant i find the directory /system/ ?!?! i cant find the build.prop from within windows or winmo?!
norpan111 said:
why cant i find the directory /system/ ?!?! i cant find the build.prop from within windows or winmo?!
Click to expand...
Click to collapse
Because it does not excist in winmo. It only excists in android.
I tried Root Explorer and it workers . I use latest froyo build with lower incall volume kernel .
Can somebody tell me when I delete apps in system/apps folder I delete from data.img or from system.ext2 ?
Same here, I change my build.prop file or replace it and it gets overwritten.
Using the build.prop for protected apps but can't get it to stay.
I am using the latest BLAZEN build from PPCGEEKS/Reefer.
Being an Ext2 file instead of sqsh I figure this would have worked flawless.
I'd really like to download logmein, gbahours, paypal and a few other protected apps. I can't without fixing this build.prop file....
OR
Find some way to get a working fingerprint Google has already approved.
Glad to see I'm not the only one looking into this I have the same problem in my android OS - different phone, but same custom OS. Hopefully this thread won't die - if I ever figure it out I'll be sure to post here as well
I had started a thread asking for help on how to do this. So since its pretty much confirmed it works on most phones even when you didnt realize it was installed Ifigured it was time to give it a proper [How-To].
Disclaimer:I am not responsible if you break,brick,hump,throw against wall or any other action you do to your phone. By using this script you agree anything that happens is your own noobtastic fault. Any attempts at blaming me for anything other than this being fantastic will result in you being pointed and laughed at.
If you are using BACKSIDE/IHO or have already installed the script dont I REPEAT DONT run the script again. Doing so makes multiple instances of the commands and will stop the bootsound from playing. If you run the script more than once you will have to delete somethings to get it to work. SO be warned DO NOT RUN THE SCRIPT IF YOU HAVE ALREADY OR ARE USING BACKSIDEIHO ROM
The ability to play boot sounds is not activated in CM7 based roms. You have to run a script that will enable this function on CM7 based roms. I remember somebody posting this a short while back but it wouldnt work for me. Apparently the sound file I was using was not named properly.
I found a tutorial on CMforums about how to do this. Tested it and everything works great. Several people have tried this on Froyo roms and not have it work. Also it appears on some phones it just wont work at all.
This is what you do.
1. Download this shell script here bootsnd.sh
2. Place it on the root of your SD card & then open Terminal & type the following
su
cd /sdcard
sh bootsnd.sh
3. Now by using a file manager program with R/W (Read/Write) go to the /system/bin in your phone & make sure the file has transfered over! It should say BOOTSOUND & have permissions set to rwxrwxrwx! for this I use Root Explorer or you can use File Manager once you have selected R/W
4. Before transferring your sound file over rename it on your pc, android_audio and make sure it is a .mp3 file. Transfer the sound file from your pc to the root of your SDcard. Now move your sound file you want to play when the phone boots to /system/media of your phone & rename it android_audio you will have to be in R/W mode! Typically fifteen seconds is plenty long and just perfect, however anything over 30 seconds will get cut off.
5. Reboot & enjoy your new BOOTSOUND B)
I dont take credit for this and I am just adding the info here, if you wanna give thanks make sure you go here as well & say thanks to Colpophage for his help on this topic - say thanks here
Click to expand...
Click to collapse
If your having trouble getting sounds to play this should fix the problem.
Here is how to fix it.
Make sure you are mounting in R/W mode on each of these steps.
deaver_92 on XDA said:
To start go to
/system/etc/init.local.rc
and open it in the text editor. Delete everything from
###Bootsound - Safe to Delete: Start###
to
###Bootsound - Safe to Delete: Stop###
Delete any instances of it.
Click to expand...
Click to collapse
Using a app like root explorer, goto /system/bin and delete the file bootsound.
Back out to /system now open build.prop in text editor mode, look for this text.
Code:
ro.config.play.bootsound=1
Delete it from the build.prop and save and exit.
This is optional but recommened.
Reboot phone.
Verify no sound is playing.
Now run the script again and reboot.
You should have a boot sound again.
Click to expand...
Click to collapse
Thanks to danieljc1, Jerryscript, deaver_92 on XDA and most importantly colpophage on CMforum.
Sorry, no boot sound for me. I even tried to fix it with the tutorial and nothing.
MaKTaiL said:
Sorry, no boot sound for me. I even tried to fix it with the tutorial and nothing.
Click to expand...
Click to collapse
if you're using a froyo rom, it's a simpler and different method to get the boot sound.
you need the .mp3 saved as
/system/sounds/poweron/PowerOn.mp3
that's all.
if it still doesn't work, try re-encoding the mp3, or use a different one. sometimes the system's picky about which mp3s it'll use for a bootsound.
bigsupersquid said:
if you're using a froyo rom, it's a simpler and different method to get the boot sound.
you need the .mp3 saved as
/system/sounds/poweron/PowerOn.mp3
that's all.
if it still doesn't work, try re-encoding the mp3, or use a different one. sometimes the system's picky about which mp3s it'll use for a bootsound.
Click to expand...
Click to collapse
The problem is: there is no folder under the name of sounds. Should I create one?
MaKTaiL said:
The problem is: there is no folder under the name of sounds. Should I create one?
Click to expand...
Click to collapse
yes.
10 char min post length
If you are using a CM7 based ROM, here's a flashable zip file you can use:
Activate-Bootsound-signed.zip
Boot into recovery and flash after flashing any CM7 based ROM.
Note- If you have made changes to the files mentioned by eollie, you must remove your changes before flashing this.
Thanks Jerry. out of curiosity, is there a size or time limit for these boot sounds? i was thinking of adding the very opening of "Zoo Station" by U2.
I dunno about cm7, but I put a 40 second mp3 as the bootsound in froyo, and it played all the way past when the sd card mounted on the home screen.
The most I've been able to play is about 90 seconds, larger files didn't even play for me.
mjs2011 said:
Thanks Jerry. out of curiosity, is there a size or time limit for these boot sounds? i was thinking of adding the very opening of "Zoo Station" by U2.
Click to expand...
Click to collapse
Remember some Rom cookers have supercharged the boot process. So the best thing to do is use a timer and time how long you have from the flash from the second bootanimation to when the phone does the soft vibirate to let you know its loaded.
is there any way to use a sound for when the phone powers off also
it is not working for me...i did nothing eollies thread and i only flash Activate_Bootsound-signed.zip this on that you have given,but steel boot sound is not working.I am currently on cm7 6.5.8.Please tell me what to do to enable boot sound???
Thanks in advanced....
Please remove the paid app from your post. It is against the rules. Plus there is a zip created by jerryscript that does this.
Another thing you edited the post for better wording yet instead of typing out into you abbreviated it. Also used the letter u instead of typing you. /faceplam Your post is horribly written using leet speak and text speak because you either cant spell or are too lazy to use proper words.
I can't believe it...I did everything mentioned in the first post, and I actually got the boot sound to work on my Galaxy Mini running CM7.2! Thanks so much!
Don't forget to hit thanks!
Sent from my SGH-T959V using Tapatalk 2
eollie said:
Don't forget to hit thanks!
Sent from my SGH-T959V using Tapatalk 2
Click to expand...
Click to collapse
That's the first thing I did
suyashc said:
it is not working for me...i did nothing eollies thread and i only flash Activate_Bootsound-signed.zip this on that you have given,but steel boot sound is not working.I am currently on cm7 6.5.8.Please tell me what to do to enable boot sound???
Thanks in advanced....
Click to expand...
Click to collapse
try this adding on system/etc/init.local.rc
dont delete any previous data writed there and copy this code and paste it below there so ur boot sound get work
and make sure u need to follow the first given on bin then try
the code is
Code:
###Bootsound - Safe to Delete: Start ###
service bootsound /system/bin/bootsound
user media
group audio
disabled
oneshot
on property:init.svc.bootanim=running # to correct timin
start bootsound
on property:dev.bootcomplete=1
stop bootsound
### Bootsound - Safe to Delete: End ###
GT-I9100 running slimTW5 v3.0
Hi,
Tried all your suggestions.
Regenerated bootsound/edited init.local.rc/build.prop
But still no sound - using android_audio.mp3 - which is valid !!!
Was able change bootanimation.
Something I'm missing or just not possible in this rom ?
Thanks or any advise
I couldn't get the script to work for me either, but the manual method did work for me. The file I had was an ogg, so I edited that part of the bootsound file and the off plays.
Sorry, I don't know why yours doesn't work. Did you make sure your bootsound file has no extension?
Sent from my LG-VM670 using xda app-developers app
it doesn't works on galaxy gio running on cm7
Coming from stock and flashing aosp adds a 0 folder to my sdcard and just makes a copy of what i already have, and then separates existing pictures and such. I like switching between custom roms and stock but not at the cost of space. My question is, is there a custom rom that can run off of normal sdcard folder and not have to create this 0 folder? Its only aosp roms that do this as ive flashed stock, vectus, and lifeless without this problem.
Just something you have to deal with. Here's what I do. (I use root browser)
1) create a folder marked 0 in your sdcard
2) show hidden files if they aren't already
3) cut and paste (copy will take a lot longer) everything in your /sdcard into the 0 folder. Except the zero folder itself, we don't want paradoxes
4) reboot into recovery, flash stock rom as usual, and things should be where you expect
stevek216 said:
Just something you have to deal with. Here's what I do. (I use root browser)
1) create a folder marked 0 in your sdcard
2) show hidden files if they aren't already
3) cut and paste (copy will take a lot longer) everything in your /sdcard into the 0 folder. Except the zero folder itself, we don't want paradoxes
4) reboot into recovery, flash stock rom as usual, and things should be where you expect
Click to expand...
Click to collapse
Okayy so when a file is in one of them will it transfer to the other automatically or will i have to manually do it?
Oh damn I just noticed I have my downloads folder mirrored like 5 times!
Sent from my LG-LS970 using xda app-developers app
NexusS4gFreak said:
Okayy so when a file is in one of them will it transfer to the other automatically or will i have to manually do it?
Click to expand...
Click to collapse
I'm not sure what you mean. You actually have to move your files into the 0 folder, using a cut and paste operation. And as far as file mirroring goes, I think that's common and shouldn't be an issue, something to do with the multi user setup. Idk.
stevek216 said:
I'm not sure what you mean. You actually have to move your files into the 0 folder, using a cut and paste operation. And as far as file mirroring goes, I think that's common and shouldn't be an issue, something to do with the multi user setup. Idk.
Click to expand...
Click to collapse
You are correct android 4.2.2 is setup a bit differently to accommodate multi user support it uses numbered folders, stock being 4.1.2 doesn't use the same folder setup so it will be duplicated.
Sent from my LG-LS970 using xda app-developers app
You can use sylinks. Just sysmlink everything in your 0 folder to your SD. You would either need to add the symlinks to the updater script or use init.d
I'm moving so fast you're in slow motion.
Hello! Most devices like Nexus 4 or our S4 Mini have problems with USB OTG functionality - they can't provide power to connected device. When I was browsing through some system folders, I've found a directory /d/regulator/8921_usb_otg/8921_usb_otg. In this directory, I can see voltage values, but I'm not able to edit them. Can someone help me how to edit max_uV and min_uV files? Folder called "enable" can be changed to 1, but other folders no.
lipalok said:
Hello! Most devices like Nexus 4 or our S4 Mini have problems with USB OTG functionality - they can't provide power to connected device. When I was browsing through some system folders, I found a directory /d/regulator/8921_usb_otg/8921_usb_otg. In this directory, I can see voltage values, but I'm not able to edit them. Can someone help me how to edit max_uV and min_uV files? Folder called "enable" can be changed to 1, but other folders no.
Click to expand...
Click to collapse
Use ES file explorer, tap the world icon on the top left, Tools, Root Explorer OFF To on, give root permissions, after tap on root explorer again (On the Word now, not on the "ON" button and tap Mount System R/W On the menu that will appear.
Sorry for my english
96DANGER96 said:
Use ES file explorer, tap the world icon on the top left, Tools, Root Explorer OFF To on, give root permissions, after tap on root explorer again (On the Word now, not on the "ON" button and tap Mount System R/W On the menu that will appear.
Sorry for my english
Click to expand...
Click to collapse
From the screenshots he has posted, the folder is already in R/W mode
@lipalok
All the files in that folder have readonly atttibutes set r--r--r--. Try copying the files to some folder in the sdcard, change them, then move them back to the folder and set the same permissions as before.
lipalok said:
Hello! Most devices like Nexus 4 or our S4 Mini have problems with USB OTG functionality - they can't provide power to connected device. When I was browsing through some system folders, I found a directory /d/regulator/8921_usb_otg/8921_usb_otg. In this directory, I can see voltage values, but I'm not able to edit them. Can someone help me how to edit max_uV and min_uV files? Folder called "enable" can be changed to 1, but other folders no.
Click to expand...
Click to collapse
I'll check my GS2 that has these values and write here...
gladson1976 said:
From the screenshots he has posted, the folder is already in R/W mode
@lipalok
All the files in that folder have readonly atttibutes set r--r--r--. Try copying the files to some folder in the sdcard, change them, then move them back to the folder and set the same permissions as before.
Click to expand...
Click to collapse
It didn't work I'm not able to copy them. Try it on your phone, please.
lipalok said:
It didn't work I'm not able to copy them. Try it on your phone, please.
Click to expand...
Click to collapse
I've attached 8921_usb_otg folder with all the files here, use es file manager with root permissions to replace them.
96DANGER96 said:
I've attached 8921_usb_otg folder with all the files here, use es file manager with root permissions to replace them.
Click to expand...
Click to collapse
What values should I use?
UPDATE: After trying it, copy task failed
lipalok said:
What values should I use?
Click to expand...
Click to collapse
I don't know.
UPDATE: After trying it, copy task failed
Click to expand...
Click to collapse
Follow my attached screenshot and mount / rw, /system rw. then try to copy
96DANGER96 said:
I don't know.
Follow my attached screenshot and mount / rw, /system rw. then try to copy
Click to expand...
Click to collapse
I did everything you've mentoined, but I can't overwrite these files
lipalok said:
I did everything you mentoined, but I can't overwrite these files
Click to expand...
Click to collapse
Try to overwrite them in the ROM.zip and flash the rom
96DANGER96 said:
Try to overwrite them in the ROM.zip and flash the rom
Click to expand...
Click to collapse
There is no /d/ directory in .zip file
Also, I have to say that developers like @F4k should know about this
lipalok said:
It didn't work I'm not able to copy them. Try it on your phone, please.
Click to expand...
Click to collapse
Sorry about that. I don't have a S4 Mini (yet). Planning to get one next week.
Hi guys!
The "file" you are trying to edit is not a file, but sysfs node.
To set or read a value you do this:
adb shell
su
cd /d/regulator/8921_usb_otg
echo 1 > enable
etc...
try to set max_uV to USB voltage which is 5V, it's in uV so:
echo 5000000 > max_uV
marcin1147 said:
Hi guys!
The "file" you are trying to edit is not a file, but sysfs node.
To set or read a value you do this:
adb shell
su
cd /d/regulator/8921_usb_otg
echo 1 > enable
etc...
try to set max_uV to USB voltage which is 5V, it's in uV so:
echo 5000000 > max_uV
Click to expand...
Click to collapse
Will try!
@marcin1147
UPDATE: Error, please have a look on screenshot.
enable is under /d/regulator/8921_usb_otg not /d/regulator/8921_usb_otg/8921_usb_otg
btw. better do this with USB detached, you don't want to fry your PC, don't you?
marcin1147 said:
enable is under /d/regulator/8921_usb_otg not /d/regulator/8921_usb_otg/8921_usb_otg
btw. better do this with USB detached, you don't want to fry your PC, don't you?
Click to expand...
Click to collapse
No, I don't
maybe we need the file from samsung mega, who has the same soc
http://www.youtube.com/watch?v=jvl0HTf-NXc
lipalok said:
Will try!
@marcin1147
UPDATE: Error, please have a look on screenshot.
Click to expand...
Click to collapse
Ok, getting ready for max_uV directory.
UPDATE 1 : max_uV looks that has been changed, but it is not.
after you change the parameters, restart your phone
b0g said:
after you change the parameters, restart your phone
Click to expand...
Click to collapse
OK, booting...
UPDATE: Nothing has happened, so the problem must be elsewhere.
@b0g
BTW, do you have USB STORAGE option in storage Settings?
Hi
So I am looking at blocking a number of websites - no, I don't really want to do this through app's as a mere uninstall can undo the blocks.
I've rooted my phone, I've given +rw mount to /system/ and I'm able to etc hosts under /system/etc/hosts just fine.
However, as soon as I reboot, the system restores the hosts file to it's original state and all my edits to that file are undone.
Is there anything I can do about this? Please be a bit more specific than just "flash the kernel", thanks.
MohamedH93 said:
Hi
So I am looking at blocking a number of websites - no, I don't really want to do this through app's as a mere uninstall can undo the blocks.
I've rooted my phone, I've given +rw mount to /system/ and I'm able to etc hosts under /system/etc/hosts just fine.
However, as soon as I reboot, the system restores the hosts file to it's original state and all my edits to that file are undone.
Is there anything I can do about this? Please be a bit more specific than just "flash the kernel", thanks.
Click to expand...
Click to collapse
any time i edit anything in system folders i copy it to sdcard do my edits then copy it back and make sure the permissions are set correct i think it rw-r--r-- reboot and it should be good to go... for some reason i cant edit them in that folder but moving it to edit then move it back works for me maybe it will work for you too...
buby78 said:
any time i edit anything in system folders i copy it to sdcard do my edits then copy it back and make sure the permissions are set correct i think it rw-r--r-- reboot and it should be good to go... for some reason i cant edit them in that folder but moving it to edit then move it back works for me maybe it will work for you too...
Click to expand...
Click to collapse
I can edit it no probs. I do my changes, test them out and they all work OK.
As soon as I reboot, everything becomes undone. AFAIK this might be some kernel protection.
The system partition is write-protected.
http://forum.xda-developers.com/showthread.php?t=2701816