[Q] openssh / busybox / gnu utilities on XT1528 - E 2015 Q&A, Help & Troubleshooting

Hi,
I'd like to get open ssh, gnu utilities, busybox and such on my phone, so that I can use adb shell to connect to the phone and use it like a regular linux host. Is there a way to get these things on the phone without having root, and still be able to use them from the adb shell? From what I understand there isn't a root for the XT1528 .Finally I'd like to have an alternative way to connect to the phone than the adb shell. I've had connection issues with previous versions of the adb shell when running busybox utilites. This would probably be provided by open ssh server or similar.

Related

[Q] What's a good ssh server to run on the HOX+?

Any recommendations for a good ssh server to run on the phone? It's easier to me to run a shell, vi, scp via something like putty that works well as a real terminal than 'adb shell' via the command prompt where vi is all messed up, etc. I tried Android Commander as an alternative but it's too buggy at least against our phone.
So what is *the* ssh server to run on the phone with the option to keep it disabled most of the time, except when I need to use it?

Best remote shell alternative to adb shell?

What's a good approach for getting a remote shell from Windows? adb shell just doesn't cut it, I tried it from the Win command prompt and from cygwin's mintty and there are all sorts of terminal problems, cursor keys not working, escape sequences not working, vi is a mess, etc.
So what's the proper way to set up a remote shell so that you get close to the Linux experience while connecting from Windows? E.g. sshd and connect via putty, busybox installed, etc. Any recommendations please before I go and try a bunch of things and make a mess? Thanks!
sirxdroid said:
What's a good approach for getting a remote shell from Windows? adb shell just doesn't cut it, I tried it from the Win command prompt and from cygwin's mintty and there are all sorts of terminal problems, cursor keys not working, escape sequences not working, vi is a mess, etc.
So what's the proper way to set up a remote shell so that you get close to the Linux experience while connecting from Windows? E.g. sshd and connect via putty, busybox installed, etc. Any recommendations please before I go and try a bunch of things and make a mess? Thanks!
Click to expand...
Click to collapse
SSH is a good alternative. You can then connect via PUTTY from your Windos machine. There's a small ssh server for embedded system called "dropbear", alto not fully functional (no scp/sftp support), it's easier to install than openssh. If you don't want to install it in the Android OS native, you can always download an app including it, there's a few of them.
Myself I'm using openssh, using my fully GNU Debian environment (see my signature). This solution also enables me to use X-windows for remote access to my Android. But I guess this is overkill for you. But still, very cool.
kuisma said:
SSH is a good alternative. You can then connect via PUTTY from your Windos machine. There's a small ssh server for embedded system called "dropbear", alto not fully functional (no scp/sftp support), it's easier to install than openssh. If you don't want to install it in the Android OS native, you can always download an app including it, there's a few of them.
Myself I'm using openssh, using my fully GNU Debian environment (see my signature). This solution also enables me to use X-windows for remote access to my Android. But I guess this is overkill for you. But still, very cool.
Click to expand...
Click to collapse
Thanks! Your link Run a complete GNU/Linux distribution on your Android is pretty cool!
I tried DropBear SSH Server II and SSHDroid and they seem to work well enough for what I need. Next step is to get sftp working which apparently it is possible with DropBear SSH Server II with a bit of manual work.

[Q] How to get Wi-Fi working

