[New Feature] Android installer

Discuss newly added features or request new features.
caponater
Posts: 19
Joined: 28 Dec 2015, 04:57

Re: [New Feature] Android installer

Post by caponater » 09 Jun 2018, 18:57

hugbug wrote:
05 Nov 2017, 00:10
Could not resolve hostname xxxxxx.xx: ErrNo -2, Name or service not known
I think I have that issue fixed. At least it now works in Android 7.1 VM, where it didn't previously. If someone wants to give it a try on own device please send me a note to nzbget@gmail.com. I don't want to commit the fix into develop until I have a confirmation for it.
Updated to 1.1
-I can confirm this works on FireTV 2. Which I believe is a fork of Android 5.1. I no longer need to rely on my hosts file. Awesome work!

-I am having an issue with VideoSort6.1. I can post to the videosort thread if it is more appropriate.

Code: Select all

ERROR	Sat Jun 09 2018 14:41:34	Post-process-script VideoSort61/VideoSort61.py for XXXXXX failed
ERROR	Sat Jun 09 2018 14:29:59	VideoSort61: invalid literal for long() with base 10: ''
ERROR	Sat Jun 09 2018 14:29:59	VideoSort61: Failed: XYZ.mkv
INFO	Sat Jun 09 2018 14:29:59	VideoSort61: ValueError: invalid literal for long() with base 10: ''
INFO	Sat Jun 09 2018 14:29:59	VideoSort61: size = long(re.split(r'\s+', output)[4])
INFO	Sat Jun 09 2018 14:29:59	VideoSort61: File "/data/data/net.nzbget.nzbget/nzbget/scripts/VideoSort61/VideoSort61.py", line 350, in getsize_workaround
INFO	Sat Jun 09 2018 14:29:59	VideoSort61: if getsize_workaround(old_path) < min_size:
INFO	Sat Jun 09 2018 14:29:59	VideoSort61: File "/data/data/net.nzbget.nzbget/nzbget/scripts/VideoSort61/VideoSort61.py", line 1174, in <module>
I have edited libdaemon.so to point to my python installation. (Thanks to Nedle in an earlier post)

Code: Select all

#Python intialization                                                           
export PYTHONHOME=/data/data/com.googlecode.pythonforandroid/files/python       
export PYTHONPATH=/storage/sdcard0/com.googlecode.pythonforandroid/extras/python:/data/data/com.googlecode.pythonforandroid/files/python/lib/python2.6
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/data/com.googlecode.pythonforandroid/files/python/lib
-I will comment on stability in the next week or so

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [New Feature] Android installer

Post by hugbug » 09 Jun 2018, 19:35

Can you test the same nzb with VideoSort on desktop?

caponater
Posts: 19
Joined: 28 Dec 2015, 04:57

Re: [New Feature] Android installer

Post by caponater » 10 Jun 2018, 05:50

hugbug wrote:
09 Jun 2018, 19:35
Can you test the same nzb with VideoSort on desktop?
Errors on my Windows Desktop. However, I may need to investigate my python setup. I have 2.7 and 3.3 on my PC

Code: Select all

ERROR	Sun Jun 10 2018 01:14:46	Post-process-script VideoSort61\VideoSort61.py for XYZ failed
INFO	Sun Jun 10 2018 01:14:46	VideoSort61: WindowsError: [Error 3] The system cannot find the path specified
INFO	Sun Jun 10 2018 01:14:46	VideoSort61: startupinfo)
INFO	Sun Jun 10 2018 01:14:46	VideoSort61: File "C:\Python27\lib\subprocess.py", line 640, in _execute_child
INFO	Sun Jun 10 2018 01:14:46	VideoSort61: errread, errwrite)
INFO	Sun Jun 10 2018 01:14:46	VideoSort61: File "C:\Python27\lib\subprocess.py", line 390, in __init__
INFO	Sun Jun 10 2018 01:14:46	VideoSort61: output = s.Popen('ls -l "' + filename +'"', shell=True, executable="/system/bin/sh", stdout=s.PIPE).communicate()[0]
INFO	Sun Jun 10 2018 01:14:46	VideoSort61: File "C:\ProgramData\NZBGet\scripts\VideoSort61\VideoSort61.py", line 349, in getsize_workaround
I removed 1.1 from my FireTV 2 and went back to 1.0-testing-r10 and installed version 20.0, and made my edits to libdaemon.so to set my python.
-VideoSort is working
-hostnames are resolving properly

Dodgexander
Posts: 5
Joined: 10 Jun 2018, 03:38

Re: [New Feature] Android installer

Post by Dodgexander » 10 Jun 2018, 14:55

@hugbug

There is a major problem at the moment using NZBget on Android which stops you from downloading to an external SD card/mounted drive.

The problem is Android by default limits apps from writing to an external SD unless they are coded explicitly too.

Since NZBget is a daemon and not an app you can't use the workaround to write only to a specific app generated location on the external SD.

Is there a chance to be able to fix this in an update? Possibly use the documents UI in Android to select a path? Alternately allow the daemon to be run with system/root permissions to be able to write to external?

