[TWEAK] [ROOT] mDNIe screen sharpness tweak - Galaxy Note 3 Exynos Android Development

If in file "sys/class/mdnie/scenario" in first byte replace 0 to 1 or 2 or 3 or 4 screen sharpness is increasing (1 more sharp.........4 less sharp.).

my taste
I have tryed 2 and 3. My taste is 3 perfect

is this safe

zeyadhan said:
is this safe
Click to expand...
Click to collapse
Absolutely. I like 3.

alexhc18 said:
Absolutely. I like 3.
Click to expand...
Click to collapse
yeah 3 is nice.But it resets to zero every time I change wallpaper.
any way to make it permanent .

alexhc18 said:
If in file "sys/class/mdnie/scenario" in first byte replace 0 to 1 or 2 or 3 or 4 screen sharpness is increasing (1 more sharp.........4 less sharp.).
Click to expand...
Click to collapse
For some reason, I can never get this to work. When I try to make the changes by navigating to sys/class/mdnie, there's another folder/shortcut that takes me to another minor folder. In there, I see the scenario file and quite a few others. It even has text and no single digit (like my note 2 did) further more, any changes I make to the scenario file never stick. Maybe the T-Mobile US version is different?

When I reboot will the value reset itself? And do I need reboot after changing the value? I'm confused hmm.
RE: OK I figured out the thing that I asked. (I had no time to try those when I asked.)
1) No need to reboot after editing.
2) After reboot you have to re-do it.
Sent from my SM-N900 using XDA Premium HD app

3 looks bad ass. Use root explorer. Its what I used and changed the value easily.

so 0 value is the most sharpness ?
right ?
Sent from my SM-N900 using XDA Premium 4 mobile app

Is there anyway to make it permanent? Rather than redoing anytime when power off or reset. .w

garykcliu said:
Is there anyway to make it permanent? Rather than redoing anytime when power off or reset. .w
Click to expand...
Click to collapse
Make init.d support on mobile and create file "00mdnie" in folder "etc/init.d" with this inside:
#!/system/bin/sh
echo 3 > /sys/class/mdnie/mdnie/scenario
busybox mount -o remount,rw -t auto /system;
busybox chmod -R 777 /system/etc/init.d;
busybox mount -o remount,ro -t auto /system;
Or type in "terminal emulator" : echo 3 > /sys/class/mdnie/mdnie/scenario
Apps camera and gallery resets this to default 0

alexhc18 said:
Make init.d support on mobile and create file "00mdnie" in folder "etc/init.d" with this inside:
#!/system/bin/sh
echo 3 > /sys/class/mdnie/mdnie/scenario
busybox mount -o remount,rw -t auto /system;
busybox chmod -R 777 /system/etc/init.d;
busybox mount -o remount,ro -t auto /system;
Or type in "terminal emulator" : echo 3 > /sys/class/mdnie/mdnie/scenario
Apps camera and gallery resets this to default 0
Click to expand...
Click to collapse
I just followed your guide but still cannot make it work as well.
Perhaps it is too technical for me but anyway thanks so much for your assistance.
By the way, is it possible to make a flashable zip so that we can flash on CWM?
Thank you

garykcliu said:
I just followed your guide but still cannot make it work as well.
Perhaps it is too technical for me but anyway thanks so much for your assistance.
By the way, is it possible to make a flashable zip so that we can flash on CWM?
Thank you
Click to expand...
Click to collapse
First you need busybox. Install this by Stericson: https://play.google.com/store/apps/details?id=stericson.busybox
reboot after installing. Open busybox, use "normal install" method to "system/bin", don't use "smart install".
Then CWM install this:
View attachment zip_init.zip by Ryuinferno

alexhc18 said:
Make init.d support on mobile and create file "00mdnie" in folder "etc/init.d" with this inside:
#!/system/bin/sh
echo 3 > /sys/class/mdnie/mdnie/scenario
busybox mount -o remount,rw -t auto /system;
busybox chmod -R 777 /system/etc/init.d;
busybox mount -o remount,ro -t auto /system;
Or type in "terminal emulator" : echo 3 > /sys/class/mdnie/mdnie/scenario
Apps camera and gallery resets this to default 0
Click to expand...
Click to collapse
#!/system/bin/sh
#Replace the number down here with what you want
VAL=`3`
#init.d commands (optional)
busybox mount -o remount,rw -t auto /system;
busybox chmod -R 777 /system/etc/init.d;
busybox mount -o remount,ro -t auto /system;
#auto check commands
while [ 1 ]
do
VAL1=`cat /sys/class/mdnie/mdnie/scenario`
if [ "$VAL1" != "$VAL" ]
then
echo "$VAL" > /sys/class/mdnie/mdnie/scenario
fi
sleep 1
done

iba21 said:
#!/system/bin/sh
#Replace the number down here with what you want
VAL=`3`
#init.d commands (optional)
busybox mount -o remount,rw -t auto /system;
busybox chmod -R 777 /system/etc/init.d;
busybox mount -o remount,ro -t auto /system;
#auto check commands
while [ 1 ]
do
VAL1=`cat /sys/class/mdnie/mdnie/scenario`
if [ "$VAL1" != "$VAL" ]
then
echo "$VAL" > /sys/class/mdnie/mdnie/scenario
fi
sleep 1
done
Click to expand...
Click to collapse
Unfortunately no matter how hard I tried, I still cannot get it worked.
I have no other alternative but to give up.
Anyway thanks so much for your advice.

You need a rom witch has the init.d script.. or busybox and create the init.d folder + putting the correct permissions
And sure.. you have to create a script witch contains that code

