FORUMS
Remove All Ads from XDA

[APP][2.2+] DriveDroid - host ISO/IMG files to boot your PC from

471 posts
Thanks Meter: 927
 
Post Reply Email Thread
22nd March 2013, 08:21 PM |#21  
Zoot Allures's Avatar
Senior Member
Thanks Meter: 78
 
More
So the last one I got.

Thanks, mate, I'll try as soon as possible.

EDIT: seems to work, yeah! Fine.
The Following User Says Thank You to Zoot Allures For This Useful Post: [ View ] Gift Zoot Allures Ad-Free
22nd March 2013, 10:09 PM |#22  
Silentbob999's Avatar
Senior Member
Flag Montréal
Thanks Meter: 730
 
Donate to Me
More
Hi,
I dont know if this can be improve, but the I/O got interupt once for me today because of an incomming sms.
Was in process of booting a WinPE and got an I/O error. I had the option to ignore and continu but nothing happen which suggest that maybe the emulation end.. A reboot and was ready to boot again... maybe place for improvement.. maybe impossible to fix too...
Dont have lof.. did not do any test in that manner to replicate (I can do on the week-end if you want and try to get a logcat)
The Following User Says Thank You to Silentbob999 For This Useful Post: [ View ] Gift Silentbob999 Ad-Free
22nd March 2013, 11:00 PM |#23  
Senior Member
Flag Ankara
Thanks Meter: 21
 
More
seems innovative and helpful. thank you for your work.
22nd March 2013, 11:42 PM |#24  
Senior Member
Flag Istanbul
Thanks Meter: 430
 
Donate to Me
More
I was searching for this since a long time! Awesome application!
23rd March 2013, 01:00 AM |#25  
OP Senior Member
Thanks Meter: 927
 
Donate to Me
More
Quote:
Originally Posted by kjtaylor13

Thanks, did a pull request on github so just waiting to see if it's accepted.

Nice, I see it. I hope it'll be accepted quickly.
Quote:
Originally Posted by Silentbob999

Hi,
I dont know if this can be improve, but the I/O got interupt once for me today because of an incomming sms.
Was in process of booting a WinPE and got an I/O error. I had the option to ignore and continu but nothing happen which suggest that maybe the emulation end.. A reboot and was ready to boot again... maybe place for improvement.. maybe impossible to fix too...
Dont have lof.. did not do any test in that manner to replicate (I can do on the week-end if you want and try to get a logcat)

That is interesting. I never had such a problem, but I heard that some people were having trouble with USB disconnecting sometimes, but I haven't heard such a accurate description yet. I wonder whether a reproducable number of steps can be found?

It might be related to the Android Debugging problem that some people have (Why do some people need to disable ADB to get UMS working? That seems shady too, it should just work side-by-side).

Next to having logcat running, it might also be helpful to get 'dmesg' ouput. You'll need to run dmesg under root on your phone via terminal to get kernel messages. Alternatively this app might do the same without too much hassle: https://play.google.com/store/apps/details?id=scd.lcex (I see kernel debug messages in there). If you can get a log with that it would be great if you could post it on http://pastebin.org/.
The Following User Says Thank You to FrozenCow For This Useful Post: [ View ] Gift FrozenCow Ad-Free
23rd March 2013, 01:04 AM |#26  
mdfzhi's Avatar
Senior Member
Thanks Meter: 3,870
 
More
awesome. works perfectly with se live walkman running pacman jb 4.1.2 with my own compiled kernel, adb debugging is on. booting linuxmint debian just fine.

btw xperia 2011 uses old kernel, 2.6.32, and the second patch from op the "Patch to allow applications (like DriveDroid) to switch between USB and CD-mode" give error of explicit function declaration for function "kstrtouint". probably because kernel 2.6.32 is too old and doesnt have that function defined.
kernel compiled if i comment that function
Code:
/*
	rc = kstrtouint(buf, 2, &cdrom);
	if (rc)
		return rc;
*/
is theres any way to somehow replace the kstrtouint with function native to kernel 2.6.32 that act the same way as it?
and since ive commented it and kernel compiled, how could i check if true cdrom emulation works?
The Following 2 Users Say Thank You to mdfzhi For This Useful Post: [ View ] Gift mdfzhi Ad-Free
23rd March 2013, 01:27 AM |#27  
OP Senior Member
Thanks Meter: 927
 
Donate to Me
More
Quote:
Originally Posted by an0nym0us_

awesome. works perfectly with se live walkman running pacman jb 4.1.2 with my own compiled kernel, adb debugging is on. booting linuxmint debian just fine.

btw xperia 2011 uses old kernel, 2.6.32, and the second patch from op the "Patch to allow applications (like DriveDroid) to switch between USB and CD-mode" give error of explicit function declaration for function "kstrtouint". probably because kernel 2.6.32 is too old and doesnt have that function defined.
kernel compiled if i comment that function

Code:
/*
	rc = kstrtouint(buf, 2, &cdrom);
	if (rc)
		return rc;
*/
is theres any way to somehow replace the kstrtouint with function native to kernel 2.6.32 that act the same way as it?
and since ive commented it and kernel compiled, how could i check if true cdrom emulation works?

