Jump to content
gillesg

Accessing phone storage (advice needed)

Recommended Posts

Hello all,

First, I wish you a happy new year.

I am building with autoit a substitution tool to sync my iTunes playlist with my android phone.

I have managed reading the itunes lib, but now I am stuck at reading / writing on my android device.

From all the searches I made, it is using MTP protocol. 

The Windows Explorer can read and write on the device.

The device appears as a "portable device".

 

Does anyone of you can direct me in some direction to keep investigate.

 

Thanks in advance

 

Gilles

Edited by gillesg

Share this post


Link to post
Share on other sites

If you're not committed to doing it through Windows Explorer, I'd use Android Debug Bridge (ADB) with a push command with Autoit's ShellExecuteWait.

adb push <source-path> <target-path>

 

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites
4 hours ago, Danyfirex said:

Hello. If you want to do it using Windows API you need to implement WPD.

Saludos 

Hello,

Thanks for the pointer. I start trying, but not being famiiar with objcreateinterface syntax makes it very difficult.

I found your previous post. Have you been further down the road on implementing some WPD functions ?

 

It seems promising, but complex. Any help or advices will be appreciated

 

Gilles

 

 

Share this post


Link to post
Share on other sites

It's a little complex. I think the better alternative for you is use adb commandline tool.

 

But if you want to implement it using Raw AutoIt code. You would need maybe check MSDN's C++ examples and convert them to AutoIt. I really have not time to do it.

 

Saludos

Share this post


Link to post
Share on other sites

Thank for the info. I will try on my own.

All I need is 3 basic functions :
   1 - to be able to list the content of a device starting at a particular point
   2 - to be able to copy a file fom the PC to the device
   3 - to be able to delete form the device

I understood the DeviceManager script. But I am still stuck at getting the device.content. I have practice C++ long ago, and MS examples are still complex.

Regards

Share this post


Link to post
Share on other sites
7 hours ago, Danyfirex said:

It's a little complex. I think the better alternative for you is use adb commandline tool.

unfortanately for me adb seems not to work on my Android device.

Share this post


Link to post
Share on other sites

Hello,

After a little research on the side of the MTP protocol support, I realized that the windows explorer was accessing the device supporting MTP.
So I decided to use the Shell.Application COM object.

I propose you this little tool whose objective is to allow you to synchronize your iTunes playlists with an android phone.

I used teh work for the previous iTunes UDF published

I wrote a not complete version of file.au3 UDF mainly for _FileListToArrayRec, _PathSplit, FileExists, FileDelete, FileCopy, DirCreate, DirRemove, FileFindFirstFile, FileFindNextFile, 


I still have 2 points of potential improvement.
I did not find how to create a directory on an MTP device. I get around by copying an existing directory and using it as a template.
And yes, the creation does not work, but the copy yes.
On deletion, I can not avoid the delete confirmation request. The MTP device is not sensitive to the setting of the noconfirmdelete parameter ($SSF_NOCONFIRMRECYCLE)

I will now take care of the special elements: audio books, podcast, courses (iTunesU).

If you have ideas to solve my 2 improvement points, I'm interested.

 

Hope the apps will help some of you

 

Gilles

GUI - itunes Sync.7z

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • By Inpho
      Hi All,
      I didn't know where to put this; my apologies if this is the wrong location.
      When you plug a Samsung mobile device (phone, tablet, etc.) into the USB of a Windows PC, you can right-click the device in My Computer and select Properties. Here, it will show you the correct serial number of the device. Clearly Windows doesn't use adb to get the SN so I'm stuck at how to get the SN without adb and where the device doesn't have a drive letter assigned to it.
      When I last picked this up, I tried seemingly everything I could from wmi(?) and winmgmts(?) but either it's hidden cloak-and-dagger style or I can't see the forest for the trees...
      Does anyone know what API Windows uses when getting the serial number of a device Windows calls a Portable Media Player?

    • By rudi
      Hello,
       
      I found a couple of threads asking quite similar questions, but without finding a "straight" solution to Access the internal phone storage as well as the plugged in SD-Card.
       
      While the SD Card is quite an easy Job (shutdown phone, remove SD, plug into some Card Reader, Access it using a drive letter), the internal storage isn't accessible this way.
       
      Of course I *CAN* Access all the (regular visible) Content, when connected to a Windows box.
       
      But this way I cannot estimate, where all the space was eaten up. So I'd like to know, how to address the "root" Folder of the internal storage of my Android Phone to get it's subfolders and files. Going through the whole Folder tree recursively isn't my Problem, it's just howto address the very first Folder and then to read all files (with sizes) and names of the subfolders.
       
       
      Regards, Rudi.
    • By wisem2540
      I am a huge autoit fan and have written several graphical apps.  I would love to get started building simple and complex android apps.  I am hoping someone here can recommend a good platform to get started with.  Preferably something that had an Autoit-like feel
    • By Miliardsto
      Hello Im wondering if using this https://ohtejera.github.io/ImperiusAutoIt/#started
      UDF can i make that I can control my windows application with phone?
      like for example click button Start on android phone and then something would be done in my windows app?
    • By mmoalem
      Hi all - was wondering if the following is possible:
      I have a motion detecting ccrv software on PC (icam or similar) - there is a bottom that turn surveillance (motion detection) on and off. I can get autoit to automate the clicking on the button. 
       
      I want my android phone to send a trigger every time it disconnect from the home network (i.e when I leave home) to tell autoit to turn on surveillance and when reconnecting to home network to trigger it to click off
       
      does any one have a suggestion how to go about achieving this?
×
×
  • Create New...