iba21 said:
You need a rom witch has the init.d script.. or busybox and create the init.d folder + putting the correct permissions
And sure.. you have to create a script witch contains that code
Click to expand...
Click to collapse
This is what I have done...I have enabled the init.d support and then go into the etc/init.d folder to create a file '00mdnie' without extension which contains the codes:
------
#!/system/bin/sh
echo 3 > /sys/class/mdnie/mdnie/scenario
busybox mount -o remount,rw -t auto /system;
busybox chmod -R 777 /system/etc/init.d;
busybox mount -o remount,ro -t auto /system;
------
However every time when I shut down or reboot the N900 and then it will automatically reset to 0 and could you please advise when went wrong with the procedures that I am doing.
Thank you so much.

You have to put what i wrote.. all codes

tried that in CM11 4.4.2, manual setting scenario works but its uncomfortable to change it everytime it resets. pasting your code into init.d makes no difference... any ideas? i love sharpness tweaks but don't want to change kernel now so....

Script init.d
00mdnie
Code:
#!/system/bin/sh
# By @criskelo - CriskeloRoms
# Mod By @alexhc18
chmod 777 /sys/class/mdnie/mdnie/scenario
echo 1 > /sys/class/mdnie/mdnie/scenario
chmod 555 /sys/class/mdnie/mdnie/scenario
This prevents the gallery or camera changes the value to 0
:good:
Edit:
chmod 555 /sys/class/mdnie/mdnie/scenario
Read only and execution
Do not write
Edit:
ATTACHED FILES
All in one
Only install by CWM
ADD in your rom
screen sharpness 1
Support-Init.d

Related

Telstra T-Touch Tab aka Huawei S7 root

Hey guys, just got my hands on one of these suckers, it runs 2.1
Can anyone point me in the right direction to get root?
Im also looking for froyo, however dont expect it soon, manufacturer is working on it.
Sent from my S7 using XDA App
I second davidcampbell! We need froyo here
The root method is the same as the s7.
download z4root from market and root, after wards install busybox by titanium backup and you are set.
The app2sd mod works for this device since it is similar to the sony x10 on 2.1 but is risky because i lost wifi aftewards. So just explore until we get some real developers working on it hopefully cm6.1 port but after huawei realeases the recovery.img and source to mess around with though.
being able to overclock to 1ghz wouldnt hurt either.
S7 Bootloader?
Has anyone figured out how to get into the bootloader for this device?
Havent been able to through any apps \ commands. Just go to a black screen and thats it, and recovery sends you into factory settings for your device
I only know that pressing back key and call\send key when when powering on the device puts it into update mode.
alexisprz said:
The root method is the same as the s7.
download z4root from market and root, after wards install busybox by titanium backup and you are set.
The app2sd mod works for this device since it is similar to the sony x10 on 2.1 but is risky because i lost wifi aftewards. So just explore until we get some real developers working on it hopefully cm6.1 port but after huawei realeases the recovery.img and source to mess around with though.
being able to overclock to 1ghz wouldnt hurt either.
Click to expand...
Click to collapse
Zomg, nice, thank you alexisprz, it's rooting time
I really wish Android had a better term for rooting, it sounds like I'm either breaking it, or trying to cram my man bits into it some how.
Will this affect my ability to use the manufacturers update to froyo in the future?
UPDATE: z4root worked great, I installed busybox no problemo, very happy forum member here
sir i just bought one telstra touch tab can you plz help me to debrand it and unlock it i also have jtag too
pre needs, new rom and rooted with busybox on SD with linux ext2/3 Partition.
download z4root from market and root
copy 3 files to sd
run App-2-sd.sh
File 1 "App-2-sd.sh"
#!/bin/sh
# untitled.sh
#
#
# Created by Andew Blazely on 5/02/11.
# Copyright 2011 SOFTHOUSE. All rights reserved.
#
# un Hash data if you wish but it will slow the S7 down and cause lots of waiting problems
# pre needs, new rom and rooted with busybox on SD with linux ext2/3 Partition.
# mount the file systems
mount -o rw,remount -t yaffs2 /dev/block/mtdblock1 /system
busybox mkdir /system/sd
mount -t ext2 /dev/block/vold/179:2 /system/sd
# archive dirs (easier than copying)
cd /data/
busybox tar -cvf /system/sd/app.tar app
busybox tar -cvf /system/sd/app-private.tar app-private
# busybox tar -cvf /system/sd/data.tar data
busybox tar -cvf /system/sd/dalvik-cache.tar dalvik-cache
# unpack arcives in correct place
cd /system/sd
busybox tar -xvf app.tar
busybox tar -xvf app-private.tar
# busybox tar -xvf data.tar
busybox tar -xvf dalvik-cache.tar
# cleanup
busybox rm *.tar
# copy and set system files
busybox cp /sdcard/install-recovery.sh /system/etc
busybox cp /sdcard/init-sd.sh /system/etc
busybox chmod 755 /system/etc/install-recovery.sh
busybox chmod 755 /system/etc/init-sd.sh
# un Hash whatis needed if you intend NOT to remove SD
#cd /data/app
#busybox rm -rf *
#cd /data/app-private
#busybox rm -rf *
#cd /data/data/
#busybox rm -rf *
#cd /data/dalvik-cache
#busybox rm -rf *
# binding mount of new file structure
mount -o bind /system/sd/app /data/app
mount -o bind /system/sd/app-private /data/app-private
# mount -o bind /system/sd/data /data/data
mount -o bind /system/sd/dalvik-cache /data/dalvik-cache
reboot
File 2 "init-sd.sh"
#!/system/bin/sh
#
MYLOG=/sdcard/install-recovery.log
echo "$(date) Starting install-recovery.sh" > $MYLOG
echo "$(date) Waiting SD to become ready..." >> $MYLOG
sleep 10
# un Hash whatis needed if you intend NOT to remove SD
#echo "$(date) Erasing system files..." >> $MYLOG
#cd /data/app
#busybox rm -rf *
#cd /data/app-private
#busybox rm -rf *
#cd /data/data/
#busybox rm -rf *
#cd /data/dalvik-cache
#busybox rm -rf *
#echo "$(date) Erased system files..." >> $MYLOG
mount -t ext2 /dev/block/vold/179:2 /system/sd 1>>$MYLOG 2>>$MYLOG
mount -o bind /system/sd/app /data/app 1>>$MYLOG 2>>$MYLOG
mount -o bind /system/sd/app-private /data/app-private 1>>$MYLOG 2>>$MYLOG
# Hash this out if you haven't moved /data/data
#mount -o bind /system/sd/data /data/data 1>>$MYLOG 2>>$MYLOG
# Hash this out if you haven't move /data/dalvik-cache
mount -o bind /system/sd/dalvik-cache /data/dalvik-cache 1>>$MYLOG 2>>$MYLOG
mount >> $MYLOG
echo "$(date) Finishing install-recovery.sh" >> $MYLOG
File 3 "install-recovery.sh"
#!/system/bin/sh
#
/system/etc/init-sd.sh&
And BOB's your uncle.. this has worked many times for me give it a try

