A
A
Andrew2013-08-19 12:18:40
Android
Andrew, 2013-08-19 12:18:40

How do file recovery programs work on SD card on Android?

Actually the question is this. I have seen several programs that are positioned as a tool for recovering deleted photos from the memory of an Android phone. But, as far as I know, such functionality is not available to the developer and requires byte-by-byte access to the disk. It is clear that Android is essentially Linux, but you can only access devices with root rights, or am I mistaken? Is it possible to get such access (essentially low-level access to the phone's file system) using conventional means or using the NDK?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lolshto, 2013-08-19
@xaoc80

I believe that the recovery programs access the block device associated with the memory card directly.
If your card is mounted in sdcard, then you can view the device mount | grep sdcardfrom the terminal.
I have a card sitting on /dev/block/vold/179:1.
Accordingly, stat /dev/block/vold/179:1gives
File: /dev/block/vold/179:1
Size: 0 Blocks: 0 IO Block: 4096 block special file
Device: bh/11d Inode: 2263 Links: 1 Device type: b3,1
Access: (0600/ brw-------) Uid: ( 0/ root) Gid: ( 0/ root)

Thus, only superuser can communicate with the device

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question