IMPORTANT NOTICE
- I CANNOT AND WILL NOT BE RESPONSIBLE FOR ANYTHING YOU FLASH TO YOUR DEVICE
- I CAN ONLY TEST THIS ON A HONOR VIEW 10 US BKL-L04
- IF YOU POST HERE LOOKING FOR SUPPORT BECAUSE YOU FLASHED IT TO ANYTHING OTHER THAN WHAT I CAN SUPPORT, YOU WILL BE IGNORED
Click to expand...
Click to collapse
What Does This Mod Do?
It reconfigures Interactive governor
- - More will come as more Kernel's get built
- - And I figure out a better way to control the governor detection
It Disables the RUN_IN_BACKGROUND flag for a ton of apps (see the list below)
- - you can control this by adding or removing package names from /data/local/rib_allowed
- - /data/local/rib_allowed contains the apps that will NOT get RIB disabled
It Disables the WAKE_LOCK for a ton of apps (see list below)
- - you can control this by adding or removing package names from /data/local/wl_allowed
- - /data/local/wl_allowed contains the apps that will NOT get WL disabled
It enables Init.d suport
It cleans up some un-necessary junk on boot
It trims partitions on boot (and once per week)
It tweaks some caching, networking, media scanning, etc...
How Do I Flash It?
Make sure you have TWRP Flashed
Make sure you are Rooted
Make sure your data partition is already decrypted
- You must have /data decrypted: https://forum.xda-developers.com/showpost.php?p=76132974&postcount=430
Backup your stock ramdisk... you will need this to uninstall
Download the attachment
Reboot to TWRP
Select the file you downloaded and flash it
Reboot
Profit
How Do I check if it's working?
You can drop into adb shell and run:
Code:
su
grep -ir "kev" /dev/kmsg
To see if it ran, other than that, you should notice your device behaving a bit smoother, and have a bit more battery life
You can also check the logs and .running files inside /data/local/
THANKS
@[email protected]_USA - and the entire Huawei Team for providing me with this incredible device
@Dees_Troy - and the entire TWRP team for providing us with TWRP
@topjohnwu - For Magisk
UNINSTALL
Use fastboot and flash back your stock ramdisk.img
Code:
adb reboot bootloader
fastboot flash ramdisk /YOU/PATH/ramdisk.img
fastboot reboot
DONATIONS
CHANGELOG
v.1.5.6
- Had to change the location of the RIB and WL whitelists
- - Look for them in /data/local
v.1.5.5
- Finally have the scripts firing off
- - Thank you sepolicy....
- All scripts now run with full bash instead of sh
- logged to /data/local
- - only RIB and WL are logged
- reworked the tweaks so they'd run better
- create backup of ramdisk
- - check /sdcard/Download/
- - copy this over to your machine if you want to "uninstall" this tweak set, you will need to fastboot flash it in order to do so
v.1.4.0
- Reworked when gov tweaks are fired off
- Added in build.prop tweaks.
- - Net Congestion, Reconfigure Dalvik for better memory management, remove dha, add in fha config
- - tweak hwui caches, reconfig fling, misc power and performance tweaks.
v.1.3.1
- Now detects governors in order to tweak them
- - right now, only Interactive and blu_active are configured. More will come as more kernel's get built
- Injects straight into your ramdisk partition. So, make sure you have backed it up prior to flashing this
v.1.1.9
- Reworked flashing mounts
- Added in minor logging to /dev/kmsg
v.1.0.1
- Initial Release
- - Was able to utilize /vendor/etc/init to drop a init.*.rc script to run everything
ON DECK
- As soon as we have full Aroma support, I will be adding in a set of build.prop tweaks
- - Yes, Aroma is necessary, because you may or may not want some of these, so rather than forcing them all on you, I will give you the choice...
- HINT: These are working fantastically on my device
Code:
YOU WILL HAVE TO WAIT AND SEE
DISCLAIMER
- The packages in these lists are just what I've found to allow the primary services to continue running normally, with a couple added packages for items I have installed
- If you would like some added to this, you can edit your rib_allowed and wl_allowed files
- If you think some packages should be included by default, I invite you to post the package name, and why you think it should be "allowed"
To get a list of your packages, drop to adb shell and run
Code:
su
echo $(pm list packages -f | sed -e 's/.*=//' | sort) >> /mnt/sdcard/All-Packages.txt
This will write out all packages currently on your device
RUN BACKGROUND WHITELIST
- file is located in /data/local/rib_allowed
Code:
com.android.calendar
com.android.contacts
com.android.deskclock
com.android.email
com.android.exchange
com.android.mediacenter
com.android.phone
com.google.android.apps.messaging
com.google.android.syncadapters.contacts
com.huawei.android.totemweather
com.huawei.android.totemweatherwidget
com.huawei.wifiprobqeservice
mega.privacy.android.app
com.fitbit.FitbitMobile
com.fooview.android.fooview
com.plexapp.android
net.openvpn.openvpn
WAKELOCK WHITELIST
- file is located in /data/local/wl_allowed
Code:
android
com.android.bluetooth
com.android.calendar
com.android.contacts
com.android.deskclock
com.android.email
com.android.incallui
com.android.phone
com.android.server.telecom
com.huawei.wifiprobqeservice
com.google.android.apps.messaging
com.huawei.ims
com.huawei.powergenie
com.fitbit.FitbitMobile
mega.privacy.android.app
com.topjohnwu.magisk
BUILD.PROP TWEAKS
From version 1.4.0 and on, I am including my build.prop tweaks. Note, this will not overwrite your existing build.prop, it will only modify it... and it does so intelligently. The tweaks included are as follows:
Code:
# KEVP75-DALVIK: Reconfigure the dalvik cache
dalvik.vm.heapstartsize=8m
dalvik.vm.heapgrowthlimit=256m
dalvik.vm.heapsize=512m
dalvik.vm.heaptargetutilization=0.50
dalvik.vm.heapminfree=4m
dalvik.vm.heapmaxfree=16m
# KEVP75-FHA: Enable FHA and configure for our device
ro.config.fha_enable=true
ro.sys.fw.use_trim_settings=true
ro.sys.fw.empty_app_percent=50
ro.sys.fw.trim_empty_percent=100
ro.sys.fw.trim_cache_percent=100
ro.sys.fw.bservice_enable=true
ro.sys.fw.bservice_limit=5
ro.sys.fw.bservice_age=5000
ro.sys.fw.trim_enable_memory=2147483648
# KEVP75-HWUI: Reconfigure the hwui cache
ro.hwui.texture_cache_size=72
ro.hwui.layer_cache_size=48
ro.hwui.path_cache_size=32
ro.hwui.texture_cache_flushrate=0.4
ro.hwui.shape_cache_size=4
ro.hwui.gradient_cache_size=1
ro.hwui.drop_shadow_cache_size=6
ro.hwui.r_buffer_cache_size=8
ro.hwui.text_small_cache_width=1024
ro.hwui.text_small_cache_height=1024
ro.hwui.text_large_cache_width=4096
ro.hwui.text_large_cache_height=4096
# KEVP75-FLING
windowsmgr.max_events_per_sec=300
ro.max.fling_velocity=15000
ro.min.fling_velocity=8000
# KEVP75-GAMING
persist.sys.NV_FPSLIMIT=60
persist.sys.NV_POWERMODE=1
persist.sys.NV_PROFVER=15
persist.sys.NV_STEREOCTRL=0
persist.sys.NV_STEREOSEPCHG=0
persist.sys.NV_STEREOSEP=20
persist.sys.purgeable_assets=1
# KEVP75-PERF
debug.kill_allocating_task=0
force_hw_ui=true
persist.sys.use_dithering=1
ro.min_pointer_dur=1
persist.sys.ui.hw=1
ro.kernel.android.checkjni=0
# KEVP75-POWER
ro.config.hw_power_saving=1
power.saving.mode=1
pm.sleep_mode=1
ro.ril.disable.power.collapse=0
ro.ril.power_collapse=1
power_supply.wakeup=enable
ro.mot.eri.losalert.delay=1000
ro.config.hw_power_saving=1
ro.ril.disable.power.collapse=0
debug.performance.tuning=1
debug.composition.type=hw
debug.sf.hw=1
profiler.force_disable_err_rpt=1
profiler.force_disable_ulog=1
ro.vold.umsdirtyratio=20
dalvik.vm.checkjni=false
dalvik.vm.execution-mode=int:jit
video.accelerate.hw=1
power_supply.wakeup=enable
# KEVP75-SEC
ro.config.knox=0
ro.config.tima=0
ro.config.timaversion=0
ro.config.iccc_version=0
# KEVP75-WIFI: Wifi Scanning
wifi.supplicant_scan_interval=300
# KEVP75-DNS
net.dns1=1.1.1.1
net.dns2=1.0.0.1
net.rmnet0.dns1=1.1.1.1
net.rmnet0.dns2=1.0.0.1
net.ppp0.dns1=1.1.1.1
net.ppp0.dns2=1.0.0.1
net.wlan0.dns1=1.1.1.1
net.wlan0.dns2=1.0.0.1
net.eth0.dns1=1.1.1.1
net.eth0.dns2=1.0.0.1
net.gprs.dns1=1.1.1.1
net.gprs.dns2=1.0.0.1
# KEVP75-NET
net.ipv4.ip_no_pmtu_disc=0
net.ipv4.route.flush=1
net.ipv4.tcp_ecn=0
net.ipv4.tcp_fack=1
net.ipv4.tcp_mem=187000 187000 187000
net.ipv4.tcp_moderate_rcvbuf=1
net.ipv4.tcp_no_metrics_save=1
net.ipv4.tcp_rfc1337=1
net.ipv4.tcp_rmem=4096 39000 187000
net.ipv4.tcp_sack=1
net.ipv4.tcp_timestamps=1
net.ipv4.tcp_window_scaling=1
net.ipv4.tcp_wmem=4096 39000 18700
wifi.supplicant_scan_interval=220
net.ipv4.tcp_window_scaling=1
ro.ril.hsxpa=3
ro.ril.gprsclass=10
ro.ril.hep=1
ro.ril.enable.dtm=1
ro.ril.hsdpa.category=12
ro.ril.enable.a53=1
ro.ril.enable.3g.prefix=1
ro.ril.htcmaskw1.bitmask=4294967295
ro.ril.htcmaskw1=14449
ro.ril.hsupa.category=7
ro.ril.hsdpa.category=10
ro.ril.enable.a52=1
ro.ril.set.mtu1472=1
persist.cust.tel.eons=1
ro.config.hw_fast_dormancy=1
persist.data_netmgrd_mtu=1482
persist.data_netmgrd_nint=8
ro.use_data_netmgrd=true
ro.ril.enable.dtm=1
ro.ril.def.agps.mode=2
ro.ril.def.agps.feature=1
ro.ril.enable.gea3=1
ro.ril.enable.fd.plmn.prefix=23402,23410,23411
ro.ril.set.mtu1472=1
net.tcp.buffersize.default=4096,87380,256960,4096, 16384,256960
net.tcp.buffersize.wifi=4096,87380,256960,4096,163 84,256960
net.tcp.buffersize.umts=4096,87380,256960,4096,163 84,256960
net.tcp.buffersize.gprs=4096,87380,256960,4096,163 84,256960
net.tcp.buffersize.edge=4096,87380,256960,4096,163 84,256960
net.tcp.buffersize.hspa=6144,87380,524288,6144,163 84,262144
net.tcp.buffersize.lte=524288,1048576,2097152,5242 88,1048576,2097152
net.tcp.buffersize.hsdpa=6144,87380,1048576,6144,8 7380,1048576
net.tcp.buffersize.evdo_b=6144,87380,1048576,6144, 87380,1048576
persist.telephony.support.ipv6=1
persist.telephony.support.ipv4=1
8 downloads, 160+ views and no comments...
I guess silence is golden...........
kevp75 said:
8 downloads, 160+ views and no comments...
I guess silence is golden...........
Click to expand...
Click to collapse
May be user needs some time to check, compare and notice the difference. Just a thought. I have not rooted so cant test this. Holding up on stock for camera and not the easy/ same way of going back to stock may be
Rommco05 said:
Hi kevp75 please can u share separately values for interactiv gov which u use in this tweak?
Click to expand...
Click to collapse
open /vendor/etc/init/init.kevp75.rc
I would definitely give a try but i have couple of concerns
1. I have installed TWRP already but not sure if the data is decrypted or not. Any quick way to know the status?
2. Does this mod supports BKL09? if not sure, theoretically how bad can it get if I flash it on BKL09? So I can take a chance by flashing.
Thanks for your hardwork on this.
Narasimha12 said:
I would definitely give a try but i have couple of concerns
1. I have installed TWRP already but not sure if the data is decrypted or not. Any quick way to know the status?
2. Does this mod supports BKL09? if not sure, theoretically how bad can it get if I flash it on BKL09? So I can take a chance by flashing.
Thanks for your hardwork on this.
Click to expand...
Click to collapse
hey mate.
for #1 you would see what looks like base64 encoded folder names in TWRPs file manager when browsing sdcard
if worse came to worse u just wouldnt have the whitelists.... but if rooted you could manually copy them to /data/data from inside the zip
#2 unsure. from tlwhat ive been gathering L09 is official.. where-as me on L04 is beta...
same hardware, so you "should" be fine... just take a backup of you /vendor partition in TWRP in case its not
EDIT: Technically... this may also work unrooted... doubt my RIB and WL blockers will, but the Gov Tweaks will
Rommco05 said:
I tryied to flash on L09 and installation failed with error 7. I'm just saying
edit: In your file I found this: 4/interactive/io_is_busy 1 but this value isn't in Interactive governor or Im thinking wrong?
Click to expand...
Click to collapse
Did you happen to get the recovery.log? I'd like to see what failed. (it flashes fine for me...)
Error 7 means a whole bunch of things ranging from bad zip to syntax error....
http://prntscr.com/j4ya45
Are what we have available from stock.... so, yeah, we have io_is_busy
Rommco05 said:
I tryied to flash on L09 and installation failed with error 7. I'm just saying
edit: In your file I found this: 4/interactive/io_is_busy 1 but this value isnt in Interactive governor or Im thinking wrong?
Click to expand...
Click to collapse
got the error too, attached recovery log. but on huawei mate 10 pro @kevp75
DeeZZ_NuuZZ said:
got the error too, attached recovery log. but on huawei mate 10 pro @kevp75
Click to expand...
Click to collapse
Rommco05 said:
I tryied to flash on L09 and installation failed with error 7. I'm just saying
edit: In your file I found this: 4/interactive/io_is_busy 1 but this value isnt in Interactive governor or Im thinking wrong?
Click to expand...
Click to collapse
Thanks mate.
So based on that log...
Code:
I:mount -o bind '/data/media' '/sdcard' process ended with RC=0
I:mount -o bind '/data/media/0' '/sdcard' process ended with RC=0
I:File Based Encryption is present
...
mount: mounting /dev/block/sdd59 on /system failed: Device or resource busy
run_program: child exited with status 255
about to run program [/sbin/busybox] with 3 args
mount: mounting /dev/block/sdd60 on /data failed: Device or resource busy
run_program: child exited with status 255
about to run program [/sbin/busybox] with 3 args
mount: mounting /dev/block/sdd54 on /vendor failed: Device or resource busy
run_program: child exited with status 255
@ Extracting Some Needed Stuffs ...
@ Extracting Some Needed Stuffs ...
set_perm: chown of /data/data/rib_allowed to 0 0 failed: No such file or directory
set_perm: chmod of /data/data/rib_allowed to 644 failed: No such file or directory
Shows me that your /data partition is encrypted, so this will not flash with that (mentioned in OP)
That mount stuff has be a bit concerned... I'll see what I can do to tweak that... it looks like the partitions are already mounting for you though, and are just not able to unmount... maybe I can force it in the flasher or something....
Thanks
kevp75 said:
Thanks mate.
So based on that log...
Code:
I:mount -o bind '/data/media' '/sdcard' process ended with RC=0
I:mount -o bind '/data/media/0' '/sdcard' process ended with RC=0
I:File Based Encryption is present
...
mount: mounting /dev/block/sdd59 on /system failed: Device or resource busy
run_program: child exited with status 255
about to run program [/sbin/busybox] with 3 args
mount: mounting /dev/block/sdd60 on /data failed: Device or resource busy
run_program: child exited with status 255
about to run program [/sbin/busybox] with 3 args
mount: mounting /dev/block/sdd54 on /vendor failed: Device or resource busy
run_program: child exited with status 255
@ Extracting Some Needed Stuffs ...
@ Extracting Some Needed Stuffs ...
set_perm: chown of /data/data/rib_allowed to 0 0 failed: No such file or directory
set_perm: chmod of /data/data/rib_allowed to 644 failed: No such file or directory
Shows me that your /data partition is encrypted, so this will not flash with that (mentioned in OP)
That mount stuff has be a bit concerned... I'll see what I can do to tweak that... it looks like the partitions are already mounting for you though, and are just not able to unmount... maybe I can force it in the flasher or something....
Thanks
Click to expand...
Click to collapse
hm yea I can access /data just fine. I gonna test whatever you throw at me
Rommco05 said:
Sorry, here is
In EXKM isnt available io_is_busy, interesting
Click to expand...
Click to collapse
What's EXKM?
Can you do me a favor... drop to either terminal on your device, or drop into adb shell.... and run:
Code:
su
ls -la /sys/devices/system/cpu/cpufreq/policy0/interactive >> /mnt/sdcard/Download/cpu0policy.txt
ls -la /sys/devices/system/cpu/cpufreq/policy4/interactive >> /mnt/sdcard/Download/cpu4policy.txt
And forward it on here...
DeeZZ_NuuZZ said:
hm yea I can access /data just fine. I gonna test whatever you throw at me
Click to expand...
Click to collapse
This you can dump a list of your partitions for me?
In adb shell
Code:
su
mount >> /mnt/sdcard/Download/mounts.txt
blkid >> /mnt/sdcard/Download/blocks.txt
Rommco05 said:
Im using unofficial twrp and Im sure I was dectrypted when I flashing this mod
edit: EX Kernel Manager
Click to expand...
Click to collapse
I'd love to agree with ya mate, but the log doesn't lie
kevp75 said:
This you can dump a list of your partitions for me?
In adb shell
Code:
su
mount >> /mnt/sdcard/Download/mounts.txt
blkid >> /mnt/sdcard/Download/blocks.txt
Click to expand...
Click to collapse
there they are
Rommco05 said:
Here u go
Click to expand...
Click to collapse
awesome.
thanks mate... and this is the HV10 on L09 right?
DeeZZ_NuuZZ said:
there they are
Click to expand...
Click to collapse
thanks mate... Mate 10 Pro?
kevp75 said:
thanks mate... Mate 10 Pro?
Click to expand...
Click to collapse
Yes, BLA-L29
Sent from my HUAWEI BLA-L29 using XDA Labs
kevp75 said:
thanks mate... Mate 10 Pro?
Click to expand...
Click to collapse
Rommco05 said:
Yes mate, BKL-L09C432
Click to expand...
Click to collapse
Cool... yeah, you're /data is encrypted
/dev/block/sdd60 on /data type f2fs (rw,seclabel,nosuid,nodev,noatime,background_gc=on,discard,user_xattr,inline_xattr,acl,inline_data,inline_dentry,extent_cache,mode=adaptive,verify_encrypt,inline_encrypt,active_logs=6)
ugg....
Related
OK, here we go. Following the model from Desire thread, I made this one for Legend too.
Backgroud:
If I sum up some key points from this thread... there is no way of writing to system partition (Legend, Desire...) even if it is mounted in read-write mode. The only way of writing to system partition is via recovery mode (if you have already rooted your Legend) which makes a process of updating/testing a pain... you have to reboot your phone into recovery mode each time you want to change something on system partition. So guys at Desire subforum came up with an idea to put a writable overlay over the /system directory. This principle is very well known from live CD distros of Linux and Asus also introduced this on their EEE systems running Linux.
This method can be used not only on system partition (so we can "write" to it) but also on data partition which brings us really a neat way of point-in-time backup. Basically one could make overlay of an entire system just after the system was installed and set-up (with all software and custom settings). Then when anything goes wrong after this point, all one has to do is to wipe the directory/partition where writes were being made - no need to factory reset (wiping data partition), setting things up and installing all the apps all over again. This method can well be a better alternative of nandroid backup, because restoring from nandroid backup wipes out all partitions and restore data to them from images. And we all know that frequent repetition of this process really deteriorates non-removable NAND flash chips in our phones.
Contents:
shell script that does the actual /system overlay
statically compiled mount (for compatibility reasons)
auplink utility for flushing pseudo-links to writable device (not used atm)
Shell script that does the overlay is made so it can use any (first) ext2/3 partition on your sdcard. That means you can use your a2sd partition for overlay too. If a2sd is not active but you still have ext2/3 partition on your sdcard, it will be mounted and used for overlay. If you don't have ext2/3 partition on your sdcard, then internal data partition will be used instead. In this case you will have to be careful not to fill it up entirely.
Requirements:
rooted Legend of course
any kernel with built-in aufs support
busybox
run-parts integrated in init.rc script (/etc/init.d)
a2sd script should run before the overlay script (only if you use a2sd)
(When I mention a2sd in this post I mean any a2sd; a2sd, a2sd+, apps2sd, DarkTremor, LightSabre, GoldenThrone )
Installation
Boot to recovery mode (ClockworkMod) and apply this update. After applying it (re)boot your phone. At this point overlay is not yet enabled. You have to issue:
Code:
adb shell aufs --enable
...to enable it and reboot your phone afterwards for changes to take effect.
Configuration
If you want to enable/disable overlay later on, issue:
Code:
adb shell aufs --disable
...to disable overlay or:
Code:
adb shell aufs --enable
...to enable overlay again. Reboot your phone for changes to take effect.
Be advised that after wiping (Factory data reset) overlay is disabled so you will have to enable it again.
Troubleshooting
Make logcat of boot process and check for errors in 1st 50 or so lines.
Warning!!!
Please, do not even try to flash this "update" if you don't know what you are doing or what things I mentioned above mean!!!
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Changelog
0.7 (December 16, 2010)
compatibility enhancements
some minor changes
0.6.1 (December 2, 2010)
script is now calling e2fsck or e2fsck_recvy
0.6 (December 1, 2010)
dropped auplink binary
some more error handling
changed installation script
0.5.1 (October 4, 2010)
minor change in installation script
0.5 (October 4, 2010)
added enable/disable ability (dumfaq was here also)
improved error handling
0.4 (September 30, 2010)
updated aufs script to check if aufs support is already on
added statically compiled mount to support mount-move on any ROM
0.3 (September 28, 2010)
updated aufs script to check presence of /data/local/dosysoverlay file (to enable/disable)
0.2 (September 20, 2010)
updated aufs script to check availability of ext partition on SD card (thanks to dumfaq)
0.1 (September 3, 2010)
initial release
Wow impressive..
I'll try to include into my rom!
Thank you so much!
This sounds very good... But please enlighten me...
Will this only work on stock/modified stock roms.. or will this work on CM6 roms also? (Azure 1.0 etc.)
Hey Neon, this would certainly overwrite your OC kernel.
But you can always build your own with aufs support and use my overlay script (maybe you'll find some glitch in it ).
I would just ask you to consider putting init.d into /data/local (making symlink in /system/etc). That would ease up adding/removing/chmoding scripts inthere. I think this approach is very handy.
I have put together a little script that would look for init.d link or directory in /system/etc (or directory in /data/local) and then decide to make /data/local/init.d directory or not.
whitetigerdk said:
This sounds very good... But please enlighten me...
Will this only work on stock/modified stock roms.. or will this work on CM6 roms also? (Azure 1.0 etc.)
Click to expand...
Click to collapse
It would work on CM6 too, but you would have to copy WiFi module from stock ROM, because I didn't include it in this update. But bare in mind that CM6 is based on kernel 2.6.32 and above and we are talking 2.6.29 here!
Ahh one more thing. CM6 kernel should already contain AUFS support (if I'm not mistaken) so you could use just my overlay loading script and auplink binary.
Blayo, an alternative way for nandroid backup sounds really interesting. if included in the rom along with a few further instructions Im sure it could be brought down to the level of no-obs. Ill wait till puppy is 100% tested
Learners Lisence said:
Blayo, an alternative way for nandroid backup sounds really interesting. if included in the rom along with a few further instructions Im sure it could be brought down to the level of no-obs. Ill wait till puppy is 100% tested
Click to expand...
Click to collapse
Oh.. you can't wait.. you are the one who is ment to be doing the testing .. so the rest of us are waiting for your result.
Sent from my Legend using XDA App
So...basically, this will helps installing Ad-free and OpenVPN on our Legend, right?
BlaY0 said:
Ahh one more thing. CM6 kernel should already contain AUFS support (if I'm not mistaken) so you could use just my overlay loading script and auplink binary.
Click to expand...
Click to collapse
The CM6 port from Ali Baba (Azure 1.0) contains a 2.6.29 kernel and no AUFS module... So it should work with your zip. Great work BlaY0!!!
Just to be sure.
This should work with Azure 1.0, right? What was that thing about the wifi?
cryshop said:
So...basically, this will helps installing Ad-free and OpenVPN on our Legend, right?
Click to expand...
Click to collapse
I'm not sure what you mean... but it will certainly help you adding/removing stuff to/from /system on-the-fly...
Briix said:
Just to be sure.
This should work with Azure 1.0, right? What was that thing about the wifi?
Click to expand...
Click to collapse
It's for 2.6.29 kernel (check the thread title!) and you have to provide your own WiFi driver, because it is not included in this update. Be advised that modules/drivers versions and kernel versions can not mix most of the times. You also can not use just aufs module from this update with any non-aufs kernel (even if versions match), it just won't work.
well, I got this working on my slide (I have no ext partition) however, I had to make some changes...
Code:
7,8c7,8
< RODIR=/data/sysro
< COUNT=0
---
> RODIR=/system
> COUNT=2
16c16
< while [ ! -e /dev/block/mmcblk0p1 ]; do
---
> while [ ! -e /dev/block/mmcblk0p$COUNT ]; do
48,49d47
< insmod /system/lib/modules/aufs.ko
< mount --move /system $RODIR
Without changing the while loop, it always detected an ext partition even though none existed.
Haven't tested it with an ext partition though.
Obviously I used my own kernel and modules.
Thanks alot.
Tested on CM6.0 (Azure latest) and the ROM still works perfectly including my WiFI. I have not tested the overlay functions itself just that it did not screw up CM6.0 which it didn't!
Will let you know the results of the AUFS side of things once I have finished playing!
Let us know how it goes... I'm still trying to figure out how to the the aufs stuff working.
!!!ignore me!!!
dumfuq said:
well, I got this working on my slide (I have no ext partition) however, I had to make some changes...
Code:
7,8c7,8
< RODIR=/data/sysro
< COUNT=0
---
> RODIR=/system
> COUNT=2
16c16
< while [ ! -e /dev/block/mmcblk0p1 ]; do
---
> while [ ! -e /dev/block/mmcblk0p$COUNT ]; do
48,49d47
< insmod /system/lib/modules/aufs.ko
< mount --move /system $RODIR
Without changing the while loop, it always detected an ext partition even though none existed.
Haven't tested it with an ext partition though.
Obviously I used my own kernel and modules.
Click to expand...
Click to collapse
Hi m8,
Thanks for the input but I think that you are missing the point why this while loop is there
...it is there just to check when SD card is ready to be used. The thing is that it depends of what speed is your SD card. If you have a class 6 for example, it can be available in less than a second, but if you have stock SD card or slower one, it is available only after 2 or even 3 seconds.
But you were right about the script not doing overlay if there's SD card present and no ext partition on it so I changed it a little. here's the patch:
Code:
--- 70aufs.old 2010-09-20 10:29:49.000000000 +0200
+++ 70aufs 2010-09-20 10:28:57.000000000 +0200
@@ -26,13 +26,20 @@
done
if [ -z "$NOSD" ]; then
DEV=`fdisk -l /dev/block/mmcblk0|grep Linux|head -n1|awk '{print $1}'`
- SD=/data/sd
- RWDIR=${SD}/sysrw
- [ -d "$SD" ] || mkdir $SD
- e2fsck -y $DEV
- mount -t auto -o noatime,nodiratime $DEV $SD
- chown 1000.1000 $SD
- chmod 775 $SD
+ if [ -n "$DEV" ]; then
+ SD=/data/sd
+ RWDIR=${SD}/sysrw
+ [ -d "$SD" ] || mkdir $SD
+ e2fsck -y $DEV
+ mount -t auto -o noatime,nodiratime $DEV $SD
+ chown 1000.1000 $SD
+ chmod 775 $SD
+ else
+ mkdir /dev/shm
+ mount -t tmpfs -o size=4m shm /dev/shm
+ RWDIR=/data/sysrw
+ MTOPTS="xino=/dev/shm/.aufs.xino,dirs=${RWDIR}:${RODIR}=ro"
+ fi
else
mkdir /dev/shm
mount -t tmpfs -o size=4m shm /dev/shm
...now it will check the availability of SD card and if it's there it will check for ext partition on it. If one is present it will prepare and mount it, otherwise it will do the overlay on data partition.
Update is also available in 1st post.
BlaY0 said:
Hi m8,
Thanks for the input but I think that you are missing the point why this while loop is there
...it is there just to check when SD card is ready to be used. The thing is that it depends of what speed is your SD card. If you have a class 6 for example, it can be available in less than a second, but if you have stock SD card or slower one, it is available only after 2 or even 3 seconds.
But you were right about the script not doing overlay if there's SD card present and no ext partition on it so I changed it a little. here's the patch:
Code:
--- 70aufs.old 2010-09-20 10:29:49.000000000 +0200
+++ 70aufs 2010-09-20 10:28:57.000000000 +0200
@@ -26,13 +26,20 @@
done
if [ -z "$NOSD" ]; then
DEV=`fdisk -l /dev/block/mmcblk0|grep Linux|head -n1|awk '{print $1}'`
- SD=/data/sd
- RWDIR=${SD}/sysrw
- [ -d "$SD" ] || mkdir $SD
- e2fsck -y $DEV
- mount -t auto -o noatime,nodiratime $DEV $SD
- chown 1000.1000 $SD
- chmod 775 $SD
+ if [ -n "$DEV" ]; then
+ SD=/data/sd
+ RWDIR=${SD}/sysrw
+ [ -d "$SD" ] || mkdir $SD
+ e2fsck -y $DEV
+ mount -t auto -o noatime,nodiratime $DEV $SD
+ chown 1000.1000 $SD
+ chmod 775 $SD
+ else
+ mkdir /dev/shm
+ mount -t tmpfs -o size=4m shm /dev/shm
+ RWDIR=/data/sysrw
+ MTOPTS="xino=/dev/shm/.aufs.xino,dirs=${RWDIR}:${RODIR}=ro"
+ fi
else
mkdir /dev/shm
mount -t tmpfs -o size=4m shm /dev/shm
...now it will check the availability of SD card and if it's there it will check for ext partition on it. If one is present it will prepare and mount it, otherwise it will do the overlay on data partition.
Update is also available in 1st post.
Click to expand...
Click to collapse
sweet thanks man. I'll give it a go tomorrow.
BlaY0 said:
Hi m8,
Thanks for the input but I think that you are missing the point why this while loop is there
...it is there just to check when SD card is ready to be used. The thing is that it depends of what speed is your SD card. If you have a class 6 for example, it can be available in less than a second, but if you have stock SD card or slower one, it is available only after 2 or even 3 seconds.
But you were right about the script not doing overlay if there's SD card present and no ext partition on it so I changed it a little. here's the patch:
...now it will check the availability of SD card and if it's there it will check for ext partition on it. If one is present it will prepare and mount it, otherwise it will do the overlay on data partition.
Update is also available in 1st post.
Click to expand...
Click to collapse
Works great for non ext now, thanks. I still have to set sysro to /system and take out the mount --move or it breaks though.
What's the logic/purpose of moving the sysro anyways, I noticed they are not doing that in the desire version. Just curious.
Thanks again
The purpose of mount moving /system to some place else is that you have only one instance of "/system" in /proc/mounts eventually. If you just do the overlay over /system, you have two instances of "/system" in /proc/mounts and that causes some root apps to panic because they chose the first instance (to remount it read-write) which we don't actually want.
But as soon as you mount move /system to some place else you also loose everything that's in it (bin, xbin, lib). And since you are on CM6 (i believe), your busybox is compiled dinamically thus it depends first on /system/bin/linker and then on libraries in /system/lib. You can catch those lib deps with LD_LIBRARY_PATH variable but the problem is still /system/bin/linker absolute path which is compiled into your busybox and all other native binaries.
There is actually only one solutions to this problem and that is to get statically built busybox, copy it to let say /data/bin and call this busybox from script.
I will add to 1st post that statically built busybox is imperative.
Hello all.
This is my first share at the Android forums:
On my first device -- Samsung Galaxy S2 - I9100 Intl. -- I have BASH shell, so I've got used to working with it so i was missing it on my second device -- LG Nexus 4 -- the installer from the market was not working on the last one...
So I've remembered seeing here a post by nubecoder saying he compiled bash 4.2.2 for android, ang gave it a shot, but it was not working as expected on my device...
I've decided to recreate it for my Nexus 4.
All credit goes to nubecoder, I've only re-created the ZIP installer.
So, I hope someone else will enjoy nubecoder (I've tested it on my device and it is working) work remake by me.
Highlights and remarks are most welcome...
1.1:
Fixed mounting order error...
If it worth a donation, PM me and I'll give my paypal donation details (I have not done it ever, so when it will be relevant, I will...)
dmagician said:
Hello all.
This is my first share at the Android forums:
On my first device -- Samsung Galaxy S2 - I9100 Intl. -- I have BASH shell, so I've got used to working with it so i was missing it on my second device -- LG Nexus 4 -- the installer from the market was not working on the last one...
So I've remembered seeing here a post by nubecoder saying he compiled bash 4.2.2 for android, ang gave it a shot, but it was not working as expected on my device...
I've decided to recreate it for my Nexus 4.
All credit goes to nubecoder, I've only re-created the ZIP installer.
So, I hope someone else will enjoy nubecoder (I've tested it on my device and it is working) work remake by me.
Highlights and remarks are most welcome...
If it worth a donation, PM me and I'll give my paypal donation details (I have not done it ever, so when it will be relevant, I will...)
Click to expand...
Click to collapse
thank you for this! i tried to install it. however i am running in to some problems. the installation partially fails with twrp. the update script tries to set the permission on some files in /data/local but the files are not there:
Code:
set_perm(0, 2000, 0666, "/data/local/.bash_history");
set_perm(0, 2000, 0666, "/data/local/.editor");
set_perm(0, 2000, 0666, "/data/local/.inputrc");
set_perm(0, 2000, 0666, "/data/local/.minttyrc");
these files are in the zip, but no permissions are set via the update-script:
Code:
.bashrc
.bashrc_support
.bashrc_user
.profile
can you help me out?
-- 1st Reserved --
-- 1st Reserved --
-- 2nd Reserved --
-- 2nd Reserved --
Fixed -- I Hope
UnitedOceanic said:
thank you for this! i tried to install it. however i am running in to some problems. the installation partially fails with twrp. the update script tries to set the permission on some files in /data/local but the files are not there:
Code:
set_perm(0, 2000, 0666, "/data/local/.bash_history");
set_perm(0, 2000, 0666, "/data/local/.editor");
set_perm(0, 2000, 0666, "/data/local/.inputrc");
set_perm(0, 2000, 0666, "/data/local/.minttyrc");
these files are in the zip, but no permissions are set via the update-script:
Code:
.bashrc
.bashrc_support
.bashrc_user
.profile
can you help me out?
Click to expand...
Click to collapse
Fixed mounting.
Explanation:
The data partition was mounted AFTER expanding contents, so the content was lost on mounting data partition.
Some changes failed
Hi there, I've tried to apply it on my N4 (4.4.2 stock with MultiROM, Dalvik / Bionic patches and 4Way Reboot / Volume Wake) and I got stuck in an error.
Here is my log:
* Mounting '/system'
* Mounting '/data'
/data is already mounted.
Extracting files
minzip: Extracted 318 file(s)
minzip: Extracted 2 file(s)
Setting permissions on /system/xbin/bash4.2.0.1
Setting different instalation shell scripts to be used...
about to run program [/sbin/sh] with 2 args
Creating 'b' shell excutable file for quick launching BASH
in /system/bin/
run_program: child exited with status 1
Created '/system/bin/b'
Creating symlink for BASH as /system/bin/bash
Setting permissions on directories:
/system/etc/terminfo
Setting permissions for /system/etc/bash.bashrc
and /system/etc/profile
Creating symlink for BASH as /system/xbin/bash
Settings '/data/local' owner to UID to 0 (root) and GID to 2000 (shell)
Settings '/data/local' owner to UID to 0 (root) and GID to 2000 (shell)
Settings permissions on '/data/local/bin' to 0755 (a=rwx)
Settings permissions on '/data/local/sbin' to 0755 (a=rwx)
Settings permissions on '/data/local/xbin' to 0755 (a=rwx)
Settings permissions on '/data/local' to 0755 (u+rwx,go+rx)
set_perm: chown of /data/local/.bash_history to 0 2000 failed: No such file or directory
set_perm: chmod of /data/local/.bash_history to 666 failed: No such file or directory
script aborted: set_perm: some changes failed
Settings permissions on '/data/local/.*' to 0666 (a=rw)
set_perm: some changes failed
E:Error executing updater binary in zip '/sdcard/Bash4.2.x-Installer(Nexus4)-v1.1.zip'
Error flashing zip '/sdcard/Bash4.2.x-Installer(Nexus4)-v1.1.zip'
Updating partition details...
Iata backup size is 2098MB, size: 13231MB, used: 8904MB, free: 4326MB.
I:Unable to mount '/usb-otg'
I:Actual block device: '', current file system: 'vfat'
I:Set page: 'flash_done'
I:Set page: 'clear_vars'
I:Set page: 'main2'
I:Set page: 'settings'
I:Set page: 'main'
I:Set page: 'clear_vars'
I:Set page: 'main2'
I:Set page: 'advanced'
I:Set page: 'confirm_action'
I:Set page: 'action_page'
I:Copying file /tmp/recovery.log to /data/media/0/recovery.log
Click to expand...
Click to collapse
Thank you for your help!
@dmagician thank you for the update. i just noticed the zip files contains ssh, scp, vim, nano, 7z and more :good::good: thats really aewsome!
i took a look at the scripts and i can't find anywhere a reference to these files.
Code:
/data/local/.bash_history
/data/local/.editor
/data/local/.inputrc
/data/local/.minttyrc
i need your help configuring bash. if i start bash from the default shell with "bash" the profiles is not loaded. is it possible to "symlik bash to "bash -l"? the
@Grushteniak
easiest quick fix
open terminal add this commands:
Code:
su
cd /data/local/
touch .editor
touch .inputrc
touch .minttyrc
after that flash the zip again
Worked now
@UnitedOceanic
I have created the files you asked and I had to create the '.bash_history' file too.
After that, successfully flashed it. Thank you for your help!
UnitedOceanic said:
@dmagician thank you for the update. i just noticed the zip files contains ssh, scp, vim, nano, 7z and more :good::good: thats really aewsome!
i took a look at the scripts and i can't find anywhere a reference to these files.
Code:
/data/local/.bash_history
/data/local/.editor
/data/local/.inputrc
/data/local/.minttyrc
Click to expand...
Click to collapse
These are mainly not required (I think I've packed them accidentally...), the files .bash_history and .editor are created automatically, so all of these can be safely deleted (from the device).
I will remove then sometime later - when I'll have some free time - from the ZIP...
UnitedOceanic said:
i need your help configuring bash. if i start bash from the default shell with "bash" the profiles is not loaded. is it possible to "symlik bash to "bash -l"? the
Click to expand...
Click to collapse
1st:
You can't...
Unless it is a multi-call binary like BusyBox (I'm not Linux expert... but as of my understanding -- By far: Any EXPERT that knows Linux better than me, PLEASE: Correct me if I'm wrong) -- You cannot link a binary with its switches in any way...
You can only link the the binary itself, any command line switch should be via the command line or shell script.
2nd:
There should be a small executable shell script named “b” located in /system/bin/ (its whole target is executing “/system/xbin/su -c /system/bin/bash --login” -- for ease of running and saving some taps).
Check if it exists, as the installer itself SHOULD have created it.
In case the file does not exist, you can try the following:
Open terminal emulator - any of those are good:
If you don't have any terminal emulator installed and/or don't want to install one...
ADB shell
PuTTY Tray - by Chris West (Faux):good:<--strongly recommended
If you have one installed already, open it.
If you don't have any (and/or you want one to be always available to you), IT'S TIME TO GET ONE
Open Google Play Store and search "terminal emulator", pick one and install it.
Then execute (one by one):
In case of using ADB command (option 1 listed above)
Code:
adb root
adb remount
In case of using terminal emulator (e.g. any one of options 2 or 3 as listed above)
Code:
su
mount -o remount,rw /system
and the rest: (if using ADB (e.g. option 1 listed above), prefix the commands with "adb shell" noobs: [no quotes, and with trailing space])
Code:
cd /system/bin
rm /system/bin/b
echo '#!/system/bin/sh' > /system/bin/b
echo '/system/xbin/su -c /system/bin/bash --login' >> /system/bin/b
chown 0.0 /system/bin/b
chmod 0755 /system/bin/b
remount -o remount,ro /system
exit
In some (pretty rare - I believe...) cases, you may need to add /sbin/busybox or /system/xbin/busybox
before the commands above:
As exmple, line 3:
instead of echo '#!/system/bin/sh' > /system/bin/b would be something like
/system/xbin/busybox echo '#!/system/bin/sh' > /system/bin/bOR
/sbin/busybox echo '#!/system/bin/sh' > /system/bin/b
UnitedOceanic said:
easiest quick fix
open terminal add this commands:
Code:
su
cd /data/local/
touch .editor
touch .inputrc
touch .minttyrc
after that flash the zip again
Click to expand...
Click to collapse
If so, (and I'm not sure of it because you are basically extracting files from a ZIP archive to location and then executing commands over them... BUT I'm neither Linux nor Edify expert... Enlightments, Corrections and Learning new things ARE ALWAYS welcome!), It is good to know that executing touch on the files will cause the installer to forcibly update them...
You meant "execute these commands" not "add this commands" -- right?
Sorry, I've misunderstood -- You ware CREATING the file by the touch command, NOT CHANGING DATE/TIME....
Could I ask what does this do? Isnt this the same thing that we can have using terminal emulator?
bamsbamx said:
Could I ask what does this do? Isnt this the same thing that we can have using terminal emulator?
Click to expand...
Click to collapse
It is not related to terminal emulator itself, but to the underlying Android shell layer.
To be specific:
It is adding SOME of the advanced BASH style capabilities to Android's shell scripting.
SOME - since not ALL (as I remember, but the most important and used, do exist) - of bash capabilities are implemented in this (small) binary.
It is an alternative to the Android's basic shell.
dmagician said:
It is not related to terminal emulator itself, but to the underlying Android shell layer.
To be specific:
It is adding SOME of the advanced BASH style capabilities to Android's shell scripting.
SOME - since not ALL (as I remember, but the most important and used, do exist) - of bash capabilities are implemented in this (small) binary.
It is an alternative to the Android's basic shell.
Click to expand...
Click to collapse
Thanks for the quick reply!!!
I do not understand too much about linux...
Could you tell me some examples of how this would benefit us??
Thanks
bamsbamx said:
Thanks for the quick reply!!!
I do not understand too much about linux...
Could you tell me some examples of how this would benefit us??
Thanks
Click to expand...
Click to collapse
It is mainly used by users - some may add - who've rooted their devices, - and ment as a low level for doing stuff that cannot be done via GUI (graphical user interface).
This is what you probably know as "hacking" - not necessarily for doing bad suff,
but for low level control of the device or for learning purposes.
List of build.prop tweaks for boost performance and for battery life
Checkout app ^^
Here!
~~~you can edit build.prop with File explorer that supports ROOT- you can start with File Manager
~~~Find build.prop file in /system
~~~if you have existing line,dont duplicate it (dont duplicate it)
~After you finish edit, save changes, CHECK PERMISSIONS must be -rw-r--r--, rebot to recovery and wipe cache and dalvik-cache ,rebot device
Click to expand...
Click to collapse
Thanks to @F4uzan
I read @LaraCraft304 thread HERE This help me too much
#disable the zygote loader for performance --- Crash, mostly
ro.wmt.blcr.enable=0
#help to free up unused ram --- this dont work on stock,you cant add this if kernel doesn't support purgeable of assets :/
persist.sys.purgeable_assets=1
# Video Acceleration
video.accelerate.hw=1
debug.performance.tuning=1
# Low Power Audio
lpa.decode=false
audio.decoder_override_check=true
use.non-omx.mp3.decoder=false
use.non-omx.aac.decoder=false
# Lock App In Memory
sys.keep_app_1=put-process-name-of-app-here --- Process name can find in /data/data, and put full name here
#battery savers
ro.ril.disable.power.collapse=0
ro.config.hw_power_saving=true
wifi.supplicant_scan_interval=180
power_supply.wakeup=enable
ro.ril.sensor.sleep.control=1
proximity_incall=enable
# Fast Reboot
persist.sys.shutdown.mode=hibernate
ro.config.hw_quickpoweron=true
#Enable Low Ram Device flag
ro.config.low_ram=true --- KITKAT ROMs ALREADY HAVE THIS LINE
#better scrolling
ro.max.fling_velocity=12000 --- this firs line already exist in KITKAT ROMs, I dont know to others (change it from 4000 to 12000)
ro.min.fling_velocity=8000
____but____
ro.maxfling_velocity=4000
ro.max.fling_velocity=4000
(4000 allows for a little more ram)
touch.presure.scale=0.001
windowsmgr.max_events_per_sec= max 90,every value over 90 decreas scroll
ro.min_pointer_dur=8
# Composition type
debug.composition.type=mdp
debug.composition.type=gpu -----choose------best-----you
debug.composition.type=cpu ----------------the--------for
debug.composition.type=dyn
#Dalvik tweaks --- @F4uzan said me: "It doesn't matter if it doesn't exist. Dalvik will set up default value. If you set it, Dalvik will prefer value in build.prop"
because I dont know this dalvik.vm.jmiopts=forcecopy --- I dont know what is that.. (someone say me?)
dalvik.vm.dexopt-flags=
Now you can set
~option 1- disable dalvik checking, increases free ram but less optimized dalvik cache
dalvik.vm.verify-bytecode=false
dalvik.vm.dexopt-flags=v=n,u=n,o=v
~option 2 (preferred)- enable more checking for a better performing dalvik cache but may use a little more ram
dalvik.vm.verify-bytecode=true
dalvik.vm.dexopt-flags=v=f,u=n,o=v
dalvik.vm.jit.codecachesize=0 --- this Disable JIT
# Enable Surface Dithering Which Will Raise Image Quality At The Cost Of Performances - 1=ON;0=OFF
persist.sys.use_dithering=0
#disable send data to google
ro.config.nocheckin=1
#Disable Kernel Error Checking
persist.adb.notify=0
vm.stat_interval=1
ro.kernel.android.checkjni=0
I add this to my build.prop, dont need but i prefer
#Enable Adaptive Multi-Rate Wideband
ro.ril.enable.amr.wideband=1
#More volume steps in call
ro.config.vc_call_steps= --- you can set as long as you want |||7 is default||| just put the number after the equal sign
#Better signal.
persist.cust.tel.eons=1
# Signal Tweaks
ro.ril.enable.amr.wideband=1
persist.cust.tel.eons=1
ro.config.hw_fast_dormancy=1 --- dont use this if your carrier dont support
ro.ril.hsxpa=2
ro.ril.gprsclass=12
ro.ril.enable.dtm=1
ro.ril.hsdpa.category=8
ro.ril.enable.a53=1
ro.ril.enable.3g.prefix=1
ro.ril.htcmaskw1.bitmask=4294967295
ro.ril.htcmaskw1=14449
ro.ril.hsupa.category=6
#Phone rings immediately.
ro.telephony.call_ring.delay=0
ring.delay=0
# Net Speed Tweaks
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
net.tcp.buffersize.hspa=4096,87380,256960,4096,163 84,256960
net.tcp.buffersize.lte=524288,1048576,2097152,524288,1048576,2097152
net.tcp.buffersize.hspda=4096,87380,256960,4096,16 384,256960
net.tcp.buffersize.evdo_b=6144,87380,1048576,6144,87380,1048576
# Google DNS
net.ppp0.dns1=8.8.8.8
net.ppp0.dns2=8.8.4.4
net.dns1=8.8.8.8
net.dns2=8.8.4.4
#Makes streaming videos stream faster
media.stagefright.enable-player=true
media.stagefright.enable-meta=true
media.stagefright.enable-scan=true
media.stagefright.enable-http=true
media.stagefright.enable-record=true
#Increase photo and video recording quality
ro.media.enc.hprof.vid.bps=8000000
ro.media.capture.maxres=8m
ro.media.panorama.defres=3264x1840
ro.media.panorama.frameres=1280x720
ro.camcorder.videoModes=true
ro.media.enc.hprof.vid.fps=65
# I dont know for what is it, but if your camera dont work on CM10 (I dont know for others) remove this line.
debug.camcorder.disablemeta=1
# Enables 270 Degree Rotation --- In Custom ROMs already have this
windowsmgr.support_rotation_270=true
#Increase jpg quality to 100%
ro.media.enc.jpeg.quality=100
#Better Flashlight intensity & camera-flash quality
ro.media.capture.flash=led
ro.media.capture.flashMinV=3300000
ro.media.capture.torchIntensity=65
ro.media.capture.flashIntensity=70
#Phone rings immediately.
ro.telephony.call_ring.delay=0
ring.delay=0
This tweaks dont work on LG devices, thanks to @F4uzan
pm.sleep_mode won't work
The sleep mode itself is hardcoded to kernel since ICS (or GB, I forgot), so changing it from build.prop won't work.
ro.mot.eri.losalert.delay is for Motorola device
Explained above
ro.config.nocheckin is actually ro.htc.config.nocheckin, so ro.config.nocheckin doesn't exist
Again, explained above
dalvik.vm.execution-mode is JIT, so no need to enable it via build.prop
Uh... explained again
profiler.force_disable_ulog is HTC specific properties
Found in services.jar of HTC ROMs but not on AOSP or LG ROMs
ro.mot.buttonlight.timeout, another properties for Motorola
Everything that starts 'ro.mot', 'ro.htc' won't work with LG phone, something that LG specific is 'lge.' or 'ro.lge'
windowsmgr.max_events_per_sec is a performance degrading thing
As quoted from Google, Android maxes 60fps which is windowsmgr.max_events_per_sec=90 setting it to higher value decreases scroll and touch speed, increase memory usages for UI events and such.
ro.kernel.checkjni, doesn't exist. Not in kernel or even frameworks.
Explained above.
dalvik.vm.checkjni and ro.kernel.android.checkjni won't work.
Already set to false by Android itself
ro.media.dec.jpeg.memcap value is hardcoded
Explained above.
ALL EXPLAINED HERE:
http://www.jeffmixon.com/examining-b...-guide-part-1/
http://www.jeffmixon.com/examining-b...-guide-part-2/
Click to expand...
Click to collapse
init.d tweaksThis init.d tweaks edited by me
You already know the process:
1. Go to recovery
2. Install zip
3. Rebot device
### ATTENTION ###
after flashing this device need about 3 minutes to boot
you do not need to worry, I already have this on my device
Sqlite_optimization
Click to expand...
Click to collapse
Downloads:
zipalign tweak zipalign all apps every 24 hours.
In:
all apps zipaligned
and now usage of this apps in RAM are lesser
Downloads:
View attachment 3133760
Zipalign_24_hours --- thanks to @kien_vip
Click to expand...
Click to collapse
RW_full_speed
Boost Read and Write speed
Downloads:
RW_full_speed
Click to expand...
Click to collapse
Apps for better battery life and performance
I use apps from playstore
Mediaserver Killer --- This app kills media server to save battery,and expand their life
Battery Doctor --- Also use this to expand your battery life
JuiceDefender - battery saver --- Battery saver app
Greenify --- Use this to hibernate apps
CPU Adjuster --- You can set CPU profiles, overclock device if you have overclock kernel
No-frills CPU Control --- I dont know, but I love this app more
[ROOT] Kernel Tweaker --- GPU, CPU tweaks, LMK
Voltage Control --- Undervolt processor to use less power
Android Tweaker 2 --- Tweak everything
This is cool brother, but I think some lines don't apply with stock roms, like purgeable assets. I will post the source.
chrisdlc119 said:
This is cool brother, but I think some lines don't apply with stock roms, like purgeable assets. I will post the source.
Click to expand...
Click to collapse
If kernel doesnt support this, you cannot add :/
Paget96 said:
If kernel dont suport this, you cannot add :/
Click to expand...
Click to collapse
Yes, that's more specific ?
chrisdlc119 said:
Yes, that's more specific ?
Click to expand...
Click to collapse
If you find something else, tell me
When i try to save the edition, its appear a litle box saying that i dont have root acess...but i have x)
What could be ?
jonnybigodesPT said:
When i try to save the edition, its appear a litle box saying that i dont have root acess...but i have x)
What could be ?
Click to expand...
Click to collapse
You have to mount the /system partition using an explorer that supports that function, for example, ES File Manager.
You also can download an app to edit Build.Prop from itself, it's very easy if you already have root access.
chrisdlc119 said:
You have to mount the /system partition using an explorer that supports that function, for example, ES File Manager.
You also can download an app to edit Build.Prop from itself, it's very easy if you already have root access.
Click to expand...
Click to collapse
The problem is solved. I thought I had edited the previous post x)
Thanks mate.
Thx bro i'll use these for my new rom!!!!
Sent from my LG-E400 using XDA Free mobile app
giaki3003 said:
Thx bro i'll use these for my new rom!!!!
Sent from my LG-E400 using XDA Free mobile app
Click to expand...
Click to collapse
now I edit sqlite and zipalign init.d tweak for kitkat
ahh, make for all roms check
Paget96 said:
ahh, make for all roms check
Click to expand...
Click to collapse
Flashed your scripts, device started but after a few hours I noticed that my phone was closed and when I tried to open it, it ended in bootloop. Restored my system backup, everything's fine. So must be your scripts. I think something is wrong with your flash zips. I checked with root explorer and extract the script but Root Explorer shows double file (f.e. 2 METADATA folders, 2 system folders etc.). I checked now in PC but zips seems OK.
I might put some note on build.prop tweaks here :
pm.sleep_mode won't work
The sleep mode itself is hardcoded to kernel since ICS (or GB, I forgot), so changing it from build.prop won't work.
ro.mot.eri.losalert.delay is for Motorola device
Explained above
ro.config.nocheckin is actually ro.htc.config.nocheckin, so ro.config.nocheckin doesn't exist
Again, explained above
dalvik.vm.execution-mode is JIT, so no need to enable it via build.prop
Uh... explained again
profiler.force_disable_ulog is HTC specific properties
Found in services.jar of HTC ROMs but not on AOSP or LG ROMs
ro.mot.buttonlight.timeout, another properties for Motorola
Everything that starts 'ro.mot', 'ro.htc' won't work with LG phone, something that LG specific is 'lge.' or 'ro.lge'
windowsmgr.max_events_per_sec is a performance degrading thing
As quoted from Google, Android maxes 60fps which is windowsmgr.max_events_per_sec=90 setting it to higher value decreases scroll and touch speed, increase memory usages for UI events and such.
ro.kernel.checkjni, doesn't exist. Not in kernel or even frameworks.
Explained above.
dalvik.vm.checkjni and ro.kernel.android.checkjni won't work.
Already set to false by Android itself
ro.media.dec.jpeg.memcap value is hardcoded
Explained above.
References :
http://www.jeffmixon.com/examining-build-prop-tweaks-for-android-ics-a-comprehensive-guide-part-1/
http://www.jeffmixon.com/examining-build-prop-tweaks-android-ics-comprehensive-guide-part-2/
Thanks to Jeff Mixon site.
pkatsaras said:
Flashed your scripts, device started but after a few hours I noticed that my phone was closed and when I tried to open it, it ended in bootloop. Restored my system backup, everything's fine. So must be your scripts. I think something is wrong with your flash zips. I checked with root explorer and extract the script but Root Explorer shows double file (f.e. 2 METADATA folders, 2 system folders etc.). I checked now in PC but zips seems OK.
Click to expand...
Click to collapse
hm, I'll try to fix, thanks for test
sorry for bootloop
F4uzan said:
I might put some note on build.prop tweaks here :
pm.sleep_mode won't work
The sleep mode itself is hardcoded to kernel since ICS (or GB, I forgot), so changing it from build.prop won't work.
ro.mot.eri.losalert.delay is for Motorola device
Explained above
ro.config.nocheckin is actually ro.htc.config.nocheckin, so ro.config.nocheckin doesn't exist
Again, explained above
dalvik.vm.execution-mode is JIT, so no need to enable it via build.prop
Uh... explained again
profiler.force_disable_ulog is HTC specific properties
Found in services.jar of HTC ROMs but not on AOSP or LG ROMs
ro.mot.buttonlight.timeout, another properties for Motorola
Everything that starts 'ro.mot', 'ro.htc' won't work with LG phone, something that LG specific is 'lge.' or 'ro.lge'
windowsmgr.max_events_per_sec is a performance degrading thing
As quoted from Google, Android maxes 60fps which is windowsmgr.max_events_per_sec=90 setting it to higher value decreases scroll and touch speed, increase memory usages for UI events and such.
ro.kernel.checkjni, doesn't exist. Not in kernel or even frameworks.
Explained above.
dalvik.vm.checkjni and ro.kernel.android.checkjni won't work.
Already set to false by Android itself
ro.media.dec.jpeg.memcap value is hardcoded
Explained above.
References :
http://www.jeffmixon.com/examining-build-prop-tweaks-for-android-ics-a-comprehensive-guide-part-1/
http://www.jeffmixon.com/examining-build-prop-tweaks-android-ics-comprehensive-guide-part-2/
Thanks to Jeff Mixon site.
Click to expand...
Click to collapse
i deleted
]windowsmgr.max_events_per_sec when is value over 90 scrolls decreases??
can you help me to add more build.prop tweaks for LGs ??
Yes, decreases. I set this value to 60.
And
ro.min.fling_velocity=16000
ro.max.fling_velocity=20000
mikesa said:
Yes, decreases. I set this value to 60.
Click to expand...
Click to collapse
"Many build.prop tweaks set this value to 300, but it seems this is a bad idea. As Google points out, Android maxes out at 60fps. The default value is already allow for a possible max_events_per_sec of 90. Even if you allow for 300 max_events_per_sec, you’ll only ever see 60 of these events in any given second. Therefore, any value much higher than 90 is unlikely to have any noticeable impact on your experience in general. Additionally, setting this value too high can starve other UI events that need to get processed, viz. touch inputs. You’re not likely to feel like your device is running very smoothly when it is busy processing thousands of scroll events instead of responding immediately to you clicking to try and open a link or an app. There may be some specific scenarios where increasing this value does appear to improve system feedback, but changing this value for all UI events across the board will likely cause more problems than it will solve."
copied from: http://www.jeffmixon.com/examining-build-prop-tweaks-for-android-ics-a-comprehensive-guide-part-1/[/URL
you can go to 90 ]
I tired to 90, but I seems, my phone (Huawei p7) better the 60.
mikesa said:
I tired to 90, but I seems, my phone (Huawei p7) better the 60.
Click to expand...
Click to collapse
yes all mobiles are different
your scripts port from Fly on mod? your zipalign script will run on every boot, not every 30 hours. here is my zipalign script will run every 24 hours and correct permission 644 after zipaligning to avoid bootloop. may be some one like it:
Code:
#!/system/bin/sh
LOG_FILE=/data/zipalign.log;
ZIPALIGNDB=/data/zipalign.db;
# Interval between ZipAlign runs, in seconds, 86400=24 hours
RUN_EVERY=86400
# Get the last modify date of the Log file, if the file does not exist, set value to 0
if [ -e $LOG_FILE ]; then
LASTRUN=`stat -t $LOG_FILE | awk '{print $14}'`
else
LASTRUN=0
fi;
# Get current date in epoch format
CURRDATE=`date +%s`
# Check the interval
INTERVAL=$(expr $CURRDATE - $LASTRUN)
# If interval is more than the set one, then run the main script
if [ $INTERVAL -gt $RUN_EVERY ];
then
if [ -e $LOG_FILE ]; then
rm $LOG_FILE;
fi;
if [ ! -f $ZIPALIGNDB ]; then
touch $ZIPALIGNDB;
fi;
echo "Starting ZipAlign $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE;
for DIR in /system/app /data/app /system/framework; do
cd $DIR;
for APK in *.apk; do
if [ $APK -ot $ZIPALIGNDB ] && [ $(grep "$DIR/$APK" $ZIPALIGNDB|wc -l) -gt 0 ]; then
echo "Already checked $DIR/$APK" | tee -a $LOG_FILE;
else
ZIPCHECK=`/system/xbin/zipalign -c -v 4 $APK | grep FAILED | wc -l`;
if [ $ZIPCHECK == "1" ]; then
echo "Now aligning $DIR/$APK" | tee -a $LOG_FILE;
/system/xbin/zipalign -v -f 4 $APK /data/local/$APK;
busybox mount -o rw,remount /system;
cp -f -p /data/local/$APK $APK;
chmod 644 $APK;
busybox rm -f /data/local/$APK;
grep "$DIR/$APK" $ZIPALIGNDB > /dev/null || echo $DIR/$APK >> $ZIPALIGNDB;
else
echo "Already aligned $DIR/$APK" | tee -a $LOG_FILE;
grep "$DIR/$APK" $ZIPALIGNDB > /dev/null || echo $DIR/$APK >> $ZIPALIGNDB;
fi;
fi;
done;
done;
busybox mount -o ro,remount /system;
touch $ZIPALIGNDB;
echo "ZipAlign finished at $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE;
fi;
Hi All,
I am a happy user of Xposed Installer and using Modules.
However, one day my friend asked me if I could help him to fix the logging problems of Xposed because it almost ate like ~500MB of his internal space without him knowing it. So, I made this simple script to make a temporary fix (although I can still make this a little more flexible by checking the log file instead of running it on a fixed interval). I hope this helps and I hope Xposed dev can make an option to cleanup the logs generated by the modules.
More power
The script - I found that (not really proven, but as observed) looping scripts in the init.d are not very well handled so I did a workaround. I have the main script (cleaner) inside data and one script (trigger) in init.d. So here are they:
The main script - I placed on /data/Tweaks/scripts:
Code:
#!/system/bin/sh
# Name: 50_XposedCleanLog
# Date: 10/27/2014
# Author: Arsie Organo Jr. - [email protected]
# Link:
# About: This will clean up Xposed Installer app generated
# logs every X minutes.
# 1. Rooted
# 2. Busybox is installed.
####################################################
# Interval between 50_XposedCleanLog runs, in seconds, 18000=.5hour
XPOSEDLOGS=/data/data/de.robv.android.xposed.installer/log/error.log
a=0
sleepme=18000
while [ $a -ge 0 ]
do
busybox rm -f $XPOSEDLOGS
busybox touch $XPOSEDLOGS
chown root:root $XPOSEDLOGS
echo "Xposed Logs Cleanup Started $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $XPOSEDLOGS;
echo "Cleanup will run again in the next $(expr $sleepme / 60) min" | tee -a $XPOSEDLOGS;
echo $a
a=`expr $a + 1`
echo "Xposed Logs cleaner completed at $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $XPOSEDLOGS;
sleep $sleepme
done
# END
And the trigger is placed in /system/etc/init.d - 10_DONOTDELETE:
Code:
#!/system/bin/sh
# Name: 10_DONOTDELETE
# Date: 10/28/2014
# Author: Arsie Organo Jr. - [email protected]
# Link:
# About: This script is needed to run all the tweaks
# and looping scripts.
# You will need your device to be:
# 1. Rooted
# 2. Busybox is installed.
####################################################
datalog=/data/Tweaks/logs/10_DONOTDELETE.log
busybox rm -f $datalog
busybox touch $datalog
# Xposed logs cleaner
/system/bin/sh /data/Tweaks/scripts/50_XposedCleanLog.sh > /dev/null 2>&1 &
if [ `busybox ps -ef | grep Tweaks | grep 50_XposedCleanLog.sh | wc -l` -eq 1 ] ;
then
echo "$( date +"%m-%d-%Y %H:%M:%S" ) Xposed logs cleaner initiated" | tee -a $datalog;
else
echo "$( date +"%m-%d-%Y %H:%M:%S" ) Xposed logs cleaner initialization FAILED" | tee -a $datalog;
fi;
So this simply means that the main script will be called upon restart and then loop it in the background checking the log file every 30min.
Note: Phone needs to be rooted and must have busybox installed. Tested on MediaTek MT6582 (MP Agua Rio) JB version.
I have attached a flashable here.. direct flash only and there is no need to wipe your cache.
This will work ONLY if your phone supports init.d and the generated Xposed log file is located here - /data/data/de.robv.android.xposed.installer/log/error.log
Wow very nice keep it up sir. :good:
Rovo89 set limit for log file to 5 MB. https://github.com/rovo89/XposedBridge/commit/afcc3e1e788ea44bfd00245a24b5dfe6c86aa3d0
Cool!
pyler said:
Rovo89 set limit for log file to 5 MB. https://github.com/rovo89/XposedBridge/commit/afcc3e1e788ea44bfd00245a24b5dfe6c86aa3d0
Click to expand...
Click to collapse
That's cool, however using the latest Xposed (experimental version) we've seen the error.log can go more than 500mb.
You can check the ridiculous size of the error.log below. So to aid this, I made this looping script.
eyesfortech said:
That's cool, however using the latest Xposed (experimental version) we've seen the error.log can go more than 500mb.
You can check the ridiculous size of the error.log below. So to aid this, I made this looping script.
Click to expand...
Click to collapse
Yes, this change is not part of 2.7 exp1.
too bad but there is always hope
pyler said:
Yes, this change is not part of 2.7 exp1.
Click to expand...
Click to collapse
yeah... I guess so, but there's always hope
huge issue
I check and mine is 7gb but when I check application manager it says xposed is using 11gb why?
manual Clear logs
bigchuk00 said:
I check and mine is 7gb but when I check application manager it says xposed is using 11gb why?
Click to expand...
Click to collapse
Hi,
have you tried manually clearing the logs from Xposed Logs options?
No. I didn't. The flash able zip was what I used n it worked fine . thank you.
Cool! I guess the permanent solution will be provided in the next update of Xposed (hopefully!)
It's just absurd that these 'error logs' rack up over a 100mb per day. The Xposed chappies say look at the log to see what module is causing the problem - well, I can't make head nor tail of the logs. Should be a better way of dealing with it.
eyesfortech said:
Cool! I guess the permanent solution will be provided in the next update of Xposed (hopefully!)
Click to expand...
Click to collapse
I admire your genius in setting up cron & it works flawlessly on my device, please would be able to create a flashable script or cron that will make @zeppelinrox sclean(wipe dalvik & reboot) script to run once each week?
slimcyril said:
I admire your genius in setting up cron & it works flawlessly on my device, please would be able to create a flashable script or cron that will make @zeppelinrox sclean(wipe dalvik & reboot) script to run once each week?
Click to expand...
Click to collapse
Unfortunately I am currently swamped with my day job and I cannot promise anything sooner. Can you give me the link the one you wanted me to try? And on what device? Currently I am no longer using MTK so testing it will also be a problem.
Thanks.
eyesfortech said:
Unfortunately I am currently swamped with my day job and I cannot promise anything sooner. Can you give me the link the one you wanted me to try? And on what device? Currently I am no longer using MTK so testing it will also be a problem.
Thanks.
Click to expand...
Click to collapse
Thanks for your response I later found what I was looking here http://forum.xda-developers.com/showthread.php?t=2700146
Dear Community, dear Developers outside..
I'm using Magisk 14.0 on a Redmi Note 4 Snapdragon and super satisfied with it.
I just want to make simple changes like changing the lowmemorykiller minfree parameters - just like an init.d script in Kernel Adiutor..
Most of the commands are effective - but some of them are not..
This is what I want to apply for example:
chmod 666 /sys/module/lowmemorykiller/parameters/minfree
chown root /sys/module/lowmemorykiller/parameters/minfree
echo '7283,14566,21849,28928,36415,43698' > /sys/module/lowmemorykiller/parameters/minfree
..but does not work..
But these, for example.. these are working just fine:
echo '30' > /proc/sys/vm/swappiness
echo '0' > /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk
echo '80' > /proc/sys/vm/overcommit_ratio
echo '400' > /proc/sys/vm/vfs_cache_pressure
echo '2430' > /proc/sys/vm/extra_free_kbytes
echo '4096' > /proc/sys/kernel/random/write_wakeup_threshold
echo '1024' > /sys/block/mmcblk0/queue/read_ahead_kb
echo '0' > /sys/block/mmcblk0/queue/iostats
echo '1' > /sys/block/mmcblk0/queue/add_random
echo '1024' > /sys/block/mmcblk1/queue/read_ahead_kb
echo '0' > /sys/block/mmcblk1/queue/iostats
echo '1' > /sys/block/mmcblk1/queue/add_random
swapoff /dev/block/zram0 > /dev/null 2>&1
echo '1' > /sys/block/zram0/reset
echo '0' > /sys/block/zram0/disksize
echo '1' > /sys/block/zram0/max_comp_streams
echo '524288000' > /sys/block/zram0/disksize
mkswap /dev/block/zram0 > /dev/null 2>&1
swapon /dev/block/zram0 > /dev/null 2>&1
echo '4096' > /proc/sys/kernel/random/read_wakeup_threshold
echo '4096' > /proc/sys/vm/min_free_kbytes
echo '0' > /proc/sys/vm/oom_kill_allocating_task
echo '90' > /proc/sys/vm/dirty_ratio
echo '70' > /proc/sys/vm/dirty_background_ratio
I do know that all I have to do is to put my script to one of these dirs - depending on when I want to run the scripts:
/magisk/.core/service.d
/magisk/.core/post-fs-data.d
But, as I mentioned - most of them has effect, some of them has no..
Any comment, any suggestion is more than appreciated.
Thank you!
[SOLVED] - solution is in post #5
Desperate bump..
I searched for help docs for service.d and post-fs-data.d but counldn't find them, can I ask you when each folder is executed, also does the scripts inside them must have .sh extension or not ?
I want to restart my systemui after boot complete, can you tell me if this script is ok ?
Code:
#!system/bin/sh
sleep 20
su
pkill -l TERM -f com.android.systemui
ps : the pkill command works fine after an "su" in terminal emulator
sorry for the offtopic !
@sheraro
https://github.com/topjohnwu/Magisk/blob/master/docs/README.MD
First of all: the solution for my issue was a simple sleep 30 in the services.sh to delay the start.. and I used an auxiliary file as well to make the changes (called from services.sh with 30sec delay, copied with the update-binary file directly, set permission to 0777 via config.sh) after that is all started working..
sheraro said:
I searched for help docs for service.d and post-fs-data.d but counldn't find them, can I ask you when each folder is executed, also does the scripts inside them must have .sh extension or not ?
I want to restart my systemui after boot complete, can you tell me if this script is ok ?
Code:
#!system/bin/sh
sleep 20
su
pkill -l TERM -f com.android.systemui
ps : the pkill command works fine after an "su" in terminal emulator
sorry for the offtopic !
Click to expand...
Click to collapse
So, second thing, @sheraro, I think you should delete the command su from your script because Magisk scripts are running as root anyway and if you issue su command it will start a shell with elevated privileges - an interactive shell, not what you want here, a sudo like command.. it works in the terminal because it is interactive but in the shell script if you start su it starts an interactive shell and it halts your script because it won't exit the shell you started.. and the next command will never run.. if you know what I mean.. but you don't need it anyway, because - as I mentioned - it is running as root anyway. +1: The syntax of the shebang is bad in your example, it is missing an exclamation mark. Can you re-test it like this:
Code:
#!/system/bin/sh
sleep 20
pkill -l TERM -f com.android.systemui
exit 0
.sh extension is not needed, the thing is: you have to set the correct permission in the config.sh like this:
Code:
set_permissions() {
# Default permissions, don't remove them
set_perm_recursive $MODPATH 0 0 0777 0777
[..omitted..]
Thing is: the files must have execute priv. and you can execute them like
Code:
$MODDIR/./desiredfilename
in the services.sh script.
Hope this helps.
crok.bic said:
.sh extension is not needed, the thing is: you have to set the correct permission in the config.sh like this:
Code:
set_permissions() {
# Default permissions, don't remove them
set_perm_recursive $MODPATH 0 0 0777 0777
[..omitted..]
Thing is: the files must have execute priv. and you can execute them like
Code:
$MODDIR/./desiredfilename
in the services.sh script.
Hope this helps.
Click to expand...
Click to collapse
I'm just pasting my script in service.d only, set permissions manually to 0777, corrected !#/system typo, removed su command, but no luck...
Where's services.sh and config.sh ?
sheraro said:
I'm just pasting my script in service.d only, set permissions manually to 0777, corrected !#/system typo, removed su command, but no luck...
Where's services.sh and config.sh ?
Click to expand...
Click to collapse
Reading your comment I think you are not developing a Magisk module, do you?
I do and this is why you have no idea where is config.sh, services.sh and the others I think.
If you just want to have some kind of "init.d script" support and run the script in your own phone *only* then your script should be in the folder /magisk/.core/service.d and it should have execute permission. That's all what you need - probably the sleep 20 is not enough, increase it to sleep 30 for instance.
If this is still not enough info I would suggest to read the Magisk documentation thoroughly (linked in post #4) and if you still stuck I suggest you to open your own thread, describe your problem thoroughly (what is your goal? what would you like to achive? how did you already try? what is happening but should not or not happening but you think it should happen? you know what I mean..) and ask the community. Probably you will be able to solve your issue in minutes/hours.
I changed it to sleep 100, same problem, you're right I should create a new thread for this.
I have a theme installed that mimics oreo style, but the systemUI is not themed until it's restarted, so I thought about a script executed after boot, anyway thanks for your help
It seems that sleep will delay the run of other modules' service.sh. is there any solution that will not affect other module?
nicorg3221 said:
It seems that sleep will delay the run of other modules' service.sh. is there any solution that will not affect other module?
Click to expand...
Click to collapse
I don't experience this behavior - what you described is the post-fs-data behavior.
I did the trick with a separate ("auxiliary") file and tried to explain how in post #5 but let me try again:
- created a file in the module's common folder (I gave the name `tweak`)
- this file starts with a shebang (it's a script..) and continues with a sleep 30 then comes my commands..
- then copied the file from the module to the Magisk module directory into /magisk/$MODDIR with the module file META-INF/com/google/android/update-binary (I added it to the copy section, manually.. I know, I know, it should work automagically anyway, but did not work and I was fed up with the coding, so hardcoded it.. sorry)
- I set the default file permission to 0777 in config.sh (yes, 0777, this is loose AF but works.. and I don't really care, the file contains code that can make the device *better* and has no suid bit set, so there is only little to no room to harm anything..)
- then I included a call in my module's common/service.sh like $MODDIR/./tweak to start my script
- when the tweak script starts it will start with the sleep 30 so implements the delay.. BUT!
- Because services.sh files from the modules are called parallelly by Magisk (by default, by it's nature, by it's code.. you got it) my module does not delays others - but still has the delay.
Hope this helps.
sheraro said:
I changed it to sleep 100, same problem, you're right I should create a new thread for this.
I have a theme installed that mimics oreo style, but the systemUI is not themed until it's restarted, so I thought about a script executed after boot, anyway thanks for your help
Click to expand...
Click to collapse
Pleased to help you - but honestly, if the only task you need is to kill and restart systemUI then I would do it via init.d script run by an app that mimics init.d scripting, or using a kernel that supports init.d scripts (if only you want to use that theme). It's just less complex for you I think, but honestly, a simple script file that has execute permission in /magisk/.core/services.d/ gives you 100% the same solution.
crok.bic said:
I don't experience this behavior - what you described is the post-fs-data behavior.
I did the trick with a separate ("auxiliary") file and tried to explain how in post #5 but let me try again:
- created a file in the module's common folder (I gave the name `tweak`)
- this file starts with a shebang (it's a script..) and continues with a sleep 30 then comes my commands..
- then copied the file from the module to the Magisk module directory into /magisk/$MODDIR with the module file META-INF/com/google/android/update-binary (I added it to the copy section, manually.. I know, I know, it should work automagically anyway, but did not work and I was fed up with the coding, so hardcoded it.. sorry)
- I set the default file permission to 0777 in config.sh (yes, 0777, this is loose AF but works.. and I don't really care, the file contains code that can make the device *better* and has no suid bit set, so there is only little to no room to harm anything..)
- then I included a call in my module's common/service.sh like $MODDIR/./tweak to start my script
- when the tweak script starts it will start with the sleep 30 so implements the delay.. BUT!
- Because services.sh files from the modules are called parallelly by Magisk (by default, by it's nature, by it's code.. you got it) my module does not delays others - but still has the delay.
Hope this helps.
Click to expand...
Click to collapse
I have my script in starting in .Core. Maybe that's the problem
nicorg3221 said:
I have my script in starting in .Core. Maybe that's the problem
Click to expand...
Click to collapse
..then it is in the wrong dir.. it is clearly described in the Magisk documentation.
I have researched a bit. I think you can use getprop sys.boot_completed to check if boot is completed. We should run init.d scripts after boot is completed instead of just wait for 30/100 seconds.
I place all my init.d scripts I want to run in /magisk/.core/service.d/init.d.
Then, I have a service.d script [exec_init_d.sh] in /magisk/.core/service.d. Magisk will run exec_init_d.sh when boot.
exec_init_d.sh will wait for sys.boot_completed and run all the files in /magisk/.core/service.d/init.d after boot completed
exec_init_d.sh
Code:
#!/system/bin/sh
# Please don't hardcode /magisk/modname/... ; instead, please use $MODDIR/...
# This will make your scripts compatible even if Magisk change its mount point in the future
MODDIR=${0%/*}
# This script will be executed in late_start service mode
# More info in the main Magisk thread
if [ "$1" != "1" ]; then
$0 1 &
log -p i -t Magisk "start new instance to let Magisk boot stages proceed"
exit
fi
#param
RUNLOG=0
RETRY_INTERVAL=5 #in seconds
MAX_RETRY=60
EXEC_WAIT=3 #in seconds
INIT_D_DIR=$MODDIR/init.d
LOG_PATH=$MODDIR/debug.log
#init
retry=${MAX_RETRY}
#wait for boot completed
log -p i -t Magisk "wait for boot completed"
while (("$retry" > "0")) && [ "$(getprop sys.boot_completed)" != "1" ]; do
sleep ${RETRY_INTERVAL}
((retry--))
done
if (("$retry" == "0")); then
log -p i -t Magisk "boot not completed within maximum number of retry"
else
log -p i -t Magisk "boot completed"
fi
sleep ${EXEC_WAIT}
log -p i -t Magisk "init.d execution started from ${INIT_D_DIR}"
if (("${RUNLOG}" == "1")); then
/data/magisk/busybox run-parts $INIT_D_DIR &> $LOG_PATH
log -p i -t Magisk "init.d execution output written to $LOG_PATH"
else
/data/magisk/busybox run-parts $INIT_D_DIR
fi
log -p i -t Magisk "init.d execution completed"