[Q] Emulation of a USB DVD/CD drive with android? - Android Software/Hacking General [Developers Only]

Can we emulate a usb cd drive with android? I think that it would be usefull to use multiple iso files saved in the sdcard with putty, ubuntu, etc.
My Moto Defy has a "Portal and Tools" mode that emulates the driver cd...
Sorry for my English!

+1 on this!
My X8 with stock rom used to mount a virtual CD Drive with PCSuite software. I'm using a Gingerbread Mod now, and that's not possible now

Take a look on Usb Sharer
perrytheplatypus said:
Can we emulate a usb cd drive with android? I think that it would be usefull to use multiple iso files saved in the sdcard with putty, ubuntu, etc.
My Moto Defy has a "Portal and Tools" mode that emulates the driver cd...
Sorry for my English!
Click to expand...
Click to collapse
Take a look on Usb Sharer:
"With this application you can share the files in your devices individually, instead sharing full sdcard, this protect virus infection and the possibility to share undesired files.
Also you can create disk images, and store inside it all you want files and then share only disk image, and the rest of files will not be accessible from connected computer. These disk images can be created unencrypted or encrypted with LUKS.
Other great feature is the possibility to save in your device boot images like Ubuntu, Backtrack, Debian,... and boot up your PC with this operating system.
That is, your device will act as multiple usb key with desired content on it, preventing the need of write fully your sdcard."
https://sites.google.com/site/devwom/usb-sharer

Related

