[APP IDEA] Mount disk image as USB mass storage - Android Software Development

Hi, this is my first post here. I've been meaning to sign up for a while, but just had an idea for an app that I can't make and decided I had to spam it somewhere in case it inspires someone. Anyway, here it is:
If it was somehow possible to mount a disk image instead of the actual SD card, it might be possible to have a bunch of handy boot images for fixing and administering computers.
For example SystemRescueCD, Ubuntu's mini install CD and a Windows password recovery disk would fit into about 150MB, which is tiny compared to a 16GB SD card.
Would this be possible? I guess it would require root if it was, but it would turn your Android device into an administrator's swiss army knife.

Sounds like a cool idea if possible...

I was actually exploring this a little bit.
First issue is you can't mount an iso (ISO9660/CDFS) under Android, however, you could an ext3 image. I didn't get much further than this when looking into mounting images.
Second issue is, I have no idea how to tell Android to mount /this/path/to/usb/mass/sotrage rather than /sdcard.
I will be messing with this some where when I can. I think I'd tackle the second issue before the rest of the first one since I'm sure a fat32 (for Windows) or a ext2 image could be mounted and booted from in general.
I'll post any updates if I find anything out.

I've made quite a bit of progress on this idea. I have successfully mounted a usb drive image and been able to share that via USB Mass Storage. My problem now is, I can't seem to get my Captivate to be seen as a bootable USB drive on a PC that is booting.

asshopo said:
I've made quite a bit of progress on this idea. I have successfully mounted a usb drive image and been able to share that via USB Mass Storage. My problem now is, I can't seem to get my Captivate to be seen as a bootable USB drive on a PC that is booting.
Click to expand...
Click to collapse
I would be interested in knowing how you did this, if you'd care to share it

I would like to know how you did that too

