You are not logged in.

#1 2015-01-17 19:42:54

x-yuri
Member
Registered: 2013-01-06
Posts: 160

[SOLVED] How to add support for Nokia Lumia 630 to Files file manager?

Hi,

Not sure which is the proper subforum. And I thought I made it work with this patch, but it appears to properly work only from console.

So, I installed libmtp:

$ sudo pacman -S abs
$ sudo abs
$ mkdir ~/build
$ cp -r /var/abs/extra/libmtp ~/build
$ cd ~/build/libmtp
$ curl -LO https://gist.githubusercontent.com/x-yuri/da36ecf5e1ad85fa3cf7/raw/05e3db8682b0947456a440eb5364bd4a63b71c7a/0001-Add-Nokia-Lumia-630-device-identifiers.patch 
// change PKGBUILD: add 0001-Add-Nokia-Lumia-630-device-identifiers.patch to source array
//   and add `patch -p1 -i "${srcdir}/0001-Add-Nokia-Lumia-630-device-identifiers.patch"` before running `./configure`
$ updpkgsums
// change PKGBUILD: remove previous md5sums assignment statement
// the alternative would be to specify 'SKIP' for patch's checksum
$ makepkg
$ sudo pacman -U libmtp-1.1.8-1-x86_64.pkg.tar.xz
$ curl -L https://raw.githubusercontent.com/kbhomes/libmtp-zune/master/src/.mtpz-data > ~/.mtpz-data   # see http://sourceforge.net/p/libmtp/bugs/968/

then gvfs-mtp:

$ cp -r /var/abs/extra/gvfs ~/build
$ cd ~/build/gvfs
$ makepkg
$ sudo pacman -U gvfs-mtp-1.22.2-4-x86_64.pkg.tar.xz

Then, I upload a file from console:

$ mtp-newfolder uploaded 0 0
libmtp version: 1.1.8

Device 0 (VID=0421 and PID=06fc) is a Nokia Nokia Lumia 630.
ignoring libusb_claim_interface() = -6PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
object 1 has parent 0xffffffff (-1) continuing anyway
object 2 has parent 0xffffffff (-1) continuing anyway
object 3 has parent 0xffffffff (-1) continuing anyway
object 8 has parent 0xffffffff (-1) continuing anyway
object b has parent 0xffffffff (-1) continuing anyway
object c has parent 0xffffffff (-1) continuing anyway
Device have files in "root folder" 0xffffffffU - this is a firmware bug (but continuing)
New folder created with ID: 13
$ mtp-filetree
Device 0 (VID=0421 and PID=06fc) is a Nokia Nokia Lumia 630.
Attempting to connect device(s)
Device: Windows Phone
Storage: Phone
1 Documents
2 Downloads
3 Music
  4 Album
  5 Artist
  6 Playlist
  7 PodcastSeries
4 Album
5 Artist
6 Playlist
7 PodcastSeries
8 Pictures
  9 Camera Roll
  10 Saved Pictures
9 Camera Roll
10 Saved Pictures
11 Ringtones
12 uploaded
13 Videos
OK.
$ mtp-sendfile /run/media/yuri/wdata/torrents/Metallica\ \(mp3\)/01\ -\ Studio\ albums/2008\ -\ Death\ Magnetic\ \[UICR-1077\]/07.\ The\ Unforgiven\ III.mp3 12
libmtp version: 1.1.8

