[Q] Logcat broken - adb works - ONE Q&A, Help & Troubleshooting

Hello,
i got a problem with my logcat. I get no output. I tried "adb logcat" or the app "Logcat Viewer" with root.
What i have done so far:
I installed Xposed and multirom - i also uninstalled both for testing - no changes.
I tried deleting the /dev/logs/
Some infos:
Right now i'm on 4.4.4 (CM 11.0-XNPH44S)
Kernel: 3.4.104~AK.077.OPO.CM11
What can i do? I also got another OnePlus One with the same setup and it's working flawless there...
Thanks for any help

Ok i returned to stock completly - logcat worked again.
Installed Xposed - logcat worked.
Installed Multirom - logcat broken
Any Ideas?

Maybe LogCat is disabled by default in the Kernel Configuration/Setting? Which Kernel are you using?
Edit: Okay you're using the AK Kernel, try to install Synapse and UKM there should be a option to enable CatLog and then you could read it with root...
Gesendet von meinem A0001 mit Tapatalk

Synape says: Noo UCI support detected.
some info on my init.rc (maybe the problem is there)
# initialize ak
echo "[ak kernel] initialize boot script" | tee /dev/kmsg
# disable debugging on some modules
echo "0" > /sys/module/kernel/parameters/initcall_debug;
echo "0" > /sys/module/alarm/parameters/debug_mask;
echo "0" > /sys/module/alarm_dev/parameters/debug_mask;
echo "0" > /sys/module/binder/parameters/debug_mask;
echo "0" > /sys/module/xt_qtaguid/parameters/debug_mask;
echo "[ak kernel] disable debug mask" | tee /dev/kmsg
----
if [ -e /data/local/userinit.sh ];
then
log -p i -t userinit "Executing /data/local/userinit.sh";
logwrapper /system/bin/sh /data/local/userinit.sh;
setprop cm.userinit.active 1;
fi;
if [ -d /data/local/userinit.d ];
then
logwrapper busybox run-parts /data/local/userinit.d;
setprop cm.userinit.active 1;
fi;
----
/system/xbin/daemonsu --auto-daemon &
----

Download and Flash UKM_v3.6.1.1_Special_Ed.zip from ak . hiddenbytes . org (Homepage from AK Kernel) to get Kernel Support in Synapse. Then there should be an option

Ok that kind of fixed it. I enabled "logcat" in synapse, but:
now when i reboot i get no logcat, then it takes 2-3min and i get a SuperSu notification that Synapse is granted root.
Then the whole logcat pops in. Why is that?
Isn't there a kernel (stock or stable) that supports multirom without fiddling around with such important things like logcat?

Related

REQUEST/IDEA for a safety script for tweaking/OC

