[MOD] Flashable Sync Manager ISO Replacement (Mount Virtual CD from Phone)

Search This thread

closeone

Senior Member
Jan 11, 2012
1,098
1,463
Just a quick note for anyone strolling in. I am still supporting this modification. If you have any questions or comments, please feel free to post.

Hello everyone. Hopefully this hasn't been done before. This mod is a bit more of a fun one (In my humble opinion :)).

You may have noticed that when you connect your phone up to a computer, while booted into a Sense-based ROM, the phone will mount two drives -- one being a mass storage device, and the other being a CD-ROM drive. Interestingly enough, when you select HTC Sync Manager from the USB connection type list, it makes the computer think that you inserted a CD-ROM.

That's interesting because that means that you could essentially hook the phone up to just about any computer, and it would recognize that "CD-ROM drive."

Background
I found that you can actually change that CD-ROM to just about anything you could possibly want (having some trouble with bootable ISOs though).

There is a file named PCTOOL.ISO inside the /system/etc directory that normally contains the HTC Sync Manager Software. By replacing that ISO with another, it'll mount that one instead. Because there isn't too much room to spare in the /system partition, the file should probably be kept relatively small.

Okay. Why does this matter? I can think of two reasons:

1. ROM Developers can include a package that contains a copy of the ADB and Fastboot executables within their ROM. ADB would be useful while the device is on; Fastboot would probably have to be copied to the computer.
2. Because the ISO is mounted as Read-Only media, it could be incredibly useful for field technicians who need to run portable software, without the risk of being infected with a virus on the host machine.

Info/Download
It's not hard to create these ISOs, and flash them to the phone. I can put up a how-to in the second post if anybody would like me to.

For now, here's a flashable zip containing ADB and Fastboot executables for Windows, Linux, and Mac OS X.

Just flash the file like you would flash any other.

There is an old version of the PCSC.apk in this file. A newer version is here for the time being.
Download

How to use
To use it, while booted, change the device-connection type to HTC Sync Manager. Tap 'Done'. You'll likely see a message on the phone that says "Connecting to HTC Sync Manager ..." Just tap the back button on your phone to clear that message.

On your computer:
If you're running Windows, you may get an AutoPlay window that gives you the option to launch the "ADB and Fastboot Command Prompt." If you click that, you'll get a Command Prompt Window that's pointed at the drive already. To use any of the commands, just type adb [COMMAND], or fastboot [COMMAND] (again, fastboot may be useless unless copied to the computer).
If you don't get an AutoPlay window, open up the CD-ROM drive, and double-click on the 'ADB_FASTBOOT_SHELL.BAT' icon to bring up the window. That batch file contains only one command (just to launch the Command Prompt to the CD location).
If you're running Linux, you may have to copy the binaries over to your computer to use them (they may not have correct permissions).
On Mac OS X, you'll likely have to open a terminal window and navigate to the CD-ROM drive to use them.

I know that this isn't anything huge, but I'll put this down here anyways. Developers, if you are interested in the ADB/Fastboot ISO or flashable ZIP, and would like to include it in your ROM, please feel free to do so. Modify it however you like. Only thing that I would ask of you is that you post here (or even PM me) saying that you used it. I'd just love to see if/where it's being used. This isn't a strict requirement though. :) Thanks!

Disclaimer: I am not responsible for anything that happens (including, but not limited) to your phone, computer, Sprint contract, etc. This is provided free of charge without any warranty.
 
Last edited:

kaos420

Account currently disabled
Dec 21, 2007
3,938
2,095
Usa
meettomy.site
This is extremely interesting to me my friend. I ordered a 64gb sd so i could store pc repair programs such as hiren or others. So i woild always have with me. If i could just load a iso. God that would kick but. Id have a few o.s so ready at all times lol

Sent from my ice cream powered Evo Lte!
 
  • Like
Reactions: closeone

drewski83

Senior Member
Apr 27, 2008
331
51
South GA
I definitely like the idea and possibilities this has. Good find, Closeone! I am goin to download just to keep for future. As I am only rooted stock, but I do plan to unlock soon. Was waiting on s-off but doubt that'll happen anytime soon, being that u can still flash kernels n etc with just unlocked bootloader.

Sent from my LTEVO via Tapatapa
 
  • Like
Reactions: closeone

pinky059

Senior Member
Oct 8, 2010
522
156
Baltimore
Samsung Galaxy S20
When I connect my EVO to my PC running Windows 7 64 bit , it doesn't recognize it as MTP (Thank God, by the way....IMO), it mounts as a normal USB flash drive. I didn't install HTC Sync, so I am not sure if that has anything to do with it.