Tetherbot not working for Linux :(

Can someone help?
I got it working on XP but I also have Linux (Ubuntu) installed on this machine.
I can't seem to get it to work though.
Install the app on your android phone (DONE)
Turn USB debugging on on your phone (DONE)
On your G1 go to the home screen, press MENU > Settings > Applications > Development, then enable USB debugging. (DONE)
Follow the instructions here to install the Android driver (STUCK)
I tried creating the file and it saved ok but when I closed it, I got this error.
Code:
[email protected]:~$ sudo gedit /etc/udev/rules.d/50-android.rules
[sudo] password for lukehluke:
** (gedit:5985): WARNING **: Could not write gedit state file: Failed to create file '/root/.gnome2/gedit-2.6C18MU': No such file or directory
I/O error : No such file or directory
I/O error : No such file or directory
I have Intrepid and not Gusty/Hardy or Dapper.
Download and install the ADB utility from here (DONE)
Plug your phone into your computer (DONE)
Also when I try excuting the ADB file, I get the following error.
Code:
[email protected]:~$ /home/lukehluke/Desktop/adb/adb.exe forward tcp:1080 tcp:1080
run-detectors: unable to find an interpreter for
/home/lukehluke/Desktop/adb/adb.exe
Not sure about the first error. You might want to retry editing the rules file using nano or vim or emacs.
As for the second, you seem to have installed the windows version of the sdk or your path is point to the windows binaries.
Sounds like you don't have a /root directory? I've never seen that error before. If you want to use gedit, create the file in your home directory, then sudo mv it to /etc/udev/rules.d
As for the second, you need to install the android sdk for linux. The code is available from here: http://code.google.com/android/download.html
There may be a deb for ubuntu somewhere if you google. I just compiled it. The SDK contains the adb utility.
Lukehluke said:
Code:
[email protected]:~$ /home/lukehluke/Desktop/adb/adb.exe forward tcp:1080 tcp:1080
run-detectors: unable to find an interpreter for
/home/lukehluke/Desktop/adb/adb.exe
Click to expand...
Click to collapse
WTF? Can adb.exe be executed on Linux??
You'll enjoy a lot more success if you stop trying to run executables compiled for Windows in Linux
Do you need USB 2.0 for the tethering to work, or even just adb & mounting the G1 as a storage device? On my one laptop (w/ USB 2.0) I can adb into it fine, I have Ubuntu 8.10 and I never had to install any drivers (not manually at least), I never tried the tethering because I just do it through wireless using iptables -- if I ever need it.
The problem is with an older Toshiba laptop that has no NIC or wireless, I could get a dongle but I wanted to try changing the system wide proxy to go to the G1 once its plugged in -- make this into like my car PC or something. I only have a basic command line install of Ubuntu 8.10 right now but it won't even allow me to mount it as a drive. I see /dev/sdb get added when I plug it in, but not sdb1 for the actual data so I can't mount it (tried formatting as FAT32 & 16). (Note: I had this working fine with a basic flash drive -- thats how I got adb on there to check for devices - which didn't find anything either. Also I had it working with some belkin wifi usb a few months ago). Now that I think about it I didn't try it with just a regular USB cable to see if at least the mounting works, even though I def need the data cable for the tethering. So does it have to be USB 2.0? Also do I need the drivers just to adb or mount it (I'm pretty sure the driver is just for the actual tethering though)?
Thanks in advance for any help.
cl0s said:
Do you need USB 2.0 for the tethering to work, or even just adb & mounting the G1 as a storage device? On my one laptop (w/ USB 2.0) I can adb into it fine, I have Ubuntu 8.10 and I never had to install any drivers (not manually at least), I never tried the tethering because I just do it through wireless using iptables -- if I ever need it.
The problem is with an older Toshiba laptop that has no NIC or wireless, I could get a dongle but I wanted to try changing the system wide proxy to go to the G1 once its plugged in -- make this into like my car PC or something. I only have a basic command line install of Ubuntu 8.10 right now but it won't even allow me to mount it as a drive. I see /dev/sdb get added when I plug it in, but not sdb1 for the actual data so I can't mount it (tried formatting as FAT32 & 16). (Note: I had this working fine with a basic flash drive -- thats how I got adb on there to check for devices - which didn't find anything either. Also I had it working with some belkin wifi usb a few months ago). Now that I think about it I didn't try it with just a regular USB cable to see if at least the mounting works, even though I def need the data cable for the tethering. So does it have to be USB 2.0? Also do I need the drivers just to adb or mount it (I'm pretty sure the driver is just for the actual tethering though)?
Thanks in advance for any help.
Click to expand...
Click to collapse
Did you try mounting /dev/sdb? It sounds like your sdcard has a raw fat filesystem, instead of having a partition formatted with fat. Also, you have to click "mount" in the usb notification thing that comes up on your phone after you plug it in.
JesusFreke said:
Did you try mounting /dev/sdb? It sounds like your sdcard has a raw fat filesystem, instead of having a partition formatted with fat. Also, you have to click "mount" in the usb notification thing that comes up on your phone after you plug it in.
Click to expand...
Click to collapse
I did mount it on the actual device. Also I tried formatting it twice with gParted, both times with the full disk as the partition, once as fat32 and second time fat16. When I tried to mount /dev/sdb all that came up was something about couldn't find the partitions and it echo'd out the error a couple of times before it stopped, I forget the exact error but I'll check when I get home. I tried to mount it both as dos and vfat, no luck on the Toshiba, doing it on my Vaio though it was fine, both command line and just letting Gnome pick it up.
Also on the Vaio as soon as I plug it in I get /dev/sdb and /dev/sdb1, but not on the Toshiba. The Vaio has Ubuntu Desktop Edition while the Toshiba has minimum command line install, but I believe it shouldn't need anything special to mount the fat16 drive.
I'll try with a regular USB cable and making sure I have whatever dependencies to read Windows partitions when I get home later on and see if that does anything different. Thanks anyway.
I'm not sure why you would even try to format the USB drive. Not useful.
When you plug in the device, you should see a device appear but that is not the sdcard. That will not be visible until you select the notification which appears on the device and choose to mount the drive. At this point, the sdcard will appear in dmesg and can be mounted from Linux.
For adb purposes (which is for tethering), you first need to get adb working right. The absolute first step there is to get the window version of adb away, away, away- GONE!- and make sure you have the linux verison installed. Next you need to create the udev rules. If you use any text editor, create a file in /tmp called 50-android.rules containing one line:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
and save it. The sudo mv that file to /etc/udev/rules.d, you should be good to go. I would restart udevd just for grins (sudo /etc/init.d/udev restart), then plug in your phone again and see what adb devices gives you, taking great care to use the linux version of adb.
DebauchedSloth said:
I'm not sure why you would even try to format the USB drive. Not useful.
When you plug in the device, you should see a device appear but that is not the sdcard. That will not be visible until you select the notification which appears on the device and choose to mount the drive. At this point, the sdcard will appear in dmesg and can be mounted from Linux.
For adb purposes (which is for tethering), you first need to get adb working right. The absolute first step there is to get the window version of adb away, away, away- GONE!- and make sure you have the linux verison installed. Next you need to create the udev rules. If you use any text editor, create a file in /tmp called 50-android.rules containing one line:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
and save it. The sudo mv that file to /etc/udev/rules.d, you should be good to go. I would restart udevd just for grins (sudo /etc/init.d/udev restart), then plug in your phone again and see what adb devices gives you, taking great care to use the linux version of adb.
Click to expand...
Click to collapse
Haha, trust me I have no Windows anything on any of my machines. I was planning on putting fluxbox or icewm on this so I can have rhythmbox, totem, browser, pyroute - some big icons with the windows set to open full screen so i can use in my car and script it to mount the drive for the music or movies and start tethering and possibly create something to pass over the gps info for navigation when plugged in. If I get it to work with this older/slower laptop I can then def recreate it or something later on with like a mini-itx/atom based pc and a small touchscreen or something (even though in that case I might be better off just putting Android on it). Really just to **** around ya know..
I was formatting just trying to get mounting to work, I def made sure to enable the mounting on the G1 before I tried it but it just wouldn't mount, "adb devices" wouldn't find anything, but you're right about dmesg echoing stuff, but it was errors, as soon as I clicked mount on the G1. I'll try creating that file like suggested and a few other things.
I'll return with more specifics on the errors when I try this out. Thanks for all the help though.
cl0s said:
Haha, trust me I have no Windows anything on any of my machines. I was planning on putting fluxbox or icewm on this so I can have rhythmbox, totem, browser, pyroute - some big icons with the windows set to open full screen so i can use in my car and script it to mount the drive for the music or movies and start tethering and possibly create something to pass over the gps info for navigation when plugged in. If I get it to work with this older/slower laptop I can then def recreate it or something later on with like a mini-itx/atom based pc and a small touchscreen or something (even though in that case I might be better off just putting Android on it). Really just to **** around ya know..
I was formatting just trying to get mounting to work, I def made sure to enable the mounting on the G1 before I tried it but it just wouldn't mount, "adb devices" wouldn't find anything, but you're right about dmesg echoing stuff, but it was errors, as soon as I clicked mount on the G1. I'll try creating that file like suggested and a few other things.
I'll return with more specifics on the errors when I try this out. Thanks for all the help though.
Click to expand...
Click to collapse
I just set this up on my vmplayer running ubuntu, I can use adb shell so the tetherbot app should work..

installing pro 2 image files from usb

hi all
i have got the eu pro 2 image files downloaded but i dont klnow how to create a bootable USB stick with these files so i can boot from it on my pro and reinstall from scratch.
Any guides anywhere ???
thanks
paul
Haven't tried it with a recovery image specifically, but I've done this plenty with an install image. There are tools, but I do it semi-manually:
1. Locate suitable flashdrive whose contents you can erase (back them up if needed) and plug it in.
2. Run CMD or Powershell (as Administrator).
3. Run "diskpart" (all commands are given in quotes and should be typed without quotes) and accept the UAC prompt if needed.
4. In diskpart, type "list disk" to see the list of disks, then type "sel dis [#]" (replace [#] with the disk number for the flashdrive).
5. Type "lis par" to see all partitions on the disk (typically only one) then "del par [#]" for each one to delete them.
6. Type "create par primary" to create a new partition spanning the whole flashdrive, then "lis par" to make sure it's selected (star next to it).
7. Type "format quick" to create a file system on the new partition, then "assign" to give it a drive letter.
8. Type "active" to make the new partition the one the OS will attempt to boot from, when booting off that drive.
9. Assuming everything succeeded, you can now exit diskpart ("exit").
10. Either unpack (using a program like 7-Zip) or mount (Win8 can do this automatically, or there's lots of software for older Windows versions) the disk image.
11. Copy the entire contents of the disk image (you can just use Explorer for this part if you mounted it) to the flashdrive.
Congrats, you have a bootable flashdrive containing a Windows installation (or recovery) image.
GoodDayToDie said:
Haven't tried it with a recovery image specifically, but I've done this plenty with an install image. There are tools, but I do it semi-manually:
1. Locate suitable flashdrive whose contents you can erase (back them up if needed) and plug it in.
2. Run CMD or Powershell (as Administrator).
3. Run "diskpart" (all commands are given in quotes and should be typed without quotes) and accept the UAC prompt if needed.
4. In diskpart, type "list disk" to see the list of disks, then type "sel dis [#]" (replace [#] with the disk number for the flashdrive).
5. Type "lis par" to see all partitions on the disk (typically only one) then "del par [#]" for each one to delete them.
6. Type "create par primary" to create a new partition spanning the whole flashdrive, then "lis par" to make sure it's selected (star next to it).
7. Type "format quick" to create a file system on the new partition, then "assign" to give it a drive letter.
8. Type "active" to make the new partition the one the OS will attempt to boot from, when booting off that drive.
9. Assuming everything succeeded, you can now exit diskpart ("exit").
10. Either unpack (using a program like 7-Zip) or mount (Win8 can do this automatically, or there's lots of software for older Windows versions) the disk image.
11. Copy the entire contents of the disk image (you can just use Explorer for this part if you mounted it) to the flashdrive.
Congrats, you have a bootable flashdrive containing a Windows installation (or recovery) image.
Click to expand...
Click to collapse
I've been building windows deployment images for years and I build my boot drives similarly to how you describe. The problem I've had is in getting a uefi bootable drive which I can use to take a drive image before I deploy a new one. In the past I've used tools like Make PE3 to make some useful boot drives but i'm not having nay luck with the newer pe4 or getting an older pe3 image to boot.
Secure boot is off, windows detects the drive and lsit it in the boot menu it just doesn't boot. Any suggestions?
Will_nonya said:
I've been building windows deployment images for years and I build my boot drives similarly to how you describe. The problem I've had is in getting a uefi bootable drive which I can use to take a drive image before I deploy a new one. In the past I've used tools like Make PE3 to make some useful boot drives but i'm not having nay luck with the newer pe4 or getting an older pe3 image to boot.
Secure boot is off, windows detects the drive and lsit it in the boot menu it just doesn't boot. Any suggestions?
Click to expand...
Click to collapse
Try pressing VOL - (I think its -, might be +) as it boots with the flash drive plugged in
lopezk38 said:
Try pressing VOL - (I think its -, might be +) as it boots with the flash drive plugged in
Click to expand...
Click to collapse
Thanks friend but that is not the issue. I can initiate the boot from USB but none of the boot images I've used in the past or that I've create new successfully boot. This problem is limited just to the surface pro.

Replacing Built- in CD-rom .iso on mtk devices

First off this has only been tested on my chinese mt6582 chipset phone. (HDC Note 3 N9000)
It came with a build in CD-Rom option when connected to the computer which mounts an iso file that has a single pdf file, this guide will show you how to replace the .iso file with anything of your choosing.
In this tutorial I will be using the following:
Root Explorer
A rooted mt6582 phone
Damn Small Linux .iso (any .iso should work)
Let's begin,
Start by placing the .iso file on your sdcard
Open Root Explorer and navigate to /system/mobile_toolkit/
In the upper right hand corner tap "Mount R/W"
Copy or move iAmCdRom.iso to your sdcard to have a backup
Move the .iso file you placed on your sdcard to /system/mobile_toolkit/
Rename the .iso file to "iAmCdRom.iso" (spelling has to be exact)
Reboot
Connect usb to computer
Select to connect as "Build-in CD-rom"
It is as simple as that!
Now when you can use your phone to boot operating systems or you can even create your own ISO that contains drivers for your phone
If your phone is a MediaTek device and has the same file structure and option to mount a CD-Rom it should work - if it does please comment and let me know so I can get a running list of compatible devices
How I can load more large image?
How I can load more large image? For example for 2Gb?

Turning an existing phone into a virtual machine

I have an older Samsung Galaxy SII phone that I'm using to 'play with', to get a better understanding of the android file-system and how everything works.
What I'm trying to do is converting this existing phone to a virtual machine. I already tried to following;
- I made a physical image of the device and got a nice .bin file.
- I converted the .bin file to a virtual disk in .vdi format
(Linux command; "VBoxManage convertdd galaxy-s2.bin galaxy-s2.vdi")
(I also tried the following command, for a VMWare virtual disk; "sudo qemu-img convert galaxy-s2.bin galaxy-s2.vmdk", same problem in VMWare when booting)
- Then I created a virtual machine in virtualbox and selected the .vdi image. Obviously it didn't work, because I guess it's missing a bootloader?
(Error message; "FATAL: No bootable medium found! System halted.")
The above steps were the easy way and I already had in mind that this was to easy and not going to work.
So my questions are;
- Does anyone have any feedback about the above steps I took? Was "vboxmanage" the right tool to use or did I miss something?
- Is there a way to add a bootloader to a raw .bin file and converting it to a bootable virtual harddisk?
- Does anyone already tried converting a used phone to a virtual machine, containing the original data of the physical phone, etc.?
Thanks! Looking forward learning more about virtualizing existing physical phones. :good:
What you are doing sounds super interesting. I still consider myself a novice at digital forensics but maybe I can help you out.
How did you image the device? Getting a physical image of a device is a bit tricky. From what I remember, you either have to root the device and then run dd on several files in /dev/mtd, or use special forensic tools (MPE, Cellebrite, XRY,…).
kolejnik said:
What you are doing sounds super interesting. I still consider myself a novice at digital forensics but maybe I can help you out.
How did you image the device? Getting a physical image of a device is a bit tricky. From what I remember, you either have to root the device and then run dd on several files in /dev/mtd, or use special forensic tools (MPE, Cellebrite, XRY,…).
Click to expand...
Click to collapse
Thanks! In this case I got a physical image of the phone with the "Universal Forensic Extraction Device" from Cellebrite. I think that tool does some sort of temporary rooting.
I also created a new virtual machine with a similar Android version iso file. I added the virtual hard-disk of the phone I imaged (the Galaxy SII) to that virtual machine. When I wanted to install Android to a blank virtual disk, it did recognize the Galaxy SII image, but I was unable to mount it.
At the "choose partition" menu, during the Android installation, it said;
- sdb1 == EFI GPT == VBOX HARDDISK
Then I got an error, saying; "Cannot mount /dev/sdb1", "Do you want to format it?"
Maybe we need to find a way to add something to that raw image, like a bootloader or something? Or maybe I'm missing something else. I'll keep trying to get the virtual machine to work.. Any feedback or comments are appreciated, thanks!

how to clone device

Hello.
Is there a way to do copy of memory of entire device (settings of partition, datas on this partition...) I have two the same devices and I want to do exacly clone one to another.
I'm talking about lenovo tablets with MTK.
BR
My solution suggestion:
Both phone's Android must be rooted so all partitions can get accessed in R/W mode. A Windows computer with ADB installed on, an USB-hub with at least 2 ports is required.
You connect both phones at same time with Windows computer, you establish an ADB connection with both phones.
Then via a Windows command script you pull out complete contents of source phone and push back contents to target phone.

Categories

Resources