[TIP] Wake On Lan - T-Mobile Samsung Galaxy Note 3

Here is a tip for anyone looking to use their phone to wake up their computer. There's a few ways to do this, but I will explain my way.
What you'll need is a rooted phone, and busybox (with ether-wake compiled in).
Basically, you just run the shell command:
Code:
ether-wake -b -i wlan0 XX:XX:XX:XX:XX:XX
Replace the "XX:XX:XX:XX:XX:XX" with the MAC Address of the computer you want to wake.
Example: ether-wake -b -i wlan0 12:34:56:78:90:AB
Now why use this and not the many Wake On Lan apps from the Play Store? Well, this is a simple command line that can be used in Tasker via the shell run command option. And you don't need to install an app, and you don't need to navigate through an app every time you want to wake your computer.
Real world use:
I hover my phone over an NFC tag, and my laptop wakes up. I used NFC Task Launcher to write a task to an NFC Tag (NTAG203). The NFC Task Launcher launches the Tasker task that runs the shell command above.

I use this as well, but be advised that your PC / Laptop also has to be suspended in the correct sleep state or it won't wake up at all. IIRC, you need to change the sleep level to S2 or higher in BIOS. If S1, then it's in deep sleep and won't wake for anything other than physical.

i wonder if there is a way to turn your computer on with your phone even when it is off
logmein pro can do that, but I cannot justify the monthly subscription bill

thinkjoey said:
i wonder if there is a way to turn your computer on with your phone even when it is off
logmein pro can do that, but I cannot justify the monthly subscription bill
Click to expand...
Click to collapse
You control your robot on site via your phone to go over and push the on button.

If i do this command: ether-wake -b -i wlan0 XX:XX:XX:XX:XX:XX i get bad system call.
I already installed BusyBox and ether-wake applet, any fix please?

Related

[Q] How can you display what ports are associated with specific programs?

So in Ubuntu, the command you would normally use to grab what programs are associated with specific programs is:
netstat -ap
However, in Android, this feature has been gimped so that any flag you use gives out the same output, a basic netstat command.
I am trying to figure out what ports are being used by which programs, and I was told that lsof would be able to give me that information, but when I take that from the Terminal Emulator, it gives me A LOT of output and I am not sure what to do with it, how can I determine what ports are being use by which application?
As I have about 10 ports open right now that I am not sure what they are all being used by.
Is there a grep command that I could use to lessen the output, or is there some other command that can tell me what ports are being used by a specified application?

Remote Control (OF ANDROID!!!)

DROWNING in Google and forum search results here. Good search terms, links, 'app' names, welcome.
(Drowning because I catch hits where the android remote controls another device, such as a TV, or a PC - instead of the other way around.)
It's becoming increasingly difficult to remotely help friends that use Android - mostly because I can neither see nor control their screens.
What's the best way / apps to go about setting this up?
NOTES:
this is NOT android acting as a remote control.
this is NOT android remote controling a PC
this IS remote controlling the ANDROID.
I have remote access to their network, be it via ssh or vnc. (From a 'privacy' perspective, it's only sense to get to their network, then get to their Android - i.e. Access to their stuff is under their control.)
wi-fi is up and happy. As is USB, for that matter.
the remote phone is NOT rooted.
I've come across, but have no opinion on (your opinions welcome):
Remote Control Add-On - https://play.google.com/store/apps/details?id=net.xdevelop.rc&hl=en
Remote Web Desktop - https://play.google.com/store/apps/details?id=net.xdevelop.rm&feature=more_from_developer
AirDroid - https://play.google.com/store/apps/details?id=com.sand.airdroid
TeamViewer QuickSupport - https://play.google.com/store/apps/details?id=com.teamviewer.quicksupport.market.samsung / Needs pc side from www.teamviewer.com. (Note: Android might not be a Samsung. I thought I saw a non-Samsung remote control on their site, but now don't see it.)
Droid VNC server - https://play.google.com/store/apps/details?id=org.onaips.vnc
VMLite VNC Server - https://play.google.com/store/apps/details?id=com.vmlite.vncserver&hl=en (Has a process for non-root access. Better than nothing, I suppose.)
Webkey - https://play.google.com/store/apps/..._result#?t=W251bGwsMSwxLDEsImNvbS53ZWJrZXkiXQ..
Thoughs / suggestions / terms / recommendations / experiences / etc.???
Thanks.
AirDroid suppose to be a good one, but didn't use it my self yet.
taiber2000 said:
AirDroid suppose to be a good one, but didn't use it my self yet.
Click to expand...
Click to collapse
Remote Web Desktop looks like it has some interesting functionality, is pretty enough without being over the top (speaking as a guy who finds ssh, in colour, of course, adequately pretty), but is sufficiently broken to be not worth pursuing. Terminal isn't really there (e.g. su results in prompts of $ on one line, then # on next), web cam capture captures a still only, screen capture bears no resemblance / colour fix doesn't, ... uninstalled.
Companion or standalone Remote Control Add-On is through browser only, and at port 3389 of all things. [No RDP doesn't work, either.] Chrome / Opera / Firefox none works - says to install java, takes you to Oracle but not to what it wants. Not quite latest / greatest 6 installed beforehand and it still wants java installed. Not going back to 7, uninstalled that some while ago - will wait until it becomes real. App promises standard vnc connectivity at 5901 (why not 5900 I've no idea), but doesn't work. Netstat shows it isn't even listening.
Uninstalled ... next!
taiber2000 said:
AirDroid suppose to be a good one, but didn't use it my self yet.
Click to expand...
Click to collapse
Webkey wouldn't stay up long enough for more than a few clicks in browser.
Service kept dying. Restart succeeded most of the time, but not always. Task manager exit and it came back up in those instances.
Uninstalled.
*Note to Selves: AdAway (can) run an internal web server (to catch / redirect web calls), and (by necessity) runs on standard ports, both www and https. So ... if you run another web catching app, it can't use those ports. [Not a problem for them to do so to date, but just so's you don't blame the app under test for not working when it's trying to listen on a port already taken by AdAway.]
- and you want to run the AdAway web server - better it give an immediate unreachable response than having to wait for the call(s) to time out.
Airdroid seems nice / capable enough, if a little 'fluffly.'
Separate ssh / samba / vnc apps seem a little simpler and cleaner - if more to configure.
Samba - 'Samba Filesharing' (edit smb.conf if you want root (as in /), although smb.conf now says modifications not supported.)
[If you modify / something breaks, go back to stock and see if it still breaks. Duh!]
VMLite VNC Server - not tried.
Pixel VNC Server Beta - sure is. Won't stay up. Connect attempt results in service failure [Error(3)] before first screen draw. (I see drawing initial screen message, then it drops.) Uninstalled. Looks to have the nicest / cleanest interface though. Just the facts / text, nothing goofy / fancy.
VNC server (wencent) and droid VNC server must use same code base - options/screens seem identical.
- both are slow (but better than nothing), both seem to take a number of restarts before picking up password / port changes, although the port it says it's at matches the port entered. e.g. it defaults to 5901, I changed to 5900, started, and it displayed 5900 but was actually listening on 5901. Note: Don't use special characters in password, such as '&' - plain text password storage in .xml file gets written wrong. Probably the cause of the startup / port / password misfires. YEP, I SAID *PLAIN* TEXT PASSWORD STORAGE. <sigh>
VNC server (wencent) blog page annoying, droid VNC 'nicer'. I noted to both to please put restart button on same page as on/off. No auto-rotate, so if you have to rotate (in settings), and since a restart is necessary to effect, a restart button would be useful.
droid VNC settings hint at (but broken / no worky / not what it is) at a reverse VNC connection. Which would be FANTASTIC! Your idiot friend out and about you can't get to, but he could call you at your known IP / forwarded listening port.
HTH.
Android control PC?
I have read the article http://flash-video-player.blogspot.com/2013/02/how-to-use-android-phone-to-remote.html and I just wonder if the apps here can support PC controlling Android phone.
I was looking for the same thing.. I have the Samsung Captivate and S3.
I tried the RemoteCall from Rsupport which I heard of them from Mobizen (same company). No rooting and standard ports (can't see it happening on a 8888..). It can control and gives you all the info.
One thing is that they charge 1600 for a year.. waaay too expensive for me.. they said discount is available for more than 1 license, but I guess that will apply to businesses.. not for individuals.. I will say Mobizen is so far the solution for me.
Installed VMLite VNC Server. Works great on my not-rooted phone. I had to install libncurses5:i386 on my amd64 ubuntu to work with adb. It would be better if I could change the resolution of the phone's image. Should be cheaper.
Thanks, i am using webkey. it's a very nice app. :good:
team viewer versus airdroid
Hello everyone. Sorry mi english is not very good
I am doing proyect that I have to install a device ( samsung s4 ) 5km away from home and run an app on it to trigger a foto camera.
Team viewer do that but you have to be in the device to accept the conexion remote, so is no suitable for me at this point. Airdroid dont ask for permision to conect to the device , which is excelent , but I can not run an app inside the device in remote, so is no ok for me at this point.
The question is : how can I open an app to control the camera from the device in remote whith out me beside to the device?? Is there an app to do that??
How can I avoid in team viewer to ask permision to acces to the device??
Is posible to do something about it ??
I am not talking about the camera in the device , I am talking about a camera which is conected to my device by a cable at the same time and trigger and control the camera setings from km´s away via Lan conection 3g.
Thank you all
Marcos
connect to teamviewer quicksupport without someone to accept you
maxbcn said:
Hello everyone. Sorry mi english is not very good
I am doing proyect that I have to install a device ( samsung s4 ) 5km away from home and run an app on it to trigger a foto camera.
Team viewer do that but you have to be in the device to accept the conexion remote, so is no suitable for me at this point. Airdroid dont ask for permision to conect to the device , which is excelent , but I can not run an app inside the device in remote, so is no ok for me at this point.
The question is : how can I open an app to control the camera from the device in remote whith out me beside to the device?? Is there an app to do that??
How can I avoid in team viewer to ask permision to acces to the device??
Is posible to do something about it ??
I am not talking about the camera in the device , I am talking about a camera which is conected to my device by a cable at the same time and trigger and control the camera setings from km´s away via Lan conection 3g.
Thank you all
Marcos
Click to expand...
Click to collapse
if you have the same problem like me with the droid vnc server (connect but can't control it) the droid vnc server will help to conect to teamviewer quicksupport without someone to accept you. the video i make will show you how.
i cant add link so you have to find it by searching in youtube: connect to teamviewer quicksupport using droid vnc server to get access
Be careful with webkey, it send personal data...
I have tested 'Droid VNC server' and it requires root. I couldn't use it without that.
I have a FREE complicated solution without root.
Screen output:
while sleep .01 ; do convert -depth 8 -size 1280x1280 rgba:/dev/graphics/fb0'[0]' -rotate 90 -crop 1280x720+0+0 bmp:/scard/b.bmp ; mv /scard/b.bmp /sdcard/c.bmp ; echo -n . ; done
It works for my padfone 2, without padfone station. On any linux, you can sshfs your phone, and access /sdcard/c.bmp that way.
It should be run as the user adb, use adb shell from a PC connected by USB to access it, then adb forward to access to the sshd running on the phone.
If you want this to continue after disconnection, you should run tmux first.
I uploaded working binaries for bash, convert, scp and sshd on gentooandroid.sf.net ; tested on Android 4.1 and Android 4.4.
The difficult part on secured Android 4.4 is to find a place not mounted noexec where to put the binaries.
Mouse click on pixel position 300 300:
/system/bin/input tap 300 300
Text input:
/system/bin/input text yourtext
Home button:
/system/bin/input keyevent 62
See /system/bin/input and http://grepcode.com/file/repository...android/4.0.4_r1.2/android/view/KeyEvent.java
Anyone trying to automate this (with "Automate" from google play) or connect that to a VNC server, please report progress !
thx so much for that thread, i spend hours googling this.
i am actually trying webkey.
what i want to do primarily is control volume on android, as my device acts as a webradio (connected to the stereo via headphone jack).
I use droid vnc to start up "tunein radio" . that works fine. BUT it is way to slow to adjust volume, PLUS there are no keys to adjust volume, so i have to go to a quicksetting - volume - and adjust via mous. btw it only takes keyboard inputs if they are followed by a left-mouse-click... alt-d and alt-u dont work.
i also tried a ssh server on android and control volume via
"input keyevent 24"
and
"input keyevent 25"
which workes for a while, but then has no effect any more
vnc connection is crap, as my phone is an old samsung s2 - to slow.
acutally i am looking for the uri to send to the webkey server to adjust volume, so i wouldnt have to go over the website any more. - seems its websocket calls, so i will have to make some python implementation, as i dont know jscript.
-- btw, you can send volume event over ssh like this, but i dont know why it takes seconds for the device to react:
on the console:
input keyevent 24
input keyevent 25
Use automate to change volume
Automate from Google play can change the volume according to a change of file in a clould (or any other method you like).
Minimal asking of permission, this is a good thing.
Beware, Automate is free only for up to 30 "lines" of program, but just changing the volume is like 10 "lines" of program only.

[TUTORIAL] Connect and Debug Moto 360 over Bluetooth

Hello all, I've been working on a couple custom apps for my Moto 360, and I'm loving it! After some digging around in the forums, I had a hard time finding DECENT threads that pertained to Bluetooth debugging for your spanky Moto wearable, so here is a quick how-to!
First thing, debugging by Bluetooth is EXTREMELY simple. This does not require you to rip apart your favorite USB cable or perform some electrical engineering Jesus magic to acquire a unique USB connection for ADB. YES, wireless debugging IS possible, and is ONLY ADB capable, NOT FASTBOOT capable!
This means: no, I'm sorry fellow wearabees, you can not root/unlock/or flash partitions through ADB or Bluetooth. It's just not possible, and quite possibly would never be possible due to safe flashing procedures. The chances of bricking a device over a wireless connection is exponentially higher than a cabled connection. This is mostly because of interference, range issues, all together nuclear fallout, or your cat is evil and likes to turn your Bluetooth connections off when you sleep at night (let's pray to Buddha this isn't the case...).
So, let's begin by adjusting a few settings on your 360 and your favorite handheld (that would be your cell phone, dummy):
** Go to your 360 settings and swipe all the way down to the bottom of your semi-circular screen to the About section. Poke your cute little watch face to open About.
**Scroll down in your About section to Build Number and tap that guy 100 times, as fast as possible! (You only need to tap it 7 times, but at least it makes developing fun). This should add a new option in your settings named Developer Options.
**Enter your developer options and enable ADB Debugging, at which point the option below this will become available.
**Select the Debug over Bluetooth option to enable what this whole tutorial is about.
**Now, do the same for your handheld. Tap that Build Number, yeah boy! (Sexual pun intended)
Great! You're one step closer to being Super Sayan! (Not really, I have no affiliation with Dragonball Z)
Ok, now we need to open your terminal/command prompt window and change directory to your ADB executable location. From this location we will need to run ADB:
adb forward tcp:4444 localabstract:/adb-hub
Click to expand...
Click to collapse
then:
adb connect localhost:4444
Click to expand...
Click to collapse
The first command forwards the ADB connection of the phone to the remote connection of the 360 by Bluetooth. The second command simply gets the connection initiated with the remote address.
Now, for safe keeping I will provide two options for giving ADB commands to your 360. The first option should be your preferred option for compatibility reasons:
adb -s localhost:4444 <add you command here>
Click to expand...
Click to collapse
This code directs the command to your specific device. Otherwise, for quick code entry, you may use this:
adb -e <add your command here>
Click to expand...
Click to collapse
This second code is a generic way of connecting to whatever debugging option is available, which doesn't always mean your 360. If you're a developer running debug apps, try not to use this command.
And that's about the basics! Super simple, and all ADB commands are available for your wearable. Don't forget, rebooting into the bootloader through ADB will require a USB connection, at which point also some Jesus magic, and let's hope you're willing to be a god for a day.
Have fun!
**
**
I've tried this and I always get an error "Cannot connect to localhost:4444 no connection could be made because the target machine actively refused it (10061)"
Any solutions? I've tried other ports as well.

Wifi-Debugging and time-shift to USB-drive

Hello everyone,
I am owning a 65OLED903/12 TV on android 8 and do want to be able to access the ADB interface over Wifi to determine in my ioBroker Smarthome system what kind of service is currently in use (live TV, Netflix, Amazon prime etc.) and to control the device (e.g. switch off when a time-limit is reached, volume control etc.). I am able to perform all the tasks if I am able to access the ADB interface over Wifi.
The downside to this is, that when I enable USB-debugging, the build-in time-shift functionality to pause and resume live-TV stream by utilizing a USB-thumbdrive for bufferung is not available anymore.
Now the question is: how can I use ADB over Wifi with leaving the USB functionality available, explicitly the time-shift functionality? Or: Is there a tool that I can sideload, which offers a similar API or a local ADB availability be able to perform the above tasks via a local HTTP-API or something similar?
Cheers
SEB

Fire TV Stick Device Control via Intents to com.amazon.tv.devicecontrol.

Hi,
I'm looking for a way to control the Fire TV 4K via intents.
I want to issue remote control commands via Intents. For example pressing home key activates the Fire Tv Stick and switches the HDMI Input to the Fire TV's HDMI port.
Just issuing :
adb shell am start -a android.intent.action.MAIN -c android.intent.category.DEFAULT
WIll only return you to home, but not switch HDMI Input.
So I was looking to the logs and found these intents are issued when you press the Keys on the fire tv remote app:
01-04 18:34:37.062 1224 1224 I Vizzini_2.0.14872.0:HomeListener: Received: amazon.intent.action.HOME_PRESSED
01-04 18:34:37.125 1249 1249 I OZ-DCSeviceControlApiService: tryActivate called DCS intent: com.amazon.tv.devicecontrol.ACTION_ACTIVATE received, force: false
Line 8971: 01-04 18:34:37.102 608 622 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp=com.amazon.tv.launcher/.ui.HomeActivity_vNext (has extras)} from uid 1000 on display 0
Ther eis also:
01-04 18:34:37.281 608 680 D hdmi_cec: [HWCEC] ret:0 msg->destination:0 msg->body[0]:0xd msg->body[1]:0x0
But I don't know how to issue hdmi cec commands without root.
If we can use amazons own apps to react to these intents, then we can control the dvice via commandline.
Unfortunately I do not know how to let the Fire TV Stick react to these intents via adb shell.
Why not just issue: adb keyinput? Because you need adb for it and I want to avoid adb allthogether and issue the intents via Tasker.
I don't have enough time to teach you about whole linux security and permissions things but heres a quickie.
You CANNOT pass few intents or receive protected broadcasts without proper permissions.
You use SU privileges to access all root level things on a system.
ADB (Android DEBUG Bridge) is used for DEBUGGING, so a developer can write their code and test it on a device. ADB shells has certain special permissions that a normal process does not.
Tasker is a user app and not a system privileged app so it cannot perform certain action because they are running under different UID.
Amazon system apps are signed with platform certificates, giving them special permissions. All the things that an app does and access of the Android system needs to be declared in its Manifest.
But don't the trusted amazon apps not receive only a command for example to issue the Home Button press for example form third party remote control apps? There are dozens of apps that you can use to replace the Fire TV remote. They somehow communicate with the signed amazon apps, i was assuming through intents.
All I want is to issue those remote control commands programmatically, without having to press any buttons.
This should be possible somehow right?
Spamm00r said:
But don't the trusted amazon apps not receive only a command for example to issue the Home Button press for example form third party remote control apps? There are dozens of apps that you can use to replace the Fire TV remote. They somehow communicate with the signed amazon apps, i was assuming through intents.
All I want is to issue those remote control commands programmatically, without having to press any buttons.
This should be possible somehow right?
Click to expand...
Click to collapse
As i wrote earlier you need "Permissions" to do that.
Read more about it from https://developer.android.com/guide/topics/permissions/overview

Categories

Resources