[Reference Guide] CHMOD Permissions - HTC One SV

-- If you are reading this through an application then it may very well be distorted. Please view this thread on the web.
-- They are binary codes and the layout is rwxrwxrwx where the 1st rwx is Owner, 2nd rwx is group, and the 3rd is other. Put a one(1) in the spots you want enabled, a 0 where you want them disabled. Then you convert the result of each group into decimal. For instance 101 (r-x) = 5.
Code:
|-----------------------------------------------|
| CHMOD Calculator |
|-----------------------------------------------|
| Permission | Owner | Group | Other |
|-----------------------------------------------|
|Read (4) | 1 | 1 | 1 |
|-----------------------------------------------|
|Write (2) | 1 | 0 | 0 |
|-----------------------------------------------|
|Execute (1) | 1 | 1 | 1 |
|-----------------------------------------------|
| Value | 7 | 5 | 5 |
|-----------------------------------------------|
Code:
|------------------------|
| Permission | Owner | (-rwx------)
|------------------------|
|Read (4) | 1 | 4x1=4
|------------------------|
|Write (2) | 1 | 2x1=2
|------------------------|
|Execute (1) | 1 | 1x1=1
|------------------------|
| Value | 7 | 4+2+1=7
|------------------------|
Code:
|------------------------|
| Permission | Group | (----r-x---)
|------------------------|
|Read (4) | 1 | 4x1=4
|------------------------|
|Write (2) | 0 | 2x0=0
|------------------------|
|Execute (1) | 1 | 1x1=1
|------------------------|
| Value | 5 | 4+0+1=5
|------------------------|
Code:
|------------------------|
| Permission | Other | (-------r-x)
|------------------------|
|Read (4) | 1 | 4x1=4
|------------------------|
|Write (2) | 0 | 2x0=0
|------------------------|
|Execute (1) | 1 | 1x1=1
|------------------------|
| Value | 5 | 4+0+1=5
|------------------------|
Code:
0 == --- == no access
1 == --x == execute
2 == -w- == write
3 == -wx == write / execute
4 == r-- == read
5 == r-x == read / execute
6 == rw- == read / write
7 == rwx == read / write / execute
(4+2+1) (4+0+1) (4+0+1)
OWNER GROUP OTHER
r w x r w x r w x
1 1 1 1 0 1 1 0 1
7 5 5
|_______|_______|
|
755
Gathering our Notes:
-- The first digit = selects attributes for the set user ID (4) and set group ID (2) and save text image (1)
-- The second digit = permissions for the user who owns the file: read (4), write (2), and execute (1)
-- The third digit = permissions for other users in the file's group: read (4), write (2), and execute (1)
-- The fourth digit = permissions for other users NOT in the file's group: read (4), write (2), and execute (1)
The octal (0-7) value is calculated by adding up the values for each digit:
Owner (rwx) = 4+2+1 = 7
Group(rx) = 4+1 = 5
Other (rx) = 4+1 = 5
chmod mode = -0755 = -rwxr-xr-x

chmod 0755 = -rwxr-xr-x
Other than that, looks like a fine tutorial...

DrBassman said:
chmod 0755 = -rwxr-xr-x
Other than that, looks like a fine tutorial...
Click to expand...
Click to collapse
Haha, typo. Thanks for bringing that to my attention.
Sent from my C525c using Tapatalk

Modding.MyMind said:
Haha, typo. Thanks for bringing that to my attention.
Sent from my C525c using Tapatalk
Click to expand...
Click to collapse
I once spent countless hours "cleaning up" from a typo. See if you can spot it...
# rm lo *
versus the correct/intended command:
# rm lo*
Of course, backups had not been run in over 90 days!!!

I see space between o&*
lol
that, I'm sure would have been tough to spot in the actual code

The space there would register any file with 'lo' but would also tackle any other file within the directory you are located at and delete them all if given by force. Depending if you ran that with root access or not would depend if you really took a beating on that oops lol. Meaning, Yes or No for each file lol. Having the code not spaced prevents that and will only focus on files of 'lo'.
Sorry, didn't go in to much details, about to lay down for the night.
Sent from my C525c using Tapatalk

The rm command is very dangerous if not properly used
Sent from my C525c using Tapatalk

Modding.MyMind said:
The rm command is very dangerous if not properly used
Sent from my C525c using Tapatalk
Click to expand...
Click to collapse
True story! One of those things you should only use if you know what you're doing
Sent from my C525c using Tapatalk

The # at the beginning the commands indicates the user is root. A $ at the beginning indicates user is not root.
The command was quickly typed over a slow dial-up by a colleague (i.e. NOT me)...It was a good 20 seconds before he realized the command hadn't completed & he spotted the typo....Oh $|-|I+ !!!! he said...

DrBassman said:
The # at the beginning the commands indicates the user is root. A $ at the beginning indicates user is not root.
The command was quickly typed over a slow dial-up by a colleague (i.e. NOT me)...It was a good 20 seconds before he realized the command hadn't completed & he spotted the typo....Oh $|-|I+ !!!! he said...
Click to expand...
Click to collapse
Whoa! 20 seconds hahahaha. Ouch....
Sent from my C525c using Tapatalk

Thank you very much for the information

Related

floating point arithmetic? - hack job workaround now included

