[TOOL] ADB Scripting | User System Pre-check [Ver. 2 - 10.9.11] - HTC EVO 3D

I wanted to provide something that I thought would be beneficial to the community as a whole. I see a lot scripts utilizing ADB (for example, the TWRP Flash Tool) that can benefit from further error checking - making them more user friendly, catching errors, and allowing for more direct troubleshooting.
So, what I put together is a "shell" if you will to wrap future ADB batch files in. This shell does a number of things including:
Capturing whether a device is found or not
Capturing the state of the device (bootloader or device)
Checking for running instances of HTC Sync
Checking for running instances of Easy Tether
Providing relevant information to the user to help in troubleshooting
UPDATE: Option to create a system report upon failure that can be be shared with forum for troubleshooting. Currently capturing Windows Version, Running Apps, and Running Services
UPDATE: Additional information to user report - ADB Version and files in directory where script is executed
Code:
@echo off
:top
set reportrun=0
color
REM Check for HTC Sync
tasklist | findstr htcUPCTLoader >nul
If %errorlevel% equ 0 (set htcsync=1) ELSE (set htcsync=0)
REM Check for Easy Tether
tasklist | findstr easytthr >nul
If %errorlevel% equ 0 (set easyt=1) ELSE (set easyt=0)
REM Check for device connection
adb devices | findstr /r "device$" >nul
If %errorlevel% neq 0 goto devmis
REM Get device state (this can be used as an error checking variable later if necessary)
for /f %%a in ('adb get-state') do @set state=%%a
cls
Echo Device found! In %state% mode.
Pause
REM Your code HERE
exit
:devmis
set sys=n
color 4f
CLS
Echo No device found - please check the following items:
Echo.
If %htcsync% equ 1 Echo - HTC Sync found - Please try disabling
If %easyt% equ 1 Echo - Easy Tether found - Please try disabling
Echo - Device is connected
Echo - USB Debugging is enabled
Echo.
Echo ------------------------------------------
Echo We can collect further information to assist with troubleshooting.
Echo This will query your system and generate a report with information
Echo about your computer. You will be given a chance to review and edit
Echo the collected information and share via copy/paste. No information
Echo will be shared without your consent.
Echo.
Set /p sys=Would you like to collect system information (y/n):
if /I %sys% equ y GOTO sysinfo
if /I %sys% equ yes sysinfo
goto tryagain
:tryagain
cls
echo.
If %reportrun% equ 1 (echo Text from window can be copied to forum for troubleshooting)
Echo Press any key to try running script again
Pause >nul
goto top
:sysinfo
Echo System information - Generated on %date% at %time% >report.txt
Echo ----------------------------------------------------- >>report.txt
echo ADB Version: >>report.txt
adb version >>report.txt
Echo. >>report.txt
echo Windows Version: >>report.txt
ver >>report.txt
Echo. >>report.txt
Echo Files in Directory of Script Execution >>report.txt
dir /b >>report.txt
Echo. >>report.txt
Echo Running Applications: >>report.txt
tasklist >>report.txt
Echo. >>report.txt
Echo Started Services: >>report.txt
sc query >>report.txt
start "" report.txt
set reportrun=1
goto tryagain
Here are screenshots of what a user would see -
Success:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Failure (1) - HTC Sync and Easy Tether are dynamic and will only show if found on system :
Failure (2):
I've also attached a sample of the report to be generated (report.txt) and the original version of the script for posterity (version 1 script.txt)
This is just a start - I'd love to add more to make this more helpful. Further ideas that I haven't implemented here include:
Checking for the "Android Phone" in device manager
Linking to relevant wiki pages for enabling USB Debugging if device isn't found
Create an error log that can be shared with developers
I can't be too much help with the Android development side of things but I can certainly help to build this out further if it's helpful to other developers. I welcome you to integrate it into your code if you'd like. Please don't hesitate to let me know if there's anything you'd like to capture from a Windows side or if I can assist with slotting your code into this shell.

Awesome this should help alot of people.,thanks man
Sent from my PG86100 using xda premium

Cool, thanks.
Is it warm in here, it is it just me....?

viddywell said:
I wanted to provide something that I thought would be beneficial to the community as a whole. I see a lot scripts utilizing ADB (for example, the TWRP Flash Tool) that can benefit from further error checking - making them more user friendly, catching errors, and allowing for more direct troubleshooting.
Click to expand...
Click to collapse
Very cool!
-Scott

scrosler said:
Very cool!
-Scott
Click to expand...
Click to collapse
Glad to be able to give something back!

viddywell said:
Glad to be able to give something back!
Click to expand...
Click to collapse
wow this is seriously awesome i dea...Im not very big into ADB and such, considering ive never really needed to use it....but im gonna start with this and mess around a little bit and get the feel for things..i thik yur on to something here, and hope to see further things added into this..good job man!!!

