inotifyd bash tool - Android Q&A, Help & Troubleshooting

Hello,
what I'm trying to achieve is monitoring a file and execute a command when such file is edited/moved/deleted.
The inotifyd tool (included in busybox) is what I need to use, I guess. But there is no documentation about it at all, and I can't seem to get it working.
I've tried something like
inotifyd 'echo Hello' /sdcard/sample_file:M
Click to expand...
Click to collapse
but it keeps waiting forever and nothing happens even if I manually move sample_file using a file manager.
Can someone enlighten me, please?

Related

Removing App Registry?

Hi,
A few months ago I uninstalled an older version of the free mybackup Pro app which I had as at the time as I wasn't going to use it, but have decided that with the upcoming (hopefully) 2.1 update I would back up my phone however when I tried to install and run it, it would not let me use and told me to update to the full version.
How can I remove the older registry files to enable me to back up on the free version for the time being if at all?
Cheers
there is no such thing as a registry. uninstalling apps also removes the settings for the app, everything is gone then.
kendong2 said:
there is no such thing as a registry. uninstalling apps also removes the settings for the app, everything is gone then.
Click to expand...
Click to collapse
Thats what I thought but it still wont work?
choccy31 said:
Thats what I thought but it still wont work?
Click to expand...
Click to collapse
execute this in adb shell, does it give any output?
Code:
ls -1 /data/data/ | grep -i backup
if so try to delete the file.
kendong2 said:
execute this in adb shell, does it give any output?
Code:
ls -1 /data/data/ | grep -i backup
if so try to delete the file.
Click to expand...
Click to collapse
How do I access adb shell?
you need to have downloaded the sdk software, once you have setup file associations its a matter of opening up a command prompt, changing to your tools directory
c:\>cd \sdk\tools
C:\sdk\tools>
Then type the code above,
akhtar1817 said:
you need to have downloaded the sdk software, once you have setup file associations its a matter of opening up a command prompt, changing to your tools directory
c:\>cd \sdk\tools
C:\sdk\tools>
Then type the code above,
Click to expand...
Click to collapse
thanks for that, will take a look.

[Q] [ Backtrack 5 on LGP500 ]

Ive seen that the Backtrack 5 can be installed on xperia x10..
here's the link
Does it work on LGP500 too?
It would be great if this would work on our phone to give some special features..
up please answer my question.
rexon2011 said:
up please answer my question.
Click to expand...
Click to collapse
Hmmm? Well, go and try it?
I tried... at first i thought it should work. As the file system and all are similar
It worked till the 'startbt' but when i entered 'bt' it said segmentation fault
So anyone can tell me please what i have done wrong ( I know the wrong thing is its not meant for Optimus but anything other than that?? ) or tell me how to make it work
Thank you
PS --> My First post on XDA
Ohk looks like something is missing.
do following
reboot your phone do startbt as usual...
after that us
http://forum.xda-developers.com/showpost.php?p=14006091&postcount=15
this script copy script to any location and run it.
sh debug.sh
output will be in /data/local/debug_log.txt
just copy paste the whole file here.
tips you can push the debug.sh file using adb push.
and simmilarly pull the log out using adb pull.
once you are done then post the debug log that can help in diagnostics.
anantshri said:
Ohk looks like something is missing.
do following
reboot your phone do startbt as usual...
after that us
http://forum.xda-developers.com/showpost.php?p=14006091&postcount=15
this script copy script to any location and run it.
sh debug.sh
output will be in /data/local/debug_log.txt
just copy paste the whole file here.
tips you can push the debug.sh file using adb push.
and simmilarly pull the log out using adb pull.
once you are done then post the debug log that can help in diagnostics.
Click to expand...
Click to collapse
http://www.mediafire.com/?x4kuvorawo4reqr
is this the debug log u wer asking??
please do something... i am too much exited to try it on my optimus
BTW add me on FB i have sent u a friend request
cooltoad92 said:
http://www.mediafire.com/?x4kuvorawo4reqr
is this the debug log u wer asking??
please do something... i am too much exited to try it on my optimus
BTW add me on FB i have sent u a friend request
Click to expand...
Click to collapse
two things.
1) reboot your phone and do startbt and bt again.
post all output here.
2) also segmentation fault could be coz of the busybox chrooting failure.
i hve busybox version 1.15.3
anantshri said:
Ohk looks like something is missing.
do following
reboot your phone do startbt as usual...
after that us
http://forum.xda-developers.com/showpost.php?p=14006091&postcount=15
this script copy script to any location and run it.
sh debug.sh
output will be in /data/local/debug_log.txt
just copy paste the whole file here.
tips you can push the debug.sh file using adb push.
and simmilarly pull the log out using adb pull.
once you are done then post the debug log that can help in diagnostics.
Click to expand...
Click to collapse
When i try to run BackTrack 5 on my P500 Optimus One with Gingerbread 2.3 and root installed, i get this error:
mkdir failed for data/local/mnt, File exists
net.ipv4.ip_forward = 1
Ubuntu is configured with SSH and VNC servers that can be accessed from the IP:
eth0: No such device
Segmentation fault
Shutting down BackTrack ARM
losetup: /dev/loop7: Device or resource busy
Here mine debug.sh.txt: http://www.megaupload.com/?d=2SE35OPZ
Can anyone help me?
You really need a bigger screen size to get this working properly.

