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.
Related
Alrighty, I am new to the linux world and I am trying to setup my beloved adb on my Ubuntu. Java is there, SDK in in /opt/androidsdk. Do I need something more? I read that people install Eclipse also but since I am not a developer I don't need it, do I? I only need to execute very simple adb commands like push.
With Windows I needed the HTC Hero drivers and then it worked like a charm. Do I need something similar here?
I tried to run adb devices while my phone was connected and I get a phone with ?????????? as a name.
Is adb going to work or do I miss something?
Thanks in advance!
Adb works fine on x64 Ubuntu. I know there is a guide for it on www.villainrom.co.uk/wiki, but then search "adb" and it should bring up the entry.
I'm installing Ubuntu again today anyway, so I can check it works (which it does btw)
theodore80 said:
Alrighty, I am new to the linux world and I am trying to setup my beloved adb on my Ubuntu. Java is there, SDK in in /opt/androidsdk. Do I need something more? I read that people install Eclipse also but since I am not a developer I don't need it, do I? I only need to execute very simple adb commands like push.
With Windows I needed the HTC Hero drivers and then it worked like a charm. Do I need something similar here?
I tried to run adb devices while my phone was connected and I get a phone with ?????????? as a name.
Is adb going to work or do I miss something?
Thanks in advance!
Click to expand...
Click to collapse
Try doing this.
sudo adb kill-server
sudo adb root
then do w/e you need to do. This worked for me.
Not sure if you need to sudo kill-server, if it doesnt kill it, try without
ante0 said:
Try doing this.
sudo adb kill-server
sudo adb root
then do w/e you need to do. This worked for me.
Not sure if you need to sudo kill-server, if it doesnt kill it, try without
Click to expand...
Click to collapse
I did this followed by adb devices and I now get the correct device name.
I guess that it works though I didn't try to push any app
Another question: how do I add adb to the path? I currently need to type in the full adb path. It is linux related but I am new into this exciting world!!
Thanks for helping me out!
Google "Ubuntu add to path" and it will tell you
Hi,
I have a problem with adb wireless as documentation is very limited and I actually had no knowledge of adb whatsoever.
However, I have it up and running and I can change and list directories. I also can remove applications but I struggle with the very simple push and pull commands.
Here is what I do. First I connect to adb wireless, then I type adb shell and after that su.
Now when I try to push or pull I always get a :not found error.
Can anyone advise what I'm doing wrong?
For example: "pull /data/app/com.antivirus-2.apk " will return pull:not found
Any help is greatly appreciated as I would like to use adb wireless as my standard application for moving files from/to pc and phone.
push and pull are not ran from a shell, but as actuall ADB calls/commands.
i.e. instead of "adb shell" you do "adb push" or "adb pull".
Hope this helps
+1
Thanks very much ..... I knew that the solution must be very simple ...
I'm in a recovery boot loop and need to be able to access adb from recovery. I'm running ubuntu and adb devices while in recovery shows ?????????????? no permissions. Can somebody please help me. I think it may be as simple as a rule change somewhere but thats just a guess. Thanks guys.
newellj79 said:
I'm in a recovery boot loop and need to be able to access adb from recovery. I'm running ubuntu and adb devices while in recovery shows ?????????????? no permissions. Can somebody please help me. I think it may be as simple as a rule change somewhere but thats just a guess. Thanks guys.
Click to expand...
Click to collapse
Try this:
sudo su
adb start-server (preceeded by adb kill-server if adb already running). NOTE: You may have to change the path to adb since you are using Superuser to start the server, it may not be in your .bashrc.
exit
Then, run adb devices and see what you get. Happened to me with the EVO 3D and the above worked for me. Starting the adb server with SU permissions works.
pinky059 said:
Try this:
sudo su
adb start-server (preceeded by adb kill-server if adb already running). NOTE: You may have to change the path to adb since you are using Superuser to start the server, it may not be in your .bashrc.
exit
Then, run adb devices and see what you get. Happened to me with the EVO 3D and the above worked for me. Starting the adb server with SU permissions works.
Click to expand...
Click to collapse
Thanks. That got it,
Sent from my T-Mobile myTouch 3G using XDA
The file to check would an udev rules file. See where ubuntu keeps it.
Sent from my i9250
Hi
First of all, sorry for my bad english.
It has been several hours that i'm trying to find a solution to my problem.
I want to wake my nvidia shield via adb command throught network.
I installed android tools on my raspberry pi, and when i connect to it via command line everything work, i can wake up the Shield.
But when i put my command line in a bash script
Code:
#!/bin/bash
adb kill-server
adb start-server
adb connect 192.168.1.38:5555
adb shell input keyevent KEYCODE_WAKEUP
adb kill-server
i have this error :
Code:
error: device unauthorized.
This adb server's $ADB_VENDOR_KEYS is not set
Try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.
I dont know why, when i am execute the command line in a bash script it can't find the rsa key, who is there and should be used.
Any ideas
Thanks in advance.
darkouz said:
Hi
First of all, sorry for my bad english.
It has been several hours that i'm trying to find a solution to my problem.
I want to wake my nvidia shield via adb command throught network.
I installed android tools on my raspberry pi, and when i connect to it via command line everything work, i can wake up the Shield.
But when i put my command line in a bash script
Code:
#!/bin/bash
adb kill-server
adb start-server
adb connect 192.168.1.38:5555
adb shell input keyevent KEYCODE_WAKEUP
adb kill-server
i have this error :
Code:
error: device unauthorized.
This adb server's $ADB_VENDOR_KEYS is not set
Try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.
I dont know why, when i am execute the command line in a bash script it can't find the rsa key, who is there and should be used.
Any ideas
Thanks in advance.
Click to expand...
Click to collapse
Normally on Windows the first time you turn on usb debugging it will pop up and ask you to accept the adb key. This is what is preventing you, I haven't had to resolve this in Linux, but essentially you need to go to C:\\Users\You\.android\ (in Windows, path will be different in Linux) and copy the file adbkey. Now you need to move it to data/misc/adb/
This will most likely require root or TWRP. Good luck, my friend.
Sent from my KYOCERA-C6745 using Tapatalk
Hi
Thanks for your quick response.
I couldn't make the connection via USB my adb tells me that there is no emulated device. But it work with network And yeah the first time I made the connection, the authorization pop up appeared on my shield. I checked, always authorized this device.
I have the key in /root/.android on my raspberry pi
I don't think I have the access to the /data/ folder in my shield.
But what I don't understand is why when I execute the command in a terminal like that, it work and when it's from the bash script it won't work anymore
darkouz said:
Hi
Thanks for your quick response.
I couldn't make the connection via USB my adb tells me that there is no emulated device. But it work with network And yeah the first time I made the connection, the authorization pop up appeared on my shield. I checked, always authorized this device.
I have the key in /root/.android on my raspberry pi
I don't think I have the access to the /data/ folder in my shield.
But what I don't understand is why when I execute the command in a terminal like that, it work and when it's from the bash script it won't work anymore
Click to expand...
Click to collapse
Option B would be to dump your boot.img and use Assayed's kitchen to add insecure kernel and adb direct root, then the adbkey doesn't need to be on the device.
Sent from my KYOCERA-C6745 using Tapatalk
RealWelder said:
Option B would be to dump your boot.img and use Assayed's kitchen to add insecure kernel and adb direct root, then the adbkey doesn't need to be on the device.
Sent from my KYOCERA-C6745 using Tapatalk
Click to expand...
Click to collapse
Yeah as you said in your previous post, i think the solution is to root the nvidia shield cause the rsa key doesny copy itself on the device.
But would you able to explain to me why if i execute those command individually in the terminal it works.
But if i put them all in a bash script that i execute it doesnt work anymore, what's the difference between those two procedure ?
darkouz said:
Yeah as you said in your previous post, i think the solution is to root the nvidia shield cause the rsa key doesny copy itself on the device.
But would you able to explain to me why if i execute those command individually in the terminal it works.
But if i put them all in a bash script that i execute it doesnt work anymore, what's the difference between those two procedure ?
Click to expand...
Click to collapse
How are you executing the script? There's some (hopefully) helpful info here.
https://community.spiceworks.com/topic/433656-command-not-running-in-batch-but-will-run-in-cmd
Sent from my KYOCERA-C6745 using Tapatalk
RealWelder said:
How are you executing the script? There's some (hopefully) helpful info here.
https://community.spiceworks.com/topic/433656-command-not-running-in-batch-but-will-run-in-cmd
Sent from my KYOCERA-C6745 using Tapatalk
Click to expand...
Click to collapse
i m doing : sh script.sh
i m gonna read that, thanks
I found the solution.
I don't really understand why, but adding
Code:
sleep 1
before
Code:
adb shell input keyevent KEYCODE_BACK
resolved the problem, maybe the script execution was to fast for adb to adjust, dont know.
All i know is, that works
darkouz said:
I found the solution.
I don't really understand why, but adding
Code:
sleep 1
before
Code:
adb shell input keyevent KEYCODE_BACK
resolved the problem, maybe the script execution was to fast for adb to adjust, dont know.
All i know is, that works
Click to expand...
Click to collapse
Glad you got it.
Sent from my KYOCERA-C6745 using Tapatalk
sudo rm -rf /home/(username)/.android
that worked with my kde neon machine
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.