[CM7] Remove files on boot and change LCD Density using init.d

Talk in the CM7 threads has revealed that many people remove apps from CM7 before flashing/after flashing/using an update zip. This thread has a quick and easy method to remove apps (and other things) from CM7 on boot using an init.d script.
This method requires s-off (as the system is mounted as rw) and requires a little knowledge of android, however I will produce a 1 time only flash zip if people need it.
The following script is used and I will explain it below and what to modify;
If using Windows, don't use Notepad. I suggest Notepad++
/system/etc/init.d/50rm
Code:
#!/system/bin/sh
#mount system rw
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system;
#apps to delete
#send installed apps to /data/packages
pm list packages -f > /data/packages
for i in CarHomeLauncher LiveWallpapers LiveWallpapersPicker Protips;
do
if [ -e /system/app/$i.apk ];
then
rm -f /system/app/$i.apk;
grep $i.apk /data/packages > /data/pname;
pname2=$(sed 's/\(.*=\)\(.*\)/\2/' /data/pname);
pm uninstall $pname2;
fi;
done;
rm -f /data/packages
rm -f /data/pname
#delete camera_click sound
if [ -e /system/media/audio/ui/camera_click.ogg ];
then
rm -f /system/media/audio/ui/camera_click.ogg;
fi;
#mount system ro
mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system;
Save the script as /system/etc/init.d/50rm (adb push 50rm /system/etc/init.d/50rm) and change permissions to 750 (adb shell chmod 750 /system/etc/init.d/50rm).
Next, so that this script is kept through flashes of new CM7 versions, we add it to the custom_backup_list.txt found in /system/etc/ (if you don't have one, create one).
/system/etc/custom_backup_list.txt
Code:
etc/init.d/50rm
There are two situations to show how things can be deleted:
1)#apps to delete
The line to change here is the for i in ... line (10) where there is a list of app names to uninstall.
Change names to what you want to be deleted from /system/app. Do not include .apk in the name.
2)#delete camera click sound
This is an example of how to delete other files that are wanted to be deleted. As an example, I have put the camera click sound. The full directory of the file will be needed.
What the script does:
The script will check if these files are there and then delete them. With the system apps, I have put in a script that should uninstall the files using the package manager (which I think is working, but am currently testing it because I'm not sure package manager can be run whilst booting, but post-boot my pm list packages -f reveals none of the packages)
Requests:
If anyone has a better, more efficient way of using the pm to uninstall the apps, please mention it. I am a novice when it comes to shell scripting and can only go by what I have done so far.
Changelog:
25/04/2011 - initial release
26/04/2011 - changed some strings
Script - http://bit.ly/golKIb (right click - save link as - check there is no file extension) - adb push 50rm /system/etc/init.d/50rm; adb shell chmod 750 /system/etc/init.d/50rm
How to use the custom_backup_list.txt in more ways - (by freerunner @ CM Forums)
Any problems, post here or add me to gtalk
subscribed, thanks mate.
i'll look into this when i get the time
Could anyone write a procedure that checks /system/build.prop, finds the line "ro.sf.lcd_density=240" and swapps it for "ro.sf.lcd_density=210"?
JDima said:
Could anyone write a procedure that checks /system/build.prop, finds the line "ro.sf.lcd_density=240" and swapps it for "ro.sf.lcd_density=210"?
Click to expand...
Click to collapse
Already done that. Once again, its not the cleanest way of doing things, but its as much as I know.
Change LCD Density on Boot
Code:
#!/system/bin/sh
#change lcd_density and reboot if new install
density=$(grep ro.sf.lcd_density=240 /system/build.prop);
if [ $density = "ro.sf.lcd_density=240" ];
then
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system;
sed -i 's/ro.sf.lcd_density=240/ro.sf.lcd_density=210/g' /system/build.prop;
mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system;
reboot;
fi;
What the script does:
Checks the LCD Density and if it is 240, it will change it to 210 (or whatever value people want by changing ro.sf.lcd_density=210 to the denisty they want). It then reboots immediately (whilst still on splash screen) so that the new density is loaded when you boot the phone.
Why is this needed when there are apps on the market?:
Many of the apps on the market need to be re-run on new rom flashes or are not permanent. This can be made permanent by adding to the custom_backup_list.txt and will be done every new flash in CM7.
Is this way better than deleting apps/sounds before flashing, or is it just alternative?
Personally I find it more easy to delete apps and other stuff via adb when the rom is instaled.
expl0de said:
Is this way better than deleting apps/sounds before flashing, or is it just alternative?
Personally I find it more easy to delete apps and other stuff via adb when the rom is instaled.
Click to expand...
Click to collapse
Its an alternative way that does it for you. All you have to do is put the script on your phone, add it to the custom_backup_list.txt and let the script work for you.
iinga, thanks!
Why? Because https://market.android.com/details?id=lv.n3o.lcddensity (for example) doesn't seem to work after reboot, and it has slightly different behavior (check out the keyboard for instance). The build.prop method is the "cleanest" one.
JDima said:
iinga, thanks!
Why? Because https://market.android.com/details?id=lv.n3o.lcddensity (for example) doesn't seem to work after reboot, and it has slightly different behavior (check out the keyboard for instance). The build.prop method is the "cleanest" one.
Click to expand...
Click to collapse
Agreed, which is why I wrote that script in the first place
Problem. The script does exactly nothing.
Code:
--------- beginning of /dev/log/main
I/cm ( 79): Welcome to Android 2.3.3 / CyanogenMod-7.0.2.1-Desire
I/cm ( 80): _
I/cm ( 81): __ __ _ ___ _ _ __ ___ __ _ _ _ _ __ __))
I/cm ( 82): ((_ \(/'((_( ((\( ((_)((_( (('((\( ((`1( ((_)((_(
I/cm ( 83): )) _))
I/cm ( 84):
I/mountsd ( 98): Checking filesystems..
I//system/xbin/run-parts( 74): e2fsck 1.41.10 (10-Feb-2009)
I//system/xbin/run-parts( 74): /dev/block/mmcblk0p2: recovering journal
I//system/xbin/run-parts( 74): /dev/block/mmcblk0p2: clean, 133/438272 files, 260021/875449 blocks
I/logwrapper( 104): busybox terminated by exit(0)
I/logwrapper( 109): busybox terminated by exit(0)
I/logwrapper( 111): busybox terminated by exit(0)
I/mountsd ( 113): /sd-ext successfully mounted
I/busybox ( 127): S2E: Initialization...
I/busybox ( 127): S2E: /sd-ext/app mount as /data/app
I/busybox ( 127): S2E: /sd-ext/app-private mount as /data/app-private
I/busybox ( 127): S2E: /sd-ext/download mount as /cache/download
I/busybox ( 127): S2E: Done!
I/logwrapper( 127): busybox terminated by exit(0)
[B]I//system/xbin/run-parts( 74): run-parts: /system/etc/init.d/50rm exited with code 111[/B]
I/logwrapper( 74): /system/xbin/run-parts terminated by exit(1)
The permissions are correct.
Here's my 50rm:
Code:
#!/system/bin/sh
#mount system rw
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system;
if [ -e /system/media/audio/ui/camera_click.ogg ];
then
rm -f /system/media/audio/ui/camera_click.ogg;
fi;
#change lcd_density and reboot if new install
density=$(grep ro.sf.lcd_density=240 /system/build.prop);
if [ $density = "ro.sf.lcd_density=240" ];
then
sed -i 's/ro.sf.lcd_density=240/ro.sf.lcd_density=210/g' /system/build.prop;
mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system;
reboot;
fi;
#mount system ro
mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system;
JDima said:
Code:
#!/system/bin/sh
#mount system rw
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system;
if [ -e /system/media/audio/ui/camera_click.ogg ];
then
rm -f /system/media/audio/ui/camera_click.ogg;
fi;
#change lcd_density and reboot if new install
density=$(grep ro.sf.lcd_density=240 /system/build.prop);
if [ $density = "ro.sf.lcd_density=240" ];
then
sed -i 's/ro.sf.lcd_density=240/ro.sf.lcd_density=210/g' /system/build.prop;
mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system;
reboot;
fi;
#mount system ro
mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system;
Click to expand...
Click to collapse
Try removing the "mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system;" in the lcd density if section (before reboot).
iinga said:
Try removing the "mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system;" in the lcd density if section (before reboot).
Click to expand...
Click to collapse
Predictably, it didn't help.
No way would mounting /system as RO be performed twice - because the script terminates after any of them one way or another.
JDima said:
Predictably, it didn't help.
No way would mounting /system as RO be performed twice - because the script terminates after any of them one way or another.
Click to expand...
Click to collapse
I know it wouldn't perform twice, however I was wondering why it fails to run the script.
It has been working for me, but now trying to work out what is different is difficult.
iinga said:
It has been working for me, but now trying to work out what is different is difficult.
Click to expand...
Click to collapse
Could you post the whole script you're using yourself (if it includes changing density)?
JDima said:
Could you post the whole script you're using yourself (if it includes changing density)?
Click to expand...
Click to collapse
Code:
#!/system/bin/sh
#mount system rw
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system;
#change lcd_density and reboot if new install
density=$(grep ro.sf.lcd_density=240 /system/build.prop);
if [ $density = "ro.sf.lcd_density=240" ];
then
sed -i 's/ro.sf.lcd_density=240/ro.sf.lcd_density=220/g' /system/build.prop;
mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system;
reboot;
fi;
#apps to delete
pm list packages -f > /system/packages
for i in CarHomeLauncher LiveWallpapers LiveWallpapersPicker Protips DSPManager GenieWidget FileManager;
do
if [ -e /system/app/$i.apk ];
then
rm -f /system/app/$i.apk;
grep $i.apk /system/packages > /system/pname;
pname2=$(sed 's/\(.*=\)\(.*\)/\2/' /system/pname);
pm uninstall $pname2;
fi;
done;
rm /system/packages;
rm /system/pname;
#delete camera_click sound
if [ -e /system/media/audio/ui/camera_click.ogg ];
then
rm -f /system/media/audio/ui/camera_click.ogg;
fi;
#mount system ro
mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system;
http://www.iinga.net/desire/50rmlcd
Nope. Same thing with your script. I even tried granting the script maximum permissions - useless.
Can anyone else verify the script actually works?
JDima said:
Nope. Same thing with your script. I even tried granting the script maximum permissions - useless.
Can anyone else verify the script actually works?
Click to expand...
Click to collapse
Are you s-off?
iinga said:
Are you s-off?
Click to expand...
Click to collapse
Off course
A detailed reproduction of my steps:
1) Place 50rm into /system/etc/init.d via Root Explorer (shouldn't make any difference)
2) Change permissions on 50rm.
3) Doublecheck the permissions.
4) Create and configure custom_backup_list.txt
5) Reflash the same ROM (I'm using custom MTD - however, that also shouldn't change anything)
6) Verify visually that the script didn't work.
7) Verify that 50rm is in place with correct permissions.
8) Reboot and adb logcat...
JDima said:
Off course
A detailed reproduction of my steps:
1) Place 50rm into /system/etc/init.d via Root Explorer (shouldn't make any difference)
2) Change permissions on 50rm.
3) Doublecheck the permissions.
4) Create and configure custom_backup_list.txt
5) Reflash the same ROM (I'm using custom MTD - however, that also shouldn't change anything)
6) Verify visually that the script didn't work.
7) Verify that 50rm is in place with correct permissions.
8) Reboot and adb logcat...
Click to expand...
Click to collapse
I just did step 5 and my phone goes to splash screen, reboots from splash screen, fully boots in density 220.
Code:
adb shell grep ro.sf.lcd_density /system/build.prop
ro.sf.lcd_density=220
How did you create your script? When I just created it using notepad for windows, I get the Exit Code 111 and no LCD Density change.
Creating with notepad ++, script runs fine and LCD density gets changed correctly.
iinga said:
How did you create your script? When I just created it using notepad for windows, I get the Exit Code 111 and no LCD Density change.
Creating with notepad ++, script runs fine and LCD density gets changed correctly.
Click to expand...
Click to collapse
Dammit...
Thanks, mate, it worked

[ACS][Kernel][How-To] Make your own Plus Kernel **Updated 9/18**

Even though I put this in the Epic forum, this will work on any zImage based android kernel as far as I am aware.. from Eclair to Gingerbread, maybe previous, maybe in the future..
I will post my tweaks here (please give credit), and even my ext4 modules (again please give credit, to both me and Rodderik, as he helped with one of them) for Gingerbread.
First off, you will need either a linux based computer, a remote linux box, or a virtual machine.. I don't think cygwin will be enough. I'm not going to go through the steps of setting that up because it's out of the scope of this How-to, maybe in another post.
Second, you need some scripts to decompile the initramfs from the kernel, or you can do it manually with grep or a hex editor ( I don't recommend ), I'll provide the scripts I use, which I procured from supercurio's project voodoo github then modified to work a little better with zImages that have 2 signatures (happens sometimes) like EH06...
http://chris41g.devphone.org/voodoo.tar.gz
in voodoo/config.sh you will need to set your compiler path.
also read the readme.txt it will pretty much describe how it all works, and remember all the gingebread leaks only work with gzip compression when repacking.
to unpack the initramfs
Code:
./extracter.sh -s "/path/to/original/zImage" -d "/path/where/you/want/initramfs/"
and after a few minutes your initramfs will be wherever you told it to go with -d.
now the initramfs is pretty much the meat and potatoes when repacking a kernel.
adding EXT4
this is a pretty popular request...
to do this you need just a few things, the correct modules, and the correct mount options. both of which i will provide.
the modules for Gingerbread are called ext4.ko and mbcache.ko and need to added to lib/modules in the initramfs - link http://chris41g.devphone.org/gbext4modules.tar.gz
then the following lines need to be added to init.rc lpm.rc and recovery.rc
Code:
insmod /lib/modules/mbcache.ko
insmod /lib/modules/ext4.ko
right around the lines that look like
Code:
insmod /lib/modules/fsr.ko
insmod /lib/modules/fsr_stl.ko
insmod /lib/modules/rfs_glue.ko
insmod /lib/modules/rfs_fat.ko
to the same files look for:
Code:
mount rfs /dev/block/stl9 /system check=no
and under it add
Code:
mount ext4 /dev/block/stl9 /system noatime nodiratime errors=continue
now in init.rc and recovery.rc look for
Code:
mount rfs /dev/block/stl10 /data nosuid nodev crypt check=no
and under it add
Code:
mount ext4 /dev/block/stl10 /data nosuid nodev crypt noatime nodiratime
and look for
Code:
mount rfs /dev/block/stl11 /cache nosuid nodev check=no
and under it add
Code:
mount ext4 /dev/block/stl11 /cache nosuid nodev noatime nodiratime errors=continue nobh data=writeback barrier=0 noauto_da_alloc
now usually there will be some stuff you need to comment out.. which means adding # to the beginning of the line..
i always comment this out because it can mess with my tweaks later on and its useless
Code:
mount rfs /dev/block/stl9 /system ro remount
i also comment out or delete left over stuff for other phones that samsung has a habit of leaving in our init.rc... lazy people..
How to Root a Kernel Re-Pack:
This may seem basic, and to some it is, but I'm going to cover it anyway. Also it has changed in gingerbread, as you can't suid anything in /sbin, and that is the beginning of your PATH.
First we need some files.
su binary Stable - http://forum.xda-developers.com/showthread.php?t=682828 Beta - http://chris41g.devphone.org/su3.tar.gz
Superuser.apk Beta - http://chris41g.devphone.org/Superuser.apk
busybox binary (this one is dependent on whether you have purple cwm built in or not, since we havent got that far ill assume you dont) busybox 1.20.0 compiled by me http://chris41g.devphone.org/busybox
copy those files into /sbin in the initramfs, also do a
Code:
ln -s busybox sh
from the sbin directory in your initramfs on your linux box to make a symlink from sh to busybox
then goto the initramfs root
and do
Code:
ln -s sbin bin
to make a symlink from sbin to bin, it's probably not necessary but i always do it for consistency.
now go into /sbin and make a new sh script called whatever you want.
Code:
#!/system/bin/sh
# Remount filesystems RW
busybox mount -o remount,rw /
busybox mount -o remount,rw /system
#install busybox links
busybox cp /sbin/busybox /system/bin/busybox
/system/bin/busybox rm /sbin/busybox
busybox --install -s /system/bin
busybox --install -s /system/xbin
#establish root
busybox cp -f /sbin/su /system/bin/su
chmod 6755 /system/bin/su
busybox rm /sbin/su
busybox ln -s /system/bin/su /system/xbin/su
#check if Superuser.apk exist if not install but also delete bloat to make room
if [ ! -f "/system/app/Superuser.apk" ] && [ ! -f "/data/app/Superuser.apk" ] && [[ ! -f "/data/app/com.noshufou.android.su"* ]]; then
if [ -f "/system/app/Asphalt5_DEMO_ANMP_Samsung_D700_Sprint_ML.apk" ]; then
busybox rm /system/app/Asphalt5_DEMO_ANMP_Samsung_D700_Sprint_ML.apk
fi
if [ -f "/system/app/Asphalt5_DEMO_SAMSUNG_D700_Sprint_ML_330.apk" ]; then
busybox rm /system/app/Asphalt5_DEMO_SAMSUNG_D700_Sprint_ML_330.apk
fi
if [ -f "/system/app/FreeHDGameDemos.apk" ]; then
busybox rm /system/app/FreeHDGameDemos.apk
fi
busybox cp /sbin/Superuser.apk /system/app/Superuser.apk
fi
sync
# Fix screwy ownerships
for blip in conf default.prop fota.rc init init.goldfish.rc init.rc init.smdkc110.rc lib lpm.rc modules recovery.rc res sbin bin
do
chown root.shell /$blip
chown root.shell /$blip/*
done
chown root.shell /lib/modules/*
chown root.shell /res/images/*
#setup proper passwd and group files for 3rd party root access
# Thanks DevinXtreme
if [ ! -f "/system/etc/passwd" ]; then
echo "root::0:0:root:/data/local:/system/bin/sh" > /system/etc/passwd
chmod 0666 /system/etc/passwd
fi
if [ ! -f "/system/etc/group" ]; then
echo "root::0:" > /system/etc/group
chmod 0666 /system/etc/group
fi
# fix busybox DNS while system is read-write
if [ ! -f "/system/etc/resolv.conf" ]; then
echo "nameserver 8.8.8.8" >> /system/etc/resolv.conf
echo "nameserver 8.8.4.4" >> /system/etc/resolv.conf
fi
sync
# patch to prevent certain malware apps
if [ -f "/system/bin/profile" ]; then
busybox rm /system/bin/profile
fi
touch /system/bin/profile
chmod 644 /system/bin/profile
# remount read only and continue
busybox mount -o remount,ro /
busybox mount -o remount,ro /system
Now you need to make a change in your init.rc file to call this new script..
add this to your init.rc in the services section, around where the factory bootanimation service is loaded.
Code:
# Custom Script Configuration
service userscript /system/bin/sh /sbin/[whateveryounamedyour].sh
user root
group system
critical
oneshot
now you have rooted your own repack...
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Adding init.d support...
this is pretty easy, didn't want to add another post..
Let's open up /sbin/[whateveryounamedyour].sh
right after installing Superuser.apk, lets add this section...
Code:
if [ -d /system/etc/init.d ]
then
logwrapper busybox run-parts /system/etc/init.d
fi
sync
There ya go, thats it, you're done..
-----------------------------------------------------------------------------------------------------------------------------------------------
Ok, since I'm on a roll haha lets go with bootanimations... they are different on Gingerbread..
this is all done in the init.rc so lets open that up in your text editor, I recommend Geany btw..
First off in GB I had to disable stock animations to make it not look like trash, because they won't always start at the same time.. but it's your option.. ymmv
Code:
service samsungani /system/bin/samsungani
user graphics
group graphics
disabled
oneshot
Comment that section if you want to disable the stock animations... you can leave it and custom animations will still work if you want, but fair warning, its weird...
Code:
service bootanim /system/bin/bootanimation
user graphics
group graphics
critical
oneshot
Add that section to enable custom animations..
I never have but just incase you want to, you can comment this section out to disable boot sounds..
Code:
service playsound /system/bin/playsound
user media
group system
disabled
oneshot
one more thing, the new binary works, but it doesn't know when to stop playing....
add this line to the very end of the init.rc
Code:
on property:sys.boot_completed=1
stop bootanim
Thanks to tanimn for help on that one...
Now remember, before gingerbread, custom animations were bootanimation.zip, but now they are sanim.zip you can leave it that way, or for the users sake you can crack open the [whateveryounamedyour].sh and make a workaround.
add this line to [whateveryounamedyour].sh before you remount the partitions at the end.
Code:
busybox ln -s /system/media/bootanimation.zip /system/media/sanim.zip
basically what that does is create a symlink from the users bootanimation.zip to sanim.zip, so when the bootanimation binary looks for sanim.zip its redirected to bootanimation.zip.. so the user can put bootanimation.zip in the directory transparently without having to rename...
More to come, and I'm still taking request for additions to this how to....
awesome! thanks for the post... maybe I can start putting that programming class I had last semester to good use...
Joey
holy crap...I needed this about a month ago. thanks for putting it all in one place!! and jw....why do we need the mbcache.ko? ext4 worked fine without it, in a kernel I did.
sent from my uncyanogen modded epic 4g. with the key skips.
You know I don't even know what a plus kernel does but I use it for the old school android boot animation
Sent from my SPH-D700 using xda premium
ahh nice! cant wait for the others!
I really wanted this thank for the info!
Sent from my SPH-D700 using xda premium
Anyone ... what does the plus kernel do ?
Sent from my SPH-D700 using xda premium
Digglez said:
Anyone ... what does the plus kernel do ?
Sent from my SPH-D700 using xda premium
Click to expand...
Click to collapse
Its basically a stock kernel with mods.
Sent from my SPH-D700 using xda premium
Any mods besides the boot animation
Sent from my SPH-D700 using xda premium
Digglez said:
Any mods besides the boot animation
Sent from my SPH-D700 using xda premium
Click to expand...
Click to collapse
So far, adding ext4 modules is the only mod he's shown how to do. He'll be updating his thread with more mods soon.
Sent from my SPH-D700 using xda premium
Digglez said:
Any mods besides the boot animation
Sent from my SPH-D700 using xda premium
Click to expand...
Click to collapse
You can include boot animation...he just hasn't shown how to do it yet like ceelos said
Like I said in the first post, I will take request, within reason...
chris41g said:
Like I said in the first post, I will take request, within reason...
Click to expand...
Click to collapse
Any way you can show us how to bake mods into the kernel? Like say, superuser, so we make pre-rooted kernels
Sent from my SPH-D700 using xda premium
Ceelos09 said:
Any way you can show us how to bake mods into the kernel? Like say, superuser, so we make pre-rooted kernels
Sent from my SPH-D700 using xda premium
Click to expand...
Click to collapse
Updated just now with rooting, init.d support, and bootanimations..
Could you add how to do a cwm redirector? I've searched everywhere and can't find how.
that will be one of the upcoming topics..
chris41g said:
Updated just now with rooting, init.d support, and bootanimations..
Click to expand...
Click to collapse
Thanks Chris!
Sent from my SPH-D700 using xda premium
Hope your not doing this because you plan on leaving ! D;
But once again thanks for the info ill read it daily to make sure I understand it all!
Sent from my SPH-D700
I don't plan on going anywhere... but I also don't plan on being the only one repacking kernels forever either =]
chris41g said:
that will be one of the upcoming topics..
Click to expand...
Click to collapse
Awesome
chris41g said:
I don't plan on going anywhere... but I also don't plan on being the only one repacking kernels forever either =]
Click to expand...
Click to collapse
Hopefully soon we won't have to repack them, just recompile

[GUIDE][ROOT]Reduce LAGS At Realtime

Hi Guys, Im Here To Share You My Guide About Reducing Lag At Realtime. But First Heres The Requirements
Note: Use This If You Dont Have Battery Issues. This Method Is Only For Gaming And Multitasking.
Requirements
-An Android Device Running With 4.0.x And Above(Not Sure If Will Work On GB)
-Root Permission
-Busybox Stable Build(Higher Version Is Recommended)
-Terminal Emulator Or Script Manager App From Play Store
-A Custom Recovery Like ClockWorkMod Or Team Win Recovery Project
-Droidedit App From Play Store
Click to expand...
Click to collapse
Instructions
1. Reboot To Recovery Mode
2. Backup Your Device Using Recovery
3. After Backing Up Your Phone, Open DroidEdit App From App Drawer
4. Write The Following Line On DroidEdit App:
Code:
#!/system/bin/sh
mount -o rw,remount /system 2>/dev/null
mount -o rw,remount rootfs 2>/dev/null
mount -o rw,remount / 2>/dev/null
cat >> /system/bin/kill_lag <<EOF
#!/system/bin/sh
# Lag Reducer
while true; do
echo 3 >> /proc/sys/vm/drop_caches;
sleep 2
echo 2 >> /proc/sys/vm/drop_caches;
done;
EOF
chmod 755 /system/bin/kill_lag 2>/dev/null
chown 0:0 /system/bin/kill_lag 2>/dev/null
nohup /system/bin/kill_lag &
exit 0
5. Save It At The Root Of Your Sdcard Then Named It As kill_lag.sh
6. Open Script Manager App
7. Find The kill_lag.sh at /sdcard
8. Tap kill_lag.sh Then Tap Su Icon, Last, Tap Run
9. Wait Then Done
Click to expand...
Click to collapse
Compatibility
This Method Will Work On Any Android Device Unless You Have Root
Note
To All Users, Dont Copy This Guide With Out My Permission.
Thanks To
-Busybox Developers For BusyBox
-All Devs Here At XDA And Also You, Users
-Unix
Setting drop_caches to 3 then back to 2 to free pagecache is a bit of a myth.
It will obviously free some RAM, but it will also spike up the CPU because there's a load as cache is being rebuilt. Ideally drop_cache doesn't need to played with, or at least not a lot (once a day?) otherwise you're just going to trade the false sense of "performance" for battery life.

[Kernel] [MTC20K] [NBD90W] - Nexus 5X Superboot ForceEncrypt Disabled & Init.d

NEXUS 5X Superboot​WARNING: I am not responsible for anything that happens as a result of flashing these modified boot images.
This kernel is based on MTC20K (Marshmellow) & NBD90W (Nougat) stock builds. It features several mods added by me & continues the work of others. Consider it my lil experiment for now.
Features:
System verification disabled
Force encrypt /data disabled
System mode root on boot
Init.d support
Chainfire modified sepolicy
Insecure ADB Version
Allows su binary update
More to come?
Coming Soon:
LostAndroid
Chainfire Liveboot
Device Admin Restore
One click install
Changes made:
ramdisk/sepolicy: replaced using:
Code:
supolicy --save outfile /sdcard/sepolicy
(outputted from rooted N5X in system mode)
ramdisk/fstab.bullhead: changed "forceencrypt" to "encryptable" and removed verification
Code:
/dev/block/platform/soc.0/f9824900.sdhci/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,nomblk_io_submit,noauto_da_alloc,errors=panic wait,check,[COLOR="green"]encryptable[/COLOR]=/dev/block/platform/soc.0/f9824900.sdhci/by-name/metadata
/dev/block/platform/soc.0/f9824900.sdhci/by-name/system /system ext4 ro,barrier=1 wait[COLOR="red"][STRIKE],verify=/dev/block/platform/soc.0/f9824900.sdhci/by-name/metadata[/STRIKE] [/COLOR]
/dev/block/platform/soc.0/f9824900.sdhci/by-name/vendor /vendor ext4 ro,barrier=1 wait[COLOR="red"][STRIKE],verify=/dev/block/platform/soc.0/f9824900.sdhci/by-name/metadata[/STRIKE][/COLOR]
ramdisk/init.rc: added services daemonsu, superboot, init.d
Code:
##Superboot MOD added by:
##[email protected]
service superboot /system/bin/sh /superboot.sh
class main
user root
group root
oneshot
service daemonsu /sbin/daemonsu --auto-daemon
class late_start
user root
group root
oneshot
on property:ro.daemonsu.persist=1
start daemonsu
on property:ro.supersu.persist=0
stop daemonsu
## Init.d MOD by [email protected]
service userinit /sbin/busybox run-parts /system/etc/init.d
class late_start
user root
group root
oneshot
on property:ro.init.d=1
start userinit
on property:ro.init.d=0
stop userinit
ramdisk/superboot.sh
Code:
#!/sbin/sh
##SUPERBOOT MOD ADDED BY:
##[email protected]
mount /system
mount /data
mount -o rw,remount /system
mount -o rw,remount /system /system
mount -o rw,remount /
mount -o rw,remount / /
if ! -e /system/xbin; then
mkdir /system/xbin
fi
if ! -e /system/daemonsu; then
cat /superboot/su>/system/xbin/daemonsu
cp /superboot/su /system/xbin/daemonsu
fi
if ! -e /system/su; then
cat /superboot/su>/system/xbin/su
cp /superboot/su /system/xbin/su
fi
if ! -e /system/lib64/libsupol.so; then
cat /superboot/libsupol.so /system/lib64/libsupol.so
cp /superboot/libsupol.so /system/lib64/libsupol.so
fi
if ! -e /system/xbin/supolicy; then
cat /superboot/supolicy>/system/xbin/supolicy
cp /superboot/supolicy /sytem/xbin/supolicy
fi
echo 1 > /system/etc/.installed_su_daemon
chmod 6755 /system/xbin/su
chmod 6755 /system/xbin/daemonsu
chmod 644 /system/etc/.installed_su_daemon
chmod 644 /system/lib64/libsupol.so
chmod 755 /system/xbin/supolicy
rm /system/recovery-from-boot.*
sync
mount -o ro,remount /system
mount -o ro,remount /system /system
mount -o ro,remount /
mount -o ro,remount / /
other additions to ramdisk:
Code:
ramdisk/sbin/busybox
ramdisk/sbin/daemonsu
ramdisk/sbin/sh
ramdisk/superboot/libsupol.so
ramdisk/superboot/su
ramdisk/superboot/supolicy
HIGH RISK TESTING
NBD90W
Please participate in poll if using this version to let me and the community know if this works as expected. Does it boot, root, init.d work?
Downloads:
NBD90W
MTC20K
All changes made with the help of Android Image Kitchen by osm0sis
If you like my work and others, show that love with a thumbs up
XDA:DevDB Information
Nexus 5X Superboot Autoroot, Kernel for the LG Nexus 5X
Contributors
Geofferey, c3k, CNBLACK
Kernel Special Features: force encrypt disabled, dm-verity disabled, init.d, superboot
Version Information
Status: Testing
Current Stable Version: MTC20K
Current Beta Version: NBD90W
Created 2016-10-13
Last Updated 2016-10-17
Reserved
Lol is it to early to request nougat xD. Nice build bro.
Haha I will try it tomorrow. I don't know if there is any new security in the boot.img that will affect it. I will make one and upload for you to test, if it works out I will put it up. Might even get it tonight.
edit:
I'm going to upload a Nougat Kernel FOR TESTING, beware!!! Let me know what happens and if it boots or not. I am not on Nougat so I can not test myself.
How can I use init.d?
Should I have root permission?
Do I have to create folder "init.d" in /system/etc/ then copy init.d script file there ? just done it?
Just create init.d folder in /etc if it doesn't exist. What version did you use? This kernel automatically roots the phone.
lol My nickname included to contributor!
Okay.. So, SYSTEM-MODE root is work on your modified boot image?
Yup, lol if it wasnt for you i wouldnt have known how.
On the MTC20K it does for sure afaik. The NBD90W nobody has told me. Should in theory tho.

Categories

Resources