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
Related
I seem to be frequently flashing or messing up my G1 so I decided to write some shell scripts to help out but they seem to only half work if at all. Actually I'm not sure what they did because they displayed no output.
This script is supposed to backup the default init.rc and mountd.conf files then replace the existing ones with the modified ones.
Though it does not work.
Code:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
mkdir /system/sd
busybox cp -a /system/etc/mountd.conf /sdcard/recovery/mountd.conf.bak
busybox cp -a /system/init.rc /sdcard/recovery/init.rc.bak
busybox cp -a /sdcard/recovery/mountd.conf /system/etc/mountd.conf
busybox cp -a /sdcard/recovery/init.rc /system/init.rc
then this is the next set to move the apks and the program caches which doesn't work.
Code:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
busybox cp -a /data/app /system/sd
rm -r /data/app
ln -s /system/sd/app /data/app
busybox cp -a /data/app-private /system/sd/app-private
rm -r /data/app-private
ln -s /system/sd/app-private /data/app-private
rm -R /data/data/com.android.browser/cache/webviewCache
ln -s /sdcard/cache/webviewCache /data/data/com.android.browser/cache/webviewCache
rm -R /data/data/com.android.vending/cache
ln -s /sdcard/cache/marketCache /data/data/com.android.vending/cache
rm -R /data/data/com.google.android.street/cache
ln -s /sdcard/cache/streetCache /data/data/com.google.android.street/cache
reboot
Plus both run and output no errors either. Who knows what problems I'll run into because I have no idea what they actually did.
Anyone see anything wrong here?
Well I'll help you.
1-) After you back up the mount and stuff and put the other back, you MUST reboot before keep going.
2-)After boot then you can copy the files or make the symlink. I suggest you dont copy the app to the sdcard on teh scrip since they should be there already. so do that manually once then the script just delete the folders and then crate the symlinmks.
I have a menu that does that and I have got some experience as why it works one day and not the other.
Rafase282 said:
Well I'll help you.
1-) After you back up the mount and stuff and put the other back, you MUST reboot before keep going.
Click to expand...
Click to collapse
I took the reboot out after the mountd.conf and init.rc did not appear to copy due to the lack of /dev/mmcblk0p2 hoping to see some sort of output why it did not run. Unfortunately it runs and backs up the files but does not replace them with the modded ones.
Rafase282 said:
2-)After boot then you can copy the files or make the symlink. I suggest you dont copy the app to the sdcard on teh scrip since they should be there already. so do that manually once then the script just delete the folders and then crate the symlinmks.
Click to expand...
Click to collapse
Not copying the apps is a good idea, modified the script to not do so.
Rafase282 said:
I have a menu that does that and I have got some experience as why it works one day and not the other.
Click to expand...
Click to collapse
Does Android require that you do a chmod on all shell scripts first?
On Debian I usually just use sudo sh ./ and it runs the script w/o changing anything on the file permissions so I figured Android would be similar if I just ran them as root. Still I see a lot of people requiring a chmod 777 on any guide referring to running shell scripts.
I will try that and report back with my findings. Thanks for replying.
Does Android require that you do a chmod on all shell scripts first? I just have to type m oon anywhere in the androud shell and my scripts run, for that i put it on /system/bin and do a chmod 4755 to the file. it is still needed to type su before you run the script.
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
mkdir /system/sd
cp /sdcard/media/Data/mountd.conf /system/etc/mountd.conf
cp /sdcard/media/Data/init.rc /system/init.rc
Thats my code for copying the modified files to the right place. So maybe you should try that.
Oh for androoid you dont unless you put it on /system/bin then you will have to use sude and sometiems it still wont run due to lack or permisions so is better to do a chmod 4755
Well I made the changes suggested and did a chmod on all the files prior to running but with no luck.
The odd thing is if I use the shell scripts as a guide list it works perfectly but if I try to launch them as a shell script all sorts of strange undesirable things happen to my phone.
The time consumed trying to use the scripts and recover from what happens from what they do out weight the effects of typing everything in.
joshtheitguy said:
Well I made the changes suggested and did a chmod on all the files prior to running but with no luck.
The odd thing is if I use the shell scripts as a guide list it works perfectly but if I try to launch them as a shell script all sorts of strange undesirable things happen to my phone.
The time consumed trying to use the scripts and recover from what happens from what they do out weight the effects of typing everything in.
Click to expand...
Click to collapse
you can only run the script once .. when the "ln -s" has already been done it has to be undone before trying to run the script again .. otherwise you would be copying the files onto themselves .. not sure if you've tried running it more than once
LucidREM said:
you can only run the script once .. when the "ln -s" has already been done it has to be undone before trying to run the script again .. otherwise you would be copying the files onto themselves .. not sure if you've tried running it more than once
Click to expand...
Click to collapse
These scripts were intended for my usage after a system restore from a update.zip file which wipes /system in the process.
My intentions were to:
1. remount the fs rw
2. copy the original init and mountd files to the sd then copy the modified to their respective places in the system folders then reboot
3. reboot then create the sym links appropriately then move my caches too
Well unfortunately the only thing that works is the backing up of the original init and mountd files.
joshtheitguy said:
These scripts were intended for my usage after a system restore from a update.zip file which wipes /system in the process.
My intentions were to:
1. remount the fs rw
2. copy the original init and mountd files to the sd then copy the modified to their respective places in the system folders then reboot
3. reboot then create the sym links appropriately then move my caches too
Well unfortunately the only thing that works is the backing up of the original init and mountd files.
Click to expand...
Click to collapse
yes .. but you can't create the sym links when they already exist .. running the update.zip only wipes the /system .. not /data .. if the links were there before the update.zip they will be there after
Here it is, finally overclocked:
ok it wont let me post links, im too new...
so here it is: (im just reposting this dont ask me about it, just the message boy)
YOU NEED TO DOWNLOAD THE .ZIP FILE, AGAIN I CANT POST LINKS, SO GO TO DROIDFORUMS,NET OR ANDROIDFORUMS,COM TO GET IT!!!!
Notes:
I'm trying to keep this as close as possible to the way it was done on 2.1 for the Droid X. For me, 2.2 seems to need a little more voltage to be stable than it was under 2.1. I've included two versions of setscaling.sh to start from.
setscaling.sh is set to stock voltages/clock speed
setscaling100.sh is set to stock voltages w/100mhz bump accross the board to 400/700/900/1100 (This appears to be stable for me, and is the baseline for my testing/tuning)
Install Instructions
adb/terminal:
$ su
# cd /sdcard/extracted/droid2_22_oc (or wherever you extracted the files to)
# mount -o rw,remount -t ext3 /dev/block/mcblk1p21 /system
# cp overclock.ko /system/lib/modules/overclock.ko
# cp setscaling.sh /system/xbin/setscaling.sh
# chmod 644 /system/lib/modules/overclock.ko
# chmod 755 /system/xbin/setscaling.sh
<optional(only do after thoroughly testing what works for your DroidX in setscaling.sh)>
# cp install-recovery.sh /system/etc/install-recovery.sh
# chmod 755 /system/etc/install-recovery.sh
</optional>
# mount -o ro,remount -t ext3 /dev/block/mcblk1p21 /system
Run Instructions
adb/terminal:
$ su
# insmod /system/lib/modules/overclock.ko
# setscaling.sh
Your a little late but thanks
Everyone, I wrote a small script file for y'all to oc your phone with as little work as possible. Check out my thread "DOOverclock."
-Kevin
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
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
NEXUS 5X SuperbootWARNING: 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.