I read somewhere that in order to get Wi-Fi working you need to ssh in to the phone and then run some commands? anyone know specifically how this is done?
Plays2 said:
I read somewhere that in order to get Wi-Fi working you need to ssh in to the phone and then run some commands? anyone know specifically how this is done?
Click to expand...
Click to collapse
You're not going to be able to ssh into it until after you get wifi working. You can port ssh through adb but you may as well just use adb shell.
As root:
Code:
adb shell
adb ubuntu_chroot shell
You can then debbug the networking (hopefully you have more luck than I'm having.

[Q]

Hi,
I'm trying to run a bash script on Android without root access (Nexus 4) using Terminal IDE app. Script fails with output "parent shell dies". I tried to run the same script on Ubuntu on Android phone with root access and script worked fine. In both cases I used the same version of bash shell. Does anyone know how can I solve this?

Hidden Tethering Usage, PDAnet Instability and recreating "Hide Tether Usage"

Hidden Tethering Usage, PDAnet Instability and recreating "Hide Tether Usage"
Two Questions.
1) What is going on inside PDAnet to cause it to be so unstable?
2) Can whatever magic pixie dust running inside PDAnet /FoxFix hiding the tethering usage, be recreated in a linux environment, without full-root?
Ive found a HackerNews post here about using adb to set the DUN configuration:
https://news.ycombinator.com/item?id=20461879
Code:
adb shell settings put global tether_dun_required 0
This coupled with the Tether package (https://github.com/bemehiser/Tether/) and cyanogenmod tether results in blazing fast, yet impressively sporadic bandwidth ( 50 or 1mbps ... nothing in between @ 90% time being spent in crawling )
Additionally I've run this line:
Code:
settings put global tether_dun_apn "APNDUN,n.ispsn,,,,,,,,,310,120,,default,mms,dun"
Yet it seems to have done nothing to change the misbehaving speed fluctuations.
Ive found a few other packages:
https://github.com/RiFi2k/unlimited-tethering
https://github.com/double-m/easy-usb-tethering
https://github.com/evdenis/tether_unblock
But havn't used them yet.
Endgame I want my phone to not snitch on my USB-based tethering.
Can this be done with just ADB or do I need to full root the phone?
Heres another possible workaround using SQLITE to define what seems to be able to be set using ADB
http://www.madore.org/~david/linux/android.html
I BELIEVE this substantiates that changing a routing table, once full-rooted, would fix any DUN-based carrier reporting:
https://danielpocock.com/android-betrays-tethering-data/
Found more information on how PDAnet might work its magic:
https://www.howardforums.com/showth...-tethering-look-like-on-device-data-use/page4
PDANet hides tethering by changing the user agent of every HTTP request passed through, and also blocking OS-specific ports and features (Windows Update, Mac App Store, etc).
This in turn has the smartphone route each request, and then replicate the data back to the device. Anything only a PC could truly do (like Mac App Store), is in turn blocked.
Since then you're getting the mobile-formatted versions of sites, and not doing anything that you couldn't also do on the smartphone... if Android Auto isn't counted tethering, PDANet's stealth mode certainly is doing the same thing - basically... especially under Block C rules.
Click to expand...
Click to collapse
crazycarl said:
Can this be done with just ADB or do I need to full root the phone?
Click to expand...
Click to collapse
To enter Android's Shell
Code:
adb shell
requires a rooted Android.
Wait running the command requires a rooted phone?
Ive been able to run the command and my phones not rooted.
Maybe its just not giving me an error explicitly saying I dont have auth to run the command?
jwoegerbauer said:
To enter Android's Shell
requires a rooted Android.
Click to expand...
Click to collapse
I dont think this true. Im fairly certain that i've not rooted my phone yet Im able to connect the USB and bring up the adb shell promp:
Code:
[email protected]:~$ adb shell
a50:/ $
@crazycarl
What you think means nothing to me.
jwoegerbauer said:
@crazycarl
What you think means nothing to me.
Click to expand...
Click to collapse
That's good to know.
So youre saying that the $ adb shell will run on a terminal, accept commands, and issue no notification of failures.
IDK just seems unlikely.
Typical linux envs will notify you if you're got insufficient permissions. So what youre suggesting is an anti-pattern to whats most common.
Now you see my skepticism.
For example:
$ adb shell dumpsys activity
gives appropriate output.
Code:
ACTIVITY MANAGER Freecess (dumpsys activity freecess)
mFreecessManagedPackages --- size 132
-Uid 10192(-)-Idle(-)-Pkg com.amazon.mShop.android.shopping
-Uid 10033(-)-Idle(-)-Pkg com.sec.android.widgetapp.samsungapps
-Uid 10168(-)-Idle(-)-Pkg com.google.android.youtube
-Uid 10032(-)-Idle(-)-Pkg com.samsung.android.app.galaxyfinder
-Uid 10101(-)-Idle(-)-Pkg com.samsung.android.themestore
-Uid 10177(-)-Idle(-)-Pkg com.sec.android.app.chromecustomizations
-Uid 10197(-)-Idle(-)-Pkg com.sprint.care
-Uid 10194(-)-Idle(-)-Pkg com.sprint.ecid
-Uid 10271(-)-Idle(-)-Pkg com.sprint.w.v8
-Uid 10112(-)-Idle(-)-Pkg com.sprint.zone
So what is it @ jwoegerbauer ?
Either I've got a rooted phone and I don't know about it. Or running commands with $ adb shell doesn't require a rooted phone.
@crazycarl
In order to bring it to an end: Yes, i was mistaken, I apologize.
crazycarl said:
I dont think this true. Im fairly certain that i've not rooted my phone yet Im able to connect the USB and bring up the adb shell promp:
Code:
[email protected]:~$ adb shell
a50:/ $
Click to expand...
Click to collapse
You will get limited shell action. I don't think you have SuperUser permission so you can't change anything significant.

Categories

Resources