0

I want to access a particular LBA in an sd card attached to an android device. Android doesn't give that level of low level access by default. i tried accessing it through USB Card reader through SCSI commands, but it didn't work. I also tried POSIX commands to seek and read an LBA directly (CPP native commands using jni), but file read works, not direct LBA reads. Can anyone suggest a way to do the same?

1 Answers1

0

I don't believe you can access the partition (user partition I would say) on android as you would normally do on Linux/Unix using block devices. Checks this link for details how to achieve it on Linux.

Now on android, the partition you normally see on android devices like /storage/sdcard0 or /storage/sdcard1 or /stroage/emulated/0 or /storage/80FD-33DA etc could map to a partition on internal storage. Internal storage normally has two partitions one for system which is not accessible to user's application and the second is for user apps (which is accessible to user apps). It could also map to the external storage SD-Cards depending upon the Android OS version and the device manufacturer.

Another way to access raw level partition is using dd command (which again is not available on all android variants). Check this android stackexchange article for this.

dd if=/dev/block/mmcblk0p7 of=/storage/sdcard0/usrdata.img

You can also check file manager apps as well to get an idea how they list and manage user partitions

A.B.
  • 1,554
  • 1
  • 14
  • 21