[macOS] AppleScripts to control the FireTV - Fire TV General

It has been a long time since I last posted some of my AppleScripts (posted them on reddit way back when...) - so I decided its time for an update, since I changed them quite a bit since I first wrote them.
So what is this?
--
In the .zip file below are small applescripts I use on a daily basis to control my FireTV (/Sticks) and Kodi from my Macbook.
You can look at the source of every single one of those scripts using the AppleScript-Editor that comes with every Mac. I encourage you to look at how they work, and modify them, or write your own eventually.
I use two additional programs from github (aafm and xbev) that are currently included in the .zip file - so its easier for you to use them, without sourcing them first -
the respective project sites are:
https://github.com/sole/aafm
and
https://github.com/bobo1on1/xbev
please visit the sites to say thank you for the work their devs did, or contribute to the projects.
(If you wan't me to take them out of the .zip package, drop me a PN, or post it here in the thread and I will take them out immediately and replace them with readmes on how to source the programs instead.)
--
To use the scripts you have to have adb installed on the Mac.
http://forum.xda-developers.com/android/general/adb-fastboot-binaries-os-x-inclusive-t2941205
It doesn't hurt if you are familiar with adb already. And at least have used the adb connect, adb disconnect and adb devices commands before.
Also of course on the Fire TV ADB has to be enabled. (Developer settings.)
To use aafm and xbev you have to have
python
https://www.python.org/downloads/mac-osx/
and
pygtk
http://python.6.x6.nabble.com/Testing-PyGTK-installer-for-Mac-OS-X-td1948270.html or google it
installed, because both programs depend on it.
--
Getting started with the scripts.
In the .zip file, there is a folder named FireRemote which contains the scripts and the Applescript apps. That folder HAS to be copied to the documents folder in MacOS. The scripts have to be started from there. They are written in a way that depends on it.
All the .sh files in the main folder (not the sub folders, the main folder is the one called FireRemote) have to be made executable (chmod 755) or the scripts will not work. The .sh files generally are helper scripts, meant to be executed by the main script, once you run that.
The reason why this is needed is, that I pull the Fire TV's IP address from the terminal history - and this only works if I use shell scripts that are executable.
--
How do you use them?
there is one prerequisite, and that is that you typed in
adb connect IP.ADD.RE.SS
into the macs Terminal recently. IP.ADD.RE.SS of course being the actual IP address of your FireTV (/Stick). If you are typing it in just now, make sure to disconnect from your FIre TV with
adb disconnect
afterwards - or the adb "channel" won't be open for the scripts to connect. Also - it might not hurt to toggle the FireTVs adb toggle (in Settings) off and on. If you have still issues with the scripts connecting.
--
Scripts and what they do.
aafmtrigger
connects to the FireTV and starts aafm - a GUI adb filebrowser, that allows you to browse the FireTVs file system and transfer files from and to the Mac.
If you start the app again (for example using the cmd+space spotlight shortcut), it closes aafm and the adb connection.
acopy
copies the content of your clipboard to a textfile, names it zwischenablage.m3u, copies it to /sdcard/ on the FireTV and tells Kodi to play it. This is meant to be used with any direct video links you get from the web.
To get direct videolinks (and copy them into your clipboard) you could use the chrome or firefox extension "Video DownloadHelper" - if you need a video to test it on, use a kickstarter.com video - but it works with pretty much everything else as well.
Also - if you look into the corresponding .sh script - I also made it work with youtube links (default link format, not shortlinks) - which requires a slightly different syntax in the .m3u file. Point being - if you want to use it with links that require the urlResolver in Kodi - you might have to tweak the formating of the links - and the youtube example should show you how thats possible.
capmyfire
pulls a screencapture from the FireTV and puts it on the Desktop. Renames the filename, so you can take multiple screencaptures in a row.
FRtrigger
starts xbev and connects it to Kodi. If you have Kodi set up to be able to be controlled from external devices. Look up how thats supposed to be done, on the xbev project site.
xbev is a programm that allows you to use your Macs keyboard to control Kodi (play, pause, navigation, text entry... the whole nine yards)
If you start FRtrigger again, it closes the program.
kolog
copies Kodis log file onto your desktop.
firefire, firekodi, and firereboot
Are just simple apps that start Firestarter, Kodi, or reboot the FireTV;
pandorapeek
is an app to control the pandora app from your Mac.
(homeadb
ATTENTION! Use with caution.
(I am modifying the .bash_history file here - now while thats a file thats common to all Linux and macOS systems - and shouldn't have changed in structure across different version releases, I havent tested it with all macOS versions, and I havent tested it with Sierra yet. Also it is important that you follow the instructions below regarding the empty line thats needed - so there is a small amount of risk that you might have to clear the .bash_history - if it shouldn't work.
You can find information on how to do that here:
http://askubuntu.com/questions/191999/how-to-clear-bash-history-completely )
homeadb is meant to be integrated as part of the macs "Login Items", and is a script that will write the "adb connect IP.ADD.RE.SS" line into your terminal history file every time you boot up your Mac. To use it, first you have to change the IP address in the firetv_ip file in the FireRemote folder, to resemble the IP address of your FireTV. Please make sure, that after the IP address there always is an empty line in the file. This is IMPORTANT.
If you run the script manually - nothing will happen until the next reboot of your mac, because there is only a short window at boot where the terminal history file is writable and hasn't already been pulled into ram. Thats why the homeadb script is meant to be integrated as a "Login Item".
The other reason is, that eventually you might loose the adb connect IP.ADD.RE.SS line from your terminal history, as it only stores a limited number of recent entries. Having this script "repopulate" the line on every boot up usually is enough for it to stay there.
Why do I use the terminal history, and not a hardcoded IP address for the scripts?
Using the terminal history makes it very easy to switch between FireTVs (/Sticks), and use the scripts with another one. You just enter adb connect IP.ADD.RE.SS into the terminal (which is something you usually do anyways -) and all the scripts are set up and ready to go.)
(usrbin
ATTENTION! Use with caution.
(in this case, because /usr/bin/ is a directory where other important files are situated - so basically, don't go haywire and delete them by accident - apart from that, there is no risk)
In the folder usrbin are two files that you could copy to /usr/bin/ on your mac (dont forget to make them executable with chmod 755). The files are called adb.sh and telnet.sh and basically do the same "history loockup" my scripts to.
adb.sh will look up the last adb connect command you entered into the terminal and enter it again -
telnet.sh will look up the last telnet connect command you entered into the terminal and enter it again -
both are meant to be used as shortcuts. Once you moved them to /usr/bin/ and have made them executable - you can just type in adb.sh or telnet.sh in the terminal (in any directory), to establish a adb or telnet connection to the last device you were conncted to. Both are only meant to be used from the terminal. If you dont use the terminal that often, don't bother with them).
(miscellaneous folder
in the miscellaneous folder you find a few scripts that probably will not work "out of the box" for you, and are meant for you to be played with, if you are interested what else is possible with a little Applescript codeing.
The webkey apps start/kill webkey (a remote desktop app for android - to be able to remote control Fire TVs from a laptop - but they are coded pretty specific to my needs. F.e. after starting the app they go to the third desktop on my mac, where a chrome window is always open, open a new tab, enter the iport for the webkey server, enter username and password, press enter --- and so forth... So not necessarily something thats instantly usable by everyone - but you can make it work... )
The kill webkey app is there to kill webkey after using it, so it doesnt draw cpu cycles in Kodi, while watching videos.
The adbwebkey app uses webkey to toggle the FireTVs adb toggle. As webkey doesnt use adb to pipe into the FireTV you can use it to reset the adb toggle. But this one is dependent on having the adb wifi app installed (you find the app name in the script), and being placed on a certain position in the firestarter grid, to be launched -- so again, not something you can use, without at least some modification.
There also are two Kodi configuration examples in there I use, that you could look at, and another script thats just pure overkill... )
Oh - and of course install the Play to Kodi addon for Chrome - if you haven't done so already - it opens up a few more usecases *https://chrome.google.com/webstore/detail/play-to-kodi/fncjhcjfnnooidlkijollckpakkebden
Thats it, have fun parsing all this information and using the scripts, if you are a Mac user.

The "ATTENTION! Use with caution." warnings in the text might have been a bit harsh...
I have left them in to indicate, that you should pay close attention with those steps, but I've now explained why, and what the (actually small) risks are.
I had the average user in mind, when writing those warnings - but reading the tutorial again, the amount of steps needed to make all of this work, might have scared them off sufficiently...
Don't get scared by the warnings - Is what I am saying. Get scared by the complexity and my unwillingness to provide eazy step by step tutorials.

I'm not updating the script bundle just for this, but if you add this line -
Code:
pbpaste | sed 's,https://,http://,g'| pbcopy
to the acopyh.sh script (I leave it to you to figure out where exactly ),
every https videolink you send to Kodi gets redirected to http instead. This sometimes is important, as - the FIre TV still has issues supporting some https standards (and afair Kodi relies on the system to handle that stuff) - and sometimes will not play videos, just because they require a https connection.
So if you notice that direct videolinks tend to "not work" with Kodi, when they want to establish the connection over https - this is an easy to implement workaround.

reading pillow
nice post
---------- Post added at 01:38 PM ---------- Previous post was at 01:19 PM ----------
sdfgksdjui sgashgaui gkhasg
---------- Post added at 01:48 PM ---------- Previous post was at 01:38 PM ----------
fjkaskjfh alfjasdkga asfhsgjuk
---------- Post added at 02:36 PM ---------- Previous post was at 01:48 PM ----------
hfjashf sdfgughasdu afjhasj asfashj

o yesss
sfasfu asu r4854klhfa 8ryt8ri
---------- Post added at 04:05 PM ---------- Previous post was at 04:00 PM ----------
nice post
yar kya krtty o
---------- Post added at 04:09 PM ---------- Previous post was at 04:05 PM ----------
hi
i want to ask you
you r awesome

hello
nice post
klklhk jkjkjk
---------- Post added at 01:02 PM ---------- Previous post was at 12:54 PM ----------
jhjhk djhgh kukh
---------- Post added at 01:06 PM ---------- Previous post was at 01:02 PM ----------
ghsgd adsda sdsdgh

Related

[UTILITY] Quick ADB Pusher v0.5 (Get it now!) [25-12-2012]

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Background:
It all started with me often finding myself sending small files to my device, and quickly got sick of the constant enabling/disabling of USBMS on my old phone, which is quite slow with re-mounting the SD card(ZTE Blade).
I also quickly got sick of not being able to quickly transfer files from my PC to my tablets internal storage.
There are a few graphical interfaces for adb out there, but none was really what I wanted...
So I decided to attempt to code something myself, and here we are!
Info:
A graphical UI for "adb push" to quickly transfer files from your PC to any location on your Android device.
.... Thats what I planned when i started, and what the first 2 versions did...
Now it hosts a powerful File Explorer thats capable of doing everyday tasks such as copy, paste, rename, create folders, delete files and folders, as well as transfering files on its own.
Features:
The main application is capable of sending and receiving files, and installing APKs.
It also serves as the connection-manager as can connect to devices using either your USB Sync cable, or by using WLAN (req. an app on your device to enable wireless adb).
Finally, it hosts a few other functions such as reboot to recovery, reboot to bootloader and a plain reboot.
The Filebrowser is very similar to any other filebrowser you use everyday on your PC.
It can copy/cut and paste files and folders within the device, rename file and folders, create new folders, delete files and folders.
Highlights would be:
Browse the content of your device like you browse your PC's harddrives
Drag and drop files between your PC and your Android device
Move, copy, delete and rename files and folders
Limitations:
The main program does not detect case sensitive, which can end up with funny results if you push a file to "/removable/" instead of "/Removable/" for example.
ADB is only capable of sending 1 file at a time, but is capable of sending whole directories incl. subdirs.
In a future update, I will add the ability to send multiple files.
Getting started:
Everything should be self explanatory. Most of the buttons have tooltips that tells you what they do.
Basically you make sure USB Debugging is turned ON on your device, plug it into your PC and start Quick ADB Pusher.
If you are connecting using a USB Cable, the application should find it automatically.
If you're connecting through wifi, you will need to type the IP address in the dedicated field. Port only needs to be provided if you are using any other port than the standard 5555. The IP address will be saved, and you can select it from the drop-down list the next time you start the application.
Requirements:
An Android device.
Windows
.NET 3.5
USB Debugging turned ON.
Additional Recommendations:
Root
Busybox
Vulnerable Kernel or Custom ROM
Q&A
Q: My device is rooted, but the program says it cant get root access
A: You are probably on stock rom or kernel. Most shipped roms have root-access from adb blocked.
To check this: Open default.prop located in the root of your device ("/"). If ro.secure is set to 1, thats your issue. Note: Default.prop gets overwritten everytime you restart the device, so changing this file will do nothing.
Theres is an app available that can fix/bypass this: http://forum.xda-developers.com/showthread.php?t=1687590
Q: The cache didnt delete itself when I closed the app!
A: You have two choices here: Either delete the cache/ folder located in the same location as the adb pusher exe, or you can just open and close the program.
If the cache still wont delete itself, report it as a bug.
Q: I cant connect to my device over wifi!
A: Make sure you have an app on your device that enables wireless ADB and that its turned ON. I personally use adbWireless found on the Play Store.
Double-check you are attempting to connect to the correct IP and port.
Q: Whats the "Information" window good for?
A: Its actually a left-over debug window, but can provide you with useful information should a transfer fail. If nothing else, you can use it if and when you report a bug.
Note that the Info window only shows what the main program is doing. ADB Explorer works independently, and will not report anything to the Info window.
Q: Why do I have to click a button to switch between push, pull and install?
A: The program need to knows which adb command to run (adb push or adb pull), and having a button for it was the easiest way for me .
The install option is there because you might not always want to install an .apk, but rather store it on your SD card or something. I know I do.
Q: Why cant I send a whole folder to my device from the main program?
A: Old implementation, use the built-in ADB Explorer instead, which allows you to send whole folders.
Q: Whats the point in the main program, when the Explorer can do everything but better?
A: At the moment it still controls the actual transfers as well as the connections to your device(s).
The main program is, however, more or less untouched since v0.3, while the Explorer is constantly being updated. Therefore, the Explorer hosts more and better features.
I am concidering removing the main form, as its rather obsolete by now.
Q: I Have a question!
A: Feel free to ask in this thread, and I'll answer your question as best I can.
Q: Can I donate?
A: No, I dont feel this program is worth "paying for" and it wouldnt feel right to receive money for it in any form.
Hit 'thanks' and vote the thread 5stars instead
Q: I Found a bug, how do I report it?
A: Report it to me on this forum, either in the thread or through PM, and I'll make sure to look into it.
Just make sure to provide as much info you can.
And remember: I cant fix anything if I dont know about it! So dont hesitate reporting bugs.
Changelog:
v0.5 current version
First of all... v0.4.1 had 6570 views on the attachement alone. Not bad... :victory:
Added an awesome splashscreen! As those who have used this program before should know - the program takes a while to load. The splashscreen is visible during this load, so you know the program is actually starting.
The wifi-field has been redesigned. It now saves your IP adresses so you dont have to retype them every time.
Added an "X" button next to the wifi-field. This button clears the wifi-cache and removes all entries in the list.
Added my name with a link to this thread, Ive seen my program hosted at a few sites with no credit whatsoever. I dont mind anyone hosting it elsewhere, in fact Im happy it gets spread, but PLEASE at least give me credit for it.
Slight redesign
Added tooltips to both the main application and the Filebrowser
Filebrowser:
Renamed "ADB Filebrowser" to "ADB Explorer". It can do so much more than just view the files on the device, so this name is more fitting. I should think of a new name for the entire application as well... "Quick ADB Pusher" isnt even half the truth anymore
Added cache feature! Everytime you enter a directory youve already been in, the cache kicks in rather than asking the device for the content. Each device has its own cache (note: a wifi-connected device will have its own cache based on the IP, so if you connect to the same device using cable or another IP, the cache needs to be rebuilt).
The cache will update as follows:
When entering a new directory not currently present in the cache.
When you hit the refresh button.
When you rename a file/folder.
When you create a new folder.
When you paste a file/folder from the clipboard.
When you delete a file/folder.
When you transfer a file/folder to the device.
The cache will NOT update when you send a file from the device to your PC
The cache will get deleted upon application exit.
You can now cancel the contentlisting and go back by hitting "../", Backspace shortcut-key or the Back button. Added because some directories takes ages to load on various devices, and its not so fun rolling your thumbs when all you want to do is go back to the previous dir
Added "drag-drop" to the filebrowser - you can now dragdrop files and folders directly to the browser to send it(or install, if .apk) to your device. The cache will refresh upon completion. You can also drop files and folders FROM the browser to your PC!*
* this might not sound so special, but it was a ***** to implement. Dragging stuff to the browser - ~50 lines of code. Dragging stuff FROM the browser - a little over 200 lines of code... C# sure has its limitations...
Added "Grab" to the right-click menu. This will send the selected file/folder from your device to your PC.
In short, the filebrowser can do what the main application can, so you dont have to close the browser to send/recieve a file/folder. A loading thingy will appear over the browser while a filetransfer is in progress.
Added "Properties" to the right-click menu. This shows some info such as the size of the file, and even the total size of a folder (incl. sub dirs). If you select a folder with a lot of content/folders, it might take a while to calculate the size. Other things it show is where its mounted and what permissions the file/folder has. NOTE: Requires Busybox, and root for files and folders only accessible by root (duh!)
Added 3 warnings upon opening the browser: One to inform you if your device isnt rooted, one to warn you busybox is missing and one to warn you if your device is rooted, but ADB was unable to acquire it. None of these warnings will show if adb acquires root and busybox is present.
Added a textarea showing the used space on the device, based on the mounted partition (such as /data, /sdcard, etc). So dont be scared if the number jumps around while youre browsing - it just means youve entered a different partition. Click to switch between used and free space. Requires Busybox
The browser now remembers your last location and will not start from "/" everytime you open it. Memory is lost upon main program exit and when you select a different device.
Added "View file" (prev. unfunctional "Open" menu item) to the right-click menu. This allows you to view smaller files (up to 10MB) without permanentally save them on your PC. I have blocked larger files because the time it takes to transfer those files isnt worth it for just "a quick look". My devices transfers a 10MB files between 2 and 5 seconds(depending on device) - which I think is ok, so I set the limit there.
Tweaked and tuned to make the browser act somewhat normal for devices without root/busybox. Devices without root/busybox will miss out on quite a lot though And before anyone asks - No, I do not plan on making this program able to root your devices. There are plenty of tools for that already.
Fixed the shortcutkeys that only worked when they wanted to. In addition, several more shortcuts have been added.
List of currently supported shortcuts:
ctrl+x: Cut file/folder
ctrl+c: Copy file/folder
ctrl+v: Paste file/folder
ctrl+s: Grab the selected file/folder
shift+delete: Delete the seleceted file/folder
shift+n: Create a new folder
F1: View file
F2: Rename file/folder
You can also use the arrowkeys to navigate, similar as in explorer. cut/copy/paste only works within the ADB Explorer.
Added Forward and Back buttons. Works the same way ordinary back/forward buttons do. Also changed icon for Refresh
Added a Toolbar, containing more buttons such as "view file", "download", "upload", "delete"...
Added 2 eastereggs , one is easy to find. The other is well hidden, and actually serves a purpose Well actually, the latter isnt really an easteregg, but it should be hard enough for you mortals to find
Known issues:
You friends might rage and throw their IPhones at you when they see this
------
HTC Sync REALLY doesnt like ADB, so close that crap before starting this app, or better yet - uninstall it!
It seems HTC Sync is trying to start its own adb server, and is very persistant in doing so.
This results in Quick ADB Pusher and HTC Sync having a fight for their life on who is going to start the server.
------
If you install an .apk, then try to send something else, the program will try to install that as well. This is because I was retarded and forgot to add one check.
Solution: Close the filebrowser, untick "install apk". Will be fixed in the next version, I promise! :angel:
Version History:
v0.4.1 - 6570 views on the attachement alone. Not bad...
Fixed filebrowser not working on some devices, I hope. Please test this for me as the browser has always worked fine for me on all my devices.
Changed apk install method to use AndroidLib's method. It now tells you if the installation was successful or not.
... Some minor things I cant remember.
Note, the "Open" option in the filebrowser is just a placeholder for now, its not a bug that it doesnt work, it isnt ment to work.
v0.4
Fixed bug where files and folders containing "_(" threw a syntax error.
Added file browser for device (see Seperate notes).
Added wireless ADB support.
Added Pull-file mode.
Re-designed the UI.
Moved the info-view to 3rd tab. Im moving away from it more and more.
A lot of the text and button-text will now change depending on your current choices. Ex. the Send-button now switches between Send, Pull and Install.
A truckload of code rewriting and optimizations.
Added an additional check for Root remounting, which should fix rare cases where remounting fails (If your device cant be remounted as root, please report it along with your device, rom etc)
Added "Install APK" You can now install APKs directly through the program.
Added reboot options in the Advanced tab
Added device info in the Advanced tab (The temp seems to be reported in C * 10, so I report it as C / 10, let me know if it doesnt look right for your device, and dont forget to tell me what device/rom you're using)
Filebrowser Features:
Browse and select files.
Context menu (right-click menu).
Copy or move(cut) files/folders within the device.
rename files/folders on the device.
delete files/folders on the device. Warning: Deleting the wrong files might brick your device! Double-check that you really want to delete the file before doing so!
create new folders on the device.
icons for certain formats (more to be added).
progressbar for directory loading progress.
'clipboard' icon to remind you what you currently have selected for copy/cut.
Notes:
The filebrowser is in its early stage. I have bugtested it as much as I can and it works flawless with my 3 devices.
The speed of listing directoiess/files greatly differs with device. My TF101 lists the contents about twice as fast as my ZTE Blade, theres not all that much I can do about it, as I dont have the time right now.
When pasting a file in a location where a file with the same name already exists, the program will currently simply overwrite the file. I havnt had time to add a check for it yet (ETA: Next version).
---To be added:
Direct interacting/editing of files, such as text files etc.
cache-feature, to reduce the frequency of grabbing the dir. contents from the device (which will help speed up changing paths).
A "file exists" check when pasting, allowing you to chose to overwrite or rename the old file.
v0.3
Fixed program freeze when no device was connected.
Added device selection, so it should work with multiple devices connected. please test this for me
Rewrote most of the program to make use of AndroidLib.dll
Removed the console(debug) tab, as it served little to no use now
Added an 'Advanced' tab for future use
Cleaned up a lot of garbage code
Fixed system not mounting as R/W
Other minor changes and fixes
v0.2
First public release
v0.1
very first version I wrote, which was buggy and often froze and god knows all...
Trust me, it was terrible. It worked and did what it set out to do but... It was terrible...
The latest Version has been tested and bugfixed on the following devices:
ZTE Blade with Swedish Spring 5, connected through USB Cable
ASUS Transformer TF101 with Team EOS Nightly build 28, connected through WIFI
HTC One S with stock 4.0.3, no root, no busybox. USB Cable
HTC One S with stock 4.0.4, root, no busybox. USB Cable
HTC One S with stock 4.0.4, root, busybox. USB Cable.
-------------------
Suggestions for improvements, feedback etc are more than welcome
Thanks to:
regaw_leinad - for writing the very handy AndroidLib found here
Dont forget to hit 'thanks' if you like my application. Every thanks I get brings a smile to my face
Download:
If the attachment doesnt work, try this mirror (select version and hit ctrl+s, or file -> download)
i think making a batch file was easier
Hey, cool app. There does however seem to be a problem with XDA's attachment feature, and it only downloads about 1k of the zip, then says complete. Also, if you plan on extending this a little more, check out my .NET Android Library named... well AndroidLib. It will help you out a bunch with the coding of the features you want to add.
regaw_leinad said:
Hey, cool app. There does however seem to be a problem with XDA's attachment feature, and it only downloads about 1k of the zip, then says complete. Also, if you plan on extending this a little more, check out my .NET Android Library named... well AndroidLib. It will help you out a bunch with the coding of the features you want to add.
Click to expand...
Click to collapse
Thanks for the heads up.
I placed it on google docs, hopefully it works better
Linky
If it doesnt, perhaps you could give me a tip as to where to upload it. I used to have my own server so never really used any other file-sharing method
regaw_leinad said:
Also, if you plan on extending this a little more, check out my .NET Android Library named... well AndroidLib. It will help you out a bunch with the coding of the features you want to add.
Click to expand...
Click to collapse
O nice, Ill definitely check that out Thanks.
Goatshocker said:
Thanks for the heads up.
I placed it on google docs, hopefully it works better
Linky
If it doesnt, perhaps you could give me a tip as to where to upload it. I used to have my own server so never really used any other file-sharing method
O nice, Ill definitely check that out Thanks.
Click to expand...
Click to collapse
Yup, the new link works great! Unfortunately, when I don't already have an adb server running and hit the 'Check ADB Status' button, the form freezes and the process needs to be killed to close the program. Works fine when adb.exe is already running though.
---------- Post added at 12:26 AM ---------- Previous post was at 12:17 AM ----------
Killing adb.exe while it's frozen fixes the issue I pointed out, probably means there is an error in your
Code:
Process
code
EDIT:
Stalls on process.WaitForExit() when debugging
regaw_leinad said:
Yup, the new link works great! Unfortunately, when I don't already have an adb server running and hit the 'Check ADB Status' button, the form freezes and the process needs to be killed to close the program. Works fine when adb.exe is already running though.
---------- Post added at 12:26 AM ---------- Previous post was at 12:17 AM ----------
Killing adb.exe while it's frozen fixes the issue I pointed out, probably means there is an error in your
Code:
Process
code
EDIT:
Stalls on process.WaitForExit() when debugging
Click to expand...
Click to collapse
Thanks for the report,it seems to happen when theres no device connected. Silly me have only even tried the app with a device connected hehe.
I'll try to fix it later today
Goatshocker said:
Thanks for the report,it seems to happen when theres no device connected. Silly me have only even tried the app with a device connected hehe.
I'll try to fix it later today
Click to expand...
Click to collapse
ah, you're calling
Code:
adb get-state
that gets the state of the device connected.
My .NET Android library handles everything adb wise, it even uses it's own adb binary, so the user doesn't have to have the sdk for it to work. let me know if you're going to reference it with your app, and I'll put your project in AndroidLib's post of "Projects using AndroidLib"
regaw_leinad said:
ah, you're calling
Code:
adb get-state
that gets the state of the device connected.
My .NET Android library handles everything adb wise, it even uses it's own adb binary, so the user doesn't have to have the sdk for it to work. let me know if you're going to reference it with your app, and I'll put your project in AndroidLib's post of "Projects using AndroidLib"
Click to expand...
Click to collapse
Yep, I assumed that would work since it works fine if you do it directly in cmd. But guess not adb start-server didnt work either...
I think I'll leave the bug for now and start looking into your lib instead.
Really nice app
Do you plan to develop a Linux version ?
Great idea, thanks =)
How does it achieve rw access, since device-dependent?
For example, on some devices, in ADB shell, you use
Code:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock0 /system
But, in some, you use mtdblock3 instead of mtdblock0.
Since there's no setting on which mtdblock to use, how does the program know which one is correct?
Theonewithideas said:
How does it achieve rw access, since device-dependent?
For example, on some devices, in ADB shell, you use
Code:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock0 /system
But, in some, you use mtdblock3 instead of mtdblock0.
Since there's no setting on which mtdblock to use, how does the program know which one is correct?
Click to expand...
Click to collapse
adb remount does all the job as you are ultimately using adb..
the command which you specified is used to mount on device shell which you enter by adb shell
madman_amit said:
adb remount does all the job as you are ultimately using adb..
the command which you specified is used to mount on device shell which you enter by adb shell
Click to expand...
Click to collapse
Oh, so that's what it does! lol
Thanks.
Actually, when trying it out, it says, after starting daemon "remount failed, action not permitted"
Nevermind, will check the program, it seems easier...
Looks cool! I shall give this a try later and see how it does with my HTC Rezound.
Thank you for your work!
Wow, responses
Thanks for the feedback guys.
Unfortunely Ive kinda killed my sync cable for my TF (tried to convert it to a usb host adapter^^), and currently dont have any other android device to play with.
So development has kinda stalled right now. Ive got rid of the freeze-when-no-device-connected, but developed another issue instead. Not anything major, but very annoying. The app freezes while it checks for a device >_>, its only for a few seconds, but annoying nevertheless.
As for linux version... Im afraid thats way above my coding skills, and I dont have a linux PC to test on anymore (I killed the laptop which was running linux when I tried to build a touchscreen on it. Yes! I break a lot of things)
Awesome, just what I needed!
Could you please add an option to connect the phone using network?, with the "adb connect" command, I can use a bat file before starting the app but because I have several devices connected to the network the phone´s ip change in time, and having it built in the app would be great
Awesome work, just tried it out now and it's pretty awesome.
I think an adb connect option would be awesome, for those who have adb wireless app on there phone then it'll be really easy to transfer files and it'll be pretty sweet.
Anyway keep up the good work
Hey, just an fyi,
Code:
adb remount
will NOT work if the device connected does not have the option ro.secure=0 in the default.prop of the ramdisk. You shouldn't assume it does, because not all "ROM" developers know how to change it. My library does check for this, but in case you don't want to use it, be sure you can mount the filesystem /system as rw that way, or using the mount binary on the phone directly.
regaw_leinad said:
Hey, just an fyi,
Code:
adb remount
will NOT work if the device connected does not have the option ro.secure=0 in the default.prop of the ramdisk. You shouldn't assume it does, because not all "ROM" developers know how to change it. My library does check for this, but in case you don't want to use it, be sure you can mount the filesystem /system as rw that way, or using the mount binary on the phone directly.
Click to expand...
Click to collapse
Hey thanks for the info. I had no idea about that, remount have always worked on all my devices on all roms Ive tried.
I'll keep that in mind when Ive fixed my sync cable
Could you give an example of a device/rom combo remount does not work on?
Goatshocker said:
Hey thanks for the info. I had no idea about that, remount have always worked on all my devices on all roms Ive tried.
I'll keep that in mind when Ive fixed my sync cable
Could you give an example of a device/rom combo remount does not work on?
Click to expand...
Click to collapse
I can't think of a specific example, but if the developer does compile a boot.img with ro.secure=1, adb remount will not work but lots of 'devs' these days just grab the boot.img from people who actually know what they're doing, so you should be ok, just in rare cases, this will not work.

Segmentation fault from pm command over SSH

Not sure if this is more relevant in a generic Android OS forum instead; if it is a mod can move it.
I've tried a few SSH servers on the S3 and none of them allow me to use the pm command, I always get a segmentation fault. I'm pretty sure it has something to do with shared libs not being accessible (I.E. certain environment variables not containing the appropriate paths to lib directories), as one of the reason for this error message is "Inside a chrooted jail this can occur when critical shared libs, config file or /dev/ entry missing." It looks to me that the SSH server apps available all work this way?
I've had no problem using pm from my last phone this way, but it was still at 2.3, this phone is 4.04. Obviously some things have changed.
The question is, has anyone had luck with the pm command on this platform via SSH? If so, what SSH server app, and/or what config or shell environment changes need to happen?

MOTOACTV TCX Exporter

Attached is a custom service for the MOTOACTV that will export the workout data table to a TCX file on the SD Card. The TCX file will be automatically created every time a workout ends and will be named with the unique id of the workout. This app is a work in progress, try at your own risk.
,Dave
Version 1.1
Service now exports Garmin TCX file.
Added export app to manually export workouts.
Version 1.2.
Lap Heart Beat Average skipped if 0.
Skip Lat/Lon if not valid
Version 1.3
Corrected naming of auto entered lap.
Version 1.4
Added workout activity lap check and use default value of 6 hrs for 1 lap duration if not found.
Version 1.5
*Apps changed to a release key, uninstall of old version required before install.
Added DistanceMeters to trackpoints
Corrected issue where workout id was being used instead of workout activity id for lap details lookup.
Version 1.6
Combined manual app and service into one app. The previous two apps will need to be removed before installing.
Corrected issue with sport type for biking
Added power
Corrected issue with run cadence and biking cadence.
Version 1.7
Added steps to lap details
Uses workout sub activity (intervals) if available for lap details.
Version 1.8
Changed TCX filename to include Timestamp
Added Settings (Use menu then Click settings to access)
Added DropBox auto export (must enable in settings) *In Testing
Added Google Drive auto export (must enable in settings) *In Testing
Added Runkeeper auto post with Facebook option (must enable in settings) *In Testing
Version 1.9
Corrected issue with default value of local TCX pref (was set to false instead of true)
Corrected issue with manual exporting requiring wifi for local TCX only export.
Version 1.10
Corrected Wifi state on preference change check.
Added settings button to main form (scroll up to see it)
Version 1.11
Improved user interface for settings
Added auto Wifi disable on app exit (optional)
Added Wifi enable button.
Removed automatic Wifi enable and waiting.
Known Issues:
Lap info not calculated correctly after pausing and resuming a workout.
---------------------------------------------------------------------------------------
ADB Commands
#Install
adb install Motoactv_export.apk
#Uninstall
adb uninstall com.sdsoft.motoactv_export
adb uninstall com.sdsoft.sd_csv (if coming from old version)
#Start Motoactv_export without having a launcher
adb shell am start -n com.sdsoft.motoactv_export/com.sdsoft.motoactv_export.MainActivity
#View debug logs
# For Motoactv export launch the app, run the following command then click export
adb logcat MainActivity:V *:S
adb logcat AndroidRuntime:V *:S
# For the service run the following command, start and stop a workout, then click End workout .
adb logcat SYNC_Service:V *:S
adb logcat AndroidRuntime:V *:S
* Added optional modified settings.apk that has an Export TCX option that will launch the manual TCX exporter app. Only use if your on stock roms or your settings.apk has not already been modified.
# To install
adb remount
adb push Settings.apk /system/app
adb reboot
Hi SuperDave,
Thank you very much for that nice app! I really enjoy it!
I tested it yesterday with SportTracks and it works great! continue your good job!
Well Done! :good:
JmCourir:laugh:
Rated 5 --> Excellent thread
Thanks JmCourir,
Glad its working for you.
Yes, it woks perfectly:good: with
http://www.zonefivesoftware.com/sporttracks/
I recommend this excellent app for all serious trainers out there!
JmCourir
---------- Post added at 06:24 PM ---------- Previous post was at 06:12 PM ----------
Hi Superdave,
Are you able to add steps per minute ? or overall steps of a workout? Steps per day in the tcx file?
If you can do it, I'll ask Sporttracks if they can add this to their software.*
Also, if I use a cadence sensor for bike, does your app still export this kind of data?
Thanks
JmCourir
How does the import into Sport tracks work? Do you connect the Motoactv via USB, copy the tcx files to your computer then import? Or does Sport tracks connect directly to the Motoactv like the other Garmin devices?
Thanks
JmCourir,
The bike cadence is supported and should export as part of the tcx. I'm not currently doing steps. It looks like they are part of the ActivityLapExtension (http://developer.garmin.com/schemas/tcx/v2/oxygen/activityExtensionv1/ActivityExtensionv1.xsd.html) Is that where you are looking to see the steps at the lap level or is it at the trackpoint level?
,Dave
two_wheels said:
How does the import into Sport tracks work? Do you connect the Motoactv via USB, copy the tcx files to your computer then import? Or does Sport tracks connect directly to the Motoactv like the other Garmin devices?
Thanks
Click to expand...
Click to collapse
Hi Two_wheels,
When you open SportTracks, you clic Import and browse into the sdcard of Motoactv and select the file TCX.
Very very quick and easy.
JmCourir
---------- Post added at 08:10 PM ---------- Previous post was at 08:02 PM ----------
superdave said:
JmCourir,
The bike cadence is supported and should export as part of the tcx. I'm not currently doing steps. It looks like they are part of the ActivityLapExtension (http://developer.garmin.com/schemas/tcx/v2/oxygen/activityExtensionv1/ActivityExtensionv1.xsd.html) Is that where you are looking to see the steps at the lap level or is it at the trackpoint level?
,Dave
Click to expand...
Click to collapse
Hi Dave,
I don't know what ActivityExtension do and what trackpoint level do
I'd like to see steps per lap, average steps per minutes, total daily steps ?
Is this possible?
Thanks
JmCourir
Extensions are addon to the tcx format. The only one I found that supports steps is at the laps level. It looks like its a total steps for the lap. TrackPoints are the individual data points that make up a lap. I can get the data for total steps per lap, step avg per lap and steps per trackpoint, but, the only one I see in the tcx format is the steps per lap. Does sportstrack support that or the others?
Stupid question
This looks awesome, I have a quick question before I get to work on rooting my device, is this something I have to do after each workout or can I wait for a couple of workouts and then click export and it will generate all of their files?
The service will automatically create a tcx export on your sdcard after the end of every workout. They are uniquely named and can be pulled off at anytime. The manual exporter is more to get at older workouts and the same thing applies, it will create the file and you can pull it of any time you want.
cdjadex said:
This looks awesome, I have a quick question before I get to work on rooting my device, is this something I have to do after each workout or can I wait for a couple of workouts and then click export and it will generate all of their files?
Click to expand...
Click to collapse
Hi Cdjadex,
You can wait later to export files. The app generate a new TCX file for each workout.
JmCourir
---------- Post added at 02:16 PM ---------- Previous post was at 02:12 PM ----------
superdave said:
Extensions are addon to the tcx format. The only one I found that supports steps is at the laps level. It looks like its a total steps for the lap. TrackPoints are the individual data points that make up a lap. I can get the data for total steps per lap, step avg per lap and steps per trackpoint, but, the only one I see in the tcx format is the steps per lap. Does sportstrack support that or the others?
Click to expand...
Click to collapse
Hi Superdave,
I'll ask SportTracks if we can import step per lap, step avg per lap and steps per trackpoint.
I think they do but I dont have any file with step to test it.
I know they support a lot of Garmin stuff..... IMO, we could make the test if it's not hard work for you to give me a app with steps in it?
JmCourir
superdave said:
The service will automatically create a tcx export on your sdcard after the end of every workout. They are uniquely named and can be pulled off at anytime. The manual exporter is more to get at older workouts and the same thing applies, it will create the file and you can pull it of any time you want.
Click to expand...
Click to collapse
I am guessing the service starts automatically each time the watch is rebooted or do I need to manually do it through adb?
JmCourir,
I'll work on adding steps to the laps.
cdjadex,
Once installed the service will be called even after a reboot.
I'm one of the first to appreciate your amazing job. Till now for me everything worked perfect. 3 running workouts and all of them perfect tcx to export with SD_CSV apk. Now installed last version, tomorrow morning I'll find out how it works, even if I'm pretty sure is going to be perfect as the last ones.
I know it's already a great job but can you think about doing an app to import workouts in motoactv??? For all of us will be like a dream!!!
superdave said:
JmCourir,
I'll work on adding steps to the laps.
Click to expand...
Click to collapse
Oh!! What a good news.... I very appreciate it !!!!
Thank you Superdave!!! You really rock!!! :good::good::good:
yES BUT
Hi guys well.. I got the apk installed and it seems to work..
Only problem is that my motoactv is not seen as a device on my Windows 7 machine.
If I put in another motoactv that is not rooted.. it is seen OK.
So I've no way of seeing the exported file..
any ideas?
I rooted with MotoACTV Root Tool V1.1.6 and followed everything.
Any ideas?
Cheers
Did you stop adb? After you do the motoactv will show up as a removable device.
almeriarunner said:
Hi guys well.. I got the apk installed and it seems to work..
Only problem is that my motoactv is not seen as a device on my Windows 7 machine.
If I put in another motoactv that is not rooted.. it is seen OK.
So I've no way of seeing the exported file..
any ideas?
I rooted with MotoACTV Root Tool V1.1.6 and followed everything.
Any ideas?
Cheers
Click to expand...
Click to collapse
If You have windows go in the folder Platform-tool, press shift + right click, click on "open command window here" and digit, adb shell stop adbd
, press enter and everything should work now.
atsic said:
If You have windows go in the folder Platform-tool, press shift + right click, click on "open command window here" and digit, adb shell stop adbd
, press enter and everything should work now.
Click to expand...
Click to collapse
You can also press "windows-button + R", type in "cmd" and press enter. In the command file you type in "adb shell stop adbd" as described above.
In my opinion, that´s the fastest "manual" possibility.
However, the fastest possibility is a batch file to do the job automatically. Just press "windows-button + R", type in notepad and press enter. Then copy and paste the command "adb shell stop adbd" into the notepad file. Then go to menu and press "Save as" and save it as filename.bat on your desktop. The next time you plug-in your motoactv you only have to double click on the file and it will be recognised as UMS.
stoudamire said:
You can also press "windows-button + R", type in "cmd" and press enter. In the command file you type in "adb shell stop adbd" as described above.
In my opinion, that´s the fastest "manual" possibility.
However, the fastest possibility is a batch file to do the job automatically. Just press "windows-button + R", type in notepad and press enter. Then copy and paste the command "adb shell stop adbd" into the notepad file. Then go to menu and press "Save as" and save it as filename.bat on your desktop. The next time you plug-in your motoactv you only have to double click on the file and it will be recognised as UMS.
Click to expand...
Click to collapse
Thanks!!!
Inviato dal mio MZ601 con Tapatalk 2

[APP] [TOOL] [Win | Mac | Linux] ADB Master: Easily manage multiple Android devices

ADB Master helps you manage and monitor multiple Android devices using ADB (Android debug bridge). One click to switch adb to wireless, perform actions, commands or view and compare installed apps, running processes with cpu usage or browse logcat data for multiple selected devices… At the same time. Without root!
Updated November 2015
Download ADB Master 1.61 for Windows, Mac or Linux.
Quick start
1) Make sure ADB is installed on the PC
- http://developer.android.com/sdk/
OR
- http://www.howtogeek.com/125769/how-to-install-and-use-abd-the-android-debug-bridge-utility/
OR
- http://www.xda-developers.com/andro...ng-fast-adb-fastboot-and-driver-installation/
2) Install and run ADB Master for your operating system.
3) Set the ADB location in the “Control” tab of ADB Master by browsing to the folder containing the “adb” binary. The background will turn green when the correct folder is selected.
Notes:
- For an Android device to appear in the list, enable "Settings > Developer > USB Debugging" on the device and connect it to the computer with a USB cable.
- In ADB Master, select one or more devices from the list of USB or WiFi connected devices to perform actions or view information on them...
Windows Users: You will need to install the Android ADB drivers if your device is not detected.
Automatic updates under Windows: If you get an error updating an older version using the built in update feature, try running the app as an administrator (right click and select "Run as administrator"). You only need to do this to update the app - not every time you run it.
Mac users: If you get an error that the app is corrupt or cannot be opened, try right clicking it and select open to allow it to run (you only need to do this once).
Linux users: The new 1.5 linux version includes a run script and has some special permission set as follows:
(Thanks to Craig D) if you want to run ADB-Master via its icon, the .jar permissions need to be set to 'executable'... This can be done by opening a Linux terminal and typing: chmod +x ADB-Master.jar.
Without setting the permission to +x you can only run it from terminal by typing: java -jar ADB-Master.jar.
If you like the app and want to support it, please purchase the paid version in the Google Play Store (search for 'ADB Master').
Using the ADB Master GUI
Device lists
View attachment 2670819 At the top of the application are the device lists. These lists provide a way to list and select devices to work with.
There are two lists:
1) USB connected devices with a button to switch the selected devices to WiFi (tcpip) mode. This will install “Helper.apk” to display adb state on the device and enable the device to be discovered and connected to by ADB Master.
NOTE: The device(s) and the computer must connected to the same WiFi access point for a successful ADB-Over-WiFi connection.
NOTE: Unfortunately, some android builds do not have the ability to use ADB-Over-WiFi without root.
2) WiFi connected devices which has a button to switch the selected devices to USB mode. This will uninstall “Helper.apk” and set the device back to USB mode.
Control tab
View attachment 2670799 This section allows you to perform actions or commands on all selected devices.
- Shutdown, reboot, reboot to recovery or reboot to bootloader by selecting the devices and then pressing the desired button.
- Press power, back, home or volume up and down buttons on all selected devices at the same time.
- “Identify” a device installs and runs a small utility to wake the device and display the same information that appears in the device list as well as the IP address.
- Execute any custom ADB command in the ADB Command box and hit enter or press “Execute” to run that command on all selected devices. NOTE: This function treats spaces as command separators so it may not work for all possible adb commands at the moment. View the results of the command in the “ADB Log” tab.
Applications tab
View attachment 2670866 This section allows you to compare and manage applications (packages) on all selected devices using the adb commands “adb pm list packages -e”, “adb pm list packages -d” or “adb pm list packages”.
- Install an APK from your pc
- Enable (requires root and su to be installed on the device)
- Disable (requires root and su to be installed on the device)
- Uninstall multiple apps on all selected devices with one click.
- Pull selected apk's
- Pull screenshots
- Start apps
- Force-stop apps (Only works with Android 3 and above)
- Clear app data and cache
App listing color key:
- Green: The app is installed and enabled on all selected devices
- Black: The app is installed and enabled on some selected devices
- Orange: The app is installed on some or all devices, but is disabled on one or more
- Red: The app is installed on some or all devices but is disabled on all installed instances
Processes tab
View attachment 2670801 This section uses the command “adb shell top -m 20” to list the top 20 processes running on the device. It lists all selected devices in one view making it easy to monitor multiple devices at the same time. Future features include the ability to terminate processes and use custom top commands.
Logcat tab
View attachment 2670802 View live Logcat data from all selected devices in one list making it easy to monitor multiple devices at the same time. Future features will enhance this section with the use of filters and colors.
- View and save Logcat messages to files
ADB Log tab
View attachment 2670803 View a log of commands executed by ADB Master. It logs the device, commands and their responses.
V1.1-BETA Changes:
- Fix for incorrect process display in Windows
- Removed the extra blank lines in logs on Windows
- Fix for device name not set correctly in Windows
V1.2-BETA Changes:
- Added tcp reset/disconnect button
V1.32 Changes:
- Added adb sideload feature (useful for ROM developers)
V1.33 Changes:
- Renamed Log tab 'Console'
- Moved ADB custom command fields from Command to Console tab for better context and visibility of command responses
V1.41 Changes:
- Added ability to pull selected apk's
- Added ability to save Logcat messages to files
- Added ability to pull screenshots
- Added ability to start apps
- Added ability too force-stop apps (Only works with Android 3 and above)
- Added ability to clear app data and cache
- Added time stamp to Logcat messages
- Fixed connect command to include the port for some versions of ADB
V1.51 Changes:
- Fixed some delays on the UI when connecting to a device
- Added buttons to open pulled screenshots and apk file locations
- Added installer for Windows users
- Added Mac .app package
- Added Linux version with required permissions set and a run script
V1.60 Changes:
- Added drag and drop to install applications (drag APK's to the application list on the applications tab)
- Added ability to select and execute a file containing ADB commands or drag and drop adb command files onto the console tab
- Added ADB Master automatic updates. Get notified when an update is available then download and install it.
- Added some useful buttons in the control tab that open various control panel items on all selected devices (all buttons may not work on all Android platforms).
V1.61 Changes:
- Improved handling of multiple commands in a single line to allow complex scripts to execute successfully.
- Fix for the way commands are handled in Windows related to line feed characters.
Execute adb commands from a file:
Command file(s) must contain valid ADB commands, one per line and may also contain comments. The starting keyword "adb" is assumed for each line and is optional in the file.
To comment a line, start the line with any of the following (common) comment delimiters: ";" "//" or "rem" as well as ":".
When selecting file(s) using the browse button, you will be prompted with a message containing the commands to be executed before they are executed. Drag and drop command file(s) onto the console tab to execute them without a prompt.
WARNING: ADB Master exposes powerful and advanced tools for working with your Android devices and misusing it can result in the device malfunctioning... REALLY.
Disclaimer: Although great care has gone into creating it, this software is provided AS-IS and you use it completely at your own risk. All rights reserved.
Download ADB Master 1.61 for Windows, Mac or Linux.
The above download links provide the recommended latest versions. Previous versions of ADB Master are also available below.
Note on automatic updates under Windows: If you get an error updating an older version using the built in update feature, try running the app as an administrator (right click and select "Run as administrator"). You only need to do this to update the app - not every time you run it.
XDA:DevDB Information
[APP] [TOOL] [Win | Mac | Linux] ADB Master: A multi-android ADB graphical interface, Tool/Utility for the Android General
Contributors
extremewing
Version Information
Status: Stable
Created 2015-03-07
Last Updated 2015-03-22
Seems Good...! (Y)
I saw a device today that was not completing loading of the apps list and a few other strange things including strange numbers for the processes cpu percentages. I will be looking into this a bit more so you can expect an update soon.
Today, I uploaded a new version that fixes some issues under Windows.
Please see the original post for the download link!
Thanks
Adrian
A new version is in the OP.
It includes a new "Reset" button for tcp connections that have stopped working, particularly useful when waking the PC or changing access points and the old connection is no longer working.
New feature in V1.3: ADB Sideload
I had a request to add ADB "sideload" capabilities to the app (useful for rom developers) and here is the first version to test out that includes this feature. I will update the OP soon if no one has any problems.
V1.31 Increased timeout for sideload
This version has an increased timeout for the adb sideload feature. It is possible the execute thread was not waiting long enough for the upload to complete?
good work, thanks
it's hard to remember the command for me,
V1.32 is now available from the first post
New feature: adb sideload - upload and install updates to a device in one step.
Sideload mode is a special option in the Android's recovery. It was introduced in Jelly Bean (4.1) and higher.
Please see your recovery's instructions on starting sideload mode.
Some small changes in V1.33 on first post.
After some positive feedback, I have published this new 1.33 version on the play store too.
This is a wish list of features to add to ADB Master and I will be working on implementing them.
- Add ability to pull selected apk's from the selected devices
- Add ability to save logcat messages to files
- Add ability to pull screenshots
If you have any other requests, please post here!
Hi, a suggestion: can you make possible to connect to a device with a known ip? I don't want to install those apks...
vipervault said:
Hi, a suggestion: can you make possible to connect to a device with a known ip? I don't want to install those apks...
Click to expand...
Click to collapse
Ok let me figure out what would make sense in how to do that.
Just out of interest, why do you not want to install the apk's (I assume you mean helper.apk)?
vipervault said:
Hi, a suggestion: can you make possible to connect to a device with a known ip? I don't want to install those apks...
Click to expand...
Click to collapse
Just so you know, executing the connect command at a command prompt when you know the IP is quite easy too. The command would be "adb connect <IP>". The good thing with the helper.apk with ADB Master is that it will take care of this for you and even re-connect when a connection is broken for some reason.
Anyway, still waiting to see why you do not want to install the apk's? You could uninstall them straight away from the Applications tab too.
.jar won't open
I double-click on the jar, but nothing happens. Anyone know why this could happen?
Aidoboy said:
I double-click on the jar, but nothing happens. Anyone know why this could happen?
Click to expand...
Click to collapse
You need to have Java installed and then the file type ".jar" should be associated with the java runtime correctly.
Best tool ever!
Vingadero said:
Best tool ever!
Click to expand...
Click to collapse
Thank you! Your feedback makes it worthwhile.
If you have any suggestions or special requests, please feel free to post them.
extremewing said:
This is a wish list of features to add to ADB Master and I will be working on implementing them.
- Add ability to pull selected apk's from the selected devices
- Add ability to save logcat messages to files
- Add ability to pull screenshots
If you have any other requests, please post here!
Click to expand...
Click to collapse
Great tools! Any progres with
- Add ability to pull selected apk's from the selected devices
???

GApps on Fire TV 2 5.2.4.0 Rooted

For those of you who've followed the instructions here to get GApps working on a rooted Fire TV 2, but have been frustrated that it won't work, I figured out what was missing. It appears the issue is that the newer releases of Open Gapps isn’t installing everything that it’s supposed to be installing. So this guide lays the foundation of everything you need to get to make it work, but there are some additonal steps to take and additional files to sideload to finish the job and get the Play Store running on your Fire TV 2.
First, instead of downloading a -leanback verison of the Play Store, download the newest one that has the [8] designation stating that it’s for Android TV. This is ideal for the Fire TV – for me, it works great. At the time of writing the version I used was Google Play Store 7.5.08.M-xhdpi [8], only a few days old. You also don’t run into the issue of some services not working because the .apk has been resigned.
Secondly, you’ll need some additional tools:
lzip, which you can download here (Windows, other versions are available here – to make it work easier I copied lzip.exe to C:\windows\system32)
7zip, which you can download here (choose the version of your choice, if you’re using Linux you don’t need it since you can just use tar)
Follow the guide up to step 8 and then stop. Before you proceed you’ll need to sideload the missing files.
First, on your PC, extract the Open Gapps .zip file. Inside it go into the Core folder. In here are two apps that are missing that are in .lz format: gmscore-arm64.tar.lz and gsflogin-all.tar.lz. This is where you open a command line and navigate to where you have extracted your Gapps folder. Use lzip.exe to extract the files:
Code:
C:\AndroidSDK\platform-tools\open_gapps-arm64-5.1-nano-20170218\Core>lzip -d gmscore-arm64.tar.lz
C:\AndroidSDK\platform-tools\open_gapps-arm64-5.1-nano-20170218\Core>lzip -d gsflogin-all.tar.lz
C:\AndroidSDK\platform-tools\open_gapps-arm64-5.1-nano-20170218\Core>
If it works properly you won’t see any other feedback. Now you have the same two files, but now they’re .tar files. Use 7-zip to extract them – I just right-clicked on them in Windows Explorer, selected “7zip -> Extract here” for each one. Now you have two folders named gmscore-arm64 and gsflogin-all.
Inside those folders you need the following files:
\gsflogin-all\nodpi\priv-app\GoogleLoginService\GoogleLoginService.apk
\gmscore-arm64\nodpi\priv-app\PrebuiltGmsCore\PrebuiltGmsCore.apk
\gmscore-arm64\common\priv-app\PrebuiltGmsCore\lib\arm64\libAppDataSearch.so
\gmscore-arm64\common\priv-app\PrebuiltGmsCore\lib\arm64\libNearbyApp.so
\gmscore-arm64\common\priv-app\PrebuiltGmsCore\lib\arm64\libWhisper.so
\gmscore-arm64\common\priv-app\PrebuiltGmsCore\lib\arm64\libconscrypt_gmscore_jni.so
\gmscore-arm64\common\priv-app\PrebuiltGmsCore\lib\arm64\libgcastv2_base.so
\gmscore-arm64\common\priv-app\PrebuiltGmsCore\lib\arm64\libgcastv2_support.so
\gmscore-arm64\common\priv-app\PrebuiltGmsCore\lib\arm64\libgmscore.so
\gmscore-arm64\common\priv-app\PrebuiltGmsCore\lib\arm64\libgoogle-ocrclient-v3.so
\gmscore-arm64\common\priv-app\PrebuiltGmsCore\lib\arm64\libjgcastservice.so
\gmscore-arm64\common\priv-app\PrebuiltGmsCore\lib\arm64\libleveldbjni.so
\gmscore-arm64\common\priv-app\PrebuiltGmsCore\lib\arm64\libsslwrapper_jni.so
\gmscore-arm64\common\priv-app\PrebuiltGmsCore\lib\arm64\libtango_utility_lib.so
\gmscore-arm64\common\priv-app\PrebuiltGmsCore\lib\arm64\libwearable-selector.so
Sideload all of them to your Fire TV, the same as you did in step 8 for Phonesky.apk.
Now, continue with step 9. When you get to step 12, I’ll bet that there isn’t a /system/priv-app/Phonesky/Phonesky.apk file to delete, and when you try to do step 13 you’ll get an error saying that the directory doesn’t exist. That’s because Open Gapps didn’t install it at all in the first place! Time to make the directories yourself so that you can upload the files. Perform these commands:
Code:
mkdir /system/priv-app/Phonesky
mkdir /system/priv-app/GoogleLoginService
mkdir /system/priv-app/PrebuiltGmsCore
mkdir /system/priv-app/PrebuiltGmsCore/lib
mkdir /system/priv-app/PrebuiltGmsCore/lib/arm64
Now, just like step 12, copy all of the files to their proper locations:
Code:
cp /sdcard/Phonesky.apk /system/priv-app/Phonesky/
cp /sdcard/GoogleLoginService.apk /system/priv-app/GoogleLoginService/
cp /sdcard/PrebuiltGmsCore.apk /system/priv-app/PrebuiltGmsCore/
cp /sdcard/libAppDataSearch.so /system/priv-app/PrebuiltGmsCore/lib/arm64/
cp /sdcard/libNearbyApp.so /system/priv-app/PrebuiltGmsCore/lib/arm64/
cp /sdcard/libWhisper.so /system/priv-app/PrebuiltGmsCore/lib/arm64/
cp /sdcard/libconscrypt_gmscore_jni.so /system/priv-app/PrebuiltGmsCore/lib/arm64/
cp /sdcard/libgcastv2_base.so /system/priv-app/PrebuiltGmsCore/lib/arm64/
cp /sdcard/libgcastv2_support.so /system/priv-app/PrebuiltGmsCore/lib/arm64/
cp /sdcard/libgmscore.so /system/priv-app/PrebuiltGmsCore/lib/arm64/
cp /sdcard/libgoogle-ocrclient-v3.so /system/priv-app/PrebuiltGmsCore/lib/arm64/
cp /sdcard/libjgcastservice.so /system/priv-app/PrebuiltGmsCore/lib/arm64/
cp /sdcard/libleveldbjni.so /system/priv-app/PrebuiltGmsCore/lib/arm64/
cp /sdcard/libsslwrapper_jni.so /system/priv-app/PrebuiltGmsCore/lib/arm64/
cp /sdcard/libtango_utility_lib.so /system/priv-app/PrebuiltGmsCore/lib/arm64/
cp /sdcard/libwearable-selector.so /system/priv-app/PrebuiltGmsCore/lib/arm64/
Now, do step 14 to change the permissions for all of them:
Code:
chmod 644 /system/priv-app/Phonesky/Phonesky.apk
chmod 644 /system/priv-app/GoogleLoginService/GoogleLoginService.apk
chmod -R 644 /system/priv-app/PrebuiltGmsCore/
(The difference in the last one gets all of the files at once, rather than you having to do them individually.)
Now, continue with Step 15 to cleanup the files you uploaded. From here on out it should be smooth sailing. When I rebooted and opened up the Play Store (I used ES File Explorer, but you can sideload AppStarter if you’d like) it popped right up and let me log in! I used the "adb shell input tap 1800 1000" command to do the phantom mouse click referred to in step 3.
I’ve successfully downloaded and run games purchased. Play Games works and my cloud saves from my phone sync to the Fire TV! I had trouble getting Play Music to work, though, not sure what’s up with that, but I’ll figure it out later. Hope this helps y’all out!
To give credit where credit is due, the two posts I got the information from to piece together what was missing were:
http://stackoverflow.com/questions/...ator-does-not-come-with-play-store-for-api-23
https://groups.google.com/forum/#!topic/android-rpi/vH_xwFFjOVM
My comment in the aftvnews post can be found here. My apologies for those of you who aren't rooted, can't root, and find this information useless.
I followed all the steps mentioned but the google play app stills crashing up at start, just show a black screen for a while (1 second) and then back to the fire starter app, I tried with different versions of the PlayStore but all results in the same behavior. These are the version of files that I used:
Google play store: 7.5.08.M-xhdpi [8] [PR] 146162341
Gapps: open_gapps-arm64-5.1-nano-20170304
Xposed framework and installer: XposedInstaller_3.1.1 / HDXPosed-1.3 / xposed-v87-sdk22-arm64
After a look on the system apps I noticed that the google play service not appear on, I proceeded to installed it (Google Play Service Android TV 10.2.98 (846-146496160)) and also the XInstaller module from XPosed and then all worked fine, I hope that this little info helps to others
Is just the arm64 open gapps package incomplete? The regular arm version seemed to work fine on a fire tv stick with 5.0.5.
@ guyHalestorm and @lochy 19 You guys freaking rock. Was stuck on this since yesterday and couldln't give up until fixed, it is now. I followed everything in the first post, still kept showing a screen for a second and going back to home, did what Lochy19 mentionned and everything works fine !
Just curious, has anyone tried other versions of the open Gapps, ie the android tv, or the micro verions rather then the nano. Thinking those in particular the Android tv version might get the files installed. Not sure if these versions were available at the time the Guide was written as it was over a year ago
---------- Post added at 03:50 PM ---------- Previous post was at 03:14 PM ----------
Lochy19 said:
Edit: After a look on the system apps I noticed that the google play service isn´t showed on, then I proceed to installed it (Google Play Service Android TV 10.2.98 (846-146496160)) and also the XInstaller module from XPosed and then all works fine, I hope that this little info helps to others [/B]
Click to expand...
Click to collapse
Where exactly should that be installed just in /system/priv-app/ ? or does it need is own folder as well?
I followed all the steps mentioned i success!!!
I followed all the steps mentioned i success!!!
nujackk said:
Just curious, has anyone tried other versions of the open Gapps, ie the android tv, or the micro verions rather then the nano. Thinking those in particular the Android tv version might get the files installed. Not sure if these versions were available at the time the Guide was written as it was over a year ago
---------- Post added at 03:50 PM ---------- Previous post was at 03:14 PM ----------
Where exactly should that be installed just in /system/priv-app/ ? or does it need is own folder as well?
Click to expand...
Click to collapse
I installed the google play services normally, without make it a system app, and works fine.
What happens if when you "just right-clicked on them in Windows Explorer, selected “7zip -> Extract here" it says cannot open file as archive. I'd love to do this, but I'm stuck trying to extract the files from the individual .lz file.
@LocoMexican
Read OP
First lzip it
Kramar111 said:
@LocoMexican
Read OP
First lzip it
Click to expand...
Click to collapse
If you haven't guessed, I'm a novice at best, an old 70 year old man at worst (which I am). Still, just to be sure I researched to make sure my understanding of OP is the same as yours. Best I can tell from my research, it means "Original poster, to be precise...the one who made the thread..." Sometimes I skim instead of read. Thanks for your input, and I'll have another go at this. Loco
71457446 said:
If you haven't guessed, I'm a novice at best, an old 70 year old man at worst (which I am). Still, just to be sure I researched to make sure my understanding of OP is the same as yours. Best I can tell from my research, it means "Original poster, to be precise...the one who made the thread..." Sometimes I skim instead of read. Thanks for your input, and I'll have another go at this. Loco
Click to expand...
Click to collapse
May be i am wrong
OP may also mean Opening Post or Original Post. No?
Can someone just provide the finished files we need to use please? I want to STRANGLE people who use lz. Wow I've spent like more than an hour messing around with trying to decompress this file and haven't gotten anywhere on either Mac or Windows.
PhoenixMark said:
Can someone just provide the finished files we need to use please? I want to STRANGLE people who use lz. Wow I've spent like more than an hour messing around with trying to decompress this file and haven't gotten anywhere on either Mac or Windows.
Click to expand...
Click to collapse
Rename files (forum's restrictions)
open_gapps-arm64-5.1-nano-20170316.zip.001.zip = open_gapps-arm64-5.1-nano-20170316.zip.001 and so on (for FTV 2 Gen)
open_gapps-arm-5.1-nano-20170318.zip.001.zip = open_gapps-arm-5.1-nano-20170318.zip.001 and so on (for FTV 1 Gen)
Thank you kramar111 !!!!
Well all mine does is crash. I can't make heads or tails out of what Lochy19's post means (the edit) in post #2. Sounds like another program is being installed. Can someone state that post in a clearer way?
Re-reading helps. Got it figured out and have those pesky files in their own little folder. Now, I can't "push" with my computer. Had this issue when I got started with the first thread on installation of Play Store referenced here. Did enough reading to find a post about aftv1 having issues with SD card and d/loaded a bueller sdcard fix. I have a AFTV1. Ran it and was then able to push to the sdcard, and finish the installation. Now I'm having the same issue pushing to the sdcard, and the bueller sdcard fix doesn't seen to do the trick. Maybe it's the computer I'm using, and as before, maybe it is operator error. Regardless, thanks for your suggestion about read OP. It really did help. Thanks again for your input, and for any thoughts you may have on the sdcard push issue.
PhoenixMark said:
Thank you kramar111 !!!!
Well all mine does is crash. I can't make heads or tails out of what Lochy19's post means (the edit) in post #2. Sounds like another program is being installed. Can someone state that post in a clearer way?
Click to expand...
Click to collapse
Sure, no problem, I followed all the steps explained on the first post, but I had the opening issue (black screen for few seconds and then back to the launcher), then I installed the google play service and this fixed up the problem, the google play store opened without problems, I completed the sign in process and the available apps was showed, seems to be a problem with the gapps package or the version of google play service that it have (if has one), but the problem is corrected with the normal installation of the google play service, the specific version is on my first comment.
There is the missing APK that must be installed: Google Play Service Android TV 10.2.98 (846-146496160), I downloaded it from apkmirror website.
Well it seems to be working on Android TV and Fire OS. So you need the AFTV guide, post 1 and 2 from this thread, and post 13 for the files if you can't get them un lz'd.
Now I just have to figure out how to get recommendations working on the home screen of Android TV. I thought just logging in to Google would do it.
Kramar111 said:
Rename files (forum's restrictions)
open_gapps-arm64-5.1-nano-20170316.zip.001.zip = open_gapps-arm64-5.1-nano-20170316.zip.001 and so on
Click to expand...
Click to collapse
Will need the arm version of this files for those that want to try it on a FTV1. Since FTV1's & FTVS1's processors are not the 64-bit type. Just saying...
---------- Post added at 09:32 PM ---------- Previous post was at 08:54 PM ----------
If anybody gets this working on a FTV1. Please share the working ARM files you created. Thanks...
SUCCESS!!!! Finally, it's installed on my AFTV1. After installing the Google Services mentioned in post 2 by Loche19, I have been able to use AppStarter and run Google Play, log in and actually download an app which worked when I tested it. Thanks to all who helped me. The best direction was "read OP". Really, if you just skim over the how-to, you'll miss something. Another caution, if you have a AFTV1 like me, be careful about downloading files for this project. I only had success with the regular arm versions and NO success with arm64 version. Different o/s. Thanks again.
By replying in thread named " GApps on Fire TV 2 5.2.4.0 Rooted" i don't even think about FTV 1 Gen
Files for FTV 1 Gen added

Resources