Help editing "/sys/devices/virtual/switch/hdmi/state" - Android Q&A, Help & Troubleshooting

Hi,
I tried to edit the file "state" in "/sys/devices/virtual/switch/hdmi/" to unlock HDMI checking according to some internet posts I found. The problem is that it won't let me edit the file. I used Root explorer. My phone is rooted.
I also tried using Terminal emulator + Busybox to directly edit the file but it still didn't work. The file can be copied to other directory, and the copied file in the new directory can be edited, but the original file cannot be deleted or edited. When I tried to delete it, the message showed "Operation not permitted".
Any idea? Do I have to use "mount" command ? If so, please suggest. I am new to android and linux.

naiponnoi said:
Hi,
I tried to edit the file "state" in "/sys/devices/virtual/switch/hdmi/" to unlock HDMI checking according to some internet posts I found. The problem is that it won't let me edit the file. I used Root explorer. My phone is rooted.
I also tried using Terminal emulator + Busybox to directly edit the file but it still didn't work. The file can be copied to other directory, and the copied file in the new directory can be edited, but the original file cannot be deleted or edited. When I tried to delete it, the message showed "Operation not permitted".
Any idea? Do I have to use "mount" command ? If so, please suggest. I am new to android and linux.
Click to expand...
Click to collapse
Interested too. I m exactly at the same point, even with sys mounted RW

Hi. Any news oh this? Thanks

Related

Root: Replacing system sound files

