maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Brainstorm (https://talk.maemo.org/forumdisplay.php?f=47)
-   -   Request: Disable cameras on the device (https://talk.maemo.org/showthread.php?t=63033)

warhawk007 2010-09-28 04:26

Request: Disable cameras on the device
 
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 2010-09-28 04:37

Re: Request: Disable cameras on the device
 
try renaming
Code:

/usr/bin/camera-ui
as root. it worked at least for me.

warhawk007 2010-09-28 04:57

Re: Request: Disable cameras on the device
 
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 2010-09-28 05:02

Re: Request: Disable cameras on the device
 
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 2010-09-28 05:13

Re: Request: Disable cameras on the device
 
I think this thread covers something similar to what you are looking for. Apply it to the camera. http://talk.maemo.org/showthread.php...+accelerometer

F2thaK 2010-09-28 05:42

Re: Request: Disable cameras on the device
 
question is, will they beleive theyre disabled once youve done it...............

warhawk007 2010-09-28 05:56

Re: Request: Disable cameras on the device
 
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 2010-09-28 06:17

Re: Request: Disable cameras on the device
 
Quote:

Originally Posted by warhawk007 (Post 828082)
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 2010-09-28 06:25

Re: Request: Disable cameras on the device
 
Quote:

Originally Posted by ossipena (Post 828088)
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 2010-09-28 06:35

Re: Request: Disable cameras on the device
 
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 2010-09-28 06:44

Re: Request: Disable cameras on the device
 
Quote:

Originally Posted by nicolai (Post 828098)
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 2010-09-28 07:13

Re: Request: Disable cameras on the device
 
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 2010-10-04 11:24

Re: Request: Disable cameras on the device
 
Back after a reflash.....any update on this??

pycage 2010-10-04 11:51

Re: Request: Disable cameras on the device
 
How about removing user from the video group in /etc/group ?
That will deny access to the camera hardware.

warhawk007 2010-10-04 14:02

Re: Request: Disable cameras on the device
 
Quote:

Originally Posted by pycage (Post 832939)
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 2010-10-04 14:23

Re: Request: Disable cameras on the device
 
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 2010-10-04 14:58

Re: Request: Disable cameras on the device
 
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 2010-10-04 15:29

Re: Request: Disable cameras on the device
 
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 2010-10-04 15:32

Re: Request: Disable cameras on the device
 
@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 2010-10-04 16:03

Re: Request: Disable cameras on the device
 
Quote:

Originally Posted by warhawk007 (Post 833118)
@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 2010-10-04 16:10

Re: Request: Disable cameras on the device
 
I'm lucky that camera phones are not banned in my college :D

warhawk007 2010-10-04 16:14

Re: Request: Disable cameras on the device
 
Quote:

Originally Posted by gunni (Post 833127)
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 2010-10-04 16:24

Re: Request: Disable cameras on the device
 
How about placing a piece of black cardboard paper between the back camera and battery cover, and ducktaping over the front camera?

warhawk007 2010-10-04 16:36

Re: Request: Disable cameras on the device
 
Quote:

Originally Posted by TiagoTiago (Post 833151)
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 2010-10-04 16:36

Re: Request: Disable cameras on the device
 
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 2010-10-04 17:07

Re: Request: Disable cameras on the device
 
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 2010-10-04 20:46

Re: Request: Disable cameras on the device
 
Also use AppLocker to get rid of the of the icon in the app menu.

warhawk007 2010-10-05 13:48

Re: Request: Disable cameras on the device
 
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 2010-10-05 14:22

Re: Request: Disable cameras on the device
 
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 2010-10-05 15:48

Re: Request: Disable cameras on the device
 
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 2010-10-05 15:51

Re: Request: Disable cameras on the device
 
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 2010-10-05 15:57

Re: Request: Disable cameras on the device
 
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 2010-10-05 18:11

Re: Request: Disable cameras on the device
 
Quote:

Originally Posted by flexmat (Post 833156)
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 2010-10-06 09:24

Re: Request: Disable cameras on the device
 
Quote:

Originally Posted by TiagoTiago (Post 834022)
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 2010-10-06 18:05

Re: Request: Disable cameras on the device
 
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 2010-10-06 18:19

Re: Request: Disable cameras on the device
 
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 2010-10-06 18:28

Re: Request: Disable cameras on the device
 
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 2010-10-06 18:54

Re: Request: Disable cameras on the device
 
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 2010-10-06 20:01

Re: Request: Disable cameras on the device
 
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 2010-10-06 21:08

Re: Request: Disable cameras on the device
 
Are they really going to kick you out of the college for having a camera phone? Tell them **** off.


All times are GMT. The time now is 15:14.

vBulletin® Version 3.8.8