Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,805,427 Members 41,619 Now Online
XDA Developers Android and Mobile Development Forum

d-h.st (Dev-Host) command line tool

Tip us?
 
GermainZ
Old
(Last edited by GermainZ; 21st April 2014 at 07:27 PM.)
#1  
GermainZ's Avatar
Forum Moderator / Recognized Developer - OP
Thanks Meter 6,361
Posts: 5,459
Join Date: Aug 2012
Default d-h.st (Dev-Host) command line tool

dev-host-cl
dev-host-cl is a python script that allows you to upload and manage files to http://d-h.st (Dev-Host) from a shell. It can be used anonymously or with your account's credentials.

Visit the Github repo for the full README and installation instructions.

Thanks for reporting any bugs you might find. Suggestions are welcome.
The Following 29 Users Say Thank You to GermainZ For This Useful Post: [ Click to Expand ]
 
fabi280
Old
#2  
Senior Member
Thanks Meter 338
Posts: 304
Join Date: Oct 2010
Location: Karlsruhe

 
DONATE TO ME
I've got serious problems using this tool, doesn't matter if I use python2 or python3
It starts uploading at first, but when it reaches 100% this message comes:
Code:
fabi280@fabiserv ~/dev-host-cl $ ./devhost.py upload -u fabi280 -p password -pb 1 -f mako_pa_nightly ../paranoidandroid/out/target/product/mako/pa_mako-3.60-22JUN2013-000503.zip
Logging in...
Starting...

Method: upload9%
File_info:

Response: Error
Message: File code specified doesn't exist or your don't have permission to update it.
Filename: pa_mako-3.60-22JUN2013-000503.zip
Current devices

OnePlus One: CM11S || Stock Kernel // Franco Kernel || TWRP
Asus Nexus 7 (2012): CM11 || faux123 Kernel || TWRP
Retired devices
LG Nexus 4: CM11 || faux123 Kernel || TWRP
HTC Sensation: ViperS || Bricked Kernel || 4EXT Recovery
HTC Legend: CM7 || CWM
 
GermainZ
Old
(Last edited by GermainZ; 22nd June 2013 at 01:13 PM.)
#3  
GermainZ's Avatar
Forum Moderator / Recognized Developer - OP
Thanks Meter 6,361
Posts: 5,459
Join Date: Aug 2012
Quote:
Originally Posted by fabi280 View Post
I've got serious problems using this tool, doesn't matter if I use python2 or python3
It starts uploading at first, but when it reaches 100% this message comes:
Code:
fabi280@fabiserv ~/dev-host-cl $ ./devhost.py upload -u fabi280 -p password -pb 1 -f mako_pa_nightly ../paranoidandroid/out/target/product/mako/pa_mako-3.60-22JUN2013-000503.zip
Logging in...
Starting...

Method: upload9%
File_info:

Response: Error
Message: File code specified doesn't exist or your don't have permission to update it.
Filename: pa_mako-3.60-22JUN2013-000503.zip
You specified a wrong folder ID (that's the exact server's response BTW).
To check the folder's ID, go to that folder and check the URL. For example:
Code:
http://d-h.st/myfiles?fld_id=18780#files
The Following User Says Thank You to GermainZ For This Useful Post: [ Click to Expand ]
 
fabi280
Old
(Last edited by fabi280; 22nd June 2013 at 01:38 PM.)
#4  
Senior Member
Thanks Meter 338
Posts: 304
Join Date: Oct 2010
Location: Karlsruhe

 
DONATE TO ME
Quote:
Originally Posted by GermainZ View Post
You specified a wrong folder ID (that's the exact server's response BTW).
To check the folder's ID, go to that folder and check the URL. For example:
Code:
http://d-h.st/myfiles?fld_id=18780#files
Thanks but this doesn't really work either:
Code:
fabi280@fabiserv ~ $ devhost upload -u fabi280 -p password -pb 1 -f 19084 paranoidandroid/changelog.txt
Logging in...
Starting...

Method: upload
File_info:

Response: Error
Message: File code specified doesn't exist or your don't have permission to update it.
Filename: changelog.txt
But as you can see on my public link - the folder ID is correct: http://d-h.st/users/fabi280/?fld_id=19084#files (its even the same on myfiles: http://d-h.st/myfiles?fld_id=19084#files)

EDIT: Even anonymous uploading doesn't work for me:
Code:
fabi280@fabiserv ~ $ devhost upload /home/fabi280/paranoidandroid/changelog.txt 
Starting...

Method: upload
File_info:

Response: Error
Message: File code specified doesn't exist or your don't have permission to update it.
Filename: changelog.txt
Current devices

