sudo in Android - General Questions and Answers

I am looking for advice on how to define a "sudo" command, given that I have a working "su" command.
I have been getting away with
Code:
alias sudo='su -c '
but recently got a silly error message that makes me think I need more than one backward-slash to escape the asterisk I am trying to pass to "find" in an "-iname" option. (And leaves me wondering what I've been doing this last year when I thought it was working as expected.)
@Cruzy12100 described using "sudo". I wanted (and still want) him to explain in detail how he comes to have an "sudo" command available.

To invoke SU command the synthax is
Code:
su -c '<YOUR-COMMAND-HERE>'
Note that the <YOUR-COMMAND-HERE> must be enclosed with single quotes.

Currently, using the "su" provided by Magisk, I get away with the alias I described.
@jcmm11 advised me to use
Code:
alias sudo='su -c "[email protected]"'
I remember on an earlier Android, with a different "su", I had to enclose the argument in quotes, which then led to the nightmare of trying to multiply backward slashes when trying to re-issue a command, this time as an argument to "su". On that tablet, I just gave up and switched to "root mode" when I needed to.
When I use "su" in Linux, I don't have to wrap the command in quotes -- it's easy to recall a command, put sudo in front of it, and execute it. (I'm mostly using "ls" and "find", so there's usually no risk of damaging anything.)
I just tried playing with the "[email protected]" construct. In my tests, with
Code:
alias xxx='echo fore "[email protected]" aft"'
The "[email protected]" doesn't seem to do anything:
Code:
xxx asdf
produces
fore aft asdf
Maybe the suggestion was targeting a different shell.

J.Michael said:
Currently, using the "su" provided by Magisk, I get away with the alias I described.
@jcmm11 advised me to use
Code:
alias sudo='su -c "[email protected]"'
I remember on an earlier Android, with a different "su", I had to enclose the argument in quotes, which then led to the nightmare of trying to multiply backward slashes when trying to re-issue a command, this time as an argument to "su". On that tablet, I just gave up and switched to "root mode" when I needed to.
When I use "su" in Linux, I don't have to wrap the command in quotes -- it's easy to recall a command, put sudo in front of it, and execute it. (I'm mostly using "ls" and "find", so there's usually no risk of damaging anything.)
I just tried playing with the "[email protected]" construct. In my tests, with
Code:
alias xxx='echo fore "[email protected]" aft"'
The "[email protected]" doesn't seem to do anything:
Code:
xxx asdf
produces
fore aft asdf
Maybe the suggestion was targeting a different shell.
Click to expand...
Click to collapse
Couple of points, prefaced by the fact that I can't currently test or verify anything.
First of all, about [email protected] Specifically from the documentation for mksh (which is Android's default shell):
Same as $*, unless it is used inside double quotes, in whichcase a separate word is generated for each positional parameter.If there are no positional parameters, no word is generated. [email protected]can be used to access arguments, verbatim, without losing NULLarguments or splitting arguments with spaces.
Magisk switched to ensuring that any startup scripts etc use Magisk's BusyBox commands on order to ensure consistency. I don't however think that su changed the shell to the BusyBox shell (which is ash, the Almquist shell), that would actually be bad for consistency.
For a test try something like:
alias sudo='su -c "[email protected]"'
sudo echo test
and see what happens. It should just return "test".
Personally I've never cared for sudo. I've always just preferred to use su, both on Android and Linux. But that's another discussion entirely.

jcmm11 said:
...
For a test try something like:
alias sudo='su -c "[email protected]"'
sudo echo test
and see what happens. It should just return "test".
...
Click to expand...
Click to collapse
It printed "test"
My problem is that I do not see any evidence that '"[email protected]"' is expanding to anything: I get the same result with or without that construct.
Code:
alias xxx='echo a "[email protected]" b'
alias yyy='echo a b '
I think I am using "sh" as a shell, both in my normal terminal, and when I use "su". (/bin/sh is not a link to toybox, it is a 400KB file)

Related

ADB Screenshotting

Found this binary that converts framebuffer dumps from /dev/graphics/fb0 into png files from the console.
http://code.google.com/p/android-fb2png/
Installed it, works pretty well. I made the following windows shell script to make screenshotting easier:
Code:
for /f "tokens=1-9 delims=/:. " %%a in ("%date% %time%") do (set stamp=%%d%%b%%c-%%e%%f%%g%%h)
adb shell /data/local/fb2png /sdcard/dcim/%stamp%.png
adb pull /sdcard/dcim/%stamp%.png %userprofile%\desktop\%stamp%.png
that whole %%d%%b%%c-%%e%%f%%g%%h madness formats the file name into YearMonthDay-HourMinuteSecondMillisecond.png so that they are always unique.
Hope someone finds this as useful as I did
combustiblemonkey said:
that whole %%d%%b%%c-%%e%%f%%g%%h madness formats the file name into YearMonthDay-HourMinuteSecondMillisecond.png so that they are always unique.
Hope someone finds this as useful as I did
Click to expand...
Click to collapse
Funny, I spent part of the day hacking together some date + batch foolishness.
Nice job. Should make documentation a lot easier.

Learn to logcat like a Pro!

adb logcat bootcamp
I'm going to be teaching the basics of logcats. I sat for a few hours a while back and hammered all this stuff out with ckisgen from XDA/ACS holding my hand the whole way, so this is good info here. I see lots of posts about issues people have and no logcats accompanying them. A good logcat is fried gold to a dev troubleshooting a problem. I did the whole thing in Ubuntu (Linux) and have listed the Window$ $pecific desktop pathing below the Linux command. UNIVERSAL COMMANDS LINUX COMMANDS WINDOWS COMMANDS.
When I say Terminal, I mean Command Prompt for you Window$ u$er$ (start-run-cmd)
In terminal with your phone plugged into the computer
A Logcat:
Code:
[COLOR=#ff0000][FONT=Arial][SIZE=3]adb logcat[/SIZE][/FONT][/COLOR]
This doesn't START logcat, this tells terminal to grab the information already on the device logcat and display it in terminal. This isn't so useful to us. It just scrolls the information in terminal and you can read it there. This is kinda difficult to read though, for one it's constantly scrolling as your phone does things and two, it's likely that your terminal is configured to only allow a certain number of lines to be kept readable before they drop off.
Pipe it to Desktop as a .txt file
Code:
[COLOR=#008000][FONT=Arial][SIZE=3]adb logcat > ~/Desktop/logcat.txt [/SIZE][/FONT][/COLOR]
[COLOR=#0000ff][FONT=Arial][SIZE=3]adb logcat > %userprofile%\desktop\logcat.txt[/SIZE][/FONT][/COLOR]
This command above will tell the logcat to export the terminal logcat to a .txt file on your desktop called logcat.txt The '>' symbol tells the logcat to pipe to the location listed. This will continue to update even if you open the text file, so long as you have terminal running. It's not done “live” though, you have to either refresh the file, or close it then re-open it. That won't affect anything other than giving you an update. Now we're getting somewhere, but where?
Code:
[COLOR=#ff0000][FONT=Arial][SIZE=3]adb logcat > /sdcard/logcat.txt[/SIZE][/FONT][/COLOR]
If using Terminal Emulator on your phone instead of a computer setup, this (above) is the code you'd want to use. It will save the logcat.txt to the root of your SD card. Next!
-v long, or not to -v long, that is the question!
Code:
[COLOR=#008000][FONT=Arial][SIZE=3]adb logcat -v long > ~/Desktop/logcat.txt[/SIZE][/FONT][/COLOR]
[COLOR=#0000ff][FONT=Arial][SIZE=3]adb logcat -v long > %userprofile%\desktop\logcat.txt[/SIZE][/FONT][/COLOR]
Now we're telling the logcat to do something more interesting. We are telling it to give us every scrap of information it has. This will space the logcat out nice and pretty and really make things easier to read as well, even giving time stamps of when everything happened! Now you can say “it happened at about 9:30 pm” and we can find that. Winning!
Sometimes you want to filter down the information though. You want to make the dev's life easier. Here is how:
First, a brief on Tags and Priorities.
Tags are going to be what process is actually giving the information, for example 'ActivityManager', 'Database', and 'WindowsManager' are all Tags you can find. There are TONS of these suckers! Research into what your problem is and try to pick out the tag.
Priorities are different. These will tell you how serious the issue at hand is. The priorities are called by their letter code and are:
V Verbose
D Debug
I Info
W Warning
E Error
F Fatal
S Silent (suppress all output)
These are in ascending order. In other words, Verbose or V is going to be the micro information which doesn't really mean much to anyone 99.99% of the time where as Fatal or F is going to be a huge catastrophic issue. When filtering for a Priority it will include the Priority you give PLUS all HIGHER Priorities. So, for example, if you call to filter for Warning or W then it will give you Warning, Error, and Fatal. That is common to filter for. Below are some examples of code:
( PS - you would never actually type or input ‘{‘ or ‘}’ in your logcat commands .. they are in some of the examples below to show you that these are generic modifiers … meaning - if you were actually inputting the command you would replace the {Tag} with an actual Tag, like: ActivityManager or GTalkService .. in the same way you would replace {Priority} with an actual Priority, such as: W or E )
Examples
Code:
[COLOR=#008000][FONT=Arial][SIZE=3]adb logcat {Tag}:{Priority} *:S > ~/Desktop/logcat.txt[/SIZE][/FONT][/COLOR]
[COLOR=#0000ff][FONT=Arial][SIZE=3]adb logcat {Tag}:{Priority} *:S > %userprofile%\desktop\logcat.txt[/SIZE][/FONT][/COLOR]
The above line is if you know exactly what Tag (GTalkService or ActivityManager) and Priority (W or E) you are looking for.
Code:
[COLOR=#008000][FONT=Arial][SIZE=3]adb logcat *:{Priority} *:S > ~/Desktop/logcat.txt[/SIZE][/FONT][/COLOR]
[COLOR=#0000ff][FONT=Arial][SIZE=3]adb logcat *:{Priority} *:S > %userprofile%\desktop\logcat.txt[/SIZE][/FONT][/COLOR]
The above line is if you don't know the Tag, but know the Priority. The * is a wild card that basically means all/any. An example of a VERY valuable logcat could be:
Code:
[COLOR=#008000][FONT=Arial][SIZE=3]adb logcat *:W *:S > ~/Desktop/logcatALLwarnings.txt[/SIZE][/FONT][/COLOR]
[COLOR=#0000ff][FONT=Arial][SIZE=3]adb logcat *:W *:S > %userprofile%\desktop\logcat.txt[/SIZE][/FONT][/COLOR]
So, the command above would give you all tags that had a priority of Warning, Error, or Fatal. It would silence (not show) everything else and would pipe the output of your log to your desktop as a text file named logcatALLwarnings.txt … moving along …
Code:
[COLOR=#008000][FONT=Arial][SIZE=3]adb logcat {Tag}:V *:S > ~/Desktop/logcat.txt[/SIZE][/FONT][/COLOR]
[COLOR=#0000ff][FONT=Arial][SIZE=3]adb logcat {Tag}:V *:S > %userprofile%\desktop\logcat.txt[/SIZE][/FONT][/COLOR]
The above line is if you know the Tag but want to see all Priorities. {Tag}:V outputs all priorities for the specific Tag you’ve entered because it calls for the V (Verbose) priority, which is the very lowest priority … and as you recall, it always gives you the priority you’ve asked for AND above.
The *:S tells the logcat to Silence (or ignore) all lines/messages that have not otherwise been specifically called for using these filter expressions. This CAN cause issues though, sometimes it will silence what you're looking for / everything.
A final specific example from my phone to be clear. I got a Database Tag with an Info Priority, if I wanted to see all instances of this happening, I could use the following code:
Code:
[COLOR=#008000][FONT=Arial][SIZE=3]adb logcat Database:I *:S > ~/Desktop/logcat.txt[/SIZE][/FONT][/COLOR]
[COLOR=#0000ff][FONT=Arial][SIZE=3]adb logcat Database:I *:S > %userprofile%\desktop\logcat.txt[/SIZE][/FONT][/COLOR]
Or, if I had an ActivityManager Warning I could use
Code:
[COLOR=#008000][FONT=Arial][SIZE=3]adb logcat ActivityManager:W *:S > ~/Desktop/logcat.txt[/SIZE][/FONT][/COLOR]
[COLOR=#0000ff][FONT=Arial][SIZE=3]adb logcat ActivityManager:W *:S > %userprofile%\desktop\logcat.txt[/SIZE][/FONT][/COLOR]
Ok, now we're going to the show! You know the tools, but how do I use them? Glad you asked!
For the first time you boot a ROM/Kernel bundled together (IE InsomMIUI 1.12.2) or for just a kernel you're going to do the following:
Once you're finished full wiping and installing the ROM, but haven't rebooted the phone yet. (Or wiping just the caches for a separate Kernel):
Open Terminal on your computer
enter the following code
Code:
[COLOR=#008000][FONT=Arial][SIZE=3]adb logcat -v long > ~/Desktop/logcat.txt[/SIZE][/FONT][/COLOR][COLOR=#0000ff]
[/COLOR][COLOR=#0000ff][FONT=Arial][SIZE=3]adb logcat -v long > %userprofile%\desktop\logcat.txt[/SIZE][/FONT][/COLOR]
​
Name the logcat something useful. A good format is to use you're initials, rom name, what it is, and date. This way it stands out. So the code with the really long but helpful file name would be:
Code:
[COLOR=#008000][FONT=Arial][SIZE=3]adb logcat -v long > ~/Desktop/JH_InsomMIUI1122_firstboot_5Dect11.txt[/SIZE][/FONT][/COLOR]
[COLOR=#0000ff][FONT=Arial][SIZE=3]adb logcat -v long > %userprofile%\desktop\JH_InsomMIUI1122_firstboot_5Dect11.txt[/SIZE][/FONT][/COLOR]
Yes, I know that's a long name, but we look at dozens of these things, it helps!
In recovery tell it to reboot the phone. The logcat will start recording internally on your device at boot automatically.
Once the phone is at the lockscreen let it sit for 5 minutes.
Unlock the phone and let it sit for about 10 seconds.
Restart the phone.
Once you restart the phone open the logcat file on your desktop to make sure it’s not blank/empty/something went wrong and if everything’s golden - send to your favorite developer (ME! ).
FYI , the -v option sets the output format. -v long after the logcat command formats the log so that it adds a date and time stamp to each line. It also separates each line with a blank line .. making the log as a whole much easier to look through.
That's it, you should be off to the races with these logcats. I hope this has helped!
Wow this is great I hope People make use of this.
Glad you like it
this has been a message from the dead pool.
Im still very much a noob and dont like posting unless necessary but would like to help when I can. Is there a way to do this on a mac?
It should be really similar to linux. You'll have to have the sdk installed and running which I don't know how to do on mac but the commands should be similar. Let me look into it.
this has been a message from the dead pool.
hy,
Realy nice tutorial.
Can you make a tutorial to how to use logcat from terminal emulator from phone?
Nice info. thanks
Good post m8
One minor criticism, not just of this post but many "How to's" on this forum.
A clear description of what a logcat is and how it maybe useful would go a long way to help educate the inexperienced.
I only say this as i have non techy friends who constantly complain about this issue.
They go looking for info to sort their own issues out and are confronted with jargon on jargon on jargon ..... with no 'Plain English explanation"
We should all try to remember not everyone possesses the same tech knowledge, and we all where N00bs once we only ascended to being the godlike superusers we are due to others making knowledge clearly available to us.
Th idea that "if you don't understand then this isn't for you" is pretty narrow and arrogant.
When I run logcat on my phone, using the command
Code:
adb logcat -v long > /sdcard/logcat.txt
the next line display is
Code:
- waiting for device -
and then does nothing. What am I doing wrong?
Adb doesn't see your devices. Do you have debugging turned on in settings? If you do try:
Code:
adb devices
If you don't see anything you don't have debugging turned on or you don't have the drivers installed for your devices. Or it isn't plugged in.
PrinceFX said:
When I run logcat on my phone, using the command
Code:
adb logcat -v long > /sdcard/logcat.txt
the next line display is
Code:
- waiting for device -
and then does nothing. What am I doing wrong?
Click to expand...
Click to collapse
Seems I need to fix it. For doing this on the phone you should enter 'su' to gain superuser than type "logcat..." and whatever. It reads logcat directly, not through adb. Sorry about missing your reply earlier. Hope this helps.
Sent from my HTC Glacier using Tapatalk 2
Nice write up Thanks .
Thanks
This is a really nice post...
XDA is gr8...
greg
Thanks for the article. I also like using the '-t' switch to grab the last n log entries (e.g., 'adb logcat -t 100 -v time'). Also, if you need a bit more compact log output, using the 'time' format works nicely.
This is a great article. I have learnt a lot. Could you take time to add a description about the various switches like -f, or -t etc that can be used with logcat. It's really very difficult for me to understand those switches...plzz Will be really helpful for others as well.
The-Droidster said:
This is a great article. I have learnt a lot. Could you take time to add a description about the various switches like -f, or -t etc that can be used with logcat. It's really very difficult for me to understand those switches...plzz Will be really helpful for others as well.
Click to expand...
Click to collapse
Code:
[email protected]:/ $ logcat --help
Usage: logcat [options] [filterspecs]
options include:
-s Set default filter to silent.
Like specifying filterspec '*:s'
-f <filename> Log to file. Default to stdout
-r [<kbytes>] Rotate log every kbytes. (16 if unspecified). Requires -f
-n <count> Sets max number of rotated logs to <count>, default 4
-v <format> Sets the log print format, where <format> is one of:
brief process tag thread raw time threadtime long
-c clear (flush) the entire log and exit
-d dump the log and then exit (don't block)
-t <count> print only the most recent <count> lines (implies -d)
-g get the size of the log's ring buffer and exit
-b <buffer> Request alternate ring buffer, 'main', 'system', 'radio'
or 'events'. Multiple -b parameters are allowed and the
results are interleaved. The default is -b main -b system.
-B output the log in binary
-C colored output
filterspecs are a series of
<tag>[:priority]
where <tag> is a log component tag (or * for all) and priority is:
V Verbose
D Debug
I Info
W Warn
E Error
F Fatal
S Silent (supress all output)
'*' means '*:d' and <tag> by itself means <tag>:v
If not specified on the commandline, filterspec is set from ANDROID_LOG_TAGS.
If no filterspec is found, filter defaults to '*:I'
If not specified with -v, format is set from ANDROID_PRINTF_LOG
or defaults to "brief"
The help output is pretty clear. '-f' allows you to save log in file. '-t' specifies how many lines for logcat to print (counting backward from present).
example:
logcat -v time -t 100 -f /sdcard/logtest1.txt
This prints last 100 lines in 'time' format to file logtest1.txt
Play with it and have fun.
Good stuff in here, going to logcat some JB roms now!
Thanx......That was really informative.
lanternslight456 said:
Seems I need to fix it. For doing this on the phone you should enter 'su' to gain superuser than type "logcat..." and whatever. It reads logcat directly, not through adb. Sorry about missing your reply earlier. Hope this helps.
Sent from my HTC Glacier using Tapatalk 2
Click to expand...
Click to collapse
Same thing happens to me
I've have checked my settings, and I can't see anything "wrong"
I've also tried different apps, like alogcat but they don't show anything either.
I don't have to 'su' on SGS2/I777 with CM9 ROM. Works for me from ADB or in phone shell.
It probably depends on the ROM you are running and permissions set.

Terminal/Script/ADB Cheat Sheet

I made this for my own reference and would like some experienced users to critique it (please don't laugh) and help me add to it. This is a first draft replacing the "napkin" I've got tucked under my keyboard. Specifically simple for newbes like myself to just help us get started with Terminal, Scripting, ADB and have a command reference to follow.
Please chim in on the ADB section which I know needs some serious help. I have almost no experience with ADB but seek to learn and document more so its useful. Or if something already exists like this but way better please point me to it so I can take from it or use it to replace this.
Thanks in advance!
Edit1: Redline1, change to:
chmod octal...10 columns: 1 Type, 9 Permissions
Nice start.
Some comments from top to bottom:
You don't need semicolons after each line. Only if you want to write more than one command on the same line - e.g. "if some condition; then".
For the directory commands (cd, mkdir, ...), you can type directories with leading "/" if you want to specify the complete path starting from root, and without leading "/" to refer to subdirectories of the current directory. ".." is the parent directory of the current directory.
"which" scans your $PATH for the command you give it, so especially if it exists multiple times it shows you "which" will get run if you type it without specifying a path. It has nothing to do with directories.
The permission groups are usually called "u=user", "g=group" and "o=other" (not "everyone else)". And "s---------" is a socket, not a binary - the rest is correct. Read all you wanted to know about the output of ls and much more here: http://www.gnu.org/software/coreuti...ion-is-listed.html#What-information-is-listed
You confused "logwrapper" with "logcat". You use "logcat" to display the log and "logwrapper" to redirect the output of something in your script to logcat.
"sh script.sh" will execute a script even if it doesn't have the "executable" permission set. Use chmod 7xx to make it executable directly without "sh".
"adb command" doesn't exist - to run a single command, you need to say "adb shell xxx".
"adb fastboot" also doesn't exist, at least on my adb.
Some general tips:
Many or all commands in busybox have built-in help if you invoke them with "--help". Also adb shows a small manual if you invoke it without parameters.
You can use most basic reference material for Linux, e.g. guides about shell scripting. It's 95% the same on Android.
Always be very careful when running commands as root - the system assumes you know what you are doing. There is no safety net. For example, "rm -rf" will happily wipe your entire device (if mounted writable) if you add a space between the following "/" and the rest of the path.
Thanks oodels for the feedback and corrections. I will update and rev the document based on this feedback when I get the time.
Also thanks for always being the one who takes the time to reply in detail to my threads, give me guidance, and inspire me to learn more about the discussion topic while NEVER making me feel like I have asked a dumb question or am the newbe I am. I had a college professor that reminds me of you who told me the only dumb question I could ask was the one I didn't ask. I appreciate that more than I can express. You are a plethora of knowledge and a master instructor with a winning humble and tackful approach to education and inspiration; a rare gem.
_that said:
Always be very careful when running commands as root - the system assumes you know what you are doing. There is no safety net. For example, "rm -rf" will happily wipe your entire device (if mounted writable) if you add a space between the following "/" and the rest of the path.
Click to expand...
Click to collapse
Thanks for _that tip. Knowing this now I think I will remove that example from the newbe guide as someone could easily mistype it, add a space after /, and wipe their device from the root down. I will also add the -i option to the command(s) that are dangerous, requiring user intervention (permission) to proceed with the command as a newbe safety factor.

Getting nanosecond time from adb shell?

I need some way of getting nanosecond time inside adb shell (to measure precise execution time of utilities). The %N in 'date +%s.%N' returns simply %N or N.
Before I been using botbrew shell to run date command from there (which had support for the nanoseconds precision -- date +%s.%N ). However now it seems to be inactive. No repository is maintained.

I have an issue. I do not know if my code modification or my device is to blame.

Info:
my device is rooted (fully) and my phone consist of Supersu, Nethunter terminal, bcmon, Reaver.
(below are the codes i modified for my device)
The history
when I first started running reaver i would receive many errors; [...not found] [...can't enable] [...can't change permissions (appearently you can't change permissions within sdcard folder... anyways, moving on.)]
[...no internet connection found]
my point is after looking at the custom scripts I had installed (with notepad++) i noticed that the actual scripts were the big issue. so I started changing things one by one in-order to not mess-up everything. yeah sure, I made some errors that made things last longer- way longer than normal. Nevertheless, at some point I actually started making things better and slowly started knocking down those errors!! until i hit the 'test' button and sure enough
"Cannot link executable... libfake_driver.so is 32 instead of 64.... only PIE are supported."
Truth Be Told
as you might can tell from the kind of question I'm asking, I am not an expert.
And I understand these kind of questions comes with others looking at the questioner as annoying- and with the thought of 'these beginners just want everyone to give answers instead of learning themselves...' It's NOT COMPLETELY wrong, since now days a comment like such is ... pretty much true-
So i'll say this: Not Every One Is The Same.
I am a programmer. my programming is mostly within game design/ game development so if more coding is needed to solve my issue at hand, then let me know and please (at the lease) point me in the right direction.
if I need to google something, please clarify what to search. For I am just one person, so it is possible I haven't thought of something to type in- however, that does not mean I haven't type MANY searches in already.
The Question
Am I able to use Rfa and bcmon on nexus 5x, and if so, then what is needed to get my phone operating (the app(s)) correctly? This is the complete error i am receiving in RfA.
CANNOT LINK EXECUTABLE: "/system/app/bcmon/assets/libs/libfake_driver.so" is 32-bit instead of 64-bit page record for 0x7f98e8c010 was not found (block_size=64)
error: only position independent executables (PIE) are supported.
My Done Work
with the rfa settings you can choose to use custom scripts the following shows the scripts i used and it's placement.
these scripts i had to modify to get the device's errors fixed ( not all though )
Activation Script:
#!/bin/bash
svc wifi disable
LD_LIBRARY_PATH=/sdcard/bcmon/assets/libs
LD_PRELOAD=/data/sdcard/bcmon/assets/libs/libfake_driver.so sh
cd /sdcard/bcmon/assets/tools
./enable_bcmon
echo “rfasuccess”
exit
Warm-up Script
#!/bin/bash
LD_LIBRARY_PATH=/sdcard/bcmon/assets/libs
LD_PRELOAD=/sdcard/bcmon/assets/libslibfake_driver.so sh
cd /sdcard/bcmon/assets/tools
Stop Script
#!/bin/bash
svc wifi enable
echo “rfasuccess”
Will you care to help me?

Categories

Resources