Sorry for not checking in sooner. Thanks Captain_Throwback.
Give this a try:
1. Let the ISO mount
2. Do a chmod 444 /sys/devices/platform/msm_hsusb/gadget/lun1/file
3. Whatever is set in that file, is the current mounted CD-ROM. This will give the system the ability to only read the file now. The system can't write anything to it. That, I believe is the cause for the drive unmounting at bad times. The second the phone detects that it's been disconnected, it goes ahead and resets that file back to nothing. This should keep it from changing it back.
Problem that I've noticed so far is that it will stay mounted even if the connection type is set to charge only. However, it unmounts the drive when you choose to browse the SD Card, which is good.
To revert this back to its normal behavior simply:
chmod 644 /sys/devices/platform/msm_hsusb/gadget/lun1/file
~co~
Which part exactly is this supposed to help with? The only issue I'm having right now is getting the ext partition to mount automatically on reboot. I have a script to mount it manually once I get booted up, and then the ISO mounts fine. Does this command make the ext mount persist through a reboot somehow (it doesn't seem related)? Maybe I'm just confused?
Which part exactly is this supposed to help with? The only issue I'm having right now is getting the ext partition to mount automatically on reboot. I have a script to mount it manually once I get booted up, and then the ISO mounts fine. Does this command make the ext mount persist through a reboot somehow (it doesn't seem related)? Maybe I'm just confused?
Well. This will make the normal process the phone takes to mount the ISO persist. I'm trying my own tests with it like this, and can't tell if this secondary computer just doesn't like USB CD-ROM drives, or if there's more.
By doing this, when unplugging the USB cable and plugging it back in, the system will automatically mount the ISO. So, when rebooting, it should automatically mount the drive again.
I'm just starting with booting a tiny operating system from the phone without symlinking things. Once we know that works, then we can have some fun with a little more complicated mounting process (Symlink to ISO on an EXT partition on the SDCard).
Check this post out for a little more background behind the file.
Or, were you able to get it your computer to boot already directly from the /system/etc directory? In that case, you can probably safely ignore everything I just said.
Hopefully, I wasn't completely nonsensical here. Sorry if I was.
~co~
EDIT: If your ROM has init.d support, you should be able to take that script, and copy it into /etc/init.d and name it something like "80mountext" so that it executes later in the Android boot process than other scripts.
I am happy to help whenever I can.
If I make a mistake, I do sincerely apologize.
If I have helped you, let me know! It means a lot, and I love to hear it.
You can get it to boot, we should figure out how to keep a persistive file, I think its usually called casper-RW so that settings and such are kept. USB installer can create it
Swyped on my EVO LTE
My Phone History
RAZR | ROKR | HTC Touch | Palm Pre | Evo 4G | Nexus S 4G | Evo 3D | Evo LTE
I checked proc/mounts, and apparently the ext partition was already getting mounted at /data/sdext2. Just linked the PCTOOL.ISO from there back to /system/etc, and it's working great! When in Windows, the Ubuntu install menu pops up when I mount in the old "HTC Sync" mode.
I don't think I can boot up with it, though. I definitely can't on my laptop, but I'll have to see if it works on my Desktop next .
EDIT: Just finished modifying the PCSC.apk for it too. Still haven't tried to boot my Desktop from it, though (I already have Ubuntu installed on it).
I checked proc/mounts, and apparently the ext partition was already getting mounted at /data/sdext2. Just linked the PCTOOL.ISO from there back to /system/etc, and it's working great! When in Windows, the Ubuntu install menu pops up when I mount in the old "HTC Sync" mode.
I don't think I can boot up with it, though. I definitely can't on my laptop, but I'll have to see if it works on my Desktop next .
EDIT: Just finished modifying the PCSC.apk for it too. Still haven't tried to boot my Desktop from it, though (I already have Ubuntu installed on it).
Awesome!
Yeah. I still haven't had any luck booting either. I just gave it a try on my desktop. The phone shows up in my boot menu twice as "HTC Android Phone," but neither boot the OS on there. I don't know if it's a timing thing, or what. It boots if I use it as a CDROM drive in VirtualBox.
~co~
I am happy to help whenever I can.
If I make a mistake, I do sincerely apologize.
If I have helped you, let me know! It means a lot, and I love to hear it.
Yeah. I still haven't had any luck booting either. I just gave it a try on my desktop. The phone shows up in my boot menu twice as "HTC Android Phone," but neither boot the OS on there. I don't know if it's a timing thing, or what. It boots if I use it as a CDROM drive in VirtualBox.
~co~
how does it show the drive as? can you read the contents and attempt to install with wubi? at that poing we might just need to check if the iso is still bootable somehow. Thi is beyond my expertise but im just offering suggestions at this point
at the risk of loosing data, we could plug our phone in and run usb installer to format our SD card and make it bootable, but that might not work or render this ISO idea useless. If you guys figure this out it would rock so hard.
If I can't boot directly from the ISO, my next thought was to try and create a bootable install on my ext partition using unetbootin in Ubuntu, and then pack up the entire contents of the partition into an ISO and rename it to PCTOOL.ISO so that it should mount when selected in the Connection Manager on the device and connected to the computer. I probably won't have time to mess with it again until Friday, though.
If I can't boot directly from the ISO, my next thought was to try and create a bootable install on my ext partition using unetbootin in Ubuntu, and then pack up the entire contents of the partition into an ISO and rename it to PCTOOL.ISO so that it should mount when selected in the Connection Manager on the device and connected to the computer. I probably won't have time to mess with it again until Friday, though.
doesnt the master boot record have to be on the main drive if the SD is considered a partitioned drive? might have to run a utility to make the SD card bootable
My Phone History
RAZR | ROKR | HTC Touch | Palm Pre | Evo 4G | Nexus S 4G | Evo 3D | Evo LTE
Wouldnt you just need to set a auto.exe or boot.ini within the pctools.iso or CD-ROM.iso to link to the install location on the sdcard.
Just a thought partition the Sd card with ext, use the universal USB installer to install to the newely partitioned ext partition, when the ISO is installed to that partition you usually have an auto.exe file take that file modify the script to direct it to the partition on the Sd card where the install file is and modify the pctools.iso or cdrom.iso to incorperate that auto.exe script
Or autorun.inf
Example:
[Autorun]
open=.\folder\program.exe
Sent from my EVO using xda premium
HTC Hero -> HTC Evo 4g -> HTC Evo 3D -> HTC Evo 4g LTE
Wouldnt you just need to set a auto.exe or boot.ini within the pctools.iso or CD-ROM.iso to link to the install location on the sdcard.
Just a thought partition the Sd card with ext, use the universal USB installer to install to the newely partitioned ext partition, when the ISO is installed to that partition you usually have an auto.exe file take that file modify the script to direct it to the partition on the Sd card where the install file is and modify the pctools.iso or cdrom.iso to incorperate that auto.exe script
Or autorun.inf
Example:
[Autorun]
open=.\folder\program.exe
kingakuma, unfortunately it doesn't work quite like that. Well, let me catch myself there. autorun.inf is a small text file designed to give Windows few instructions for how to handle the launching of the CD/Flash Drive/External Hard Drive/etc that the file resides on. It doesn't contain any directions for booting an OS.
I'm not exactly following you on the auto.exe stuff. A file with the file extension .exe typically represents an executable Windows application. An OS or ISO does not boot from an executable file.
We're talking about something completely separate from anything within the scope of an already booted OS.
Also, while applications that create a filesystem for allowing an OS to be booted from a flash drive or other media, would work, this would completely sidestep the original issue about booting using an already created ISO. This is something that could technically be done on many phones already.
Hopefully my response made some sense. Please know that I'm just giving you a look at your statement, and that I'm not in any way trying to belittle you.
Thank you,
~co~
I am happy to help whenever I can.
If I make a mistake, I do sincerely apologize.
If I have helped you, let me know! It means a lot, and I love to hear it.
Would you like to know one of the things that really annoys me on a daily basis? Tough, … more
XDA Developers was founded by developers, for developers. It is now a valuable resource for people who want to make the most of their mobile devices, from customizing the look and feel to adding new functionality. Are you a developer?