Are you referring to bone stock and you click on the Disk drive icon or the HTC Sync Manager when you plug in?

Just curious if I am using drivers that maybe others might get use of...
 
  • Like
Reactions: closeone

closeone

Senior Member
Jan 11, 2012
1,098
1,463
This is extremely interesting to me my friend. I ordered a 64gb sd so i could store pc repair programs such as hiren or others. So i woild always have with me. If i could just load a iso. God that would kick but. Id have a few o.s so ready at all times lol

Thanks! I'm not sure about the ability to boot. I did try a bootable ISO, which unfortunately was unable to boot. I may have to look closer into this. Also, the size restriction might hold you back. I wouldn't load a huge ISO into the /system partition, but there is one of two different things might be able to be done. One would be to possibly symlink the ISO and have it load from another place, the second would be to modify where the software would load the ISO from. Humm...

I definitely like the idea and possibilities this has. Good find, Closeone! I am goin to download just to keep for future. As I am only rooted stock, but I do plan to unlock soon. Was waiting on s-off but doubt that'll happen anytime soon, being that u can still flash kernels n etc with just unlocked bootloader.

Thanks, drewski83!

When I connect my EVO to my PC running Windows 7 64 bit , it doesn't recognize it as MTP (Thank God, by the way....IMO), it mounts as a normal USB flash drive. I didn't install HTC Sync, so I am not sure if that has anything to do with it.

Are you referring to bone stock and you click on the Disk drive icon or the HTC Sync Manager when you plug in?

Just curious if I am using drivers that maybe others might get use of...

The only way, I believe, that the system will mount the phone as MTP (or is it PTP in this implementation?) is by selecting the Media sync option when connecting. The two advantages I see to mounting it this way are that the SD Card doesn't have to be dismounted while connected, and the device shows both the "Internal SD" and the actual SD Card as separate drives that you can copy files to and from.

I haven't installed HTC Sync either. I'm referring to most any Sense-based ROMs for this device. If the phone doesn't give you a choice, it's possible that it's still hidden in the notification menu. If not, you can change that by going into Settings > Connect to PC, and tap Ask me, or you can change the default connection type from within that menu as well.

~co~
 

bard77

Senior Member
Oct 21, 2011
168
72
Los Angeles
Quick question...if you flash this mod, do you have to reflash it every time a new ROM is flashed? Thanks in advance
 

jamiphar

Senior Member
Jul 29, 2011
74
12
Millstadt, IL
Closeone, good job on finding this!

I do computer repair, and I currently have an external 2.5" drive set up to be bootable to a Grub bootloader. From Grub, I can boot any ISO or boot partition on the drive. With the Sync Manager emulating a CD-ROM drive instead of showing up as a disk drive, it would be a huge advantage for booting, letting any computer (especially older ones) recognize it.

If you could find a way to keep the phone in Sync Manager even when it's not connected, the computer's BIOS should be able to see it as a CD-ROM and boot from it. As it is now, my BIOS won't see it because it's not treating the phone like a USB device. It would be excellent if you could map to an ISO on a different partition. Another option is to have the loaded ISO simply bring up a bootloader to boot from any ISO/partition you want, though this takes away the advantage of the selected ISOs being recognized as a CD-ROM drive. Grub can have problems when you boot from an ISO of a live CD and the booted OS needs to access the disc. The OS can't find a CD-ROM, so it doesn't work.

If you could successfully map this to an ISO on the SD card, you could even build a little app to let you choose which ISO you want to be selected. You could simply have it remap to the different folders with the respective PCTOOL.ISO files. For example, if you select "Acronis" from the app menu, it would direct it to sdcard/acronis/PCTOOL.ISO, and if you select "Ubuntu," it would map to /sdcard/Ubuntu/PCTOOL.ISO.

I hope this is all clear enough. Once I read this, I got pretty excited about all the possibilities! ;)
 
  • Like
Reactions: closeone

webdude12

Senior Member
Jun 22, 2007
217
52
This is going to be awesome if things can be modified to make this a bootloader. I would even donate for this functionality if someone wanted to tackle it.

Having the ability to have things like UBCD, Win XP PE (With Antivirus / MalwareBytes), etc as options running straight from my phone would be a computer guy's dream.
 
  • Like
Reactions: closeone

closeone

Senior Member
Jan 11, 2012
1,098
1,463
Closeone, good job on finding this!

