为什么我们需要一个扎根的手机来捕获旧版Android的屏幕截图? -- screenshots 领域 android 相关 的问题

Why do we need a rooted phone to capture screenshots on older versions of Android?






I realize in order to capture screenshots of my phone, all screenshot applications require I have a rooted phone. Why is this so? Why can't we have a simple screenshot application for Android, just like we have for Windows?





android使用所谓的 framebuffer 用于视频显示。 FrameBuffer位于/ dev / graphics / fb0。这个"文件" 基本上是一个流的流,即设备写入用户界面发生的更改时,包含屏幕显示的〜2帧。

FrameBuffer文件的权限是 rw- rw- --- 。请注意,最后一个"组" 有3" - " 。这基本上意味着如果您不是 owner (它是root),您无权甚至从该文件读取。




The answer is rather simple, it's a permissions issue.

Android uses what is called a framebuffer for the video display. The framebuffer is located at /dev/graphics/fb0. this "file", which is basically a stream that the device writes to when changes in the user interface occur, contains ~2 frames of the screen display.

The permissions on the framebuffer file is rw- rw- ---. Note that the last "group" has 3 "-"'s. That basically means that if you are not the owner (which is root) you do not have permission to even read from that file.

If there was a system installed application, that could take screenshots, it would have permission to read from the framebuffer. Which, I believe, is how the Motorola Xoom is able to take screenshots. It has an application installed on the device, as a system app.

Reading the framebuffer, for a developer, is actually simple, if they have access to read it.







Due to Android's security focus on separating all apps from each others' data, to prevent malicious apps from stealing or altering data in apps that you trust, they can't allow an app to take screenshots of other apps.

Think about how many of your apps are able to do things like OCR to translate pictures into text, I can think of at least four apps on my phone that can do this, prime example is Google Goggles OCRing book titles, and also OCRing and then translating blocks of text in foreign languages. Now think about how many of your apps put text on screen that you wouldn't want an untrustworthy app to see, I have a password database app on my phone with an encrypted database of my passwords for various systems, a malicious screensaver app could wait until that password app's running, take a picture of the screen with the login details on it, then OCR them and send them off. It could also do the same for everything in your Contacts list, even if you don't give the app permission to your Contacts database, or your browser history, or chat logs and so on. This is only one way that it could abuse access to your screen.

This is why for screenshotting to be universal it needs to be in the OS (which you already trust with all your data). This is why on phones that do have the screen shot function built-in it's been added as part of the system, not as a separate app.

If you root your phone and allow an app to take screenshots, then you are effectively saying that you implicitly trust that app to be able to do everything that the system can do, including accessing and interfering with other apps and their data, and that you totally trust it not to abuse that access. That's not something that Android's ever going to allow anything except the System/OS to do.



换句话说,拍摄屏幕截图需要屏幕截图的过程来挂钩漂亮进入操作系统的内部,并弄乱了一下,再次弄乱了。由于Android尝试拥有内置的安全模型(而不是在Windows中看到的"螺栓上门" ),以屏幕截图进行几个安全障碍。这些 CAN 被绕过,但目前唯一的实用方式(短缺创造漏洞 - 以及内核中的潜在漏洞)是使用全强大的root帐户,这不受限制。

Short answer: Because 1) computers are Complicated and 2) the screenshot functionality is actually not very simple (for the programmer, not for the user).

In other words, taking a screenshot requires the screenshotting process to hook pretty deep into the OS internals, mess with them for a bit, and unhook again. Since Android tries to have a built-in security model (as opposed to the "bolted-on afterthought" seen in Windows), taking a screenshot trips on several security barriers. Those can be bypassed, but the only currently practical way (short of creating holes - and potential vulnerabilities - in the kernel) is to use the all-powerful root account, which is not subject to the limitations.



4  我怎样才能在Kindle Fire HD上拍摄屏幕截图?  ( How can i take a screenshot on a kindle fire hd ) 
我认为ICS是Kindle Fire HD的底层OS版本,支持通过按住电源按钮+音量键键屏幕截图的标准方法。这对我不起作用。有人可以确认这是否确实如此,或者我是否只是在没有同时按住按钮的慢? ...