is there a way to do floating point arithmetic in terminal?...or would bc binary need to be included since busybox does not have it? as of now you get a syntax error if using fp numbers in expression..or 0 when using division and result is a floating point.
Code:
# echo $(( 1 + 1 ))
echo $(( 1 + 1 ))
2
# echo $(( 1.0 + 1.0 ))
echo $(( 1.0 + 1.0 ))
arith: syntax error: " 1.0 + 1.0 "
# echo $(( 1 / 2 ))
echo $(( 1 / 2 ))
0
sh/bash has no native support for floating point math, so your solution must involve a binary executable. You can either use bc, or you can write a very simple C program and compile it for this platform....
i.e.,
Code:
//math.c
#include <stdlib.h>
#include <stdio.h>
int main (int argc, char ** argv){
float a = atof(argv[1]);
char op = argv[2][0];
float b = atof(argv[3]);
if (op == '+') printf("%f\n",a+b);
else if (op == '-') printf("%f\n",a-b);
else if (op == 'x') printf("%f\n",a*b);
else if (op == '/') printf("%f\n",a/b);
return 0;
}
$ ./math 1.5 + 2
3.500000
$ ./math 1.5 x 2
3.000000
$ ./math 1.5 - 2
-0.500000
$ ./math 1.5 / 2
0.750000
Oh and FYI, don't forget you can use variables in there, i.e.
$ A=1.5
$ B=2
$ OP=/
$./math $A $OP $B
0.750000
Is this the appropriate forum?
jdstankosky said:
Is this the appropriate forum?
Click to expand...
Click to collapse
Sorry, are you a moderator? :/
And yes, since this is a development matter, I'd say it falls within the DEVELOMPENT section..
lbcoder said:
sh/bash has no native support for floating point math, so your solution must involve a binary executable. You can either use bc, or you can write a very simple C program and compile it for this platform....
i.e.,
Code:
//math.c
#include <stdlib.h>
#include <stdio.h>
int main (int argc, char ** argv){
float a = atof(argv[1]);
char op = argv[2][0];
float b = atof(argv[3]);
if (op == '+') printf("%f\n",a+b);
else if (op == '-') printf("%f\n",a-b);
else if (op == 'x') printf("%f\n",a*b);
else if (op == '/') printf("%f\n",a/b);
return 0;
}
$ ./math 1.5 + 2
3.500000
$ ./math 1.5 x 2
3.000000
$ ./math 1.5 - 2
-0.500000
$ ./math 1.5 / 2
0.750000
Oh and FYI, don't forget you can use variables in there, i.e.
$ A=1.5
$ B=2
$ OP=/
$./math $A $OP $B
0.750000
Click to expand...
Click to collapse
thanks for the info. very helpful.
script workaround
i have constructed a workaround for doing fp math for determining partition sizes.
it's not pretty, but it gets the job done.
basically, it goes like this:
1. check to see if the number passed to the function is an integer
2. if not, i search the string for a "."
3. if the search turns up a "." (and units in GB) i break the number into two whole numbers (the integer portion..before the decimal, and the fraction portion after the decimal).
4. do the appropriate math on the integer section.
5. do the appropriate math on the fraction section, then divide by 10^#of digits after the decimal place.
6. add the two numbers together and voila! a hack job, floating point calculation.
Code:
ValidateSizeArg() {
# check for zero-length arg to protect expr length
[ -z "$1" ] && ShowError "zero-length argument passed to size-validator"
SIZEMB=
ARGLEN=`expr length $1`
SIZELEN=$(($ARGLEN-1))
SIZEARG=`expr substr $1 1 $SIZELEN`
SIZEUNIT=`expr substr $1 $ARGLEN 1`
# check if SIZEARG is an integer
if [ $SIZEARG -eq $SIZEARG 2> /dev/null ] ; then
# look for G
[ "$SIZEUNIT" == "G" ] && SIZEMB=$(($SIZEARG * 1024))
# look for M
[ "$SIZEUNIT" == "M" ] && SIZEMB=$SIZEARG
# no units on arg
[ -z "$SIZEMB" ] && SIZEMB=$1
# check if SIZEARG is a floating point number, GB only
elif [ `expr index "$SIZEARG" .` != 0 ] && [ "$SIZEUNIT" == "G" ] ; then
INT=`echo "$SIZEARG" | cut -d"." -f1`
FRAC=`echo "$SIZEARG" | cut -d"." -f2`
SIGDIGITS=`expr length $FRAC`
[ -z "$INT" ] && INT=0
INTMB=$(($INT * 1024))
FRACMB=$((($FRAC * 1024) / (10**$SIGDIGITS)))
SIZEMB=$(($INTMB + $FRACMB))
# it's not a valid size
else
ShowError "$1 is not a valid size"
fi
# return valid argument in MB
FUNC_RET=$SIZEMB
}
I was a basic/qbasic/gwbasic programmer in my younger days (like 12-14 yrs old)...
I feel ashamed that I have no idea of what this stuff is anymore. Thank God for guys like you.

Executing pm setInstallLocation on boot

If someone ever needs the answer:
Code:
#!/system/bin/sh
# set 0 = auto, 1 = internal, 2 = SD-Card
(
while : ; do
COMPLETED=$(logcat -d *:I *:D | grep -c android.intent.action.BOOT_COMPLETED)
if [ $COMPLETED -ne 0 ] ; then
echo "BOOT_COMPLETED: setting setInstallLocation"
pm set-install-location 1
exit 0
fi
sleep 1
done
) &
Thread closed.

[MT6582][init.d Tweaks][Mix n Match]-[ALPHA version]