I had an Idea for a script that would run at bootup, and if a certain variable had a "value" of NOT 1.
then the script would change the CHMOD of a userinit.sh located in the sd-ext from 050 or 777 to 750 then it would change the variable "value" to 0 were it would stay untill another script that runs at shut down or reboot setts the variable to 1 and changes CHMOD back to 050 or 777 so that the userinit.sh is not run.
That way if a change is made during operating the phone that causes the phone to crash with out shutting down properly the script runs which causes the userinit.sh to run and "resets" userinit.sh values to a "default". Otherwise if shut down properly nothing happens.
This could be expanded on to include repairing the EXT or clearing some special cache or other stuff I am unfamiliar with but that you might want to run after a crash.(like logcat?)
any way what do you think? any promise?
I think, for overclocking purposes anyway, making the userinit.sh unrunnable would make the phone break immediately, as I think it would go to the highest available frequency. However, I like the idea, though I'm not sure how to run scripts on shutdown. I think for overclocking, it would check if the shutdown was clean on startup, and if not change the applicable line to the next lowest number, which it would get either from a seperate file or maybe it could be stuffed in the script itself. (Just my somewhat uneducated thoughts)
TheNewGuy said:
I had an Idea for a script that would run at bootup, and if a certain variable had a "value" of NOT 1.
then the script would change the CHMOD of a userinit.sh located in the sd-ext from 050 or 777 to 750 then it would change the variable "value" to 0 were it would stay untill another script that runs at shut down or reboot setts the variable to 1 and changes CHMOD back to 050 or 777 so that the userinit.sh is not run.
That way if a change is made during operating the phone that causes the phone to crash with out shutting down properly the script runs which causes the userinit.sh to run and "resets" userinit.sh values to a "default". Otherwise if shut down properly nothing happens.
This could be expanded on to include repairing the EXT or clearing some special cache or other stuff I am unfamiliar with but that you might want to run after a crash.(like logcat?)
any way what do you think? any promise?
Click to expand...
Click to collapse
Keep it simple. If a change in userinit.sh breaks your system, reboot to recovery and edit it and reboot again.
TheNewGuy said:
I had an Idea for a script that would run at bootup, and if a certain variable had a "value" of NOT 1.
then the script would change the CHMOD of a userinit.sh located in the sd-ext from 050 or 777 to 750 then it would change the variable "value" to 0 were it would stay untill another script that runs at shut down or reboot setts the variable to 1 and changes CHMOD back to 050 or 777 so that the userinit.sh is not run.
That way if a change is made during operating the phone that causes the phone to crash with out shutting down properly the script runs which causes the userinit.sh to run and "resets" userinit.sh values to a "default". Otherwise if shut down properly nothing happens.
This could be expanded on to include repairing the EXT or clearing some special cache or other stuff I am unfamiliar with but that you might want to run after a crash.(like logcat?)
any way what do you think? any promise?
Click to expand...
Click to collapse
most rom devs/tweakers launch userinit.sh by calling it with a sh
e.g.
/system/bin/sh /system/sd/userinit.sh
so it will still run !! ( as init doesn't care about permissions, it is god )
don't believe me?
Code:
echo "echo I ran" > /data/test.sh
chmod 000 /data/test.sh
sh /data/test.sh
Keep it simple. If a change in userinit.sh breaks your system, reboot to recovery and edit it and reboot again.
Click to expand...
Click to collapse
Yea thats the easy way!...
(Seriously I'm not that good at Linux Command Line code,wording,but i'm getting there.)
I think, for overclocking purposes anyway, making the userinit.sh unrunnable would make the phone break immediately, as I think it would go to the highest available frequency. However, I like the idea, though I'm not sure how to run scripts on shutdown. I think for overclocking, it would check if the shutdown was clean on startup, and if not change the applicable line to the next lowest number, which it would get either from a seperate file or maybe it could be stuffed in the script itself. (Just my somewhat uneducated thoughts)
Reply With Quote
Click to expand...
Click to collapse
And I know that most roms now have a script called something like in /system/etc/init.d/20userinit that runs at startup and checks to see if a userinit.sh is present in sd-ext,if so it runs it.Also I noticed that the script can be there but if it is CHMOD to 777 it wont run. This is the "Reset script" Set to restet to something you like and run other tasks to help Fix/Diagnose probs.
The OC changes would be made from a different script such as 86supersettings
Or a userinit located in system/sd maybe ?
The thing is making sure one is read before the other.
Any way I probably will just learn the language better and do it from recovery console.
Thanks again
TheNewGuy said:
Yea thats the easy way!...
(Seriously I'm not that good at Linux Command Line code,wording,but i'm getting there.)
And I know that most roms now have a script called something like in /system/etc/init.d/20userinit that runs at startup and checks to see if a userinit.sh is present in sd-ext,if so it runs it.Also I noticed that the script can be there but if it is CHMOD to 777 it wont run. This is the "Reset script" Set to restet to something you like and run other tasks to help Fix/Diagnose probs.
The OC changes would be made from a different script such as 86supersettings
Or a userinit located in system/sd maybe ?
The thing is making sure one is read before the other.
Any way I probably will just learn the language better and do it from recovery console.
Thanks again
Click to expand...
Click to collapse
chmod 777 makes it rw and executable by everyone!!!!!!!!
have a look here
http://www.comptechdoc.org/os/linux/usersguide/linux_ugfilesp.html
but as I mentioned above, init ( the initial progam runs as root and doesn't care about permissions, ( it wouldn't be very good at doing initialising the system if it had to seek permission )
Yea your right. Well I said I wasn't that good at this linux stuff! Now I Proved it.
Any way as you can see this is more of a request..... I still think it's a good Idea.
Thanks for your help FireRat.
Keep it simple. If a change in userinit.sh breaks your system, reboot to recovery and edit it and reboot again.
Click to expand...
Click to collapse
I understand how I could manualy Replace the modified script with a default one that was on my sdcard from within recovery after a faild OC change...but..
Are you saying I could actualy modify the original script from recover? Do you have any info on how? A link?
TheNewGuy said:
I understand how I could manualy Replace the modified script with a default one that was on my sdcard from within recovery after a faild OC change...but..
Are you saying I could actualy modify the original script from recover? Do you have any info on how? A link?
Click to expand...
Click to collapse
If you have RA-Recovery, adb works, so you can pull/push the userinit.sh script. You can also enter the terminal and use vi to edit it from recovery. You may have to mount the ext partition first, but that's pretty easy. "mount /system/sd" will do it, if /system/sd doesn't exist, "mkdir /system/sd".
Ok, Thanks that makes sense. I'm still learning adb though. And I tried vi once before with no luck. But now I know what to learn about.
Thanks a lot I appreciate it.
TheNewGuy said:
Ok, Thanks that makes sense. I'm still learning adb though. And I tried vi once before with no luck. But now I know what to learn about.
Thanks a lot I appreciate it.
Click to expand...
Click to collapse
ok, this would do what you want
/system/bin/shutdown
bold is new
Code:
#!/system/bin/sh
stop;
stop dhcpcd;
sleep 1;
[B]echo "1" > /data/cleanshutdown[/B]
for i in `cat /proc/mounts | cut -f 2 -d " "`;
do
busybox mount -o remount,ro $i 2>&1 > /dev/null;
done
sync;
if [ "$1" = "-r" ];
then
toolbox reboot -f;
else
toolbox reboot -fp;
fi
your script
Code:
#!/system/bin/sh
if [ "`cat /data/cleanshutdown`" != "1" ];
then
echo "shutdown was not clean"
[B]your tweaks[/B]
else
echo "shutdown was clean"
[B]your tweaks[/B]
fi
echo "0" > /data/cleanshutdown
I'm not sure you need it,
this is for education value, if you want to play ^^^ is where to start
Thank You!
That is perfect
I need to add all of this to the startup script right?
if [ "`cat /data/cleanshutdown`" != "1" ];
then
echo "shutdown was not clean"
your tweaks
else
echo "shutdown was clean"
your tweaks
fi
echo "0" > /data/cleanshutdown
Click to expand...
Click to collapse
I am going to use the beta boot up script from ZKX called 86Supersettings, but I could use a userinit/user.conf like most do. Correct?
TheNewGuy said:
Thank You!
That is perfect
I need to add all of this to the startup script right?
I am going to use the beta boot up script from ZKX called 86Supersettings, but I could use a userinit/user.conf like most do. Correct?
Click to expand...
Click to collapse
well, a .conf file should be just that
a file with configurations , not an executable script
well, a .conf file should be just that
a file with configurations , not an executable script
Click to expand...
Click to collapse
OK. I guess I meant both together. I would use the user.conf to make tweaks. Then have to modify the userinit.sh with the part you made. Something like.
#!/system/bin/sh--LEAVE THIS OUT. ITS ALL READY AT THE BEGINNING
if [ "`cat /data/cleanshutdown`" != "1" ];
then
echo "shutdown was not clean"
Dont run user.conf
and set cpu or other stuff to "default"
else
echo "shutdown was clean"
Run user.conf for tweaked settings
fi
echo "0" > /data/cleanshutdown
Click to expand...
Click to collapse
If I'm way off then I guess I need to re-read the Userinit thread.
TheNewGuy said:
OK. I guess I meant both together. I would use the user.conf to make tweaks. Then have to modify the userinit.sh with the part you made. Something like.
If I'm way off then I guess I need to re-read the Userinit thread.
Click to expand...
Click to collapse
well, in practise it doesn't matter
the file extension is only for use humans, if I'm looking in a directory and I see .conf I expect it to be a configuration file, I see .sh, its a shell script, .py python, pl perl .......
I see. Well Thanks again for your help. Your script does work. I tried it. crash on purpose.
I still have a lot to learn.
Folks;
1) If you're OC'ing via SetCPU, remember that this doesn't change the recovery kernel, and you can uninstall SetCPU from Recovery. From there, all you need is a "safe" userinit.sh.
3) If you're OC'ing via userinit.sh -- same deal. Your phone crashes on you and you just edit it to a safe config from recovery.
Tweak away.
This is what I ended up with
Thanks to
XxKolohexX
FireRat
Licknuts
Code:
#!/system/bin/sh
#
echo 255 >/sys/class/leds/blue/brightness;
echo "+++ Now entering the speedy madness of Z.X.D.!"
echo "----- let's clear that Cache first."
echo "----- Too much DBs make System go sloow..."
echo "----- Also be shure to check out CacheMate"
echo "----- It's in the Market. (Made by Android AppCritic)."
echo "----- It's way more powerfull than this script!"
echo "----- (Times 10 or 100... Clears everything :P)"
echo "----- And this script already took hours to build..."
echo "----- domenukk - 2010."
find /data/data -name app_admob_cache | while read line; do du -s $line/* | cut -f1; rm -Rf $line/*; done;
find /data/data -name cache | while read line; do du -s $line/* | cut -f1; rm -Rf $line/*; done;
find /data/data -name google_analytics.db | while read line; do du -s $line | cut -f1; rm -Rf $line; done;
find /data/data -name webviewCache.db | while read line; do du -s $line | cut -f1; rm -Rf $line; done;
rm -rf /data/data/com.facebook.katana/files
rm -rf /data/data/com.google.android.apps.genie.geniewidget/app_news_image_cache
rm -rf /data/data/com.code.i.music/app_admob_cache
rm -rf /data/data/fm.last.android/databases/google_analytics.db
echo "--- All the Cache has been cleared."
sleep 10
echo 0 >/sys/class/leds/blue/brightness;
####determin if shutdown was clean####
if [ "`cat /data/cleanshutdown`" != "1" ];
then
####RUN CLEAN SHUTDOWN SCRIPT####
echo 255 >/sys/class/leds/green/brightness;
####Turbo Script by [email protected]####
####Prioritize everyting ####
echo "----- Enabling Turbo."
dirty_writeback_centisecs=500
/system/bin/prior &
#
# Linux-SWAP
#
if [ -e /dev/block/mmcblk0p3 ];
then
if [ -n /dev/block/mmcblk0p3 ];
then
echo "+++ Set Linux Swap"
busybox mkswap /dev/block/mmcblk0p3;
fi;
if [ -e /dev/block/mmcblk0p3 ];
then
echo "+++ Set Swapiness"
echo 100 > /proc/sys/vm/swappiness;
echo "+++ Activate Swap"
busybox swapon /dev/block/mmcblk0p3;
fi;
fi;
####Better CPU Settings...####
echo "----- Speed up the CPU"
echo 633600 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq;
echo 122800 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq;
echo 95 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold;
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/ignore_nice_load;
echo 100000 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate;
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/powersave_bias;
echo 0 >/sys/class/leds/green/brightness;
echo 255 >/sys/class/leds/blue/brightness;
else
####RUN DIRTY SHUTDOWN SCRIPT####
echo 255 >/sys/class/leds/red/brightness;
####Turbo Script by [email protected]####
####Prioritize everyting ####
echo "----- Enabling Turbo."
dirty_writeback_centisecs=500
/system/bin/prior &
#
# Linux-SWAP
#
if [ -e /dev/block/mmcblk0p3 ];
then
if [ -n /dev/block/mmcblk0p3 ];
then
echo "+++ Set Linux Swap"
busybox mkswap /dev/block/mmcblk0p3;
fi;
if [ -e /dev/block/mmcblk0p3 ];
then
echo "+++ Set Swapiness"
echo 83 > /proc/sys/vm/swappiness;
echo "+++ Activate Swap"
busybox swapon /dev/block/mmcblk0p3;
fi;
fi;
####Better CPU Settings...####
echo "----- Speed up the CPU"
echo 576000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq;
echo 122800 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq;
echo 45 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold;
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/ignore_nice_load;
echo 2000000 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate;
echo 200 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/powersave_bias;
fi;
echo "0" > /data/cleanshutdown
echo "+++ continue on lame stock SuperD boot "
##Clearing Davlik-Cache##
for dc in dalvik-cache;
do
umount /cache/$dc;
rm -fr /cache/$dc;
mkdir /cache/$dc;
chown 1000:1000 /cache/$dc;
chmod 771 /cache/$dc;
mount -o bind /data/$dc /cache/$dc;
done;
Named 86supersettings so it runs after userinit.sh if one exists.
I put some Led indicators in so you can tell if it ran right at boot up. (about all I did besides copy and paste) Thinking about adding some other stuff like repair ext, or some kind of log to help me see what happed... any suggestions.
OK, here's another Idea for another safety feature...
I would like to "hard code" a temp fail-safe in to the code. I would like to get rid of SetCPU and when OC-ing it's nice to have a temp failsafe.SHUTDOWN!LOL
Any way I guess I would just add a few lines to some existing script in my phone?.... Any suggestions.
Thanks for your time.

[SCRIPT][v1.4]Bug Reporter (ultimate debugging) -- The MUST debugging AIO tool!

Greetings
Hello everyone, I made a script to help developers solve problems and you become a more helpful user.
What does it do?
It exports to sdcard :
dmesg
last_kmsg
wakelocks
kernel version
logcat (normal and long)
radio (aka modem log)
getprop (aka build.prop)
running processes
partition info
mount info
RAM info
interrupts
boot logs from kernels like : nAa, lupus
Total maximum possible logs are 14 files.
What should I do? :cyclops:
Send files from the folder with the time-stamp you have just created or send the tar.gz'ed file to the corresponding developer to help him. Each time you run the script it creates a different folder with a unique time-stamp of the time and date you dumped the logs.
Send whatever is needed, everything is in bug_reporter folder.
Ok, how do we install this thing?
Make sure you download the latest version [ v1.4 is the latest ] which is attached below and put it in your sdcard...and that your device is rooted.
Go to CWM recovery and flash it! It does no harm, it just copies a small 6kb file in your /system/xbin. So there is no need to uninstall it later. It will accompany you until you flash a new ROM.
If you are coming from another version, just flash it over.
If you are having any problems, first attach the debug.txt from bug_reporter folder and tell me your device, kernel and ROM. The problem might be your busybox installation though.
Ok, how do we use this thing?
Make sure you have a terminal app, I use this : https://play.google.com/store/apps/details?id=jackpal.androidterm
Open a terminal app and just type :
Code:
su
bug
IT WON'T WORK PROPERLY IF NOT EXECUTED FROM /system/xbin/, SO IT MAY FAIL WITH SCRIPT MANAGER. TRY AND REPORT BACK TO ME.
That's it?
Yes. :good:
If you have any questions, feel free to ask anything. :highfive:
Any screenshots? :angel:
Yep.
{
"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"
}
I want to contribute/redistribute
Oh, please do! :victory: Spread it, mod it, rewrite it, make your own version, inform developers, tell ROM cookers to include it, do whatever you want with it, but please don't forget me...
Post any improvements or modifications for me here. :fingers-crossed:
Here is the "source code" of it:
Code:
#!/system/bin/sh
DIRECTORY="/sdcard/bug_reporter"
clear
#ROOT CHECK, FOR SCRIPT TO WORK ON ALL su VERSIONS
clear
echo "Checking root permissions..."
if [ "$(id)" != "uid=0(root) gid=0(root)" ];
then
echo " - Denied?"
echo " * Please accept superuser permission..."
echo " /!\ FIRST TYPE: su"
echo
exit
elif [ "$(id)" == "uid=0(root) gid=0(root)" ];
then
echo " - Granted! SU binary version : $(su -V)"
else
echo
echo " /!\ Some errors occured... Obviously..."
echo " * Run the script again."
echo " - Asking superuser permissions..."
echo " ( i ) If you see somewhere "root", we are OK,"
echo " else, we are NOT."
su
echo " Look at it :"
id
exit
fi
{
#CREATING THE NEST DIRECTORY
#
if [ ! -d "$DIRECTORY" ];
then
echo " - Directory not found.
echo " - Creating...
mkdir $DIRECTORY
echo " - Done!
else
echo " - Fatal error! Exiting...
exit
fi
#FOR DEBUGGING REASONS
#
echo " - SU binary version : $(su -V)"
#VACUUM
#
clear
##SETTING MAX MB
if [ ! -f $DIRECTORY/max_mb.txt ];
then
echo Logs can easily exceed over the size you can imagine.
echo So, I will ask you if you want me to delete them
echo in the future.
echo
echo "How many MB of logs do you want to keep?"
echo "(5 MB recommended)"
read keep
KEEP_KB=$(echo $(($keep*1024)) )
echo $KEEP_KB > $DIRECTORY/max_mb.txt
clear
fi
SIZE=$(du -s $DIRECTORY | cut -f1)
MAX_MB=$(cat $DIRECTORY/max_mb.txt)
MB=$(echo $(($SIZE/1024)) )
##CHECKING IF MAX MB ARE REACHED AND PROMPT
if [ "$SIZE" -ge "$MAX_MB" ];
then
echo Log files have reached the maximum size you have set.
echo Their size is around $MB MB.
echo
echo Do you want to clean all logs?
echo "(y = Yes, clean. n = No, reset max MB value)"
read clean
echo
if [ "$clean" == "y" ] || [ "$clean" == "Y" ] || [ "$clean" == "yes" ] || [ "$clean" == "YES" ];
then
rm -r $DIRECTORY
echo - Cleaned!
echo - Re-run the script to set again the max MB value.
echo - Bye!
exit
elif [ "$clean" == "n" ] || [ "$clean" == "N" ] || [ "$clean" == "no" ] || [ "$clean" == "NO" ];
then
rm $DIRECTORY/max_mb.txt
echo - Value reseted!
echo - Re-run the script to set again the max MB value.
echo - Continuing...
sleep 2
else
echo "/!\ Illegal character. Try again...";
sleep 1
exec bug
fi
fi
#PRECALCULATIONS FOR LOGCATING
#
ls dev/log > $DIRECTORY/devlog
MAIN=$(grep main $DIRECTORY/devlog)
RADIO=$(grep radio $DIRECTORY/devlog)
clear
DATETIME=$(date +%Y%m%d%H%M%S)
export DATETIME
echo " ,-------------, Everything is saved on sdcard"
echo " / [email protected] / under bug_reporter folder."
echo "/_____________/__,------,"
echo "| Bug reporter v1.4 / Remember the timestamp!"
echo "|_______________,-----' Format : yyyymmddhhmmss"
echo
echo "It exports and compresses as tarball the following :"
echo "* dmesg"
echo "* last_kmsg"
echo "* wakelocks"
echo "* kernel version"
echo "* logcat (normal and long)"
echo "* radio (aka modem log)"
echo "* getprop (aka build.prop)"
echo "* running processes"
echo "* partition info"
echo "* mount info"
echo "* RAM info"
echo "* interrupts"
echo "* boot logs from kernels like : nAa, lupus"
echo
cd $DIRECTORY
#TIMESTAMP WHICH IS THE FOLDER'S NAME WHERE THE FILES ARE SAVED ON EACH RUN
echo - report timestamp : $DATETIME
mkdir "$DATETIME"
echo - exporting...
#FOR DMESG
echo - dmesg
dmesg > $DIRECTORY/"$DATETIME"/dmesg.txt
echo - OK!
#FOR LAST_KSMG
#
echo - last_kmsg
if [ -f /proc/last_kmsg ];
then
cat /proc/last_kmsg > $DIRECTORY/"$DATETIME"/last_kmsg.txt
echo - OK!
else
echo " /!\ last_kmsg not found!";
fi
#FOR WAKELOCKS
#
echo - wakelocks
if [ -f /proc/wakelocks ];
then
cat /proc/wakelocks > $DIRECTORY/"$DATETIME"/wakelocks.txt
echo - OK!
else
echo " /!\ wakelocks not found!";
fi
#FOR KERNEL VERSION
#
echo - kernel version
if [ -f /proc/version ];
then
cat /proc/version > $DIRECTORY/"$DATETIME"/kernel.txt
uname -a >> $DIRECTORY/"$DATETIME"/kernel.txt
echo - OK!
else
echo " /!\ version not found!";
fi
#FOR LOLCATS
#
if [ "$MAIN" != "main" ] || [ "$RADIO" != "radio" ];
then
echo " /!\ main and radio logging aborted!";
echo "* I can't logcat properly, loggers may be disabled."
echo "- Your ROM's dev must have disabled it via a script."
echo " OR"
echo "- Loggers are disabled from kernel."
else
##MAIN
echo - logcat
logcat -d > $DIRECTORY/"$DATETIME"/logcat.txt
echo - OK!
echo - long logcat
logcat -v long -d > $DIRECTORY/"$DATETIME"/long_logcat.txt
echo - OK!
##RADIO
echo - radio
logcat -b radio -v time -d > $DIRECTORY/"$DATETIME"/radio.txt
echo - OK!
fi
#FOR GETPROP
#
echo - getprop
getprop > $DIRECTORY/"$DATETIME"/getprop.txt
echo - OK!
#FOR RUNNING PROCESSES
#
echo - processes
ps > $DIRECTORY/"$DATETIME"/processes.txt
echo - OK!
#FOR PARTITION INFO
#
echo - partition info
df > $DIRECTORY/"$DATETIME"/partitions.txt
echo - OK!
#FOR MOUNTS
#
echo - mount info
mount > $DIRECTORY/"$DATETIME"/mounts.txt
echo - OK!
#FOR RAM
#
echo - RAM info
free > $DIRECTORY/"$DATETIME"/ram.txt
echo - OK!
#FOR INTERRUPTS
#
echo - interrupts
cat /proc/interrupts > $DIRECTORY/"$DATETIME"/interrupts.txt
echo - OK!
##----DEVIDER FOR SPECIAL LOGS----##
#BOOT LOG FOR nAa KERNELS AND DERIVATIVES
#
if [ -f "/boot.txt" ];
then
echo " ( i ) Oh, I found a boot log too!"
echo "- That's found on some nAa kernels, backing it up."
cat /boot.txt > $DIRECTORY/"$DATETIME"/boot.txt
echo - OK!
fi
#BOOT LOG FOR lupus KERNELS AND DERIVATIVES
#
if [ -f "/tmp/lupus.log" ];
then
echo " ( i ) Oh, I found a boot log too!"
echo "- That's found on some lupus kernels, backing it up."
cat /tmp/lupus.log > $DIRECTORY/"$DATETIME"/boot.txt
echo - OK!
fi
##----###----##
#CLEANING UP UNEEDED FILES FOR USER
#
echo - Cleaning up...
##CLEANING LAST TARBALL
rm *.tar.gz 2>&1 | >$DIRECTORY/devlog
##devlog IS A FILE OF PRECALCULATIONS FOR LOGCAT
if [ -f "$DIRECTORY/devlog" ];
then
rm $DIRECTORY/devlog
fi
#COMPRESSING FOR EASY SENDING
#
echo - Compressing logs...
echo - Done!
echo " ( i ) Send "$DATETIME".tar.gz to developer(s)!"
tar -zcf "$DATETIME".tar.gz "$DATETIME"
echo - Exiting...
#ADVERTISING THE SCRIPT
#
echo "http://forum.xda-developers.com/showthread.php?p=41107818" > $DIRECTORY/"$DATETIME"/"I used bug_reporter script.txt"
#DEBUGING MY SCRIPT
#
} 2>&1 | tee $DIRECTORY/debug.txt
exit
CHANGELOG
Code:
[B]v1.4[/B] [B][COLOR="Red"]MORE FEATURES[/COLOR][/B]-[COLOR="SeaGreen"]WORKS ON ALL SUPERUSER APPS[/COLOR]
- alternative root check
- now it's [B]not[/B] necessary to have SuperSU, you can use whatever you want, but you have to type [B]su[/B] first
- added additional logging of : [B]running processes[/B], [B]partition info[/B], [B]mount info[/B], [B]RAM info[/B], [B]interrupts[/B], [B]boot logs[/B] from [B]lupus[/B] kernel
- avoided potential bug with radio logging
- added some more info about kernel version logging (with [B]uname -a[/B] command)
- code clean up and more easier to follow
- faster? (it takes 1 second for me)
[B]v1.3[/B] [B][COLOR="Red"]ROCK STABLE[/COLOR][/B]-[COLOR="SeaGreen"]THE BEST[/COLOR]
- corrected root check
- added compatibility with CM10.1, it uses an older version of su and the script will ask you to install SuperSU to update it
- corrected and re-ordered some text
- optimized script speed by removing unnecessary su requests (it just takes 3 secs to finish)
- added build.prop backup with getprop command, it will help devs understand more info about your situation
- added some sort of advertisement of the script, so that it'll become popular
- added compression of the last logging folder, so that you can easily send it to dev(s)
- added more info on the script, made more presentable and explanatory for those who are willing to modify it
[B]v1.2[/B] [B][COLOR="Red"]STABLE[/COLOR][/B]-[COLOR="SeaGreen"]FULLY TESTED[/COLOR]
- finally fixed logcat exporting, now it will work for sure, fully tested
- cleaned up the script a lot and made it simplier for reading
- added radio (aka modem log), wakelocks and kernel version logging
- fixed terminal output logging for debugging better
[B]v1.1[/B] [I][COLOR="Gray"]it won't logcat, but everything else works[/COLOR][/I]
- fixed wrong logcat exporting, now when it's disabled, you'll know it
- added an auto-check for vaccuming logs after reaching above the MB size you set (logs can easily reach 10 MB)
- small bugfixes
- root check, in order to be sure we collect logs as root
- terminal output logging for debugging reasons
[B]v1.0 beta[/B] [I][COLOR="Gray"]works, but has many errors, it may even fail to flash.[/COLOR][/I]
- initial release
Thank you very much, this script will help a lot of people, including me
Sent from my R800i using xda premium
Is it possible to move this bug file to system/xbin instead of flashing it (gives error). And if yes, what should be the permissions?
zadrozny91 said:
Is it possible to move this bug file to system/xbin instead of flashing it (gives error). And if yes, what should be the permissions?
Click to expand...
Click to collapse
It's fixed. Just flash bug_reporter[v1.0]-nAa.zip, the permissions are 755. If you are unsure about permissions, see this : http://www.draac.com/chmodchart.html
But I am telling you to flash the fixed zip, it'll work.
leajian said:
It's fixed. Just flash bug_reporter[v1.0]-nAa.zip, the permissions are 755. If you are unsure about permissions, see this : http://www.draac.com/chmodchart.html
But I am telling you to flash the fixed zip, it'll work.
Click to expand...
Click to collapse
nice concept ,,but there are some problems
after taking log
both lastkmsg and logcat file show nothing(empty files)
long logcat shows this: 9 com.android.settings
only dmesg is correctly extracted
UPDATE!
Code:
[B]v1.1[/B]
- fixed wrong logcat exporting, now when it's disabled, you'll know it
- added an auto-check for vaccuming logs after reaching above the MB size you set (logs can easily reach 10 MB)
- small bugfixes
- root check, in order to be sure we collect logs as root
- terminal output logging for debugging reasons
Thanks man, I was going to write something similar until I found this.
I cannot attest to the zip's functionality as I use it with script manager, but I can say version 1.0 worked perfectly (producing the three possible proper log files) for me. Version 1.1 not so much it tells me 'I can't logcat' when I clearly can; gl with your 'main not found' problem.
Also a suggestion maybe include in your zip a copy of the script that goes to /sdcard/ so the user can easily access it in order to facilitate using it as a widget.
defiant07 said:
Thanks man, I was going to write something similar until I found this.
I cannot attest to the zip's functionality as I use it with script manager, but I can say version 1.0 worked perfectly (producing the three possible proper log files) for me. Version 1.1 not so much it tells me 'I can't logcat' when I clearly can; gl with your 'main not found' problem.
Also a suggestion maybe include in your zip a copy of the script that goes to /sdcard/ so the user can easily access it in order to facilitate using it as a widget.
Click to expand...
Click to collapse
Indeed, logcating won't work no matter what. It's a bug. I am aware of it. I'll fix it today I guess along with some code cleanup and considering your suggestion.
Sent from my MT11i using xda premium
Code:
[B]v1.2[/B] [B][COLOR="Red"]STABLE[/COLOR][/B]-[COLOR="SeaGreen"]FULLY TESTED[/COLOR]
- finally fixed logcat exporting, now it will work for sure, fully tested
- cleaned up the script a lot and made it simplier for reading
- added radio (aka modem log), wakelocks and kernel version logging
- fixed terminal output logging for debugging better
Also v1.0 beta re-added in case you want it.
Might convert this to external scripts for windows and unix as well. Btw, why the root checker? If it needs to be in system/xbin then you already have root
Sent from my Nexus 7 using Tapatalk HD
cybojenix said:
Might convert this to external scripts for windows and unix as well. Btw, why the root checker? If it needs to be in system/xbin then you already have root
Sent from my Nexus 7 using Tapatalk HD
Click to expand...
Click to collapse
:victory: Yeah, do whatever you want with it!
About the root check... Have you ever thought of "just in case" case? Well sometimes sh!t happens... Like the 7+7=16 embarrassing situation on final exams for example.
Anyway, probably won't need this check on other unix systems... You'll need to start the script with
Code:
sudo -i
and remove any
Code:
su -c
in the script. Also some logging files are available only for android, like logcat and logcat radio. If you need any help with converting I can help you both for windows and unix, just PM me.
EDIT : Opss, root check is buggy, I've discovered it thanks to you! I'll upload a fixed minor revision later.
leajian said:
:victory: Yeah, do whatever you want with it!
About the root check... Have you ever thought of "just in case" case? Well sometimes sh!t happens... Like the 7+7=16 embarrassing situation on final exams for example.
Anyway, probably won't need this check on other unix systems... You'll need to start the script with
Code:
sudo -i
and remove any
Code:
su -c
in the script. Also some logging files are available only for android, like logcat and logcat radio. If you need any help with converting I can help you both for windows and unix, just PM me.
EDIT : Opss, root check is buggy, I've discovered it thanks to you! I'll upload a fixed minor revision later.
Click to expand...
Click to collapse
I mean set up a script to run from a pc to debug android. Let's you run it on non rooted devices (parts of it anyway)
It's quicker than getting a user to push and run via the android terminal (which not everyone has)
Easier to run via an adb interface which can be supplied, and implement an update script everyone is running the same version
Btw won't need help check my signature for the root scripts
Sent from my Nexus 7 using Tapatalk HD
UPDATE! The tool is now in a super stable state of development.
Code:
[B]v1.3[/B] [B][COLOR="Red"]ROCK STABLE[/COLOR][/B]-[COLOR="SeaGreen"]THE BEST[/COLOR]
- corrected root check
- added compatibility with CM10.1, it uses an older version of su and the script will ask you to install SuperSU to update it
- corrected and re-ordered some text
- optimized script speed by removing unnecessary su requests (it just takes 3 secs to finish)
- added build.prop backup with getprop command, it will help devs understand more info about your situation
- added some sort of advertisement of the script, so that it'll become popular
- added compression of the last logging folder, so that you can easily send it to dev(s)
- added more info on the script, made more presentable and explanatory for those who are willing to modify it
can i get permission for adding your script in my cm-10.1 for LG-P350 ?
PecanCM said:
can i get permission for adding your script in my cm-10.1 for LG-P350 ?
Click to expand...
Click to collapse
Says in the post you can. Just credit
Sent from my Nexus 7 using Tapatalk HD
Just sharing. I use this:
bugreport > /sdcard/bug_report_`date +"%Y%m%d-%H%M"`
You may want to incorporate it in some way.
Sent from my GT-I9100 using xda premium
RovG said:
Just sharing. I use this:
bugreport > /sdcard/bug_report_`date +"%Y%m%d-%H%M"`
You may want to incorporate it in some way.
Sent from my GT-I9100 using xda premium
Click to expand...
Click to collapse
Thanks, I'll have it in mind, the reason why I didn't do this before is that I wanted it to be simple and not so informative.
In next update I might add some colors too!
Anyway here is an update... :fingers-crossed:
Code:
[B]v1.4[/B] [B][COLOR="Red"]MORE FEATURES[/COLOR][/B]-[COLOR="SeaGreen"]WORKS ON ALL SUPERUSER APPS[/COLOR]
- alternative root check
- now it's [B]not[/B] necessary to have SuperSU, you can use whatever you want, but you have to type [B]su[/B] first
- added additional logging of : [B]running processes[/B], [B]partition info[/B], [B]mount info[/B], [B]RAM info[/B], [B]interrupts[/B], [B]boot logs[/B] from [B]lupus[/B] kernel
- avoided potential bug with radio logging
- added some more info about kernel version logging (with [B]uname -a[/B] command)
- code clean up and more easier to follow
- faster? (it takes 1 second for me)

[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.

LEAGOO Shark 1 - Development & Support

In order to keep this thread clean, please use this one to discuss about Development, Support or Software Updates.​
ROMs:
Custom ROMs (based on Android 5.1)
AOSP-like 5.1 ROM - by GearLabs: https://mega.nz/#!lBtSBaDC!Jh1PXA_jEn8ynrISB8GeupVn-lJbHTlHtozhggb3UOg
Features:
- Clean Nexus-Like UI (get rid of the LEAGOO OS)
- Updated Google Apps (and most of them replace crappy Mediatek ones)
- Optimized for Maximum Performance
- with Root, Busybox & init.d support
What you'll lose compared to LEAGOO OS? (missing features)
- Miravision Menu
If you notice something else that is missing, just let me know.
Flashable Touchscreen Delay Fix: http://forum.xda-developers.com/attachment.php?attachmentid=3823450&d=1469457127​
Stock (Android 6.0)
160729: https://yadi.sk/d/tPz_sgnRtyqdA (Thanks @seraser for the report)
Stock (Android 5.1)
160712: https://mega.nz/#!UBFTzILY!Ympxl5aTRg1x5cAeEha12XgLHxXZ_kYPKDuYvlZUpIo
Previous Releases:
160620: https://yadi.sk/d/fp5sDnfJsvHve | Mirror
160530 (official): http://leagooftp.com.my/Shark 1/t87...10_LEAGOO_Shark_1_OS1.2_160530_release.tar.gz | Mirror
Flash Tools:
SP Flash Tool v5.1628 for Windows & Linux: https://mega.nz/#F!dYUm0TbB!SWeMLb5Wu1NbRzTPQ8-s_A
Flash Tool with Drivers provided by LEAGOO (Windows Only): http://leagooftp.com.my/Flashtool Elite Series, Shark 1/Flashtool Elite series, Shark 1.rar | Mirror
Choose the one that works better for you.
Recovery:
TWRP 3.0.2-1 - by GearLabs: https://mega.nz/#!9UsUXDJZ!b3-LhR8FfXpo9mPoN-vXxreVkMtJU0c1Y0_AGsPilvg
Previous Releases:
TWRP 3.0.0 - by @megthebest (buggy and outdated): https://mega.nz/#!0A8AlK7Y!yVXgeQksrVTe83IGQZdEY2FPC1dHmyvtcdpRmDtOPgE
Root:
SuperSU (flashable using TWRP): http://forum.xda-developers.com/apps/supersu
Extras (Root-Only):
Xposed Framework: http://forum.xda-developers.com/showthread.php?t=3034811
Useful Third-Party Apps:
Battery Life
Amplify: https://play.google.com/store/apps/details?id=com.ryansteckler.nlpunbounce&hl=en
Greenify: https://play.google.com/store/apps/details?id=com.oasisfeng.greenify&hl=en
Alberto96 said:
....... As soon as I have more time, I'll work on a CM ROM for this device.
Click to expand...
Click to collapse
Allready working on CM ROM?
I allways thought, CM is not possible for Mediatek Devices, because of Mediatek not opening Sources for its SoCs?
And also Leagoo doesnt seem to be very helpfull with CustomROMs.....
Robot12 said:
Allready working on CM ROM?
I allways thought, CM is not possible for Mediatek Devices, because of Mediatek not opening Sources for its SoCs?
And also Leagoo doesnt seem to be very helpfull with CustomROMs.....
Click to expand...
Click to collapse
Not yet, without kernel sources it will be hard.
Alberto96 said:
Not yet, without kernel sources it will be hard.
Click to expand...
Click to collapse
If I'm not wrong, you can use @bluefame CM12.1 sources for Elephone P8000, same SoC. Just need to change to our device parameters.
Btw, I dunno if the fact that Shark has 32bit Rom affects anything.
Sent from my s3 using Tapatalk
TWRP 3.0 for 160620 firmware
Hello guys,
I have flashed the full 160620 firmware as the OTA didn't work in my phone, even after exchanging TWRP with the stock recovery.
The Leagoo OTAs doesn't come as zip files so they can't be installed from TWRP either.
Now on 160620 fw I can't install TWRP 3.0.0 by @megthebest. It looks ok in SP_Flash_Tool but when I try to boot from TWRP I just get the dead Android robot on the screen and a message saying something like "No data available" or something like that.
Can it be that the partition map has changed and that the scatter file needs to be edited, or do I have something wrong in my phone?
Has anyone tried to do what I did? Flashed a full 160620 fw and tried to install TWRP 3.0.0 by @megthebest? If so, did you succeed?
---------- Post added at 08:42 AM ---------- Previous post was at 08:17 AM ----------
genesisalgor said:
If I'm not wrong, you can use @bluefame CM12.1 sources for Elephone P8000, same SoC. Just need to change to our device parameters.
Btw, I dunno if the fact that Shark has 32bit Rom affects anything.
Sent from my s3 using Tapatalk
Click to expand...
Click to collapse
The question I'd like to have an answer to is why they choose to go for a 32-bit Android 5.1, when it wouldn't have meant more work for them to go for the 64-bit version instead. There are many MT6753 devices at half the price of the Shark 1 on 64-bit Android. Could it be that there are some hardware in the Shark 1 that limits them to use 32-bit Android? The SoC is 64-bit for sure but how about bus controllers and other chips around the SoC?
If there are some 32-bit hardware in Shark 1 then the CM12.1 for Elephone P8000 won't be very useful as a starting point for a CM for Shark 1.
(Admin: this is partly a device question and maybe it should be in the other Shark 1 thread, but I answer with further questions to the quoted post about CM ROM)
The question I'd like to have an answer to is why they choose to go for a 32-bit Android 5.1, when it wouldn't have meant more work for them to go for the 64-bit version instead. There are many MT6753 devices at half the price of the Shark 1 on 64-bit Android. Could it be that there are some hardware in the Shark 1 that limits them to use 32-bit Android? The SoC is 64-bit for sure but how about bus controllers and other chips around the SoC?
If there are some 32-bit hardware in Shark 1 then the CM12.1 for Elephone P8000 won't be very useful as a starting point for a CM for Shark 1.
(Admin: this is partly a device question and maybe it should be in the other Shark 1 thread, but I answer with further questions to the quoted post about CM ROM)
Click to expand...
Click to collapse
No differences, the same MT6753 on both devices, or any other with the MT6753. What happens is, to compile/develop in 64bit its about twice of the work, storage, everything on theses socs demands more power than old MTKs.
Leagoo did this to avoid the work, and save money with the development. The SoC is able to run at 64Bit, but they put a 32bit software just to save with development, so theorically we don't have 64bit files on our Rom (I have a Jiayu S3 MT6752 it haves in example /system/libs and libs64. Leagoo and some other brands usually do this. But the processor/hardware is exact the same as P8000.
Sent from my s3 using Tapatalk
genesisalgor said:
No differences, the same MT6753 on both devices, or any other with the MT6753. What happens is, to compile/develop in 64bit its about twice of the work, storage, everything on theses socs demands more power than old MTKs.
Leagoo did this to avoid the work, and save money with the development. The SoC is able to run at 64Bit, but they put a 32bit software just to save with development, so theorically we don't have 64bit files on our Rom (I have a Jiayu S3 MT6752 it haves in example /system/libs and libs64. Leagoo and some other brands usually do this. But the processor/hardware is exact the same as P8000.
Sent from my s3 using Tapatalk
Click to expand...
Click to collapse
Unfortunately if they choose to use a 32-bit OS, then it isn't possible to run a 64-bit version due to bootloader incompatibilities.
Anyway, the new devices from LEAGOO will have a 64-bit OS. (just check my LEAGOO Z5L review, that ultra-low cost device has a 64-bit OS haha)
MacArthur67 said:
Hello guys,
I have flashed the full 160620 firmware as the OTA didn't work in my phone, even after exchanging TWRP with the stock recovery.
The Leagoo OTAs doesn't come as zip files so they can't be installed from TWRP either.
Now on 160620 fw I can't install TWRP 3.0.0 by @megthebest. It looks ok in SP_Flash_Tool but when I try to boot from TWRP I just get the dead Android robot on the screen and a message saying something like "No data available" or something like that.
Can it be that the partition map has changed and that the scatter file needs to be edited, or do I have something wrong in my phone?
Has anyone tried to do what I did? Flashed a full 160620 fw and tried to install TWRP 3.0.0 by @megthebest? If so, did you succeed?
Click to expand...
Click to collapse
I flashed the 160620 with SP-flashtool, but unticked "recovery" before flashing.
So after flashing, I still had TWRP.
Then reboot to TWRP, flashed super-su, everything ok.
So, i didnt do EXACTLY what you did, because I didnt had to install TWRP new after flashing 160620, but TWRP is working on my Phone with 160620.
When you flash, does it flash the stock-recovery? Maybe your recovery-partition got messed up, when you used Flashify to get Stock-recovery for the OTA-update?
Dont know, i am not that much of an expert........:silly:
Robot12 said:
I flashed the 160620 with SP-flashtool, but unticked "recovery" before flashing.
So after flashing, I still had TWRP.
Then reboot to TWRP, flashed super-su, everything ok.
So, i didnt do EXACTLY what you did, because I didnt had to install TWRP new after flashing 160620, but TWRP is working on my Phone with 160620.
When you flash, does it flash the stock-recovery? Maybe your recovery-partition got messed up, when you used Flashify to get Stock-recovery for the OTA-update?
Dont know, i am not that much of an expert........:silly:
Click to expand...
Click to collapse
Yes, Flashify messed up my phone badly. But since then I formated the internal storage except the bootloader so then with a clean install of 160620, invluding stock recovery it should be ok. Maybe I flash 160509 again because I know I can install TWRP in that fw. Then do like you, flash 160620 without stock recovery.
Has anybody use sp flash latest 11th july 2016 rom in needrom.com ?
some tips...
Well after 2 months with this phone, I think it's time to share some tips and improvements I found usefull.
** Please notify me if it's the wrong thread for posting these kind of stuff, but I thought it doesn't belong to the other leagoo shark thread... **
I personnally think it's a very good phone, good hardware, and you got a lot for the price. But like with other phones, some improvements doesn't hurt
(1)--> At first, you need to install TWRP recovery and you have to root the phone. You need it to tweak this beast.
Everything you need is in first post.
Important: For superSu, you have to untick "mount namespace separation", because most of the init.d tweaks won't work with this option activated. And you have to tick "activate su during boot" for the same reason
(2)--> Second step, install busybox (let's say with the stericson installer, install it directly -no need to wait for the "smart install" process-, and remove the installer apk after, because we doesn't need it anymore)
(3)--> Third step, let's add init.d support:
like I explained in the other leagoo shark thread, just search for the file install-recovery.sh In the directory /etc/ and modify it like that:
Code:
#!/system/bin/sh
/system/xbin/daemonsu --auto-daemon &
#init.d support
run-parts /system/etc/init.d/
All you have to do now, is to create a folder "init.d" (without the quotes) in /etc/ folder with 0777 permissions.
(4)--> Now that we have init.d support, here are some scripts I collected & adapted for our phone:
00opti:
This one increase sdcard0/sdcard1 -if any installed- read_ahead value for faster i/o, removes some debug flags, tunes oom, disable ipv6 and tunes ipv4 parameters
Code:
#!/system/bin/sh
echo 512 > /sys/block/mmcblk0/queue/read_ahead_kb
echo 512 > /sys/block/mmcblk1/queue/read_ahead_kb
setprop profiler.debugmonitor false
setprop profiler.launch false
setprop profiler.hung.dumpdobugreport false
setprop debugtool.anrhistory 0
setprop profiler.force_disable_ulog 1
setprop profiler.force_disable_err_rpt 1
setprop logcat.live disable
setprop dalvik.vm.debug.alloc 0
setprop dalvik.vm.checkjni false
echo 0 > /sys/module/alarm_dev/parameters/debug_mask
echo 0 > /sys/module/alarmtimer/parameters/debug_mask
echo 0 > /sys/module/binder/parameters/debug_mask
echo 0 > /sys/module/kernel/parameters/initcall_debug
echo 0 > /sys/module/xt_qtaguid/parameters/debug_mask
echo 0 > /sys/module/sbsuspend/parameters/sbsuspend_debug_mask
echo 0 > /sys/module/earlysuspend/parameters/debug_mask
echo 0 > /sys/module/lowmemorykiller/parameters/debug_level
sysctl -w vm.block_dump=0
sysctl -e -w vm.oom_dump_tasks=1
sysctl -e -w vm.oom_kill_allocating_task=1
echo "1" > /proc/sys/net/ipv6/conf/all/disable_ipv6
echo "1" > /proc/sys/net/ipv6/conf/default/disable_ipv6
/system/bin/ip6tables -P INPUT DROP
/system/bin/ip6tables -P OUTPUT DROP
/system/bin/ip6tables -P FORWARD DROP
echo "0" > /proc/sys/net/ipv4/tcp_timestamps
echo "1" > /proc/sys/net/ipv4/tcp_tw_reuse
echo "1" > /proc/sys/net/ipv4/tcp_sack
echo "1" > /proc/sys/net/ipv4/tcp_dsack
echo "1" > /proc/sys/net/ipv4/tcp_tw_recycle
echo "1" > /proc/sys/net/ipv4/tcp_window_scaling
echo "1" > /proc/sys/net/ipv4/tcp_moderate_rcvbuf
echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_all
echo "1" > /proc/sys/net/ipv4/icmp_ignore_bogus_error_responses
echo "5" > /proc/sys/net/ipv4/tcp_keepalive_probes
echo "30" > /proc/sys/net/ipv4/tcp_keepalive_intvl
echo "30" > /proc/sys/net/ipv4/tcp_fin_timeout
01rmt:
This one does classics 'perfect" remounts, tunes some fs parameters,ipv4 tweaks and fstrim function
Code:
#!/system/bin/sh
mount -o remount,noatime,noauto_da_alloc,nodiratime,barrier=0,nobh,errors=continue,nomblk_io_submit,ro /system
mount -o remount,commit=19,nomblk_io_submit,errors=continue,noatime,noauto_da_alloc,nosuid,nodev,nodiratime,barrier=0,nobh,rw /data
mount -o remount,commit=19,nomblk_io_submit,errors=continue,noatime,noauto_da_alloc,nosuid,nodev,nodiratime,barrier=0,nobh,rw /cache
echo 0 > /sys/kernel/debug/tracing/tracing_on
sysctl -e -w fs.lease-break-time=10
sysctl -e -w fs.inotify.max_queued_events=32000
sysctl -e -w fs.inotify.max_user_instances=256
sysctl -e -w fs.inotify.max_user_watches=10240
sysctl -e -w fs.file-max=165164
sysctl -w vm.laptop_mode=0
sysctl -w net.ipv4.icmp_echo_ignore_all=1
sysctl -w net.ipv4.route.flush=1
busybox fstrim -v /cache
busybox fstrim -v /system
busybox fstrim -v /data
02touch:
touch tuning **thanks seraser
Code:
#!/system/bin/sh
echo 20 > /sys/module/tpd_setting/parameters/tpd_em_auto_time_interval
echo 25 > /sys/module/tpd_setting/parameters/tpd_em_pressure_threshold
echo 4 > /sys/module/tpd_setting/parameters/tpd_em_debounce_time
echo 5 > /sys/module/tpd_setting/parameters/tpd_em_debounce_time0
echo 9 > /sys/module/tpd_setting/parameters/tpd_em_debounce_time1
03others:
disabling Zram, some other tweaks, temporary folders cleaning, scrolling and touch tuning
Code:
#!/system/bin/sh
swapoff /dev/block/zram0
setprop persist.sys.scrollingcache 3
setprop ro.min.fling_velocity 8000
setprop ro.max.fling_velocity 12000
echo "1" > /sys/module/tpd_setting/parameters/tpd_mode
echo "63" > /sys/module/hid_magicmouse/parameters/scroll_speed
setprop ENFORCE_PROCESS_LIMIT false
setprop MAX_SERVICE_INACTIVITY false
setprop MIN_HIDDEN_APPS false
setprop MAX_HIDDEN_APPS false
setprop CONTENT_APP_IDLE_OFFSET false
setprop EMPTY_APP_IDLE_OFFSET false
setprop MAX_ACTIVITIES false
setprop ACTIVITY_INACTIVE_RESET_TIME false
setprop MAX_RECENT_TASKS false
setprop MIN_RECENT_TASKS false
setprop APP_SWITCH_DELAY_TIME false
setprop MAX_PROCESSES false
setprop PROC_START_TIMEOUT false
setprop CPU_MIN_CHECK_DURATION false
setprop GC_TIMEOUT false
setprop SERVICE_TIMEOUT false
setprop MIN_CRASH_INTERVAL false
setprop touch.pressure.scale 0.001
busybox rm -f /data/*.log
busybox rm -f /data/tombstones/*
busybox rm -f /data/system/dropbox/*
busybox rm -f /storage/sdcard0/LOST.DIR/*
busybox rm -f /storage/sdcard1/LOST.DIR/*
busybox rm -f /data/system/usagestats/*
busybox rm -r /data/system/appusagestats/*
busybox rm -f /data/anr/*
busybox rm -f /cache/*.apk
busybox rm -f /cache/*.tmp
busybox rm -f /data/backup/pending/*
busybox rm -f /data/local/tmp/*
busybox rm -r /data/tmp/*
setprop media.stagefright.enable-player true
setprop media.stagefright.enable-meta true
setprop media.stagefright.enable-scan true
setprop media.stagefright.enable-http true
setprop media.stagefright.enable-aac true
setprop media.stagefright.enable-qcp true
04gsf:
disabling some google services functions, use it at your own risks ^^^ Can't remember where I find these tweaks, so all credits goes to the author(s)
For this script to work, you need sqlite3 binary, you can use the one I attached (put it in system/xbin/ with according 0777 permissions)
Code:
#!/system/bin/sh
/system/xbin/sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "update main set value = 'false' where name = 'perform_market_checkin' and value = 'true'"
/system/xbin/sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "update main set value = 0 where name = 'market_force_checkin' and value = -1"
/system/xbin/sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "update main set value = 0 where name = 'checkin_interval'"
/system/xbin/sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "update main set value = 'false' where name = 'checkin_dropbox_upload' and value = 'true'"
/system/xbin/sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "update main set value = 'false' where name = 'checkin_dropbox_upload:snet' and value = 'true'"
/system/xbin/sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "update main set value = 'false' where name = 'checkin_dropbox_upload:snet_gcore' and value = 'true'"
/system/xbin/sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "update main set value = 'false' where name = 'checkin_dropbox_upload:snet_idle' and value = 'true'"
/system/xbin/sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "update main set value = 'false' where name = 'checkin_dropbox_upload:snet_launch_service' and value = 'true'"
/system/xbin/sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "update main set value = 'false' where name = 'checkin_dropbox_upload:SYSTEM_RECOVERY_KMSG' and value = 'true'"
/system/xbin/sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "update main set value = 'false' where name = 'checkin_dropbox_upload:event_log' and value = 'true'"
/system/xbin/sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "update main set value = 'false' where name = 'checkin_dropbox_upload:SYSTEM_RECOVERY_LOG' and value = 'true'"
/system/xbin/sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "update main set value = 'false' where name = 'ads:jams:is_enabled' and value = 'true'"
/system/xbin/sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "update main set value = 'false' where name = 'analytics.service_enabled' and value = 'true'"
/system/xbin/sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "update main set value = '127.0.0.1' where name = 'url:feedback_url'"
/system/xbin/sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "update main set value = 0 where name = 'market_force_checkin' and value = 1"
/system/xbin/sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "update main set value = 0 where name = 'secure:bandwidth_checkin_stat_interval'"
/system/xbin/sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "update main set value = 0 where name = 'secure:send_action_app_error'"
/system/xbin/sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "update main set value = 0 where name = 'send_action_app_error'"
/system/xbin/sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "update saved_secure set value = '0' where name = 'send_action_app_error'"
/system/xbin/sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "update saved_global set value = '0' where name = 'send_action_app_error'"
05renice:
renice processes, especially fingerprint scanner service. Please note this two lines:
- busybox renice -19 `pidof com.teslacoilsw.launcher` <--- because I use Nova launcher instead of the stock launcher, wich I personally recommend.
- busybox renice -19 `pidof com.mrbimc.udn.lite:udn_service` <----- I'm using Ultimate Dynamic Navbar instead of the stock one, I will explain this later.
If you doesn't use this two apps, you can remove these lines. (well, if you don't, it will not hurt either)
Code:
#!/system/bin/sh
sleep 80
pid=$(busybox pgrep zygote 2>/dev/null)
busybox renice -1 $pid
busybox ionice -c 1 -n 0 -p $pid
for pid in `dumpsys activity services | busybox grep -i app=ProcessRecord | busybox awk '{ print $2 }' | busybox grep -v '/100[0-9]}' | busybox cut -d: -f1`; do
busybox renice 7 $pid
busybox ionice -c 2 -n 7 -p $pid
done;
busybox renice -20 `pidof com.android.phone`
busybox renice -19 `pidof egistec.fingerauth.host.service`
busybox renice -19 `pidof egistec.fingerauth.host.service:remote`
busybox renice -19 `pidof com.teslacoilsw.launcher`
busybox renice -19 `pidof com.mrbimc.udn.lite:udn_service`
busybox renice -19 `pidof com.android.mms`
busybox renice -15 `pidof com.android.systemui`
busybox renice -3 `pidof android.process.acore`
busybox renice -3 `pidof android.process.media`
(5)--> Now let's tweak the build.prop file a bit...
I added this lines to the build.prop file:
Code:
#seb tweaks
ro.media.enc.jpeg.quality=100
profiler.force_disable_err_rpt=1
profiler.force_disable_ulog=1
logcat.live=disable
wifi.supplicant_scan_interval=240
ro.kernel.android.checkjni=0
ro.kernel.checkjni=0
ro.config.nocheckin=1
persist.sys.scrollingcache=3
net.rmnet0.dns1=8.8.8.8
net.rmnet0.dns2=8.8.4.4
net.dns1=8.8.8.8
net.dns2=8.8.4.4
net.ppp0.dns1=8.8.8.8
net.ppp0.dns2=8.8.4.4
net.wlan0.dns1=8.8.8.8
net.wlan0.dns2=8.8.4.4
net.eth0.dns1=8.8.8.8
net.eth0.dns2=8.8.4.4
net.gprs.dns1=8.8.8.8
net.gprs.dns2=8.8.4.4
#seb experimental
mot.proximity.delay=25
windowsmgr.max_events_per_sec=90
ro.max.fling_velocity=12000
ro.min.fling_velocity=8000
debugtool.anrhistory=0
profiler.debugmonitor=false
profiler.launch=false
profiler.hung.dumpdobugreport=false
ro.config.hw_quickpoweron=true
net.tcp.mss.wlan=491520
net.tcp.mss.rmnet=491520
persist.service.zram=0
ro.zram.default=0
persist.sys.use_dithering=0
pm.sleep_mode=1
power.saving.mode=1
(6)-->Xposed
Let's install xposed, you need this for Amplify and Greenify, wich I strongly recommend against the stock power saver (I removed it).
You can also install the module "Deny location Consent", very usefull as I doesn't want other localisation than the gps one (very good with this phone by the way) and I'm tired of clicking "disagree" to the google popup when I activate location.
(7)-->Launcher
I doesn't like the stock launcher. At all. I prefer to use Nova Launcher and remove "Launcher3". Your choice
With my firmware version (20160530), there is no tts settings in "settings" :-/ ... But with Nova, and the widget "activity", you can access tts settings (.Settings$TextToSpeechActivity ;see image attachement). I found other interresting activities in parameters too like :
.RadioInfo
.Settings$NotificationsStationActivity
.Settings$GestureSettingsHct ("Somatosensoriel intelligente" ?....)
.Settings$CaptioningSettingsActivity
.Settings$HeadsetSettingActivity
.MonitoringCertInfoActivity
(8)-->Debloating
Use a file explorer (with root access granted) to remove some system apps and titanium backup (or another tool with similar functionnality) to freeze some others.
I removed:
-All the themes (related to launcher 3, wich I doesn't use) : cn.sh.hct.themeOtdColors, cn.sh.hct.themeOtdNusiness, cn.sh.hct.themeOtdEasyFlat, cn.sh.hct.themeOtd, cn.sh.hct.themeOtdluxurious. I keep the main app "Themes" because It allows us to easily change the lockscreen wallpaper. (via the app or via the galery app)
-UpgradeSys, Tags, Power On/Off scheduler, Power Saver, Pico sv (I installed google tts), MTKLogger, MTKNlpServices, MTK android suite daemon, ConfigUpdater, FWupgrade, FWUpgradeProvider, RockClient, Music (I prefer another player), MusicFx.
I froze:
-BSPTelephonyDevTool, com.mediatek.batteryWarning, FastCamera (doesn't know what it is for ?), MTK Thermal manager
(9)-->The navbar
Well, I think there are two problems with the leagoo navbar.
At First, I doesn't like the resolution changing when you activate/desactivate the navbar wich occurs with certain apps. It can even crash some very specific apps (like Igo primo).
And the second thing very annoying is that you have to hide it manually. Too bad there isn't a "auto hide feature".
I solved these two issues with "Ultimate Dynamic Navbar", http://forum.xda-developers.com/showthread.php?t=2270198
Now the navbar is superposed with anything on the screen, without changing the resolution of the running app. And you can specify a timeout for it to automatically hide.
Very customizable, very good and far better than the leagoo or the android stock navbar. You can use the integrated xposed module to hide the leagoo navbar; or modifying these two lines in build.prop (thanks to genesisalgor) :
ro.hct_navigationbar=0
qemu.hw.mainkeys=1
...... more to come if you are interrested
(like customizing the clock view with the flip cover -by modifyng framework-res.apk-,services disabling, optimizing system apks, bootanimation, .... and other tweaks).
Great stuff for helping other.
BTW related to navbar, the navbar in Shark isn't the stock Android Navbar, is another implementation. There is a line on build.prop called hct navbar or something, set it to 0 then the leagoo navbar goes away.
Then
qemu.hw.mainkeys=0
And you get stock Android navbar, which is a bit smaller, so I use Xstana to get a better one.
Sent from my s3 using Tapatalk
genesisalgor said:
BTW related to navbar, the navbar in Shark isn't the stock Android Navbar, is another implementation. There is a line on build.prop called hct navbar or something, set it to 0 then the leagoo navbar goes away.
Then
qemu.hw.mainkeys=0
And you get stock Android navbar, which is a bit smaller, so I use Xstana to get a better one.
Click to expand...
Click to collapse
Thanks a lot ! I still prefer to use Ultimate Dynamic Navbar as I found it more convenient and customizable than the "real" android stock navbar, but now I doesn't need to use the Xposed module, I only have to modify the build.prop like this:
ro.hct_navigationbar=0
qemu.hw.mainkeys=1
Hi.
@seb3773
From here...
http://forum.xda-developers.com/showthread.php?p=67860377
Can you check values of touch after init.d boot?
Thanks.
Enviado desde mi Shark 1 mediante Tapatalk
seraser said:
Hi.
@seb3773
From here...
http://forum.xda-developers.com/showthread.php?p=67860377
Can you check values of touch after init.d boot?
Thanks.
Enviado desde mi Shark 1 mediante Tapatalk
Click to expand...
Click to collapse
Yes, I checked the values (both with terminal and engineer mode) after boot and it's working, I mean the values are those mentionned in the script.
for testing purposes, can you install terminal emulator app, then open a windows, type "su" to get root and then type "run-parts", just to check there isn't something wrong with the busybox install ?
You should then see something like that:
Code:
[email protected]_35gu_l:/ # run-parts
BusyBox v1.24.1-Stericson (2015-11-06 19:11:24 EST) multi-call binary.
Usage: run-parts [-a ARG]... [-u UMASK] [--reverse] [--test] [--exit-on-error] [--list] DIRECTORY
Run a bunch of scripts in DIRECTORY
-a ARG Pass ARG as argument to scripts
-u UMASK Set UMASK before running scripts
--reverse Reverse execution order
--test Dry run
--exit-on-error Exit if a script exits with non-zero
--list Print names of matching files even if they are not executable
If it's ok, then try the command "run-parts --list /etc/init.d/ : you should get the listing of the scripts in init.d folder
seb3773 said:
Yes, I checked the values (both with terminal and engineer mode) after boot and it's working, I mean the values are those mentionned in the script.
for testing purposes, can you install terminal emulator app, then open a windows, type "su" to get root and then type "run-parts", just to check there isn't something wrong with the busybox install ?
You should then see something like that:
Code:
[email protected]_35gu_l:/ # run-parts
BusyBox v1.24.1-Stericson (2015-11-06 19:11:24 EST) multi-call binary.
Usage: run-parts [-a ARG]... [-u UMASK] [--reverse] [--test] [--exit-on-error] [--list] DIRECTORY
Run a bunch of scripts in DIRECTORY
-a ARG Pass ARG as argument to scripts
-u UMASK Set UMASK before running scripts
--reverse Reverse execution order
--test Dry run
--exit-on-error Exit if a script exits with non-zero
--list Print names of matching files even if they are not executable
If it's ok, then try the command "run-parts --list /etc/init.d/ : you should get the listing of the scripts in init.d folder
Click to expand...
Click to collapse
Run parts works fine, showme 02touch, I don't understand.
You feel the touch sensitive only with init.d and without settings fresh boot activation?
Thanks.
Enviado desde mi Shark 1 mediante Tapatalk
Guys instead of doing so many tweaks, all can be implemented into the ramdisk. Coming soon
Alberto96 said:
Guys instead of doing so many tweaks, all can be implemented into the ramdisk. Coming soon
Click to expand...
Click to collapse
Right. I was thinking of doing it as it is not a problem to decompile/compile mtk img files, but having these tweaks in scripts files/build.prop allow me to test, modify, remove some of them or add others tweaks without the hassle of playing with the ramdisk.
But you're definitively right, maybe we can make a list of the "good" working tweaks for the shark, and when we are sure it's ok and working properly, then integrate all of them in ramdisk.
---------- Post added at 01:28 PM ---------- Previous post was at 01:25 PM ----------
seraser, to be honnest, I already feel the touch enough sensitive for me without the tweaks, so I'm maybe not the good person to do this kind of test
Maybe others can try and tell us if there's a difference or not...
Shark 1 20160711 ROM: https://mega.nz/#!tV0DXRDI!7qEXPptHmC9eA9WORwzomdl3vy2nUrZzlTkJkewkcMo
- Rooted using SuperSU
- Busybox Support
- De-Bloated (just a bit)
- Improved Performance
Flashable using TWRP Recovery.
Touchscreen Sensitivity tweak hasn't been added because it seems that this last update doesn't have that issue.
I'm now working on an AOSP variant in order to get rid of the LEAGOO OS UI. UPDATE: Done, coming soon.
Alberto96 said:
Shark 1 20160711 ROM: https://mega.nz/#!tV0DXRDI!7qEXPptHmC9eA9WORwzomdl3vy2nUrZzlTkJkewkcMo
- Rooted using SuperSU
- Busybox Support
- De-Bloated (just a bit)
- Improved Performance
Flashable using TWRP Recovery.
Touchscreen Sensitivity tweak hasn't been added because it seems that this last update doesn't have that issue.
I'm now working on an AOSP variant in order to get rid of the LEAGOO OS UI.
Click to expand...
Click to collapse
Great work man!
And yeeeess, please AOSP it, I l don't like this UI [emoji14]
Sent from my s3 using Tapatalk

Modifying a 2/2 XL script for the 4/4 XL

Hi all,
You may or may not already be familiar with it, but there was a very nice script created by Joseph Miller to install new factory images (with or without locking the device). What I would like to do is to see how much of the script can be migrated to work with Pixel 4/4 XL.
Based on your experience with updating your 4/4 XL, do you see anything in the deuce script for the Pixel 2 that would need to be revised for use on a Pixel 4?
I'm certainly willing to test on my own device and any feedback would be appreciated. (I am relatively new to the Pixel 4 XL but very familiar with the Pixel 2 XL.)
.sh version is below:
Code:
#!/bin/sh
echo "Welcome to Deuces Flashing Script!"
echo "v5.0-Linux"
#to create a log, run: "script -c ./deuce-flash-all-v5.0.sh logfile.log"
echo "Checking if Fastboot binary is accessible.."
if [ -f "fastboot" ];
then
echo "\033[32m fastboot binary exists in script directory.\033[0m"
fb="./fastboot"
else
echo "\033[33mfastboot binary does not exist in script directory\033[0m" >&2
command -v fastboot | ( read fb; echo "\033[33mFound $fb. Will try to use this.\033[0m" )
fb="fastboot"
fi
echo "Checking if Fastboot works correctly"
if $fb --version
then
echo "\033[32m fastboot returned a version, continuing..\033[0m"
else
echo "\033[31m fastboot not working correctly.\033[0m"
exit 1
fi
echo "Checking if device is detected via Fastboot."
if [ -z $($fb devices -l) 2> /dev/null ]
then
echo "\033[31mDevice not detected in fastboot.\033[0m"
exit 1
else
echo "\033[32m Device detected!\033[0m"
fi
echo "Insuring unzip package is installed and accessible"
if unzip 1> /dev/null
then
echo "\033[32m unzip detected!\033[0m"
else
echo "\033[31m unzip is not installed, or is not working correctly!\033[0m"
echo "\033[33mplease install via:\033[0m"
echo "\033[33msudo apt install unzip\033[0m"
echo "\033[33mor\033[0m"
echo "\033[33msudo yum install unzip\033[0m"
exit 1
fi
zipcount="$(ls *.zip 2>/dev/null | wc -l)"
if [ "${zipcount}" -eq 1 ]
then
zipname="$(ls *.zip)"
echo ""
echo "\033[32mImage to flash: ${zipname}\033[0m"
elif [ "${zipcount}" -gt 1 ]
then
echo "\033[31m More than 1 zip!\033[0m"
echo "\033[31mPlease have only 1 zip file in the script folder.\033[0m"
zipnames="$(ls *.zip)"
echo "\033[33m${zipnames}\033[0m"
exit 1
else
echo "no zip files!"
exit 1
fi
echo -n "Are you SURE you want to continue? (y/N) "
read answer1
if echo "$answer1" | grep -iq "^y" ;then
echo "\033[33mThis Tool will reformat partitions in your device!\033[0m"
echo "\033[33mIt will attempt to keep your user data!\033[0m"
echo "\033[33mData could be lost! - Use At Your Own Risk!\033[0m"
echo -n "Continue? (y/N) "
read answer2
if echo "$answer2" | grep -iq "^y" ;then
echo "Checking if bootloader is unlocked."
echo "Look at device to confirm if script is waiting..."
$fb flashing unlock
echo "There will be errors if already unlocked, ignore."
else
echo "Aborting..."
exit 1
fi
else
echo "Aborting..."
exit 1
fi
echo "extracting the main image zip..."
unzip -j -o ${zipname} -d _work/
echo "setting active partition slot to A"
$fb --set-active=a
echo "flashing bootloader & radio..."
$fb flash bootloader _work/bootloader*.img
rm -rf _work/bootloader*.img
$fb reboot-bootloader
sleep 5
$fb flash radio _work/radio*.img
rm -rf _work/radio*.img
$fb reboot-bootloader
echo "extracting secondary image zip..."
zipname2="$(ls _work/*.zip)"
unzip -j -o ${zipname2} -d _work/
mkdir _work/_ 2>/dev/null
mv _work/*_other.img _work/_/ 2>/dev/null
echo "setting active partition slot to B"
$fb --set-active=b
bimgs="$(ls _work/_/*.img)"
for bimg in $bimgs
do
part=$(ls _work/_/*_other.img | cut -d "_" -f3 | cut -d "/" -f2)
echo $part
$fb flash $part $bimg
rm -rf $bimg
done
rm -rf _work/_
echo "setting active partition slot to A"
$fb --set-active=a
aimgs=$(ls _work/*.img)
for aimg in $aimgs
do
part=$(echo $aimg | cut -d "/" -f2 | cut -d "." -f1)
echo $part
$fb flash $part $aimg
rm -rf $aimg
done
echo -n "\033[33mDo you want to format user data? (y/N) \033[0m"
read answer3
if echo "$answer3" | grep -iq "^y" ;then
echo "\033[33m!!!This will wipe all your data!!!\033[0m"
echo -n "\033[31mAre you SURE? (y/N) \033[0m"
read answer4
if echo "$answer4" | grep -iq "^y" ;then
echo "Formatting user data.."
$fb format userdata 2>/dev/null
$fb reboot-recovery 2>/dev/null
echo "\033[32mDone!\033[0m"
else
echo "\033[36mSkipped formatting userdata.\033[0m"
echo "\033[32mDone!\033[0m"
exit
fi
else
echo "\033[36mSkipped formatting userdata.\033[0m"
echo "\033[32mDone!\033[0m"
exit
fi
exit
.bat version is here.
Note: I recommend placing the latest flashboot somewhere in your $PATH and running the script from within the unzipped factory image folder (where you have also unzipped the image zip).
Edit: Updated deuce script to v5.0 (thanks quorn23!)
Just a heads up, you're using an older version of the script, see original thread https://forum.xda-developers.com/pixel-2-xl/development/tool-deuces-bootloop-recovery-flashing-t3704761
I haven't tested it yet, but the 5.0 apparently works with A10 skimming through the last few pages in the thread. Once the Kernel is updated with the new sources (dez broke face unlock) i might have a look. What i probably would do is prepatch the boot image with magisk, besides that i would assume it's pretty straight forward, as it's AOSP.
Edit: as context, i'm coming from the pixel 2xl as well, i generally been using the Deuce script to update the 2 XL, if i recall correctly the only change i made was to adapt it to flash TWRP as well, which is currently not needed as not available for the 4 XL. (Devs wife is pregnant, so he's busy with more important personal life stuff currenty)
quorn23 said:
What i probably would do is prepatch the boot image with magisk, besides that i would assume it's pretty straight forward, as it's AOSP.
Click to expand...
Click to collapse
Out of habit, I've always re-added magisk manually, but you're right, this will require some additional dance steps without twrp. What i like about the original sh script is that the core dependency (for most scenarios) is a recent fastboot.

Categories

Resources