I have been wondering/playing around with that same idea.
I also looked for the /system/ect/cdrom.iso file that all these posts seem to mention as well and have been unable to locate it.
There are three ideas that I would like to put out there...
1.) Replace the Virtual "Motorola Driver" CD that auto loads when "USB Mass Storage" is on and "USB debugging" is off.
If you enter the boot menu on a computer with those options. When you go under CD-ROMs to boot from, you will see "USB-CDROM0: MotorolaMB810 000" as an option. This depends on your phone of course.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
2.) Put an ISO on the internal memory and have the OS auto mount it as per an app or some start up script. (Would be nice to have a widget that when on mounts an bootable ISO for us techs)
3.) Create a 2nd partition on the SD card that computers recognize as a boot drive. (Prob the most limiting of the three and not the one I'd like to see be done compared to the others.

Has anyone looked at this? Can't seem to get to work on my GS3 though...
ISOlatr;
https://play.google.com/store/apps/...51bGwsMSwxLDEsImNvbS5maW5hbHVzZS5pc29sYXRyIl0.
DriveDroid;
https://play.google.com/store/apps/...EsImNvbS5zb2Z0d2FyZWJha2VyeS5kcml2ZWRyb2lkIl0.

Related

To those having problems

this is to EVERYONE that is having an issue using Paragon to partition their card to ext2/ext3. simple solution and it will NEVER fail. are you ready for this???
USE LINUX
now that that's out of the way you can go
here to download the .iso
or
here to order a live CD of the latest ubuntu distribution you will have to register an account but it's free and free to get the CD shipped to your home(AND YOU GET STICKERS!!!!)
this is the EASIEST way to partition your card. before starting backup everything on your card
1. after downloading the .iso burn it to a cd/dvd
2. reboot your computer with the disk still in the cd drive
3. boot to the CD(your computer may or may not be set up to try the cd first so f10 or f12 will usually get you the boot menu)
4. choose your language
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
5. choose the first option "try ubuntu without any changes to your computer"(or something like that)
6. wait for the computer to start up which might take a while as it is loading the OS from your cd drive
7. plug your phone into your computer and mount it
8. click System>Administration>Partition Editor
9. in the top right there is a little box that will let you choose what drive you want to edit(PLEASE MAKE SURE YOU CHOOSE THE CORRECT ONE)
10. after you have chosen your sd card it will appear in the main window with a horizontal graph above it showing your usage
11. right-click on the card in the main window and unmount it
12. go to the top and click Device>Create New Partition Table
13. you now have a totally blank sd card that is unformatted and not recognisable by windows or your phone
14. right-click on the unallocated space and create a new partition and format it as a primary partition and FAT 32, resize to the size you want to be FAT 32
15. right-click on the unallocated space and create a new partition and format as primary partition and make sure it is ext2/ext3 pending the ROM. this is the size of your apps partition
16. at the top click apply and it will go through the steps of partitioning your card.
if you get any errors for any reason at all you probably did something wrong, but check the details and post the error message here and i will answer it as soon as i can.
most times an error will occur because you forgot to unmount the drive from the partition editor. i know it seems stupid but you have to mount the card so the computer sees it, then unmount it so it can be edited.
screen shots will be up tomorrow when i wake up. please post here if you cannot figure this out
Just did this and I can confirm it worked flawlessly. Directions are clear and to the T.
Thanks a lot for this man, once my business starts making some money I'll float you a little present via PayPal, cuz this was just brilliant.
DON'T EVEN THINK ABOUT USING PARAGON - USE THIS GUIDE INSTEAD
Also, Ubuntu looks cool as hell!
glad this helped someone out
after my new 8g card arrived yesterday, i tried to format it and make the partitions via the rom manager app, which failed. dunno why, but it didn't do the trick. so i stumbled across this guide and it's idiot-proof so thx alot. did the trick and everything works nicely

Mysterious boot problem.

So I busted out my nook the other day and for some odd reason the lil guy won't boot. Now I have poured through multiple "it won't boot " forums and tried a few things. I made a bookable sd, and didn't work, dried the battery, didn't work, plugged it into my laptop, didn't work and the only thing it does is boot up to the cyanogenmod screen where the text loading appears but then stays there forever. When an attempt to boot into recovery is made it will stay at the booting into recovery screen also. If anyone could help I would very much appreciate it.
Edit: pics in second post
Sent from my lil electrify
If the uSD isn't booting, then it may not be formatted correctly. Make sure when you make the bootable uSD that you use "Restore virtual hard disk image on physical drive" in WinImage, "write disk" just copies the files without making the uSD bootable. You'll probably need to reinstall CM7.
It was charging all day.....
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Sent from my lil electrify
If the uSD isn't booting, then it may not be formatted correctly. Make sure when you make the bootable uSD that you use "Restore virtual hard disk image on physical drive" in WinImage, "write disk" just copies the files without making the uSD bootable. You'll probably need to reinstall CM7.
Click to expand...
Click to collapse
I'll try it out, thanks
Sent from my lil electrify
uhhhh
sooo on further review I would like to ask how you go about the process you described for me. I have never previously used winimage. instead I used win32disk.
slicedcheese said:
sooo on further review I would like to ask how you go about the process you described for me. I have never previously used winimage. instead I used win32disk.
Click to expand...
Click to collapse
win32disk works better for me. Can you get into recovery by hitting/holding the n button before the cm loading screen comes on.
Sent from my Xoom using Tapatalk
if you have the image burned ontoo a sd card, it will load recovery straightaway, before the cyanogen screen.
slicedcheese said:
sooo on further review I would like to ask how you go about the process you described for me. I have never previously used winimage. instead I used win32disk.
Click to expand...
Click to collapse
Go to the winimage site and download version 8.1 - not the current version.
After you install it, unplug any portable hard drives or other drives connected to the computer. The only thing you want plugged in is your MicroSD card - it would really suck to reformat an external HDD by accident.
Open up Winimage, and in the file menu up at the top, select 'Disk'
From the drop-down menu that opens, we have to do 2 things.
First, choose "use disk X:" - where X equals the drive letter of your MicroSD card.
Second, open the drop-down menu again, and then choose "restore virtual hard disk image on physical drive"
Follow the instructions you are prompted with to complete the operation - that should be the info you need to get yourself started with it.
When you go to look for the image to restore, remember to go to the bottom of the open window and choose "all" (or whatever the option is)
Forgive me, running from memory and it's not right in front of me - if you need a clearer set of directions just say so and when I get back to my computer i'll walk through it and explain it more completely.
I have a step-by-step description in my signiture (though it is for making a bootable sd using the verygreen method).
You can either follow it or insert eyeballer for verygreen if you're planning to install to emmc.

[Q] Win8 mounting my N4 without a drive letter. Help?

Ok so I am having this problem with my Nexus 4 and the way it is being mounted (if thats the right word) to Windows 8.
I have used the WUGS root toolkit to root and unlock and whatever my phone so I have done the driver thing that comes with that (sorry im a noob) but even before that I was never able to get my N4 to mount "with a drive letter" (if you will).
Here is a screen shot to help explain,
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
If you will notice I have Windows (C and SSD (D and if i were to plug in a USB flash drive it would be assigned a letter and it would show up. For whatever reason it would seem my N4 is being treated as a camera or some other type of device because It is not being given a drive letter. Instead the weird external HD icon is there and then the harddisk icon labeled Internal Storage.
Some things i have tried, or know i have set: Media Device (MTP) is the selected mode on my phone, i have tried it the other way to no success. my phone does have android debugging enabled, I have tried resetting the windows autoplay settings and selecting a different option (before it auto opened explorer to the internal storage folder).
I am currently running Paranoid Android 3.60 however I had the same problem since the day i got my Nexus 4 with stock everything on it. I believe its an issue with the way my windows 8 computer treats it.
If anyone can help me that would be greatly appreciated. thank you!
I think this has to do with it not having mass storage mode. So that means that a computer will only detect it as a media device, not a USB storage device, and so it isnt mounted, it is accessed. If it was mounted, it would have to be unmounted from the device from which it is connected to, and if it was disconnected, you wouldnt be able to access the files on the phone itself.
Well thats why i think it doesnt mount with a letter.
Maeur1 said:
I think this has to do with it not having mass storage mode. So that means that a computer will only detect it as a media device, not a USB storage device, and so it isnt mounted, it is accessed. If it was mounted, it would have to be unmounted from the device from which it is connected to, and if it was disconnected, you wouldnt be able to access the files on the phone itself.
Well thats why i think it doesnt mount with a letter.
Click to expand...
Click to collapse
This makes some sense to me, but can you elaborate on how i might get my computer to mount my android device? is there a reason it was set up like this? Is it my phone or my computer that is the cause? Anything else you can tell me would be great. Thanks
the4ndy said:
This makes some sense to me, but can you elaborate on how i might get my computer to mount my android device? is there a reason it was set up like this? Is it my phone or my computer that is the cause? Anything else you can tell me would be great. Thanks
Click to expand...
Click to collapse
Nothing is the cause, its just how it interacts with a computer, so neither the computer or phone are at fault, its just how the tech is made. I tried googling for you on how to get a MTP device to get a drive letter, but its getting late for me, and im coming up with zilch. I hope someone else can help you out.
Maeur1 said:
Nothing is the cause, its just how it interacts with a computer, so neither the computer or phone are at fault, its just how the tech is made. I tried googling for you on how to get a MTP device to get a drive letter, but its getting late for me, and im coming up with zilch. I hope someone else can help you out.
Click to expand...
Click to collapse
hmmmmm, that seems like a flaw in the tech. why did they develop MTP mode / why do we even use it if it lacks the ability to mount it to a drive letter? im assuming there are benefits I am not aware of. Thanks for your help. Ive been doing googling as well but havent come up with anything. I have a little more knowledge on the issue thanks to you and so I will try my searches again. THanks.

View files on PC using adoptable storage

I know that adoptable storage is encrypted, but is there any way to easily transfer the contents from my phone to my PC now? I just want to take pictures off and move them onto a network drive. I have TWRP 3.0.0.0, MM (without the Feb security update, since that still won't install), and an unlocked bootloader. I am NOT rooted, but am willing to do so if that will solve this issue.
Haven't heard of anyone successfully doing this as of yet. Perhaps a future Android update will fix this or a solution will arrive via a xposed module. The best workaround currently is to backup photos to Google drive (or some other service like OneDrive) and retrieve that way.
Sent from my awesome phone!
I have access to my files on PC.
lafester said:
I have access to my files on PC.
Click to expand...
Click to collapse
Is your SD card set as portable storage or as Adoptable storage? I know that portable storage allows PC access (since it is not encrypted), but have been unable to access from my PC since converting to adoptable.
Adopted of course. You allow access and it still doesn't show on PC?
lafester said:
Adopted of course. You allow access and it still doesn't show on PC?
Click to expand...
Click to collapse
Well, what do you mean by 'allow access'? Are you talking about one of the options from the USB debugging notification in Android, or something different?
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Whoa- I definitely have tried messing with those USB settings to no avail, but when I looked at your screenshot, I noticed that you had USB debugging turned off (mine was on).
When I turned it off, I could now see the SD card listed in Windows (progress!) but got a new error coming from Windows:
"The device is currently busy and its contents many not be fully displayed. If another application is copying data to or from the device, please wait for it to finish and then retry."
When i click 'Ok', it returns me to the Windows Explorer screen showing my SD Card as empty. When i re-clicked on the SD Card in the Explorer nav bar, after a few tries i could see my files (i sometimes have to change the 'Use USB for' setting for some reason. Sometimes Transfer Photos seems to work, and sometimes Transfer Files. I'm not sure why the erratic behavior, because i can now at least get to my files as needed.
It seems that (at least for me), I need to turn off USB debugging to see my files. Has this always been the case? I can't remember needing to disable it in the past- maybe it behaves differently now.
Either way, many, many thanks!
No it works fine with debugging turned on as well. I suspect a driver issue with Windows. Or, a faulty cable.

PLEASE HELP! Trying to recover lost Mi9T data and almost there

Gentlemen. And Ladies.
First of all I'd like to all thank you for all your work and input as community of xda-developers.
I came here seeking for your help. I am trying to recover the pictures and videos I lost after accidentally performing factory reset. Since the factory reset I havent been using the phone so as least data as possible is overwritten. My phone is rooted and have Busybox installed.
So far I was able to copy a user data disk (I hope I chose correct one: '/dev/block/bootdevice/by-name/userdata' ) via adb from the device to my computer as a file 'userdata.raw' which has around 111gb. I've tried to mount the 'userdata.raw' as a virtual disk using OSFMount - this resulted in appearance of D: disk partition but it's not accessible via Windows Explorer (as it was corrupted). Afterwards I tried to recover data from that mounted D: drive using ActiveUNDELETE but the program doesnt see that D: Disk in the volumes list. Now I am trying to recover using qphotorec which is able to see D: drive as f2fs system. I'm also trying to restore the data directly from that 'userdata.raw' file using qphotorec. But both of these methods result only in outputting the one file: 'f60340268.swf' of around 3gb in size. Overall overview of the whole process is attached on the overwiew screenshot.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Now I think there are three scenarios but may be more:
I chose the wrong userdata disk while copying it via adb to on my PC. I picked '/dev/block/bootdevice/by-name/userdata'.
On the screenshot above you can see all the other locations which 'adb shell' -> 'su' -> 'df' outputs (number 1. window in left top corner)
I am doing something wrong while mounting the 'userdata.raw' as a virtual disk thus ActiveUNDELETE can't see it. Or doing something wrong while recovering the data directly from 'userdata.raw'
Contents of '/dev/block/bootdevice/by-name/userdata' is encrypted which results in receiving odd 'f60340268.swf'
file weighing around 3gb. You can see both the contents of 'f60340268.swf' and'userdata.raw' after running strings command on them. See attached Strings screenshots.
It feels like I am almost there but I got stuck and dont know how to approach this any further.
For copying user data disk from mi9t to my pc I followed guides I found here: https://stackoverflow.com/a/41397418
Windows won't explore raw files, you have to use linux or some software to recover your data, like minitool mobile recovery
yaro666 said:
Windows won't explore raw files, you have to use linux or some software to recover your data, like minitool mobile recovery
Click to expand...
Click to collapse
I tried minitool mobile recovery but no luck. I also tried minitool and diskdrill but same results - both of these apps dont see the monuted userdata.raw as D: drive. As it was not there. Windows Disk Management doesnt see it neither.
The only app that's able to see it is qphotorec but it determines file system type as f2fs
anyone?

Categories

Resources