-- Update:
User Guitwo2 wrote an excellent init.d-script to load the overclock-module on boot. To make it even easier to use, he made a flashable zip. See this post: http://forum.xda-developers.com/showpost.php?p=39659179&postcount=6
Hi,
i recently updated the overclock-module (see attachement). Before starting it, find the required addresses in memory, as the module's defaults match only the RTFR-Firmware:
Find address of transition-table
Open adb-shell, become su and type
Code:
cat /proc/kallsyms | grep -A 1 pll0_960_pll1_245_pll2_1200_pll4_800_25a
You'll find the address at the leftmost side in the first row of the result.
Find address time-in-state-table
In the same shell, type
Code:
cat /proc/kallsyms | grep -A 1 cpufreq_stats_table
Again, the required address ist at the left side of the first row.
Then, one can try to install the kernel module. Parameter "pll2_l_val" ist used to adjust the multiplier of pll2. Default is 62, i got it stable at 69 (=CPU-Speed of 69 * 19.2 Mhz / 2 = 662 MHz). You can also try to set the multipliers of pll0 and pll1. I didn't test it.
So, with the above addresses one types the following to load the kernel module (replace the addresses with the ones you found, where parameter acpu_freq_tbl_addr equals transition-table and parameter cpufreq_stats_tbl_addr takes the time-in-state-table-address) :
Code:
busybox insmod /sdcard/temp/defymini_oc.ko pll2_l_val=63 acpu_freq_tbl_addr=0xc0755bdc cpufreq_stats_tbl_addr=0xc0789134
Update: In version 0.3 there is another parameter, "vdd", which takes a value between 1 and 7 (don't play with it, as there is no error handling!), where 1 is the lowest and 7 the highest vdd. Default is 6.
CHANGELOG
2013-04-29 0.4 added source (use it for other devices with locked bootloader)
2013-04-08 0.4 beautified messages, show current vdd
2013-04-01 0.3 added vdd-level for highest freq as parameter
2013-03-27 0.2 added time-in-state table modification (CPUSpy etc)
2013-03-21 0.1 initial release
rootdefyxt320 said:
Can we change the socinfo_get_msm_cpu() or is it already fused into the silicon chip?
Click to expand...
Click to collapse
No, but we can change the definition for soc-id 96 to msm7225aa. I did it. Didn't work. when switching to 800Mhz via PLL4, device hangs and reboots.
Using cat /proc/kallsyms | grep -A 1 pll0_960_pll1_245_pll2_1200_pll4_800_25a gives grep: not found
write: Broken pipe
Bernd.Defy said:
No, but we can change the definition for soc-id 96 to msm7225aa. I did it. Didn't work. when switching to 800Mhz via PLL4, device hangs and reboots.
Click to expand...
Click to collapse
Probably not supported in kernel or we can try some how to patch it via modules like the Motorola Defy MB525/MB526 which has a locked bootloader or try to obtain the Defy XT535 kernel aka boot.img and flash it via fastboot but it's risky. I can't get the memory addresses. Just upload your boot.img from your nandroid backup so I can flash it via fastboot. What's the difference between PLL2 overclocking and PLL4 overclock?
Bernd.Defy said:
Hi,
i recently updated the overclock-module (see attachement). Before starting it, find the required addresses in memory, as the module's defaults match only the RTFR-Firmware:
Find address of transition-table
Open adb-shell, become su and type
Code:
cat /proc/kallsyms | grep -A 1 pll0_960_pll1_245_pll2_1200_pll4_800_25a
You'll find the address at the leftmost side in the first row of the result.
Find address time-in-state-table
In the same shell, type
Code:
cat /proc/kallsyms | grep -A 1 cpufreq_stats_table
Again, the required address ist at the left side of the first row.
Then, one can try to install the kernel module. Parameter "pll2_l_val" ist used to adjust the multiplier of pll2. Default is 62, i got it stable at 69 (=CPU-Speed of 69 * 19.2 Mhz / 2 = 662 MHz). You can also try to set the multipliers of pll0 and pll1. I didn't test it.
So, with the above addresses one types the following to load the kernel module (replace the addresses with the ones you found, where parameter acpu_freq_tbl_addr equals transition-table and parameter cpufreq_stats_tbl_addr takes the time-in-state-table-address) :
Code:
busybox insmod /sdcard/temp/defymini_oc.ko pll2_l_val=63 acpu_freq_tbl_addr=0xc0755bdc cpufreq_stats_tbl_addr=0xc0789134
Click to expand...
Click to collapse
I just followed your instructions.
The addresses were the same.
It seems to work so far.
Mine seems stable too.
Great work !
I am loading it on boot via a init.d script.
With : TNBST_4_0A.1F.0ERPS - WE_Orange_Spain_v22_0223_FLEXTNBST
What could we probably gain by increasing PLL0 and PLL1 ?
And which value should we choose ?
With pll2: 70 I get 672MHz stable.
Sh0m1 said:
Using cat /proc/kallsyms | grep -A 1 pll0_960_pll1_245_pll2_1200_pll4_800_25a gives grep: not found
write: Broken pipe
Click to expand...
Click to collapse
Code:
cat /proc/kallsyms > /sdcard/toto.log
Then search for pll0_960_pll1_245_pll2_1200_pll4_800_25a in the /sdcard/toto.log file.
---------- Post added at 11:08 AM ---------- Previous post was at 10:38 AM ----------
If you want to load the module on boot and have init.d support, there is attached a init.d script that will do it automatically.
There is a CWM flashable zip
0 - push the XT320_overclock.zip on your sdcard
1 - Make sure you have busybox installed
2 - Reboot with a CWM... (recovery.img attached)
Code:
>adb reboot bootloader
> fastboot boot recovery.img
3 - Flash XT320_overclock.zip thorough CWM
4 - Enjoy !
Default values are : pll2=69 and vdd=6
Edit /etc/init.d/66ocmodule for further tweaking.
In V2 - updater-script has been updated, to fix busybox permission issues.
66ocmodule script change log :
V0.1
First be sure to adjust pll2_l_val, acpu_freq_tbl_addr and cpufreq_stats_tbl_addr.
Be sure that defymini_oc.ko is in /sdcard/
1 - push the module to your phone :
Code:
adb push 66ocmodule.txt /sdcard/66ocmodule.txt
2 - in shell mode, remove the extension .txt and move the file to /etc/init.d folder
Code:
mv /sdcard/66ocmodule.txt /etc/init.d/66ocmodule
3 - Change mode to -rwxrwxrwx
Code:
chmod 777 /etc/init.d/66ocmodule
4 - Change user/group to root/root
Code:
chown 0.0 /etc/init.d/66ocmodule
That should work.
NB : you may have to remount your /system partition in rw to change user/group
Code:
busybox mount -o remount,rw -t auto /system
NB2: For init.d support go to : http://forum.xda-developers.com/showthread.php?t=1933849
NB3: have only one version of 66ocmodule in your /etc/init.d directory to avoid trouble.
NB4: if you are experiencing trouble with step 2, use
Code:
cp /sdcard/66ocmodule_vX.X.txt /etc/init.d/66ocmodule
rm /sdcard/66ocmodule_vX.X.txt
where X.X is the number version
NB5: be extra careful when editing the files. You could mess when with the end of line markers. I recommend using Notepad++ and check if the end of line markers are in unix format (LF) (view/show symbol/show all characters). You can correct that easily with edit/EOL conversion/convert to UNIX format
NB6: make sure there is a blank line in the end of the file as well
V0.2
gets automatically the needed addresses.
Module is supposed to be located at /data/defymini_oc.ko
If troubleshoot refer to the /data/oc.log log file.
Set for a 700MHz oc
Follow steps 1 to 4 for installation. Read NB, NB2 and NB3.
V0.3
Checks for the presence of older versions and gives a warning
Checks if the module is already loaded (unload if true)
Chekcs in the end if the module is loaded
+ Minor changes
pll value and module path can be edited in the beginning of the file
Follow steps 1 to 4 for installation. Read NB, NB2 and NB3.
V0.4
Vdd support
+Minor changes
pll and vdd values and module path can be edited in the beginning of the file
Follow steps 1 to 4 for installation. Read NB, NB2 and NB3.
V0.5
best busybox support
+Minor changes
pll and vdd values and module path can be edited in the beginning of the file
V0.6
Force vdd change if performance governor set
+ Minor changes
Follow steps 1 to 4 for installation. Read all NBs.
pll and vdd values and module path can be edited in the beginning of the file
Follow steps 1 to 4 for installation. Read NB, NB2 and NB3.
V0.7
+ Minor changes
V0.8
Log some info, available in logcat
V0.9
Can adjust all pll values.
What could we probably gain by increasing PLL0 and PLL1 ?
And which value should we choose ?
Click to expand...
Click to collapse
Tried to oc pll1 -> distorted display. can't recommend that. OC'ing PLL0 leads to somewhat faster 480 MHz frequency (480 MHz is generated by PLL0 and DIV2, so 960MHz / 2 => 480 MHz.) In the module only changed PLL2 is payed attention for modified frequency-tables.
---------- Post added at 11:53 AM ---------- Previous post was at 11:25 AM ----------
rootdefyxt320 said:
What's the difference between PLL2 overclocking and PLL4 overclock?
Click to expand...
Click to collapse
Simple difference: PLL2 exists in SOC, PLL4 does not exist. So Motorola didn't underclock something, they got a crippled MSM7225A. Speed ist limitied by hardware.
I'm pushing pll2_l_val to 73 (+11)
I get 700 MHz stable for now. Without overeating.
I'll keep you posted.
Guitwo2 said:
I'm pushing pll2_l_val to 73 (+11)
I get 700 MHz stable for now. Without overeating.
I'll keep you posted.
Click to expand...
Click to collapse
Do you still use the "performance" governor?
Re: Defy-Mini: Updated the overclock-module
I use setCPU with different governor. All seems to work. Higher freq (600) is replaced by a new one thanks to your OC module.
Btw 700 is stable. I runned some stress tests. Performances are increased. Linpack score goes from. 14.5 to 17.5 MFLOPS.
I was wondering if the soc pll were used by other stuff than cpu. Could explain your troubleshoot when oc pll0.
XT230 rocks now
Guitwo2 said:
I use setCPU with different governor. All seems to work. Higher freq (600) is replaced by a new one thanks to your OC module.
Btw 700 is stable. I runned some stress tests. Performances are increased. Linpack score goes from. 14.5 to 17.5 MFLOPS.
XT230 rocks now
Click to expand...
Click to collapse
...but keep an eye on stability.
For ~16% overclocking ~20% higher MFLOPS? Hmmm.... sounds - interesting.
Re: Defy-Mini: Updated the overclock-module
Bernd.Defy said:
...but keep an eye on stability.
For ~16% overclocking ~20% higher MFLOPS? Hmmm.... sounds - interesting.
Click to expand...
Click to collapse
I would rather have a buggy phone than a awfully slow one... (thank you motorola).
The linpack result shows a .5 MFLOPS standard deviation.
XT230 rocks now
I'm a noob, can you tell me what exactly do i need? Busybox?
Re: Defy-Mini: Updated the overclock-module
Sh0m1 said:
I'm a noob, can you tell me what exactly do i need? Busybox?
Click to expand...
Click to collapse
Busybox / adb or a terminal emulator / root access
Eventually init.d support if you want to use my script to automatically load the module at boot.
XT230 rocks now
Ok so i've installed busybox, done steps in the first post but nothing happened? Is it normal that the phone hadn't restarted or something?
Sh0m1 said:
Ok so i've installed busybox, done steps in the first post but nothing happened? Is it normal that the phone hadn't restarted or something?
Click to expand...
Click to collapse
It's definatly a good sign if your phone doesn't reboot. Just check the Frequencies using CPU-Spy or something else.
And please post your Firmware-Version and the adresses you used, i'll add them in the first post.
I just installed your module from the first post and i changed value from 63 to 70, and now i have 672mhz. How can i change pll2 value again? What do i type? If i use your module but with 73 instead od 63 i get: File already exists.
Re: Defy-Mini: Updated the overclock-module
Sh0m1 said:
I just installed your module from the first post and i changed value from 63 to 70, and now i have 672mhz. How can i change pll2 value again? What do i type? If i use your module but with 73 instead od 63 i get: File already exists.
Click to expand...
Click to collapse
reboot and load it again with other arguments.
Or use rmmod command
Code:
busybox rmmod defymini_oc.ko
XT230 rocks now
Sh0m1 said:
I just installed your module from the first post and i changed value from 63 to 70, and now i have 672mhz. How can i change pll2 value again? What do i type? If i use your module but with 73 instead od 63 i get: File already exists.
Click to expand...
Click to collapse
You have to remove the module first (no need to reboot):
Code:
rmmod defymini_oc.ko
Then you can install the module again.
Alright i've used 66overclock file and pushed it manually with root explorer, changed permissions, set owner and i've edited it so pll2 is 73. My phone is rebooting atm, i will post if i had success.
---------- Post added at 04:22 PM ---------- Previous post was at 04:12 PM ----------
I just cant get it to keep freq at 700 after reboot. I've done everything from Guitwo2's post and it keeps resetting to 600MHz after reboot
Related
hi guys .i use app swaper2 for swap and 128M swapping but Where should understand that the active?
Open Terminal Emulator
Written "su"
Superuser permission enabled
Written "free"
Read RAM usage
Sorry,bad English
xp7 said:
hi guys .i use app swaper2 for swap and 128M swapping but Where should understand that the active?
Click to expand...
Click to collapse
If I understand correctly your question, you're curious that the swap has been enabled for real?
So what you have to do is to type "free" (without quote marks) into Terminal. Then in the SWAP line you'll se if it has been enabled (if it's zero, then it is disabled)
Asycid said:
If I understand correctly your question, you're curious that the swap has been enabled for real?
So what you have to do is to type "free" (without quote marks) into Terminal. Then in the SWAP line you'll se if it has been enabled (if it's zero, then it is disabled)
Click to expand...
Click to collapse
yes.Inside the terminal, write zeroHow do I enable it???
xp7 said:
yes.Inside the terminal, write zeroHow do I enable it???
Click to expand...
Click to collapse
First you should have a custom kernel installed. Then in swapper2, simply click on "ON".
Asycid said:
First you should have a custom kernel installed. Then in swapper2, simply click on "ON".
Click to expand...
Click to collapse
yes,i use alfs v.4 and swapper2 but in terminal write swap 0 0 0.please help me and thanx
xp7 said:
yes,i use alfs v.4 and swapper2 but in terminal write swap 0 0 0.please help me and thanx
Click to expand...
Click to collapse
IDK what could be the problem then. It should work.
Hmm... If you hit the ON button in swapper2, what it is writing?
Some time Swapper2 is a little buggy, so what I always do is first hit "Ads off" button, then the "OFF" button... Wait until it writes "All done!". Then hit "ON" button. Again, wait until the "All done!" sentence appears. Hopefully it will work then.
I have sdcard/swapfile.swp ?
If you have swapfile.swp :
Open Terminal Emulator
Swap enabled:
Written : su
Written : swapon /sdcard/swapfile.swp
Swap disabled:
Written : su
Written : swapoff /sdcard/swapfile.swp
Stock kernel or Custom kernel?
Hi... i have a question. How can i enable mounting of swap file on boot ?
djsweetboy said:
I have sdcard/swapfile.swp ?
If you have swapfile.swp :
Open Terminal Emulator
Swap enabled:
Written : su
Written : swapon /sdcard/swapfile.swp
Swap disabled:
Written : su
Written : swapoff /sdcard/swapfile.swp
Stock kernel or Custom kernel?
Click to expand...
Click to collapse
How can i change the swappiness with terminal emulator?
Enable swap and checking it
Assume that u have partitioned your sd card by manually by partition tools
-fat32
-ext 2,3 or 4 (app to sd)
-swap
To enable swap for custom kernel, (i use alfs 06)
-Go to /system/etc
-RW, Text-edit fstab file,
-add line /dev/block/mmcblk0p3 /swap rw
Note: the spaces between the mmcblk0p3 to /swap may varies on your fstab file, just follow the spaces provided at other top line.
Next, Text-edit hw_config.sh,
-add line swapon /dev/block/mmcblk0p3
-or swapon -a if not worked for you.
-add line before drain battery fix if not worked also (by experience)
To check,
-open terminal
-type su
-type free
-value on swap 0 0 0 = failed
-any value = sucess
To change swappiness,
-Go to /system/etc/init.d
-the file depends on your rom build (mine in 99balancedtweaks file) find the line echo "AB" > /proc/vm/swappiness
-or you can just add line to hw_config
-add line echo "AB" > /proc/vm/swappiness
-where ur AB = any integer,
0 =use more ram (latency decrease)
100 =use more swap (latency increase)
Swappiness Info on Wikipedia
NOTE:All the step above need your devices to reboot to take effect.
*__________*
|Sony Erricsson X8 White-Dark&Blue| Alfs 06 No Caps|768 MHz| Fde Xperience 2.4.3| Unlocked Bootloader 11W26| 700MiB 60 Swap| 128 Ext-2 APP2SD| Class 4 8GiB SDCARD| AnTuTu 1950-2050+ (May Change)
Thanks button>
---------------------------------------------------------------------------------------------------------------------------------------------Y
As we are able to fastboot, it make sense to have choice
As it is done now. Normal booting using 2ndinit
PC booting, not using 2ndinit (as the proper files can be inside the boot.img)
The drawback of 2. are obvious. if battery die, etc... but then 1. can be used. so i think 2. will have spread usage.
The pros of 2. are obvious too (no 2nd init, kernel can be modifed e.g. swap etc...) and not so obvious .... But it can be tested / used without compromising the phone usage (e.g. a plain reboot will go to 1.).
Having that in mind, fjfalcon your boot.img are working. (mine doesn't, mioze7ae`s too, there is some old post in some thread about that, but let's stick to this one).
So could you be so kind to share how to build usable (e.g. working) boot.img ?
Then using mio`s knowledge of preparing fastboot openrecovery it will be easy to implement inits, which don't rely on 2ndinit.
And then the real work can begin . Patching the kernel
I have found good starting point of patches:
http://omappedia.org/wiki/Patches_being_done_on_2.6.29_Android_kernel_not_yet_submitted_upstream
had checked some of them (there are not in our moto-compiled kernel), and most of them seems promising...
Of-course this will be just the beginning.
We can try to "patch" discovered goodies (via modules) to the moto-kernel
we can try to use newer version of the kernel (using 2./
etc...
i used motoroi devtree from opensource and kernel.tar.gz from 2.1.
Also i just patched some files... and that should be all.
I think when i get free time i will post our kernel to git.
But, idea about move 2ndinit away is back...
Much better idea will be usyng 2ndinit both times, with if/else statements.
Also, i'am almost done to building uart for kernel testing. I hope it will work.
I pushed mine kernel to https://github.com/CyanogenModXT720/android_kernel with xt720 branch. When it will be finished it will appear.
I need to run, good luck.
I also using command to build: make -j8 -f kernel/kernel.mk BLD_CONF=mine3
10x,
when i build modules, i had issue... they just did not load to the kernel... it turns out that my toolchain was not the right one... using another fixed the modules loading....
about 2ndinit we can brainstorm it later (i have mind floating around about the location of init_prep_keypad.sh)
i am curious about uart, where should we hook the wires :?)
i am curious more because of that commit comment
commit 9638a7f382b7ac1629cfa431bd32790362e3af70
Author: Muhammed Siju <[email protected]>
Date: Thu Jun 17 11:02:09 2010 +0530
IKSTR-401.Disable TV out accessory detection.
TV out code is currently enabled in kernel.So some 3.5mm accessory is getting detected as TV cable.However the TV out service APK was removed from the build.
This causes issues like accessory removal not getting detected and TTY cable failures.This is workaround to treat high impedence cables as headset without mic instead
Click to expand...
Click to collapse
i am not sure how to interpret the bolded one (and i am afraid to hope )
http://xt720.ru/foto mine uart.
Sent from my Milestone XT720 using xda premium
stock recovery adb ?
i just take a look at
cg35.img (e.g. boot image, when boot normaly) and
cg47.img (e.g. boot image, when booted in stock recovery)
equals: kernel
differs: kernel cmdline, and the ramdisk.
in the normal boot.img there is no cmdline, in the recovery one there is
Code:
console=ttyS2,115200n8 rw [email protected] init=/init ip=off motobldlabel=none mtdparts=omap2-nand.0:128k(mbmloader),640k(mbm),640k(mbmbackup),384k(bploader),384k(cdt),1536k(pds),384k(lbl),384k(lbl_backup),384k(cid),1536k(sp),384k(devtree),640k(logo),384k(misc),3584k(boot),3840k(bpsw),4608k(recovery),8960k(cdrom),384k(unused0),204416k(system),384k(unused1),106m(cache),177280k(userdata),1536k(cust),384k(unused2),2m(kpanic),512k(rsv)
kernel cmdline is curious to me, and will need more investigate, mostly because it is present in the normal boot too. (have to compare to the recovery one). I suppose, that the bootloader passes it to the normal boot ...
about initial ramdisk there is something interesting in it
mainly the adbd
service is defined in init.rc
Code:
service adbd /sbin/adbd recovery
on property:persist.service.adb.enable=1
start adbd
on property:persist.service.adb.enable=0
stop adbd
but disabled in default.prop
Code:
persist.service.adb.enable=0
as we are able to fastboot, it will be very interesting to see what can be done within the recovery shell (just have to modify default.prop using unpackbootimg and mkbootimg )
Personally i plan to do it near future (e.g. have time, did not test long term stability etc....)
recovery.img afaik also signed.
peshovec said:
i just take a look at
cg35.img (e.g. boot image, when boot normaly) and
cg47.img (e.g. boot image, when booted in stock recovery)
equals: kernel
differs: kernel cmdline, and the ramdisk.
in the normal boot.img there is no cmdline, in the recovery one there is
Code:
console=ttyS2,115200n8 rw [email protected] init=/init ip=off motobldlabel=none mtdparts=omap2-nand.0:128k(mbmloader),640k(mbm),640k(mbmbackup),384k(bploader),384k(cdt),1536k(pds),384k(lbl),384k(lbl_backup),384k(cid),1536k(sp),384k(devtree),640k(logo),384k(misc),3584k(boot),3840k(bpsw),4608k(recovery),8960k(cdrom),384k(unused0),204416k(system),384k(unused1),106m(cache),177280k(userdata),1536k(cust),384k(unused2),2m(kpanic),512k(rsv)
kernel cmdline is curious to me, and will need more investigate, mostly because it is present in the normal boot too. (have to compare to the recovery one). I suppose, that the bootloader passes it to the normal boot ...
Click to expand...
Click to collapse
Normal boot ignores cmdline and uses atags struct from cdt.bin table (CG31) instead. Recovery boot ignores atags struct and uses cmdline from recovery.img. This is why:
xt720mod.sbf uses normal Milestone XT720 boot.img (UK) but has Motoroi partition structure and recovery--the cmdline inside boot.img is ignored--partition locations come from CDT. If the normal boot used cmdline, xt720mod.sbf could never work using the Milestone XT720 kernel--we'd have to use the Motoroi kernel.
Normal boot has boot.img read-only and missing bpsw etc, but booting into stock recovery has all of the missing ones and they are read/write (because recovery.img uses the cmdline instead of atags)
Tangentially, there's also the devtree (CG61). For some reason the vulnerable Motoroi recovery.img used in xt720mod.sbf doesn't work with Milestone XT720 devtree {=stuck at (M)} *but* Milestone XT720 boot.img does work with Motoroi devtree ... sensorfix.ko tries to correct for some of the Milestone/Motoroi devtree differences (most of the devtree data is actually identical--just some subtle differences), but I haven't gotten to all of them yet (sensorfix.ko at the moment just corrects the accelerator axis mapping--I suspect there's something weird going on with the light sensor, too but I haven't figured that out yet).
fjfalcon said:
recovery.img afaik also signed.
Click to expand...
Click to collapse
I think he's talking about making a fastboot recovery. That's also what I did here: http://forum.xda-developers.com/archive/index.php/t-1477752.html and http://forum.xda-developers.com/showthread.php?p=23965193#post23965193. I thought about putting in a different recovery at first--but the more I thought about it, I couldn't find any reason to justify using a recovery different from openrecovery--just about anything you'd want to do in a custom recovery requires a sdcard to be present and openrecovery is already field-tested on XT720. I can't remember if fastbooted recovery uses the atags or cmdline... I don't think I ever figured out if the difference is in the bootloader or in the kernels.
Edit: when I created the fastboot-openrecovery.img I used the kernel from normal boot.img and used a custom ramdisk that was derived from recovery.img. And I didn't add any command line:
Code:
rm ramdisk.cpio.gz
cd ramdisk/
find . | cpio -o -H newc | gzip > ../ramdisk.cpio.gz
cd ..
rm openrecovery-fastboot.img
mkbootimg \
--kernel stock-boot.img-zImage \
--ramdisk ramdisk.cpio.gz \
--cmdline '' \
--base 10000000 \
--pagesize 00000800 \
-o openrecovery-fastboot.img
I can't remember if I tried using the recovery.img kernel or if I just decided not to risk that the recovery.img kernel wasn't flexible enough--I wanted the same fastboot recovery to work on both stock.sbf's and xt720mod.sbf... i.e. I explicitly wanted to use the atags data in cdt.bin that will always match the installed sbf rather than a static command line... and the mtdhack.ko I've made for XT720 is carefully crafted to work on both Milestone XT720 and Motoroi sbfs by relying on atags... so... I doubt I ever pursued using the recovery kernel.
Normal boot ignores cmdline and uses atags struct from cdt.bin table (CG31) instead. Recovery boot ignores atags struct and uses cmdline from recovery.img.
Click to expand...
Click to collapse
10x
will have to play using simultaneously fastboot and pressing the buttons, which screamed "stock recovery" just to check if we can benefit from cmdline somehow..
however i tried to automate the boot.img repack.
https://github.com/CyanogenModXT720/fastboot-repack
the default generated image (boot-custom.img) should work as test proofing
(will use the init*rc from my testing build, and will avoid 2ndint), the kernel is still stock (yet).
When i will find enough time to test, will start playing with different kernel (mainly the above mentioned patches )
p.s. yes i know fastbooting is annoying, but if there are charger near where, it will be perfectly usable for a long time...
One thing I've wanted to try is creating a basically stock kernel+compcache/ramz. Nadlabak says it's very helpful on A853 (he has a motorola development grade A853 that has high-security mode disabled so he can flash anything). The idea is you could fastboot to have a ram boost without using a swap partition (ramz does swap into a compressed region of ram).
Nadlabak says it's very helpful on A853 (he has a motorola development grade A853 that has high-security mode disabled so he can flash anything)
Click to expand...
Click to collapse
interesting, i have read something like that somewhere, but it was stated this is just rumor....
the approach with starting with stock kernel, then just enable some useful options (like swap), then start observing patches fits my vision too
peshovec said:
i tried to automate the boot.img repack.
https://github.com/CyanogenModXT720/fastboot-repack
Click to expand...
Click to collapse
I was just reading through the repository and saw the comment about replacing /init with one that handles parameters properly for insmod. You can also replace /init just before 2nd-init for the hijacked boot (2nd-init kills* /init and it gets restarted fresh). nadlabak's been doing this to add udev support on a853. I think fjfalcon's done that, too iirc.
*not really kill, it causes the original /init to exec /init
it can be done in the squisher...
# Rootfs stuff
mkdir -p $REPACK/ota/system/etc/rootfs/sbin
cp $OUT/root/sbin/adbd $REPACK/ota/system/etc/rootfs/sbin/adbd
cp $OUT/root/init $REPACK/ota/system/etc/rootfs/init
Click to expand...
Click to collapse
(nadlabak "Replaces" init and adbd)
then have to set permission in sh_hijack ...
probably will do that sometime in the future (if we had for example usb otg, probably we should have benefit of udev, but right now, it is just the feeling to be on the edge/latest and greatest ......e.g. not so high priority )
ok, run some tests
successful boot is achieved after
Code:
export CROSS_COMPILE=.......cyano/nadlabak/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-
will try to attach the .config (swap enabled and the zImage
(attached in kernel_plus_config.tar )
of course i had some troubles mainly because the stock modules, are build with gcc 4.4.0 . Before seeing that, i was using different prebuilt toolchains ... and the kernel was tainted, paniced etc.....
using the above right now....
Code:
<6>[ 0.000000] Initializing cgroup subsys cpu
<5>[ 0.000000] Linux version 2.6.29-omap1 ([email protected]) (gcc version 4.4.0 (GCC) ) #2 PREEMPT Tue Apr 24 10:17:21 EEST 2012
/system/xbin/dd if=/dev/zero of=/sdcard/swap.img bs=1M count=50
mkswap /sdcard/swap.img
swapon /sdcard/swap.img
~ # free
total used free shared buffers
Mem: 230256 219232 11024 0 212
-/+ buffers: 219020 11236
Swap: 51192 1700 49492
So Mio, you can now try the swapz/
i will play with other options (moto has at least hdmi and camera driver, which are not present in later version of the omap 2.6.29 ... so i will try to merge
the gsm radio is very easy to break ...
i discovered, that if some module did not load 100% clean, the phone will lock/reboot ....
Then i start playing around that. Did not load any modules, and when load the modules about radio i discovered the title (e.g. still no radio, but phone lock/reboot again....)
So till now, my best combination (which i plan to test for a long (few days atleast) period) is:
plain stock + swap + 250, 500, 600, 800 Mhz (the default were always strange to me 250, 500, 550, 720 )
Also till now, i was not able to compile zram module
p.s. btw, i hope everybody knows, that actually there is no need for a separate swap partition,for somebody to use the swap, right ?
linkdriver
the following commit is very interesting to me ...
Code:
commit 1b533b8c037ae496a329e8e6c5e793232310b559
Author: Wei-Yu-Neng Loic <[email protected]>
Date: Tue Jun 9 17:48:14 2009 +0200
Add netmux_linkdriver and compile the netmux drivers in modules and not static
I wonder if before this commit, the radio was working?
Also this commit adds some harcoded configs ...
Code:
drivers/misc/netmux_linkdriver/usb/ModKconfig
....
+title = netmux_linkdriver
+obj_tree =
+depends =
+kconfig = Kconfig
+config = .config
+autoconf_header = modkconfig/autoconf.h
+config_header = modkconfig/config.h
.....
the autoconf.h and config.h are basically the kernel config ...
I suspect, that if we change the kernel config, in such way, that the modules will not be able to load, then we have to modify the modkonfig headers too...
I have created a kernel that has ramz and the ramzswap module for testing/experimentation.
Built from compcache-0.6.2 with the notify patches applied
Kernel source: ramz branch @ https://github.com/CyanogenModXT720/android_kernel
Rough notes on how to make your own bootz.img:
Compile using 4.4.0 toolchain from the android NDK version 5c. Something like:
Code:
export ARCH=arm
export CROSS_COMPILE=path/to/android-ndk-r5c/toolchains/arm-eabi-4.4.0/prebuilt/linux-x86/bin/arm-eabi-
export KERNEL_DIR=path/to/android_kernel
cd $KERNEL_DIR
make str_ramz_defconfig
make
Create bootz.img something like this:
Code:
mkbootimg \
--kernel path/to/android_kernel/arch/arm/boot/zImage \
--ramdisk path/to/uk-boot.img-ramdisk.gz \
--cmdline "" \
--base 10000000 \
--pagesize 00000800 \
-o bootz.img
Build the ramzswap.ko something like this:
Code:
cd compcache-0.6.2
# edit compat.h as described in "HIGHLY RECOMMENDED" section of README to enable use of the notify patch
make -C $KERNEL_DIR SUBDIRS=`pwd` modules
The kernel config I used is modified from str_defconfig, added as str_ramz_config (basically add swap, lzo_compress/lzo_decompress, /proc/config.gz) Link to config: https://github.com/CyanogenModXT720/android_kernel/blob/ramz/arch/arm/configs/str_ramz_defconfig
I haven't figured out how to cross-compile the rzscontrol yet so the CM compcache script doesn't work. OG Droid builds it as part of CM, so we can probably snag theirs.
Example of manual use (after fastboot boot bootz.img):
Code:
# Create 20MB zram
insmod ramzswap num_devices=1 disksize_kb=20480
# Enable swap on the new ramzswap0 device
swapon /dev/block/ramzswap0
# Set swappiness
echo 100 > /proc/sys/vm/swappiness
Be sure to check if your sdcard has a swap partition, you may want to disable the script that turns on swap there--it's usually in /system/etc/init.d/ with the name "swap" in the filename. I'm not sure how android sets priorities on different swap devices, the usual linux command isn't supported.
I have no idea what size of ramz people use. sholes (OG Droid) has compcache support in their CM7, so I'll probably look there next.
I've only tested this on a custom-tweaked version of peshovec's Apr 4 CM7 build running on xt720mod.sbf--I don't expect problems, but ymmv and you should be very aware of what the various /system/etc/init.d scripts (and possibly /system/etc/rootfs/*.rc) are up to.
The config can also be obtained from /proc/config.gz -- I propose we "insist" that custom kernels use that feature and then shell scripts can easily test existence of /proc/config.gz to detect custom kernels. On the other hand, that file consumes 16k...
Mioze7Ae said:
[*]Built from compcache-0.6.2 with the notify patches applied
Click to expand...
Click to collapse
hehe, that explain my troubles with compiling
i had used https://github.com/a853/a853_compcache
now tried the same setup with the old plain 0.6.2 and it compiles ...
Sweet. On peshovec's CM7 with a 40mb ramzswap, I'm able to keep XDA, HackerNews, Diode and Gh4a all running and switch between any of them instantly (also note I was already very happy with memory use on peshovec's CM7 without ramzswap). Probably not big news for people who've been using a swap partition, but compcache/ramzswap is swap without a swap partition--so no sdcard chewing. My perspective is: phone is perfectly usable without ramz if a reboot happens, but if I keep it charged I get some extra boost. For now, this is what I'm using as /system/etc/init.d/02ramz:
Code:
#!/system/xbin/busybox sh
# Don't do anything unless custom boot.img
[ -f /proc/config.gz ] || exit
# Create 40MB zram
/system/xbin/insmod /system/lib/modules/ramzswap.ko num_devices=1 disksize_kb=40960
/system/xbin/swapon /dev/block/ramzswap0
echo 100 > /proc/sys/vm/swappiness
hopefully in some days i will gather enough information, about how much exactly memory we are missing...
preliminary results are:
about 25 swap (pure one) needed,
-
about 5 which can be recovered with pkill at 4am (hello cron)
equal to about 20 MB more ram needed for full pleasure
This number can be used for calculating the percentage of ramz (which obviously is a trade between more RAM and faster RAM )
Doh! The device is automatically created as /dev/block/ramzswap0 on android not /dev/ramzswap0. I've updated my posts above appropriately.
This will not be worked on any longer thanks to Huawei's incompetence. I'm glad my main phone isn't by them. I leave my 0.2 diff attached (which did make my phone faster FWIW - and has fsync() control. Not of use to me, but people who use a modified libsqlite would like it...). Feel free to apply it and see if you can somehow fix dhd.ko loading.
Hi,
Not one for names, so this shall be known as "OC kernel" This is built from the ICS U8800pro source that Huawei put out.
Install at your own risk; I take no responsibilty for any damage that may occur through the usage of this kernel.
Features:
ADB as root
Overclocking enabled (thanks to genokolar)
Undervolting interface added (from genokolar, who took it from a SE kernel modder somewhere) - I think SetXperia can use it
SIO I/O scheduler added
SmartassV2 cpufreq scheduler (AnDyX mod) - although I think ondemand does a bit better IMO
sysfs entry to turn off keypad lights (I wrote an applet for this some time back, I'll dig it out later)
Logcat is always enabled now as the ServiceMenu toggle doesn't work anymore
Minimum display backlight is set to 15, but I think Android needs a framework change to use it. You could try RootDim
Kernel actually builds (and Bluetooth works)
ZRAM (+ swap) support. ZRAM is optimized for Android (taken from Siyah kernel). I'll write up the instructions on enabling this later
CIFS as module
Extras:
Change schedulers and phone speed:
Use a tool like No Frills CPU or SetCPU.
Turn off button lights:
Install the ButtonLight widget and add it to your main screen. I've published the source before in another thread; seek it out if you're after its (bad) code.
It's buggy the first few times you run it, but works fine after that.
Dim screen to 14:
The minimum backlight level is now set to 15. RootDim from the Play Store lets you set it to that.
Mount Windows shares:
Grab CifsMounter and point it to the cifs.ko in /system/lib/modules. You may also need to insmod nls_utf8.ko and md4.ko.
Enable ZRAM (taken from Siyah kernel):
(Note I've not used ZRAM so I have nothing to say on its stability, good or bad)
Grab a BusyBox binary from somewhere
Run the following commands:
Code:
echo 90 > /proc/sys/vm/swappiness #You must set the swappiness high to ensure that the compressed RAM is accessed first!
echo $SIZE > /sys/devices/virtual/block/zram0/disksize #Set size to whatever you wish. 100MB is 104857600 = 100 * 1024 * 1024
busybox mkswap /dev/block/zram0
busybox swapon /dev/block/zram0
Dump the lines in install-recovery.sh if you want to be ZRAMMed every time you boot the phone (although in that case, make sure you have
Code:
busybox swapoff /dev/block/zram0 > /dev/null 2>&1 #Use > /dev/null 2>&1 for every busybox command in install-recovery.sh as it will discard any messages outputted
echo 1 > /sys/devices/virtual/block/zram0/reset
before the lines above)
Install:
Flash the attached ZIP in CWM recovery. You should backup your original boot.img and /system/lib/modules first
Source:
Take http://www.huaweidevice.com/worldwi...=toDownloadFile&flay=software&softid=NDY3NTU= and apply attached diff
at last..xaaxxaa!!but why with modules too???whats their use?
pikachukaki said:
at last..xaaxxaa!!but why with modules too???whats their use?
Click to expand...
Click to collapse
'cause I add a new module - cifs (used by CifsMounter if you want to mount Windows shares) - and because the modules that are originally in /system/lib/modules need to be replaced so that they can load with this kernel (I don't know what those modules do, but I'd rather play it safe)
qwerty12 said:
'cause I add a new module - cifs (used by CifsMounter if you want to mount Windows shares) - and because the modules that are originally in /system/lib/modules need to be replaced so that they can load with this kernel (I don't know what those modules do, but I'd rather play it safe)
Click to expand...
Click to collapse
Boot normally change io to sio and smartassv2...1500mhz lets check..good work..i envy you and i want your guide on compiling...xaaxax im off to bed!!
fps is locked!!xaaxax
pikachukaki said:
Boot normally change io to sio and smartassv2...1500mhz lets check..good work..i envy you and i want your guide on compiling...xaaxax im off to bed!!
fps is locked!!xaaxax
Click to expand...
Click to collapse
I'll write it up sometime - but bear in mind I'm not an expert at this
Regarding FPS: do the install-recovery.sh trick
Only thing I modify in initramfs is the ro.secure setting so that ADB can be ran as root
qwerty12 said:
I'll write it up sometime - but bear in mind I'm not an expert at this
Regarding FPS: do the install-recovery.sh trick
Only thing I modify in initramfs is the ro.secure setting so that ADB can be ran as root
Click to expand...
Click to collapse
You did a great job i couldnt even compile the kernel without changes!!you did great!!
the difference is obvious !!
Sent from my U8800Pro using xda premium
Pika When U add This Kernet To ur ROM?
As expected from qwerty12!
Great job!
I'll also request a guide on how to build the kernel like pika asked.
Hope you continue to improve the kernel! A thanks is simply not enough to thank you for your work, but thanks again
husen4u said:
Pika When U add This Kernet To ur ROM?
Click to expand...
Click to collapse
I wont!just d/w it and flash it!simple!
Sent from my U8800Pro using xda premium
Now what you suggest oc ics or kalo gb?
Sent from my U8800pro using xda app-developers app
husen4u said:
Now what you suggest oc ics or kalo gb?
Sent from my U8800pro using xda app-developers app
Click to expand...
Click to collapse
From now on i wont ever go back to GB ever again! if our luck changes and someone release cm9 i will forget what gb is!! there are some small bugs but the rom is usable for everyday!!
Moihack said:
As expected from qwerty12!
Great job!
Click to expand...
Click to collapse
Thank you
I'll also request a guide on how to build the kernel like pika asked.
Click to expand...
Click to collapse
Certainly, sir.
Hope you continue to improve the kernel! A thanks is simply not enough to thank you for your work, but thanks again
Click to expand...
Click to collapse
Unfortunately I won't be working on this anymore unless Huawei get back to my request for the source to the the dhd.ko module (which they may not have to comply with because the license for the module states "Unless you and Broadcom execute a separate written software license agreement governing use of this software" so the U8800pro version may not be under GPL). I made (well, found on the Internet) more optimizations but the Wi-Fi refuses to turn on because the dhd.ko module refuses to load. Only way I can get something working is to build the source that Huawei give or attempt to force other versions of the bcm source to load, but it's unlikely that would work.
--
Anyway, a small guide.
I used an x86_64 laptop running (X)ubuntu 12.04.1 to follow these steps. This page was a great resource.
Prerequisites:
A computer running GNU/Linux (a Mac should work in theory - the same toolchain we use is built for it, too, but I have no idea how OS X works)
git installed (apt-get install --no-install-recommends git-core is enough under Ubuntu)
sudo apt-get install flex bison gperf build-essential libncurses5-dev zlib1g-dev ia32-libs lib32z1-dev lib32ncurses5-dev gcc-multilib g++-multilib abootimg
Getting ADB working
One of the best things to do is getting ADB set up, as you then have easy communication with the device. It's not essential but you'll just end up wasting time transferring files through other, longer means.
Grab the Linux platform tools ZIP from here: http://www.hariadi.org/android/manually-download-of-android-sdk-tools-and-sdk-platform-tools/. Extract the adb binary from the zip file, preferably to somewhere in your $PATH. chmod 755 it. chown, if necessary.
Next, open http://aur.archlinux.org/packages/an/android-udev/android-udev.tar.gz and, doing all this as root (sudo in Terminal etc.), place 51-android.rules in /lib/udev/rules.d/ (not the best place - but it works), chmod 644 it and chown root:root it.
Next, execute /usr/sbin/groupadd adbusers, followed by gpasswd -a USERNAME adbusers, USERNAME being the user you normally log on with.
Restart (while you can force Linux to see the new group through the, well, newgrp command udev will not "see" the new rule, despite how much you try with udevadm).
That should be ADB set up (give it a test, remembering to enable USB debugging mode on the phone first!).
On to preparing your workarea.
--
Create a new folder in your home folder and cd to it. This folder will house the prebuilt folder of toolchains and other stuff, and the kernel source in a folder of its own.
In this folder, execute git clone --depth 1 https://android.googlesource.com/platform/prebuilt.git and move onto the next step, since the download takes a while. That command grabs the prebuilt toolchain from Google using Git, but doesn't obtain a deep history for each file to make the download quicker.
Open http://www.huaweidevice.com/worldwi...=toDownloadFile&flay=software&softid=NDY3NTU= and save the source to your Downloads directory. After git has finished running, still in the folder with the "prebuilt" folder, execute tar jxf ~/Downloads/HUAWEI_U8800pro<tab - as in actually press tab> and you should have a kernel folder alongside the prebuilt one.
Building the kernel
cd to this new kernel folder.
First things first: make sure that Bluetooth is properly enabled by editing the Makefile. Find the line #ifeq ($(ENABLE_BTLA_VER30),true) and comment out every line in that section except for KBUILD_CFLAGS += -DHUAWEI_BT_BTLA_VER30 so you end up with this:
Code:
#/* < DTS2012020604357 zhangyun 20120206 begin */
# Add Huawei Marco for different BT chip
#ifeq ($(ENABLE_BTLA_VER30),true)
KBUILD_CFLAGS += -DHUAWEI_BT_BTLA_VER30
#endif
#ifeq ($(ENABLE_BLUEZ_VER30),true)
#KBUILD_CFLAGS += -DHUAWEI_BT_BLUEZ_VER30
#endif
#/* DTS2012020604357 zhangyun 20120206 end > */
Commenting out the offending code leaves you with a kernel that builds but a Bluetooth module that won't start up - the same also applies if you try to build with the other define.
You can also make things easier for yourself by replacing the following
Code:
ARCH ?= $(SUBARCH)
CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%)
with
Code:
ARCH ?= arm
CROSS_COMPILE ?= ../prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
else you will have to put "ARCH=arm CROSS_COMPILE=../prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-" after "make" each time. Remember this as I'll be assuming that you went for the option to edit the Makefile. I also assume that the prebuilt folder is above the kernel one. Adjust CROSS_COMPILE if necessary.
The ARCH variable is self-explanatory, but the CROSS_COMPILE variable (and the toolchain that it's pointing to) need to be set because the standard GNU development tools that apt installs don't produce output that an ARM processor can understand. So you cross-compile: the tools are for the X86 architecture but produce ARM output. 4.4.3 is chosen because the stock kernel is compiled with GCC 4.4.3 (if you run "adb shell cat /proc/version" you'll see). The arm-eabi-4.4.3 folder is chosen over arm-linux-androideabi-4.4.x because it specifies that magic "3" (I know, bad way to decide but it works), and over i686-android-linux-4.4.3 because we don't want to produce code for the PC.
Get the current configuration in use by the stock kernel (as that's a good point to start from - a known working configuration): http://wiki.cyanogenmod.com/wiki/Building_Kernel_from_source#Configure_the_Build
I'd also recommend placing a copy of .config as arch/arm/configs/<your funky name here> so that if .config gets deleted (make clean etc.) you can run make <the name you gave to the file in arch/arm/configs> and have .config come back again.
(cp arch/arm/configs/<the name you gave to the file> .config if you didn't modify the Makefile to specify the ARM arch.)
Run make oldconfig (not always necessary - generally it's invoked if you've applied a patch that introduces a new config option and the option then needs to go into your .config. Run make menuconfig afterwards and customize away.
When you're done, run make -jX - X as in the number of cores you have + 1. So, in my case, with a quad-core processor and HyperThreading enabled on all of them, "make -j9" works for me. If the compile went OK, you'll be left with a message saying that arch/arm/boot/zImage is ready. If not, run "make" without the -jX argument and make should stop where the error occurs. Have fun fixing the error!
Assuming that you have a new, shiny zImage, it's now time to put it into your boot.img.
Updating your boot.img:
Google have tools for this purpose but I've never used them so I don't know how they work. abootimg works fine for this, however.
Pull the current boot.img off your phone: adb pull /.cust_backup/image/boot.img.. I'd recommend creating a backup somewhere.
Create a new directory to store the boot.img in on your computer and run abootimg -x boot.img (if you had fun enabling every option in the kernel, you'll see why I'm telling you to use the -x option first rather than directly use the -u option). Now run abootimg -u boot.img -k <path to your newly built zImage>.
If this succeeds, yay! If not and you're told it's too big for the boot image, then don't worry. Take the size it's saying that the zImage is and convert that number into hex. Edit bootimg.cfg and change the value of the bootsize setting into the number you just converted into hex. We'll now repack again, but this time running abootimg -u boot.img -f bootimg.cfg -k <path to your newly built zImage>. This should work.
Sending the boot.img to the phone
If your ADB is already running as root, you can do the following to upload the new bootimg:
Code:
adb shell mount -o remount,rw /.cust_backup
adb push boot.img /.cust_backup/image/
adb reboot
If not, just reboot into pink screen mode and copy and paste.
Check System Settings and the version number should've changed. Congratulations!
Extras
Installing the modules:
OK, so you decided to build parts of the kernel as a module and you want to actually, y'know, have the modules present on the device. After building the kernel, execute:
make INSTALL_MOD_STRIP=1 modules_install INSTALL_MOD_PATH=<any folder name here>
If you look in that folder, you'll find the modules neatly wrapped up in folders, along with other text files. These text files are useless on a stock ROM because there's no modprobe - you need BusyBox for that. And since we don't want to have them seperated in folders (this is how the stock kernel does it), the files would be wrong, anyway. If you want to use modprobe and have BusyBox installed, you can run depmod on the phone after transferring the modules.
To get the modules into one folder make the directory "modules" in a folder higher-up to where the modules are stored, and then run for i in `find . | grep ko`; do mv "$i" ../modules/; done to move them into that folder.
At this point, I'd just recommend using my OC_Kernel.zip and replacing the modules in that. Or you can adb push them over to the /system/lib/modules folder (after issuing an "adb remount" - assuming that ADB is running as root in the first place).
Making ADB run as root:
As root on your computer, (we want to preserve permissions) use abootimg to split the boot image and extract the contents of the initrd:
abootimg -x boot.img && mkdir newramdisk && cd newramdisk && zcat ../initrd.img | cpio -i --no-absolute-filenames (--no-absolute-filenames is important! I trashed a Ubuntu install by leaving it out - the initrd contains ARM binaries of core Linux programs and if the initrd.img contains an absolute path of "/" then these files will get placed in /)
Make any changes you desire to the initrd. To have adb run as root, just edit /default.prop and set ro.secure to 0. Make sure that the editor you used didn't leave any backup files.
When you're done, run find . -print | cpio -o -H newc | gzip -n -9 > ../initrd.img and this will put the modified initrd folder back into initrd.img.
After that run cd .. ; abootimg -u boot.img -r initrd.img to actually put the initrd.img back into the boot.img.
If you run into a space error, you can do one of three things:
if you only made a single change (like enabling ADB), check to see that there is no backup file (default.prop~) littered about
you can remove the lengthy comments and copyright notices from the files to make space
you can use the trick we used earlier with abootimg to increase the size number in bootimg.cfg for the initrd
Overclocking:
Just look at the acpuclock C file (and possibly relevant cpufreq changes - but I can't remember) in my "OC kernel" diff. Make sure that the option in the kernel config is selected to limit the speeds to the U8800pro's native 1GHz, otherwise the phone will boot at 2GHz!
Rebuilding the Wi-Fi module:
I hope to be able to write this one since it's apparently needed in some cases, but it depends on if Huawei come through
any idea about this error?
drivers/mfd/pmic8058.c:327: error: rtc_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:327: error: rtc_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:241: error: othc0_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:241: error: othc0_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:250: error: othc1_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:250: error: othc1_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:261: error: othc2_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:261: error: othc2_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:183: error: misc_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:183: error: misc_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:210: error: thermal_alarm_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:210: error: thermal_alarm_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:270: error: batt_alarm_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:270: error: batt_alarm_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:152: error: pm8058_charger_resources causes a section type conflict
drivers/mfd/pmic8058.c:152: error: pm8058_charger_resources causes a section type conflict
matteof93 said:
any idea about this error?
drivers/mfd/pmic8058.c:327: error: rtc_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:327: error: rtc_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:241: error: othc0_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:241: error: othc0_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:250: error: othc1_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:250: error: othc1_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:261: error: othc2_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:261: error: othc2_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:183: error: misc_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:183: error: misc_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:210: error: thermal_alarm_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:210: error: thermal_alarm_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:270: error: batt_alarm_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:270: error: batt_alarm_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:152: error: pm8058_charger_resources causes a section type conflict
drivers/mfd/pmic8058.c:152: error: pm8058_charger_resources causes a section type conflict
Click to expand...
Click to collapse
Honestly, I have no idea. What toolchain are you using and where was your .config obtained from? Even when the Bluetooth thing was giving me errors, I never once saw that
same toolchain you have used. i have tried with ubuntu 12.04 x64 and ubuntu 10.04 x86 but same problem.....i have obtained my config from my phone using adb command
matteof93 said:
same toolchain you have used. i have tried with ubuntu 12.04 x64 and ubuntu 10.04 x86 but same problem.....i have obtained my config from my phone using adb command
Click to expand...
Click to collapse
I don't know why the same toolchain works on my laptop but not yours :\
Someone with a similar problem (same?) solved it by using an older toolchain: http://forum.xda-developers.com/showpost.php?p=27294383&postcount=7157
thanks thanks thanks.....i saw that post this morning but i did not noticed the post with the solution
UPDATE: NOW KERNEL COMPILED CORRECTLY....this means that tomorrow i know what to do
ZRAM (+ swap) support. ZRAM is optimized for Android (taken from Siyah kernel). I'll write up the instructions on enabling this later
qwerty your owning us some instructions!!xaaxxa
pikachukaki said:
qwerty your owning us some instructions!!xaaxxa
Click to expand...
Click to collapse
Done, check the first post
I also won't be working on this. My email (which does clearly state what I want, even if it's long-winded):
Dear Sir/Madam,
I recently built a kernel for my U8800pro from your sources and it
works fine, except that the Wi-Fi will not start because the dhd.ko
module that comes with the B928 firmware refuses to load into my
modified kernel. After looking around, the bcm4329 source is what I
need to build (usually distributed outside of the kernel); however, it
seems that the U8800pro uses a customized version. After looking at
the strings of the dhd.ko on the B928 firmware, I have seen many
strings that are present in that dhd.ko binary do not appear in:
* bcm_4.218.248.6_7x25_wifi_driver.tar from the Huawei Device website,
despite it having the same version number
* the bcm4329 source in the Qualcomm CodeAurora Git repository
* the bcm4329 source on the NyVIDIA Tegra Git repository
Furthermore, the strings also do not appear in the ICS kernel nor the
Gingerbread one. I can only conclude that Huawei have their own
specialized version of the bcm4329 4.218.248.6 source for the U8800pro
that is distributed outside the kernel. I understand that Qualcomm
allow the option to let the vendor arrange to have the code
distributed under a different license provided that the vendor makes
an agreement beforehand with Qualcomm. Otherwise it becomes GPLed by
default. If Huawei chose to make an agreement, then I have no right to
ask. However, I believe it is still licensed under the GPL for two
reasons:
* Running modinfo on the dhd.ko from the B928 firmware says this:
"license: GPL v2
* Both bcm_4.218.248.6_7x25_wifi_driver.tar.gz and
[S7][SoftWare]S7_Broadcom_BCM4329_4.218.205.0_Open_Source are under
the GPL
I would like to request the source code, please, of the bcm4329
4.218.248.6 source that is modified for the U8800pro if the code is
under the GPL
Best regards
Click to expand...
Click to collapse
was met with the following generic response:
Dear Customer,
Thank you for contacting Huawei device.
This is our website link http://www.huaweidevice.com/worldwide/searchResult.
do?method=execute&searchString=U8800pro where you can download the secure
code for U8800pro to you.
Once again thank you for contacting Huawei device.
Best Regards.
Huawei Device Customer Care Team.
Click to expand...
Click to collapse
Since my U8800pro is not my main phone anymore, I do not have the energy to fight. Nor do I want to work on Huawei's kernel, where you have to be careful about what you change or the Wi-Fi module won't load (and Huawei won't give you the source - which they should do since I'm sure it's under GPL). matteof93 will most likely produce something better or when everyone starts producing their own kernels and make enough improvements to be hit with the same issue as I, they'll start to get more emails and listen
@qwerty at the last command it said that device is busy...also is there any way that you can make it for init.d so it will be easier??thx!!
Hi all. If anyone is willing to help please assist me, im currently trying to upload cm 7 Morrison files for our beloved Ruth devices. I still haven't figured out how the 2nd init injector works yet.
For all charm users we can always branch the files and delete the MOTO.ROTATOR line for your devices.
If you have time, patients and sh¡t loads of guts please help or add links for me to checkout.
EVEYTHING IS APPRECIATED! :fistbump:
DEV Device: MB511 (deodexed)
Current System: MT27i xICS
Long Live: V9 Ferrari Rom
code.google.com/p/motorola-flipout-files
Ok if anyone know of any other motorola developers please let me know.
DEV Device: MB511 (deodexed)
Current System: MT27i xICS
Long Live: V9 Ferrari Rom
code.google.com/p/motorola-flipout-files
ruth(MB511) sensors in init.mapphone30_umts.rc
# sensor interface
chown compass compass /dev/lis331dlh --> not found
chmod 660 /dev/lis331dlh
chown compass compass /dev/kxtf9 --> found
chmod 660 /dev/kxtf9
chown compass compass /dev/akm8973 --> not found
chmod 660 /dev/akm8973
chown compass compass /dev/sfh7743 --> found
chmod 660 /dev/sfh7743
chown compass compass /dev/akm8973_dev --> found
chmod 660 /dev/akm8973_dev
chown compass compass /dev/akm8973_aot --> found
chmod 660 /dev/akm8973_aot
chown compass compass /dev/airc --> not found
chmod 660 /dev/airc
so ruth(MB511) sensors should be /dev/kxtf9, /dev/sfh7743,/dev/akm8973_dev, /dev/akm8973_aot
but Morrison sensors in libsensors/nusensors.h
#define AKM_DEVICE_NAME "/dev/akm8973_aot"
#define ACCEL_MODE_NAME "/sys/class/i2c-adapter/i2c-0/0-0018/mode"
#define CM_DEVICE_NAME "/dev/proximity"
#define LS_DEVICE_NAME "/dev"
#define LIS_DEVICE_NAME "/dev/lis331dlh"
I think porting Morrison maybe less suitable for ruth
Thanks phc, and yes I know its a long shot, I still haven't gotten to the lib files, let alone hardware. But morrison IS the closest port for us. All the other devices are to advanced for the device. Do a compare between the two, ram is almost identical, chips are close, gpu aswell. Only thing that isnt is screen size. Thanks for the lost, it will come in handy later.
DEV Device: MB511 (deodexed)
Current System: MT27i xICS
Long Live: V9 Ferrari Rom
code.google.com/p/motorola-flipout-files
Hi,
I used jordan-common and MagicDevTeam's MB508([h t t p s : / / github.com/MagicDevTeam) files,
and compiled eclair AOSP to check different files than create ruth device files.
My ROM VERSION:
RUTEM_U3_01.14.16_DEBLUR_SIGNED_USARUTH15ND0RTINT056.0R_PDS000_USARUTHEHKTWEMARA_P011_A010_HWp3_1FF.sbf
My ruth configure files: ruthconfigureforcm7.zip(h t t p s : / / docs.google.com/file/d/0BxgqJrVwRKJqQUlWTWI3SURGU1U/edit)
https://github.com/phchshow/android_device_motorola_ruth
My unstable update file:v0.1.5.zip(h t t p s : / / docs.google.com/file/d/0BxgqJrVwRKJqaXNzRVJDSU95Slk/edit)
V0.5.0.zip
can work:
battd[2013/03/14]
bluetooth
half work:
audio->media codec can't use.
[2013/03/19]solved some media codec running problem, but video recorder codec still has problem (even use low quality).
[2013/03/23]only mp3 and jpg codec is ok, orthers codec has problem, unknow how to solved...
sensors.
fmradio->FMRadioService.apk can't use, but can purchase "Spirit FM Radio Unlocked" to use.[2013/03/15]
camera->[2013/03/18]replace to use MB508's libcamera.so and libcameraservice.so. can take a picture, but media codec has some problem, so can't photograph.
wifi->[2013/03/23]dhcp has problem, but use command to execute is ok.
use mb508's bootmenu/2nd-init/init, solve setprop question, now wifi is OK.
but no softap beacuse can't compile tiap_drv.ko with 2.6.29 kernel.
ril->[2013/03/25]can call, but no sound, seems like audio codec problem.
not work:
battd->log say INIT BATTD SOCKET SERVER: failed. unknow how to solve. update[2013/03/14]:chmod cpcap permission
camera->used mb508's camera library, log say "mapped at 0x4103c000, not at 0xa7900000" can not load library
used ruth camera library, log say CAMERA HAL not support. unknow how to solve.
radio. unknow how to solve.
wifi->when process step 2, /system/bin/wlan_loader -f /system/etc/wifi/fw_wlan1271.bin -i /system/etc/wifi/tiwlan.ini -e /pds/wifi/nvs_map.bin
failed. [2013/03/16]get new question Failed to start supplicant daemon.unknow to solve.
[2013/03/23]gps->Failed to enable location provider
forget test:
fmradio, gps
phchshow said:
Hi,
I used jordan-common and MagicDevTeam's MB508([h t t p s : / / github.com/MagicDevTeam) files,
and compiled eclair AOSP to check different files than create ruth device files.
My ROM VERSION:
RUTEM_U3_01.14.16_DEBLUR_SIGNED_USARUTH15ND0RTINT056.0R_PDS000_USARUTHEHKTWEMARA_P011_A010_HWp3_1FF.sbf
My ruth configure files: ruthconfigureforcm7.zip(h t t p s : / / docs.google.com/file/d/0BxgqJrVwRKJqQUlWTWI3SURGU1U/edit)
My unstable update file:v0.1.5.zip(h t t p s : / / docs.google.com/file/d/0BxgqJrVwRKJqaXNzRVJDSU95Slk/edit)
can work:bluetooth
halt work:
audio->media codes can't use.
sensors.
not work:
battd->log say INIT BATTD SOCKET SERVER: failed. unknow how to solve.
camera->used mb508's camera library, log say "mapped at 0x4103c000, not at 0xa7900000" can not load library
used ruth camera library, log say CAMERA HAL not support. unknow how to solve.
radio. unknow how to solve.
wifi->when process step 2, /system/bin/wlan_loader -f /system/etc/wifi/fw_wlan1271.bin -i /system/etc/wifi/tiwlan.ini -e /pds/wifi/nvs_map.bin
failed. unknow to solve.
forget test:
fmradio, gps
Click to expand...
Click to collapse
How are you flashing the update.zip files, my phone doesnt seem to respond to any of the changes.
hsr0 said:
How are you flashing the update.zip files, my phone doesnt seem to respond to any of the changes.
Click to expand...
Click to collapse
you can use charm Big Bootstrapped Recovery Update to update.
or use bootmenu to update.
update:
if you want use bootmenu,
you can unzip my update zip (v0.1.5.zip).
WARNING: if step fails, may be need reinstall the system. BE CAREFUL.
1. remount system (root)
mount -o remount,rw / /system
2. push bootmenu files
adb push v0.1.5/system/bin/bootmenu /system/bin/
adb push v0.1.5/system/bootmenu /system/bootmenu
3. chmod files permisson (root)
chmod 0755 /system/bin/bootmenu
chmod 0755 /system/bootmenu/binary/*
chmod 0755 /system/bootmenu/script/*
chmod 0755 /system/bootmenu/recovery/sbin/*
4. change mot_boot_mode(original motorola file) (root)
mv /system/bin/mot_boot_mode /system/bin/mot_boot_mode.bin
5. edit mot_boot_mode (root) update(2013/02/08)
/system/bootmenu/binary/busybox vi /system/bin/mot_boot_mode
#!/system/bin/sh
export PATH=/system/bin:$PATH
/system/bin/bootmenu
mot_boot_mode.bin
6. chmod mot_boot_mode permission (root)
chmod 0755 /system/bin/mot_boot_mode
7. reboot and click click click(loop) "vol down" key until show bootmenu screen
Can you post just the bootmenu files?
I have already tried your steps twice but soft bricked the phone.
hsr0 said:
Can you post just the bootmenu files?
I have already tried your steps twice but soft bricked the phone.
Click to expand...
Click to collapse
OK. I re-installed system. And write script name mkbootmenu.sh
unzip bootmenuDIR.zip
adb push bootmenuDIR/bootmenu /sdcard/bootmenu
adb push bootmenuDIR/mkbootmenu.sh /sdcard
in phone side:
$su
#sh /sdcard/mkbootmenu.sh
#reboot
when MOTO LOGO click click click (loop) "VOL - " (VOL DOWN) until show bootmenu screen
NOTICE: only new system or never changed mot_boot_mode can run this script .
thank you very much, it worked!
However I still do not know why it did not run when I executed it although I did a fresh install with RSD lite.
Maybe because I used windows to create mot_boot_mode file, maybe some character issues occured.
but once again thank you!
Will check it in the morning, so far i've modded most of the make files for CM9 and my only worry is the framework.apk but so far so good :thumbup:
Almost forgot! The 2nd init and a modified boot kernel will be the biggest problems.
DEV Device: MB511 (deodexed)
Current System: MT27i xICS
Long Live: V9 Ferrari Rom
code.google.com/p/motorola-flipout-files
https://github.com/plageran/ruth
Good job, man
My Flipout is waiting for a stable CM
ruth device cpu and gpu
As far as I know, flipout and charm have OMAP 3410 CPU inside, this CPU DOESN'T include GPU. Others like OMAP 3430 in Milestone 1 does include Imagination PowerVR SGX535 GPU.
Please check this location on your device with a root explorer app:
/system/lib/egl/
and in there you will find your gpu drivers, also most phones do have gpu's although it only helps the device a little bit.
I know my device has atleast 3 .so files in there and I think thats android drivers. I must just figure out if it should be recompiled for newer versions of android.
xinbada007 said:
As far as I know, flipout and charm have OMAP 3410 CPU inside, this CPU DOESN'T include GPU. Others like OMAP 3430 in Milestone 1 does include Imagination PowerVR SGX535 GPU.
Click to expand...
Click to collapse
Hijack
How did you manage to get the hijack working? I've been struggling my butt off to get the 2nd-init working:highfive:
phchshow said:
you can use charm Big Bootstrapped Recovery Update to update.
or use bootmenu to update.
update:
if you want use bootmenu,
you can unzip my update zip (v0.1.5.zip).
WARNING: if step fails, may be need reinstall the system. BE CAREFUL.
1. remount system (root)
mount -o remount,rw / /system
2. push bootmenu files
adb push v0.1.5/system/bin/bootmenu /system/bin/
adb push v0.1.5/system/bootmenu /system/bootmenu
3. chmod files permisson (root)
chmod 0755 /system/bin/bootmenu
chmod 0755 /system/bootmenu/binary/*
chmod 0755 /system/bootmenu/script/*
chmod 0755 /system/bootmenu/recovery/sbin/*
4. change mot_boot_mode(original motorola file) (root)
mv /system/bin/mot_boot_mode /system/bin/mot_boot_mode.bin
"5. edit mot_boot_mode (root)
vi /system/bin/mot_boot_mode "
#!/system/bin/sh
export PATH=/system/bin:$PATH
/system/bin/bootmenu
mot_boot_mode.bin
6. chmod mot_boot_mode permission (root)
chmod 0755 /system/bin/mot_boot_mode
7. reboot and click click click(loop) "vol down" key until show bootmenu screen
Click to expand...
Click to collapse
plageran said:
How did you manage to get the hijack working? I've been struggling my butt off to get the 2nd-init working:highfive:
Click to expand...
Click to collapse
He basically rewrote the boot script, so while booting up, it opens the bootmenu script and only then does it do a regular boot..
The normal 2nd init installer don't invoke the boot script in the same way I guess and hence it doesn't work.
Well now since bootmenu works, its like a torchlight in an otherwise dark tunnel.
Another point I want to make is that the flipout cm7 update given is in a bootloop. probably I need to change the files for basil (charm).
I think bootloop is audio device (libaudio.so) error. Maybe like when I use MB508's libcamera.so the message log show "mapped at .... " can't load library.
So should be use charm's libaudio.so to recompile CM7 sources. But maybe make some error, like media codec can't use.
hsr0 said:
He basically rewrote the boot script, so while booting up, it opens the bootmenu script and only then does it do a regular boot..
The normal 2nd init installer don't invoke the boot script in the same way I guess and hence it doesn't work.
Well now since bootmenu works, its like a torchlight in an otherwise dark tunnel.
Another point I want to make is that the flipout cm7 update given is in a bootloop. probably I need to change the files for basil (charm).
Click to expand...
Click to collapse
---------- Post added at 10:55 PM ---------- Previous post was at 10:34 PM ----------
The 5 step should be
"/system/bootmenu/binary/busybox vi /system/bin/mot_boot_mode", I forgot no install busybox no vi.
Defy use logwrapper to hijack, but flipout can't.
I think flipout processed init have not execute logwrapper, let we can't hijack logwrapper.
But mot_boot_mode executed.
So I rename mot_boot_mode to mot_boot_mode.bin and write new script name mot_boot_mode. Make bootmenu can execute.
And modify init.mapphone30_umts.rc
"exec /system/bin/mot_boot_mode" to "exec /system/bin/mot_boot_mode.bin", make 2nd-init can success execute init files.
In My uploaded bootmenuDIR.zip, the 2nd-init directory is modify for eclair to use.
You can modify eclair init files to test 2ndinit.
plageran said:
How did you manage to get the hijack working? I've been struggling my butt off to get the 2nd-init working:highfive:
Click to expand...
Click to collapse
What I've learned so far is that most motorola's have the hijacked kernel from the original device, I'm not sure up to what level of Android os this works but if you dig deep enough. Its all almost the same to stock.
I hope you don't mind me using your scripts for my rom, this changed things big time.
Now to get my build machine up and running and to finish my LIB list for CM
edit: has anyone figured out the fingerprint system yet? I haven't found anything about it yet, whether it's generated or copied over.
phchshow said:
I think bootloop is audio device (libaudio.so) error. Maybe like when I use MB508's libcamera.so the message log show "mapped at .... " can't load library.
So should be use charm's libaudio.so to recompile CM7 sources. But maybe make some error, like media codec can't use.
---------- Post added at 10:55 PM ---------- Previous post was at 10:34 PM ----------
The 5 step should be
"/system/bootmenu/binary/busybox vi /system/bin/mot_boot_mode", I forgot no install busybox no vi.
Defy use logwrapper to hijack, but flipout can't.
I think flipout processed init have not execute logwrapper, let we can't hijack logwrapper.
But mot_boot_mode executed.
So I rename mot_boot_mode to mot_boot_mode.bin and write new script name mot_boot_mode. Make bootmenu can execute.
And modify init.mapphone30_umts.rc
"exec /system/bin/mot_boot_mode" to "exec /system/bin/mot_boot_mode.bin", make 2nd-init can success execute init files.
In My uploaded bootmenuDIR.zip, the 2nd-init directory is modify for eclair to use.
You can modify eclair init files to test 2ndinit.
Click to expand...
Click to collapse
hey dude, r you guys still working on flip/charm? any progress to share?
xinbada007 said:
hey dude, r you guys still working on flip/charm? any progress to share?
Click to expand...
Click to collapse
keep an eye on our github pages, i can only update monthly due to cost's. Still need to get and build my build machine lol!
Feature list
- sets hostname to LG-G4 something that was missing at first from lineage/aosp 7.1.1 (maybe i will remove that)
- Better mount point flags
- Internal storage:
nomerges
nr_requests
lower safe read_ahead_kb
cfq scheduler
cfq scheduler tweaks
remove add_random (if its enabled in the kernel by default)
rq_affinity
- external storage:
nomerges
nr_requests
lower safe read_ahead_kb
cfq scheduler
cfq scheduler tweaks
remove add_random (if its enabled in the kernel by default)
rq_affinity
- Net and virtual memory:
tcp_congestion_control
disable_ipv6
dirty_writeback_centisecs
dirty_expire_centisecs
dirty_background_ratio
dirty_ratio
drop_caches
kernel.panic
min_free_kbytes
overcommit_ratio
panic_on_oom
swappiness 0 #llama doesn't have zram feature, it's useless on Lg G4
vfs_cache_pressure
- CPU customisations ~depends on your choice of script~
balanced ~doesn't make any cpu changes~
less ~for less battery drain, cpu rests more~
more-less ~for a lot less battery drain, but with a big lag (will soon try fix stability and smoothness)~
performance ~for full cpu power, but rest when the screen is off~
- Kernel customisations
msm_thermal ~off on battery save / on and set a safe temp. for performance~
lowmemorykiller
read_wakeup_threshold
write_wakeup_threshold
hotplug customisation
- Only the safe internet customisations
tcp_timestamps
tcp_tw_reuse
tcp_sack
tcp_tw_recycle
tcp_window_scaling
tcp_keepalive_probes
tcp_keepalive_intvl
tcp_fin_timeout
For stock based roms follow the guide in post #2
How to "install" it ? Simple
1.unzip
2.place it in /system/etc/init.d
Code:
adb root
adb remount
adb push <your tweak> system/etc/init.d/
3.change its permissions to 755
4.lastly change owner:group to root:shell
Code:
adb shell
su
mount -o remount rw /system
chmod 755 /system/etc/init.d/<your tweak>
chown root:shell /system/etc/init.d/<your tweak>
If you don't have a pc, type in a terminal inside your g4
Code:
su
mount -o rw remount /system
chmod 755 /system/etc/init.d/<your tweak>
chown root:shell /system/etc/init.d/<your tweak>
Those of you that use the new systemless root method of chainfire you can put the script in /system/su.d or in /su/su.d with permissions 700 (same permissions at folder and script) and set owner:group to root:root
Those of you that use the new magisk root method you can put the script in /magisk/.core/service.d/ with the same permissions and ownership as in init.d
Those coming using search bar and don't have this phone and this kernel, don't try it, unless you know what to edit to "fit" your own kernel.
These tweaks aren't just for faster easy setting up our phone, they are more useful for those that don't want to have root access ON, for various personal reasons. They can apply those settings on boot and setup their phone without the need of root and an app asking for root.
Easy removal: delete the script and reboot. And never use more than one of these scripts inside init.d
Careful, some stock based roms have preinstalled some scripts inside init.d by default.
Those must be removed after flashing Llama Sweet Kernel. They are not compatible and they cause instability !
BIG Thanks to this genius
@genesixxbf3
for his kernel to our lg g4.
XDA:DevDB Information
[Tweaks][MM/N][H815][H811]Kernel Tweaks[CM/STOCK/AOSP], Tool/Utility for the LG G4
Contributors
kessaras, genesixxbf3
Version Information
Status: Stable
Created 2016-12-09
Last Updated 2017-04-25
Reserved
This is a guide for ALL stock based roms and all kernels.
My script will only add tweaks that apply to all kernels.
For those that are rooted with SuperSu, they must first fully remove it.
Nub guide to change SuperSu for Magisk root:
Step 1.
SuperSu must be removed.
Go into supersu -> settings -> fully remove root access.
###Or download and flash in recovery mode the UnSu script from osm0sis thread.###
Step 2.
Use hardware key combination to boot to TWRP.
###If you used the UnSu script, no need to reboot to recovery, skip step 2 and go to next one.###
Step 3.
Flash latest magisk flashable zip for users that are not rooted yet.
It sais: "If you're not rooted, or something went wrong and you need a clean start"
Download that .zip file and flash it.
Now you are rooted again. Reboot to your rom.
Step 4.
Download Magisk Manager from play store. In that app you can even enable systemless root to hide root from the apps, or do many things that you like.
Questions further go to magisk thread not here. And don't forget to re-enable usb debugging. After you removed root, that was toggled, ###Unless you used the UnSu script again. That means that before reboot you were already rooted.###
Now it's time to install your script.
Download the compressed tweak from this post , uncompress it and follow the next guide.
The steps are the same with the lineage based roms and it works for ALL lineage based roms too
If you use a root file manager then you can skip the guide and just cut - paste the script in /magisk/.core/service.d/
set permissions to 755, ownership to root:shell and reboot.
INSTALLATIONStep 1.
place it in /magisk/.core/service.d/
Code:
adb push /<path to the script>/90balanced /sdcard/
adb shell
su
mv /sdcard/90balanced /magisk/.core/service.d/
Step 2.change its permissions to 755 if it's not already set to 755 by default
Code:
chmod 755 /magisk/.core/service.d/90balanced
If you don't have a pc, type the same commands in g4 terminal but of course without the adb command. Script is supposed to be in path /sdcard/
not in /sdcard/download/ or whatever path. Otherwise edit the command "mv ..." to match the script path.
That's it. Reboot to apply your tweaks.
~I will add Llama Sweet kernel tweaks for stock based ROMS when Genesixxbf3 fixes the bluetooth issue.
Until then all use this one that applies to all kernels including Llama.
Special thanks to:
@topjohnwu for developing Magisk
and to
@osm0sis for his UnSU script
My scripts are not meant for use with kernel adiutor.
Changelog
31/01/2017
- fixed stability for "90less"
- changed to "westwood" tcp congestion control
01/02/2017
- changed to Fiops scheduler only for the 90less and 90more-less
- fixed stability for 90more-less
12/02/2017
- when screen is on, 3 cores always online not 1.
- fixed stability for 90less , 90more-less
- 90balance, interactive governor stable and at the same time conserving some battery
- big cores governor is same with small cores
15/02/2017 and 20/02/2017
- changed back to cfq scheduler
- added cfq scheduler tweaks
- fixed path to disable ipv6
09/03/2017
- fixed a bug for those that big cores were found disabled on boot
Although this is something caused from dirty flashing and can only be fixed with a clean flash
18/03/2017
- Added better mount point flags for Lineage/Aosp based roms, for f2fs, for those that prefer using f2fs partitions format
- i changed the way the mount points get set, now you don't need busybox if you don't want to.
- bigger timer rate for interactive governor for the balanced tweak, balanced can conserve battery now too.
25/04/2017
- Less-more is not lagging anymore but of course it still loads slow since cpu runs at a lower frequency
- interactive governor in balanced script saves more battery than before
- All scripts now give a small cpu frequency amount on input to reduce lag
- At less and less-more the hotplug sets the cores online at a lower frequency. Before, with those scripts you could rarely see the other cores online
kessaras said:
You can request any setting for kernel and cpu you want. I can add them for you.
Screenshots of battery with 90less.
~Haven't done anything special. Brightness is at normal with "auto" ON, gapps stock, usage: Normal, chat, xda, phone Calls/Messages, GPS ON.
Many factors determine the battery drain, such as 3rd party apps, ads from apps, services and more, don't blame my settings. Those settings are absolute and tested and i only do this to help everyone.
Click to expand...
Click to collapse
Thanks for you work, I am using H818p without BL unlock. Currently, I can modify /etc/init/qcom.post_boot.sh from this thread (http://forum.xda-developers.com/tmo...-msm-8992-cpu-io-ram-interactive-gov-t3351478).
The question is, can I port some tweaks from this thread to the stock kernel using qcom.post_boot ? I am not familiar with the seqence of boot, any idea ?
Thanks,
jskasia said:
Thanks for you work, I am using H818p without BL unlock. Currently, I can modify /etc/init/qcom.post_boot.sh from this thread (http://forum.xda-developers.com/tmo...sm-8992-cpu-io-ram-interactive-gov-t3351478).
The question is, can I port some tweaks from this thread to the stock kernel using qcom.post_boot ? I am not familiar with the seqence of boot, any idea ?
Thanks,
Click to expand...
Click to collapse
Scripts are only for Llama kernel. So,
it depends if the stock kernel has same file "trees". Worst case scenario is to not be able to boot. If you can enter recovery you can fix it by doing :
Code:
rm /system/etc/init.d/<name of the script>
Or use the recovery file manager to delete it,
reboot and you are fine.
Don't use 90less as it is or for sure you won't boot. Less is using alucard governor which doesn't exist in stock. Open script and edit those lines, change alucard to interactive.
"kernel tweaks" delete them. the stock kernel doesn't have same hotplugs and heat protection.
EDIT:
a part of the scripts does work for stock without llama kernel. it's not dangerous because the stock lg rom doesn't have init.d support on boot and the script only can be applied inside kernel adiutor by enabling init.d emulator.
you can use it then. you will just not get the 100% out of it.
in the 90less you wont get the alucard governor and the hotplug to let the cpu rest.
the only alternative available is to make you one that edits the interactive governor to work almost the same as alucard and conserve a bit more battery than the stock interactive does.
@matgesiarz
follow the op
kessaras said:
Scripts are only for Llama kernel. So,
it depends if the stock kernel has same file "trees". Worst case scenario is to not be able to boot. If you can enter recovery you can fix it by doing :
Code:
rm /system/etc/init.d/<name of the script>
Or use the recovery file manager to delete it,
reboot and you are fine.
Don't use 90less as it is or for sure you won't boot. Less is using alucard governor which doesn't exist in stock. Open script and edit those lines, change alucard to interactive.
"kernel tweaks" delete them. the stock kernel doesn't have same hotplugs and heat protection.
Click to expand...
Click to collapse
Okay, I successfully put the tweaks (balance) on to init.qcom.post_boot.sh. My phone boot without any problem. After few days we will see the result.
Thanks
we just need to push scripts or I need also to clean the init.d folder first from other scripts? I am on ChyperOS 3.1.4
If I understand right, if I put this tweak I don't need to setup any kernel modification in apps like EX Kernel manager, isn't?
Vipery said:
we just need to push scripts or I need also to clean the init.d folder first from other scripts? I am on ChyperOS 3.1.4
Click to expand...
Click to collapse
no you don't clean the init.d folder. if you do that you will lose important script that needs the rom to boot. you only use one of those scripts in init.d, if you put 2 of those in, delete the one.
Oletros said:
If I understand right, if I put this tweak I don't need to setup any kernel modification in apps like EX Kernel manager, isn't?
Click to expand...
Click to collapse
exactly and if you need any change and you don't know how to edit the script, you can ask me to add it for you
kessaras said:
no you don't clean the init.d folder. if you do that you will lose important script that needs the rom to boot. you only use one of those scripts in init.d, if you put 2 of those in, delete the one.
Click to expand...
Click to collapse
Thank you. Another thing, I need to set owner and group to shell or just group? The other scripts are set root/shell and not shell/shell.
Vipery said:
Thank you. Another thing, I need to set owner and group to shell or just group? The other scripts are set root/shell and not shell/shell.
Click to expand...
Click to collapse
only what the op sais. only group owner. its already set from me, but you have to at least check if its set, if not, set it. group owner shell
Thanks for the tweaks!
Sorry for this perhaps silly question, but which is supposed to be more battery friendly between balanced and less?
joaste said:
Thanks for the tweaks!
Sorry for this perhaps silly question, but which is supposed to be more battery friendly between balanced and less?
Click to expand...
Click to collapse
less refers to less battery consuption and its only by a little cause we don't want to have lags. Of course we can do it even more battery friendly but we will have a very slow phone.
kessaras said:
less refers to less battery consuption and its only by a little cause we don't want to have lags. Of course we can do it even more battery friendly but we will have a very slow phone.
Click to expand...
Click to collapse
Thanks for the clarification!
kessaras said:
exactly and if you need any change and you don't know how to edit the script, you can ask me to add it for you
Click to expand...
Click to collapse
Thanks
Ok,I applied your 90less tweaks and here's what I've got after reboot:
The big cores governor-interactive,max.freq.-1248
The little cores governor-alucard,max.freq.-1440
MSM Hotplug-OFF
MSM MPDecision Hotplug-ON
Is that ok or...?
welder73 said:
Ok,I applied your 90less tweaks and here's what I've got after reboot:
The big cores governor-interactive,max.freq.-1248
The little cores governor-alucard,max.freq.-1440
MSM Hotplug-OFF
MSM MPDecision Hotplug-ON
Is that ok or...?
Click to expand...
Click to collapse
nothing applied on boot.
in less,
max for the big is set to 1536
and hotplug is off to not get load for nothing since the temp wont go higher than 60 even under the hot summer sun.
kessaras said:
nothing applied on boot.
in less,
max for the big is set to 1536
and hotplug is off to not get load for nothing since the temp wont go higher than 60 even under the hot summer sun.
Click to expand...
Click to collapse
So I should change the max for the little cores to 1536 and everything else is ok?
Vipery said:
Thank you. Another thing, I need to set owner and group to shell or just group? The other scripts are set root/shell and not shell/shell.
Click to expand...
Click to collapse
...