Viewing Internal Storage of [generic phone] as Mass Storage to recover deleted file?

magicphone

Senior Member
Mar 20, 2013
106
6
0
forum.xda-developers.com
I have this cheap generic [Alcatel Idol 2 Mini] phone, I want to recover a [simple TXT, HTML, XML] file from a generic [Tomdroid] app its Internal Storage I accidentally deleted, with Windows software Recuva.

Windows only shows Internal Storage when I connect the device as Media Device (MTP), and I even see my deleted file there, I just cannot copy-paste it to Windows desktop. When I connect the device as SD Card, the SD Card shows up as Mass Storage under Windows, but only the SD Card, Internal Storage remains hidden then.

Recuva is a good tool to recover deleted files. How to get back my file?

I understand my only option maybe to root the phone. Hopefully, there is a simpler solution. If I have to root, I don't get it: won't Internal Storage be screwed up anyways by the rooting process, overwriting my file I want to recover in the process?
 
Last edited:

asderdd

Senior Member
Oct 3, 2014
57
341
0
İstanbul
You can mount your data partition on custom recovery over adb shell.
type this codes on terminal to mount your data(included sdcard) as mass storage.
Code:
adb shell
cd /sys/devices/virtual/android_usb/android0
(sleep 5 && echo 0 > enable && echo "adb,mass_storage" > functions && echo "/dev/block/mmcblk0px" > f_mass_storage/lun/file && echo 1 > enable)&
(replace mmcblkpx to your your device's spesific userdata partition code.)
 

magicphone

Senior Member
Mar 20, 2013
106
6
0
forum.xda-developers.com
@asderdd, thank you for your help!

Let's put this first: What should I see as a result of these adb commands, if the hack is successful? What I want to accomplish is the Recuva Windows program to see the Internal Storage of my phone for a file recovery.

[Meta: I'm not sure where I was supposed to ask this kind of question in the first place, if I don't own one of the more popular, more expensive phones, whose topics has most of the traffic and discussion on the site.]

Okay, I installed the '15 seconds ADB Installer' and the phone's drivers to my Windows box.

1st step, success:
c:\adb>adb shell
[email protected]_3G:/ $

2nd step, success:
[email protected]_3G:/ $ cd /sys/devices/virtual/android_usb/android0
[email protected]_3G:/sys/devices/virtual/android_usb/android0 $

> replace mmcblkpx to your your device's spesific userdata partition code.

I have /dev/block/platform and /dev/block/vold, let's thy these.

1st, /dev/block/platform:

orage" > functions && echo "/dev/block/platform" > f_mass_storage/lun/file && *
[1] 8775
[email protected]_3G:/sys/devices/virtual/android_usb/android0 $ /system/bin/sh: can't create enable: Permission denied
[1] + Done (1) ( sleep 5 && echo 0 >enable && echo "adb,ma [email protected]_3G:/sys/devices/virtual/android_usb/android0 $

No success.

2nd, /dev/block/vold:

orage" > functions && echo "/dev/block/vold" > f_mass_storage/lun/file && echo*
[1] 8798
[email protected]_3G:/sys/devices/virtual/android_usb/android0 $ /system/bin/sh: can't create enable: Permission denied
[1] + Done (1) ( sleep 5 && echo 0 >enable && echo "adb,ma
[email protected]_3G:/sys/devices/virtual/android_usb/android0 $

No success. What to do next? Thank you!
 

PAPalinskie

Senior Member
Jun 23, 2013
177
12
0
Cavite
i think alcatel nowadays have they called "emulated storage" meaning, the internal storage is actually save in a shared folder in data partition. you should try to look a file recovery software for android on the web instead
.
 

magicphone

Senior Member
Mar 20, 2013
106
6
0
forum.xda-developers.com
I tried Dr.Fone, which is said to be the best in this category of software tools. It still doesn't show me all files like Recuva, just files in categories, like photos, music.

In file explorer, I see the following:

'emulated' - This is empty
'sdcard0' - Internal Storage for Windows
'sdcard1' - my real SD card
 

xHair

Member
Oct 14, 2015
5
0
0
Maybe it's the program, maybe it doesn't let you copy it because you maybe aren't using full/pro/paid version. Sorry, can't help you tho, not specialized...
 

magicphone

Senior Member
Mar 20, 2013
106
6
0
forum.xda-developers.com
Maybe it's the program, maybe it doesn't let you copy it because you maybe aren't using full/pro/paid version. Sorry, can't help you tho, not specialized...

Huh? Please specify? What program do you refer to? Are you talking about the full/pro/paid version of which program? I lost the line.
 
Last edited: