where are the apps stored when i use apps2sd?
4o66 wrote: Short answer: Each app stored in /mnt/asec/[appname] is actually stored in an individual encrypted virtual device file
Long answer: (you knew it was coming...)
From a terminal program (or adb, I normally just hop into ConnectBot), if you run "mount", you will see a few lines like so:
/dev/block/dm-[number] /mnt/asec/[app name] vfat ro,dirsync,nosuid,nodev,noexec,relatime,uid=.....
The main thing to pay attention to here is the first two blocks of text.
The first is WHAT is mounted, the second is WHERE it is mounted TO.
In this case, the device known as /dev/block/dm-[number] is referring to a DM (Device Mapper). In linux, this is normally used for either RAID devices or encrypted volumes.
So what is happening is this: To stop the average user from copying and app to sd, then giving it to a friend, they place it in a virtual hard drive, which is encrypted and stored as a file, in a linux partition on the sd card.
Picture like this:
[SD CARD]
[FAT32]
Files you see on the card
[END FAT32]
[EXT4 Linux]
apps2sd files
virtual hard drive file
[DM device (encrypted)]
apk files
[END DM]
[END EXT4]
[END SD CARD]
Now, if you are rooted, this doesn't really stop you. But most users will never know, or care, about rooting their device. They won't even see the EXT partition on their computer if they were to take the sd card out and plug it right in (Windows can't read EXT partitions without some special software). If the user has linux, they will see the files, but the crypto keys are stored in phone protected memory, accessible only to root.
This keeps casual copying from occurring.
Remember this, a lock only keeps and honest man honest.
If I have physical possession of your device, no matter what security you put on it, I will eventually be able to get what I want out of it.
2011年7月31日星期日
2011年7月25日星期一
EMU是什么单位
EMU英文全称是English Metric Units,在微软的Office Open XML’ DrawingML使用。
以下文字摘抄自维基百科:
A DrawingML graphic's dimensions are specified in English Metric Units (EMUs). It is so called because it allows an exact common representation of dimensions originally in either English or Metric units. This unit is defined as 1/360,000 of a centimeter and thus there are 914,400 EMUs per inch, and 12,700 EMUs per point. This unit was chosen so that integers can be used to accurately represent most dimensions encountered in a document. Floating point cannot accurately represent a fraction that is not a sum of powers of two and the error is magnified when the fractions are added together many times, resulting in misalignment. As an inch is exactly 2.54 centimeters, or 127/50, 1/127 inch is an integer multiple of a power-of-ten fraction of the meter (2×10−4 m). To accurately represent (with an integer) 1 μm = 10−6 m, a divisor of 100 is further needed. To accurately represent the point unit, a divisor of 72 is needed, which also allows divisions by 2, 3, 4, 6, 8, 9, 12, 18, 24, and 36 to be accurate. Multiplying these together gives 127×72×100 = 914,400 units per inch; this also allows exact representations of multiples of 1/100 & 1/32 inch. According to Rick Jelliffe, programmer and standards activist (ISO, W3C, IETF), EMUs are a rational solution to a particular set of design criteria.[20]
另外还有一篇文章解释了为什么使用EMU。
以下文字摘抄自维基百科:
A DrawingML graphic's dimensions are specified in English Metric Units (EMUs). It is so called because it allows an exact common representation of dimensions originally in either English or Metric units. This unit is defined as 1/360,000 of a centimeter and thus there are 914,400 EMUs per inch, and 12,700 EMUs per point. This unit was chosen so that integers can be used to accurately represent most dimensions encountered in a document. Floating point cannot accurately represent a fraction that is not a sum of powers of two and the error is magnified when the fractions are added together many times, resulting in misalignment. As an inch is exactly 2.54 centimeters, or 127/50, 1/127 inch is an integer multiple of a power-of-ten fraction of the meter (2×10−4 m). To accurately represent (with an integer) 1 μm = 10−6 m, a divisor of 100 is further needed. To accurately represent the point unit, a divisor of 72 is needed, which also allows divisions by 2, 3, 4, 6, 8, 9, 12, 18, 24, and 36 to be accurate. Multiplying these together gives 127×72×100 = 914,400 units per inch; this also allows exact representations of multiples of 1/100 & 1/32 inch. According to Rick Jelliffe, programmer and standards activist (ISO, W3C, IETF), EMUs are a rational solution to a particular set of design criteria.[20]
另外还有一篇文章解释了为什么使用EMU。
订阅:
评论 (Atom)