Ok so I have rooted my Hero and all is well. I've been trying to replace the sound files in system/media/audio/ui where the keyboard sounds are. I find that I cannot move a file into that folder, or apparently any of those folders. When I try to paste a copied or cut file using root explorer into the ui folder, the file just doesn't appear.
Why is this?
Switchbitch said:
Ok so I have rooted my Hero and all is well. I've been trying to replace the sound files in system/media/audio/ui where the keyboard sounds are. I find that I cannot move a file into that folder, or apparently any of those folders. When I try to paste a copied or cut file using root explorer into the ui folder, the file just doesn't appear.
Why is this?
Click to expand...
Click to collapse
have you tried with and without file extention?
Yes. Root explorer just won't let me move any files around in the phone memory. Do I have to do it using adb?
I have a feeling its Root Explorer not working properly in Hero.
I could do this easily on my magic, but I get the same thing - looks like its copied the file, but when I paste, nothing happens at all.
I did manage to delete the Stocks app. from the device (don't use it or need it) using root explorer but other attempts to copy and pasdte have failed.
I have however managed to successfully use Astro File Manager to copy a wallpaper file from the device memory and paste to the SDcard. Will explore Astro a little further and see if it can do more on the device.
Dayz
Phew, not just me being thick then....
I spent most of today trying to backup an .apk from /data/app-private to /sdcard. No luck with Root Explorer, adb pull or a 'cp' from the shell. "Remote file does not exist" was the result of the last two, but it's displayed by ls.
I think anything in app-private is a no go anyway as it contains copy protected apps. With regard to astro - it can copy from device in certain locations, and paste to sd to back up, but it can't delete from the device, and it can't copy or move files to the device.
Daisy xx
Dayzee said:
I think anything in app-private is a no go anyway as it contains copy protected apps.
Click to expand...
Click to collapse
Hmm, thanks Daisy. Will get on to the app's developer, as it was his advice to gain the ability to change location settings that I tried to follow.
Al
Shluggity said:
Phew, not just me being thick then....
I spent most of today trying to backup an .apk from /data/app-private to /sdcard. No luck with Root Explorer, adb pull or a 'cp' from the shell. "Remote file does not exist" was the result of the last two, but it's displayed by ls.
Click to expand...
Click to collapse
Try
Code:
adb shell
su
cat /data/app-private/some.app.apk > /sdcard/some.app.apk
exit
exit
adb pull /sdcard/some.app.apk some.app.apk
...it worked for me on a stock, rooted HTC Hero.
Switchbitch said:
Ok so I have rooted my Hero and all is well. I've been trying to replace the sound files in system/media/audio/ui where the keyboard sounds are. I find that I cannot move a file into that folder, or apparently any of those folders. When I try to paste a copied or cut file using root explorer into the ui folder, the file just doesn't appear.
Why is this?
Click to expand...
Click to collapse
Unless you made other changes than rooting, the /system partition is mounted read-only by default. As far as I know, you'll have to follow one of the root guides to mount it read-write (like you probably did to get /system/bin/su in place) and then do whatever changes you'd like.
Personally, I got tired of the boot audio real fast, so I changed useAudio in /system/media/boot_animation.xml from "1" to "0". Ahh, blessed boot silence...
nrkabul said:
Try
Code:
adb shell
su
cat /data/app-private/some.app.apk > /sdcard/some.app.apk
exit
exit
adb pull /sdcard/some.app.apk some.app.apk
...it worked for me on a stock, rooted HTC Hero.
Click to expand...
Click to collapse
And work it did for me also! Many thanks for your help - I really appreciate it.

[How to] Install apps from NC (Not by ADB install)

I didn't see a thread for this anywhere and it's not included in the rooting documentation so i figured I'd make one.
This will allow you to install apk files directly from the device, no need to adb them over. Just get the apk from the web or whatever source you want and install. Of course this is all assuming you have completed the current root process and have adb access already.
Thanks to godsfilth for finding these directions for the origninal nook.
1. Open a command prompt and navigate to your sdk tools folder
2. Run the following commands
Code:
C:\android-sdk-windows\tools>adb pull /data/data/com.android.providers.settings/databases/settings.db settings.db
C:\android-sdk-windows\tools>sqlite3 settings.db
sqlite> update secure set value=1 where name='install_non_market_apps';
sqlite> .q
C:\android-sdk-windows\tools>adb push settings.db /data/data/com.android.providers.settings/databases/settings.db
3. Reboot
4. Install apps from NC without ADB.
You might have to restart your homescreen for the apps to show up, but i've had sucess with every app i've tried that is known working on the NC.
This was done on a Windows 7 x64 machine, although i'm sure it's the same or similiar for Linux and MUC OSx.
Also, sqlite3.exe was already in my sdk tools folder, if it's not for you then you can download from here.
Yep, and you can ADB install a file manager app, then just use the file manager to install anything else, from the SD card.
Bimboy said:
Yep, and you can ADB install a file manager app, then just use the file manager to install anything else, from the SD card.
Click to expand...
Click to collapse
So...the nook doesn't stop apps from deing installed if Iinstall them manger astro file Manger?
What is the command in sqllite to see if the db entry has been changed?
I copied & pasted your commands and after a reboot still get "Can't install downloaded apk"
I did the same - even adapted the commands because the folder name wasn't the same, etc.
However, I'm trying to use SlideMe to install APKs and it keeps coming up with "Install Blocked" - any ideas?
sudermatt said:
So...the nook doesn't stop apps from deing installed if Iinstall them manger astro file Manger?
Click to expand...
Click to collapse
Once you enable this it will allow you to install the apps, it doesn't have anything to do with astro per se. You can just use astro to navigate to apks stored on your sd card. I use estrongs file manager myself and have installed apks from my sd card, dropbox and downloads from dolphin browser hd.
I'm getting the same error as everyone else.
I made the edits per your first post and pushed the file back to the NC. Then I rebooted. Placed an apk in the NC and tried to open it using Root Explorer. I try to install it and I get the "Installation of donwload apks is not supported" error.
barrosd12 said:
I did the same - even adapted the commands because the folder name wasn't the same, etc.
However, I'm trying to use SlideMe to install APKs and it keeps coming up with "Install Blocked" - any ideas?
Click to expand...
Click to collapse
Slideme works perfect for me so you did something wrong. Not sure what though, I would just redo it.
lovelacer said:
What is the command in sqllite to see if the db entry has been changed?
I copied & pasted your commands and after a reboot still get "Can't install downloaded apk"
Click to expand...
Click to collapse
just use
Code:
sqlite3 settings.db ".dump"
and then scroll down and look for INSERT INTO "secure" VALUES(4,'install_non_market_apps','1'); you want a 1 there at the end.
barrosd12 said:
I did the same - even adapted the commands because the folder name wasn't the same, etc.
However, I'm trying to use SlideMe to install APKs and it keeps coming up with "Install Blocked" - any ideas?
Click to expand...
Click to collapse
look in your tools folder for the settings.db file and check the modified by time and make sure the change you are making is made.
To clarify if there's a misunderstanding the path info and text before the > in the commands is just what you would see in your command prompt. the actual commands are after the >. These are the actual commands.
Code:
adb pull /data/data/com.android.providers.settings/databases/settings.db settings.db
sqlite3 settings.db
update secure set value=1 where name='install_non_market_apps';
.q
adb push settings.db /data/data/com.android.providers.settings/databases/settings.db
What command did you have to alter?
also, maybe try
Code:
adb push settings.db /data/data/com.android.providers.settings/databases/settings.db
to push... I didn't have any problem with the other command and both appear to work for me.
Oh none, your commands worked awesomely, I just had to yank the folder designations that were there, which you've now done for everyone, so thanks!
I think it might be a problem somewhere else, I'm re-doing everything right now, I'll let everyone know
Ran these commands again with the additional adb push and still no dice. I checked to see that the db entry had been updated and it correctly has the install non market apps set to 1. I'm using root explorer as well I'll try estrongs as you have. Thanks for the help.
lovelacer said:
Ran these commands again with the additional adb push and still no dice. I checked to see that the db entry had been updated and it correctly has the install non market apps set to 1. I'm using root explorer as well I'll try estrongs as you have. Thanks for the help.
Click to expand...
Click to collapse
Confirmed now that SlideMe is not the issue - the settings are all correct on the PC, I can't confirm these settings for the NC. I tried re-adb-pushing and still no cigar here either. I'm getting app rejections from any source, downloaded on the NC and the SD card. Any idea what could be wrong?
Ok, definitely isolated the problem now.
I pull the settings from the NC, modify them, and everything works great, then it refuses to push it back, but says it succeeds, or something to this effect, because whenever I pull the file back from the NC, it says value=0
barrosd12 said:
Confirmed now that SlideMe is not the issue - the settings are all correct on the PC, I can't confirm these settings for the NC. I tried re-adb-pushing and still no cigar here either. I'm getting app rejections from any source, downloaded on the NC and the SD card. Any idea what could be wrong?
Click to expand...
Click to collapse
Not sure, I've got it working using this method on 3 different NCs myself. The only thing i can think of is that i had already installed estrongs file manager and a few other games before doing it. Maybe try using adb to install estrongs or astro and see if it will let you then.
estrongs i'm using: www mediafire com ?sxw6adfzvyp250m
astro: www mediafire com ?05scsbrnx2wfw4v
Novaglarion said:
Not sure, I've got it working using this method on 3 different NCs myself. The only thing i can think of is that i had already installed estrongs file manager and a few other games before doing it. Maybe try using adb to install estrongs or astro and see if it will let you then.
estrongs i'm using: www mediafire com ?sxw6adfzvyp250m
astro: www mediafire com ?05scsbrnx2wfw4v
Click to expand...
Click to collapse
Thanks for the file links - I'll give them a try, I really think the problem though is that the NC keeps resetting the value I push back for the non-market apps. I have no idea why it's doing this...
barrosd12 said:
Thanks for the file links - I'll give them a try, I really think the problem though is that the NC keeps resetting the value I push back for the non-market apps. I have no idea why it's doing this...
Click to expand...
Click to collapse
try pulling it back right after pushing the modified one, before rebooting, and see if it's even pushing correctly at all. If it is then being reset on reboot i don't know what the issue is.
Novaglarion, I am not able to do it either.
When you say "reboot", is that the same as power off and on?
boret said:
Novaglarion, I am not able to do it either.
When you say "reboot", is that the same as power off and on?
Click to expand...
Click to collapse
yes, the same.
make sure you're pushing the modified db file to /data/data/com.android.providers.settings/databases not to /data/data/com.android.providers.settings
it needs to be in the databases folder so it overwrites the original
bular211 said:
make sure you're pushing the modified db file to /data/data/com.android.providers.settings/databases not to /data/data/com.android.providers.settings
it needs to be in the databases folder so it overwrites the original
Click to expand...
Click to collapse
DAMN YOU!!!! such a simple thing and i missed it! You are correct. I'll update the original commands. Thanks for the good catch there.

[Q] /system folder read only ?

Copying a font in /system/fonts resulted in a 'read only file system' error.
Googling around looks that the /system folder is mounted read only.
How can I (temporarily) set this folder to read/write ?
By using a rooted file explorer or Super Manager .
jje
Thanks, this works.
When I set /shystem to r/w I can manipulate files / copy files to this folder even from an SSH terminal from my Mac.
Worked extremely well!
Thanks for the help guys. I had installed Beans Stock Rom and lost my VVM support. The market even said my device was not compatible. Tried all prior versions of VVM and none worked until I got this file and used Root Explorer to install it and set permissions as described. Thanks heavens.

I can't Delete file in root directory

First. I'm sorry about my English language (I can use a little)
but I can't delete some file in this directory ".ifs" folder
Because. Yesterday I'm rooted my phone (This is a first time i root Android phone) i've explore alot of file in my phone
I found "logo.jpg" ( I Guest this is BOOT SCREEN PICTURE FILE ) in ".ifs folder" I Think if i replace with another JPG file. I can change BOOTSCREEN another Picture too.
when i copy and replace with new JPG file in this directory. I CAN'T replace it. But it create Duplicate file with "logo-Copy.jpg"
I do this 2 time but not work.
I can't delete or replace "logo.jpg" file in " mnt .ifs " Directory
that useless. So ! I want to delete "logo-Copy.jpg" or "logo-Copy (2).jpg" but I CANNOT DELETE IT TOO.
I'm use ROOT EXPLORER program SD Maid and ES EXPLORER it still not work ( SET mounted read and write )
How to delete it ?
Thank you and Best Regards
------------------
My Device : SAMSUNG SL GT I9003 gingerbread 2.3.5
Mount /system as writable using ES explorer. Use Terminal. Use cd command to navigate to the directory, type su to enter su mode, type rm -f file.name to remove the file.
Sent from my Nexus 7
markdoom said:
First. I'm sorry about my English language (I can use a little)
but I can't delete some file in this directory ".ifs" folder
Because. Yesterday I'm rooted my phone (This is a first time i root Android phone) i've explore alot of file in my phone
I found "logo.jpg" ( I Guest this is BOOT SCREEN PICTURE FILE ) in ".ifs folder" I Think if i replace with another JPG file. I can change BOOTSCREEN another Picture too.
when i copy and replace with new JPG file in this directory. I CAN'T replace it. But it create Duplicate file with "logo-Copy.jpg"
I do this 2 time but not work.
I can't delete or replace "logo.jpg" file in " mnt .ifs " Directory
that useless. So ! I want to delete "logo-Copy.jpg" or "logo-Copy (2).jpg" but I CANNOT DELETE IT TOO.
I'm use ROOT EXPLORER program SD Maid and ES EXPLORER it still not work ( SET mounted read and write )
How to delete it ?
Thank you and Best Regards
------------------
My Device : SAMSUNG SL GT I9003 gingerbread 2.3.5
Click to expand...
Click to collapse
I think you haven't rooted correctly, download this app and root check:
Here
If you aren't rooted then try to root again with this guide:
Here
Hit the Thanks button if helped.
Thank you for all comment. and sorry for my delay.
I still can't delete it. but. Yesterday I Flashed new stock rom.
So. logo.jpg file has been deleted
Does the device work after reboot
You have deleted the Bootscreen. Does your device boot anymore?
Does it show your new pcture on power on?

Interesting issue, possibly permissions error?

I've messed with some of my files on my phone through ES File manager, and I kept getting errors with a specific folder, I then realized that, it's only happening with the folder I created while pushing a file through adb. ESFM has root permissions enabled, but I could not find where to view the permissions for a folder, only files. I also managed to change the stuff in the folder while in recovery. Do I need to set the permissions for the folder through adb right after i create it, or is it a bug somewhere with the ROM/device, or just a random error? If someone could provide an explanation it would be nice.
Viper 1.2.0
s-off
ML417 said:
I've messed with some of my files on my phone through ES File manager, and I kept getting errors with a specific folder, I then realized that, it's only happening with the folder I created while pushing a file through adb. ESFM has root permissions enabled, but I could not find where to view the permissions for a folder, only files. I also managed to change the stuff in the folder while in recovery. Do I need to set the permissions for the folder through adb right after i create it, or is it a bug somewhere with the ROM/device, or just a random error? If someone could provide an explanation it would be nice.
Viper 1.2.0
s-off
Click to expand...
Click to collapse
See if you can duplicate the error while pulling a logcat. That will help out in solving your problem.
if you dont wanna do that just adb remount and chmod the folder either through adb or adb shell access then restart phone
It's specific to only the folder i created through adb. I'm wondering if anyone else experienced it, or if it is only on my phone
what type of folder and either way you should be able to just adb shell then su then chmod /path to folder
t1gartist said:
what type of folder and either way you should be able to just adb shell then su then chmod /path to folder
Click to expand...
Click to collapse
I created the folder on the /sdcard while pushing a file from my computer. The folder was still accessable, I just wasn't able to copy anything into it/edit it. What permissions would be given to a folder like that if i didn't specify them?
you should have been able to read and write by default all of mine are... erm.... delete the folder and create it via root browser or what ever explorer you have and you should be able to long press and access permissions

Categories

Resources