I do computer repair, and I currently have an external 2.5" drive set up to be bootable to a Grub bootloader. From Grub, I can boot any ISO or boot partition on the drive. With the Sync Manager emulating a CD-ROM drive instead of showing up as a disk drive, it would be a huge advantage for booting, letting any computer (especially older ones) recognize it.

If you could find a way to keep the phone in Sync Manager even when it's not connected, the computer's BIOS should be able to see it as a CD-ROM and boot from it. As it is now, my BIOS won't see it because it's not treating the phone like a USB device. It would be excellent if you could map to an ISO on a different partition. Another option is to have the loaded ISO simply bring up a bootloader to boot from any ISO/partition you want, though this takes away the advantage of the selected ISOs being recognized as a CD-ROM drive. Grub can have problems when you boot from an ISO of a live CD and the booted OS needs to access the disc. The OS can't find a CD-ROM, so it doesn't work.

If you could successfully map this to an ISO on the SD card, you could even build a little app to let you choose which ISO you want to be selected. You could simply have it remap to the different folders with the respective PCTOOL.ISO files. For example, if you select "Acronis" from the app menu, it would direct it to sdcard/acronis/PCTOOL.ISO, and if you select "Ubuntu," it would map to /sdcard/Ubuntu/PCTOOL.ISO.

I hope this is all clear enough. Once I read this, I got pretty excited about all the possibilities! ;)

This is going to be awesome if things can be modified to make this a bootloader. I would even donate for this functionality if someone wanted to tackle it.

Having the ability to have things like UBCD, Win XP PE (With Antivirus / MalwareBytes), etc as options running straight from my phone would be a computer guy's dream.

Apologies for my late response. I've been... tied up for the last couple weeks.

Thanks. ;) Precisely. I thought that it would be a nice tool for technicians. I work in that field myself. There are a few problems that I noticed with how the PCTOOL.ISO is accessed. From my understanding, I believe that the problem with reading it from the SD Card (Internal Memory or External) is that it doesn't expect that it's going to be reading from a FAT32 formatted partition. It gets a bit more difficult with the fact that a huge ISO really probably shouldn't be placed in your system partition. Making it bootable is messy (I mean, it was intended for a completely different use in the first place though :)). At the very least, an ISO with your favorite portable applications can be put in there and loaded up when needed. That alone is very valuable because it acts as read-only media, the phone can't be infected with anything nasty from the computer you plug it into.

Thanks again!
~co~
 

webdude12

Senior Member
Jun 22, 2007
217
52
Why could we not partition a section of the SD card as EXT3 or whatever PCTOOL.ISO wants to see, then create a symalink as mentioned? Nothing says the entire SD card has to be partitioned FAT32. I actually had part of mine partitioned as EXT2 for the longest time, because the card wasnt always in my phone. :)
 
  • Like
Reactions: closeone

closeone

Senior Member
Jan 11, 2012
1,098
1,463
Why could we not partition a section of the SD card as EXT3 or whatever PCTOOL.ISO wants to see, then create a symalink as mentioned? Nothing says the entire SD card has to be partitioned FAT32. I actually had part of mine partitioned as EXT2 for the longest time, because the card wasnt always in my phone. :)

True. True. I didn't think about that. The first thing that's got to be done though is making the phone mount the ISO, or at least not wait for a request from the computer to go ahead and make the phone pop up with the menu of actions, and in turn say to the computer "Hi there, I see that you're booting. I'm a USB CD-ROM drive. Oh yeah, and you can boot from me now." Easier said than done, at least for myself.

~co~
 

