Android security Issues (i) mute photography and being photographed

Source: Internet
Author: User

Before I wrote some of the Android phone root security issues (see the end of the article list), in fact, I was thinking of where to write, today to clean up the hard drive, found a year ago wrote a piece of code, so today we will discuss together.
Note: This is not a technology to talk about NB, but someone who wants to understand the risks of Android knowing where we are.

Guide:

This article describes how the so-called mute photo is implemented (this is also a malware, but not the user), and the user himself how to be photographed by malicious software because Iteye not allowed to steal and clap together, so ... Mute photograph, everybody understands, mute photograph? No, it's just.

Today's theme is mute photography and being photographed

Of course, the "being photographed" here doesn't mean you take a cell phone on the subway in the female classmate under the skirt of female classmate (seemingly the Japanese like to do such things, their own Baidu News)

This refers to the shot is: You play the game, suddenly front camera is malicious application open, then click, then ...

To implement these features, it is regrettable that you do not have root permissions or

Here's the point.

First, mute the camera.

In fact, that is to say mute photography, how to achieve? Of course, first mute and then photographed ... Finally remember to restore the state before the mute.

Some phones directly mediate the camera shutter volume, but there is no common API, it seems that this phone is very few (third-party ROM may have)

Another option is to turn the phone into silent mode and take a picture. But also not ideal, some mobile phones although the mute mode, but the shutter is not mute, like the alarm clock does not mute.

There are some other ways of silencing, and here is not to say. How to mute the phone? This is no technical content, we can own Baidu.

Maudiomanager = (Audiomanager) getsystemservice (context.audio_service);  
Maudiomanager.setringermode (audiomanager.ringer_mode_silent);

Of course, you'd better record the pattern before the user.

int ringermode = Maudiomanager.getringermode ();

This part of the phone's mute camera to take care of, such as I use the G14 (Android 2.3) can achieve the purpose of mute (so that HTC phone fuck, now and its aversion to HTC)

Let's talk about being photographed

I will choose the front camera, while playing the mobile phone, the average person does not look at the phone's butt, because HTC

First, the Android camera.

The generic API for the front-facing camera starts at 2.3, and 2.2 and before it needs to be called by reflection, but there are few Android phones with front-facing cameras

Here we take a 2.3 as the basis for the demo

Steps

0. Camouflage

1. Open front-facing camera

2. Mute + photo + exit

3. Save

Let's start by looking at how to call the front camera (of course, you have to have a front-facing camera.)

Mcamera = Opencamera

(camerainfo.camera_facing_front);  
public static Camera Opencamera (int which) {return  
    camera.open (which);  
}

If there is no camera not NULL, then it is successful

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.