[Q] execute a file remotely

Hi there,
I have an (hopefully easy) problem which I am searching the answer for hours now.
I want to use my android device (4G Systems One Tab) to remotely execute a batch file on my PC via WIFI-Connection.
That's it.
I want to have an Icon on my homescreen and when its clicked the batch-file on the desktop computer is executed. (no feedback or output needed, this is all done by the batch)
I would be grateful if anyone could provide me with a solution or even an idea to find the way.
Thanks
HagbardC
I don't have much experience in bash script but I do know that a software by the name of Script Manager is available in the market and might just help you achieve your goal.
Now with Script Manager you can execute a script you created and place it on a shortcut on the desktop of your phone. The bash script would do any type of calls it needs to do to the PC. As long as your firewalls are well configured and you have port forwarding on the router (if needed) or your on the same wifi network you should be able to do as you need with the tool.
Now also remember, you might want to consider rooting your phone so you can have busybox installed and have a good amount of commands available to you.
Thank you, that was of help. Problem solved.
HagbardC said:
Thank you, that was of help. Problem solved.
Click to expand...
Click to collapse
Sorry for bumping an old thread, but this is my problem exactly as well. I want to run a script to execute a .bat file from my computer.
Could you please go into more detail about HOW you configured "Script Manager"?
Possibly share your script so I can change it to fit my information.
Anyone? Please help.
Thanks.
- donkeyhigh

VRoot to SuperSU Installer