Top Liked Posts

  • There are no posts matching your filters.
  • 21
    Just a quick note for anyone strolling in. I am still supporting this modification. If you have any questions or comments, please feel free to post.

    Hello everyone. Hopefully this hasn't been done before. This mod is a bit more of a fun one (In my humble opinion :)).

    You may have noticed that when you connect your phone up to a computer, while booted into a Sense-based ROM, the phone will mount two drives -- one being a mass storage device, and the other being a CD-ROM drive. Interestingly enough, when you select HTC Sync Manager from the USB connection type list, it makes the computer think that you inserted a CD-ROM.

    That's interesting because that means that you could essentially hook the phone up to just about any computer, and it would recognize that "CD-ROM drive."

    Background
    I found that you can actually change that CD-ROM to just about anything you could possibly want (having some trouble with bootable ISOs though).

    There is a file named PCTOOL.ISO inside the /system/etc directory that normally contains the HTC Sync Manager Software. By replacing that ISO with another, it'll mount that one instead. Because there isn't too much room to spare in the /system partition, the file should probably be kept relatively small.

    Okay. Why does this matter? I can think of two reasons:

    1. ROM Developers can include a package that contains a copy of the ADB and Fastboot executables within their ROM. ADB would be useful while the device is on; Fastboot would probably have to be copied to the computer.
    2. Because the ISO is mounted as Read-Only media, it could be incredibly useful for field technicians who need to run portable software, without the risk of being infected with a virus on the host machine.

    Info/Download
    It's not hard to create these ISOs, and flash them to the phone. I can put up a how-to in the second post if anybody would like me to.

    For now, here's a flashable zip containing ADB and Fastboot executables for Windows, Linux, and Mac OS X.

    Just flash the file like you would flash any other.

    There is an old version of the PCSC.apk in this file. A newer version is here for the time being.
    Download

    How to use
    To use it, while booted, change the device-connection type to HTC Sync Manager. Tap 'Done'. You'll likely see a message on the phone that says "Connecting to HTC Sync Manager ..." Just tap the back button on your phone to clear that message.

    On your computer:
    If you're running Windows, you may get an AutoPlay window that gives you the option to launch the "ADB and Fastboot Command Prompt." If you click that, you'll get a Command Prompt Window that's pointed at the drive already. To use any of the commands, just type adb [COMMAND], or fastboot [COMMAND] (again, fastboot may be useless unless copied to the computer).
    If you don't get an AutoPlay window, open up the CD-ROM drive, and double-click on the 'ADB_FASTBOOT_SHELL.BAT' icon to bring up the window. That batch file contains only one command (just to launch the Command Prompt to the CD location).
    If you're running Linux, you may have to copy the binaries over to your computer to use them (they may not have correct permissions).
    On Mac OS X, you'll likely have to open a terminal window and navigate to the CD-ROM drive to use them.

    I know that this isn't anything huge, but I'll put this down here anyways. Developers, if you are interested in the ADB/Fastboot ISO or flashable ZIP, and would like to include it in your ROM, please feel free to do so. Modify it however you like. Only thing that I would ask of you is that you post here (or even PM me) saying that you used it. I'd just love to see if/where it's being used. This isn't a strict requirement though. :) Thanks!

    Disclaimer: I am not responsible for anything that happens (including, but not limited) to your phone, computer, Sprint contract, etc. This is provided free of charge without any warranty.
    4
    @closeone

    Any chance you can update the modified PCSC.apk to the one from the 2.13 update?

    I still haven't figured out how to get my mount script to work on boot-up, but I still like to manually mount my ext partition and use the adb commands when I need them through the sync manager option.

    The new version is slightly different, and I've been having issues trying to decompile it.

    I have been able to update it. I'll throw it up here for anybody to use as they wish (no credit needed). HTC, for whatever silly reason, decided to have the Sync image point to one of the framework files. That's fine... but they left the old images in the APK... Just replace my image with whatever you want, like before, and you're set. This one is patched so that the correct image is used (thanks to a commit made by steal25 for the SuperLTE ROM, I was able to figure out how he had done it (and yes, he knows that I used that to figure out how to patch it).

    Yeah.. I still have no idea what's happening, only guess being a previous one--that the phone unmounts for a second as the computer is booting, and doesn't remount fast enough for the it to pick it up as a bootable drive.

    Would you mind sending me a copy of your script? I'm assuming that you're talking about it mounting when the phone boots? I might be able to get it working for you.

    ~co~
    3
    I forgot to post this earlier, or rather, I should have posted it sooner.

    Here's my modified PCSC.apk with changed icon and text for the Sync Manager choice. Anyone may freely use it.

    Link

    This is what it looks like.

    XTIEam.jpg


    Remember, sharing means caring. ;)

    ~co~
    2

    Woah. Wow. Thanks for pointing me to the news article Gumby63!

    Wow, I have an HTC Rezound and had noticed similar behavior. Never gave it much thought though. After reading the news thread, I search through my phone and found a file called CDROM.ISO in /system/etc. I am guessing the same rules apply with this file. Many thanks for the tip. :) Gives me something else to tinker with.

    Feel free to dump the one from here onto your phone! It's not phone specific, so you can always try this one out to start with. ;)

    Much deserved, also, moved this to the ORIGINAL dev section.

    Thank you!

    ~co~

    Edit: If PoorCollegeGuy happens to stop upon this thread, I just want to say thank you for the write-up!