Device 0 (VID=0421 and PID=06fc) is a Nokia Nokia Lumia 630.
object 1 has parent 0xffffffff (-1) continuing anyway
object 2 has parent 0xffffffff (-1) continuing anyway
object 3 has parent 0xffffffff (-1) continuing anyway
object 8 has parent 0xffffffff (-1) continuing anyway
object b has parent 0xffffffff (-1) continuing anyway
object c has parent 0xffffffff (-1) continuing anyway
object d has parent 0xffffffff (-1) continuing anyway
Device have files in "root folder" 0xffffffffU - this is a firmware bug (but continuing)
Sending /run/media/yuri/wdata/torrents/Metallica (mp3)/01 - Studio albums/2008 - Death Magnetic [UICR-1077]/07. The Unforgiven III.mp3 to 12
type: mp3, 2
Sending file...
Progress: 18757750 of 18757750 (100%)
New file ID: 14
$ mtp-filetree 
Device 0 (VID=0421 and PID=06fc) is a Nokia Nokia Lumia 630.
Attempting to connect device(s)
Device: Windows Phone
Storage: Phone
1 Documents
2 Downloads
3 Music
  4 Album
    15 Death Magnetic [UICR-1077{56C2A1D1-543D-4320-83BA-63E870526220}
  5 Artist
    16 Metallica
  6 Playlist
  7 PodcastSeries
4 Album
  15 Death Magnetic [UICR-1077{56C2A1D1-543D-4320-83BA-63E870526220}
5 Artist
  16 Metallica
6 Playlist
7 PodcastSeries
8 Pictures
  9 Camera Roll
  10 Saved Pictures
9 Camera Roll
10 Saved Pictures
11 Ringtones
12 uploaded
  13 07. The Unforgiven III.mp3
13 07. The Unforgiven III.mp3
14 Videos
15 Death Magnetic [UICR-1077{56C2A1D1-543D-4320-83BA-63E870526220}
16 Metallica
OK.

As you can see some extra files are automatically created in Music/{Album,Artist} folders. And when you do `mtp-delfile -n 13` all those extra files disappear as well. But when you do using GUI, nothing of the sorts happens. Files do appear where you copy them, but no additional files are created. And I can't make Music app see uploaded files, as opposed to doing all this from command line.

I've filed a bug report against gvfs-mtp. We'll see what will come of it. Anyways, in case you've got any suggestions, you're welcome.

UPD After additional investigation `mtpfs` doesn't seem to work at all, I can't cd to mount point. `simple-mtpfs` and `go-mtpfs` work similar to `gvfs-mtp` + Files app.

Last edited by x-yuri (2015-01-24 10:27:07)

Offline

#2 2015-01-24 10:26:27

x-yuri
Member
Registered: 2013-01-06
Posts: 160

Re: [SOLVED] How to add support for Nokia Lumia 630 to Files file manager?

The patch from bug report fixes the issue.

Offline

#3 2015-01-24 20:04:43

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,412
Website

Re: [SOLVED] How to add support for Nokia Lumia 630 to Files file manager?

I never expected windows phones to work on Linux (I just plug them to my Win 8 box), but I'm definitely going to try this. Thanks.

edit: Nope, doesn't work

jmtpfs Lumia 
Unable to open ~/.mtpz-data for reading, MTPZ disabled.
Device 0 (VID=0421 and PID=06fc) is a Nokia Nokia Lumia 630.

~/Lumia % ls
ls: reading directory .: Input/output error

Same error with mtp-connect. Maybe I misunderstood your edit, I thought only the gvfs mtpfs was affected...

edit2: oops, missed your step on downloading .mtpz-data. Well:

Device 0 (VID=0421 and PID=06fc) is a Nokia Nokia Lumia 630.
New folder test
Creating new folder test
Folder creation failed.
Error 2: PTP Layer error 02fe: LIBMTP_Get_Storage(): Could not get storage info.
Error 2: Error 02fe: PTP: Protocol error, data expected
Error 1: Get Storage information failed.
Error 2: PTP Layer error 02fe: get_all_metadata_fast(): could not get proplist of all objects.
Error 2: Error 02fe: PTP: Protocol error, data expected
Error 2: PTP Layer error 02fe: get_handles_recursively(): could not get object handles.
Error 2: Error 02fe: PTP: Protocol error, data expected
Error 2: PTP Layer error 02fe: get_all_metadata_fast(): could not get proplist of all objects.
Error 2: Error 02fe: PTP: Protocol error, data expected
Error 2: PTP Layer error 02fe: get_handles_recursively(): could not get object handles.
Error 2: Error 02fe: PTP: Protocol error, data expected
Error 2: PTP Layer error 02fe: get_all_metadata_fast(): could not get proplist of all objects.
Error 2: Error 02fe: PTP: Protocol error, data expected
Error 2: PTP Layer error 02fe: get_handles_recursively(): could not get object handles.
Error 2: Error 02fe: PTP: Protocol error, data expected
Error 2: PTP Layer error 2002: get_suggested_storage_id(): could not get storage id from parent id.
Error 2: Error 2002: PTP: General Error
Error 2: PTP Layer error 2008: LIBMTP_Create_Folder: Could not send object info.
Error 2: Error 2008: PTP: Invalid Storage ID

edit3: The phone was PIN-locked at that time, unlocked it worked. Fantastic UX. neutral

http://sourceforge.net/p/libmtp/bugs/741/

Last edited by Alad (2015-01-24 22:50:17)


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#4 2015-01-25 11:58:56

x-yuri
Member
Registered: 2013-01-06
Posts: 160

Re: [SOLVED] How to add support for Nokia Lumia 630 to Files file manager?

Alad wrote:

I thought only the gvfs mtpfs was affected...

x-yuri wrote:

After additional investigation `mtpfs` doesn't seem to work at all, I can't cd to mount point. `simple-mtpfs` and `go-mtpfs` work similar to `gvfs-mtp` + Files app.

I didn't try jmtpfs. And I hope simple-mtpfs will work eventually. If you're not concerned about uploading music though, everything except mtpfs must do.

Offline

Board footer

Powered by FluxBB