sgy kernel have some issue related with cpu frequency.
first, cpu latency is not set correctly. the effect, non build-in freq governor can not working at all.
second, missing frequency table so cpu freq stat is not working. that bug make cpu spy (and other similar app) not working.
so, i write small loadable kernel module to solve that issue. i make my tweks as module so it can works with stock kernel. and for addition, i add under-voltage capability.
download and flash zip file in recovery mode. you can edit init.d script (00bacem-tweak) to change under-voltage.
if your device become unstable make both voltage higher, but keep it under stock kernel default value. i am not responsible to anything happen on your phone so be careful when tweak that value.
before install latest version (0.2), if you already install old version, flash bacem-remove-0.2.zip from recovery mode. and then flash bacem-tweak-0.2.zip
warning : it's not for noob (in real life)
to change uv manually run from terminal
Code:
echo -20mV > /proc/sys/bacem/volt/cpu
and to check if your under-voltage success
Code:
cat /proc/sys/bacem/volt/cpu
Source code
https://github.com/irfanbagus/BCM-tweak
BaCeM-tweak under bacem branch.
Build :
BCM-tweak 0.1
- Initial release
BCM-tweak 0.1.1
- Fix init.d script
- Add interactive governor
BaCeM-tweak 0.2
- Change name to BaCeM-tweak
- Support more than 2 freq
- Auto detect (and auto fix) missing cpufreq table
- Using sysctl to control under-voltage
- Real-time under-voltage. no need to unload module to change uv, and no need change frequency to apply under-voltage
BaCeM-tweak 0.2.1
- Apply workaround for instability on stock rom using init.d script. Not beautiful solution but at least it's work.
- Fix bug in memory allocation
- Fix for potential incompatibility with merruk kernel
Can use cygwin? If can maybe i will try.
Thanks for another work again and must follow.
I'd like to help but I'm completely newb in android and linux stuffs.
no need installed linux. using adb shell or ssh is enough. the reason i am not release yet because uv. without proper knowledge you could make your sgy over voltage easily.
i put source code in gitub
https://github.com/irfanbagus/BCM-tweak
and since nobody pm me, then i will test by myself. maybe need 1-2 days until i release binary build.
okay.. i think the CPU frequency table isn't going to be an easy job.
BCM21553 only allows x13 cpuspeed multipler on your thread about setcpu fix.. maybe..
ARVolutionz said:
okay.. i think the CPU frequency table isn't going to be an easy job.
BCM21553 only allows x13 cpuspeed multipler on your thread about setcpu fix.. maybe..
Click to expand...
Click to collapse
that the easiest part. ok, not real table but enough to make governor working. and because it's still using stock kernel, only 312mhz and 832mhz available. i am working on recovery zip file right know. i will upload in few next hour.
i already upload kernel module binary and init.d script. check first post. as soon as you find problem, disable init.d script and please report. i am not include custom governor yet. i already build ondemand, but it's make ui become lag so i am not include in zip file. tomorrow i will try to build interactive governor.
[edit]
just in case your phone failed to boot, use file in attachment to remove bcm-tweak. use from recovery mode.
I've changed the voltage value but both nofrills and antutu said that the frequencies are not changed. still showing 832 and 312mhz. the performance score indeed increased but how could we know that the module is really working or not?
kurotsugi said:
I've changed the voltage value but both nofrills and antutu said that the frequencies are not changed. still showing 832 and 312mhz. the performance score indeed increased but how could we know that the module is really working or not?
Click to expand...
Click to collapse
i think because still use stock kernel with same freq and from 1st post its only change voltage. maybe can see the different with app that can show our voltage before and after use bcm-tweak.
In init.d/00bcm-tweak what efect if you change echo 312000 to echo 600000 or else number?
kurotsugi said:
I've changed the voltage value but both nofrills and antutu said that the frequencies are not changed. still showing 832 and 312mhz. the performance score indeed increased but how could we know that the module is really working or not?
Click to expand...
Click to collapse
savie said:
i think because still use stock kernel with same freq and from 1st post its only change voltage. maybe can see the different with app that can show our voltage before and after use bcm-tweak.
In init.d/00bcm-tweak what efect if you change echo 312000 to echo 600000 or else number?
Click to expand...
Click to collapse
it does not change frequency and it should not give improvement to performance. its only effect 3 things : cpu voltage, cpu freq statistic, and cpufreq latency (only the number, not actual latency). to check if module loaded, make sure folder "/sys/module/bcm_tweak" exist.
be careful when change voltage, don't set too low. to see if voltage control is working, i try to change voltage 1V and it's successfully to ... death no error, no restart only stop working and i have to pull out battery to restart my phone.
irfanbagus said:
it does not change frequency and it should not give improvement to performance. its only effect 3 things : cpu voltage, cpu freq statistic, and cpufreq latency (only the number, not actual latency). to check if module loaded, make sure folder "/sys/module/bcm_tweak" exist.
be careful when change voltage, don't set too low. to see if voltage control is working, i try to change voltage 1V and it's successfully to ... death no error, no restart only stop working and i have to pull out battery to restart my phone.
Click to expand...
Click to collapse
Well that speaks that this is absolutely working, right?
Still observing it
Sent from my GT-S5360 using xda premium
I'm afraid the init.d script didn't work. I can't find bcm_tweak in /sys/module/. this is what I do to make it work. I edited '#!/system/xbin/busybox sh' to '#!/system/bin/sh' and 'bcm-tweak.ko' to 'bcm_tweak.ko', rename the ko file as in init.d script, reboot.
@ irfanbagus;
Can you share your custom kernel
kurotsugi said:
I'm afraid the init.d script didn't work. I can't find bcm_tweak in /sys/module/. this is what I do to make it work. I edited '#!/system/xbin/busybox sh' to '#!/system/bin/sh' and 'bcm-tweak.ko' to 'bcm_tweak.ko', rename the ko file as in init.d script, reboot.
Click to expand...
Click to collapse
sound like busybox applet problem. can you do this for me ? run in terminal
Code:
/system/xbin/busybox
and see if your busybox has build-in command "sh" and "insmod". i'll try to fix it tonight
premolikeshtc said:
@ irfanbagus;
Can you share your custom kernel
Click to expand...
Click to collapse
this is my 'custom kernel'
I want the boot.img,,
my busybox version doesn't have sh but it does have insmod. I forgot the version its 1.17 or something. I'm not sure if the newer one have sh. and btw, we already have insmod in /system/bin.
Work great.
Result with antutu after restart use bcm21553
1.non bcm-tweak 1375
2.bcm-tweak 1560
Result with antutu after restart use performance
1.non bcm-tweak 1572
2.bcm-tweak 1573
Still on original number not change anything in 00bcm-tweak file
@prem:
http://forum.xda-developers.com/showthread.php?t=1620243 --> kernel bootscript
http://forum.xda-developers.com/showthread.php?t=1598803 --> kernel dualboot
http://forum.xda-developers.com/showthread.php?t=1545930 --> ext4 modules for kernel
Thanks a lot
---------- Post added at 07:45 PM ---------- Previous post was at 07:43 PM ----------
Which governor is working actually ?
Related
*** PLEASE READ CAREFULLY BEFORE INSTALLING OR FLASHING ANY SOFTWARE POSTED IN THIS THREAD ***
The software posted here is for TESTING purposes only, The Polaris Android Linux development team or any of the posters of software or links to software on this thread, take absolutely no responsibility or liability for damage caused by the result of installing or flashing software or links to software found on this thread - correctly or otherwise, you do so on the sole understanding that you do so at your own risk.
Previous thread was closed because too big you can find lot of information into it with the search button : http://forum.xda-developers.com/showthread.php?t=555000
Hello to all of you, Android user.
This thread is the right place to talk about non-kernel related discussions, questions and requests.
Please, remember that the thread is public, so don't use bad word
So...have fun
-------------------------------------------------------------------------------------------------------------------------------
01-09-09 - new link to files for working wifi
http://www.4shared.com/dir/19593527/...a/sharing.html
From Google Code Vogue-Android:
01-09-09 - Initrd - works with unpartitioned cards, otherwise no changes.
01-09-09 - Rootfs - works with unpartitioned cards, otherwise no changes.
Reserved for future use
Reserved for future use.
Reserved for future use,
Reserved for future use-
what packages do i have to dload? everything?
nicandris said:
what packages do i have to dload? everything?
Click to expand...
Click to collapse
From the first link (4share), you took all but rootfs and initrd, these one you could download it from the other links
You should put name Android in the title to know about what is this thread
whitealien said:
You should put name Android in the title to know about what is this thread
Click to expand...
Click to collapse
Thanks for the suggestion
@Mormy
Could you give us your startup/default haret script? With script whitch you uploaded to 4shared, graphics don't work properly.
Good thing to open a clean thread to speak about testing
I'm currently testing the SquashFs version, latest on http://code.google.com/p/vogue-android/downloads/list
With this system.sqsh : http://vogue-android.googlecode.com/files/hero.zip
And this base files : http://vogue-android.googlecode.com/files/squashfsbasefiles.zip
It's very stable. With this build I haven't got anymore the 'reload UI' problem when I go back to home screen.
But it's very slow. It takes more time to launch application, wake up the phone, open settings... But the scrolling is normally fast.
Wifi doesn't work for me with it.
Maybe I'll try this one tonight : system-090109r1.img on http://code.google.com/p/vogue-hero/downloads/list
I didn't understood how works the last one with 'userinit.sh' system, so I think I will not try it
Averne said:
@Mormy
Could you give us your startup/default haret script? With script which you uploaded to 4shared, graphics don't work properly.
Click to expand...
Click to collapse
I've tried Neocore and won't start either with the 4share startup and with mine.
By the way, this the one I usually have:
Code:
set RAMSIZE 0x08000000
set MTYPE 1723
set KERNEL zImage
set initrd initrd.gz
#
# The following kernel parameters are useful
# ppp.username - The username used to connect to the network when dialing
# ppp.password - The password used to connect to the network when dialing
# ppp.apn - Set apn of your provider
# ppp.nostart - Set ppp.nostart=1 to disable starting the ppp connection on boot
# msm_sdcc.msmsdcc_fmax - The maximum frequency (in Hz) used by the SD controller
# pm.sleep_mode - The mode used when the phone is off
# 0=Power Collapse Suspend, 1=Power Collapse, 2=Apps Sleep,
# 3=Slow Clock and Wait for Interrupt 4=Wait for Interrupt
# Default is 1, use 1 for best power savings
# board-htcpolaris.panel_type - Panel type used to power the panel off and on
# 0=Don't power off the panel (Default)
# 1=Sony 2=Topoly 3=Topoly (probably just the same as 2)
# lcd.density - Defaults to 160, 128 shows more on screen
#
set cmdline "board-htcpolaris.panel_type=3 ppp.apn=tre.it ppp.username=none ppp.password=none pm.sleep_mode=1 mddi.width=324 mddi.height=432 no_console_suspend board-htcpolaris-battery.battery_capacity=1350 clock-7x00.mddi=0xa51 mddi_client_vogue.vsync=0"
boot
Averne said:
@Mormy
Could you give us your startup/default haret script? With script whitch you uploaded to 4shared, graphics don't work properly.
Click to expand...
Click to collapse
Try with '1' instead of '3' for "board-htcpolaris.panel_type" property.
Averne said:
@Mormy
Could you give us your startup/default haret script? With script whitch you uploaded to 4shared, graphics don't work properly.
Click to expand...
Click to collapse
if you mean neocore then yes that is broken in this kernel.
if you are having display issues, then try changing the panel type or try to be more specific on what you mean by "graphics dont work properly".
Ok, this is my default.txt file:
Code:
set RAMSIZE 0x08000000
set MTYPE 1723
set KERNEL zImage
set initrd initrd.gz
set cmdline "board-htcpolaris.panel_type=0 ppp.apn=orange ppp.username=orange ppp.password=orange pm.sleep_mode=1 mddi.width=336 mddi.height=448 lcd.density=160 no_console_suspend board-htcpolaris-battery.battery_capacity=1350 mddi_client_vogue.vsync=0"
boot
With this settings display works fine, but you must disconnect usb cable before press [Run] button in haret.
Hi ,
with the last files taken from bally site I have wifi working but data connection li ke previous release taken from vogue-android sometime starts sometimes no.
And with this files I can't start calling it creashes.
No Gps..
Why start up logo is changed? and button mapping?
Averne said:
Ok, this is my default.txt file:
Code:
set RAMSIZE 0x08000000
set MTYPE 1723
set KERNEL zImage
set initrd initrd.gz
set cmdline "board-htcpolaris.panel_type=0 ppp.apn=orange ppp.username=orange ppp.password=orange pm.sleep_mode=1 mddi.width=336 mddi.height=448 lcd.density=160 no_console_suspend board-htcpolaris-battery.battery_capacity=1350 mddi_client_vogue.vsync=0"
boot
With this settings display works fine, but you must disconnect usb cable before press [Run] button in haret.
Click to expand...
Click to collapse
why have you got lcd density set at 160 and width and height at 336x448?
this is not my startup file. you should try that first.
Does somebody know what are the benefits of using 'squash FS' system instead of old standard system.img?
Kiiv said:
Does somebody know what are the benefits of using 'squash FS' system instead of old standard system.img?
Click to expand...
Click to collapse
if you are really interested: (from http://groups.google.com/group/andr...ad/e4ce4f06f982d51b/30fa2b5deb6533b2?lnk=raot)
I think it would be a good idea to compress /system/bin and /system/
lib at least with squashfs, I have done this on a couple ubuntu and
gentoo systems and it actually increased performance and space
significantly!
Reasons (short version): decompressing data is faster than reading it
from the hard drive, in most current computers, especially when you
have multiple programs reading from the disk, causing thrashing, and/
or when the data on the disk is fragmented. You can read more details
about what was done and the results on http://forums.gentoo.org/viewtopic-p-4732709.html#4732709
Squashfs is intended for general read-only file system use and in
constrained block device/memory system, it can also be combined with a
union mount system like unionfs and aufs for read/write access.
We will be able to improve android boot time, app launch time, and
increase space, what more could we ask for? Maybe a little bit more
ram? Whats up with compcache too?
So now we just need to compile squashfs-tools for android and
experiment, im pretty damn excited to try this!
Also ubifs has lzo compression, not sure how that would work either,
it seems ubifs is favored over jffs2 and yaffs2
Well right now it looks squashfs+lzma wont be in the kernel until
2.6.30 found this via:
http://www.squashfs-lzma.org/
So I think we are left with UbiFS with lza compression but I have no
idea on how to add it to the kernel, and test this out, im really
interested in seeing some results and doing some benchmarks, if
someone more knowledgeable than me can help out that would be awesome
defcon
found a nice pdf comparing the filesystems:
http://free-electrons.com/doc/flash-filesystems.pdf
Benchmarks Of Yaffs2, JFFS2, SquashFS, & UBIFS:
http://free-electrons.com/pub/conferences/2008/elce/flash-filesystems...
Seems like people are already using ubifs on android:
http://groups.google.com/group/android-porting/browse_thread/thread/a...
Reference:
http://forums.gentoo.org/viewtopic-p-4732709.html#4732709
http://jt0.org/news/squashing_usr_and_the_2629_kernel
Hum, thank you for the link
So I don't understand why it's slower with squash FS on my phone... I will try to find other discussions on the subject.
[UPDATE 02/03/2011]
Here is my OverClocked kernel for the Desire HD. This kernel is undervolted all the way up to 1.1ghz and uses a maximum overvolt of 150mV at 1.51ghz
I AM NOT RESPONSABLE FOR ANY DAMAGE CAUSED BY THIS ALTHOUGH
TESTED YOU UNDERTAKING THIS MEANS U UNDERSTAND AND TAKE THE RISKS
like my undervolted kernel clock speeds under 1209MHz are undervolted in comparison with stock and 1209Mhz is at the same voltage as stock. Above the system is at a hight voltage than stock slighly.
This KERNEL is for people woh dont mind going highet voltage than stock. If this isnt you check out my UV kernel
As the DesireHD has a slightly better quiality CPU than the Z/G2 this over volt can be slightly less on this.
I cannot guarrentee that this kernel will be stable on all DesireHD's if you get freezing/crashing limit the CPU speed in setCPU or install my UV kernel.
[CHANGELOG]
1.3.8.3
-- Patched to .35
----- NO more CM support as the stock CM kernel is very good -----
THE FULL CHANGE LOG LIVES HERE
[INSTALL]
via Clockwork Recovery
Needed :-
-- ClocworkMod Recovery installed
-- SENSE This .zip
1) copy the .zip to your sdcard
2) boot into recovery
3) flash .zip from sdcard
4) select requierd .zip
4) FLASH
5) reboot
OR Fastboot (Builds Before 0.0.9)
Needed
-- Fastboot Set Up
-- SENSE This .zip
-- ADB set up
-- Set CPU
1) boot into bootloader (fatboot mode)
2) put the zImage from the .rar file in the fastboot directoy
3) run
fastboot flash zimage zImage
Click to expand...
Click to collapse
5) run
fastboot reboot
Click to expand...
Click to collapse
6) wait for android to boot
///// Make shure you have the .ko from the .zip / .rar where the zImage came from ///////
7) put the .ko frile from the .rar file in your adb director
8)run
adb push bcm4329.ko /sdcard/
Click to expand...
Click to collapse
9) in adb shell run these commands in order
su
mount -o remount,rw /dev/block/mmcblk0p25 /system
rm /system/lib/modules/bcm4329.ko
busybox cp /sdcard/bcm4329.ko /system/lib/modules/bcm4329.ko
rm /sdcard/bcm4329.ko
Click to expand...
Click to collapse
10) reboot
11) use SetCPU to gain the extra speed
****Due to the init bug (100% CPU usage use SetCPU to limit speed when screen off to save your battery I recommend 256 to 768*****
Here is the zip to flash in clockwork too ... when its out :-D
[ALL VERSIONS]
1.3.8.3SENSE
1.3.8.2SENSE
1.3.8SENSE
1.3.7SENSE
1.3.6SENSE
1.3.5SENSE
1.3.4SENSE
1.3.3SENSE
1.3.0SENSE
1.2.5SENSE
1.2.3r2SENSE
1.2.2SENSE
1.2.1SENSE
1.2.0 SENSE
1.1.4 CM ---- SENSE
1.1.3 CM ---- SENSE
1.1.2 CM ---- SENSE
1.1.1 CM ---- SENSE
1.1.0 CM ---- SENSE
1.0.8 CM SENSE
1.0.7
1.0.6
1.0.5
1.0.4
1.0.2
1.0.1 fixed please reflash
1.0.0(GOLD)
0.0.9-CM ---- 0.0.9-SENSE
Source
https://github.com/BuzzBumbleBee/HTC_ACE_KERNEL
Credits
Cyanogen team for info on edition speed tables
-Mr. X- For helping me fix the source
Ziggy471 for LZMA compression source
Lee For gis Gov and CPU table fixes
CK2 [BFS Patch]
erasmux [SmartAss CPU governor]
Aplharev ppl for help
thanks for this!
for 5) its just fastboot reboot
Edit:
oh and also adb won't push so you have to use these commands instead in the terminal
adb push bcm4329.ko /sdcard/bcm4329.ko
adb shell
su
mount -o remount,rw /dev/block/mmcblk0p25 /system
cat /sdcard/bcm4329.ko > /system/lib/modules/bcm4329.ko
oops cheers for the heads up
teihoata said:
oh and also adb won't push so you have to use these commands instead in the terminal
Click to expand...
Click to collapse
Thanks for the kernel Apache14!
Also, thanks teihoata for the above tip, i complete forgot we have to remount system as rw for now
fastboot.zip for the people
So what is the stock volt, and what is the volt you using??
And you guys use any profiles??
WiFi doesn't seem to work. I get "error".
Sent from my Desire HD using XDA App
phunkycow said:
WiFi doesn't seem to work. I get "error".
Sent from my Desire HD using XDA App
Click to expand...
Click to collapse
I'm on WIFI here. No Issue...
Pushed BCM4329.ko again and rebooted, still nothing
My bad luck. Do you think it could have anything to do with the custom boot.img of the other thread? Also just noticed that my max freq is 1GHz now, seems like stock... Was working fine when i first flashed.
Sent from my Desire HD using XDA App
You will have overwitten the zImage, just reflash the zImage out of the rar with fastboot
Thanks a lot, you were right; works fine again.
Sorry about the fuss. :]
Sent from my Desire HD using XDA App
hi, sorry for a very noob question but how do you enter bootloader mode and setup fastboot.
thanks
Either using adb (plugin your phone via usb first): adb reboot bootloader
or: turn of your phone -> hold volume down + power until you see the bootloader screen.
Apache14 said:
You will have overwitten the zImage, just reflash the zImage out of the rar with fastboot
Click to expand...
Click to collapse
What is the stock volt and the volt ur using here??
Sent from my Desire HD using XDA App
xmoo said:
What is the stock volt and the volt ur using here??
Sent from my Desire HD using XDA App
Click to expand...
Click to collapse
I believe that stock is 1100mV I could be wrong but I remember that when using the previous OC method I was undervolting to 1000mV at 1440MHz via Apache14's instructions. I would guess he's gone for a 50-100mV overvolt, but hey I'm just pulling this from the top of my head, so don't quote me.
Very Good :-D anything under 1.2Ghz is a 50mV under clock and over is either 50mV 100mV or 150mV and I may be able to get more out of it yet
It looks a though this fellow and his G2 are going crazy:
http://forum.xda-developers.com/showthread.php?t=834219
1.7GHz at 1400mV
Those voltages could be unsafe after long use (heat + ware on CPU) i would only go for a 150mV over volt MAX for every day use.
Apache14 said:
Those voltages could be unsafe after long use (heat + ware on CPU) i would only go for a 150mV over volt MAX for every day use.
Click to expand...
Click to collapse
Yeah I was thinking it's probably pretty unsafe, hence why he hasn't released that in his kernel, too many folks would just think it was plausible to keep the phone at that level.
Apache14 said:
Very Good :-D anything under 1.2Ghz is a 50mV under clock and over is either 50mV 100mV or 150mV and I may be able to get more out of it yet
Click to expand...
Click to collapse
so how much is this 1.49 50/100 or 150
xmoo said:
so how much is this 1.49 50/100 or 150
Click to expand...
Click to collapse
1305=50, 1401=100, 1497=150
Hei there.
The idea of this thread is to develop a better kernel for the I9001 in the community. I have compiled my own one for using it in the cwm recovery mod. I've only changed the following so far:
Patched pm2.c file in the samsung kernel sources, see here for the patch:
https://github.com/PabloPL/android_...mmit/46e96915a7e0459dc6b3aec04aa47329371fff44
through menuconfig I've changed the default cpu governor from performance to ondemand.
What we should implement first is init.d support.
I've uploaded my boot.img file for further use here:
http://www.mediafire.com/?6p91s5knka0e0py
It also contains the CWM Recovery
This is great idea bro. Its great to have you here.
Thanks again!!!
Sent from my GT-I9001 using Tapatalk
I would love to see a overclock able kernel! Great idea!
Joost
Sent from my GT-I9001 using XDA App
overclocking module
Hi guys,
coolbho3000 posted source of an overclocking module for HTC Vision. As far I know, it can be used with the SetCPU App together.
http://forum.xda-developers.com/showthread.php?t=813681
Since S+ has a similar Qualcomm chip, it should work as well.
I compiled the overclocking module with the S+ Kernel and packed it into the zImage. The device doesn't boot. Maybe it would be better to follow what coolbho3000 says and adapt the settings
ädu
PS: it needs definitively some adaptions.
Shouldn't we create our own github/bitbucket repositories for kernel and CWM? I'm trying to get my feet wet in generic Android kernel development now, it would be cool to have repository to sync with.
YardE said:
Shouldn't we create our own github/bitbucket repositories for kernel and CWM? I'm trying to get my feet wet in generic Android kernel development now, it would be cool to have repository to sync with.
Click to expand...
Click to collapse
yep of course. I've already opened an account on github. But right now I ain't got time to read the instructions on how to upload repos because I'm busy with applying some changes to FeaMod Recovery and testing them.
I would be happy if a lot of kernel developers would join us!
Edit: The sources for FeaMod recovery 1.1 are on github:
https://github.com/manveru0/FeaMod-Recovery--based-on-CWM-Recovery-
Samsung kernel sources with patched pm2.c:
https://github.com/manveru0/kernel_I9001_samsung
Later I'll try to add "run-parts /system/etc/init.d/" to init.rc, but I'm highly confused from examining ramdisk, because I couldn't find any bash-scripts interpreter (possibly embedded into init executable?) and don't have enough time to continue examining init.rc now. I think, we can add busybox to system image and call it from there. Also, please, modify these lines in default.prop in your future builds:
Code:
ro.secure=0
ro.debuggable=1
As far as I understood, these allow us to use "adb root".
Also, thanks for your awesome work!
YardE said:
Later I'll try to add "run-parts /system/etc/init.d/" to init.rc, but I'm highly confused from examining ramdisk, because I couldn't find any bash-scripts interpreter (possibly embedded into init executable?) and don't have enough time to continue examining init.rc now. I think, we can add busybox to system image and call it from there. Also, please, modify these lines in default.prop in your future builds:
Code:
ro.secure=0
ro.debuggable=1
As far as I understood, these allow us to use "adb root".
Also, thanks for your awesome work!
Click to expand...
Click to collapse
sounds good. I haven't seen a script interpreter either and I'm not quite sure if there is one included in the init. I think it's better we include busybox. Take a look at this thread by the way:
http://forum.xda-developers.com/showthread.php?t=1152740
I'll try to do that testwise.
Here's the adress for my uploaded boot.img-ramdisk without the samsung pictures (we can easily add them again when building a new boot.img):
https://github.com/manveru0/bootimage_ramdisk_I9001
I've already included the changes in default.prop
EDIT: some useful links
http://www.kandroid.org/online-pdk/guide/bring_up.html
http://www.androidenea.com/2009/08/init-process-and-initrc.html
After some init.rd learning I've inserted a service here which should get the job's done, but I have no idea how to test it. Anyway, here is the diff from the normal one:
Code:
[[email protected] boot]$ diff -u3 init.rc ../boot_mod/init.rc
--- init.rc 2011-11-05 22:35:33.194680288 +0400
+++ ../boot_mod/init.rc 2011-11-05 22:24:40.000000000 +0400
@@ -566,7 +566,7 @@
# ihryu 2010.07.19
setprop ro.rfkilldisabled 0
- class_start default
+ #class_start default
# +++++++++++++++++++++++++++++++++++++++++++
# for silent reset
@@ -714,6 +714,10 @@
onrestart restart netd
onrestart restart sensor-daemon
+service initd /system/bin/logwrapper /system/xbin/busybox run-parts /system/etc/init.d
+ oneshot
+
service media /system/bin/mediaserver
user media
group system audio camera graphics inet net_bt net_bt_admin net_raw radio qcom_oncrpc
[[email protected] boot]$
Have also commented "class_start default" which runs twice for some reason. To have this working in theory, you should have busybox installed in /system/xbin with run-parts support. For me, it boots at least ^_^
P.S. It also works if I call command line from adb. Also, adb root works after changing default.prop, good.
P.P.S. You can also remove "charging.rle" from repo, as it is image, too, but why not just keep all the files in repo? git is loyal to binary files as long as you don't try to create a patch. ~_^ Also, you can use .gitignore to exclude some files from git's view at all.
Found excellent reference on init.rd:
http://www.kandroid.org/online-pdk/guide/bring_up.html
Fixed previous post (removed "disabled"), so it should really work now. Going to test it, but not really sure if my test are correct (I'll try to write something to sdcard, but is it mounted r/w at the moment of script running?)
Test failed, thinking of some other, more accurate tests now.
Tried to create file in /cache, and it worked! Here is boot.img with working init.rd and adb root. Flash it via dd (dd if=boot.img of=/dev/block/mmcblk0p8). You should have busybox installed into /system/xbin for this to work.
YardE said:
Found excellent reference on init.rd:
http://www.kandroid.org/online-pdk/guide/bring_up.html
Fixed previous post (removed "disabled"), so it should really work now. Going to test it, but not really sure if my test are correct (I'll try to write something to sdcard, but is it mounted r/w at the moment of script running?)
Test failed, thinking of some other, more accurate tests now.
Click to expand...
Click to collapse
thx for your commit, I'm testing it as well with the adrenaline shot. If init.d support works you should see the changed values.
I do have a working busybox in /system/xbin with run-parts support, so that shouldn't be the issue as my tests didn't work so far.
Okay, gonna delete disable as well.
concerning the images i wasn't so sure about law problems since they include original samsung stuff.
update:
success You did it! Init support works. Though I have to retest it since I've also added user root to the init.rc. Honestly I'm not quite sure if that entry is needed
"user root" is not needed since user is root by default, already tested without it (edited my posts above).
YardE said:
"user root" is not needed since user is root by default, already tested without it (edited my posts above).
Click to expand...
Click to collapse
okay then, i will change the init.rc file and commit it to github. I will name you in the comment to the change. Which name should I use? Is that okay for you?
Oh, you can use either "abbradar" or "YardE", I don't mind. ^_^ Thank you for credits and again for your work. Gonna experiment a bit with CWM now since init.d is working.
YardE said:
Oh, you can use either "abbradar" or "YardE", I don't mind. ^_^ Thank you for credits and again for your work. Gonna experiment a bit with CWM now since init.d is working.
Click to expand...
Click to collapse
I have to thank you for your work as well, mate It's cool working as a team since we are better, faster and should see more bugs than working alone
Edit:
Hmm, we should include busybox in the boot ramdisk, since not every user has busybox installed.
P.S: funny thing is, I've installed adrenaline shotv13 but only part of it works. For example the sdcard tweak works, the sysctl tweaks don't.
P.P.S: i've installed bash on my device, it's much more easier with it to navigate in the adb shell
manveru0 said:
Hmm, we should include busybox in the boot ramdisk, since not every user has busybox installed.
Click to expand...
Click to collapse
What is the max size limit in our device for ramdisk? Also, should we really do so? It will be hard to update in comparison and maybe will be stripped due to size limit, and users basically'll have two versions of busybox - our embedded into boot.img and their own - in /system. (I'm looking on CM and other init.d implementations as an example) But on the other hand, it is really nearly critical level app (although sh is not in boot.img, for example)
P.S: funny thing is, I've installed adrenaline shotv13 but only part of it works. For example the sdcard tweak works, the sysctl tweaks don
Click to expand...
Click to collapse
They also trying to write some values into non-existent /sys nodes, looks like they are meant for other kernel scheduler, like BFQ (should we also try it?)
---------- Post added at 01:25 AM ---------- Previous post was at 01:25 AM ----------
P.P.S: i've installed bash on my device, it's much more easier with it to navigate in the adb shell
Click to expand...
Click to collapse
Good advice, thank you ^_^.
YardE said:
What is the max size limit in our device for ramdisk? Also, should we really do so? It will be hard to update in comparison and maybe will be stripped due to size limit, and users basically'll have two versions of busybox - our embedded into boot.img and their own - in /system. (I'm looking on CM and other init.d implementations as an example) But on the other hand, it is really nearly critical level app (although sh is not in boot.img, for example)
They also trying to write some values into non-existent /sys nodes, looks like they are meant for other kernel scheduler, like BFQ (should we also try it?)
---------- Post added at 01:25 AM ---------- Previous post was at 01:25 AM ----------
Good advice, thank you ^_^.
Click to expand...
Click to collapse
the maximum size of both recovery and boot.img is 7864320 Bytes. Riversource once found that out. It's also in the BoardConfig.mk So we would have enough space for including busybox. But you're right, it would only lead to 2 busyboxes on the device which is not the best idea.
CM uses the BFQ scheduler as far as I know so yeah, we should give it a try
AFAIK, BFS patch nearly fully removes original kernel schedulers, so some work of comparing with original Linux kernel will be needed to do. Although, it may not be true for Android kernel sources or my experience may be wrong, so we should just try it as is before continuing.
Sent from my GT-I9001 using XDA App
YardE said:
AFAIK, BFS patch nearly fully removes original kernel schedulers, so some work of comparing with original Linux kernel will be needed to do. Although, it may not be true for Android kernel sources or my experience may be wrong, so we should just try it as is before continuing.
Sent from my GT-I9001 using XDA App
Click to expand...
Click to collapse
yep, I've looked at the changes the patches make and they remove alot of the CFQ related functions. Fortunately the makefile is patched as well so no work here.
I've have downloaded the patches for kernel 2.6.35 here:
http://algo.ing.unimo.it/people/paolo/disk_sched/sources.php
I applied them to my sources, compiled em and flashed my FeaMod pack with the new kernel and your changes to the boot ramdisk.
So far everything is working on my device I'm gonna upload the patches to github.
Edit: Had to change the .config as well since bfq is not the default I/O scheduler. It is now, I've also activated the hierarchical scheduler support.
Concerning ramdisk git repo: maybe we should move all the code into some folder, for example, "ramdisk", and move README out from there to avoid it being placed into final image? Also, we should point which files are missing from ramdisk in README.
First custom kernel for Defy Mini XT320/XT321 is here!
Featured on XDA Portal: http://www.xda-developers.com/android/first-custom-kernel-for-the-motorola-defy-mini-mini-xt320xt32/
@MauroSZ @Bernd.Defy @junk031
Despite us having a locked bootloader, we can boot a custom kernel via fastboot.
Technical Details:
Fastboot is stored as a secondary bootloader in Defy Mini. On older firmwares, the secondary bootloader had fastboot enabled but newer firmwares don't. This is why Motorola left a vulnerability in fastboot which allowed us to fastboot boot img files.
Kernel Source: https://github.com/rootdefyxt320/android_kernel_motorola_tinboost
This kernel is made for Defy Mini stock ROM's.
Details:
Linux Kernel version 2.6.38.6
Features:
-Swap
-Insecure
To Do:
-Add overclock
-Add custom governors
Limitations:
-You must use fastboot everytime you want to boot a custom kernel so it requires a computer.
Instructions:
1. Download boot.img from attachments
2. Download modules.zip from attachments.
3. Make sure you have CWM Recovery, if not download it from Post #41
4. Now boot into CWM Recovery using the batch script or typing the command in cmd
Code:
fastboot boot name-of-recovery.img
4. Now type these commands in cmd:
Code:
adb shell mount -a
Code:
adb push modules.zip /sdcard
Code:
adb shell
Code:
cd /system/lib/modules
Code:
busybox unzip /sdcard/modules.zip
Then it will ask you to overwrite the files, press A on the keyboard.
Now type the next commands in cmd:
Code:
cd /system/lib
Code:
chmod 755 modules/*
Code:
exit
Code:
adb reboot-bootloader
Code:
fastboot boot boot.img
Updated to v2 in Post 8: http://forum.xda-developers.com/showpost.php?p=51104120&postcount=8
Same installation instructions as v1.
Lol, I compiled one for XT530 with OC and undervolt, but never released as thought it would be tough to boot it everytime
Well, nice start. I'm currently working on kexec, would possibly release it when kexec would be ready.
rootdefyxt320 said:
Limitations:
-You must use fastboot everytime you want to boot a custom kernel so it requires a computer.
Click to expand...
Click to collapse
it's possible make it permanent?
sfoot13 said:
it's possible make it permanent?
Click to expand...
Click to collapse
Locked bootloader prevents this. Until I can conpile kexec, I can make it permanent.
rootdefyxt320 said:
Locked bootloader prevents this. Until I can conpile kexec, I can make it permanent.
Click to expand...
Click to collapse
You're a genius! i hope you can have success with the kexec!
You know if swap will make any difference in the performance?
sfoot13 said:
You're a genius! i hope you can have success with the kexec!
You know if swap will make any difference in the performance?
Click to expand...
Click to collapse
I built an 800MHz overclock kernel but beware you can burn your NAND but we can now use @cute_prince method to have a 878 MHz PLL2 overclock without burning NAND It's not modded numbers
rootdefyxt320 said:
I built an 800MHz overclock kernel but beware you can burn your NAND but we can now use @cute_prince method to have a 878 MHz PLL2 overclock without burning NAND It's not modded numbers
Click to expand...
Click to collapse
are you working on it? (878 MHZ overclocking)... thanks for your work bro! :good:
sfoot13 said:
are you working on it? (878 MHZ overclocking)... thanks for your work bro! :good:
Click to expand...
Click to collapse
Hey, I managed to improve the performance of the kernel also by using LZMA compression instead of GZIP, switching to SLUB allocator and deadline I/O scheduler and overclock also.
Kernel v2 Update:
-Uses LZMA compression
-Enabled OTG Support
-Switched to SLUB Allocator
-Added Deadline I/O Scheduler
-Default VDD=7 for better overclocking with Bernd.Defy's overclock module.
-Enable zRAM.
You must install the new modules otherwise device will bootloop!
Thank you so much! OTG support *-* is a great gift!
bro, can you do it permanent? is something uncomfortable always connect the phone to pc, anyway thanks for your work!
sfoot13 said:
Thank you so much! OTG support *-* is a great gift!
bro, can you do it permanent? is something uncomfortable always connect the phone to pc, anyway thanks for your work!
Click to expand...
Click to collapse
I'm busy studying for exams these days. Kexec requires a lot of hard work before we can even boot the kexec custom kernel. Remember, I'm just a 16 year old dev, so got to have priorities in school work first
rootdefyxt320 said:
I'm busy studying for exams these days. Kexec requires a lot of hard work before we can even boot the kexec custom kernel. Remember, I'm just a 16 year old dev, so got to have priorities in school work first
Click to expand...
Click to collapse
Oh sorry, i don't knew! 16 years old dev.? really? you're doing a great work :good:
Well, success on your studies! God bless u
sfoot13 said:
Oh sorry, i don't knew! 16 years old dev.? really? you're doing a great work :good:
Well, success on your studies! God bless u
Click to expand...
Click to collapse
Is USB OTG working for you? Please test it as I don't have any USB OTG equipment and give me feedback on the performance of the kernel
rootdefyxt320 said:
Is USB OTG working for you? Please test it as I don't have any USB OTG equipment and give me feedback on the performance of the kernel
Click to expand...
Click to collapse
i need search my OTG cable, i don't know where is... about the overclock.. it's possible increase it?
sfoot13 said:
i need search my OTG cable, i don't know where is... about the overclock.. it's possible increase it?
Click to expand...
Click to collapse
Use Bernd.Defy's overclock module for now. I have overclocked my Defy Mini to 720MHz using his overclock module.
Go to the thread:http://forum.xda-developers.com/showthread.php?t=2210799
Then extract the defymini_oc.ko out of the zip folder.
Then use adb to push the file:
Code:
adb push defymini_oc.ko /system/lib/modules
Then use these commands in cmd:
Code:
adb shell
Code:
su
Code:
busybox insmod /system/lib/modules/defymini_oc.ko pll2_l_val=75 acpu_freq_tbl_addr=0xc0775b5c cpufreq_stats_tbl_addr=0xc07a971c
rootdefyxt320 said:
Use Bernd.Defy's overclock module for now. I have overclocked my Defy Mini to 720MHz using his overclock module.
Click to expand...
Click to collapse
me only 700MHZ, 720 reboot my phone, i'm using smartassV2 and I/O deadline and the performance is good, a bit better than noop (I/O) and smartassv2 together
Framework-res, Phone and SystemUI modded!
Hi, i edited the framework.res.apk, Phone.apk and SystemUI.apk, i just changed some icons and images, and the color of divisors
Just download the zip files and put it on your SD, boot into CWM recovery, select install update.zip and install the modded files
Make sure you have a backup of your original files.
rootdefyxt320 said:
Is USB OTG working for you? Please test it as I don't have any USB OTG equipment and give me feedback on the performance of the kernel
Click to expand...
Click to collapse
OTG not working, and with the new modules (V2), i have a WIFI "error" using the stock kernel, but i fixed it with the first version of your modules.
sfoot13 said:
OTG not working, and with the new modules (V2), i have a WIFI "error" using the stock kernel, but i fixed it with the first version of your modules.
Click to expand...
Click to collapse
The V2 modules are for the V2 custom kernel as there is substantial changes to the features. The new modules are made for SLUB Allocator instead of the SLAB allocator in the stock kernel. Try using an app to see if OTG is present.
sorry i am geting unzip write: no space left on device ,
i have no experience in this, please help
feline2611 said:
sorry i am geting unzip write: no space left on device ,
i have no experience in this, please help
Click to expand...
Click to collapse
You will have to delete stuff in /system.
I don't believe I have seen this on the G7 forums so I figured I would make a quick guide for anyone whom is unfamiliar with the subject. RCTD is LGs Root Checking Tool that is triggered when the bootloader is unlocked as well as when BusyBox is installed, and is known to drastically affect the performance of the device after root. This is primarily seen in the V30 forums, but I assume it affects the performance of the G7 as well. There are tools to remove it as well as a script by John Fawkes, however from what I could tell, neither of them applied to the G7. It's a pretty simple process I recommend using root explorer and Zacaree1's Root Activity Launcher(play store). There are other ways to get to the hidden menu but if you have deleted the stock dialer or have any other issues, this app will always get you there and it has a massive amount of other great uses as well and I believe any root user should have it installed.
Step 1: Open Root Explorer and head to Product/Priv-app/SRTC and delete the app. This won't stop the process from starting however because LG uses an init.d script to run the tool at boot, leading to step 2.
Step 2: Head to System/Etc/Init and find
"lge.system.services.rc" long press on it to open it with text editor (if using Root Explorer) and scroll down until you see #RCT (Root Checking Tool). Under this line you will see a list of 3 or 4 commands. To stop them from running we want to put a # in front of each and save our changes. Example:
#service rctd /sbin/rctd
# class late_start
# user root
# group root
# seclabel u:r:rctd:s0
Now we've stopped the tool from running at start up, but it will still have the last time root was detected stored in the system. First, reboot to be sure that the edit survived a restart, and if it did then head to step 3.
Step 3: Head to Mnt/Vendor/Persist-LG/RTC and delete the file inside the RTC folder. If you delete the entire RTC folder, it will be recreated at reboot so it's pointless. Save and Reboot.
Step 4: Open the Root Activity Launcher app and type "Hidden" in the search box. This will lead you to the hidden menu activity (not operator hidden menu), so click on it to expand the list. Scroll down pretty far until you see "com.lge.hiddenmenu.HiddenMenu." You can click the icon that looks like a paperclip and it will pin the shortcut to your hidden menu to your home screen if you'd like, otherwise just click on the main line to open the Hidden menu, click SVC Mode and find LG RCT. If you did everything correctly, once you click LG RCT it should show Status-disabled. It will stay disabled regardless of a reboot. Other models like the V30 need additional init.d commands to be disabled. The G7 has these same init.d scripts, but for whatever reason we only needed to stop one of them. Done!
Attachments wouldn't load
Ty mate!!!
One question, i can do all these steps with magisk on stock? Would be reverted the changes at reboot?
---------- Post added at 02:04 AM ---------- Previous post was at 01:39 AM ----------
Bro, in the step 3, i cant find any path called "vendor" under the main path "Mnt", only a 0.00bit file called vendor
it did not work, step 4... status enable
manuhuelva said:
Ty mate!!!
One question, i can do all these steps with magisk on stock? Would be reverted the changes at reboot?
---------- Post added at 02:04 AM ---------- Previous post was at 01:39 AM ----------
Bro, in the step 3, i cant find any path called "vendor" under the main path "Mnt", only a 0.00bit file called vendor
Click to expand...
Click to collapse
You should be able to. I'm still stock, ULM20e Pie. What file manager are you using? That's strange that you can't to your vendor file. Is vendor accessible to you in TWRP?
Stvn77 said:
it did not work, step 4... status enable
Click to expand...
Click to collapse
Hmmm....can you check the Persist-lg folder and see if the file inside showed back up?
Yeedatoy said:
Hmmm....can you check the Persist-lg folder and see if the file inside showed back up?
Click to expand...
Click to collapse
following the path u post, i cant find, bc persist-lg is under vendor, and i cant find vendor
Delete
When you open up your file explorer, did you click the mount R/W button?
Yeedatoy said:
When you open up your file explorer, did you click the mount R/W button?
Click to expand...
Click to collapse
See this bro
https://youtu.be/5Tj5iCnkrj0
---------- Post added at 04:24 PM ---------- Previous post was at 04:23 PM ----------
Ive done steps 1 and 2. Could not do 3
what's the point for the lg guys for slowing down the system if you have root?
and, the service is rct and after you have to look for rtc? they mess up the letters for what? something is strange
Yeedatoy said:
Hmmm....can you check the Persist-lg folder and see if the file inside showed back up?
Click to expand...
Click to collapse
yes. it showed back up
I've followed this guide on my v35 and i confirm it's working just fine!
Thanks!
Stvn77 said:
yes. it showed back up
Click to expand...
Click to collapse
Since None of my photos will load, check this post in the v40 threads to make sure your init.d script was edited with correctly.
https://forum.xda-developers.com/lg-v40/help/rctd-affects-devices-t3945207
cloud1250000 said:
I've followed this guide on my v35 and i confirm it's working just fine!
Thanks!
Click to expand...
Click to collapse
Awesome! I was getting a bit concerned for a moment while trying to think of why it hasn't worked for the others yet. Do you have LDB removed as well? I removed it so long ago that I forgot about it until I came across it in the V40 threads. I don't think it could interfere with this process, but I am trying to rule out anything that may be an issue for the others.
manuhuelva said:
See this bro
https://youtu.be/5Tj5iCnkrj0
---------- Post added at 04:24 PM ---------- Previous post was at 04:23 PM ----------
Ive done steps 1 and 2. Could not do 3
Click to expand...
Click to collapse
https://photos.app.goo.gl/zgYxBS7uWJoAkGFm8
Yeedatoy said:
https://photos.app.goo.gl/zgYxBS7uWJoAkGFm8
Click to expand...
Click to collapse
bro, finally fixed, was the custom kernel, was no installed.
I fixed manually the 1.7 kernel !!!!!
Now reach 825mhz on gpu and have spectrum bro!!
if u want i can tell u how.
manuhuelva said:
bro, finally fixed, was the custom kernel, was no installed.
I fixed manually the 1.7 kernel !!!!!
Now reach 825mhz on gpu and have spectrum bro!!
if u want i can tell u how.
Click to expand...
Click to collapse
Tell me how? Please.
How to Fix
slyxo said:
Tell me how? Please.
Click to expand...
Click to collapse
steps:
1-Open ur bootloader
2-root and install magisk
3-flash xD-Kernel 1.7-Stock from drive folder (other stock folder) in TWRP and reboot to system https://drive.google.com/file/d/1MEFt7Ma2DOw8h7d_HjfyLN64Hnqz2bOo/view?usp=sharing credits to @Smart Ru
4a-poweroff
4b-go Qfil and extract ur boot_a or boot_b partition
5-extract Android image kitchen folder and put ur boot.img inside. https://forum.xda-developers.com/attachment.php?attachmentid=5024495&d=1590190159 credits to @osm0sis
6-run unpack script
7-paste the files i provided inside ramdisk folder and replace it https://drive.google.com/file/d/1HTT-0nm-y6tib_T1VQrws0EMreWia_Us/view?usp=sharing
8-go back and run repack script
9-pick the new image file and flash it on boot_a and boot_b by fastboot or qfil
10-dont care about error message at startup of android, it appears anyways with xd-kernel-1.7-stock kernel without modifications on every boot. It appears due to kernel kills dummy lg process from startup (2.0.2-custom doesnot)
11-download spectrum.
12-done.
Ive edited the profiles too for be more accurate to profile name:
-Balanced:
Governor "blu_schedutil" (is a light schedutil with powersaving on sleep mode, perfect for everyday use)
I/O "cfq" (most balanced I/O for everyday use)
Max/min Cpu.freq = 2.8ghz/800mhz (gold) 1.7ghz/300mhz (silver)
Max/min gpu.freq = 710mhz/160mhz (710mhz is stock top speed)
-Performance:
Governor "Performance" (cpu will run at full speed all the time, just pick it only for run benchmarks or for do selective heavy task u need, will consume battery fast)
I/O "deadline" (best for gaming-benchmarks)
Max/min Cpu.freq = 2.8ghz/1.05ghz (gold) 1.7ghz/748mhz (silver)
Max/min gpu.freq = 780mhz/160mhz
-Battery:
Governor "Powersave" (cpu will run at low speed most time, a really battery saving profile, u will have a little ui lag, but it gives u true promised battery saving)
I/O "SioPlus" (best battery saving I/O available in kernel)
Max/min Cpu.freq = 1.68ghz/825mhz (gold) 1.51ghz/300mhz (silver)
Max/min gpu.freq = 160mhz/160mhz
-Gaming:
Governor "Pixutil" (A port of official Pixel 3 Schedutil governor, awesome performance without stay full 2.8ghz all time, perfect for gaming ^^)
I/O "deadline" (best for gaming-benchmarks)
Max/min Cpu.freq = 2.8ghz/1.05ghz (gold) 1.7ghz/300mhz (silver)
Max/min gpu.freq = 825mhz/160mhz (highest gpu freq profile for more fps)
Yeah, I always get " there is an internal problem with your device" message on startup. That's normal. Spectrum never worked on 1.7 for me and neither did Klapse, but 2.0 fixed that for me.