You could try something like:
Code:
cdrom = buf[0] == '1';
Not sure whether that is the recommended way to do it though. You can check how the other similar functions are implemented (like one that sets 'ro' or 'nolua'). If you give me the url of the repo I can take a look.
The Following 3 Users Say Thank You to FrozenCow For This Useful Post: [ View ] Gift FrozenCow Ad-Free
23rd March 2013, 01:38 AM |#28  
mdfzhi's Avatar
Senior Member
Thanks Meter: 3,870
 
More
basically my compiled kernel is based on this kernel, cyanogenmod semc-msm7x30 jellybean branch.
https://github.com/CyanogenMod/semc-...mits/jellybean

if im not mistaken the kstrtouint function is defined in /lib/kstrtox.c which we dont have for 2.6.32.
23rd March 2013, 01:50 AM |#29  
OP Senior Member
Thanks Meter: 927
 
Donate to Me
More
Quote:
Originally Posted by an0nym0us_

basically my compiled kernel is based on this kernel, cyanogenmod semc-msm7x30 jellybean branch.
https://github.com/CyanogenMod/semc-...mits/jellybean

if im not mistaken the kstrtouint function is defined in /lib/kstrtox.c which we dont have for 2.6.32.

[CODE]
This function (to set readonly) is very similar: https://github.com/CyanogenMod/semc-kernel-msm7x30/blob/jellybean/drivers/usb/gadget/storage_common.c#L776
You can do something similar like:
Code:
	int		i;
	if (sscanf(buf, "%d", &i) != 1)
		return -EINVAL;
...
	curlun->cdrom = !!i;
Hopefully that is enough to get it working. I'm really interested whether the patch will work!
The Following User Says Thank You to FrozenCow For This Useful Post: [ View ] Gift FrozenCow Ad-Free
23rd March 2013, 01:58 AM |#30  
mdfzhi's Avatar
Senior Member
Thanks Meter: 3,870
 
More
so the original code from u is this
Code:
static ssize_t fsg_store_cdrom(struct device *dev, struct device_attribute *attr,
			    const char *buf, size_t count)
{
	ssize_t		rc;
	struct fsg_lun	*curlun = fsg_lun_from_dev(dev);
	struct rw_semaphore	*filesem = dev_get_drvdata(dev);
	unsigned	cdrom;

	rc = kstrtouint(buf, 2, &cdrom);
	if (rc)
		return rc;

	/*
	 * Allow the cdrom status to change only while the
	 * backing file is closed.
	 */
	down_read(filesem);
	if (fsg_lun_is_open(curlun)) {
		LDBG(curlun, "cdrom status change prevented\n");
		rc = -EBUSY;
	} else {
		curlun->cdrom = cdrom;
		LDBG(curlun, "cdrom status set to %d\n", curlun->cdrom);
		rc = count;
	}
	up_read(filesem);
	return rc;
}
shoould be something like this for my old kernel 2.6.32 right?
Code:
static ssize_t fsg_store_cdrom(struct device *dev, struct device_attribute *attr,
			    const char *buf, size_t count)
{
	ssize_t		rc;
	struct fsg_lun	*curlun = fsg_lun_from_dev(dev);
	struct rw_semaphore	*filesem = dev_get_drvdata(dev);
	unsigned	cdrom;

	int		i;
	if (sscanf(buf, "%d", &i) != 1)
		return -EINVAL;

	curlun->cdrom = !!i;

	/*
	 * Allow the cdrom status to change only while the
	 * backing file is closed.
	 */
	down_read(filesem);
	if (fsg_lun_is_open(curlun)) {
		LDBG(curlun, "cdrom status change prevented\n");
		rc = -EBUSY;
	} else {
		curlun->cdrom = cdrom;
		LDBG(curlun, "cdrom status set to %d\n", curlun->cdrom);
		rc = count;
	}
	up_read(filesem);
	return rc;
}
23rd March 2013, 02:03 AM |#31  
OP Senior Member
Thanks Meter: 927
 
Donate to Me
More
Quote:
Originally Posted by an0nym0us_

shoould be something like this for my old kernel 2.6.32 right?

Almost, I think this should work:
Code:
static ssize_t fsg_store_cdrom(struct device *dev, struct device_attribute *attr,
			    const char *buf, size_t count)
{
	ssize_t		rc;
	struct fsg_lun	*curlun = fsg_lun_from_dev(dev);
	struct rw_semaphore	*filesem = dev_get_drvdata(dev);
	int	cdrom;

	if (sscanf(buf, "%d", &cdrom) != 1)
		return -EINVAL;

	/*
	 * Allow the cdrom status to change only while the
	 * backing file is closed.
	 */
	down_read(filesem);
	if (fsg_lun_is_open(curlun)) {
		LDBG(curlun, "cdrom status change prevented\n");
		rc = -EBUSY;
	} else {
		curlun->cdrom = !!cdrom;
		LDBG(curlun, "cdrom status set to %d\n", curlun->cdrom);
		rc = count;
	}
	up_read(filesem);
	return rc;
}
The Following 2 Users Say Thank You to FrozenCow For This Useful Post: [ View ] Gift FrozenCow Ad-Free
Post Reply Subscribe to Thread

Tags
drivedroid, img, linux, ums, usb

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes