View Full Version : Request: Disable cameras on the device
warhawk007
09-28-2010, 12:26 AM
Though I'm posting for the first time, I'm a constant visitor of this forum.
I have been using the N900 since the past four months and whenever I feel that I'm getting bored of maemo and android looks greener, its the community and the great dedicated developers who keep it intresting with the sudden release of a new app or a new feature update for an existing. Hence, I'm really enjoying in the maemo world. Thanks to you guys!
Recently a new rule came up in my college that camera phones are no more allowed in the campus. N I cant live without my n900 even for a moment. Moreover, as I use my N900 a my primary phone, its difficult for me to keep swapping my SIM between ultra low-end phone & n900 everyday..
So, if possible could someone make a script to disable both cameras on the device??
Note: The camera shouldnt re enable itself upon device reboot. It should be more like a permanent solution until I myself enable the camera though the command line or something of that sort.
Any help?? thanks in advance.
ossipena
09-28-2010, 12:37 AM
try renaming
/usr/bin/camera-ui
as root. it worked at least for me.
warhawk007
09-28-2010, 12:57 AM
That didnt work for me, I renamed the camera-ui file to camera-ux using filebox in root mode, but the camera app, still opens on opening the lens cover.
Could some script be made so that a message would be displayed on opening the lens cover, that the cameras on the device have been disabled. In that way, I can convince them to let me take my phone to college.
ossipena
09-28-2010, 01:02 AM
don't know about those fileboxes etc, I use purely command line and renamed the file as camera-ui.backup
so if someone can confirm that renaming the file works, I could see if I have time to write a simple script to do it.
simmy
09-28-2010, 01:13 AM
I think this thread covers something similar to what you are looking for. Apply it to the camera. http://talk.maemo.org/showthread.php?t=61495&highlight=completely+disable+accelerometer
F2thaK
09-28-2010, 01:42 AM
question is, will they beleive theyre disabled once youve done it...............
warhawk007
09-28-2010, 01:56 AM
i renamed the file as told....but now my phone is going through a reboot loop...after te nokia hands...I dont have access to a computer at the moment...pls help!
ossipena
09-28-2010, 02:17 AM
i renamed the file as told....but now my phone is going through a reboot loop...after te nokia hands...I dont have access to a computer at the moment...pls help!
that seems to be mission impossible. I bet you need flasher in order to get your device back up.
warhawk007
09-28-2010, 02:25 AM
that seems to be mission impossible. I bet you need flasher in order to get your device back up.
Will I only have to reflash the firmware? Do i have to flash the emmc too? Hav lots of my data in the emmc.
nicolai
09-28-2010, 02:35 AM
only .firmware.
Btw, don'just rename the file camera-ui, because there is
a script in /etc/X11/Xsession.post which autostart
the camera-ui on boot. This causes the reboot loop.
warhawk007
09-28-2010, 02:44 AM
only .firmware.
Btw, don'just rename the file camera-ui, because there is
a script in /etc/X11/Xsession.post which autostart
the camera-ui on boot. This causes the reboot loop.
I believe there is no way to boot into safe mode(i.e, without loading those processes) with some key combination...am i right?
ossipena
09-28-2010, 03:13 AM
what about removing x -flag from camera-ui ? would that trigger the reboot loop?
you might be able to fight the loop by flashing your device to RD mode but I am not sure.
warhawk007
10-04-2010, 07:24 AM
Back after a reflash.....any update on this??
pycage
10-04-2010, 07:51 AM
How about removing user from the video group in /etc/group ?
That will deny access to the camera hardware.
warhawk007
10-04-2010, 10:02 AM
How about removing user from the video group in /etc/group ?
That will deny access to the camera hardware.
I'm jus gettin used to maemo core, so could you please explain once more if u dont mind?? :-) Also can anyone please confirm whether this works?? coz I dont have immediate access to a computer incase I need a reflash...
lvlonkey
10-04-2010, 10:23 AM
im sorry im not going to be of any help but im just curious as to what college you go to and why the ban?
pelago
10-04-2010, 10:58 AM
I doubt any software disable would be enough to convince your college authorities. How would they know that you wouldn't reenable it later?
To be honest, it sounds to me like the college will have a very hard time enforcing this. Most phones have cameras now.
e-yes
10-04-2010, 11:29 AM
Just set permissions on camera device (somewhere in init scripts, after udev is settled in). It's a UNIX:)
chmod 000 /dev/video*
chmod 000 /dev/omap_preview_hack
(I hope camera ui is not running as uid 0)
warhawk007
10-04-2010, 11:32 AM
@lvlonkey: Its common in colleges over here in India, most universities here ban the use of camera phones....most students still do take phones to class....its just some colleges which really enforces this
@pelago: If someone can make a really good enough script to disable the cameras, also with a convincing popup message, I can convince them that its factory disabled.....most of them are noobs....I'm doin a management course....so most of them arent too good at technology...
I'm not too gud at programming, so anyone who can help me out here??
gunni
10-04-2010, 12:03 PM
@pelago: If someone can make a really good enough script to disable the cameras, also with a convincing popup message, I can convince them that its factory disabled.....most of them are noobs....I'm doin a management course....so most of them arent too good at technology...
If that is enough, simply do an application with only a popup "Camera disabled". For management students that should be enough SCNR ;)
plaban
10-04-2010, 12:10 PM
I'm lucky that camera phones are not banned in my college :D
warhawk007
10-04-2010, 12:14 PM
If that is enough, simply do an application with only a popup "Camera disabled". For management students that should be enough SCNR ;)
Yea, something like that + the camera application shouldn't load on pressing the camera key or on opening the lens cover...I can hide the camera app from the menu using applocker(which doesnt prevent application from loading)
It should be a really convincing message too....for example, "The cameras on this device are disabled. Please contact your retailer for more info" or something like this.
so, any help?? is it really hard to disable the cameras?
TiagoTiago
10-04-2010, 12:24 PM
How about placing a piece of black cardboard paper between the back camera and battery cover, and ducktaping over the front camera?
warhawk007
10-04-2010, 12:36 PM
How about placing a piece of black cardboard paper between the back camera and battery cover, and ducktaping over the front camera?
I already did that ;) But that wont be enough to convince them....even though the viewfinder shows "black" in such a solution, the main goal is that the camera spplication shouldnt load....
The disadvantage of the black paper solution is that, if they decide to remove the paper, the camera comes to life....
But if the camera app doesnt open and a popup message comes up, they'll digest it....as nobody even knows what 'maemo' is.....to doubt about a script or software lock...
flexmat
10-04-2010, 12:36 PM
A trick to disable the camera program to launch:
/usr/sbin/dsmetool -k /usr/bin/camera-ui
and to re-enable :
/usr/sbin/dsmetool -t /usr/bin/camera-ui
Mentalist Traceur
10-04-2010, 01:07 PM
This is what sucks about everything being scattered all over maemo.org. There's already an app, in extras-devel, that lets to make nothing pop-up at the camera lens opening. It's called cl-launcher (if you get it with apt-get), it shows up as Camera Lens Launcher in the Application Manager.
I am not a fan of sending people to extras devel as a whole, but I think for specific apps it's fine. If you're not already using devel, just add it briefly, don't update anything, download Camera Lens Launcher, and the remove the devel repository. The current cl-laucnher is pretty good and stable on my device. Some people have had a boot-loop from uninstalling it though, so it's may be a one-way install.
Then, you can set up a shell script, not my area of knowledge but I can learn it along the way and help you with it. And then find some way to run the script upon camera opening after setting the camera lens launcher to not launch the camera app upon camera opening.
One way I can think of this is setting up the script like a normal app, so that cl-launcher picks it up as an app, and then you can just set it as the preferred application to run upon lens opening in that same cl-launcher. Alternatively, you may be able to use dbus-scripts to respond to a dbus event from the lens opening. (For that matter, I would, with my minimal knowdge, look to dbus scripts to make the official-looking "Camera is disabled on this firmware; please consult your local Nokia carepoint for assistance" notice come up.)
TiagoTiago
10-04-2010, 04:46 PM
Also use AppLocker to get rid of the of the icon in the app menu.
warhawk007
10-05-2010, 09:48 AM
I'm sorry for being so desperate to get this done but I dont have much knowledge in programming for maemo.....I used lens launcher to disable lens cover.....I need to completely disable the camera app itself....could someone create a working reversible script??
TiagoTiago
10-05-2010, 10:22 AM
like i said, you could use AppLocker to get rid of the Camera icon (to make things even more believable, find isntructions on how to edit and create new shortcuts and create one with the camera icon that actually launches something that just displays a msg about the camera not being enabled)
warhawk007
10-05-2010, 11:48 AM
Currently I'm using the following solution....
I covered the camera with a black piece of paper..
Hid the camera icon with app locker...
Disabled the lens cover launcher...
used shortcutd to remap camera key.......but there is a prob here.....at times the camera app starts on pressing the camera key even though its remapped...that wont do.
any solutions?? since maemo is quite open, isnt there some way to disable the cameras altogether?? n what about the poput message which can make it more convincing?
wmarone
10-05-2010, 11:51 AM
What an insane college.
Anyway, one solution might be to rebuild your kernel minus the necessary drivers for your camera. Then it definitely won't work.
warhawk007
10-05-2010, 11:57 AM
yea....insane indeed....I dont like being away from my n900 even for a moment....I'm not very good in programming for maemo....so any kind developers here who can help me out??
TiagoTiago
10-05-2010, 02:11 PM
A trick to disable the camera program to launch:
/usr/sbin/dsmetool -k /usr/bin/camera-ui
and to re-enable :
/usr/sbin/dsmetool -t /usr/bin/camera-ui
together with getting rid of the icons for any program that uses the camera seems to work
ps:becareful to type everything correctly, it seems i've just typo'd somthing just now and forced a reboot...
warhawk007
10-06-2010, 05:24 AM
together with getting rid of the icons for any program that uses the camera seems to work
ps:becareful to type everything correctly, it seems i've just typo'd somthing just now and forced a reboot...
does this work?? also, is this a permanent solution?? does it cause a reboot loop or somethin of that sort?? I dont have immediate acces to a computer....thats why I'm askin..
TiagoTiago
10-06-2010, 02:05 PM
no reboot loops in my tests, you do need to run the command again after a reboot though (there are probably many ways to have a command automaticly run on boot, just search the forum and the wiki a bit)
MohammadAG
10-06-2010, 02:19 PM
Umm, I should've seen this thread before since I'm in the same situation.
I had the hostmode kernel installed, any phone with a camera isn't allowed, the teacher saw the device, I swiped the camera lens and it said Operation Failed.
Turns out fcamera isn't compatible with the hostmode kernel, so I just told them the cam's broken and got away with it.
Removing the modules should do the same, make the camera app and fcamera fail, I'll edit this post in a bit, need to check what the modules are.
TiagoTiago
10-06-2010, 02:28 PM
ok, try this instead: Install Quick Launch, and in the settings, mark "Enable launch on shutter open"
edit:i'm guessing that option was supposed to do somthing else, but right now it just makes it so nothing is launched when you open the lens cover or press the camera button all the way
woody14619
10-06-2010, 02:54 PM
Two things:
1: If you look at the hardware docs on the N900, the back camera is actually entirely contained on a socket-ed chip, and can be extracted with the proper care and tools. That would clearly disable the camera, and remove the chance of using it until it's physically re-installed. The front cam really only works for skype and programs that specifically call out to use it, so that one is less of an issue.
2: Another option may be to just buy a solid rubber back for a device with similar dimensions. Cover the camera, and it won't be seen and can't be used.
Really though, this sounds like a bogus thing. "We don't want our students to use the most current technology." Really? What school are you going to? I can understand if they ban camera phones in some areas, like a gym, or a theater, but a wholesale ban sounds like a lawsuit waiting to happen. (Well, it would in the US anyway. :) )
MohammadAG
10-06-2010, 04:01 PM
http://i51.tinypic.com/wwk7yq.jpg
Is enough for me, let me know if you need anything else :P
I'll upload it to devel in a bit
(the script renames /usr/bin/camera-ui to /usr/bin/camera-ui.disabled, changes the Xsession scripts that automatically start up the camera daemon at startup (so this should persist across reboots), and kills the camera-ui (cleanly) so you don't have to reboot the device whenever you enable/disable the camera)
fcamera will still be working mind you, I'll add an icon mover to the script in the future, for now, you can just mv it out of /usr/share/applications/hildon/ or use AppLocker.
mmurfin87
10-06-2010, 05:08 PM
Are they really going to kick you out of the college for having a camera phone? Tell them **** off.
TiagoTiago
10-06-2010, 05:10 PM
like i said a few times, you can use AppLocker to get rid of the shortcut icons
Btw MohammadAG, where is it? Did you forget to link it on your post?
MohammadAG
10-06-2010, 05:25 PM
Nope, I just switched to a window instead of a dialog, and it took me time to learn some GTK. http://talk.maemo.org/showthread.php?p=835098#post835098
pelago
10-06-2010, 05:53 PM
I just switched to a window instead of a dialog
I preferred the look of the big yellow banner - it looked more like a genuine error message.
TiagoTiago
10-06-2010, 05:56 PM
I see
paddingpadding
MohammadAG
10-06-2010, 05:59 PM
I preferred the look of the big yellow banner - it looked more like a genuine error message.
I'll make it configurable in the next version then :)
Tumleh
10-07-2010, 07:34 AM
I Think I have a great problem. Upon installing togglecamera yesterday and the giving the command togglecamera -e I'm unable to open my N900 camera-ui, neither launching the program nor when I open the camera lens cover.
What can I do to run my camera again? May the problem be released after deinstalling the app togglecamera?
TiagoTiago
10-07-2010, 08:17 AM
Have you tried running the command to reenable the camera?
Tumleh
10-07-2010, 08:34 AM
Have you tried running the command to reenable the camera?
After installing togglecamera I have entered togglecamera -e with the result, that the camera does not work. Then I have given the command togglecamera -d, an since that my N900 does not work anymore. I only can see the Nokia hands and the boot menu order either internal flash or power off (when not an charger). That procedere is repeating and I cannot start my N900. Running internal flash does not work.
MohammadAG
10-07-2010, 08:41 AM
Sigh... why did you enable the camera when it was already enabled, on first run the app can't detect whether the cam is enabled or disabled...
flasher-3.5 --set-rd-flags=no-lifeguard-reset
should at least get your device to boot up, no you won't lose data.
Post the output of cat /etc/X11/Xession.post/17camera-ui and ls -l /usr/bin/camera*
Tumleh
10-07-2010, 08:51 AM
Sigh... why did you enable the camera when it was already enabled, on first run the app can't detect whether the cam is enabled or disabled...
flasher-3.5 --set-rd-flags=no-lifeguard-reset
should at least get your device to boot up, no you won't lose data.
Post the output of cat /etc/X11/Xession.post/17camera-ui and ls -l /usr/bin/camera*
Thanks very much, but my general problem at the time is that I am unable to start my N900. I only can see NOKIA and the hands and the boot menu order either internal flash or power off (when not on charger). That is all. Booting internal flash does not work.
warhawk007
10-07-2010, 09:50 AM
http://i51.tinypic.com/wwk7yq.jpg
Is enough for me, let me know if you need anything else :P
I'll upload it to devel in a bit
(the script renames /usr/bin/camera-ui to /usr/bin/camera-ui.disabled, changes the Xsession scripts that automatically start up the camera daemon at startup (so this should persist across reboots), and kills the camera-ui (cleanly) so you don't have to reboot the device whenever you enable/disable the camera)
fcamera will still be working mind you, I'll add an icon mover to the script in the future, for now, you can just mv it out of /usr/share/applications/hildon/ or use AppLocker.
Wow!! I just dont know how to thank you.......thank you so much.....I'm going to try it out now......by the way, any side effects?? Fcamera is not a prob....I hide it with applocker.....all I wanted is that the default camera application shouldnt launch....thanks a lot....
AgogData
10-07-2010, 09:52 AM
what i cant understand is will the security buy the disabled camera trick ? and r they dumb enough not to think that u can re-enable it after u crossed the checkpoint or whatever is it there ?
warhawk007
10-07-2010, 12:02 PM
what i cant understand is will the security buy the disabled camera trick ? and r they dumb enough not to think that u can re-enable it after u crossed the checkpoint or whatever is it there ?
I'm not talking about restricted areas with strong security. Ofcourse, such restricted areas wouldn't allow a camera phone at all, whether actually disabled or not.
What I'm talking about is some insane universities which ban the use of camera phones. Moreover, the popup dialog clearly mentions that a service point should be contacted to re-enable the camera, which most teachers would digest.
AgogData
10-07-2010, 12:29 PM
send me some of those idiot teachers :D
TiagoTiago
10-07-2010, 01:10 PM
Somthing that would be fun (though somewhat risky) would be if someone secretly videotaped classes and stuff after having passed the check, and then once you're done with the school post the highlights on Youtube and make the raw footage avaiable via BT (or some other free file sharing means)
warhawk007
10-07-2010, 02:31 PM
Umm, I should've seen this thread before since I'm in the same situation.
I had the hostmode kernel installed, any phone with a camera isn't allowed, the teacher saw the device, I swiped the camera lens and it said Operation Failed.
Turns out fcamera isn't compatible with the hostmode kernel, so I just told them the cam's broken and got away with it.
Removing the modules should do the same, make the camera app and fcamera fail, I'll edit this post in a bit, need to check what the modules are.
Please check your PM. I thought it would be off-topic to post it here.
Anyways here is a link
http://talk.maemo.org/showthread.php?p=835509#post835509
I believe you can help if you have some time to spare.
TiagoTiago
10-07-2010, 11:11 PM
guy that got reboot loop, that flasher command is somthing you run on your PC, it's a program to reflash your N900 ; i dunno how exactly to translate what the parameters suggested there mean though
joerg_rw
09-01-2011, 04:13 PM
how about *renaming* the camera icon? ;-D Rather than hide it
And if the mere dialog saying "camera defect/disabled" isn't enough to convince them, add a "sleep 5; sudo gainroot -c reboot" to the part that displays the dialog:-D No, NO! Please don't open the lens cover, the camera is broken and it will crash the whole phone! DUH! Thanks mate!
/j
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.