Showing posts with label Shared. Show all posts
Showing posts with label Shared. Show all posts

Saturday, 30 July 2016

Help with mounting windows shared drive for use by any app

Hi,
The goal is make my shared windows folder available on FireTV to be accessed by media applications. First attempt is for music

This is AFTV 1. It is rooted and has busybox. It has TWRP and 5.2.1.0_r1 pre-rooted stock image. I searched around and found couple of useful threads.

Run script on FireTV boot
mount cifs share from nas

Based on the first thread, I have created my script that I plan to run in /system/etc/install-recovery.sh

My current problem is that the script can be only run after I su (become root)
The script runs successfully, but the files are only available on adb shell or putty when I am root. They are not available to regular user or any apps.

Code:


#!/system/bin/sh

sleep 15
mkdir /mnt/obb/music
chmod 777 /mnt/obb/music

sleep 20
busybox mount -o noperm,unc=\\192.168.1.56\music,username=xx,password=xx -t cifs none /mnt/obb/music


Second problem is that when I restart firetv, this does not seem to have done anything. But I have the fix the first problem first. I need any of the apps to be able to access the mounted shared drive.

Thanks

ETA: post #10 in thread [Q] mounting a windows shared folder to android fs seems to be the same problem, but I did not understand the suggested solution

Tuesday, 12 July 2016

How Can Get the actual Pre Shared Key to Application instead of “*” in Android



I am trying to access the pre shered key to my application using WifiConfiguration class provided by Android. The "AccessPoint..getConfig().preSharedKey" returns only "*" if key is present and null if the key is absent.I need the actual the pre shared key. How do i obtain it ?
Is there any other method that I can use to get the key ?(Can I modify WifiConfiguration class?)