Right now NZBget for Android isn't really useful since most of Android devices you would want to use do not have large enough internal storage for ample libraries.

More info here: https://stackoverflow.com/questions/321 ... -android-6

caponater
Posts: 19
Joined: 28 Dec 2015, 04:57

Re: [New Feature] Android installer

Post by caponater » 10 Jun 2018, 16:05

@Dodgexander - I have no problems writing to a mounted external drive on my rooted FireTV 2. I use stickmount to mount my USB Drive.

Dodgexander
Posts: 5
Joined: 10 Jun 2018, 03:38

Re: [New Feature] Android installer

Post by Dodgexander » 10 Jun 2018, 16:35

caponater wrote:
10 Jun 2018, 16:05
@Dodgexander - I have no problems writing to a mounted external drive on my rooted FireTV 2. I use stickmount to mount my USB Drive.
Thanks. Probably works fine for USB disks mounted that way then, not so for an internal SD card or disk drive.

You only need to look at instructions for other apps to see the problem, eg: https://nzbleech.info/help
Download to SD Card
Its possible to download to your external SD Card but you have to do some work to figure out the specific directory as Android restricts writing to the sd card (for most devices). The only exception is an App can write to its own designated folder, so this is the folder we need to determine. You can use one of the two apps to determine the path. There are two things you should know about using this app specific path:

The folder (and so your downloads) are deleted if you uninstall the app
Android media scanner does not work with this app specific folder so you won't see your downloaded files showing in other apps
A1 SD Bench This is the easier approach, at the time of this writing, you just install the app and press and hold on the SD Card to bring up a menu, select "Show media path". The path in the screenshot shows the A1 SD Bench path, you need to replace com.a1dev.sdbench with sic.nzb.app, so the complete path in this case would be /storage/9F85-C5B5/Android/data/sic.nzb.app/files. Now you have the complete path, so go ahead and use it in Nzb Leech.

Tip: Browse this path in Nzb Leech File tab to see if you recognize any files to confirm its your sd card.

SD Card path
Termux Another way to determine the directory is by installing Termux. Open the app and type df to list all the paths on your device. The sd card path will usually start with "/mnt" or "/storage". In the screenshot below the path is /storage/39463835-2d43-3542-3500-020000000000. I append the Nzb Leech specific directory and I get /storage/39463835-2d43-3542-3500-020000000000/Android/data/sic.nzb.app/files. Now you have the complete path, so go ahead and use it in Nzb Leech.

SD Card path

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [New Feature] Android installer

Post by hugbug » 11 Jun 2018, 07:15

Regarding SD card issues
All Android issues require a lot of investigating work. Unfortunately due to a lack of a device where the problem could be reproduced I can't do much progress here. Let's see how it works after #538 is implemented.
Dodgexander wrote:
10 Jun 2018, 14:55
allow the daemon to be run with system/root permissions to be able to write to external?
If you have root access you can launch nzbget (daemon) from terminal just like you would do on Linux.

Dodgexander
Posts: 5
Joined: 10 Jun 2018, 03:38

Re: [New Feature] Android installer

Post by Dodgexander » 12 Jun 2018, 00:30

hugbug wrote:
11 Jun 2018, 07:15
Regarding SD card issues
All Android issues require a lot of investigating work. Unfortunately due to a lack of a device where the problem could be reproduced I can't do much progress here. Let's see how it works after #538 is implemented.
Dodgexander wrote:
10 Jun 2018, 14:55
allow the daemon to be run with system/root permissions to be able to write to external?
If you have root access you can launch nzbget (daemon) from terminal just like you would do on Linux.
Thanks, hopefully it works better.
If you are interested I was able to use NZBget by installing it through a 3rd party repo thanks to this kind share: https://brouken.com/2018/01/install-nzb ... x-android/

Using an app called Termux and a tasker plugin for integration.

Because NZBget is installed via Termux the daemon is allowed to write to the Termux's designated SD card location in the apps temporary files.

So NZBget could get around this also allow write to the installer apps designated destination within the app temporary files?

Still though, not the best solution, ideally it would be good to give permissions to choose a destination on external SD card. - I am not sure root will bypass the need to use a specific location or not.

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [New Feature] Android installer

Post by hugbug » 14 Jun 2018, 21:11

hugbug wrote:
18 May 2018, 18:11
Android 8 support is being worked on. I've created an issue on GitHub tracker - Installer for Android, based on NDK #538.
I have an experimental package working. Who wants to try? Drop me a message to nzbget@gmail.com.

Dodgexander
Posts: 5
Joined: 10 Jun 2018, 03:38

Re: [New Feature] Android installer

Post by Dodgexander » 15 Jun 2018, 01:03

hugbug wrote:
14 Jun 2018, 21:11
hugbug wrote:
18 May 2018, 18:11
Android 8 support is being worked on. I've created an issue on GitHub tracker - Installer for Android, based on NDK #538.
I have an experimental package working. Who wants to try? Drop me a message to nzbget@gmail.com.
Thanks! I sent you a message

Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests