Feature request: include ssh client binary - Paranoid Android Features Development

I recently moved to PA due to various reasons but I miss something from CM: being able to type ssh into Android Terminal Emulator and get a functional result.
PA already includes busybox but CM also includes other binaries such as htop and the one I'm specifically in need, ssh
This addition is not really a big change and would greatly improve the appeal of PA to server admins and such

P4Block said:
I recently moved to PA due to various reasons but I miss something from CM: being able to type ssh into Android Terminal Emulator and get a functional result.
PA already includes busybox but CM also includes other binaries such as htop and the one I'm specifically in need, ssh
This addition is not really a big change and would greatly improve the appeal of PA to server admins and such
Click to expand...
Click to collapse
In the meantime you could install it by yourself. Disclaimer: I hate to do that and would love to see ssh being integrated into PA!!!
I am not allowed to post URLs here, so I will just post the search term for Google and hope that you will find Google by yourself
Steps (rooted phone needed):
- Install an ssh server on the device. What about this one? Play Store or Google: com.icecoldapps.sshserver
- Start a SSH session on the device and log in
- Copy the SSH binaries on the device. SSH, SFTP and SCP as well as libssh.so are available precompiled here:Google: "android-command-line-ssh code google"
- Become root in the SSH session on the device:
su
- Remount the system partition in read-write:
mount -o remount,rw /system
- copy binaries to /system/bin:
cp ssh /system/bin/
cp scp /system/bin/
cp sftp /system/bin/
- Adjust the permissions
chmod 555 /system/bin/ssh
chmod 555 /system/bin/scp
chmod 555 /system/bin/sftp
- copy libssh.sp to /system/lib/:
cp libssh.so /system/lib/
- adjust permissions:
chmod 555 /system/lib/libssh.so
- remount /system in read-only
mount -o remount,ro /system
Done!
Cheers, Marshell

I prefer juicessh so it can keep bookmarks for all the servers I have to touch.
Sent from my Nexus 5

Pirateghost said:
I prefer juicessh so it can keep bookmarks for all the servers I have to touch.
Sent from my Nexus 5
Click to expand...
Click to collapse
Fair enough. I use JuicySSH myself and it is great - it is just that the native ssh client binary is scriptable, e.g. with gscript, which is not possible (or just barely possible with intents) from the command line.
Just another use case.
Best regards,
Marshell

We should talk about including not only ssh but some Linux tools for advanced users.

Any news regarding the integration of ssh into Paranoid Android? It would be a great help for administrators.

AddiB said:
Any news regarding the integration of ssh into Paranoid Android? It would be a great help for administrators.
Click to expand...
Click to collapse
I guess we all use JuiceSSH...

Related

[IMPROVED FIX] ADHOC Mode with scripts to switch between ADHOC and Infrastructure

This -> View attachment adhoc-switcher.zip <- archive includes the modified wpa_supplicant file that supports ADHOC mode, along with scripts to switch back and forth between the ADHOC mode wpa_supplicant and the stock (Infrastructure only) wpa_supplicant on your NC.
The included file adhoc-switcher.sh is will do all of the work for you.
From the included README file:
Unzip the archive View attachment adhoc-switcher.zip into the same directory as your adb binary.
Execute ./adhoc-switcher.sh in your adb binary directory.
# md5sum adhoc-switcher.zip
e682e1578df1a253f1e4c42fd89f37d5 adhoc-switcher.zip
When you run adhoc-switcher.sh, you will see the following output telling you what it is doing:
Code:
$ ./adhoc-switcher.sh
(1) Remounting /system as read-write...
(2) Making backup of original wpa_supplicant at:
/system/bin/wpa_supplicant.original...
(3) Making local backup of /system/bin/wpa_supplicant.original...
2070 KB/s (226036 bytes in 0.106s)
(4) Pushing up new files to /system/bin/...
wpa_supplicant.adhoc: 1662 KB/s (226028 bytes in 0.132s)
wpa_supplicant.infrastructure: 1711 KB/s (226036 bytes in 0.128s)
ap: 6 KB/s (271 bytes in 0.042s)
adhoc: 6 KB/s (253 bytes in 0.040s)
(5) Setting permissions on new files in /system/bin/...
(6) Setting Wifi mode to Infrastructure (ap)...
(7) Remounting /system as read-only...
All done!
To switch between Access Point (AP) [Infrastructure] mode and ADHOC mode,
execute the following commands on your NC:
# su
# ap
To switch to Access Point [Infrastructure] mode, execute the following
commands on your NC:
# su
# adhoc
You should turn off wifi before executing these commands.
Hope you find this useful.
John - your friendly neighborhood e-thug.
Thank you. Will give this a try.
Any chance of anyone creating a toggle widget that can toggle between both with a simple tap.
Sent from my SGH-T959 using XDA App
Very nice John. Good quick fix for the adhoc switching. Appreciate the effort.
Sent from the totally awesome Rooted Nook Color
rxr said:
Thank you. Will give this a try.
Any chance of anyone creating a toggle widget that can toggle between both with a simple tap.
Sent from my SGH-T959 using XDA App
Click to expand...
Click to collapse
I'd love to do that but, my netbook just isn't up to the task of running a full-on android dev environment. Over Christmas, I'll try to remember to bring the "big" laptop back with me.
If someone else beats me to it, that would be great too.
Maybe we could get the SoftKeys app to allow a new button to appear to toggle the wifi setting?
johnopsec said:
This -> View attachment 464007 <- archive includes the modified wpa_supplicant file that supports ADHOC mode, along with scripts to switch back and forth between the ADHOC mode wpa_supplicant and the stock (Infrastructure only) wpa_supplicant on your NC.
Click to expand...
Click to collapse
Hey there, Mr. eThug. Thanks for the update. But I didn't it was necessary. After installing the original fixed wpa_supplicant, I can connect to adhoc and infrastructure networks. Or is there something else I'm missing?
edison said:
Hey there, Mr. eThug. Thanks for the update. But I didn't it was necessary. After installing the original fixed wpa_supplicant, I can connect to adhoc and infrastructure networks. Or is there something else I'm missing?
Click to expand...
Click to collapse
The ADHOC capable wpa_supplicant has a bug that requires you restart wifi any time the NC sleeps. The original does not. Since my personal use is with standard Infrastructure (AP) connections primarily and ADHOC only on occasion, I decided that it would be handy to be able to switch between them easily.
You have a typo in the script, line 28 I think, should be "adb shell" and you have "db" shell.
Messes with permissions.
KitF said:
You have a typo in the script, line 28 I think, should be "adb shell" and you have "db" shell.
Messes with permissions.
Click to expand...
Click to collapse
I just verified from my local copy and also downloaded the archive I uploaded to the site. They're identical and in every instance, it is "./adb shell" just as it should be.
Any possibility you opened adhoc-switcher.sh in an editor and accidently deleted a character? Other than that, the MD5SUM of the original archive is:
# md5sum adhoc-switcher.zip
e682e1578df1a253f1e4c42fd89f37d5 adhoc-switcher.zip
Make sure that the MD5SUM matches for what you downloaded.
Oh that's right, I must have messed it up somehow converting it into a windows Batch file.
Any way we can get some sort of GUI app or a widget toggle for this? Seems like it would be handy for when I need to tether to my phone when there's no wifi around.
KitF said:
Oh that's right, I must have messed it up somehow converting it into a windows Batch file.
Any way we can get some sort of GUI app or a widget toggle for this? Seems like it would be handy for when I need to tether to my phone when there's no wifi around.
Click to expand...
Click to collapse
Cool. Glad we tracked that down!
I'd love a widget or app to switch between them. Two things though... This is a temporary "fix" for an issue. Once they get the bugs worked out of wpa_supplicant so it can support Infrastructure and ADHOC and not have the sleep issue, we won't need to switch back and forth between them. Second: I don't have a full-blown android dev platform to do an app or widget myself so, someone else would need to do it.
Maybe using gscript lite as was done here : http://www.chinadigitalcomm.com/android-a81/a81e-connect-to-ad-hoc-wifi-t1413-10.html
I suppose running sh scripts doesn't work on Windows?
nikescar said:
I suppose running sh scripts doesn't work on Windows?
Click to expand...
Click to collapse
Nope. But if you're up to the task, it should be easy for you to convert the script to winblowz .bat format for the most part.
I tried to modify the scripts to run through gscript and I thought it worked initially. Then when I went to switch it waste my wifi. Had to restore from the backup.
Gscripts would be nice I'm just not smart enough to do it.
Did you switch Wifi off before switching?
Also here's my converted .bat that I used:
Code:
echo
echo "(1) Remounting /system as read-write..."
adb shell "mount -o remount rw /system"
echo
echo "(2) Making backup of original wpa_supplicant at:"
echo "/system/bin/wpa_supplicant.original..."
adb shell "mv /system/bin/wpa_supplicant /system/bin/wpa_supplicant.original"
echo
echo "(3) Making local backup of /system/bin/wpa_supplicant.original..."
echo
adb pull /system/bin/wpa_supplicant.original
echo
echo "(4) Pushing up new files to /system/bin/..."
echo
echo -n "wpa_supplicant.adhoc: "
adb push wpa_supplicant.adhoc /system/bin/
echo -n "wpa_supplicant.infrastructure: "
adb push wpa_supplicant.infrastructure /system/bin/
echo -n "ap: "
adb push ap /system/bin/
echo -n "adhoc: "
adb push adhoc /system/bin/
echo
echo "(5) Setting permissions on new files in /system/bin/..."
adb shell "chmod 755 /system/bin/wpa_supplicant.*"
adb shell "chmod 755 /system/bin/ap"
adb shell "chmod 755 /system/bin/adhoc"
echo
echo "(6) Setting Wifi mode to Infrastructure (ap)..."
adb shell "ln -s /system/bin/wpa_supplicant.infrastructure /system/bin/wpa_supplicant"
echo
echo "(7) Remounting /system as read-only..."
adb shell "mount -o remount,ro /dev/block/mmcblk0p5 /system"
echo
echo "All done!"
echo
A bit messy but it works.
KitF said:
Did you switch Wifi off before switching?
Click to expand...
Click to collapse
Thanks for the bat.
What I was trying to do is modify the scripts to run through the gscripts app for Android. That way we could switch on the go a bit easier. Sure I could use a console emulator but one click (actually two) is what I was looking for.
I might give it a try later, the .sh files available here http://www.chinadigitalcomm.com/android-a81/a81e-connect-to-ad-hoc-wifi-t1413-10.html can be opened with a text editor and it looks like the command just "crushes" the file.
I can see the ad-hoc network created by my phone and I connect. But none of the web-based apps are working. Says I am connected but no data comes through. Any ideas?
The .bat file is a good idea.
I factory reset my Nook again (tried to return it for one that flickers less). I had to go through this again. I was distracted when going through the commands and had mucked something up - Wifi wouldn't start back up at all after I tried to switch back and forth. But I knew it worked because I had it working yesterday.
Poked my head in and checked security (ls -l /system/bin) , I could tell the security of the files didn't match. Looks like I missed one or two of the chmod commands (kids were probably distracting me). Fixed 'em up and it's working fine now.
At least with a .bat file or the like, there's less chance for a typo.

[SOLVED] OpenVPN on SGSII?

Hi,
I was wondering if OpenVPN is supported out of the box and if not, is there a possibility to make it work?
Searched the forum but couldn't find any specific info..
thanks in advance!
EDIT:
I created an update.zip which is posted in this thread
Not supported out of the box... it's baked into CM7 but obviously that's a custom rom! There's OpenVPN apps on the market but they require a rooted device. The one I've found to work the best was OpenVPN Settings (not the SGS2) but it requires the openvpn binary to be installed somehow first...
I'm using OpenVPN Settings on a CM based rom now (HTC Hero) From what I remember it needs tun.ko support in the kernel
Don't know if the default kernel has this..
Sent from my HTC Hero using Tapatalk
I had rooted my gs2 and installed openvpn binary, openvpn settings works.
but always see "FATAL: Linux ifconfig failed: could not execute external program".
Who can tell me why?
I remember I had the same issue a long time back before I was using CM based roms
Can't remember what but will try to look it up this weekend as I'm curious about the result
really need OpenVPN wheb I get my SGSII
Sent from my HTC Hero using Tapatalk
tux
Sent from my Nexus One
diesiren said:
ifconfig failed: could not execute external program
Click to expand...
Click to collapse
this seems to mean that OpenVPN is looking for ifconfig in the wrong place
you should connect your phone through usb and start adb shell
then type (change openvpn.conf to the conf file you are using)
Code:
openvpn --config /sdcard/openvpn/openvpn.conf
if you launch the command above there will some messages in the shell window
you should look for ifconfig
/system/xbin/bb/ifconfig tap0 192.168.1.40 netmask 255.255.255.0 mtu 1500 broadcast 192.168.1.255
Click to expand...
Click to collapse
now you know the path where OpenVPN is looking for ifconfig and where it can't find it (/system/xbin/bb/ifconfig)
now type the command below to locate where ifconfig is on your rom
Code:
which ifconfig
this could be for example
/system/xbin/ifconfig
Click to expand...
Click to collapse
now type the commands below in adb shell (ln -s <correct path> <incorrect path>)
Code:
cd /system/xbin
ln -s /system/xbin /system/xbin/bb
this will create a correct link for ifconfig and route commands
I have not tested it myself as I flashed a CM rom shortly after
but if you replace the values with your values it should work fine and not do any harm
if you get it to work could you please let me know?
thanks!
S2 is not in my hand right now. I'll try it tomorrow and thank you very much.
Sent from my Nexus One
OpenVPN works fine now and thx Gawis!!
This is my steps
1. Flashing Firmware with Odin (guide)
2. Root My S2, and busybox installed with SuperOneClick (guide)
3. Download OpenVPN File download and extract
4. Use adb tools
Code:
adb remount
adb push openvpn-static-2.1.1 /system/xbin/openvpn
adb shell
# chmod 775 /system/xbin/openvpn
# mkdir /system/xbin/bb
# ln -s /system/xbin/busybox /system/xbin/bb/ifconfig
# ln -s /system/xbin/busybox /system/xbin/bb/route
5. Download and install OpenVPN Settings From Android Market
6. Upload My config files to USBstorage.The path is /sdcard/openvpn/
7. Flashing StockKernel with Odin (guide)
over~
Sorry for my poor English~
Hi diesiren,
thanks for confirming and putting up the guide!
I'm really glad it works, hope to have my phone nex week or the week after and will try this one myself then!
diesiren said:
Code:
adb remount
adb push openvpn-static-2.1.1 /system/xbin/openvpn
adb shell
# chmod 775 /system/xbin/openvpn
# mkdir /system/xbin/bb
# ln -s /system/xbin/busybox /system/xbin/bb/ifconfig
# ln -s /system/xbin/busybox /system/xbin/bb/route
Click to expand...
Click to collapse
I just got my OpenVPN working on my SGSII!
I just rooted it with CF-Root 3.7 and then pushed the openvpn binary and executed the commands you posted
thanks for the guide!
I'm having problems getting openVPN to work.
I have adb pushed openvpn-static-2.1.1 to system/xbin already.
But when i adb shell, the result is "sh:applet not found"
I am 100% I am rooted. I am running root explorer, titanium backup, have busybox installed, and superuser.
Any advice would be extremely helpful.
Thanks!
Hmmm, haven't experienced any issues like that with adb yet so can't comment on that...
I created an update.zip for the whole thing a few days ago...
Are you running a custom rom? If so which one?
Am planning to post the update.zip here later...
I tested it with Cognition and CM7...
Sent from my GT-I9100 using Tapatalk
I just uploaded the update.zip in this thread
Gawis said:
Hmmm, haven't experienced any issues like that with adb yet so can't comment on that...
I created an update.zip for the whole thing a few days ago...
Are you running a custom rom? If so which one?
Am planning to post the update.zip here later...
I tested it with Cognition and CM7...
Sent from my GT-I9100 using Tapatalk
Click to expand...
Click to collapse
I'm on Exynos v3.6 ROM.
I saw your thread. Thanks for the zip, bro. Very much appreciated.
Thanks for the help! I found that I had to first remount in read/write mode the /system directory as mine was read-only.
Ran the code below to do this:
Code:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
Hey...
I have a similar issue. My SGS2 already is connected to the openVPN but i can't connect to an other client at the vpn. So no Ping, no tracerroute or (most important) telnet connection. I think it might be something about the routing but I don't find a hint on any forum.

[howto]make hostnames work on busybox

Rooted PDAs only! Shell required!
Before doing the following steps, verify that you don't have an "/etc/resolv.conf"! I reckon none of the stock ROMs have one, but this tweak doesn't work with such a file in place.
Code:
ls -l /etc/resolv.conf || echo "ok"
If this prints some file details and you can use eg. "ping -c 3 www.google.com", you don't have the problem in the first place.
If it says "no such file..." and "ok", go ahead.
Make a file named "/mnt/sdcard/resolv.conf" containing, for example:
Code:
nameserver 8.8.8.8
nameserver 8.8.4.4
These are the IP numbers of the Google public DNS resolvers, BTW, but you can use any others.
Code:
mount -o remount,rw /system &&
ln -s /mnt/sdcard/resolv.conf /etc/
mount -o remount,ro /system
The problem: busybox and other C-programs use a library component called the "stub-resolver" to make IP-adresses from hostnames. This isn't capable of resolving by itself, so it parses "/etc/resolv.conf". The "nameserver" lines in there tell it where to send the UDP packets with questions like "what's the IP of Gmail.com?".
Java programs do this differently: they use "getprop" for the IPs of the nameservers, and vendor customized "dhcpcd" scripts populate the needed properties.
C-programs need the etc/resolv.conf for proper operation.
Q: what does this do for me?
A: first, it'll make symbolic hostnames work for C-programs like "wget", "ping", "nslookup" etc. As added benefit, you can see the names requested by Android programs if you give the IPs of some DNS-resolver you might have in a home LAN. Look at its logs!
Q: what are these '&&' combinations for?
A: well, we don't get to see them often, not even in developer scripts, but they are very useful! They logically "AND" commands. If the command or program before an '&&' fails, none of the following ones will get executed. So if the first "mount" doesn't work (a typo or whatever), the symbolic link by the "ln -s ..." won't be attempted at all, meaning less errors. POSIX requires compliant shells to do this type of short-circuit evaluation, so we can rely on it.
Q: why use a symlink ("ln -s ...") instead of a file?
A: This way you can change nameservers without remounting /system, in fact, you don't even need to be root for this. Change /sdcard/resolv.conf and you're set.
Q: which nameservers should I use?
A: with a patch to "/system/etc/dhcpcd/dhcpcd-hooks/20-dns.conf" it's possible to use the ones from your ISP provided DHCP lease. I thought a onetime manual configuration would do for the moment. You could search the web for the OpenDNS resolvers as an alternative, or use your providers resolvers (eg. from the APN config).
Although I already had resolv.conf added, your explanation for why it is needed was very informative!!! Thanks.
ino-xda said:
Make a file named "/mnt/sdcard/resolv.conf" containing, for example: ...
Click to expand...
Click to collapse
Q: will this work in etc/init.d/ scripts?
A: that depends on when they run. The symbolic link points to a file on the sdcard, thus it will work no sooner than the sdcard has been mounted, but before scanning for media files, icons etc. has finished. Once the device is fully up and running, it should work reliably.

[APP][NO ROOT] Access Fire TV Settings without Amazon Launcher

If anyone wants to develop the program further, I have made it publicly available here.
https://github.com/rainman74/FireTV-Settings/releases
I hereby discontinue support for my Fire TV Guides and Apps. I've been a big fan of Fire TV devices for the last 2-3 years, but Amazon has now with each firmware further limited the possibilities of a configurable Android environment and even destroyed standard Android commands. This goes too far for me now.
I can recommend the following devices to anyone who wants to have a reasonable and much better Android TV experience, which I now use myself and am enthusiastic about:
Mi Box
Mi Box S
Sony Android TV (ATV3 platform, eg. XF7, XF8, XF9 or higher)
Awesome, thanks for sharing this! Will be using this on my ‘Playing With Fire’ Leanback Launcher configuration!
Are there any activities missing that could still be included in the conFIREator?
Ideas?
@rainman74
can you add this function:
-Restart Device
-ADB Debugging
-USB Debugging
-Apps from Unknown Sources
-Network Info (to look ip address from device)
-System Info (to look Software version from device)
droidpaine said:
@rainman74
can you add this function:
-Restart Device
-ADB Debugging
-USB Debugging
-Apps from Unknown Sources
-Network Info (to look ip address from device)
-System Info (to look Software version from device)
Click to expand...
Click to collapse
Thanks for the ideas. But this is not only possible with activities, you need a modified settings app for these commands (except for restarting, you need root privileges for this, or a corresponding authorized app).
Okay, let's see:
Restart Device -> Simple Reboot
turn on ADB/USB -> you have to install modified settings app from PlayFire as system app
Network Info (to look ip address from device) -> you have to install modified settings app from PlayFire as system app
System Info (to look Software version from device) -> you have to install modified settings app from PlayFire as system app
turn on unknown sources -> you have to install modified settings app from PlayFire as system app
ok thanks for the explanation
restart with the app works
rainman74 said:
Thanks for the ideas. But this is not only possible with activities, you need a modified settings app for these commands (except for restarting, you need root privileges for this, or a corresponding authorized app).
Okay, let's see:
Restart Device -> Simple Reboot
turn on ADB/USB -> you have to install modified settings app from PlayFire as system app
Network Info (to look ip address from device) -> you have to install modified settings app from PlayFire as system app
System Info (to look Software version from device) -> you have to install modified settings app from PlayFire as system app
turn on unknown sources -> you have to install modified settings app from PlayFire as system app
Click to expand...
Click to collapse
Is there a tutorial on how to install an app as a system app? Or can you point me in the right direction.
BRICK0044 said:
Is there a tutorial on how to install an app as a system app? Or can you point me in the right direction.
Click to expand...
Click to collapse
For this you need root rights!
First you have to download the modified Android TV Settings app from PlayFire:
View attachment TvSettings.apk
Then copy the app into the system app folder and MUST restart your Fire TV to install it automatically.
Code:
adb push C:\TvSettings.apk /sdcard/
adb shell su -c mount -o remount,rw /system
adb shell su -c mkdir /system/priv-app/TvSettings
adb shell su -c chmod 755 /system/priv-app/TvSettings
adb shell su -c cp /sdcard/TvSettings.apk /system/priv-app/TvSettings/TvSettings.apk
adb shell su -c chmod 644 /system/priv-app/TvSettings/TvSettings.apk
adb shell su -c chown root:root /system/priv-app/TvSettings/TvSettings.apk
adb shell su -c mount -o remount,ro /system
adb shell su -c rm /sdcard/TvSettings.apk
rainman74 said:
For this you need root rights!
First you have to download the modified Android TV Settings app from PlayFire:
View attachment 4475903
Then copy the app into the system app folder and MUST restart your Fire TV to install it automatically.
Code:
adb push C:\TvSettings.apk /sdcard/
adb shell su -c mount -o remount,rw /system
adb shell su -c mkdir /system/priv-app/TvSettings
adb shell su -c chmod 755 /system/priv-app/TvSettings
adb shell su -c cp /sdcard/TvSettings.apk /system/priv-app/TvSettings/TvSettings.apk
adb shell su -c chmod 644 /system/priv-app/TvSettings/TvSettings.apk
adb shell su -c chown root:root /system/priv-app/TvSettings/TvSettings.apk
adb shell su -c mount -o remount,ro /system
adb shell su -c rm /sdcard/TvSettings.apk
Click to expand...
Click to collapse
Thanks again worked great!
Updated app in first post (Access to SuperSU Settings)
Updated app in first post (Access to Xposed and VMLite VNC Server)
Also added Google Play Store, Android Terminal, Mouse Toogle and Reboot
Updated app in first post
If you use XInstaller, other basic Amazon activities can be called up (which are normally only possible with the Amazon TV Launcher) and I will include them in an upcoming version of conFIREator, e.g. screen and sound settings, sdcard menu, Fire TV info, etc.
This allows you to access all Amazon settings even if Amazon Launcher is disabled.
Updated app in first post with two versions: 1) possible settings without root and 2) really all settings with root & Xinstaller
New version added which removed access to notifications, because they no longer work with the Leanback Launcher.
If you still need it, please continue to use version 2.1.
All new version of Fire TV Settings
@rainman74 hello, first of all thank you for your work. i have an fire tv stick 2nd using halauncher and amazon launcher removed. no root. i want to acces display&sound is it posibile ? i want the overscan option. thks
xhostluv said:
@rainman74 hello, first of all thank you for your work. i have an fire tv stick 2nd using halauncher and amazon launcher removed. no root. i want to acces display&sound is it posibile ? i want the overscan option. thks
Click to expand...
Click to collapse
No that's not possible, you need root privileges and Xposed/XInstaller and you can't get them on a Fire TV Stick 2.
rainman74 said:
No that's not possible, you need root privileges and Xposed/XInstaller and you can't get them on a Fire TV Stick 2.
Click to expand...
Click to collapse
Did you use the Magisk xposed or the standalone xposed. I understand everything has to be flashed in twrp. thanks

