Related
***Sticky this please
Check out this application I put together. It is a simple stand alone app for true tethering over wifi, you must have a rooted phone for this app to work....
http://www.androidactivity.com/tetherWifi.html
The main purpose of this thread is to discuss issues with the application. For instructions on how to use it read the webpage from the link above.
Good deal will try it out as soon as i get sp3, is it compatible with new update? thanks for this!
Any chance of making this open source?
If it just uses the same method as http://forum.xda-developers.com/showthread.php?t=474470 then it would be pretty helpful for those of us trying to make a frontend to command line applications.
amgupt01 said:
Any chance of making this open source?
Click to expand...
Click to collapse
Pretty Please... I do appreciate the effort and at that same time, I like to know what I am giving root access to. But, really - I'd like to be able to modify it to my own network environment. I like to customize the dnsmasq.conf a bit for my own peace of mind...
Thanks again, this is the beginning of a great piece of work...
This is really nice!!! The old way with terminal was getting old. Thanks!!!!
Could you have a status icon at the top toolbar to show that the tethering service is active?
Tested, worked flawlessly. Unscecured, of course, but freakin' sweet if you can't get another network. Tried this from my house, worked great on 3g. Work VPN functioned w/o issue.
Nice! Confirmed working with Vista laptop.
I'd like to also voice support for open sourcing this-- or for removing the root requirement if you could get that worked out. I am very appreciative that you've pulled this together but at the same time feel reluctant to install any software that will be running under root that isn't signed or at least has the source code available.
Keep up the great work!
please add an option to change ssid, and settings, and we definately gotta find a way to secure the wifi
I just made a couple bug fixes and put up a new version this morning.
This is still beta and I am looking into making a lot more things configurable.
Right now it is not secure. It only will DHCP out one IP, but it does NAT forward the whole range of 10.0.1.X
I understand everybody's concern about making it open source for root access, at this moment I am not going to make it open source. I would like to figure out a way to make it work without root in the future, but if I cannot I may make it open source.
This may help you out with your concerns, this is what the application does:
-it unpacks files to the /data/data/com.androidactivity.tetherWifi/ directory only on the first run of the application, installing an upgrade of my app will re-unpack the latest files in this directory. a chmod of 744 is done to all of these files.
-manual configuration of dnsmasq.conf, tiwlan.ini, etc.. can be done by modifying these files in this directory. You need to run my application once before modifying, so that these files get unpacked. If you ever upgrade my app, make sure you back up these files before upgrading, because on upgrade my app will overwrite these files.
-when you hit start, i disable wifi if it is on and then run the tether.sh start script.
-when you hit stop, i run the tether.sh stop script, I also enable the wifi back if i had disabled it before running start.
-to see what tether.sh start and stop does, take a look at the /data/data/com.androidactivity.tetherWifi/tether.sh file
stats555 said:
Good deal will try it out as soon as i get sp3, is it compatible with new update? thanks for this!
Click to expand...
Click to collapse
I doubt it needs service pack 3. I just confirmed it working on my machine which has service pack 3.
My bluetooth tethering app, on the other hand, works better with service pack 3, and I do recommend upgrading if you are going to use that app.
moussam said:
***Sticky this please
Check out this application I put together. It is a simple stand alone app for true tethering over wifi, you must have a rooted phone for this app to work....
http://www.androidactivity.com/tetherWifi.html
Update:What this program does..
-it unpacks files to the /data/data/com.androidactivity.tetherWifi/ directory only on the first run of the application, installing an upgrade of my app will re-unpack the latest files in this directory. a chmod of 744 is done to all of these files.
-manual configuration of dnsmasq.conf, tiwlan.ini, etc.. can be done by modifying these files in this directory. You need to run my application once before modifying, so that these files get unpacked. If you ever upgrade my app, make sure you back up these files before upgrading, because on upgrade my app will overwrite these files.
-when you hit start, i disable wifi if it is on and then run the tether.sh start script.
-when you hit stop, i run the tether.sh stop script, I also enable the wifi back if i had disabled it before running start.
-to see what tether.sh start and stop does, take a look at the /data/data/com.androidactivity.tetherWifi/tether.sh file
Click to expand...
Click to collapse
Thanks for this gonna test it out. I was thinking of making something like this you beat me to it.
http://code.google.com/p/gtether/
Similar project, open source.
Do not support closed source projects.
Especially those that require root on your phone!
miseiler said:
http://code.google.com/p/gtether/
Similar project, open source.
Do not support closed source projects.
Especially those that require root on your phone!
Click to expand...
Click to collapse
The gtether application clashes with the ****ty superuser application on the JF releases... it's unusable for me. However, Moussam's works fine.
With GTether, everytime I try and connect my PC - it just goes into an endless loop of approving the super user access, even if you select "Always" it just doesn't work. Which is a shame, because GTether is clearly a better application.
I found the same issue with the endless loop with Super user.
vr24 said:
The gtether application clashes with the ****ty superuser application on the JF releases... it's unusable for me. However, Moussam's works fine.
With GTether, everytime I try and connect my PC - it just goes into an endless loop of approving the super user access, even if you select "Always" it just doesn't work. Which is a shame, because GTether is clearly a better application.
Click to expand...
Click to collapse
Well, the GTether application isn't even Open Source. The SVN for it has no code and the downloadable "source code" is just a gzipped .apk file.
Also, the Super User app is far from ****ty. It is the only thing protecting your phone from people releasing apps on the market targeting rooted users. If someone released an app on the market that ran su without your approval, they could wreak havoc on your phone and potentially brick it.
miseiler said:
http://code.google.com/p/gtether/
Similar project, open source.
Do not support closed source projects.
Especially those that require root on your phone!
Click to expand...
Click to collapse
Everybody, do your homework first before you start making stupid comments. First off gtether is not an open source app. My app is simpler and more stable. Gtether is also a good application, but I wanted to create something that had everything packed up into one install without having to run any shell commands.
I do not have the bells and whistles yet, but I am working on them, this is just a beta release.
amgupt01 said:
Well, the GTether application isn't even Open Source. The SVN for it has no code and the downloadable "source code" is just a gzipped .apk file.
Also, the Super User app is far from ****ty. It is the only thing protecting your phone from people releasing apps on the market targeting rooted users. If someone released an app on the market that ran su without your approval, they could wreak havoc on your phone and potentially brick it.
Click to expand...
Click to collapse
Well, no. The source tgz has all the components of the tether-1.6 app in it, in additional to the apk file (for whatever reason). I suppose you could argue the iptables source isn't present in the file, but that is available elsewhere.
And apps that run su with your approval are just as likely to brick/rootkit.
Well by "source" I am referring to the actual source code used for the .apk file which is run on Android. That's the part which is installed as an application and is actually using the binaries from the tether-1.6 kit as root and running in the background to notify when new users connect.
Also, when I say that SuperUser protects your phone, I'm assuming that people will actually do research before allowing an app to user root privileges and will block an app which has no need to use root whatsoever.
miseiler said:
Well, no. The source tgz has all the components of the tether-1.6 app in it, in additional to the apk file (for whatever reason). I suppose you could argue the iptables source isn't present in the file, but that is available elsewhere.
And apps that run su with your approval are just as likely to brick/rootkit.
Click to expand...
Click to collapse
if it makes everybody more comfortable i can post the script files that are run in my app. su is only needed to run these script files. these files are unpacked into /data/data/com.androidactivity.tetherWifi on the first run of this application and can even be altered to whatever config you want afterwards. su access is not needed until you hit start or stop. if you are concerned install my app and run it and dont grant su access and you will be able to see the unpacked script files in the dir i mentioned, and even alter them if you want.
Alright everyone, I'm Trailblazer101, an Android Developer who likes to take advantage of, and make better, the unique features of the phones I purchase. I started off with the Samsung Continuum back in 2010, which had a ticker ahead of its time, and went from there. I work 2 jobs, so time is tight sometimes, but I still manage to work on these things, a fun passion/hobby.
Status Updates
Code:
5/12
--- I got my patch working, and tested it out with a simple demo that takes advantage of the new capabilities. I've posted a Guide below!
5/10
--- Now that Verizon users have root, I will begin testing this myself :) Thanks to those who helped me figure out what we'd have to do, so I can get started right off the bat! I'll keep you posted.
What is this?!!
Okay, so by default the Feeds that you can make are restricted to the capabilities of a RemoteView. This severely limits what you can do with the Feed. Take a look here to see what exactly is supported, by default: http://stackoverflow.com/a/16089389
However, any Samsung App (which includes a few signed by Samsung on the Galaxy Apps Exclusives page) has the ability to put whatever it wants on the screen, just like a regular App. I've now extended that invitation on over to you/us!
Guide
The steps to take advantage of this is a little convoluted, so let me break it down for you easy!
STEP 1:
You have to flash my patch to allow this development to actually work. You can download it here: View attachment Trailblazer101_S6Edge_Advanced_Feeds_Patch.zip. Then flash it using FlashFire, or extract the zip and put everything where it needs to go, making sure to set the permissions appropriately!
STEP 2:
Now you can start developing your new Custom Feed! I would suggest using my simple demo project as your base, and going from there! You can find that here: View attachment EdgeScreen-BACKUP.zip. Extract it and take a look at the source!
STEP 3:
From here on out is where things get tricky... Without changing a thing, if you build from source and try to debug, it won't work. Why? Because the API that Samsung gives developers, like us, is different than the one they use for themselves. So Here's what you gotta do-- without changing a thing, build the Project. The best way to do that without debugging within Android Studio is to go to Gradle Projects -> :app -> Tasks -> build -> assembleDebug. This'll make the built apk and put it within "..\.EdgeScreen-BACKUP\app\build\outputs\apk\app-debug.apk".
STEP 4:
I'm assuming you have the latest Java Development Kit, and Android SDK, installed and configured properly, with their paths in the PATH variable, accordingly. You should also know how to use apktool for decompilation, at least a little I've compiled a toolkit folder based off of the test Project I shared above, which includes apktool, the NEW Samsung API files, the original built apk, and the already modified decompiled source/apk. You can download that here: View attachment Decompilation_Data.zip. Then, open a Command Prompt window and "cd" to the extracted folder.
STEP 5:
Decompile the built apk, which should be the same as the one in the extracted folder, using apktool like this:
Code:
.\apktool\apktool d -f TestFeed_orig.apk
STEP 6:
Compare the decompiled folder "TestFeed_orig" with my already modified "TestFeed_modded" one. I suggest using WinMerge! You'll see that the 'TestFeed_orig\smali\com\samsung\android\sdk' folder is very different. That's what I was talking about before, how Samsung Feeds have more options in their API. So delete the 'TestFeed_orig\smali\com\samsung' folder, and replace with the one in the '---SAMSUNG API---' folder.
STEP 7:
Continue comparing the two folders. Basically the rest of the changes are just getting our application to call the new Samsung API properly, instead of the stubs I was using in the Project. There aren't many changes you have to make, but they're all important!
STEP 8:
Once the two folders are the same, recompile it using apktool, like so:
Code:
.\apktool\apktool b TestFeed_orig
STEP 9:
Sign the new compiled apk stored in 'TestFeed_orig\dist' using your signing key. You can make your own, then use it to sign the app, following the instructions here: Official Instructions for Manual Signing.
STEP 10:
Install the newly signed apk, and enable the Feed by going to: Settings-> Edge screen -> Information stream -> Manage Feeds -> *ENABLE* FeedsCocktailExample! You may have to restart, or just hit 'reorder' in the top left. That sometimes fast-triggers it. Now turn off the screen, do the Feed Gesture to get it to turn on, and you should see our Custom Feed! It doesn't look like much, but it's using a custom view, HorizontalTextView, that would not work otherwise.
From here the options are endless. You can follow these steps and my Sample Project to play a video for a feed, if you wanted! Whatever strikes your fancy!
If you followed these steps and appreciate the help, show this thread some love, and maybe. Well i'd say buy me a beer, but it'll probably go to textbooks instead
Developer/Advanced Information!
We can make our own Feeds no problem, without root, they are just forced to use a RemoteView directly, which for all intents and purposes, is a pain in the kiester. Instead, it would be a lot nicer/convenient, without even mentioning the more advanced functionality we could bring, to use our own Views. However the version of SlookCocktailManager.UpdateCocktail that allows this is only found within a more advanced API, one I/no typical user don't have access to directly. BUT, I can still access it by decompiling for example the Edge RSS app from the Samsung AppStore, and putting/replacing the "sdk" folder from that into my own decompiled app, and recompiling. Easy enough, with apktool! (Of course with the headache of adding in my own temporary shell classes, in the project, so that I can actually write the calls, and just change the reference within the smali code once that sdk is replaced) The problem is, even when you do this, and it builds fine, installs great, and even begins initializing properly, we get an error from within CocktailBarService, the file I'm having you replace. More specifically, I tracked down the actual problem, and it comes back to "CocktailWhiteList", a class within CocktailBarServices, then checks the signature of the calling application, our Custom Feed, and sees if it comes from Samsung. This none of my expertise can fix, without being rooted, but trust me I tried. Now that we are rooted I was able to patch said apk, and get my own apps to work! Hurray!
cocktailbar service crashes when going into 'edge screen' option in settings menu.
logcat attached
Edit: sorry didn't rename cocktail bar (cocktailbarservice_signed to cocktailbarservice)
now it doesn't visibly crash, it just wont let me go into 'edge screen' option in settings menu
new log cat uploaded
This man looks promising! You have my S6 edge as soon as I have an official TWRP with working backup and restore
ktetreault14 said:
This man looks promising! You have my S6 edge as soon as I have an official TWRP with working backup and restore
Click to expand...
Click to collapse
I will help as well, when these tools are out for us..
Thanks for bringing cool stuff like this to the phone at this early date!
ktetreault14 said:
This man looks promising! You have my S6 edge as soon as I have an official TWRP with working backup and restore
Click to expand...
Click to collapse
How deep are you willing to go? Because it would be awesome if you could clear dalvik-cache, since I see this, right off the bat:
Code:
: Failed to find OatDexFile for DexFile /system/priv-app/CocktailBarService/CocktailBarService.apk ( canonical path /system/priv-app/CocktailBarService/CocktailBarService.apk) with checksum 0xfbfcb9f7 in OatFile /data/dalvik-cache/arm64/[email protected]@[email protected]@classes.dex
EDIT: could you also make sure that you set the right permissions for the apk? I'm getting the impression that they might be off with:
Code:
msg=audit(1429397519.049:355): auid=4294967295 uid=10001 gid=10001 ses=4294967295 subj=u:r:untrusted_app:s0 pid=12605 comm="ktailbarservice" reason="memory violation" sig=11
EDIT2: We might have to disable SELinux... That's rather unfortunate/puts a rather large damper on things, until custom kernels come out at least... After starting a root shell, can you try:
Code:
setenforce 0
I don't know if it'll work, but if that goes through successfully try and launch the Edge Settings Screen again!
EDIT3: Do'h. It may have been something really simple *crosses fingers* Could you please re-download the CocktailBarService, and try doing the same thing you did last time, with right permissions, and maybe a dalvik-cache wipe if it doesn't work!?
Tried the new apk you uploaded. Getting a force close still when trying to open. I changed SELINUX to permissive, wiped dalvik, even tried deleting arm64 folder as well. No luck.
04-19 00:25:09.907 E/AndroidRuntime(15867): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.samsung.android.app.cocktailbarservice/com.samsung.android.app.cocktailbarservice.settings.EdgeScreenSettingsMain}: java.lang.SecurityException: Permission Denial: get/set setting for user asks to run as user -2 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL
Was searching through logcat and found this. May this have something to do with the issue?
wase4711 said:
I will help as well, when these tools are out for us..
Thanks for bringing cool stuff like this to the phone at this early date!
Click to expand...
Click to collapse
Don't mean to hijack thread, but "Tool" is already available here:
NB: Chrome and IE don't translate into "Save file" - Use Mozilla which does > copy to phone and flash.
https://blck.io/twrp-2.8.6.0-zeroltetmo.img
Perfectly working on T-Mobile S6 Edge
Will
RoM_Addict said:
Don't mean to hijack thread, but "Tool" is already available here:
NB: Chrome and IE don't translate into "Save file" - Use Mozilla which does > copy to phone and flash.
https://blck.io/twrp-2.8.6.0-zeroltetmo.img
Perfectly working on T-Mobile S6 Edge
Will
Click to expand...
Click to collapse
that version doesn't work properly for me and many others; waiting for an "official" version from the TWRP folks..
trailblazer101 said:
How deep are you willing to go? Because it would be awesome if you could clear dalvik-cache, since I see this, right off the bat:
Code:
: Failed to find OatDexFile for DexFile /system/priv-app/CocktailBarService/CocktailBarService.apk ( canonical path /system/priv-app/CocktailBarService/CocktailBarService.apk) with checksum 0xfbfcb9f7 in OatFile /data/dalvik-cache/arm64/[email protected]@[email protected]@classes.dex
EDIT: could you also make sure that you set the right permissions for the apk? I'm getting the impression that they might be off with:
Code:
msg=audit(1429397519.049:355): auid=4294967295 uid=10001 gid=10001 ses=4294967295 subj=u:r:untrusted_app:s0 pid=12605 comm="ktailbarservice" reason="memory violation" sig=11
EDIT2: We might have to disable SELinux... That's rather unfortunate/puts a rather large damper on things, until custom kernels come out at least... After starting a root shell, can you try:
Code:
setenforce 0
I don't know if it'll work, but if that goes through successfully try and launch the Edge Settings Screen again!
EDIT3: Do'h. It may have been something really simple *crosses fingers* Could you please re-download the CocktailBarService, and try doing the same thing you did last time, with right permissions, and maybe a dalvik-cache wipe if it doesn't work!?
Click to expand...
Click to collapse
Hi trailblazer, I set the permissions the same as the original apk ,
right lets try again: I've downloaded the new version and set permissions, wiped dalvik-cache but when trying to disable SELinux i get
tmp-mksh: 0 : not found.
and when going into 'edge screen' settings i get unfortunsatly cocktailbar service has stopped.
Catlog attached:
I used this to modify SELINUX. For anyone else who is helping out, try this.
[4/19] QuickLaunch Demo And Advanced Feed Development Request For Rooted Users
b-reezy said:
I used this to modify SELINUX. For anyone else who is helping out, try this.
Click to expand...
Click to collapse
I sent you a PM! I explicitly declared that permission for each activity, so let's see how it goes now! I put the same apk I sent you now on the OP, so the other testers can try it! In the mean-time, I do have something real for you guys to play with! It's the QuickLaunch window, customizable and all (from hitting the Feeds Settings Icon). I'll put that in the OP with the tag "WORKS(Kinda)"!
One thing, which is a big reason why I'm trying to do it this way-- clicking the icons launches the app, it just doesn't turn the screen back on! I've tracked it down, and it seems as if when the Feed Screen is on, it has the SCover flag set to on, manually, but when a user clicks a button from another Feed, it turns that flag back off, thus turning the screen back on. The easiest/cleanest way for us to do that too would be our Custom Feed Panel implementing the same OnClickHandler that the others do, just can't without doingwhat we're trying to do!
EDIT: Please still use the QuickLaunch apk with the tag "Signed" though for testing the replacement of CocktailBarService! My new one just does it the bad way, and had to get rid of the code for trying the good.
(There's other ways to turn the screen on, but the way I'm trying to do it does it easily, and allows for more advanced functionality!)
FOR DEVELOPERS:
If you are interested in taking what I have and running with it/collaborating, I am more than willing to send all sources of what I have so far, my resources that I've been using, along with all information gathered so far. Just ask!
Hopefully this will become available for non-rooted. I am DIEING to get more functionality out of the Edge API for this phone. The feed is an awesome option, but having to swiping finger is a pain in the @$$. A double tap on the edge or an automatic turn on would be AWESOME when Texts or missed calls are there.
b-reezy said:
I used this to modify SELINUX. For anyone else who is helping out, try this.
Click to expand...
Click to collapse
BTW.. can be disabled in the kernel source also.. I did that in m8 times
trailblazer101 said:
I sent you a PM! I explicitly declared that permission for each activity, so let's see how it goes now! I put the same apk I sent you now on the OP, so the other testers can try it! In the mean-time, I do have something real for you guys to play with! It's the QuickLaunch window, customizable and all (from hitting the Feeds Settings Icon). I'll put that in the OP with the tag "WORKS(Kinda)"!
One thing, which is a big reason why I'm trying to do it this way-- clicking the icons launches the app, it just doesn't turn the screen back on! I've tracked it down, and it seems as if when the Feed Screen is on, it has the SCover flag set to on, manually, but when a user clicks a button from another Feed, it turns that flag back off, thus turning the screen back on. The easiest/cleanest way for us to do that too would be our Custom Feed Panel implementing the same OnClickHandler that the others do, just can't without doingwhat we're trying to do!
EDIT: Please still use the QuickLaunch apk with the tag "Signed" though for testing the replacement of CocktailBarService! My new one just does it the bad way, and had to get rid of the code for trying the good.
(There's other ways to turn the screen on, but the way I'm trying to do it does it easily, and allows for more advanced functionality!)
FOR DEVELOPERS:
If you are interested in taking what I have and running with it/collaborating, I am more than willing to send all sources of what I have so far, my resources that I've been using, along with all information gathered so far. Just ask!
Click to expand...
Click to collapse
Liking the Quicklaunch app , are you still needing testers? or have you got all the info you need?
Alex-V said:
BTW.. can be disabled in the kernel source also.. I did that in m8 times
Click to expand...
Click to collapse
Exactly and imo its better if its done this way..
for anyone interested
you need to edit the security/selinux/selinuxfs.c file from source
FIND:
Code:
selinux_status_update_setenforce(new_value);
#else
ADD RIGHT BELOW "#else":
Code:
new_value = 0;
So it becomes:
Code:
selinux_status_update_setenforce(new_value);
#else
new_value = 0;
or use this one (from the G925F source)
friedrich420 said:
Exactly and imo its better if its done this way..
for anyone interested
you need to edit the security/selinux/selinuxfs.c file from source
FIND:
Code:
selinux_status_update_setenforce(new_value);
#else
ADD RIGHT BELOW "#else":
Code:
new_value = 0;
So it becomes:
Code:
selinux_status_update_setenforce(new_value);
#else
new_value = 0;
or use this one (from the G925F source)
Click to expand...
Click to collapse
yeah.. that's the one I used.. I'm still for and back to root or not..means for me.. develop roms and kernels ..or use it as it is.. lol..
friedrich420 said:
Exactly and imo its better if its done this way..
for anyone interested
you need to edit the security/selinux/selinuxfs.c file from source
FIND:
Code:
selinux_status_update_setenforce(new_value);
#else
ADD RIGHT BELOW "#else":
Code:
new_value = 0;
So it becomes:
Code:
selinux_status_update_setenforce(new_value);
#else
new_value = 0;
or use this one (from the G925F source)
Click to expand...
Click to collapse
Hii my friend, i also still , have a non rooted S6 Edge :thumbup:
Hey guys, I finished the QuickLaunch Feed and posted it in the Apps Folder here:
Click Me!
I did manage to get it to turn the screen on, then, with the clicking of the shortcuts, and it still launches it once unlocked (if you have a lockscreen). I am going to begin work on a music player Feed, now
I will continue development on more advanced Feeds, and also delve into enhancing the edge in other ways, once we Verizon users get root (or until I win the lottery and get a Sprint version ). I see all these great opportunities to make it better, I just can't do anything with it until I'm rooted, since this didn't go as well as I planned. Where we are stuck at now is this, and where it would be too much of a pain for me to do without a phone of my own to test one:
We need to re-sign the system with a signature key we have access to. This includes framework, apps, and the priv-apps signed with the samsung key. Then I can go about doing what I wanted to do, but otherwise, it's a no go.
A developer who does have a Sprint or T-Mobile version with root, I can tell you the information I gathered so far. I have seen where the 'turn screen on gesture' is stored, and all these other great things, I just can't right now
trailblazer101 said:
Hey guys, I finished the QuickLaunch Feed and posted it in the Apps Folder here:
Click Me!
I did manage to get it to turn the screen on, then, with the clicking of the shortcuts, and it still launches it once unlocked (if you have a lockscreen). I am going to begin work on a music player Feed, now
I will continue development on more advanced Feeds, and also delve into enhancing the edge in other ways, once we Verizon users get root (or until I win the lottery and get a Sprint version ). I see all these great opportunities to make it better, I just can't do anything with it until I'm rooted, since this didn't go as well as I planned. Where we are stuck at now is this, and where it would be too much of a pain for me to do without a phone of my own to test one:
We need to re-sign the system with a signature key we have access to. This includes framework, apps, and the priv-apps signed with the samsung key. Then I can go about doing what I wanted to do, but otherwise, it's a no go.
A developer who does have a Sprint or T-Mobile version with root, I can tell you the information I gathered so far. I have seen where the 'turn screen on gesture' is stored, and all these other great things, I just can't right now
Click to expand...
Click to collapse
very nice.. thanks my friend ?
This is just sounding AWESOME! I am on AT&T so will have to wait as well for Root. I was wondering if there is a possability for the edge to just turn on, on its own without the need to swipe the screen? Like when a new notification comes in it will just scroll across the edge (or maybe the icon will blink on and off until you see it and swipe).
I still feel the swipe is to hard to do consistantly and would rather use a double tap or something if the auto on isn't possible.
Hi everyone!
I just created my first Tasker plug-in. This plug-in enables you to send an adb shell command to any other device on the network that has adb over wifi enabled. I for example use it to turn my androidtv on or off by sending it the command "input keyevent POWER". You can also open specific activities in apps for example or simulate touch input.
Please read the description before using it and don't hesitate to leave feedback/bug reports/tips! This is my first app ever published so I still have a lot to learn.
You can download it for free from the play store:
https://play.google.com/store/apps/details?id=com.ADBPlugin
Edit: It's now also available on XDA Labs! You can find it here
First update is live!
This includes proper (cat)logs and Tasker errors if something went wrong, so if you run in any problems, you can now tell me . It also plays a lot nicer with the Tasker timeout system.
@Humpie
Thanks for this plugin. I allready made a project for my sony android tv. Start apps and controll media play.
But to make the plugin better I have some featur requests:
It would be nice to be able to work with tasker variables. e.g input text "%mytext".
Another feature reqest would be to get a output variable for commands with output like adb shell pm list packages.
MartelKombat said:
@Humpie
Thanks for this plugin. I allready made a project for my sony android tv. Start apps and controll media play.
But to make the plugin better I have some featur requests:
It would be nice to be able to work with tasker variables. e.g input text "%mytext".
Another feature reqest would be to get a output variable for commands with output like adb shell pm list packages.
Click to expand...
Click to collapse
Thanks for the tips! Will definitely add variable support and I'll also have a look at output variables. They are visible in the logs already, but not yet to tasker.
Why can't we use the built-in code Acton in Tasker? Is there a difference?
loogielv said:
Why can't we use the built-in code Acton in Tasker? Is there a difference?
Click to expand...
Click to collapse
In fact there is, since android 4.something google removed adb from android devices, so you can't perform adb commands from your phone, well aside from my plugin that is.
There would however be no difference if your remote device did have Tasker and you programmed it so that a certain action does something with code. However, you would have to figure out a way to contact that device etc...
Second update! The Plugin now has Tasker variable support!
(enjoy @MartelKombat btw I'm still thinking about how to implement your other request!)
I doont understand. I can type the code, but i do have to remove the "adb sell" part of the code but it's good to go… is that not what this plugin does?
Humpie said:
Thanks for the tips! Will definitely add variable support and I'll also have a look at output variables. They are visible in the logs already, but not yet to tasker.
Click to expand...
Click to collapse
Humpie said:
Second update! The Plugin now has Tasker variable support!
(enjoy @MartelKombat btw I'm still thinking about how to implement your other request!)
Click to expand...
Click to collapse
Any news on the output variable? I have high hopes since you mentioned you already see the output in the logs...
Thanks a lot for this plugin! It makes an unrooted phone much easier to control!
How to run root commands on an unrooted device with this plugin
I just wanted to share how I use this plugin, just to give others an example of what this nice plugin is capable of.
Recently, I bought a new device and for now, I have no intention of rooting it. Coming from a rooted OnePlus One, this means some of my Tasker profiles do not work as expected anymore and I have to find workarounds.
On LineageOS (and CyanogenMod before that), we have the option to display left/right cursor arrows in the navigation bar when typing text. I always loved this feature, since placing the cursor in the right position by tapping will always be a hit&miss game. Since my new device (S7 Edge) has no onscreen navigation bar, I was searching for a replacement solution to move the cursor. I came up with the idea that it would be quite handy to use the volume buttons for this. So, the idea was the following:
IF the keyboard is shown THEN use the volume keys to move the cursor (and suppress any volume changes, if possible).
It took me a while to figure out how to determine whether the keyboard is out (solution: install another keyboard and intercept the "change input method" notification as a trigger). Suppressing the volume keys' usual behaviour was easy (AutoInput -> Key Suppress) but the final step turned out to be quite difficult: How to move the cursor?
After doing some extensive research, I always came to the same point: "not possible without root". Damn.
But then, this plugin came in. The keyword "remote" in its name might suggest that you can use this plugin only to act from one device to another, but that's not true. Actually, you can use this plugin to run adb commands on the same device.
What does that mean? It means that you can run an adb shell command like "adb shell input keyevent xy" on your phone WITHOUT ROOT. In my case, I can run "input keyevent 21" and "input keyevent 22" to move the cursor. So, how can we do that?
Prerequisites:
Connect your device via ADB to a PC (google it if you don't know how) and run the command "adb tcpip 5555". That's it, you can disconnect your device now.
Then in Tasker, create an action with this plugin and type in the following:
IP Address: localhost
Port: 5555
ADB Shell Command: input keyevent POWER
Hit the play button to test this action. If you've done everything right, your screen will turn off.
Congrats, you just executed a command on an unrooted device which usually requires root privileges!
Important:
The only downside is, the tcpip setting does not survive a reboot, so you have to set the port 5555 again via PC after rebooting the device.
I hope I explained the important part well enough. If that's not the case, don't hesitate to quote me and I'll answer here.
digitalpig82 said:
Any news on the output variable? I have high hopes since you mentioned you already see the output in the logs...
Thanks a lot for this plugin! It makes an unrooted phone much easier to control!
Click to expand...
Click to collapse
I'm sorry for my absence, really busy with school etc. (honestly, I also completely forgot, I hope you can forgive me). I'll try to look into it soon (this week or the next) and see how far I get. I really like that you like my plugin! I just found out myself last week that I can let unrooted phones send shell commands to themselves using my plugin, so I'm glad to see you found it out as well! (I used it for snapchat to simulate volume key presses, which is also possible without root indeed: https://www.reddit.com/r/tasker/comments/699sav/project_share_handsfree_snapchat_picture_and/ It also works for other camera apps that require you to hold the button to film, like whatsapp etc)
Edit: I hope it pleases you to hear that today I started working on it again. I already have the responses bundled in a list in Java, now I just need to parse them to Tasker
loogielv said:
I doont understand. I can type the code, but i do have to remove the "adb sell" part of the code but it's good to go… is that not what this plugin does?
Click to expand...
Click to collapse
Yes, you have to remove the "adb shell" part since all my plugin does is access the adb shell part. This means commands like adb pull etc won't work, that requires a different type of connection, that for now I can't achieve with Tasker. But running any remote shell command should be fine (like how you would run it if you were directly running the commands from a terminal on your phone)
digitalpig82 said:
I just wanted to share how I use this plugin, just to give others an example of what this nice plugin is capable of.
Recently, I bought a new device and for now, I have no intention of rooting it. Coming from a rooted OnePlus One, this means some of my Tasker profiles do not work as expected anymore and I have to find workarounds.
On LineageOS (and CyanogenMod before that), we have the option to display left/right cursor arrows in the navigation bar when typing text. I always loved this feature, since placing the cursor in the right position by tapping will always be a hit&miss game. Since my new device (S7 Edge) has no onscreen navigation bar, I was searching for a replacement solution to move the cursor. I came up with the idea that it would be quite handy to use the volume buttons for this. So, the idea was the following:
IF the keyboard is shown THEN use the volume keys to move the cursor (and suppress any volume changes, if possible).
It took me a while to figure out how to determine whether the keyboard is out (solution: install another keyboard and intercept the "change input method" notification as a trigger). Suppressing the volume keys' usual behaviour was easy (AutoInput -> Key Suppress) but the final step turned out to be quite difficult: How to move the cursor?
After doing some extensive research, I always came to the same point: "not possible without root". Damn.
But then, this plugin came in. The keyword "remote" in its name might suggest that you can use this plugin only to act from one device to another, but that's not true. Actually, you can use this plugin to run adb commands on the same device.
What does that mean? It means that you can run an adb shell command like "adb shell input keyevent xy" on your phone WITHOUT ROOT. In my case, I can run "input keyevent 21" and "input keyevent 22" to move the cursor. So, how can we do that?
Prerequisites:
Connect your device via ADB to a PC (google it if you don't know how) and run the command "adb tcpip 5555". That's it, you can disconnect your device now.
Then in Tasker, create an action with this plugin and type in the following:
IP Address: localhost
Port: 5555
ADB Shell Command: input keyevent POWER
Hit the play button to test this action. If you've done everything right, your screen will turn off.
Congrats, you just executed a command on an unrooted device which usually requires root privileges!
Important:
The only downside is, the tcpip setting does not survive a reboot, so you have to set the port 5555 again via PC after rebooting the device.
I hope I explained the important part well enough. If that's not the case, don't hesitate to quote me and I'll answer here.
Click to expand...
Click to collapse
So...is it possible to create a version of the plugin that runs locally and doesn't disappear on a reboot?
kenkiller said:
So...is it possible to create a version of the plugin that runs locally and doesn't disappear on a reboot?
Click to expand...
Click to collapse
I would like to be able to create such a think but I don't think Google would allow it since it's a big security flaw to have adb opened to the world at all time without notifying the user. Some devices however have a debug over wifi function hidden in the developer options (like the nvidia shield android tv), there you can just enable it and it will probably survive a reboot.
However what I would advise to do if this option is not available, is to create a .bat file on your desktop containing "adb tcpip 5555". That way after a reboot you can just plug in your phone, click the bat file and be done!
Humpie said:
I would like to be able to create such a think but I don't think Google would allow it since it's a big security flaw to have adb opened to the world at all time without notifying the user. Some devices however have a debug over wifi function hidden in the developer options (like the nvidia shield android tv), there you can just enable it and it will probably survive a reboot.
However what I would advise to do if this option is not available, is to create a .bat file on your desktop containing "adb tcpip 5555". That way after a reboot you can just plug in your phone, click the bat file and be done!
Click to expand...
Click to collapse
Hmm....But there's this custom nav bar app where it allows users to grant it adb shell permissions, and the permission survives over reboots. Auto tools and Securetask relies on the same process as well.
I guess what we're asking for is something that's not as encompassing as your plugin. Me, I just want to execute the power command without root in a way that respects smart lock, which is possible now with your app but doesn't survive a reboot, or with the custom nav bar app, which survives a reboot, but restricts me to using it in a tiny button on the nav bar, as the dev doesn't seem interested in exposing the commands to external usage.
---------- Post added at 07:30 AM ---------- Previous post was at 07:28 AM ----------
We discussed it in this part here....
https://forum.xda-developers.com/an...avigation-bar-customize-t3590967/post72212488
kenkiller said:
Hmm....But there's this custom nav bar app where it allows users to grant it adb shell permissions, and the permission survives over reboots. Auto tools and Securetask relies on the same process as well.
I guess what we're asking for is something that's not as encompassing as your plugin. Me, I just want to execute the power command without root in a way that respects smart lock, which is possible now with your app but doesn't survive a reboot, or with the custom nav bar app, which survives a reboot, but restricts me to using it in a tiny button on the nav bar, as the dev doesn't seem interested in exposing the commands to external usage.
---------- Post added at 07:30 AM ---------- Previous post was at 07:28 AM ----------
We discussed it in this part here....
https://forum.xda-developers.com/an...avigation-bar-customize-t3590967/post72212488
Click to expand...
Click to collapse
It seems this app uses specific android permissions to be able to send events etc. However my plugin has no direct access to the android system (only by using the adb bridge), so granting my plugin these permissions won't help. What however would help is if I could find a way to enable adb over wifi using only some permissions... I have no clue whether this is possible though as the app would have to call service.adb.tcp.port 5555 for itself and that needs root or an adb connection (so it still requires a laptop XD). I'm still trying though.
Humpie said:
It seems this app uses specific android permissions to be able to send events etc. However my plugin has no direct access to the android system (only by using the adb bridge), so granting my plugin these permissions won't help. What however would help is if I could find a way to enable adb over wifi using only some permissions... I have no clue whether this is possible though as the app would have to call service.adb.tcp.port 5555 for itself and that needs root or an adb connection (so it still requires a laptop XD). I'm still trying though.
Click to expand...
Click to collapse
No worries. It's just that it's so close yet so far, heheh.... I guess I'll have to reboot only when home.
kenkiller said:
No worries. It's just that it's so close yet so far, heheh.... I guess I'll have to reboot only when home.
Click to expand...
Click to collapse
I found out it is in fact possible to have wireless adb survive a reboot! However it requires a build.prop edit.
in \system\build.prop "service.adb.tcp.port=5555" needs to be added at the end of the file and then after a reboot adb over wifi will still be enabled (at least it was in my case).
The downside is that this modification can't be done via adb without root unless you have a custom recovery like TWRP and run adb while having that opened and /System/ mounted.
I'm trying to create a zip that modifies the build.prop how it should be modified, but I don't think it's possible to run it through a non-custom recovery...
Edit: I added my .bat file for modifying the build.prop adding that line. It uses an adb connection that requires more rights than what android allows when booted, but should probably work if you are able to access adb from recovery and you are of course booted in recovery mode (using recoveries like TWRP or even some stock manufacturer ones).
Update 4.3 is live!
As requested you can now access the output from the console directly in Tasker.
I tried to order everything neatly in a list, with each line in the console being an item in the list, but this does mean that the initial "device\sdcard $" et cetera get added as an item as well.
But since I didn't want to cut off anything important I just kept it that way. You can just modify the list in any way you want (AutoTools has some handy Array handling tools built in).
I also added some hints in the main screen just for fun.
If you run into any strange behaviour, bugs or have tips, please tell me!
digitalpig82 said:
Any news on the output variable? I have high hopes since you mentioned you already see the output in the logs...
Thanks a lot for this plugin! It makes an unrooted phone much easier to control!
Click to expand...
Click to collapse
Enjoy
Since most people are using my Plugin locally instead of remotely, I'm thinking of renaming it to just 'ADB Shell [Tasker]'. It would make it simpler when googling it. What do you think?
Hi,
I'm just starting to use Tasker, was wondering if it is possible to query a list of approved apps and uninstall everything else once a day. I am rooted.
Thanks
Ok, so I tinkered around and ended up putting together some task as follows:
I have a approved list (BaselineApps.txt)
I run the following command via Termux Task plugin.
pm list packages >/storage/emulated/0/Apps.txt
diff --unchanged-line-format= --old-line-format= --new-line-format='%L' /storage/emulated/0/BaselineApps.txt /storage/emulated/0/Apps.txt | sed 's/^[^:]*://' >/storage/emulated/0/NewApps.txt
Read file NewApps.txt to variable %Apps
ArraySet %Apps value %Apps
For each %eachapp in %Apps()
Run Shell pm uninstall %eachapp
End for
For the most part it works, except it errors out sometimes. Can someone please help me?
Thanks
It would be helpful for you to use the export "Description to Clipboard" feature within tasker. Then pasting that into a txt file and attaching it, or paying to pastebin.com then giving a link here. You could paste it into a post but the forum tends to convert things like "n" to emojis affecting readability.
If it's error-ing out, being specific about the error and when it happens would allow be helpful.
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
Attached are the files.
The file named DiffApps.txt is the code that is run in termux. The other file is an export of the task in Tasker.
I'm not sure when it errors, I definitely errors when no new apps installed, put I think it also errors when there is only 1 app. I will need to test mpre to see what causes the error.
Thanks
Inspired by the recent post on the headlines describing how to enable Android Messages For Web by fiddling with some settings, I took and consolidated what I learned there, plus some other testing, into a handy-dandy Magisk Module that *should* work to enable MFW.
*HOWEVER*, I'm doing something wrong, and need a bit of help.
Repo is here:
https://github.com/d8ahazard/Magisk_Messages_For_Web
Basically, I'm just copying the sqlite binary to system, and then firing the commands to update some bools in a preference DB, then force-closing the messaging app so they take effect.
But for some reason, the script doesn't appear to be running. I'm trying to fire it in the services section. I can see that the bit where I'm setting permissions on sqlite3 is working, but I don't know why the sql commands aren't being executed.
Is there some way to output directly to the Magisk log from a module/script? I think if I can see what's happening there, I'd be set.
If I execute the service script manually in shell, it works:
Code:
marlin:/magisk/AMW # ./service.sh
Enabling Android Messages for Web (Hopefully)
Executing command '"UPDATE Flags SET boolVal=1 WHERE packageName LIKE '%messaging%' AND name LIKE '%PhenotypeOverrideRollout%'"'
Command status is 0
Executing command 'UPDATE Flags SET boolVal=1 WHERE packageName LIKE '%messaging%' AND name LIKE '%bugle_phenotype__enable_multi_device%';'
Command status is 0
Executing command 'UPDATE Flags SET boolVal=1 WHERE packageName LIKE '%com.google.android.apps.messaging%' AND name LIKE '%MultiQueueRollout__launched__%';'
Command status is 0
Executing command 'UPDATE Flags SET boolVal=1 WHERE packageName LIKE '%com.google.android.apps.messaging%' AND name LIKE '%MultiDeviceRollout__launched__%';'
Command status is 0
Records updated successfully!
Restarting messaging app
I know I'm close...I just don't know what's missing!
Interested by the purpose.
It would be great if you had material redesign :
https://www.xda-developers.com/android-messages-enable-material-redesign/
... When it will work !
julienbdx said:
Interested by the purpose.
It would be great if you had material redesign :
https://www.xda-developers.com/android-messages-enable-material-redesign/
... When it will work !
Click to expand...
Click to collapse
Yeah, that is literally just adding one more line to my script, and would more than likely make the material redesign permanent.
At least, modifying the settings needed for MFW in db versus the phenotype.xml preferent makes MFW permanent. I'd assume the issue described in the theme thread is the exact same thing.
All I need is for someone to explain to me why the damned services.sh script isn't executing. I've even tried putting the commands in post-fs script instead...same thing. I add a line at the very end to 'touch /sdcard/hasMFW' so I know the script ran, but no 'hasMFW' file every shows up in /sdcard.
Someone...anybody...help?
@topjohnwu
julienbdx said:
Interested by the purpose.
It would be great if you had material redesign :
https://www.xda-developers.com/android-messages-enable-material-redesign/
... When it will work !
Click to expand...
Click to collapse
There, I've pushed to git a version that has the commands that *should* enable material design as well.
Also, tried moving to post-fs.sh, still nothing works...
https://github.com/d8ahazard/Magisk_Messages_For_Web/commit/10319c338943d8b77b8c8523f31cc276bc4e5d23
Just FYI,
Modifying the flags table in PhenoType.db under GMS isn't permanent either (certainly better than a Shared_Prefs edit). It gets reset still. We're still trying to understand what causes it to reset.
MishaalRahman said:
Just FYI,
Modifying the flags table in PhenoType.db under GMS isn't permanent either (certainly better than a Shared_Prefs edit). It gets reset still. We're still trying to understand what causes it to reset.
Click to expand...
Click to collapse
That's good to know.
Ideally, if this would fire properly as a service, functionality would then be restored on reboot.
However, from what I'm seeing in my tests on my Pixel XL, with the values set the way I've done - I've not seen any breakage in functionality - even over numerous reboots.
digitalhigh said:
That's good to know.
Ideally, if this would fire properly as a service, functionality would then be restored on reboot.
However, from what I'm seeing in my tests on my Pixel XL, with the values set the way I've done - I've not seen any breakage in functionality - even over numerous reboots.
Click to expand...
Click to collapse
Yes, we've tested it too. It'll survive multiple reboots and FCs but eventually it reverts. We've narrowed it down to a service in GMS that checks every 24 hours.
MishaalRahman said:
Yes, we've tested it too. It'll survive multiple reboots and FCs but eventually it reverts. We've narrowed it down to a service in GMS that checks every 24 hours.
Click to expand...
Click to collapse
Interesting. What's the service name called? I've been poking around in the APK itself...
What I'm noticing is that my wife and a friend of mine both have Pixel 2 devices, and they "just have" the feature...which isn't all that surprising.
So, I'm wondering if the service is checking device props and enabling the feature that way. If so, then Magisk would again be an ideal candidate for fixing that issue.
LMK the service name, I'm no stranger to reversing smali.