VRoot Cleanup Tool - Easily replace VRoot with SuperSU
From your Windows PC​
OK everyone, here's the deal. I did the VRoot the toher day on my phone and it worked great. The problem is that it can be tricky to get the old Chinese Superuser app and SU binaries updated to SuperSU. As a result I decided to put this tool together to help update the VRoot files to SuperSU, and get rid of the old VRoot ones. What this means is that you can now clean up the Chinese Super User app and completely install SuperSU with a single click, from your Windows PC.
How to use:
Download Root Cleanup from here: https://www.dropbox.com/s/sto74q58uq4r1bj/root_cleaner.zip
Extract it to a folder on your computer.
Open the new folder and double click the clean_root.bat file.
Follow the directions.
** You will want to make sure that USB debugging is on (which it should be from VROOT) and that VRoot is closed when you run this. **
Also note I only have one phone to test with, and it worked great on the one I have. Please let me know if you have any other issues and I will try my best to help. Also, as always, not responsible for problems . <3
Edit: I just got asked via PM if this is to be run after freezing VRoot, etc. So I wanted to add here in case anyone else wondered. With this tool you do not need to freeze VRoot, delete any files, etc. My script will literally take care of everything for you. So, run VRoot and the phone will reboot. You can immediately close VRoot on your computer and run this to completely replace VRoot with SuperSU, and remove VRoot files.
This is my first time writing something like this, but so far I have a lot of people who told me it works fine. Please let me know if you have issues and Ill do my best to help! I went ahead and created this thread at the request of some people who have had good success with this on the other thread here: http://forum.xda-developers.com/showthread.php?t=2511815&page=29
Update: V4 is up - this version makes sure that ADB is accessible. Thank you @k1mu for helping me with this!
I want to ask you, why do you think the process on i9505 hangs on the line "cleaning up files" and does not automatically reboot the phone? You need to manually reboot it.
For the rest it works great!
Thank you
fabrilas said:
I want to ask you, why do you think the process on i9505 hangs on the line "cleaning up files" and does not automatically reboot the phone? You need to manually reboot it.
For the rest it works great!
Thank you
Click to expand...
Click to collapse
My guess would be these lines:
adb shell "su -c 'rm /dev/com.mgyun.shua.su'"
adb shell "su -c 'rm /dev/com.mgyun.shua.su.daemon'"
adb shell "su -c 'rm -rf /dev/com.mgyun.shua.su'"
adb shell "su -c 'rm -rf /dev/com.mgyun.shua.su.daemon'"
The issue is that I cant remember if com.mgyun.shua.su and com.mgyun.shua.su.daemon are directories or files. If you could confirm for me which they are then I will be happy to fix my tool!
Thx
Angie
it tells me that "device not found" any clues?
never mind the first statment if i put the file in the phone the run it from my computer it goes away. but I'm now going to put word for word what it tells me. "When prompted to grant root to ADB select yes. 'adb' is not recognized as an internal or external command, operable program or batch file. Once you have granted root to ADB press any key to continue... Press any key to continue . . .
but it never askes me to grant root to it it just sits there and does nothing and if i hit continue with out allowing it, it just deletes the su and unroots the phone. any clues about what I could be doing wrong
Works also with Galaxy S4 Italy Gt-i9505 :good:
ComputerBro2 said:
it tells me that "device not found" any clues?
never mind the first statment if i put the file in the phone the run it from my computer it goes away. but I'm now going to put word for word what it tells me. "When prompted to grant root to ADB select yes. 'adb' is not recognized as an internal or external command, operable program or batch file. Once you have granted root to ADB press any key to continue... Press any key to continue . . .
but it never askes me to grant root to it it just sits there and does nothing and if i hit continue with out allowing it, it just deletes the su and unroots the phone. any clues about what I could be doing wrong
Click to expand...
Click to collapse
If you are getting device not found that typically means that ADB is not able to access or find the phone. I would make sure that you close the VRoot tool as it will keep the debugging bridge tied up, and give you a device not found error. After you root you need make sure VRoot is closed before running my tool.
ComputerBro2 said:
it tells me that "device not found" any clues?
never mind the first statment if i put the file in the phone the run it from my computer it goes away. but I'm now going to put word for word what it tells me. "When prompted to grant root to ADB select yes. 'adb' is not recognized as an internal or external command, operable program or batch file. Once you have granted root to ADB press any key to continue... Press any key to continue . . .
but it never askes me to grant root to it it just sits there and does nothing and if i hit continue with out allowing it, it just deletes the su and unroots the phone. any clues about what I could be doing wrong
Click to expand...
Click to collapse
That "adb is not recognized.. " is because the batch file is not running with it's current directory in the folder where you extracted it.
@LilTechPrincess -
adding "cd %~dp0"
at the start of the clean_root.bat will ensure that it's able to find the files that it needs since that'll CD to the drive and path where the clean_root.bat was extracted.
LilTechPrincess said:
If you are getting device not found that typically means that ADB is not able to access or find the phone. I would make sure that you close the VRoot tool as it will keep the debugging bridge tied up, and give you a device not found error. After you root you need make sure VRoot is closed before running my tool.
Click to expand...
Click to collapse
okay i just needed to update my drivers witch is odd cause i just did it yesterday hmm. Anyway now it runs fine but it wont prompt me on my phone to allow root access to adb
ComputerBro2 said:
okay i just needed to update my drivers witch is odd cause i just did it yesterday hmm. Anyway now it runs fine but it wont prompt me on my phone to allow root access to adb
Click to expand...
Click to collapse
So did it fix your root to SuperSU?
Also, does anyone know how I can prompt root to ADB easier than this? Currently I am doing this to try and force the Superuser prompt:
adb shell "su -c 'touch /sdcard/invoke-root'"
If anyone knows how to do this better please let me know!
k1mu said:
That "adb is not recognized.. " is because the batch file is not running with it's current directory in the folder where you extracted it.
@LilTechPrincess -
adding "cd %~dp0"
at the start of the clean_root.bat will ensure that it's able to find the files that it needs since that'll CD to the drive and path where the clean_root.bat was extracted.
Click to expand...
Click to collapse
Thank you very much for the help! Im still a newb! haha Anyhow, I updated my tool with your suggestion.
LilTechPrincess said:
So did it fix your root to SuperSU?
Also, does anyone know how I can prompt root to ADB easier than this? Currently I am doing this to try and force the Superuser prompt:
adb shell "su -c 'touch /sdcard/invoke-root'"
If anyone knows how to do this better please let me know!
Click to expand...
Click to collapse
No the adb won't start on my phone
It say to me
rm failed for /sdcard/install-recovery.sh, No such file or directory
And now ? xD
Does it also say no device found?
Sent from my SCH-I545 using Tapatalk
Bfitz26 said:
Does it also say no device found?
Sent from my SCH-I545 using Tapatalk
Click to expand...
Click to collapse
No it freze on this
rm failed for /sdcard/install-recovery.sh, No such file or directory
when i disconnect the pone say not found for 4 or 5 times and finish
---------- Post added at 08:49 PM ---------- Previous post was at 08:28 PM ----------
I tri 3 times
try to wipe all data.
Next try is to reinstall last firmware update whit odin or it trip my knox 0x0 to 0x1 ?
MexyHKR said:
It say to me
rm failed for /sdcard/install-recovery.sh, No such file or directory
And now ? xD
Click to expand...
Click to collapse
Thats not a big deal. Basically, I removed the /sdcard/install-recovery.sh from the script earlier and forgot to not try and delete a file that doesnt exist... Ill fix that! haha That doesnt hurt anything at all. Sowwy!
Ok now im freeze on Cleaning Up Files....
Your link is down
Tomsgt said:
Your link is down
Click to expand...
Click to collapse
The link has 2 hh's in the http
eklipz3 said:
The link has 2 hh's in the http
Click to expand...
Click to collapse
thanks did notice that
Finaly dont work on my GS4
PDA: I9505XXUEMJ7
MODEM: I9505XXUEMJ7
CSC: I9505ITVEMJ8
Try 2 times after full wipe and emergency firmware restore.
Freeze on Cleaning etc...
Now need to go sleep 1:06AM in italy
Good night and sorry for bad speak
I speak like a fish trying to speak Russian