I've added a bit more to this, prompting the user if they'd like to generate a system report upon failure. There's more to be captured in this report but for a start, I'm capturing the version of Windows, running applications, and running services, ADB version, and files in directory where the script is executed from.
I've also added screenshots to the original post to make my intention a bit more clear without having to run this. This script can be run/tested directly by copying and pasting the code section above, saving as .bat, and assuring that adb is either in the path for your system or in the same folder as the .bat file.
Please keep in mind that this does not DO anything and will only be helpful as an addition to other developer projects. This isn't a tool for the end user and won't make any changes to your device.
If you have any questions, thoughts, concerns, or ideas - please don't hesitate to share. I think there's potential to build this out for the Android community as a whole (though I have no idea how to share it in a respectful way beyond this forum).

Great job

Related

[krn.module] smartass v2 governor for X10 GB

I've finally managed to compile smartass v2 governor (source code) and get it to work on X10.
Few members insisted if I could give it a try and I accepted the challenge
It is ment for X10 GB stock kernel 2.6.29-00054-g5f01537 preempt mod_unload ARMv7
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
(courtesy of iridaki)
You can configure various parameters:
Code:
bash-3.2# pwd
/sys/devices/system/cpu/cpu0/cpufreq/smartassV2
bash-3.2# ls
debug_mask
up_rate_us
down_rate_us
sleep_ideal_freq
sleep_wakeup_freq
awake_ideal_freq
sample_rate_jiffies
ramp_up_step
ramp_down_step
max_cpu_load
min_cpu_load
Installation guide:
Download the archive and copy the cpufreq_smartass2.ko onto the root of your /sdcard/. Then, type in the following commands:
Code:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock0 /system
cd /system/lib/modules
cp /sdcard/cpufreq_smartass2.ko .
insmod cpufreq_smartass2.ko
Then you can switch to the smartassV2 governor using SetCPU.
Configuration:
SetCPU does not support configuring it - so you will have to manage from command line. Have a look at this thread to understand how to configure - it is for the old smartass module for X10 - but the configuration is done the same way.
Each parameter (and its meaning) is defined in the source code found above.
Download:
Use it at your own risk!
cpufreq_smartass2_x10.zip
Enjoy!
great work!
may be i should include these awesome modules in the BootManager ramdisk... will make it better
@viulian
u can have a look at the following zip:
module_x10_gb_gov_minmax.zip
it has code that will auto insert the module loading parts in install-recovery.sh
Thanks!
I'm sorry, but I don't have an X10 anymore. I compiled the module using the old kallsyms addresses that I kept - and iridaki was kind enough to test it before I released it.
So I have nothing to test it against ..
It needs the module replaced and one line changed in the install script apparently. Maybe somebody else can do it and test it ?
viulian said:
Thanks!
I'm sorry, but I don't have an X10 anymore. I compiled the module using the old kallsyms addresses that I kept - and iridaki was kind enough to test it before I released it.
So I have nothing to test it against ..
It needs the module replaced and one line changed in the install script apparently. Maybe somebody else can do it and test it ?
Click to expand...
Click to collapse
There you go!
module_x10_gb_gov_smartass2.zip
PS: Turns out I can't sleep!!!
Nice was waiting for this!
Sent from my X10i using XDA App
Didn't we already have this?
pyromatic18 said:
Didn't we already have this?
Click to expand...
Click to collapse
Seriously?
No, smartass was never part of stock SE kernel.
I think he meant the normal smartass we already had but now we have v2.
Sent from my X10i using XDA App
Wolfbreak said:
I think he meant the normal smartass we already had but now we have v2.
Sent from my X10i using XDA App
Click to expand...
Click to collapse
I think he meant that it was already included in doomkernel since 4b which was a while ago...
But this one is for stock kernel, its different.
Thanks Viulan!
Yes, for kernels 2.6.32 and onwards, the existing sources do compile (don't know if straight away, but its much more easier to get something to work).
Since smartassV2 was using features present in newer kernel releases, I had to rewrite some of the code so that it does the same, but using 2.6.29 features:
a) sysfs to use older api / parameters
b) add in the call to default_idle method, which older kernels do not provide by default.
c) fix a bug related to unloading / reloading the module (it did not do an unregister suspended state at the end).
Also I removed small parts related to new syncr. mechanisms added in newer kernels.
I am using these parameters for the governor, but still it seems to stay at max frequency most of the time when the screen is on.
Code:
#smartassV2 config
echo "24000" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/up_rate_us
echo "49000" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/down_rate_us
echo "245760" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/sleep_ideal_freq
echo "245760" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/sleep_wakeup_freq
echo "384000" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/awake_ideal_freq
echo "2" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/sample_rate_jiffies
echo "220000" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/ramp_up_step
echo "160000" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/ramp_down_step
echo "95" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/max_cpu_load
echo "45" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/min_cpu_load
Anyone has any suggestions to maximize the use of intermediate frequencies?
Will this be implemented into future custom kernels?
Sent from my X10i using XDA App
iridaki said:
I am using these parameters for the governor, but still it seems to stay at max frequency most of the time when the screen is on.
Code:
#smartassV2 config
echo "24000" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/up_rate_us
echo "49000" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/down_rate_us
echo "245760" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/sleep_ideal_freq
echo "245760" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/sleep_wakeup_freq
echo "384000" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/awake_ideal_freq
echo "2" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/sample_rate_jiffies
echo "220000" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/ramp_up_step
echo "160000" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/ramp_down_step
echo "95" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/max_cpu_load
echo "45" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/min_cpu_load
Anyone has any suggestions to maximize the use of intermediate frequencies?
Click to expand...
Click to collapse
I would not touch sample_rate_jiffies, up_rate_us and down_rate_us ...
ramp_up_step and ramp_down_step I believe is better to be 0, thus the governor will use the frequencies table (as far as I understand). These are the values I put (0) so no need to alter them.
And the last ones I would reduce max_cpu_load ... I would it 65 (otherwise phone is sluggish).
Smartass is not that good for intermediate frequencies, I found interactive to be the best at it.
Code:
#smartassV2 config
echo "245760" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/sleep_ideal_freq
echo "245760" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/sleep_wakeup_freq
echo "384000" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/awake_ideal_freq
echo "65" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/max_cpu_load
echo "45" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/min_cpu_load
sjondenon said:
Will this be implemented into future custom kernels?
Sent from my X10i using XDA App
Click to expand...
Click to collapse
it has been integrated in my kernel and ThJap's kernel since almost a month now
http://forum.xda-developers.com/showthread.php?p=17294877#post17294877
How can I check smartassV2 config from command line?
sathurnn said:
How can I check smartassV2 config from command line?
Click to expand...
Click to collapse
You go into
/sys/devices/system/cpu/cpu0/cpufreq/smartassV2
folder and check each individual file using
cat <filename>
command.
sathurnn said:
How can I check smartassV2 config from command line?
Click to expand...
Click to collapse
what i do is open adb shell and in the shell, paste this
Code:
for f in /sys/devices/system/cpu/cpufreq/smartass/*; do echo -e "\n$f"; cat $f; done
Hello everybody i have a little problem with smartass2, after install it via adb tool I see it in Set CPU, but when I turn off or reboot my phone this governor is gone :-/. If someone could help me, it would be fine. Thanks for your help
Xperia X10 stock kernel & Rom X10S by championswimmer.

[APP][ROOT] WearToolbox V1.54 (16-04-2016)

DISCLAIMER:
I'm not responsible for damage to your phone or watch.
You are using this app at your own responsibility
WearToolbox was just an idea to make life easier.
With WearToolbox you can connect from your phone to your watch through adb, with this it's possible to send commands or sideload apps etc. (see features).
For now design doesn't matter for me, functionality does. Design will be better when app is in a further stage.
When enough people have tested it and provided me feedback, it will be released in the Play Store for easier updating.
The app is in DEVELOPMENT and TEST stage and can have BUGS.
Tested on LG Watch R with Android Wear 5.1.1 and LG G2 5.0.2
Have fun with it and let me know if it works or not!
FEATURES
- Automatic installation of necessary binaries (adb -> /system/bin/)
- Automatic connection
- Reboot (system, recovery, bootloader)
- Sideload apps (/sdcard/WearToolbox/sideload/)
- Uninstall apps
- Push files to /sdcard/
- Send adb commands (adb command)
- Send shell commands (adb shell command)
- ADB and shell command history
- Script parser for own created scripts
TODO:
- Make a nicer UI
IDEAS:
- Pull files
- ADB filebrowser
REQUIREMENTS
- Enabled debug and bluetooth debug on android watch, developer options (youtube)
- Enabled debug on phone, developer options
- Enabled debug in Android Wear app, under settings
- Rooted phone
FAQ:
Q: How to use root with shell:
A:
Code:
"su -c '[COMMAND]'"
Snippets:
Code:
"su -c 'echo 85 > /sys/class/timed_output/vibrator/amp'"
Code:
"su -c 'echo 120 > /sys/class/timed_output/vibrator/driving_ms'"
Code:
wm density 200
Q: How to sideload apps:
A: Place apk in the folder /sdcard/WearToolbox/sideload/, restart WearToolbox, choose right apk, click sideload, wait a long time
Q: How to use scripts:
A: Make for example a dummy.txt file in /sdcard/WearToolbox/scripts/ with shell commands in it. Each command on a newline. Save it, restart WearToolbox, test it.
Example (vibrate.txt):
Code:
cat /sys/class/timed_output/vibrator/amp
cat /sys/class/timed_output/vibrator/driving_ms
"su -c 'echo 85 > /sys/class/timed_output/vibrator/amp'"
"su -c 'echo 120 > /sys/class/timed_output/vibrator/driving_ms'"
cat /sys/class/timed_output/vibrator/amp
cat /sys/class/timed_output/vibrator/driving_ms
DOWNLOAD
https://play.google.com/apps/testing/com.diechel.xda.weartoolbox
I might go ahead and try this. Having something like this would be very very useful. (fyi, I believe you initial change log date has the wrong month. Unless it is June 31st already)
Rennat said:
I might go ahead and try this. Having something like this would be very very useful. (fyi, I believe you initial change log date has the wrong month. Unless it is June 31st already)
Click to expand...
Click to collapse
Haha yes youre right about the changelog Will change.
Let me know if it works and what you think about it.
What features would you like etc etc.
stuck on "Checking Connection" for me Sammy 5.1.1 S6 Edge (arm64) and LGWR 5.1.1
EDIT - seems to download binaries every time I open the app, still won't connect - perhaps something to do with arm64 architechture ???
EDIT2 - in Android Wear Manager bluetooth debugging ON, it says HOST disconnected, TARGET connected
kashortiexda said:
stuck on "Checking Connection" for me Sammy 5.1.1 S6 Edge (arm64) and LGWR 5.1.1
EDIT - seems to download binaries every time I open the app, still won't connect - perhaps something to do with arm64 architechture ???
EDIT2 - in Android Wear Manager bluetooth debugging ON, it says HOST disconnected, TARGET connected
Click to expand...
Click to collapse
- Can you check if the files 'adb' and 'fastboot' are present in /system/bin/
- What is there permission? should be 755
- Are the files 'adb' and 'fastboot' on your root of your /sdcard/
- Can you type 'adb' and 'fastboot' in terminal and post output
- Can you type 'mount -o remount, rw /system' in terminal and post output
For me HOST and TARGET are connected in Android Wear App
@Diechel , I have adb but not fastboot in /system/bin
Okay copied adb and fastbook to /system/bin and 755'd them.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
kashortiexda said:
Okay copied adb and fastbook to /system/bin and 755'd them.View attachment 3343013
Click to expand...
Click to collapse
i see something weird
Code:
localhost:4444:4444
should be
Code:
localhost:4444
Will look if i can find something.
Also wondering why copying didnt work, was searching all over the internet how to correctly remount /system
My output is as follows, see attachment. Of course a newer version but nothing changed to adb init
@Diechel am I supposed to have my watch or phone plugged into my PC by USB when doing all this / running weartoolbox ?
kashortiexda said:
@Diechel am I supposed to have my watch or phone plugged into my PC by USB when doing all this / running weartoolbox ?
Click to expand...
Click to collapse
No just bluetooth connected to each other.
And all the 3 debugging option on as stated in the OP
Edit:
Build 21 online
Yip got all that but no adb devices and the localhost:4444:4444 is clearly wrong
Would a logcat help
kashortiexda said:
Yip got all that but no adb devices and the localhost:4444:4444 is clearly wrong
Would a logcat help
Click to expand...
Click to collapse
I dont know if logcat helps, what you can try is manually connect with terminal on your phone.
Code:
su
adb kill-server
setprop service.adb.tcp.port 5555
stop adbd
start adbd
adb forward tcp:4444 localabstract:/adb-hub
adb connect localhost:4444
adb devices
Each line need to be filled in, not all together.
And try build 21
Did the manual Terminal stuff and it FIXED the 4444 problem, installed v21 and.....[emoji1]
kashortiexda said:
Did the manual Terminal stuff and it FIXED the 4444 problem, installed v21 and.....[emoji1]
View attachment 3343080
Click to expand...
Click to collapse
TADAAAAAA
GOOD!
Let me know if you have ideas to implement. First i go for functionality then change the user interface a bit
@Diechel
EDIT: I tried sideloading es file explorer apk ... worked !!! [emoji1]
kashortiexda said:
@Diechel I tried sideloading es file explorer apk ...it says done but nothing on watch.
Have you successfully sideloaded any apks ?
Click to expand...
Click to collapse
Yes i had, will try again.
It takes some time for the watch to install, will try now and report back!
Edit:
From what i see now is that the message done comes too fast.
Bluetooth is slow and is still transferring after the done message, can see that in my top bar.
Seems not working indeed, will check thanks
EDIT:
It got installed after a while
Good that it is working! Will see how i can report in log
I got it installed too, yes the done is misleading .... GREAT app btw, well done [emoji106] [emoji106]
kashortiexda said:
I got it installed too, yes the done is misleading .... GREAT app btw, well done [emoji106] [emoji106]
Click to expand...
Click to collapse
Haha thank you, now there is a message that you need to wait untill it arrives on your watch, bluetooth is slow
@Diechel are you planning on adding the trickier "adb remove sideloaded app" but I think it may not be possible. .
kashortiexda said:
@Diechel are you planning on adding the trickier "adb remove sideloaded app" but I think it may not be possible. .
Click to expand...
Click to collapse
Can try at least, I think it's possible. Maybe a lot of work

[BREVENT] A ‘No Root’ alternative to Greenify

First and foremost I am not the developer of this App! I just discovered it and thought those of you missing Greenify might find this useful.
[What's Brevent]
There are a lot of apps which claim to prevent apps from running. However, most of them requires ROOT, or do a system modification via Xposed or patching or unlocked bootloader.
Brevent can app-standby or force-stop apps, prevent apps from running in long time. It doesn't require ROOT, nor modify system. Furthermore, it may doesn't work well on ROOT or modified system. There is an experimental feature to start Brevent Server without adb, please read guide - permissions.
Brevent supports Android 5.0 to Android O DP3, requires "USB debugging" in "developer options". I mainly used it on Google Pixel with Android 7.1.2.
[Simple Guide]
0. (Device) open Brevent, read "Guide"
1. (Device) open Brevent, navigate to "Developer Options", turn on "USB debugging"
2. (PC) Download ADB: https://developer.android.com/studio/releases/platform-tools.html
(If you live in China, you can download it here too: https://developer.android.google.cn/studio/releases/platform-tools.html)
3. (PC) Uncompress, navigate to "platform-tools" directory in Command Line, refer to "Guide - ADB"
4. (PC and Device) connect device and PC with usb cable, type "adb devices" in PC Command Line, and confirm the authorized dialog on Devices if needed
5. (PC) type "adb -d shell sh /data/data/me.piebridge.brevent/brevent.sh" in PC Command Line
[FeedBack]
For any issues, please open an issue at github with logs: https://github.com/brevent/Brevent/issues
1. crash log (in PC's command line): adb -d logcat -d -b crash
2. brevent server log (in PC's command line): adb -d logcat -d -b main -s BreventServer BreventLoader
2.1. enable debug for Brevent Server, type in PC's command line: adb -d shell setprop log.tag.BreventServer DEBUG, then get brevent server log
2.2. disable debug for BreventServer, type in PC's command line: adb -d shell setprop log.tag.BreventServer "" (Note for the back slash)
https://play.google.com/store/apps/details?id=me.piebridge.brevent&hl=en
according to the info, you have to regrant permissions thru ADB every darn reboot or it's useless.
Alternative To Greenify, Native Feature
ggrant3876 said:
First and foremost I am not the developer of this App! I just discovered it and thought those of you missing Greenify might find this useful.
[What's Brevent]
There are a lot of apps which claim to prevent apps from running. However, most of them requires ROOT, or do a system modification via Xposed or patching or unlocked bootloader.
Brevent can app-standby or force-stop apps, prevent apps from running in long time. It doesn't require ROOT, nor modify system. Furthermore, it may doesn't work well on ROOT or modified system. There is an experimental feature to start Brevent Server without adb, please read guide - permissions.
Brevent supports Android 5.0 to Android O DP3, requires "USB debugging" in "developer options". I mainly used it on Google Pixel with Android 7.1.2.
[Simple Guide]
0. (Device) open Brevent, read "Guide"
1. (Device) open Brevent, navigate to "Developer Options", turn on "USB debugging"
2. (PC) Download ADB: https://developer.android.com/studio/releases/platform-tools.html
(If you live in China, you can download it here too: https://developer.android.google.cn/studio/releases/platform-tools.html)
3. (PC) Uncompress, navigate to "platform-tools" directory in Command Line, refer to "Guide - ADB"
4. (PC and Device) connect device and PC with usb cable, type "adb devices" in PC Command Line, and confirm the authorized dialog on Devices if needed
5. (PC) type "adb -d shell sh /data/data/me.piebridge.brevent/brevent.sh" in PC Command Line
[FeedBack]
For any issues, please open an issue at github with logs: https://github.com/brevent/Brevent/issues
1. crash log (in PC's command line): adb -d logcat -d -b crash
2. brevent server log (in PC's command line): adb -d logcat -d -b main -s BreventServer BreventLoader
2.1. enable debug for Brevent Server, type in PC's command line: adb -d shell setprop log.tag.BreventServer DEBUG, then get brevent server log
2.2. disable debug for BreventServer, type in PC's command line: adb -d shell setprop log.tag.BreventServer "" (Note for the back slash)
https://play.google.com/store/apps/details?id=me.piebridge.brevent&hl=en
Click to expand...
Click to collapse
One of the reasons I rate this phone so highly is that there are plenty of 'native' features present that make rooting less necessary.
My phone is a UK Sky Mobile Exynos model, and under 'Maintenance', 'Battery' there is an option to put 'non running' apps to sleep, just like 'Greenify'. I don't know if this is true for other regions or carrier's. Maybe other people can check this to see if it's so for their region and carrier.
kxdaorbit said:
One of the reasons I rate this phone so highly is that there are plenty of 'native' features present that make rooting less necessary.
My phone is a UK Sky Mobile Exynos model, and under 'Maintenance', 'Battery' there is an option to put 'non running' apps to sleep, just like 'Greenify'. I don't know if this is true for other regions or carrier's. Maybe other people can check this to see if it's so for their region and carrier.
Click to expand...
Click to collapse
I agree with you on the phone but there are two features that I miss with root.
1. Titanium Backup - they ability to back up your apps and data. I know there is Samsung Cloud but I'm not a big fan of cloud based services.
2. TWRP - the ability to back up your whole phone and restore it if needed.
ggrant3876 said:
I agree with you on the phone but there are two features that I miss with root.
1. Titanium Backup - they ability to back up your apps and data. I know there is Samsung Cloud but I'm not a big fan of cloud based services.
2. TWRP - the ability to back up your whole phone and restore it if needed.
Click to expand...
Click to collapse
I get your apprehension about cloud based services, but this is 2017, you'll have to bite the bullet sooner rather than later.
Also don't forget, if you have really super sensitive or personal data that you can't trust to cloud based services, we have 'Smart Switch'. Enables you to make as close to a 'nandroid' backup as is possible, and to store it locally. You can then restore single elements or the whole phone. Thank you Samsung.
kxdaorbit said:
I get your apprehension about cloud based services, but this is 2017, you'll have to bite the bullet sooner rather than later.
Also don't forget, if you have really super sensitive or personal data that you can't trust to cloud based services, we have 'Smart Switch'. Enables you to make as close to a 'nandroid' backup as is possible, and to store it locally. You can then restore single elements or the whole phone. Thank you Samsung.
Click to expand...
Click to collapse
Yes I read a thread yesterday that said you can use Smart Switch and back it up to your sdcard. It's getting better, I started with the T-Mobile G-1 and the only way to root and even do screenshots was with adb. I learned adb and it has served me well on android, even on the S8+ to get rid of the battery icon I had to run a few commands to get SystenTuner UI to work.
Why don't you just use Samsung built in always sleeping option for apps? Works great
Compusmurf said:
according to the info, you have to regrant permissions thru ADB every darn reboot or it's useless.
Click to expand...
Click to collapse
If you have rooted, it's not problem.
And if you don't have rooted, no other alternative third-party apps can app-standby other apps or force-stop apps quickly.
I am rooted, but the app doesnt seem to see that I am rooted.
MrPhilo said:
Why don't you just use Samsung built in always sleeping option for apps? Works great
Click to expand...
Click to collapse
I agree, s8 already have functions to put your apps to sleep immediately without waiting 3 days.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Sent from my SM-G955F using Tapatalk
BratPAQ said:
I agree, s8 already have functions to put your apps to sleep immediately without waiting 3 days.
Sent from my SM-G955F using Tapatalk
Click to expand...
Click to collapse
how do you get here ?
crayonyes said:
how do you get here ?
Click to expand...
Click to collapse
Settings - Device Maintenance - Battery
Then at the very bottom is "always sleeping apps"
Sent from my SM-G955F using Tapatalk
BratPAQ said:
Settings - Device Maintenance - Battery
Then at the very bottom is "always sleeping apps"
Sent from my SM-G955F using Tapatalk
Click to expand...
Click to collapse
got it, Thanks
Where is the experimental feature to start server without adb?
mrQQ said:
Where is the experimental feature to start server without adb?
Click to expand...
Click to collapse
suku_patel_22 said:
I am rooted, but the app doesnt seem to see that I am rooted.
Click to expand...
Click to collapse
]
Compusmurf said:
according to the info, you have to regrant permissions thru ADB every darn reboot or it's useless.
Click to expand...
Click to collapse
If you have Root
Just press "back" about 6 times
And then a new menu appears
There you press on "ROOT"....

[TOOL] Emulate the Roland MT-32 using Munt and a chroot distro

Hello guys and welcome to my latest little experiment. This time, I'm trying to figure out how to get Munt working properly in the harpia, also, talking directly to the souncard (something that I couldn't get done yet).
First of all, let me say that this is an updated version of this guide https://retropie.org.uk/forum/topic/12549/tutorial-installing-munt-mt-32-emulation-on-rpi-3 for the RPi 3, this time I'll also cover some broken dependencies in Ubuntu, even though the one that's missing doesn't appear to be necessary at all. Anyways, the point is that all credits for 80% or more of the command belong to that thread's owner.
Let's begin!
ON YOUR COMPUTER
Clone this kernel's repo to your computer (just customized HybridX).
Code:
git clone https://github.com/Akianonymus/kernel_moto_msm8916 -b hxo-harpia ~/midikernel
Patch it to enable MIDI kernel support.
Code:
cd ~/midikernel && wget 'https://gist.githubusercontent.com/FacuM/68615a2102923eb349fef053789acd8b/raw/f4fd7f1d41bdcb38160c41ae073fa2bb1345ccc1/0001-enable-virtual-MIDI-devices-and-expose-the-sequencer.patch' && patch -p1 < 0001-enable-virtual-MIDI-devices-and-expose-the-sequencer.patch
Install the required dependencies.
Code:
sudo apt-get update
sudo apt-get -y install build-essential bc
Now build it.
Code:
bash harpia.sh
Now push the zip inside of ~/midikernel/Anykernel2/harpia to your device and flash it through recovery.
NOW ON THE SMARTPHONE
Download Linux Deploy from the Play Store.
Install the distro, I suggest you using Ubuntu as it's easier to set up than any other.
Start by tapping on the "Properties" button.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Set it up as follows:
Just in case you can't see the pictures:
Containerization method: chroot
Distribution: Ubuntu
Architecture: armhf
Distribution suite: xenial
Installation type: File
Installation path: /sdcard/linux.img
Image size (MB): 1536
File system: ext4
Section "Mounts" -> Enable (ticked)
Mount points -> Add -> /sdcard
Section "SSH" -> Enable (tick)
Leave everything else as-is, then, go back.
Now hit menu and tap install.
Wait some time, it's likely to take a kinda big amount of time.
Okay, now that you're all set, let's move to the smartphone's just created distro container and connect us through SSH.
Spawn a terminal and connect as follows...
Code:
ssh [email protected]
I'll show you an example in my own case.
Boom, magic.
Then, after providing it your password, it'll look like this. The default is root.
Here comes the best part: install all the dependencies.
Type the next command:
Code:
sudo apt-get update && sudo apt-get install build-essential cmake portaudio19-dev libx11-dev libxt-dev libxpm-dev glib2.0 wget
Now, lets supply the system some packages that haven't been yet published for xenial but are likely required.
Code:
wget 'http://launchpadlibrarian.net/134644780/qtmobility-dev_1.2.0-3ubuntu5_armhf.deb' && sudo dpkg -i qtmobility-dev_1.2.0-3ubuntu5_armhf.deb && sudo apt-get -y install -f
All done! Lets get Munt code.
Code:
wget 'https://github.com/munt/munt/archive/munt_2_3_0.tar.gz' && tar -xzf munt_2_3_0.tar.gz
Alrighty, now create the directories where to build.
Code:
mkdir munt-build && cd munt-build
Setting the compiler flags. Well, this part is pretty hard to understand if you aren't used to software compilation. But lets say that it's how explains the build system what to build and for which software/hardware combos. After a little investigation, I've got to the conclusion that the Odroid-C1's are the right ones for this device.
Code:
export CCFLAGS="-Ofast -mcpu=cortex-a5 -mfpu=neon-vfpv4 -mfloat-abi=hard -ftree-vectorize -funsafe-math-optimizations"
export CXXFLAGS="-Ofast -mcpu=cortex-a5 -mfpu=neon-vfpv4 -mfloat-abi=hard -ftree-vectorize -funsafe-math-optimizations"
All done! Now we can go to the actual thing: build it.
Issue this command:
Code:
cmake -DCMAKE_BUILD_TYPE=Release -Dmunt_WITH_MT32EMU_QT:BOOL=OFF ../munt-munt_2_3_0/
You should see something like this:
If everything went as expected, build it!
Code:
make -j$(nproc --all)
Sample output:
Install it!
Code:
sudo make install
Sample output:
It's time to build the ALSA Midi driver.
Code:
cd ../munt-munt_2_3_0/mt32emu_alsadrv && make && sudo make install
Sample output:
Now download the MT-32 ROMs from https://docs.google.com/open?id=0B5j-_ZMS8_UoY2MxOWRmMzktZmZhOS00M2EwLWFkZGItODNmODY4ZjU5Y2Vi (thanks to this thread) and place them i.e. in /sdcard/Download.
Create the path for the ROMs and put them there:
Code:
sudo mkdir /usr/share/mt32-rom-data && sudo cp /sdcard/Download/*.ROM /usr/share/mt32-rom-data/
NOTE: The ROMs found in that GDrive folder aren't properly named. Rename them as follows:
Code:
cd /usr/share/mt32-rom-data && sudo mv CM32L_CONTROL.1989-12-05.v1.02.ROM CM32L_CONTROL.ROM && sudo mv MT32_CONTROL.1988-09-30.vX.XX-patched.ROM MT32_CONTROL.ROM
That's all!
From now on, there are two ways to use this. I still haven't figured out how to get one of them working, but I'll soon get you news.
First way (recommended):
Code:
sudo mt32d -o 2
This will spawn a process that you should be able to use with DOSBox or some other software supporting this MIDI device. Its hardware ID is 128:0.
or
You can just render a WAV lossless file outta your MID MT file. This is done through this command: (I'll be testing with Space Quest III's track, you can get it here)
Code:
sudo mt32emu-smf2wav /sdcard/Download/sq3mt/SQ3MT.MID -m /sdcard/Download/ -d 0 -r 1 --src-quality=3
NOTE: I provide you with the most useful arguments that I've found and improve the converter's behavior. Feel free to try on your own.
This will leave you with something like this:
The process will really likely take some time as the recording quality is REALLY high. Anyways, as this is uncompressed audio, with a supported player such as foobar2000 you can try and listen to it while it's being done. It'll just stop when it reaches the end of the render.
I hope you liked it, feel free to post any suggestion or improvements that can be made.
Credits:
+/- 80% of this thread: "David87" on Retropie forum.
Kernel source: to anyone involved, but mainly @@ki for such stable sources.
To me: for having such a huge free time and lonely life to bring something so useless to an Android device.

HP TOUCHPAD Universal Authority

Universal Authority to have Total control of all Android ROMs using Gscript
Before making any changes always create a back up.
Click HERE for How to Backup and Restore using TWRP Recovery
Have all the proper software available to be use, if any wrong doing.
The Novacom drivers are essential to repair any damages.
Click HERE for HP TOUCHPAD Novacom Repair Android
In any Device Operating System, Desktop or Mobile the changes are apply using simple command lines. There are Apps that allows easier interaction by providing a
GUI ( Graphical User Interface ). The Apps provide specific functions or Tweaks in a general setting to accommodate a wide range of Devices.
The Apps will use resources ( RAM ) and if the device is low in Memory it will create more issues than improvement.
The Gscript App provides the ability to make all changes to the system in a very basic, simple but effective way.
The developer and creator of Gscript is @rogro82, and the original Thread can be found here:
Click HERE for the original Gscipt Thread
The provided Gscript from this guide was modified to work better on the Tablet, but the functionality is the same.
The user has full Authority to modify any Android ROM and specifically create any script command for any use.
Creating the script is as simple as using the App.
Paste the command in the App, give it a name and save it.
A list of command can easily be enter on any OS using a basic text editor.
The only requirement is to save the file with the extension .sh
Flash the file in TWRP Recovery:
Boot into Android and install the gscript_modified.apk App. A list of scripts are provided to make changes to the Optimize Settings.
Click HERE to Download HpTp_Universal_Authority flash File.
SuperSu SR5-SuperSU-v2.82 must be flash to all ROMs:
Click HERE to Download SR5-SuperSU-v2.82
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Many thanks to @rogro82 for creating the most powerful App, that with a touch from the Home Screen everything is under control !
PIE Commands
Android Pie uses the Toybox:
http://landley.net/toybox/
The best and fastest way to get all the command available is using ADB Shell.
[email protected]:/ # cd system/bin
Get all available command line utilities
[email protected]:/system/bin # ls
or by just typing toybox
[email protected]:/ # toybox
Oreo Commands
Android Oreo uses the Toybox:
http://landley.net/toybox/
The best and fastest way to get all the command available is using ADB Shell.
[email protected]:/ # cd system/bin
Get all available command line utilities
[email protected]:/system/bin # ls
or by just typing toybox
[email protected]:/ # toybox
Nougat Commands
Android Nougat uses the Toybox:
http://landley.net/toybox/
The best and fastest way to get all the command available is using ADB Shell.
[email protected]:/ # cd system/bin
Get all available command line utilities
[email protected]:/system/bin # ls
or by just typing toybox
[email protected]:/ # toybox
Lollipop Commands
Android Lollipop uses the busybox:
https://busybox.net/
The best and fastest way to get all the command available is using ADB Shell.
[email protected]:/ # cd system/bin
Get all available command line utilities
[email protected]:/system/bin # ls
or by just typing busybox --list
[email protected]:/ # busybox --list
Kitkat Commands
Android Kitkat uses the busybox:
https://busybox.net/
The best and fastest way to get all the command available is using ADB Shell.
[email protected]:/ # cd system/bin
Get all available command line utilities
[email protected]:/system/bin # ls
or by just typing busybox --list
[email protected]:/ # busybox --list
Universal Commands
Universal Commands
Journey to Planet "Universal Authority"
Well while HP_TOUCHPAD is still trying to get out of his 'technical blackhole' one step at a time, I though I would take my first journey to the planet "Universal Authority" and report my findings, and to see if there is any life. I brought my trusty camera to document my journey and I added annotations to all my journey pictures at the bottom of the post.
First I downloaded the zip file called HpTp_Universal_Authority.zip and investigated it before I flashed it. The key file in the zip is called gscript_modified.apk and key the directory is called /gscript, both are important, these files will take permanent residence on your HP Touchpad
once you flash the zip.
The /gscript directory contains 20 separate Linux scripts that perform various tasks on your HP TOUCHPAD using Linux commands, the APK file is the modified gscript application that you will install once the flash copies it to the download directory. The updater-script of the zip has various edify commands that get run at flash time too.
So once I installed the modified gscrips app, I opened it and it was empty of any commands, so I added one at a time with the "add script" button. Then I did some testing on the planet "Universal Authority", by selecting the "run" and "edit" commands on the popup menu of the various scripts that I loaded.
It was a good first journey, and I plan to go again soon. I hope you all visit too, the natives are friendly and they have good home cooking. They told me that Captain Kirk and Spock were here and I just missed them.
Somehow missed this newcomer the other day while resurrecting one of mine.
Thanks @HP_TOUCHPAD for taking the time to post all this info.
Saw 'GScript' and my first thought was of GhostScript which is over 30 years old.
Going to have to rework my thought process...
DoubleStuff said:
...SNIP...
+1
It was a good first journey, and I plan to go again soon. I hope you all visit too, the natives are friendly and they have good home cooking. They told me that Captain Kirk and Spock were here and I just missed them.
Click to expand...
Click to collapse
How are the Craft Brews - any good?

Categories

Resources