3  在Android平板电脑上的空白屏幕截图  ( Blank screenshots on android tablet ) 
我使用 ddms 拍摄手机的屏幕截图,它可以正常工作,但是当我尝试与我的平板电脑一样,我只是得到黑色的形象。手机是一个运行Android 2.2的三星拦截;平板电脑是一个Viewsonic GTablet,带有Cyanogenmod 7.我找到了一个论坛帖子提到tegra设备(如gtablet)不使用 fb0 ,因此...

13  我可以屏蔽我的htc传奇吗?  ( Can i screenshot my htc legend without rooting it ) 
我被告知生根就是全部和结束所有,但目前我想看到我可以在不扎根的情况下扩展我的设备。 是良好的一件事是截图功能,但我似乎无法在市场上找到一个没有 **植根手机的市场上的应用程序。 是否有任何方法可以在没有扎根手机的情况下获取屏幕截图功能?默认情况下,此功能的原因是什么。 ifail可以用2个按钮推动,为什么不是andr...

4  更改屏幕截图的默认存储位置  ( Change default storage location of screenshots ) 
我已经能够更改相机的存储选项(例如,从内部存储到外部SD)。但是,我不知道如何更改该设置,甚至控制屏幕截图的格式。将"屏幕截图" 文件夹移动到外部存储器手动无效。 我有果冻豆4.1.2。 ...

21  为什么我们需要一个扎根的手机来捕获旧版Android的屏幕截图?  ( Why do we need a rooted phone to capture screenshots on older versions of androi ) 
我意识到才能捕获手机的屏幕截图,所有屏幕截图应用程序都需要我有一个扎根的手机。为什么这么好?为什么我们不能为Android有一个简单的屏幕截图应用程序,就像我们为Windows一样? ...

4  在Galaxy S 2.2中拍摄截图的更好方法?  ( A better way to take screenshot in galaxy s 2 2 ) 
在Galaxy S froyo安装后,您可以通过握住后按钮并敲击主按钮来拍摄手机屏幕截图。但是,当您按下或按住后按钮时,这涉及返回键,并且很多应用程序关闭。 有没有办法绕过这个?这是一个很好的补充,但是如果您唯一可以拍摄的是主菜单,桌面以及在保存后按钮时,那么截图的截图和一些很少的应用程序都没有意义。 ...

0  删除隐藏的图片  ( Deleting hidden pictures ) 
当我从Samsung Galaxy S3从我的桌面下载我的照片时,数百屏幕截图图片下载。这些是那些令人讨厌的弹出窗口,试图让您选择购买的应用程序。它们不在我手机中的任何图片文件夹中 - 我只在下载所有图片时看到它们。我如何在手机中找到它们并删除它们? ...

154  如何使用Android设备拍摄屏幕截图?  ( How to take a screenshot with an android device ) 
有没有办法拍摄Android设备的屏幕截图并将其另存为图像文件? ...

1  如何拍摄通知栏下拉列表的屏幕截图?  ( How can i take a screenshot of the notification bar dropdown ) 
有时我在通知栏中获得通知,我将其拉下来,然后我想拍摄截图。我按电源按钮进行屏幕截图,将显示一个菜单,要关闭,重新启动或制作屏幕截图。出现此弹出菜单时,下拉菜单会消失。我尝试了另一个屏幕截图应用程序,但这也不工作。 如何拍摄通知下拉菜单的屏幕截图? ...

3  如何在没有root的情况下禁用flag_secure?  ( How to disable flag secure without root ) 
我刚才实现了旁路屏幕截图安全性的唯一方法是禁用这个 FLAG_SECURE ,因为我可以使用xposed模块完成。 但我不想root我的手机。是否有任何方法可以禁用<代码> FLAG_SECURE 并绕过屏幕截图security 没有root 。 ...

© 2022 it.wenda123.org All Rights Reserved. 问答之家 版权所有