OnePlus One: CM11S || Stock Kernel // Franco Kernel || TWRP
Asus Nexus 7 (2012): CM11 || faux123 Kernel || TWRP
Retired devices
LG Nexus 4: CM11 || faux123 Kernel || TWRP
HTC Sensation: ViperS || Bricked Kernel || 4EXT Recovery
HTC Legend: CM7 || CWM
The Following User Says Thank You to fabi280 For This Useful Post: [ Click to Expand ]
 
GermainZ
Old
#5  
GermainZ's Avatar
Forum Moderator / Recognized Developer - OP
Thanks Meter 6,361
Posts: 5,459
Join Date: Aug 2012
Quote:
Originally Posted by fabi280 View Post
Thanks but this doesn't really work either:
But as you can see on my public link - the folder ID is correct: http://d-h.st/users/fabi280/?fld_id=19084#files (its even the same on myfiles: http://d-h.st/myfiles?fld_id=19084#files)

EDIT: Even anonymous uploading doesn't work for me:
Can you try the latest python3 version, please? If it works, I'll update the py2 version ASAP.
 
fabi280
Old
#6  
Senior Member
Thanks Meter 338
Posts: 304
Join Date: Oct 2010
Location: Karlsruhe

 
DONATE TO ME
Quote:
Originally Posted by GermainZ View Post
Can you try the latest python3 version, please? If it works, I'll update the py2 version ASAP.
This one works:
Code:
fabi280@fabiserv ~ $ python3 dev-host-cl/devhost.py upload -u fabi280 -p password -pb 1 -f 19084 paranoidandroid/changelog.txt
Logging in...
Starting...

Method: upload
File_info:

Response: Success
File_code: Kva
Delete_id: n3XXh0h881
Folder_id: 19084
Server: fs1
Filename: changelog.txt
Description: None
Size: 161
Downloads: None
Virus_status: None
Created: 2013-06-22 13:36:50
Md5sum: 1dd4b3f04dc72f2d287f38da5bb97f19
Public: 1
Download_url: http://d-h.st/Kva
Direct_download_url: http://fs1.d-h.st/download/00XX2/Kva/changelog.txt
Current devices

OnePlus One: CM11S || Stock Kernel // Franco Kernel || TWRP
Asus Nexus 7 (2012): CM11 || faux123 Kernel || TWRP
Retired devices
LG Nexus 4: CM11 || faux123 Kernel || TWRP
HTC Sensation: ViperS || Bricked Kernel || 4EXT Recovery
HTC Legend: CM7 || CWM
 
varun.chitre15
Old
(Last edited by varun.chitre15; 22nd June 2013 at 07:51 PM.)
#8  
varun.chitre15's Avatar
Recognized Contributor / Recognized Developer
Thanks Meter 9,936
Posts: 2,844
Join Date: Oct 2011
Location: Sangli
Not much into python scripting but I have below error when I do devhost upload myfile

Code:
Traceback (most recent call last):
  File "./devhost.py", line 24, in 
    from requests import session
ImportError: No module named requests
Official CyanogenMod Maintainer

Like my work? Please consider a donation via Paypal

Introducing ThunderZap Works - My own website for all of my works



Contributions

Sony Xperia L (Official CM | Kernel | Kernel control app) / Samsung Galaxy S Advance: (Custom ROM | Kernel) / Micromax A110 (ROM | Kernel) / Xiaomi Mi3 (Unofficial CM)

 
varun.chitre15
Old
#9  
varun.chitre15's Avatar
Recognized Contributor / Recognized Developer
Thanks Meter 9,936
Posts: 2,844
Join Date: Oct 2011
Location: Sangli
Oops Looks like I am missing python-requests package
Official CyanogenMod Maintainer

Like my work? Please consider a donation via Paypal

Introducing ThunderZap Works - My own website for all of my works



Contributions

Sony Xperia L (Official CM | Kernel | Kernel control app) / Samsung Galaxy S Advance: (Custom ROM | Kernel) / Micromax A110 (ROM | Kernel) / Xiaomi Mi3 (Unofficial CM)

 
GermainZ
Old
#10  
GermainZ's Avatar
Forum Moderator / Recognized Developer - OP
Thanks Meter 6,361
Posts: 5,459
Join Date: Aug 2012
Quote:
Originally Posted by varun.chitre15 View Post
Oops Looks like I am missing python-requests package
I did specify it in the README, but I'll add an error message notifying the user to install it anyway. ^_^

The Following User Says Thank You to GermainZ For This Useful Post: [ Click to Expand ]
Tags
command line, d-h.st, dev-host, devhost, shell
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes