Please, propose a task which does:
- unfreeze set of apps and
- switch ON location (or other) service.
And also:
- freeze apps,
- switch OFF location etc service.
It's needed for phone power efficiency, Google services switched on only when an app needing it is launched (and vice versa).
HELIUM, LOCKED bootloader, [ROM][UNOFFICIAL][7.1.2][HYDROGEN/HELIUM]LineageOS 14.1 r.06-24-2017 by*nijel8
Wait, how do you have a custom ROM on a device with a locked bootloader?
I use the following to freeze a list of apps:
create a run shell command, with root:
cat "/storage/emulated/0/disable-apps.txt" | while read d; do tmp=$(echo $d | awk {'print $1'}); adb shell "su -c 'pm disable $tmp'"; done
the text file just includes apps in full name, such as net.dinglisch.android.taskern,1 name per line
for location, run this shell command with root:
settings put secure location_providers_allowed +gps,network
@alienyd thanx a lot, it looks like the key engine are Linux shell commands for Android. And how do you know of them, is there any "man" for Android shell commands (like: settings put secure location_providers_allowed +gps,network) to look through oneself?
Vagelis1608 said:
Wait, how do you have a custom ROM on a device with a locked bootloader?
Click to expand...
Click to collapse
Yes, it is possible in this phone model: Xiaomi MiMax (Qualcomm Snapdragon chipset)
HELIUM, LOCKED bootloader, [ROM][UNOFFICIAL][7.1.2][HYDROGEN/HELIUM]LineageOS 14.1 r.06-24-2017 by*nijel8
hmm somehow my reply wasn't posted...
anyways, just search for useful tasker shell commands, I saw some threads in here about that. You can also list out all system variables and their values, which is imo priceless for automating tasks!
Yes, but found many examples from most are just typical Linux system commands, like:
Code:
mount -o remount,rw /system
mount -o remount,ro /system
mv /original/path /new/path
cp /original/path /new/path
etc.
And where are purely Android commands list, like:
Code:
pm disable
settings put secure location_providers_allowed +gps,network
?
And they are Android commands, not Tasker's, right?
HELIUM, LOCKED bootloader, [ROM][UNOFFICIAL][7.1.2][HYDROGEN/HELIUM]LineageOS 14.1 r.07-08-2017 by*nijel8
ioy said:
Yes, but found many examples from most are just typical Linux system commands, like:
etc.
And where are purely Android commands, like:
?
And they are Android commands, not Tasker's, right?
HELIUM, LOCKED bootloader, [ROM][UNOFFICIAL][7.1.2][HYDROGEN/HELIUM]LineageOS 14.1 r.07-08-2017 by*nijel8
Click to expand...
Click to collapse
They are Linux commands, but since android is based on Linux it has them.
Tasker can run them without an issue using the Run Shell action (some commands require you to tick the use root box).
Yes, but these commands could be run also from e.g. terminal emulator or scripts without Tasker installed at all, right? In this meaning questioned: if they are Tasker independent and belong to Android itself?
And please, do you know commands to set particular screen orientation: portrait or landscape?
HELIUM, LOCKED bootloader, [ROM][UNOFFICIAL][7.1.2][HYDROGEN/HELIUM]LineageOS 14.1 r.07-08-2017 by*nijel8
ioy said:
Yes, but these commands could be run also from e.g. terminal emulator or scripts without Tasker installed at all, right? In this meaning questioned: if they are Tasker independent and belong to Android itself?
And please, do you know commands to set particular screen orientation: portrait or landscape?
Click to expand...
Click to collapse
Yes, the "commands" you listed are within the OS of android, not integral to Tasker. The example mount command is basic to any Linux kernel. The settings "commands" are really a list of configuration settings that the OS refers to and are android (and device) specific. The are 3 groups of configuration settings: system, global and secure. You can see what your device has by opening a terminal and entering:
settings list system > /sdcard/system-values.txt
That command will list all of the entries in the system configuration and their current values. The output will be put into a file named system-values.txt on the root of your sdcard.
For example, whether the screen is permitted to rotate when the accelerometer senses device rotation is controlled by the value in:
system settings > value user_rotation
For an overview of these configuration settings, please see Best run shell commands in Tasker
Using the "secure" configuration values is the way to replace the defunct "secure settings" plugin using tasker's built in scripting ability.
As far as commands to set screen orientation, IMHO, it's just easier to use Rotation Locker. It integrates with tasker.
ktmom said:
settings list system > /sdcard/system-values.txt
That command will list all of the entries in the system configuration and their current values.
Click to expand...
Click to collapse
Is it possible controlling the whole phone with just these settings variables, i.e. will just commands
Code:
settings get secure/global/system name_of_the_setting
settings put secure/global/system name_of_the_setting 0 or 1
suffice?
ktmom said:
For an overview of these configuration settings, please see Best run shell commands in Tasker
Click to expand...
Click to collapse
I've already read it but thank you very much! (And there're still several doubts)
ktmom said:
As far as commands to set screen orientation, IMHO, it's just easier to use Rotation Locker. It integrates with tasker.
Click to expand...
Click to collapse
Easier, why? Plain text commands are elegant and minimalistic, if Tasker can fire them it is nice to avoid installation of any further third party application. And the whole my question was about it, for any particular task in Tasker you can always find some application which could perform it (without Tasker). And the rationale is to replace them all with one Tasker, agree?
Please, answer the question: which text console command can switch screen orientation: Portrait or Landscape (can't see relevant variable)
ioy said:
Is it possible controlling the whole phone with just these settings variables, i.e. will just commands
Code:
settings get secure/global/system name_of_the_setting
settings put secure/global/system name_of_the_setting 0 or 1
suffice?
Click to expand...
Click to collapse
No, it's a big part, but, for example, forcing an app that is programmed to not rotate ever, into rotating is more than defining settings.
Easier, why? Plain text commands are elegant and minimalistic, if Tasker can fire them it is nice to avoid installation of any further third party application. And the whole my question was about it, for any particular task in Tasker you can always find some application which could perform it (without Tasker). And the rationale is to replace them all with one Tasker, agree?
Click to expand...
Click to collapse
No, not agreed. The point of tasker is to bring the ability to script custom actions to the programming knowledgeable community. Tasker enables people familiar with the concept of if/then/else or variable arrays, ect to derive results based on triggers WITHOUT having to be experts in the deepest layers of the android system.
Plugins bring to the user access to actions not included in tasker. If every possible combination of options was built into tasker, the app would be enormous. It's also unnecessary for the average user who is looking to pop up a particular keyboard automatically when an specific app is launched. Or to turn gps on/off only when using navigating apps....ect.
Please, answer the question: which text console command can switch screen orientation: Portrait or Landscape (can't see relevant variable)
Click to expand...
Click to collapse
The user rotation variable I used in an example earlier. Which is the same as using tasker's built in Display AutoRotate. Other than "because I can", I can't imagine why using the built in action would not be preferred.
The trick is there more that goes into whether or not an app will be forced to rotate. The individual app's display layer does things like looks at the screen dpi and the app's layout and I don't know what and determines how and when to rotate if the user authorizes the screen to rotate in the first place. This can all be over ridden if you are sufficiently knowledgeable in the programming of android apps. But then, why the heck would anyone introduce the overhead of a framework like tasker.
I encourage you to look for android app development tutorials to enhance your understanding in the depth you are looking for. But also understand that you are pushing the use case of the tasker app.
Automagic offers such an option.
{
"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"
}
It's disappointing Tasker needs some plugin to do this simple thing. If I need plugin then why tasker, there are many other applications controlling screen orientation!
ivy.lally said:
Automagic offers such an option.
It's disappointing Tasker needs some plugin to do this simple thing. If I need plugin then why tasker, there are many other applications controlling screen orientation!
Click to expand...
Click to collapse
If you want to use a different app for everything, be my guest.
Tasker has a built-in action for autorotation.
An this only switches AutoRotation ON/OFF, what is actually needed is screen orientation settings: to switch AutoRotation OFF and then to set fixed screen orientation of choice.
HELIUM, LOCKED bootloader, [ROM][UNOFFICIAL][7.1.2][HYDROGEN/HELIUM]LineageOS 14.1
alienyd said:
I use the following to freeze a list of apps:
create a run shell command, with root:
cat "/storage/emulated/0/disable-apps.txt" | while read d; do tmp=$(echo $d | awk {'print $1'}); adb shell "su -c 'pm disable $tmp'"; done
the text file just includes apps in full name, such as net.dinglisch.android.taskern,1 name per line
for location, run this shell command with root:
settings put secure location_providers_allowed +gps,network
Click to expand...
Click to collapse
Hello!
I know this is a while ago that You posted this, I hope anyway that You answers me!? I want to freeze a App (Sony-Smart-Connect) automatically with Tasker, and in searching for a how to, I have seen Your post here! Can You Please say me, where exactly in the shell command I must put the full App-Name, and where can I find the full App-Package-Name of a installed App!? My Device is rooted, and I have a root-file-explorer with access to all folders! Please Help me!:highfive:
Thanks in advance!
RoseL.
roselanguste said:
Hello!
I know this is a while ago that You posted this, I hope anyway that You answers me!? I want to freeze a App (Sony-Smart-Connect) automatically with Tasker, and in searching for a how to, I have seen Your post here! Can You Please say me, where exactly in the shell command I must put the full App-Name, and where can I find the full App-Package-Name of a installed App!? My Device is rooted, and I have a root-file-explorer with access to all folders! Please Help me!:highfive:
Thanks in advance!
RoseL.
Click to expand...
Click to collapse
I think your app package name is: com.sonyericsson.extras.liveware
I don't use that app but going to apkmirror.com and searching for it gave me the package. Depending on version, settings -> apps and finding the app might have the package name listed. It no longer does on my oreo ROM.
The operative explanation in the post you quoted is:
the text file just includes apps in full name, such as net.dinglisch.android.taskern,1 name per line
Click to expand...
Click to collapse
The text file is what is called in the run shell command:
run shell command, with root:
cat "/storage/emulated/0/disable-apps.txt" | while read d; do tmp=$(echo $d | awk {'print $1'}); adb shell "su -c 'pm disable $tmp'"; done
Click to expand...
Click to collapse
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
ktmom said:
I think your app package name is: com.sonyericsson.extras.liveware
I don't use that app but going to apkmirror.com and searching for it gave me the package. Depending on version, settings -> apps and finding the app might have the package name listed. It no longer does on my oreo ROM.
The operative explanation in the post you quoted is:
The text file is what is called in the run shell command:
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
Click to expand...
Click to collapse
Thanks! I have found a other way! - I have downloaded the Secure-Settings-Tasker-Plugin, and it has the ability to Freeze, Kill Apps, and it worked in the moment! But I learn a new thing from Your answer!
Thanks!
fyi the core command is
shell su -c pm disable (app-full-name)
You should be able to manually freeze apps with it. My post was meant for batch freezing with a file list. As this is a native shell command, you don't need any extra plugin for the job.
alienyd said:
I use the following to freeze a list of apps:
create a run shell command, with root:
cat "/storage/emulated/0/disable-apps.txt" | while read d; do tmp=$(echo $d | awk {'print $1'}); adb shell "su -c 'pm disable $tmp'"; done
the text file just includes apps in full name, such as net.dinglisch.android.taskern,1 name per line
for location, run this shell command with root:
settings put secure location_providers_allowed +gps,network
Click to expand...
Click to collapse
For some reason this doesn't seem to work for me.
I have pasted the error log below:
15.45.19/E Run Shell: ->
15.45.19/E Run Shell: ->
15.45.19/E Run Shell: ->
15.45.19/Shell runBackground cat "/storage/emulated/0/disable-apps.txt" | while read d; do tmp=$(echo $d | awk {'print $1'}); adb shell "su -c 'pm disable $tmp'"; done root: true timeout: -1
15.45.19/Shell start process-thread ID 803
15.45.19/E add wait type Shell1 time 2147483647
15.45.19/E add wait type Shell1 done
15.45.19/E add wait task
15.45.21/E Error: 1
Edit: I tried the command in Termux and the following error came up:No devices/emulators found.
Related
Hey guys! This guide is surely gonna help a lot of people who build/compile ROMs, to understand the hidden meaning behind most of the common commands associated with the building stuff.
{
"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"
}
SO STARTING WITH THE COMMANDS GENERALLY USED FOR BUILDING DEVELOPMENT ENVIRONMENT:
We type the command sudo a lot of times and it asks for our desktop's password.
What is 'sudo'?
sudo is a Linux command used to execute programs as the root, or "super user." sudo is a shortening of "substitute user do."
One uses sudo when they need to run a command or program as root, but do not wish to log out or switch their entire shell to root privileges (like they could do with the su command).
Click to expand...
Click to collapse
What is 'mkdir'?
The 'mkdir' (make directory) command in the Linux or Ubuntu operating systems and in the PHP scripting language is used to make a new directory.
eg: mkdir -p ~/bin
Click to expand...
Click to collapse
What is 'cd'?
Besides listing the command "change directory" command "cd" is used.
The cd command, also known as chdir (change directory), is a command-line OS shell command used to change the current working directory in operating systems such as Ubuntu or Linux.
eg: cd ******(folder name)
Click to expand...
Click to collapse
What does './configure' do?
Typically the configure script when run will check some details about the machine on which the software is going to be installed. This script checks for lots of dependencies on your system. For the particular software to work properly, it may be requiring a lot of things to be existing on your machine already. If any of the major requirements are missing on your system, the configure script would exit and you cannot proceed with the installation, until you get those required things.
Click to expand...
Click to collapse
What is 'make'?
the make command accepts targets as command line arguments. These targets are usually specified in a file named 'Makefile', which also contains the associated action corresponding to the targets.
When the make command is executed for the very first time, it scans the Makefile to find the target (supplied to it) and then reads its dependencies. If these dependencies are targets themselves, it scans the Makefile for these targets and builds their dependencies (if any), and then builds them. Once the main dependencies are build, it then builds the main target (that was passed to the make command).
Click to expand...
Click to collapse
What does 'sudo apt-get' do?
Now there are a lot of things that are done with the command 'sudo apt-get'. Some common ones are:
'apt-get update' downloads the package lists from the repositories and "updates" them to get information on the newest versions of packages and their dependencies. It will do this for all repositories and PPAs.
'apt-get upgrade' will fetch new versions of packages existing on the machine if APT knows about these new versions by way of apt-get update.
'apt-get install': This option is followed by one or more packages desired for installation. Each package is a package name, not a fully qualified filename.
Click to expand...
Click to collapse
MOVING ON TO THE COMMANDS USED FOR COMPILING PROCESS:
What is 'curl'?
'curl' is a client to get documents/files from or send documents to a server, using any of the supported protocols (HTTP, HTTPS, FTP, GOPHER, DICT, TELNET, LDAP or FILE). The command is designed to work without user interaction or any kind of interactivity.
eg curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
Click to expand...
Click to collapse
Why do we use 'chmod' command?
In Linux or Ubuntu, 'chmod' changes the permissions for a file; permissions should include a letter designating who gets permissions ('u' for the user, 'g' for the group, 'o' for others, or 'a' for all) followed by a '+' or '-' (to give or take away the permission) followed by the kind of permission ('r' for read access, 'w' for write access, 'x' for execute if the file is a program or script).
eg: chmod a+x ~/bin/repo
Click to expand...
Click to collapse
Why do we use 'export' command?
When you use export, you are adding the variable to the environment variables list of the shell in which the export command was called and all the environment variables of a shell are passed to the child processes.
eg: export PATH=${PATH}:~/bin
Click to expand...
Click to collapse
What is 'gedit'?
'gedit' is a light-weight text editor. Gedit has all the basic features you come to expect from a simple text editor, but Gedit has a native graphic user interface (GUI). Gedit also has command line arguments available to users to quickly and easily view and edit files from a terminal. Overall, Gedit is an easy to use text editor with utilizing the powerful capabilities of the desktop.
Click to expand...
Click to collapse
Why is 'repo init -u url -b branch' used?
This would initialize a new local source repository. This will create a new place to hold your local copy of the source tree. “url” should point to a Manifest repository that describes the whole sources. It is a special project with a file (default.xml) that lists all the projects that Android is made of. In the Manifest file, each projects has attributes about: where to place it in the tree, where to download it from (git server), revision that will be used (usually a branch name, tag or commit sha-id).
eg:repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
Click to expand...
Click to collapse
What is 'repo sync'?
After the repo initialization, this command downloads all the sources to your local directory. The first time you run this command, it will download the sources. Android sources are huge, for example, CM11 (KitKat) sources are approximately 12GiB. So, be prepared: you’ll need space in your hard drive, and time (possibly several hours)-depending on you ISP.
Click to expand...
Click to collapse
What is 'mka'?
This little gem of a command is basically equivalent to a super-charged version of 'make'. Problem is, make is SLOW in its default configuration. It can take hours longer depending on your hardware.So, mka is like a cheetah. What this means is that ALL of your processor is working, not just one small part of it(which is used with 'make' command).
Click to expand...
Click to collapse
What is 'breakfast'?
In order to explain brunch, we have to explain breakfast first. Breakfast is a function used to configure your build. It keeps track of a list of officially-supported devices to build for, and allows you to choose one. You can do this two ways,
1) breakfast [device name]
or
2) breakfast
Now, the first method is a shortcut to your device. If you don't know your device's name, then you can probably choose the second method which would display all the officially supported devices.
Breakfast then goes on to configure your build environment with the correct variables to create your device-specific rom.
Click to expand...
Click to collapse
Why do we use 'brunch'?
brunch followed by your device's codename is used to tell the system to start building/compiling from the sources.
eg: brunch ****(device codename: eg pico for HTC Explorer)
Click to expand...
Click to collapse
What is 'lunch'?
Lunch is used EXACTLY like breakfast, the only difference being the choices you have to build with it. Using lunch, you can choose non-official or non-standard builds for your device. This includes special debug versions and also allows you to build CyanogenMod for use on the Android Emulator. To build after running lunch, simply issue the command mka.
Click to expand...
Click to collapse
THANK YOU GUYS FOR READING IT. HOPE IT COMES HANDY TO YOU!
XDA-Portal: http://www.xda-developers.com/android/basic-linux-commands/
Source: http://www.google.com/
Nice overview for people new to Linux, but I'm afraid I'm going to have to disagree on your explanation of the sudo command. Contrary to your explanation, the name of the sudo command is actually derived from the su command (sudo homepage), which means: ”substitute user”. When taking this into account the meaning of sudo becomes: ”substitute user do”.
The reason I'm saying this, is because sudo, just like su, can be used to execute commands as/switch to any user present on the system.
Do note that apt-get and dpkg are distro-specific, not Linux-specific. If you're using Ubuntu, Debian or elementary, apt-get is there, but on Fedora you'll find yum, on Arch you've got pacman, on Gentoo you end up with emerge and so on.
is this an example of the real guide?
i mean there are so many more thing you need to explain
1.rm
2.ls
3.pwd
4.cp/mv
5.lunch
6.breakfast(i mean you mention brunch ,without breakfast?)
7.mka
more i can't remember
and all of this i have used while building.
Imposible to read on mobile
You know this is very hard to read on a phone? I mean, those boxes are for code, no? Any way, good post.
Erackron said:
Nice overview for people new to Linux, but I'm afraid I'm going to have to disagree on your explanation of the sudo command. Contrary to your explanation, the name of the sudo command is actually derived from the su command, which means: ”substitute user”. When taking this into account the meaning of sudo becomes: ”substitute user do”.
The reason I'm saying this, is because sudo, just like su, can be used to execute commands as/switch to any user present on the system.
Click to expand...
Click to collapse
This was a great overview, it did teach me a few things. Just one minor thing, in my Linux class we were taught that su meant 'switch user' and the other meanings were actually wrong. Then sudo would become: 'switch user do'. Which meaning is it then?
ruledrbrt1 said:
This was a great overview, it did teach me a few things. Just one minor thing, in my Linux class we were taught that su meant 'switch user' and the other meanings were actually wrong. Then sudo would become: 'switch user do'. Which meaning is it then?
Click to expand...
Click to collapse
I'm pretty sure sudo is something else. Ex: You can do sudo su - to switch to root.
You dont have automatikli sudo rights. The configuration file for sudo is*/etc/sudoers wich u can edit with visudoers.
The distinction between sudo and su is that with sudo, you need to have a user configured in a system wide configuration file (/etc/sudoers) to actually have him use the command and if someone attempts to use it without having permission, a log email will be sent to the email address configured for the root user.
When your account has been configured to allow sudo usage, you can then switch to any user/perform any command as the other user, but you only need to enter your own password when executing a command/switching to another user.
The su command is not really configurable, and only allows you to switch to another user if you enter that user's password.
So while
Code:
sudo -s someuser
and
Code:
su someuser
have the same effect, the sudo version asks for the password of the current user (and fails if the current user has no sudo rights) while the latter asks for the password of someuser.
For more on su and sudo.
cybervibin said:
is this an example of the real guide?
i mean there are so many more thing you need to explain
1.rm
2.ls
3.pwd
4.cp/mv
5.lunch
6.breakfast(i mean you mention brunch ,without breakfast?)
7.mka
more i can't remember
and all of this i have used while building.
Click to expand...
Click to collapse
To be honest if people don't understand what 1 through 4 mean in your list, then most likely they shouldn't be trying to develop anything IMHO
mjwhirly said:
To be honest if people don't understand what 1 through 4 mean in your list, then most likely they shouldn't be trying to develop anything IMHO
Click to expand...
Click to collapse
well he included 'cd' and 'mkdir'
so i just mentioned
Erackron said:
Nice overview for people new to Linux, but I'm afraid I'm going to have to disagree on your explanation of the sudo command. Contrary to your explanation, the name of the sudo command is actually derived from the su command (sudo homepage), which means: ”substitute user”. When taking this into account the meaning of sudo becomes: ”substitute user do”.
The reason I'm saying this, is because sudo, just like su, can be used to execute commands as/switch to any user present on the system.
Click to expand...
Click to collapse
Corrected it. Thanks!
cybervibin said:
is this an example of the real guide?
i mean there are so many more thing you need to explain
1.rm
2.ls
3.pwd
4.cp/mv
5.lunch
6.breakfast(i mean you mention brunch ,without breakfast?)
7.mka
more i can't remember
and all of this i have used while building.
Click to expand...
Click to collapse
Well, added the last three. Thanks!
letoloke said:
You know this is very hard to read on a phone? I mean, those boxes are for code, no? Any way, good post.
Click to expand...
Click to collapse
Now, I guess it would be readable on phones as well, since I have changed code to quotes. Hope it works now. Thanks!
Thanks for the knowledge
Easy to digest explanations.
I'd like to link this free course by Linux Foundation - https://www.edx.org/course/linuxfoundationx/linuxfoundationx-lfs101x-2-introduction-5386
I am full time linux user and linux is much much better when it comes to developement/re-engineering stuffs. This free course gives deep introduction to linux and basic info to bash scripting.
Thanks bro, much appreciated work, just started to build ROM from source for i9100 android lollypop named "CodeROM"
this tutorial is really helpful... thanks added... & keep updating the thread whenever new commands arrives.... so people like me can get most out of it
warrior1208 said:
Hey guys! This guide is surely gonna help a lot of people who build/compile ROMs, to understand the hidden meaning behind most of the common commands associated with the building stuff.
SO STARTING WITH THE COMMANDS GENERALLY USED FOR BUILDING DEVELOPMENT ENVIRONMENT:
We type the command sudo a lot of times and it asks for our desktop's password.
What is 'sudo'?
What is 'mkdir'?
What is 'cd'?
What does './configure' do?
What is 'make'?
What does 'sudo apt-get' do?
MOVING ON TO THE COMMANDS USED FOR COMPILING PROCESS:
What is 'curl'?
Why do we use 'chmod' command?
Why do we use 'export' command?
What is 'gedit'?
Why is 'repo init -u url -b branch' used?
What is 'repo sync'?
What is 'mka'?
What is 'breakfast'?
Why do we use 'brunch'?
What is 'lunch'?
THANK YOU GUYS FOR READING IT. HOPE IT COMES HANDY TO YOU!
XDA-Portal: http://www.xda-developers.com/android/basic-linux-commands/
Source: http://www.google.com/
Click to expand...
Click to collapse
How to pause repo sync????
My pc was shut down bcoz electricity gone and i was rezume rwpo sync plz tell me how to reaume repo synce fast
I get this error plz fix
Sent from my Xperia M2 Dual using XDA Free mobile app
manask002 said:
I get this error plz fix
Sent from my Xperia M2 Dual using XDA Free mobile app
Click to expand...
Click to collapse
You need to add yoour sources to the local_maifest.xml or you have to create a room service xml because your device is not supported officially.
Check this helpful guide on how to make a local manifest.
http://forum.xda-developers.com/showthread.php?t=2329228
Hope this helps you.
My device is xperia m2 its officially support aosp xperia
Sent from my Xperia M2 Dual using XDA Free mobile app
Noob on Linux
I want to try to build a rom for my Nexus 5 but want too also better understand Linux eg Ububtu 14.10 and not just copy text given in a buildingmanual so where is the best place to start really understanding Ubuntu?
EDIT 09/23/16
I finally found a permanent solution to how to change fire launcher on the Amazon Fire without root. It works on any version (FireOS 5.3.1) on any tablet variant (7, HD 8, HD 10 etc...).
You can read the detailed tutorial at http://forum.xda-developers.com/ama...-remove-default-launcher-amazon-fire-t3288310 but basically you run one command, must be done after reboot currently via adb shell:
Noval Launcher on Amazon Fire no-root:
Code:
nohup logcat -c; logcat | grep --line-buffered 'flg=0x10200000 cmp=com.amazon.firelauncher/.Launcher' | while read line; do am start com.teslacoilsw.launcher/.NovaLauncher; done &
That's it. Once you paste that into your adb shell you're done; you now have a default launcher programmatically set via ADB.
Optionally, you can install the modded firelauncher.apk so you can finally delete it without root .
(this is optional, you wont have any launcher after doing this! backup your old APK!!)
Code:
adb install -r -d com.amazon.firelauncher.apk
... as you can now see this will -r reinstall and -d downgrade the launcher, causing it to crash and never open.
Thanks for your support guys, I love android!
EDIT:
I have updated with a new method that is much better, the only negative to this new method is when you hit the home button, for a brief moment you see the firelauncher. Performance, speed, and bugs are perfect.
Just paste this code in adb shell, I'm working on setting up nohup to work with it, when you close adb it will stop working.. Going to bed for now though.
Code:
#!/bin/bash
am monitor | while read -r line; do
if [[ $line == *"firelauncher"* ]]
then
am start [B]com.newlauncher.launcher[/B]
fi
done
I'm new to the whole Android scene, and recently I had acquired an Amazon Fire HD 8. The only complaint about this tablet is the lack of Google Play and the horrible firelauncher. There is currently no root options available for the Fire HD modles 8 & 10, so I have spent the time to develop a temporary workaround.
Please take a quick look at the developmental thread I previously created so we can collaborate to make a more efficient version of this:
http://forum.xda-developers.com/hd8...zon-fire-hd-8-10-remove-firelauncher-t3286646
Disclaimer:
If you plan on installing new applications/packages while this script is running you may have a hard time. Installing packages may take 2-10 minutes, or maybe not at all!
If you experience any problems you can undo everything by running the undo script attatched (unix), or by typing "adb shell ps | grep /system/bin/sh", you will see anywhere from 2-10 processes listed. For each type "adb shell kill -9 <pid>", pid would be the process ID, should be the first number you see on each line.
There is a small chance when you press the home button that it will load the regular firelauncher, do not fret, try again and it will go to whichever launcher you previously selected.
Performance may be slightly altered, if it becomes too bad to use try adjusting the script and change the interval at which it loops (set to 20 by default).
This is an alpha experiment, and I am a noob with Android so please bare with me
This is a noobish approach to disabling the firelauncher (com.amazon.firelauncher.apk), please do not judge it, this is also my first time releasing something for Android.
If you are using a unix operating system (like Linux or Mac), I have compiled a script that does the work for you! Windows users will have to wait and do it manually since I am unfamilar with batch (would someone like to help with this?)
Automatic Tool (easy, linux, mac only)
Step One:
Download the two script attachments:
remove_default_launcher.sh - disables amazon's firelauncher
re-endable_firelauncher(undo).sh - reverts the process, if you have any issues
Step Two:
Run the following commands to make the scripts executable:
Code:
chmod +x remove_default_launcher.sh
chmod +x re-endable_firelauncher(undo).sh
Run the tool to remove amazon's nasty launcher!
Code:
./remove_default_launcher.sh
Step Three:
The script should automatically do everything, when it's done, check your Fire. Keep pressing the home button and switching between applications until you get the "Change default launcher" dialogue, make sure you have an alternative launcher installed beforehand or else you won't have a launcher! When it's all working how it should be go to step four!
Step Four:
Simply exit out of your terminal window, do not type anything, just exit ADB. The script will continue running!
This is what a successful window looks like, whenever you have confirmed it is working, close out of the ADB window and end that process.
{
"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"
}
Manually (harder, windows)
Step One:
Open up a new ADB shell window and type
Code:
adb shell
Step Two:
Once you are in the shell window, simply copy and paste this line of code and press return. It is just a simple bash script that loops the command "install -r -d "/system/priv-app/com.amazon.firelauncher/com.amazon.firelauncher.apk"" which will reinstall the firelauncher repeatedly, which temporary uninstalls it.
Code:
#!/system/bin/sh
nohup
while :
do
kill $!
sleep 1 & pm install -r -d "/system/priv-app/com.amazon.firelauncher/com.amazon.firelauncher.apk" & sleep 20; kill $!
kill $!
done &
exit
#press enter now
After pressing enter, you can watch it go to work, or you can close out of the adb window and unplug your device, it will continue to run until you kill the shell processes or reboot the device. Make sure you have an alternative launcher already installed so it can easily be set as default. EDIT: Reboot may not reset it, which is cool but could be annoying. To turn off this wonderful feature open up adb shell and use "ls | grep shell" and kill using "kill <pid>" all releated processes to /bin/shell or whatever. It may take up to a minute to reset.
If you have any issues at all please comment and I will send you a private message with detailed instructions catered to your specific issue!
If you are a dev, take a look at my unix auto-install script, it may help you figure it out yourself as well. I need someone who understands batch to help me write a windows version .
I literally spent about 45 minutes working on this noobish approach, so if you find bugs or want to modify the script, simply post in the comments your version and why you think it is more efficient. If you want to help make a dedicated and more efficient approach to this, check out the development thread here (there are alternative methods here too):
http://forum.xda-developers.com/hd8...zon-fire-hd-8-10-remove-firelauncher-t3286646
This appears to be a very stable system actually, I recommend everyone does this to the Fire HD tablets!
I hope this helps someone, if this helps you please give me a thanks so I know it
Confused as to why you'd post this here after using the correct forum section for the HD8 and 10 already.
Pond-life said:
Confused as to why you'd post this here after using the correct forum section for the HD8 and 10 already.
Click to expand...
Click to collapse
I was not sure whether it was the correct forum actually, it is stable enough to use for all versions of Fire now, so I posted for users who do not want to root their device, but hate the launcher. If you think it is in the wrong place I will remove it promptly. I actually did post this in the wrong spot.. It is in development instead... At least there will not be any flaming here
I have also noticed 6x more downloads in 1/5 of the time this thread has been posted compared to the other.
I have updated with a new method that is much better, the only negative to this new method is when you hit the home button, for a brief moment you see the firelauncher. Performance, speed, and bugs are perfect.
Just paste this code in adb shell, I'm working on setting up nohup to work with it, when you close adb it will stop working.. Going to bed for now though.
Code:
#!/bin/bash
am monitor | while read -r line; do
if [[ $line == *"firelauncher"* ]]
then
am start [B]com.newlauncher.launcher[/B]
fi
done
Good job on this!
glitch3yf0x said:
Good job on this!
Click to expand...
Click to collapse
No problem, hopefully I will find some more time to work on this in the future .
I am glad you like it.
nyln said:
If you are using a unix operating system (like Linux or Mac), I have compiled a script that does the work for you! Windows users will have to wait and do it manually since I am unfamilar with batch (would someone like to help with this?)
Click to expand...
Click to collapse
If you're still in need, I'd be happy to help port it to windows!
as for me,on windows, worked simply:
adb shell
pm hide com.amazon.firelauncher
to enable the fire launcher again,
adb shell
pm unhide com.amazon.firelauncher
This is one of the best thread for Fire OS world! Can't wait for you to perfect this.
P.S: Plz, someone here port it to Windows.
Does it work on Fire 5.3.1 ?
Please message me if you want me to keep working on this. After the root I stopped.
working great. And how to restore in the laucher back?
I am in Win10
update: After reboot, it turns back to original FireOS launcher. Is there a way to make it auto applied?
ttcontributor said:
update: After reboot, it turns back to original FireOS launcher. Is there a way to make it auto applied?
Click to expand...
Click to collapse
I will do some work on it. I am not an android developer, so maybe i will write a python application.
nyln said:
I will do some work on it. I am not an android developer, so maybe i will write a python application.
Click to expand...
Click to collapse
It's great to hear you still have your hands on this
nerakkaren said:
as for me,on windows, worked simply:
adb shell
pm hide com.amazon.firelauncher
to enable the fire launcher again,
adb shell
pm unhide com.amazon.firelauncher
Click to expand...
Click to collapse
If I am not mistaken, this will only bennefit those who have a rooted device. Fire 7 and HD 8 got updated via OTA removing my root. I am now working on a better way right now .
Please PM or Thank me if you're interested in this, it'll come out faster if I know people are waiting
I finally found a permanent solution to how to change fire launcher on the Amazon Fire without root. It works on any version (FireOS 5.3.1) on any tablet variant (7, HD 8, HD 10 etc...).
You can read the detailed tutorial at http://forum.xda-developers.com/ama...-remove-default-launcher-amazon-fire-t3288310 but basically you run one command, must be done after reboot currently via adb shell:
Noval Launcher on Amazon Fire no-root:
Code:
nohup logcat -c; logcat | grep --line-buffered 'flg=0x10200000 cmp=com.amazon.firelauncher/.Launcher' | while read line; do am start com.teslacoilsw.launcher/.NovaLauncher; done &
That's it. Once you paste that into your adb shell you're done; you now have a default launcher programmatically set via ADB.
Optionally, you can install the modded firelauncher.apk so you can finally delete it without root .
Thanks for your support guys, I love android!
Here is a teaser of my application:
[email protected]:/ $ adb install -r -d com.amazon.firelauncher.apk
/system/bin/sh: adb: not found
im getting this error, so i still c the default launcher for a couple of seconds before it goes to nova launcher
ahac85 said:
[email protected]:/ $ adb install -r -d com.amazon.firelauncher.apk
/system/bin/sh: adb: not found
im getting this error, so i still c the default launcher for a couple of seconds before it goes to nova launcher
Click to expand...
Click to collapse
You are already inside adb shell, type exit then type it again silly
Hello guys.
I stumbled across a reddit thread providing some run shell commands to replace secure settings. The fixes on Android 6.0 allowed me to install and grand the root permissions but never actually worked as intended. Secure settings still returns errors when used.
Long story short I built on the list adding ones I used before from my list.
Here is about 30 most common run shell commands. I will update list if i come across some new ones. Also appreciate your input if you happen to use some good ones.
You can access it all here:
http://www.notenoughtech.com/tasker/tasker-run-shell-commands/
Happy tasking. :good:
Boy, where do I start? The list would be endless. Anyway, here are some, not all, that I use.
Root commands
Open power menu: sendevent /dev/input/event0 1 116 108 && sendevent /dev/input/event0 0 0 0
Restart SystemUI: pkill -l TERM -f com.android.systemui
Safe reboot: svc power reboot
Safe reboot to recovery: svc power reboot recovery
Get list of all system/global/secure settings along with their values; using system settings as example: settings list system
Read system/global/secure setting to a variable; using secure setting accessibility_enabled as example: settings get secure accessibility_enabled
Change system/global/secure setting; using secure setting accessibility_enabled as example: settings put secure accessibility_enabled 0
Make /system rewritable: mount -o remount,rw /system
Make /system read-only: mount -o remount,ro /system
Change file permissions, using /system/etc/hosts as example; numbers are 7 for rwx, 6 for rw, 4 for r; first number is for root (system user), second is for group, third is for all users: chmod 644 /system/etc/hosts
Tap at x,y pixels on screen, using 540,1500 as example: input tap 540 1500
Swipe from x1,y1 to x2,y2, using 540,1500 to 540,300 (swipe up) as example: input swipe 540 1500 540 300
Read/change another app's database; can't give examples as this would need a full tutorial: sqlite3 /path/to/.db_file "sqlite3 commands";
non-root command
Open any app from a variable %package_name containing com.paclage.name; this one is javascript, not shell script [note that you don't want to put % before variable in javascript]: loadApp(package_name, '', false);
Extract %file zip file to /sdcard: unzip %file /sdcard/
Move a file: mv /original/path /new/path
Copy a file: cp /original/path /new/path
Read a file to a variable: cat /path/to/file
Write %var to a file: echo %var > /path/to/file
Delete a file: rm /path/to/file
Delete a folder and all its contents: rm -r /path/to/folder
Check whether a process is doing something or not; set the output to a variable, set a wait for some time, and then get the output again, if output has changed then the process is doing something: ps | grep com.package.name
Sukarn said:
Boy, where do I start? The list would be endless. Anyway, here are some, not all, that I use.
Click to expand...
Click to collapse
Thanks I'm updating the page as I type this! - I completely forgot about file operations if I'm honest. Good to have others to contribute!
quintaar said:
Thanks I'm updating the page as I type this! - I completely forgot about file operations if I'm honest. Good to have others to contribute!
Click to expand...
Click to collapse
You need to proofread that page. There are lots of errors in there that will stump newbs
Sukarn said:
You need to proofread that page. There are lots of errors in there that will stump newbs
Click to expand...
Click to collapse
That's what I'm doing now , trying to put them, in some logical order as well, to make it easy to find, and use. I do appreciate the time taken to type this.
Is input keyevent correct for emulating the power button in a shell command? The # on the website didn't work. I found the generic.kl file in my /system/usr folders and the key # for power listed there did now work with that shell command, either. Even with run as root checked.
{
"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"
}
LeftyGR said:
Is input keyevent correct for emulating the power button in a shell command? The # on the website didn't work. I found the generic.kl file in my /system/usr folders and the key # for power listed there did now work with that shell command, either. Even with run as root checked.
Click to expand...
Click to collapse
I believe hardware keys would be device specific, ego could have different codes.
quintaar said:
I believe hardware keys would be device specific, ego could have different codes.
Click to expand...
Click to collapse
I guess my real question is that the correct shell command as it is written? Because with my specific device key code did not do anything.
Are you trying to do this when the phone display is on or off? this only works when screen is on. input keyevent 26 works fine on my device
quintaar said:
Are you trying to do this when the phone display is on or off? this only works when screen is on. input keyevent 26 works fine on my device
Click to expand...
Click to collapse
On... Guess it does not like me.
LeftyGR said:
On... Guess it does not like me.
Click to expand...
Click to collapse
Do you get any error? My most common mistake is spelling the run shell with upper case, as my keyboard automatically corrects it. And if I forget to change it, it returns an error
quintaar said:
Do you get any error? My most common mistake is spelling the run shell with upper case, as my keyboard automatically corrects it. And if I forget to change it, it returns an error
Click to expand...
Click to collapse
Yes. Appears to be a timeout error.
Background Data On/Off? Thanks in advance
Sent from my hlte using XDA-Developers mobile app
LeftyGR said:
Yes. Appears to be a timeout error.
Click to expand...
Click to collapse
I stumbled on this:
http://forum.xda-developers.com/showthread.php?t=2063741
Perhaps will help you more as well
shaharofir said:
Background Data On/Off? Thanks in advance
Sent from my hlte using XDA-Developers mobile app
Click to expand...
Click to collapse
I've not come across the setting, but try to use:
settings list system
settings list global
settings list secureand see what your device will give you in options lists.
I totally forgot about another shell command that I have set up in Tasker: md5sum /path/to/file
I use it to verify the integrity of downloads in an OTA app I made for a custom ROM using only Tasker.
---------- Post added at 10:52 AM ---------- Previous post was at 10:43 AM ----------
quintaar said:
Are you trying to do this when the phone display is on or off? this only works when screen is on. input keyevent 26 works fine on my device
Click to expand...
Click to collapse
On my phone (OnePlus One), "input keyevent 26" just turns the screen off, while 116 does nothing.
LeftyGR said:
I guess my real question is that the correct shell command as it is written? Because with my specific device key code did not do anything.
Click to expand...
Click to collapse
Did you try the command I posted at the top of my post here? It's the second post in this thread.
quintaar said:
I've not come across the setting, but try to use:
settings list system
settings list global
settings list secure
and see what your device will give you in options lists.
Click to expand...
Click to collapse
Thanks. Will give it a try.
Sukarn said:
I totally forgot about another shell command that I have set up in Tasker: md5sum /path/to/file
.
Click to expand...
Click to collapse
I have added this one as well Thanks
shaharofir said:
Thanks. Will give it a try.
Click to expand...
Click to collapse
Looked, nothing there. Any suggestions?
Sent from my hlte using XDA-Developers mobile app
shaharofir said:
Looked, nothing there. Any suggestions?
Sent from my hlte using XDA-Developers mobile app
Click to expand...
Click to collapse
Perhaps maybe more luck with intents? I'm working on the similar list for it
Sent from my Nexus 6P using Tapatalk
Hey there XDA! I'm here to show off a new Android app I've published that I think a certain audience may find useful.
Ever heard of ADB? If not, you likely won't need this app. But for those of you who have used or encountered ADB in the past, you know that you usually need a PC to shell into your phone. While yes, apps such as Termux exist, they don't have elevated privileges as ADB does.
Behold, LADB! A truly local ADB shell server. That means no root, no computer, and no hassle.
Here's how it works. LADB bundles an ADB server within the app libraries and extracts it upon runtime (W^X compliant). Normally, this server cannot connect to itself because it requires an active USB connection to be visible. However, Android's Wireless ADB Debugging feature allows the server and the client to speak to each other through localhost. LADB initializes the ADB server and asks to connect to localhost, solving this limitation.
So, what can you do with it? Well, anything that ordinarily uses "adb shell <command>" can now be done locally. That means granting apps special privileges for things like SystemUI Tuner, many logcat apps, and generally anything else that needs elevated privileges. That's not all though. You can disable system apps using pm disable-user com.android.whatever, you can enable and disable system overlays with cmd overlay, you can get a logcat with logcat -d | tail -n 20, and the possibilities go on.
Here's the link to the app. It is paid, and it's actually my first paid app in a very long time. If you just need to use the ADB server for a minute, you can buy the app, use it for a few minutes, and then refund it through the store (don't tell Google).
https://play.google.com/store/apps/details?id=com.draco.ladb
Note, this app is also open source! I'm a huge fan of FOSS so I went ahead and published the app on GitHub so that anyone can compile the app for themselves for free. Any purchases through the Google Play store can be considered as donations <3.
https://github.com/tytydraco/ladb
I'm always available for support if you encounter any issues either by direct message, by telegram (@tytydraco), or by email [email protected]. I'll also be answering questions in the comments of this post. Enjoy!
Reserved for any updates or questions
Hi! I bought this app few minutes ago. I haven't tied yet. Can I use this app on 2 phones with the same google account or I have to pay twice?
badmania98 said:
Hi! I bought this app few minutes ago. I haven't tied yet. Can I use this app on 2 phones with the same google account or I have to pay twice?
Click to expand...
Click to collapse
You only need to pay once for it to be in your library
” While we tested this and found it working on essentially every modern Android phone sold in the US in the last four years, not every device is guaranteed to have the Wireless Debugging feature. It's part of AOSP, Android's open source code base, but OEMs sometimes remove functionality from their skinned versions of Android. If your phone doesn't have this option, sadly, LADB won't work for you. ”
Unfortunately my Mate 30 Pro has not this option.
LE: I managed to work.
Anybody tried to use appops https://play.google.com/store/apps/details?id=rikka.appops using ladb?
Is there a way to automate some task, for example after reboot?
Unfortunately my galaxy note 10+ has no wireless adb so i can't try but i hope it will come with android 11...
Yes, well...
alessandro_xda said:
Anybody tried to use appops https://play.google.com/store/apps/details?id=rikka.appops using ladb?
Is there a way to automate some task, for example after reboot?
Unfortunately my galaxy note 10+ has no wireless adb so i can't try but i hope it will come with android 11...
Click to expand...
Click to collapse
I quote myself...
I've a galaxy note 10+ (exynos) on android 10 and in the developer options there is no wireless debugging toggle, nevertheless ladb works!
Now a question: is it possible to execute "adb backup' or 'adb restore' in some way?
alessandro_xda said:
I quote myself...
I've a galaxy note 10+ (exynos) on android 10 and in the developer options there is no wireless debugging toggle, nevertheless ladb works!
Now a question: is it possible to execute "adb backup' or 'adb restore' in some way?
Click to expand...
Click to collapse
This functionality is on it's way
alessandro_xda said:
I quote myself...
I've a galaxy note 10+ (exynos) on android 10 and in the developer options there is no wireless debugging toggle, nevertheless ladb works!
Now a question: is it possible to execute "adb backup' or 'adb restore' in some way?
Click to expand...
Click to collapse
What do you mean by work? can you prompt an adb command?
I've the same device and it doesn't work (NO wireless ADB in devOpts) just waiting
{
"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"
}
when I press reset it gives me this message
And FC's.
Using v1.1.2 under Android 10 with rootfs.
Thanks
rypz79 said:
What do you mean by work? can you prompt an adb command?
I've the same device and it doesn't work (NO wireless ADB in devOpts) just waiting
View attachment 5170637
when I press reset it gives me this message
View attachment 5170639
And FC's.
Using v1.1.2 under Android 10 with rootfs.
Thanks
Click to expand...
Click to collapse
I've just typed ls
alessandro_xda said:
I've just typed lsView attachment 5170783
Click to expand...
Click to collapse
I've no idea why it's not working on my SM-N975F (N10+)
Say what ROM are you using? what kernel? do you have root access (magisk)?
TnXaLoT
rypz79 said:
I've no idea why it's not working on my SM-N975F (N10+)
Say what ROM are you using? what kernel? do you have root access (magisk)?
TnXaLoT
Click to expand...
Click to collapse
I'm on stock rom (unrooted)
I think you only need to start the wireless connection using the cable connected to a pc and then the wireless adb will survive until next reboot
No wireless abd option on A50
I have ladb up and running but I am having trouble getting basic advanced commands to function.
When I enter:
adb shell pwd
It returns:
system/bin/sh: <stdin>[24]: adb: inaccessible or not found
It returns this for every adb command I have tried.
what happens if I disable the system keyboard (Gboard) on my oppo? I'm using SwiftKey and it "fights" with gboard autocorrection...
Tuvor said:
I have ladb up and running but I am having trouble getting basic advanced commands to function.
When I enter:
adb shell pwd
It returns:
system/bin/sh: <stdin>[24]: adb: inaccessible or not found
It returns this for every adb command I have tried.
Click to expand...
Click to collapse
It isn't really a bug. On pc you would always type something like adb {acction} {parameters}. Adb - is the program which is going to be executed so in windows it will be adb.exe (it contains server for adb interface). Action - specifies what adb server should do, so things like devices - list adb devices, shell - open android shell. The last one contains parameters for action, so if you used shell as action it takes shell command as parameter. In this situation, when we use local shell we need to skip adb shell part because we don't have a whole adb server like adb.exe on windows with a lot more options, because we are always using just this adb shell functionality.
pawloland said:
It isn't really a bug. On pc you would always type something like adb {acction} {parameters}. Adb - is the program which is going to be executed so in windows it will be adb.exe (it contains server for adb interface). Action - specifies what adb server should do, so things like devices - list adb devices, shell - open android shell. The last one contains parameters for action, so if you used shell as action it takes shell command as parameter. In this situation, when we use local shell we need to skip adb shell part because we don't have a whole adb server like adb.exe on windows with a lot more options, because we are always using just this adb shell functionality.
Click to expand...
Click to collapse
could you please explain this like I was completely stupid?
I am trying to get running the SystemUITuner. When I enter the path with cd / /storage/emulated/0/Download/platform ecc LADB doesnt show anything. I think that should be ok. But when I then enter ./adb shell pm grant com.zacharee1.systemuituner android.permission.WRITE_SECURE_SETTINGS it tells me "permission dinied".
What am I doing wrong?
mathias.ngr said:
could you please explain this like I was completely stupid?
I am trying to get running the SystemUITuner. When I enter the path with cd / /storage/emulated/0/Download/platform ecc LADB doesnt show anything. I think that should be ok. But when I then enter ./adb shell pm grant com.zacharee1.systemuituner android.permission.WRITE_SECURE_SETTINGS it tells me "permission dinied".
What am I doing wrong?
Click to expand...
Click to collapse
You don't need to type " adb shell"....just type pm grant com.zacharee1.systemuituner android.permission.WRITE_SECURE_SETTINGS
See if that works
Ryano89 said:
You don't need to type " adb shell"....just type pm grant com.zacharee1.systemuituner android.permission.WRITE_SECURE_SETTINGS
See if that works
Click to expand...
Click to collapse
Click to expand...
Click to collapse
That worked. Thanks a lot and have a nice sunday!
EDIT: This method can be considered deprecated as now there is much easier and more effective solution thanks to the great u/HunterXProgrammer from Reddit. Check it here:
https://www.reddit.com/r/tasker/comments/11wi2om
OLD SOLUTION:
For a long long time I've been searching for a way to automate sending Whatsapp messages via Tasker. The previous method with inserting text into database doesn't work with newer Whatsapp versions and so far nobody was able/willing to fix it. But now, thanks to the whatsmeow library and the undeserved kindness of u/Black616Angel from Reddit, we finally have a working solution!
ROOT IS NOT REQUIRED, although it certainly makes things much easier.
REQUIREMENTS:
(1) Tasker
(2) Termux
(3) [FOR ROOTED USERS] A file manager with root access. I recommend MiXplorer.
(4) [FOR NON-ROOTED USERS] Termux:Tasker plugin (detailed configuration description here)
(5) One free place in Whatsapp multidevice feature
(6) A second device from which you will scan the QR code
INITIAL TERMUX SETUP:
(1) Open Termux, run apt update && apt upgrade and approve all when asked
(2) Run pkg install git
(3) Run git clone https://github.com/tulir/whatsmeow (this will clone the needed repository from Github to your device)
(4) Run pkg install golang and approve all when asked (it will download necessary tools to your device, around 800 MB)
PROCEDURE FOR ROOTED USERS:
(1) Open MiXplorer and go to /data/data/com.termux/files/home/whatsmeow/mdtest directory. Select main.go file and open it as text (in MiXplorer: OPEN AS... > Text > Text Editor). Find the line no. 114 (or very close) which should contain these signs: }(). Make a new line below and paste the following text there:
args := os.Args[1:]
if len(args) > 0 {
handleCmd(strings.ToLower(args[0]), args[1:])
return
}
Save the file and exit.
(2) Go back to Termux and enter cd whatsmeow/mdtest. Run go build command. Wait for the operation to be finished.
(3) Run ./mdtest command. If all has been done correct so far, you should see a QR code. Make a screenshot of it and send it to your secondary device. Then open Whatsapp on your main device, tap three dots in the right-upper corner, select Linked devices, select LINK A DEVICE and scan the QR code from your second device. You should see a new device linked, described as whatsmeow.
[Please note that the after a short while a new QR code is generated and the previous one gets invalid, so make this operation quickly.]
Go back to Termux. Exit the whatsmeow program by selecting CTRL on the Termux panel and tapping "c" on the keyboard.
(4) Open Tasker, create a task (name it as you wish) and add Run Shell action. In the Command field put the following text:
cd /data/data/com.termux/files/home/whatsmeow/mdtest && ./mdtest send <receipient_number_preceded_by_a_country_calling_code_without_"+"_sign">@s.whatsapp.net <your_message>
Edit above text according to your information. Example:
cd /data/data/com.termux/files/home/whatsmeow/mdtest && ./mdtest send [email protected] "My test message"
[If your message contains multiple lines, don't forget to put " sign at the beginning and the end of the message.]
You can also send images instead of just a text (optionally with a caption). Open Tasker, create a task (name it as you wish) and add Run Shell action. In the Command field put the following text:
cd /data/data/com.termux/files/home/whatsmeow/mdtest && ./mdtest sendimg <receipient_number_preceded_by_a_country_calling_code_without_"+"_sign">@s.whatsapp.net </exact/path/of/your/image.jpg> <[optional] any caption>
Edit above text according to your information. Example:
cd /data/data/com.termux/files/home/whatsmeow/mdtest && ./mdtest sendimg [email protected] /storage/emulated/0/image_example.jpg "My caption"
Mark Use root box. Go back to the task and run it by tapping the Play icon. If the message has been delivered to your recepient, you succeeded!
(5) If you want to send a message to a group instead of a single contact, you will need a precise jid ODE]number of this group. You can get it this way:
Make a test task in Tasker. Create a Shortcut action. Tap on the Magnifying glass icon and select Whatsapp: Whatsapp field, then select your group. In the command line of the Tasker action a string of signs will appear, among others the jid number of your group. It is located between jid= and %40.
Make another task (name it as you wish) with the Run Shell action. In the Command field put the following text:
cd /data/data/com.termux/files/home/whatsmeow/mdtest && ./mdtest send <jid_number_of_your_group>@g.us <your_message>
Edit above text according to your information. Example:
cd /data/data/com.termux/files/home/whatsmeow/mdtest && ./mdtest send [email protected] "My test message"
You can also send images to your groups instead of just a text. To do that, follow the pattern for the individual contact, but use the jid number of the group.
Mark Use root box. Go back to the task and run it by tapping the Play icon. If the message has been delivered to your recepient, you succeeded!
Now you can link your task to any profile as well as create additional tasks in order to automatically send different messages. Enjoy!
PROCEDURE FOR NON-ROOTED USERS:
(1) In Termux, enter cd whatsmeow/mdtest command. Then enter nano main.go command. The file editor will open. Find this block of text:
c := make(chan os.Signal)
input := make(chan string)
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
go func() {
defer close(input)
scan := bufio.NewScanner(os.Stdin)
for scan.Scan() {
line := strings.TrimSpace(scan.Text())
if len(line) > 0 {
input <- line
}
}
}()
Below this block of text make a new line and paste the following text there:
args := os.Args[1:]
if len(args) > 0 {
handleCmd(strings.ToLower(args[0]), args[1:])
return
}
Save the file by selecting CTRL on the Termux panel and tapping "o" on the keyboard. Confirm by tapping ENTER. Exit the file by selecting CTRL on the Termux panel and tapping "x" on the keyboard.
(2) Make sure you are in the ~/whatsmeow/mdtest directory. Then run go build command. Wait for the operation to be finished.
(3) Run ./mdtest command. If all has been done correctly so far, you should see a QR code. Make a screenshot of it and send it to your secondary device. Then open Whatsapp on your main device, tap three dots in the right-upper corner, select Linked devices, select LINK A DEVICE and scan the QR code from your second device. You should see a new device linked, described as whatsmeow.
[Please note that the after a short while a new QR code is generated and the previous one gets invalid, so make this operation quickly.]
(4) Go back to Termux. Exit the whatsmeow program by selecting CTRL on the Termux panel and tapping "c" on the keyboard. You should return to the ~/whatsmeow/mdtest directory. Go back to the main directory by entering cd - command.
(5) Setup Tasker:Termux plugin. In Termux, enter the following commands:
$ mkdir -p /data/data/com.termux/files/home/.termux/tasker
$ chmod 700 -R /data/data/com.termux/files/home/.termux
Now, you have to grant Tasker the permission to run commands in Termux environment. You can do this in two ways:
- grant the permission manually in the device settings. Look at:
Android Settings > Apps > Tasker > Permissions > Additional permissions > Run commands in Termux environment
[The exact place of this permission may vary depending on the device model and software.]
- run the following commands on PC via Android Debug Bridge (ADB):
$ adb shell
$ pm grant net.dinglisch.android.taskerm com.termux.permission.RUN_COMMAND
[We assume you know how to use ADB. If not, please consult this page.]
(6) Go back to Termux. Enter cd .termux/tasker command. Make a new .txt file (name it as you wish) by entering nano <name_of_your_file>.txt command. In the editor, put the following text inside:
cd whatsmeow/mdtest
./mdtest send <receipient_number_preceded_by_a_country_calling_code_without_"+"_sign">@s.whatsapp.net <your_message>
Edit above text according to your information. Example:
cd whatsmeow/mdtest
./mdtest send [email protected] "My test message"
[If your message contains multiple lines, don't forget to put " sign at the beginning and the end of the message.]
You can also send images instead of just a text (optionally with a caption). In Termux, enter cd .termux/tasker command. Make a new .txt file (name it as you wish) by entering nano <name_of_your_file>.txt command. In the editor, put the following text inside:
cd /data/data/com.termux/files/home/whatsmeow/mdtest && ./mdtest sendimg <receipient_number_preceded_by_a_country_calling_code_without_"+"_sign">@s.whatsapp.net </exact/path/of/your/image.jpg> <[optional] any caption>
Edit above text according to your information. Example:
cd /data/data/com.termux/files/home/whatsmeow/mdtest && ./mdtest sendimg [email protected] /storage/emulated/0/image_example.jpg "My caption"
Save the file by selecting CTRL on the Termux panel and tapping "o" on the keyboard. Confirm by tapping ENTER. Exit the file by selecting CTRL on the Termux panel and tapping "x" on the keyboard.
(7) If you want to send a message to a group instead of a single contact, you will need the precise jid number of this group. You can get it this way:
Make a test task in Tasker. Create a Shortcut action. Tap on the Magnifying glass icon and select Whatsapp: Whatsapp field, then select your group. In the command line of the Tasker action a string of signs will appear, among others the jid number of your group. It is located between jid= and %40.
In Termux, enter cd .termux/tasker command. Make a new .txt file (name it as you wish) by entering nano <name_of_your_file>.txt command. In the editor, put the following text inside:
cd whatsmeow/mdtest
./mdtest send <jid_number_of_your_group>@g.us <your_message>
Edit above text according to your information. Example:
cd whatsmeow/mdtest
./mdtest send [email protected] "My test message"
You can also send images to your groups instead of just a text. To do that, follow the pattern for the individual contact, but use the jid number of the group.
Save the file by selecting CTRL on the Termux panel and tapping "o" on the keyboard. Confirm by tapping ENTER. Exit the file by selecting CTRL on the Termux panel and tapping "x" on the keyboard.
(8) Test your setup. Open Tasker and create a task with Plugin > Termux:Tasker action. Go to Configuration and in the Executable field at the top start typing the name of the file you have created (the full name should be shown as soon as you start typing). Select the file, then click on Save icon. Go back to the task and run it by tapping the Play icon. If the message has been delivered to your recepient, you succeeded!
Now you can link your task to any profile as well as create additional files in the ~/.termux/tasker directory in order to automatically send different messages. Enjoy!
PS. Credits go to whatsmeow creators as well as u/Black616Angel from Reddit who contributed massively to this method and without his help it wouldn't be possible at all. Check this Reddit thread for the reference.
Wow! What a write-up! Amazingly painful way just to send a message via WhatsApp. I really wish these messaging providers made things more open.
BinkXDA said:
Wow! What a write-up! Amazingly painful way just to send a message via WhatsApp. I really wish these messaging providers made things more open.
Click to expand...
Click to collapse
There are many autoresponders available on the market, INITIATING a message is difficult because Whatsapp doesn't provide API. This way isn't a simplest one, but at least it works with screen off using web interface.
Lord Sithek said:
There are many autoresponders available on the market, INITIATING a message is difficult because Whatsapp doesn't provide API. This way isn't a simplest one, but at least it works with screen off using web interface.
Click to expand...
Click to collapse
You finally managed to find a system to be able to send messages using Tasker
I need to ask you a question.
When I send messages with this system the person receiving cannot see the text correctly.
A warning comes out that says so:
{
"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"
}
how can this problem be solved?
Thank you very much
westenlive said:
You finally managed to find a system to be able to send messages using Tasker
I need to ask you a question.
When I send messages with this system the person receiving cannot see the text correctly.
A warning comes out that says so:
View attachment 5728319
how can this problem be solved?
Thank you very much
Click to expand...
Click to collapse
I've seen that before, but honestly I have no idea why is this happening... Maybe unlinking and linking whatsmeow again would help or recreating Tasker action
Lord Sithek said:
I've seen that before, but honestly I have no idea why is this happening... Maybe unlinking and linking whatsmeow again would help or recreating Tasker action
Click to expand...
Click to collapse
ephemeral messages is the problem.
if they are enabled by this problem, by disabling ephemeral messages the problem is not there
cmq thanks for this great tool.
westenlive said:
ephemeral messages is the problem.
if they are enabled by this problem, by disabling ephemeral messages the problem is not there
cmq thanks for this great tool.
Click to expand...
Click to collapse
ohh good to know honestly I just compiled all the info into one post, I got a lot of help from more skilled users. You can read the Reddit thread as well and the posts from others:
https://www.reddit.com/r/tasker/comments/wcoc7h
Hi there! rooted device using SuperSU app here. i used the root guide, but when i run the shell command in tasker, nothing happens, the linked device whatsmeow shows "last active" the moment i uploaded the QR and not when i ran the shell command..... maybe i am doing something wrong?
EDIT: i made it! something weird was happeneing with main.go file.. the non-root explanation is more clear. thanks!
hernanbozzano said:
Hi there! rooted device using SuperSU app here. i used the root guide, but when i run the shell command in tasker, nothing happens, the linked device whatsmeow shows "last active" the moment i uploaded the QR and not when i ran the shell command..... maybe i am doing something wrong?
EDIT: i made it! something weird was happeneing with main.go file.. the non-root explanation is more clear. thanks!
Click to expand...
Click to collapse
Nice that you got it working, although root way is kinda easier to me I'm courious though what went wrong there
All who follow: Check the OP, there is much easier way to do the same now
I prefer this method.
Is much simpler.
But for a few days it hasn't been working for me.
Does this method work for you?
thanks
westenlive said:
I prefer this method.
Is much simpler.
But for a few days it hasn't been working for me.
Does this method work for you?
thanks
Click to expand...
Click to collapse
Sorry, but I switched to the new solution myself. Maybe you could try V2 of the new project since as far as I remember it was just kind of extended solution of mine:
https://www.reddit.com/r/tasker/comments/11a4k49
this system works really well.
I thank you so much.
it helps me so much with my work .
thank you brother
westenlive said:
this system works really well.
I thank you so much.
it helps me so much with my work .
thank you brother
Click to expand...
Click to collapse
Im glad I could help!