[GUIDE] Mount Remote CIFS Share Locally on Nexus-6P - Android 8.1.0

I searched enough forum posts on XDA and elsewhere that resulted in <null> that i was ASTOUNDED when I FINALLY got this to work.
My goal was to, while remote and connected to home via VPN, to use my phone to browse to and download a file directly onto my NAS. Downloading it locally (ie, onto the phone), then copying/moving it to my NAS via ES File Explorer was a pain in the rear, and just not good enough for me in today's fast-paced no-patience world. Plus, too many posts I read ended in "it can't be done" so my stubborn butt would not give up
SOOOoooo... here it is:
To mount a CIFS/SMB share from a remote network to a local directory on your device:
1 - Prerequisites:
- root
- francokernel
- busybox (pro?)
- ES File Explorer with root access
2 - /etc/fstab:
- I found a file on github that I can't link because I've been leaching off of XDA for years and haven't contributed enough to post links.
- Google the phrase "nexus 6p fstab", for me the github page with the fstab file is the first search result
- I saved that file on my phone as (*gasp*) /etc/fstab
3 - create local path:
- I chose to create /data/media/0/my_local_path because (A) /data exists in the fstab file, and (B) /data/media/0 seems to me to be the source of or a symlink to /sdcard (*and/or*?) /storage/emulated/0 (not sure to be honest, haven't researched this yet)
Edit: I still haven't researched why, but the path I created in /data/media/0/ did not survive a reboot. I instead made /data/my_path and so far this is sticking around.
4 - setup download directory:
- since I don't use ES Downloader for any other purpose, I chose it as my download-to-NAS app.
- I set the default download directory for ES Downloader to /data/media/0/my_local_path
5 - mount command:
- in a command prompt on my desktop machine with the phone connected via USB:
Code:
adb shell
angler:/ $ su
angler:/ # setenforce Permissive
angler:/ # exit
angler:/ $ su --mount-master -c busybox mount -o username=myshareaccessusername,password=myshareaccesspassword,rw,noperm,file_mode=0777,dir_mode=0777,iocharset=utf8 -t cifs //xxx.xxx.xxx.xxx/path/to/my/share /data/media/0/my_local_path
angler:/ $ su
angler:/ # setenforce Enforcing
Edit: This worked the first time, but after a reboot is got "sh: busybox: not found". Did some research, still not sure why I had to replace "busybox" with "/sbin/busybox" in the mount command, but that did work.
That's it!!!
I am NOT connected to my local network or USB to my computer. I go to the Googles and find some random file to download, download it with ES Downloader, and VOILA!!! it is in my chosen directory on my NAS at home. Works when I am remote and connected to my home via VPN.
Badda bing badda boom!
And you're all thinking it, I'm just confirming it... yes, I am somewhat of a noob and very proud of myself. So what???
~PEACE

Categories

Resources