INTRODUCTION
I am using MTK6582 device Agua Rio (close relative of Wiko Rainbow, Explay Fresh, Blu) for 4 months now and to be honest I really enjoyed using this Android phone and so I began searching for effective init.d tweaks that will be compatible for my phone. No offense to the other developers who worked hard on building a set of tweak scripts but most of them are not compatible with my phone. It is simply because the declarations of the path is not present in my device or sometimes they are just supported by MTK6582. So I started recreating my own scripts and have been using it for weeks and works as expected.
This is still in Alpha version so I am not expecting a 360-degree change in performance but if there's one thing I can guarantee you, they are working for the devices I've mentioned above and to prove that there are log files from where you can verify if the scripts were properly executed or not.
DISCLAIMER
I will not be held liable or responsible if you brick your device after flashing this tweak. ALWAYS HAVE YOUR BACKUP READY!
FLASH AT YOUR OWN RISK!!!
FEATURES
- Battery Tweaks (a lot of things going on here like battery re-calibration which will be done every 7 days, centisecs flushing interval, WiFi Sleep from Gaurav, Entropy tweak for battery, pm.sleep_mode)
- updated Loopysmoothness for MTK (I modified the declaration of variables so that the script can be a little more flexible - Credits to [email protected])
- VM Tweaks (experimental - modified scripts to work for MTK6582 credits to [email protected] and [email protected] of Fly-on)
- GPU Rendering (Enable GPU rendering for 2D operations)
- DHCPd script to clean the DHCP leases before starting
- SDboost - (modded script to work with MTK - credits to [email protected] of Fly-on and V6 Supercharger - SD Card read-ahead cache to 2048 KB)
- IOTweaks for responsiveness
- Network tweaks - (my own mix with a touch of [email protected] network tweaks)
- Zipalign - (modded script that will zipalign any new apps in /system/app, /system/framework, /data/app every reboot)
11-DEC-2014 ALPHA 3B UPDATES
- Remount - to make your device more responsive
- zRAM - utlizing ZRAM to increase performance - http://forum.xda-developers.com/showthread.php?t=2320734
- LagBuster - Credits to [email protected] for giving me an idea to incorporate RNGD Entropy
- Props - Adding more useful prop parameters
- Looping scripts (stored in /data/Tweaks/scripts)
-- Lagfix - will run every 60min and will execute fstrim Due to bad effects in the long run I have removed this (ref: http://man7.org/linux/man-pages/man8/fstrim.8.html)
-- Defrag - will run every 12hours to execute VACUUM and REINDEX to optimize the database - credits to [email protected] of Fly-on
-- CPU Hotplug - another battery tweak which I have modified which will run specific set of hotplug depending on the needs of your device and also depending on the current capacity of your battery. Credits to [email protected]
-- Xposed Log cleaner - this is one of the scripts I initially released to temporarily fix the logging problem of the latest Xposed Installer. If you don't have the app, the script will exit - http://forum.xda-developers.com/showpost.php?p=56439074
- Added host file to block annoying phishing and ad-serving websites
- Added resolv.conf to use Google's public DNS for faster browsing
11-DEC-2014 ALPHA 3B UPDATES
- lowmemorykiller - Another rotational script that will check and update your lowmemorykiller parameters - Won't really add much value since LMK resets its value from time to time.. Thanks again bro @kermage !
- 3G Booster - I have now added in the flashable installer the 3G hack from [email protected]
- Added an uninstaller in case you don't like the tweaks. Thank you for using.
WHAT'S INSIDE
/system/etc/init.d/
- 01_BattTweaks
- 02_LoopySmoothness
- 03_VMTweaks
- 04_GPURender
- 05_DHCPD
- 06_SDBoost
- 07_IOTweaks
- 10_DONOTDELETE
- 11_Network
- 13_EXT4Remount
- 14_Zram
- 16_LagBuster
- 17_SetProps
- 51_Zipalign
/system/etc/
- hosts
- resolv.conf
/system/xbin/
- bash
- busybox
- rngd
- sqlite3
- zip
- zipalign
/data/Tweaks/scripts
- 08_LagFix.sh
- 09_Defrag.sh
- 12_CPUHotplug.sh
- 15_Mem_Tweaks
- 50_XposedCleanLog.sh
/data/Tweaks/logs
*** All logs from init.d scripts and rotational scripts (/data/Tweaks/scripts)
Click to expand...
Click to collapse
REQUIREMENTS
1. Rooted
2. Busybox
3. Kernel with init.d support
4. Custom recovery tool (CWMR, TWRP, Philz, CarlivTouch)
5. Presence of mind
6. Faith!
HOW TO INSTALL
1. Download the flashable zip file and save it to your SDcard (remember where you saved it)
2. Power off your phone
3. Press Power + Vol UP + Vol DOWN simultaneously
4. Choose Recovery mode
5. Select install from SDcard
6. Install the zip file
7. Wait until the installation is completed.
8. Reboot!
To manually Push the tweak
1. Download the zip file into your SDcard
2. Extract the files
3. Copy all the contents of init.d to your /system/etc/init.d
4. Change the permission to rwxr-xr-x or rwxrwxrwx
5. Copy all the content of net to /system/etc
6. Change the permission of "hosts" and "resolv.conf" to rw-rw-rw
7. Go to /data and add a new folder named "Tweaks"
8. Go to /data/Tweaks and add new 2 folders - "scripts" and "logs"
9. Copy all the contents from "scripts" (from the zip file) to /data/Tweaks/scripts
10. Change the permissions of all the files in /data/Tweaks/scripts to rwxr-xr-x or rwxrwxrwx
11. Reboot.
HOW TO VERIFY
With the use of Root Explorer or ES Explorer, go to /data/Tweaks/logs and you will see the log files generated by the scripts. Also if you have a Terminal Emulator, you can check that the rotational scripts are running in the background.
Oh by the way, sorry to disappoint the Antutu lovers but the scripts were not customized to satisfy your eyes with Antutu scores.
To manually Delete the Tweaks
1. Delete all the files mentioned above from your phone using Root Explorer (or any file manager like ES explorer)
2. You can leave the files added in /system/xbin/ as it may help you in the future... 'just a suggestion but you can delete it if you want.
FAQs
Q: Not working. How can I tell the scripts were actually working?
A: Check the logs stored in /data/Tweaks/logs and inspect if there are log files. And with the use of any text editor check one by one the log files for any errors.
Q: There are no files in /data/Tweaks/logs, what happened?
A: It is possible that your ROM does not have init.d support. You can try using [email protected]'s fix for that (http://forum.xda-developers.com/showthread.php?t=1933849). Then you can try using again the tweak
Q: After flashing the tweaks, I cannot connect to my VPN app like Psiphon. How to fix this?
A: To be honest, I am unsure yet why but you can try either the following:
1. Check again the permission of /system/etc/hosts, /system/etc/resolv.conf and make sure they are set to rw-rw-rw. Then reboot;
2. OR, move/delete /system/etc/init.d/11_Network, /system/etc/hosts, /system/etc/resolv.conf then reboot
Q: My Internet connection is slow.
A: You can try adding the 3G hack from [email protected] (http://forum.xda-developers.com/showpost.php?p=42185612&postcount=100)
Q: The tweak is actually useless, it is not working. Should this be the case?
A: If I was not able to help you in any way, thanks for testing and feedback. Google is our friend.
Thank you all!
Mix n Match ALPHA 3B is now available
CHANGES 11-DEC-2014:
Please refer to the notes above. for the updates .
The INSTALLER will backup your previous tweaks and any conflicting files with Mix n Match. I have also added now an UNINSTALLER in case you are not satisfied. The UNINSTALLER will revert all the changes made before you flashed the latest tweaks.
Again... Flash at your own risk!
Thank you very much​
great job man.. :good:
what version of rio you're using?
mines s5501 and running on kitkat deodexed by edmhar, is your tweaks compatible with edmhar's deodexed stock rom?
Good, i'll write governer tweaks for hotplug and post link here, i'll make different versions for more battery and more responsiveness
Agua Rio
cheeze.keyk said:
great job man.. :good:
what version of rio you're using?
mines s5501 and running on kitkat deodexed by edmhar, is your tweaks compatible with edmhar's deodexed stock rom?
Click to expand...
Click to collapse
I am using Agua Rio V2
COOL!
umangleekha said:
Good, i'll write governer tweaks for hotplug and post link here, i'll make different versions for more battery and more responsiveness
Click to expand...
Click to collapse
Cool! And good JOB as well
updated the hotplug
umangleekha said:
Good, i'll write governer tweaks for hotplug and post link here, i'll make different versions for more battery and more responsiveness
Click to expand...
Click to collapse
Hey Bro, in this release I have modified your CPU hotplug and this is a rotational shell script
Code:
#!/system/bin/sh
# Name: 12_CPUHotplug.sh
# Date: 11/03/2014
# Author: Arsie Organo Jr. - [email protected]
# Link:
# About: This is additional tweaking for MT6582 devices
# to improve battery life
# You will need your device to be:
# 1. Rooted
# 2. Busybox is installed.
# 3. hotplug
# Credits: Fly-On, Medusa, and Umang Leekha hotplug
####################################################
# START
# Logging
datalog=/data/Tweaks/logs/12_CPUHotplug.log
# Check if your device supports Hotplug
HOTPLUG=/sys/devices/system/cpu/cpufreq/hotplug
if [ -d $HOTPLUG ] ; then
echo "This device supports hotplug." | tee -a $datalog;
else
echo "No hotplug support for this device. Exiting script now!" | tee -a $datalog;
exit 0
fi;
# If device is awake, it will check current battery level and also the %usr level of the CPU (all)
a=1
sleepme=10
while [ $a -ge 0 ]
do
busybox rm -f $datalog
busybox touch $datalog
BATTSTAT=`cat /sys/class/power_supply/battery/capacity`
MAXLVL=100
USRLVL=`busybox mpstat -P ALL | grep all | awk '{print $3}'`
USRLVL=${USRLVL%.*}
GAUGE=60
ANTUTU=`ps | grep com.antutu | wc -l`
ANTUTUUSE=`busybox top -b -n10 -d3 | grep com.antutu.ABenchMark | cut -c42-45 | awk '{sum+=$0}END{print sum*10}'`
if [ $ANTUTUUSE -gt 10 ] ; then
echo "Antutu Benchmark is still running. Unable to switch to Level 5 hotplug." | tee -a $datalog;
else
killall -9 com.antutu.ABenchMark
fi;
chmod 644 /sys/devices/system/cpu/cpufreq/hotplug/*
if [ $ANTUTU -gt 0 ] ; then
echo "Level Antutu Hotplug (Pro Performance) will be applied due to Antutu - $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $datalog;
echo "Battery Level: $BATTSTAT | MPSTAT Level: $USRLVL" | tee -a $datalog;
echo 85 > /sys/devices/system/cpu/cpufreq/hotplug/up_threshold;
echo 90 > /sys/devices/system/cpu/cpufreq/hotplug/cpu_up_threshold;
echo 50000 > /sys/devices/system/cpu/cpufreq/hotplug/sampling_rate;
echo 10 > /sys/devices/system/cpu/cpufreq/hotplug/cpu_down_differential;
echo 15 > /sys/devices/system/cpu/cpufreq/hotplug/down_differential;
echo 0 > /sys/devices/system/cpu/cpufreq/hotplug/powersave_bias;
echo 50000 > /sys/devices/system/cpu/cpufreq/hotplug/sampling_rate_min;
echo 4 > /sys/devices/system/cpu/cpufreq/hotplug/cpu_num_limit;
echo "up_threshold: $( cat /sys/devices/system/cpu/cpufreq/hotplug/up_threshold )" | tee -a $datalog;
echo "cpu_up_threshold: $( cat /sys/devices/system/cpu/cpufreq/hotplug/cpu_up_threshold )" | tee -a $datalog;
echo "sampling_rate: $( cat /sys/devices/system/cpu/cpufreq/hotplug/sampling_rate )" | tee -a $datalog;
echo "cpu_down_differential: $( cat /sys/devices/system/cpu/cpufreq/hotplug/cpu_down_differential )" | tee -a $datalog;
echo "powersave_bias: $( cat /sys/devices/system/cpu/cpufreq/hotplug/powersave_bias )" | tee -a $datalog;
echo "sampling_rate_min: $( cat /sys/devices/system/cpu/cpufreq/hotplug/sampling_rate_min )" | tee -a $datalog;
echo "cpu_num_limit: $( cat /sys/devices/system/cpu/cpufreq/hotplug/cpu_num_limit )" | tee -a $datalog;
echo "===== COMPLETED - $( date +"%m-%d-%Y %H:%M:%S" ) =====" | tee -a $datalog;
elif [ $USRLVL -lt $GAUGE ] || [ $BATTSTAT -lt $GAUGE ]; then
echo "Level 5 Hotplug (Battery Saver) will be applied - $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $datalog;
echo "Battery Level: $BATTSTAT | MPSTAT Level: $USRLVL" | tee -a $datalog;
echo 95 > /sys/devices/system/cpu/cpufreq/hotplug/up_threshold;
echo 95 > /sys/devices/system/cpu/cpufreq/hotplug/cpu_up_threshold;
echo 40000 > /sys/devices/system/cpu/cpufreq/hotplug/sampling_rate;
echo 1 > /sys/devices/system/cpu/cpufreq/hotplug/cpu_down_differential;
echo 1 > /sys/devices/system/cpu/cpufreq/hotplug/down_differential;
echo 100 > /sys/devices/system/cpu/cpufreq/hotplug/powersave_bias;
echo 40000 > /sys/devices/system/cpu/cpufreq/hotplug/sampling_rate_min;
echo 2 > /sys/devices/system/cpu/cpufreq/hotplug/cpu_num_limit;
echo "up_threshold: $( cat /sys/devices/system/cpu/cpufreq/hotplug/up_threshold )" | tee -a $datalog;
echo "cpu_up_threshold: $( cat /sys/devices/system/cpu/cpufreq/hotplug/cpu_up_threshold )" | tee -a $datalog;
echo "sampling_rate: $( cat /sys/devices/system/cpu/cpufreq/hotplug/sampling_rate )" | tee -a $datalog;
echo "cpu_down_differential: $( cat /sys/devices/system/cpu/cpufreq/hotplug/cpu_down_differential )" | tee -a $datalog;
echo "powersave_bias: $( cat /sys/devices/system/cpu/cpufreq/hotplug/powersave_bias )" | tee -a $datalog;
echo "sampling_rate_min: $( cat /sys/devices/system/cpu/cpufreq/hotplug/sampling_rate_min )" | tee -a $datalog;
echo "cpu_num_limit: $( cat /sys/devices/system/cpu/cpufreq/hotplug/cpu_num_limit )" | tee -a $datalog;
echo "===== COMPLETED - $( date +"%m-%d-%Y %H:%M:%S" ) =====" | tee -a $datalog;
elif [ $USRLVL -ge $GAUGE ] && [ $BATTSTAT -ge $GAUGE ] ; then
echo "Level 0 Hotplug (Pro Performance) will be applied - $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $datalog;
echo "Battery Level: $BATTSTAT | MPSTAT Level: $USRLVL" | tee -a $datalog;
echo 85 > /sys/devices/system/cpu/cpufreq/hotplug/up_threshold;
echo 85 > /sys/devices/system/cpu/cpufreq/hotplug/cpu_up_threshold;
echo 30000 > /sys/devices/system/cpu/cpufreq/hotplug/sampling_rate;
echo 15 > /sys/devices/system/cpu/cpufreq/hotplug/cpu_down_differential;
echo 15 > /sys/devices/system/cpu/cpufreq/hotplug/down_differential;
echo 0 > /sys/devices/system/cpu/cpufreq/hotplug/powersave_bias;
echo 30000 > /sys/devices/system/cpu/cpufreq/hotplug/sampling_rate_min;
echo 4 > /sys/devices/system/cpu/cpufreq/hotplug/cpu_num_limit;
echo "up_threshold: $( cat /sys/devices/system/cpu/cpufreq/hotplug/up_threshold )" | tee -a $datalog;
echo "cpu_up_threshold: $( cat /sys/devices/system/cpu/cpufreq/hotplug/cpu_up_threshold )" | tee -a $datalog;
echo "sampling_rate: $( cat /sys/devices/system/cpu/cpufreq/hotplug/sampling_rate )" | tee -a $datalog;
echo "cpu_down_differential: $( cat /sys/devices/system/cpu/cpufreq/hotplug/cpu_down_differential )" | tee -a $datalog;
echo "powersave_bias: $( cat /sys/devices/system/cpu/cpufreq/hotplug/powersave_bias )" | tee -a $datalog;
echo "sampling_rate_min: $( cat /sys/devices/system/cpu/cpufreq/hotplug/sampling_rate_min )" | tee -a $datalog;
echo "cpu_num_limit: $( cat /sys/devices/system/cpu/cpufreq/hotplug/cpu_num_limit )" | tee -a $datalog;
echo "===== COMPLETED - $( date +"%m-%d-%Y %H:%M:%S" ) =====" | tee -a $datalog;
fi;
sleep $sleepme
done
# END
Too interested in !
But I have to ask you how to uninstall if we did not use your special one, because of I have a sad experience before...
Good question, I always make sure that anything I install I create a document or uninstaller.. however, I was too busy at work and wanted to share this to my FB friends so I published it as Alpha version and wanted to get their feedback.
Give me a few minutes and I will update the doc on how to uninstall.
Hi dhampire,
I have updated the docs for you.. in the next release I will make an backup and uninstaller so that if someone does not want this tweaks they can go back from their previous set.
Good Job ser!
Next custom rom
LOL!
petiksmode said:
Next custom rom
Click to expand...
Click to collapse
hopefully I'd be able to cook one
Will this work on leagoo lead 3? mt6582, 512m of ram
init.d support
birdsilver said:
Will this work on leagoo lead 3? mt6582, 512m of ram
Click to expand...
Click to collapse
Please wait on my next release within this week and try on your phone. But please check first if your device supports init.d.
eyesfortech said:
Please wait on my next release within this week and try on your phone. But please check first if your device supports init.d.
Click to expand...
Click to collapse
Thank you very much for your response, I'll wait. I activated init.d thanks to Ryuinferno, via the terminal support.
:good:
The main page has been updated.. check out what's new
I have re-uploaded the MixnMatch_ALPHA_3b_Installer.zip installer today (12Dec2014) to fix the Bluetooth on/off bug.
Sorry for the inconvenience guys. It should be OK now.
Thanks your job! I'm trying now.
Hi.
Thanks your job! I'm trying now.
In my device, your log said that these scripts did not work.
- 09_Defrag.sh
- 12_CPUHotplug.sh
My device Lenovo s930 (MT6582) dual sim / Kitkat 4.4.2
Regards.
Problem (Sound)
Hi. I have a report for you master.
Sound problem.
1. Telephone.
In my case, I can't hear a voice (1st call), after hang up, I can hear a voice on 2nd call with big voice.
2. Alarm
I can't hear a sound.
Common is sound problem.
Regards.
Logs
dhampire said:
Hi.
Thanks your job! I'm trying now.
In my device, your log said that these scripts did not work.
- 09_Defrag.sh
- 12_CPUHotplug.sh
My device Lenovo s930 (MT6582) dual sim / Kitkat 4.4.2
Regards.
Click to expand...
Click to collapse
Can you send me the logs from /data/Tweaks/logs ?
Or please let me know if you are familiar with ADB Shell so that I can give you the commands to check.
Thanks.
17_SetProps
dhampire said:
Hi.
Thanks your job! I'm trying now.
In my device, your log said that these scripts did not work.
- 09_Defrag.sh
- 12_CPUHotplug.sh
My device Lenovo s930 (MT6582) dual sim / Kitkat 4.4.2
Regards.
Click to expand...
Click to collapse
dhampire said:
Hi. I have a report for you master.
Sound problem.
1. Telephone.
In my case, I can't hear a voice (1st call), after hang up, I can hear a voice on 2nd call with big voice.
2. Alarm
I can't hear a sound.
Common is sound problem.
Regards.
Click to expand...
Click to collapse
Hi,
Since we have a different device, can you delete 17_SetProps from /system/etc/init.d and then reboot?
Thanks.

[BOOTANIMATION][HDPI] Nexus 5 Boot Animation for codina [480x800]

Hii there!
I just wanna share some Nexus boot-anims which I ported from several sources
I use bash (batch processing) & ImageMagick cmds to make these boot-anims
1. Nexus 5 (Kitkat) Boot Animation
bootanim_nexus-5-kk-default.zip, src: Nexus 5 [kitkat]All APPS , stock Walls , Bootanimation ,Fonts
bootanim_htc-one-google-ed.zip, src: [bootanimation] Google Edition Boot Animation
2. Nexus (Lollipop) Boot Animation
bootanim_nexus-5-l-small.zip, src: [BOOTANIMATION] Nexus 5 Bootanimations Collection
bootanim_nexus-5-l-large.zip, src: [BOOTANIMATION] Nexus 5 Bootanimations Collection
You can put one of them to /system/media and rename it to bootanimation.zip
Don't forget to backup ur old boot animation if you want to. You do it all at your own risk!
Note: How to make these boot-anims?
1. bootanim_nexus-5-l-small.zip
Create a new directory.. for example: bootanim. Extract the source (keyword: N7 Maxed, Manual Install) to bootanim/orig
Then, put this script to bootanim/make-bootanim.sh & execute it to generate bootanim/bootanim.zip
Code:
#!/bin/bash
echo "make-bootanim.sh by @nieltg"
echo
BOOTANIM_SIZE=480x208
BOOTANIM_CROP=1080x468
mkdir mod
# Adjust all pictures
if [ -n "${BOOTANIM_CROP}" ] ; then
cmd_crop="-gravity center -crop ${BOOTANIM_CROP}+0+0 +repage"
else
cmd_crop=
fi
for i in orig/part? ; do
conv_dir=mod/$(basename ${i})
mkdir ${conv_dir} ; echo "mkdir: ${conv_dir}"
for j in $i/*.png ; do
conv_target=${conv_dir}/$(basename ${j})
convert ${j} ${cmd_crop} \
-resize ${BOOTANIM_SIZE} ${conv_target}
echo "converted: ${conv_target}"
done
done
# Generate desc.txt
echo "${BOOTANIM_SIZE//x/ } 30" > mod/desc.txt
tail -n +2 orig/desc.txt >> mod/desc.txt
echo "written: mod/desc.txt"
# Pack bootanim.zip
( cd mod ; zip -0 ../bootanim.zip -r * )
echo "packaged: bootanim.zip"
rm -r mod
echo
echo done.
echo
2. bootanim_nexus-5-l-large.zip
The steps are same like bootanim_nexus-5-l-small.zip.. Extract the source (keyword: N7 Mod, Manual Install) to bootanim/orig
But, you have to make some adjustments with bootanim/make-bootanim.sh
Modify BOOTANIM_SIZE & BOOTANIM_CROP:
Code:
BOOTANIM_SIZE=480x320
BOOTANIM_CROP=
3. bootanim_nexus-5-kk-default.zip
The steps are still the same like bootanim_nexus-5-l-small.zip.. Extract the source (keyword: Boot Animation) to bootanim/orig
And.. like usual, you have to make some adjustments with bootanim/make-bootanim.sh
Modify BOOTANIM_SIZE & BOOTANIM_CROP:
Code:
BOOTANIM_SIZE=480x96
BOOTANIM_CROP=1080x216
Add codes for tail-animation after "Adjust all pictures" section:
Code:
# Tail animation
l=0
mkdir mod/part2
echo "mkdir: mod/part2"
for k in 90 72 50 30 15 ; do
conv_num=$((l++))
conv_target=$(printf mod/part2/%03d.png ${conv_num})
convert mod/part1/059.png \
-resize ${k}% -gravity center -background black \
-extent ${BOOTANIM_SIZE} ${conv_target}
echo "scaled: ${conv_target}"
done
convert -size ${BOOTANIM_SIZE} canvas:black mod/part2/00${l}.png
echo "created: mod/part2/00${l}.png"
And replace "Generate desc.txt" section:
Code:
cat > mod/desc.txt << __DESC
480 96 24
c 1 0 part0
c 0 0 part1
c 1 0 part2
__DESC
echo "written: mod/desc.txt"
4. bootanim_htc-one-google-ed.zip
The steps are still the same like bootanim_nexus-5-l-small.zip.. Extract the source (keyword: GoogleBootanimation768-signed.zip) to bootanim/orig
And.. still like usual, you have to make some adjustments with bootanim/make-bootanim.sh
Modify BOOTANIM_SIZE & BOOTANIM_CROP:
Code:
BOOTANIM_SIZE=480x100
BOOTANIM_CROP=768x160
Add codes for tail-animation which steps is described on bootanim_nexus-5-kk-default.zip
Then, add more codes for head-animation after "Tail animation" section:
Code:
# Head animation
l=0
mkdir mod/part3
echo "mkdir: mod/part3"
easing_tmp=$(mktemp)
# Easing for ActionScript
# Source: http://gizma.com/easing
python3 - > ${easing_tmp} << __PYFILE
import math
def ease (t,b,c,d):
t /= d/2
if (t < 1): return c/2*t*t*t + b
t -= 2
return c/2*(t*t*t + 2) + b
for i in range (0,25):
print ("%.2f" % ease (i,0,100,24))
__PYFILE
easing=$(cat ${easing_tmp})
echo "generated: ${easing_tmp}"
rm ${easing_tmp}
for k in ${easing} ; do
conv_num=$((l++))
conv_target=$(printf mod/part3/%03d.png ${conv_num})
convert mod/part0/000.png \
-modulate ${k} ${conv_target}
echo "brightness: ${conv_target}"
done
And replace "Generate desc.txt" section:
Code:
cat > mod/desc.txt << __DESC
480 100 24
c 1 24 part3
c 1 0 part0
c 0 0 part1
c 1 0 part2
__DESC
echo "written: mod/desc.txt"
I use Fedora 21 64-bit to build these boot-anims.. I think you should be able to build it too on ur Linux
These scripts use common tools, ex: bash, ImageMagick, python3 which usually have already installed
You can use this script to make a new boot-anims or if you want to improve these boot-anims,
you can modify the scripts and rebuild them using these scripts..

[REF][REMOVAL] Facebook bloatware found on many devices + removal script [ROOT]

Greetings Everyone,
In recent years I've noticed that almost every phone I looked at has had some combination of the these potentially unwanted apps preinstalled. This is very concerning since Facebook isn't exactly known for respecting peoples privacy. On many phones they can't be removed or disabled without modifying the system and voiding your warranty.
Users should be made aware of this.
List of known apps:
Name: Facebook
Package: com.facebook.katana
App: /system/Facebook_stub/Facebook_stub.apk
Data:/data/user/0/com.facebook.katana
Used Permissions:
- com.facebook.system.stub.ENABLE_APPMANAGER
Provided permissions:
- com.facebook.permission.prod.FB_APP_COMMUNICATION
Name: Facebook App Installer
Package: com.facebook.system
App: /system/priv-app/FBInstaller_NS/FBInstaller_NS.apk
Data: /data/user/0/com.facebook.system/
Used Permissions:
- CHANGE_COMPONENT_ENABLED_STATE
- DELETE_PACKAGES
- GET_TASKS
- INSTALL_PACKAGES
- REAL_GET_TASKS
- com.facebook.system.ACCESS
Provided permissions:
- com.facebook.system.ACCESS
- com.facebook.system.stub.ENABLE_APPMANAGER
Name: Facebook App Manager
Package: com.facebook.appmanager
App: /system/app/FBAppManager_NS/FBAppManager_NS.apk
Data: /data/user/0/com.facebook.appmanager/
Used permissions:
- ACCESS_NETWORK_STATE
- ACCES_WIFI_STATE
- DOWNLOAD_WITHOUT_NOTIFICATION
- GET_PACKAGE.SIZE
- INTERNET
- READ_EXTERNAL_STORAGE
- RECIEVE_BOOT_COMPLETED
- WAKE_LOCK
- WRITE_EXTERNAL_STORAGE
- com.android.launcher.permission.INSTALL_SHORTCUT
- com.facebook.appmanager.ACCESS
Provided permissions:
- com.facebook.appmanager.ACCESS
Name: Facebook Gear VR Service
Package: Unknown
App: Unknown
Data: Unknown
Used permissions: Unknown
Provided permissions: Unknown
Name: Facebook Gear VR Sell
App: Unknown
Data: Unknown
Used permissions: Unknown
Provided permissions: Unknown
Name: Facebook Gear VR SetupWizard
App: Unknown
Data: Unknown
Used parmissions: Unknown
Provided permissions: Unknown
Name: Facebook Pages Manager
Package: com.facebook.pages.app
App: Unknown
Data: /data/user/0/com.facebook.pages.app
Used Permissions:
- VIBRATE
- INTERNET
- ACCESS_NETWORK_STATE
- WRITE_EXTERNAL_STORAGE
- ACCESS_WIFI_STATE
- com.facebook.katana.provider.ACCESS
- com.facebook.wakizashi.ACCESS
- com.facebook.pages.app.permission.C2D_MESSAGE
- com.google.android.c2dm.permission.RECIEVE
- GET_ACCOUNTS
- WAKE_LOCK
- CAMERA
- com.android.launcher.permission.INSTALL_SHORTCUT
- READ_EXTERNAL_STORAGE
Provided Permissions: com.facebook.pages.app.C2D_MESSAGE
Name: Facebook Services
Package: com.facebook.services
App: /system/priv-app/FBServices/FBServices.apk
Data: /data/user/0/com.facebook.services/
Used permissions:
- ACCESS_NETWORK_STATE
- DEVICE_IDLE_TEMP_WHITELIST
- INTERNET
- RECIEVE_BOOT_COMPLETED
- WAKE_LOCK
Provided permissions: None
Name: Instagram
Package: com.instagram.android
App: /system/app/FBInstagram_stub/FBInstagram_stub.apk
Data: /data/user/0/com.instagram.android
Used Permissions: Unknown
Provided Permissions: Unknown
Name: WhatsApp
Package: com.whatsapp
App: /system/app/FBWhatApp_stub/FBWhatsApp_stub.apk
Data: /data/user/0/com.whatsapp
Used permissions: Unknown
Provided permissions: Unknown
List of devices known to have them:
Asus
- ZenFone Max Pro M1
HTC
- Desire S
Huawei
- Ascend XT2
- Mate 20 Lite
- Mate 20 Pro
- P8
- P8 Lite 2016
- P8 Lite 2017
- P9
- P9 Lite
- P10
- P10 Lite
- P20
- P20 Lite
LG
- G6
- V10
- V30
- V40
Motorola
- G7
Realme
- C2
Samsung
- Galaxy A50
- Galaxy J3
- Galaxy J7
- Galaxy Note 4
- Galaxy Note 9
- Galaxy S6
- Galaxy S6 Edge
- Galaxy S7
- Galaxy S7 Edge
- Galaxy S10
- Galaxy S10+
- Galaxy S10e
- Galaxy S20
Sony
- Xperia Z5
- Xperia Z5 Compact
- Xperia X8
Xiaomi
- Mi Mix 3
- Redmi Note 4
- Redmi Note 5 Pro
Many others...
How to check if your device has them:
Go to Settings > Apps, click on the three dot menu and enable the option to show system apps.
You can also use an app like kaltura Device info or Stanley to see more details.
If you find anything, let me know and I'll add your device to the list.
Removing them from your device:
Note: Any user installed Facebook apps should still be able to function properly.
For unrooted devices there is no reliable method. Running this command through adb shell or a terminal emulator can disable them on some:
Code:
pm uninstall -k --user 0 <package>
For rooted devices just delete the apps respective system folder and reboot. This shouldn't break anything, but always make sure you have a way to restore the system partition in case anything does go wrong.
Here's a little shell script to quickly identify, backup and remove them from rooted phones:
Code:
#!/system/bin/sh
# Quick Facebook stuff remover for Android.
echo "Checking root access..." && echo
su -c 'echo > /data/local/tmp/is_rooted' 2> /dev/null
if [ -f /data/local/tmp/is_rooted ]; then
echo "Root access granted." && echo && su -c 'rm /data/local/tmp/is_rooted' && cnt=0; else
echo "Could not get root access." && exit; fi || exit
echo "Mounting system as read-write..." && echo
su -c mount -o remount,rw /system
echo "Backing up apps before removing..." && echo
su -c tar -czf /sdcard/fb_bloat_backup.tar.gz /system/app/Facebook_stub /system/app/FBInstagram_stub /system/app/FBWhatsApp_stub /system/priv-app/FBAInstaller_NS /system/app/FBAppManager /system/priv-app/FBServices /etc/permissions/privapp-permissions-facebook.xml 2> /dev/null
echo "Starting removal process..." && echo
if [ -f /system/app/Facebook_stub/Facebook_stub.apk ]; then
su -c 'rm -r /system/app/Facebook_stub' && echo "Removed Facebook placeholder from system." && cnt=$(( $cnt + 1 )) && echo; fi
if [ -f /system/app/FBInstagram_stub/FBInstagram_stub.apk ]; then
su -c 'rm -r /system/app/FBInstagram_stub' && echo "Removed Instargam placeholder from system." && cnt=$(( $cnt + 1 )) && echo; fi
if [ -f /system/app/FBWhatsApp_stub/FBWhatsApp_stub.apk ]; then
su -c 'rm -r /system/app/FBWhatsApp_stub' && echo "Removed WhatsApp placeholder from system." && cnt=$(( $cnt + 1 )) && echo; fi
if [ -f /system/priv-app/FBInstaller_NS/FBInstaller_NS.apk ]; then
su -c 'rm -r /system/priv-app/FBInstaller_NS' && echo "Removed Facebook App Installer from system."&& cnt=$(( $cnt + 1 )) && echo; fi
if [ -f /system/app/FBAppManager_NS/FBAppManager_NS.apk ]; then
su -c 'rm -r /system/app/FBAppManager_NS' && echo "Removed Facebook App Manager from system." && cnt=$(( $cnt + 1 )) && echo; fi
if [ -f /system/priv-app/FBServices/FBServices.apk ]; then
su -c 'rm -r /system/priv-app/FBServices' && echo "Removed Facebook Services from system." && cnt=$(( $cnt + 1 )) && echo; fi
if [ -f /system/etc/permissions/pivapp-permissions-facebook.xml ]; then
su -c 'rm /system/etc/permissions/privapp-permissions-facebook.xml' && echo "Removed Facebook system permissions." && echo; fi
echo "Remounting sytem as read-only..." && echo
su -c mount -o remount,ro /system
if [ $cnt -ge 1 ]; then
echo "$cnt app(s) removed, reboot to apply changes."; else
echo "Nothing to remove." && rm /sdcard/fb_bloat_backup.tar.gz; fi && exit
Download: https://mega.nz/#!9XYzGYRK!3LgFX0JNQhTaHjT4T1Tn1Pr6cEsw1DnnbMwbjkM2cPI
I will do my best to keep this thread updated, any contributions are welcome

Categories

Resources