Help rooting a T-Mobile Revvl Plus - (Coolpad/Yulong)

I tried using kingo-root and kingroot, both on phone and on computer. I am not sure where to proceed from there, but i will say it got to around 90%. The reason I want to root is to disable the boot animation or startup sound(s), which is not usually disabled automatically when I have my phone on mute. I tried the sound disabler app, it seems to not be working (the startup sound still plays).
----------------------------------------------------------------------------------------------------
Well I also noticed you can do a command get ver all, but its going to require someone with that has better phone skills than of my own .. also try command while connected to computer "adb pull system" without the quotes it got to 82% for me before it wouldn't write no more still have the files for system if anyone needs them for rewriting or porting in the bootloader ... also by the way i dont know if this will help but i have got the some of these it may be helpful?.. its in the pic.
Root revvl plus coolpad
Hi do you root the revvl plus how can I do please help me thankful
TRY THIS
SmartPhoneDeveloper said:
I tried using kingo-root and kingroot, both on phone and on computer. I am not sure where to proceed from there, but i will say it got to around 90%. The reason I want to root is to disable the boot animation or startup sound(s), which is not usually disabled automatically when I have my phone on mute. I tried the sound disabler app, it seems to not be working (the startup sound still plays).
----------------------------------------------------------------------------------------------------
Well I also noticed you can do a command get ver all, but its going to require someone with that has better phone skills than of my own .. also try command while connected to computer "adb pull system" without the quotes it got to 82% for me before it wouldn't write no more still have the files for system if anyone needs them for rewriting or porting in the bootloader ... also by the way i dont know if this will help but i have got the some of these it may be helpful?.. its in the pic.
Click to expand...
Click to collapse
Hi there,
Well you can use various different methods of Rooting your Mobile, try using One-click Root or use any other rooting software
As far as I have gotten but better than nowhere...
There's a file in the etc folder in the system folder at your root. Use Termux to command "cd /system/etc/" Then command "ls". You can see a unique file called xtra_root_cert.pem in that folder. Command "apt install joe"... Then "joe xtra_root_cert.pem" You can get the certificate hash from the text displayed. That is as far as I have gotten. Lord knows what to do with it. It's some sort of password to unlock the root I think... Maybe not but highly likely. Any devs know what to do with it or how to use it?
WatchYerBak said:
There's a file in the etc folder in the system folder at your root. Use Termux to command "cd /system/etc/" Then command "ls". You can see a unique file called xtra_root_cert.pem in that folder. Command "apt install joe"... Then "joe xtra_root_cert.pem" You can get the certificate hash from the text displayed. That is as far as I have gotten. Lord knows what to do with it. It's some sort of password to unlock the root I think... Maybe not but highly likely. Any devs know what to do with it or how to use it?
Click to expand...
Click to collapse
That would be an SSL certificate.
Any news about rooting this ?
I saw a log in a forum, where MAGISK SU was running on the phone...

Categories

Resources