[KERNEL][CWM] TerraSilent 1.3.5 for Galaxy 4.0 (YP-G1) INTL & USA (22/06/2012)

Search This thread

Dark_Balor

Senior Member
Oct 22, 2008
94
62
Version 1.3.5
  • [RECOVERY] Optimization of the recovery with better use of the busybox
  • [RECOVERY] Can save the /dbdata partition in nandroid
  • [USA] Added VOODOO FM

Well sorry for the /data partition, I don't know why, but it's stuck at RFS. I format it, I tried everything, everytime you relaunch the recovery and try to mount the partition, it mount it as RFS and wipe it out.

I advice you to let it as RFS or, change it to ext4 when you are sure you won't need to do further change in it from the recovery.
 
Last edited:

klin1344

Senior Member
Nov 11, 2011
3,486
5,611
Version 1.3.5
  • [RECOVERY] Optimization of the recovery with better use of the busybox
  • [RECOVERY] Can save the /dbdata partition in nandroid
  • [USA] Added VOODOO FM

Well sorry for the /data partition, I don't know why, but it's stuck at RFS. I format it, I tried everything, everytime you relaunch the recovery and try to mount the partition, it mount it as RFS and wipe it out.

I advice you to let it as RFS or, change it to ext4 when you are sure you won't need to do further change in it from the recovery.

I think it's the way recovery was compiled from the cm7 source that's causing the issues. I will compile a kernel with the old cwm 3.0.0.5 and see if the issues are still present.

Sent using Tapatalk
 

Dark_Balor

Senior Member
Oct 22, 2008
94
62
I think it's the way recovery was compiled from the cm7 source that's causing the issues. I will compile a kernel with the old cwm 3.0.0.5 and see if the issues are still present.

Sent using Tapatalk

It what I thought too ... then I used my own compilation of busybox, and used it to mount manually (like in the init.rc) the filesystem. I had still the bug ...

You can check by yourself :
1) Launch the recovery
2) wait some second for adb to launch
3) adb shell
4) busybox | head
5) You'll see : busybox version 1.20.1
6) busybox mount ext4 /dev/block/mmcblk0p2 /data nosuid nodev barrier=0 data=ordered noatime

What I don't understand ... since the init.rc should be using the mount command of /sbin ... why in the init.rc it's working and not in the recovery
 
  • Like
Reactions: natkingcole

klin1344

Senior Member
Nov 11, 2011
3,486
5,611
It what I thought too ... then I used my own compilation of busybox, and used it to mount manually (like in the init.rc) the filesystem. I had still the bug ...

You can check by yourself :
1) Launch the recovery
2) wait some second for adb to launch
3) adb shell
4) busybox | head
5) You'll see : busybox version 1.20.1
6) busybox mount ext4 /dev/block/mmcblk0p2 /data nosuid nodev barrier=0 data=ordered noatime

What I don't understand ... since the init.rc should be using the mount command of /sbin ... why in the init.rc it's working and not in the recovery

I've spent most of the day today trying to fix this issue. I tried everything, but nothing seems to work. With CWM 3.0.0.5, I got it to automatically backup, format, and restore to EXT4 on all RFS partitions, but when I reboot recovery /data once again gets formatted to RFS.
I think that the only way to fix this issue is to compile CWM directly from the CM7 source. I think that StevES used the precompiled recovery binary and other things from another kernel, so that's why it isn't as integrated.
We should use tdmcode's device tree and make a proper and clean CWM integration. I managed to get it working today, except that the capacitive buttons are all mixed up and I get the "unable to mount /cache/recovery/command" errors.
 

zamuz27

Senior Member
Nov 6, 2011
118
21
Nexus 9
Xiaomi Mi A1
I really want to try some of the custom ROMs and kernels for my 4.0 INTL, but first I'd like to know how to back up my device's stock kernel in case something goes wrong. The only thing I've done to it was flash the rooted G1XXKPQ ROM from the recovery thread, and as I understand, the kernel wasn't touched in the process.

So before I try this kernel, which sounds amazing, I want to make sure I have my current kernel backed up and that I can go back to it in case I need to. How can I do that? Any help will be greatly appreciated!
 
Last edited:

daniel644

Senior Member
Feb 29, 2012
879
293
I really want to try some of the custom ROMs and kernels for my 4.0 INTL, but first I'd like to know how to back up my device's stock kernel in case something goes wrong. The only thing I've done to it was flash the rooted G1XXKPQ ROM from the recovery thread, and as I understand, the kernel wasn't touched in the process.

So before I try this kernel, which sounds amazing, I want to make sure I have my current kernel backed up and that I can go back to it in case I need to. How can I do that? Any help will be greatly appreciated!

the links from here should include the kernel http://xdaforums.com/showthread.php?t=1531850 I know it does for the US version anyway.
 

zamuz27

Senior Member
Nov 6, 2011
118
21
Nexus 9
Xiaomi Mi A1
the links from here should include the kernel http://xdaforums.com/showthread.php?t=1531850 I know it does for the US version anyway.

Actually that's where I got the rooted G1XXKPQ ROM I'm currently on. So am I set with that? Meaning, if for example I have some kind of trouble with the TerraSilent kernel I could just flash G1XXPQ again and be back to the stock kernel? Can someone else confirm this for the INTL version? Thanks!
 
Last edited:

daniel644

Senior Member
Feb 29, 2012
879
293
Actually that's where I got the rooted G1XXKPQ ROM I'm currently on. So am I set with that? Meaning, if for example I have some kind of trouble with the TerraSilent kernel I could just flash G1XXPQ again and be back to the stock kernel? Can someone else confirm this for the INTL version? Thanks!

Just downloaded it (G1XXKPQ) and used winrar to "rip" it open and it has the zimage file in it, so yes it contains the stock kernel, For future reference if you ever look inside a .tar and see the file zimage then it has a kernel in the .tar
 
  • Like
Reactions: zamuz27

hanthesolo

Senior Member
Jan 23, 2012
1,042
567
I have another bug report:rolleyes:. I have figured out that you can flash cwm zips when the filesystem is rfs, but not if it is ext4. It reports success, but it obviously never copies over the files as it reboots into the same rom. This happened with all cwm 5xx recoveries, so it's not just your kernel.
 
Last edited:

klin1344

Senior Member
Nov 11, 2011
3,486
5,611
I have another bug report:rolleyes:. I have figured out that you can flash cwm zips when the filesystem is rfs, but not if it is ext4. It reports success, but it obviously never copies over the files as it reboots into the same rom. This happened with all cwm 5xx recoveries, so it's not just your kernel.

Try mounting /system manually before flashing the zip. I think with the kitchen if you make a rom for the yp-g1 since it's not a known device the updater-script is set to mount mtd before flashing. Well, of course stock roms are not using mtd.
Just edit the updater script or manually mount /system and you should be fine.

Sent using Tapatalk
 

hanthesolo

Senior Member
Jan 23, 2012
1,042
567
Try mounting /system manually before flashing the zip. I think with the kitchen if you make a rom for the yp-g1 since it's not a known device the updater-script is set to mount mtd before flashing. Well, of course stock roms are not using mtd.
Just edit the updater script or manually mount /system and you should be fine.

Sent using Tapatalk

I have done all of that and it still persists. I suppose I should have included that in my bug report:).
 

hanthesolo

Senior Member
Jan 23, 2012
1,042
567
Are you still working on this dark_balor? It would really be a shame to lose our only GB kernel dev, especially after everything you've done.

Okay, okay, yes this is a bump, but this deserves to stay on the front page, so that new 4.0 users can see and flash it.
 

Dark_Balor

Senior Member
Oct 22, 2008
94
62
Are you still working on this dark_balor? It would really be a shame to lose our only GB kernel dev, especially after everything you've done.

Okay, okay, yes this is a bump, but this deserves to stay on the front page, so that new 4.0 users can see and flash it.

I don't see how I can improve it. I mean the CWM bug with ext4 should be only corrected if I look the code (or take a newer version) and add it to the kernel.

Problem is, I found the code on github, but no instruction on how to compile it ....

And for backporting 3.0 Kernel to our device, we need a real kernel dev, one that know exactly what that have been changed since the 2.6.35 to be able to port the samsung drivers without causing any damage to our device (or even HARD brick ...)
 

hanthesolo

Senior Member
Jan 23, 2012
1,042
567
I don't see how I can improve it. I mean the CWM bug with ext4 should be only corrected if I look the code (or take a newer version) and add it to the kernel.

Problem is, I found the code on github, but no instruction on how to compile it ....

And for backporting 3.0 Kernel to our device, we need a real kernel dev, one that know exactly what that have been changed since the 2.6.35 to be able to port the samsung drivers without causing any damage to our device (or even HARD brick ...)

Ah well, there is always new things you cana implement into a kernel, fast charging, thermal limiter, etc., you just have to put your mind to it, and there is a ton out there! I wish I could help you with your cwm issues, but I don't know about kernels. Have you tried rebuilding cwm from scratch/from other sources. Perhaps you could try using cwm 6xx?
 

the playa!

Senior Member
Mar 18, 2012
1,351
140
Somerset
Apps not opening :/

Hi guys,

I'm new at this flashing stuff, but I eventually flashed the kernel successfully. There's one problem though, I can't seem to open any application, even Google Play. The applications show the android sign on it along with a sign showing the SD card. When I try opening the applications, it says "Application is not installed on your phone."
Is there any way to fix it?
 

S_m_O_k

Senior Member
Apr 27, 2012
78
40
The problem is that if the data in the ext4 partition, and if you go to a recovery in the data \ app application removed. Possible to fix it?
Maybe look kernel Tegrak 39 for YP-GB1 there are no problems with ext4.
 

da1writer

Senior Member
Sep 2, 2012
69
19
Which CWM is being used here? Couldn't we try an alternative like the touch version? Doesn't it have a more streamlined interface but also bug fixes (EXT4)? I guess it's something to think about, i'm merely suggesting it only because Dark_Balor said he doesn't know how much more he could improve besides trying to implement 3.0.
Speaking of which, 3.0 has some great dev work progress on the SGP 5.0, especially when it comes to patches. Do you guys think they might be of some help?
 
Last edited:

iJimaniac

Senior Member
Oct 19, 2011
1,365
418
Hmm, I saw an article about the 3.4 android kernal, and while I have no idea what anything means, it seams to have some good changes. I think maybe that would be better than trying to get 3.0?

Sent using Tapatalk
 

da1writer

Senior Member
Sep 2, 2012
69
19
Hmm, I saw an article about the 3.4 android kernal, and while I have no idea what anything means, it seams to have some good changes. I think maybe that would be better than trying to get 3.0?

Sent using Tapatalk

This was my thoughts exactly as well, maybe just try the 3.4 kernalf the 3.0 is being so "troubling" ... unless you guys already figured it out and just trying tests...
 

Top Liked Posts

  • There are no posts matching your filters.
  • 34
    TerraSilent 1.3.5
    logontj.jpg

    After a lot of testing I can release it

    Well sorry for the /data partition, I don't know why, but it's stuck at RFS. I format it, I tried everything, everytime you relaunch the recovery and try to mount the partition, it mount it as RFS and wipe it out.

    I advice you to let it as RFS or, change it to ext4 when you are sure you won't need to do further change in it from the recovery.

    THIS IS ONLY FOR THE INTL AND USA VERSION OF THE GALAXY PLAYER 4.0 (YP-G1).

    The kernel is based on the R3 version of Klin1344.

    Current features :
    • All features of R3 of Klin Kernel (see below)
    • Battery life improvement using the patch of Entropy512
    • Jhash3
    • Optimized CFS (process scheduler)
    • A lot of memory tweak
    • TinyRCU
    • New Governor created for the kernel (based on smartassV2) : TerraSilent (I recommend you to use it)
    • CleanCache (using zCache) (see below for explanation)
    • zRam (see below for explanation)
    • Updated crc32 algorithm (that is quite used everywhere in the kernel)
    • Using optimized Sha1 algorithm
    • Lzma compressed initramfs
    • Swap enabled
    • New Boot logo (same image (but bigger) as the one in the begin of the Thread)
    Feature Coming from based kernel :
    • V(R), BFQ, SIO Scheduler
    • OC to 1.2GHz
    • ClockWorkMod (recovery)
    • interactiveX, smartassV2, ondemandX, and the default governors.
    • Netarchy/coolbho3ks SoD patch from Entropy512's source (allows you to use screen off profiles of under 800Mhz)
    • Ext4 support
    • Voodoo Sound
    • etc ... see http://xdaforums.com/showthread.php?t=1601773

    Changelog
    Version 1.3.5
    • [RECOVERY] Optimization of the recovery with better use of the busybox
    • [RECOVERY] Can save the /dbdata partition in nandroid
    • [USA] Added VOODOO FM
    Version 1.3
    • [CHANGE] Zram built-in not a module anymore
    • [BUSYBOX] Updated busybox to last version 1.20.1 meaning any init.d script will be launched with that version.
    Version 1.2

    • [MAJOR BUG FIX]Corrected a bug with the recovery that wasn't able to mount correctly the /data partition, it was leading to a complete wipe of data when applying ZIP that needed that partition to be mounted
    • [OPTIMIZATION]Using LZO Compression for ZRam also, after some test, I discover that Snappy compression is not really optimized on our device.
    Feature Explanation :

    faux123 said:
    CleanCache (via ZCache backend)

    ZCACHE is a new technology I introduced to Sensation Kernel. ZCACHE is a compressed cache similar to ZRAM but the similarity ends there. ZCache is meant to provide as many "cleancache" pages (non-dirty or untouched "virgin" memory) to apps that request for new memory. CleanCache is very easy to allocate and no additional penalty are required to hand them out, so having more CleanCache pages will improve performance. Under heavy memory pressure, often times the kernel will NOT have enough CleanCache pages, so the kernel has to do EXTRA work to reclaim dirty cache pages and clean them for the new apps that's requesting for them. The described process creates a performance hit for the kernel and the app, so the idea is to use compression to create more CleanCache pages available for use. Of course there's a penalty to pay for using compression, but the trade-off between compression penalty and the penalty for reclaiming dirty cache pages and allocating them after cleaning is smaller for compression, so in the end, CleanCache should add more performance.

    Source : http://xdaforums.com/showthread.php?t=1359951

    faux123 said:
    ZRAM (aka CompCache aka RAMZSwap)

    ZRAM is an updated version formally known as CompCache and RAMZSwap. It was originally designed for 2.6.38.xx kernels, I have backported to our 2.6.35.xx kernel. ZRAM allows real-time compression of memory objects in RAM thus reducing memory pressure for the Linux kernel and can keep more apps in memory longer (more apps in RAM == better performance, less fetching from slower MMC or SDCard). Compression, however, is not Free. Some CPU cycles are required to do the compress/decompression, so there's a slight penalty for it. The original CompCache / RAMZSwap required a user space binary to control its behavior which adds additional penalty to performance, but the new version ZRAM eliminated the need for a separate dedicated daemon, thus reducing the overhead and increased performance from the old CompCache by 20%. Therefore, with the newer implementation of ZRAM interface, the performance penalty is almost negligible.

    Source : http://xdaforums.com/showthread.php?t=1359951

    Dark_Balor said:
    TerraSilent Governor

    TerraSilent is completely based on the SmartAssV2 kernel with some improvement for the battery. When you are putting your device on sleeping/suspend, it's changing the frequency to 100Mz (if you set a minimum higher then that, it will be used instead) to avoid using too much battery when not needed, you can still listen to music without any lag. (if you experience some lag just change the minimum to 200Mhz).
    It also less aggressive on ramp up the frequency, instead of always trying to reach the ideal frequency (400Mhz by default, I'll explain for tweaker all they can change if they want) it will try under frequency first (200Mhz if you were at 100Mhz before). Meaning using less battery.
    By default when the load >= 85%, it will ramp up the frequency and if its lower than 35, ramp down it to an new frequency calculated using the current load.

    How to tweak/activate special features
    By default zCache and zRam are disabled because they can be unstable depending on the device.
    By example, I don't have problem with zCache but with zRam yes, and Klin the exact opposite. The better is to try for your device and then choose which one you want, the 2 or none.

    zCache :
    To activate zCache, you only need to put a script in your init.d directory (in etc) or using ScriptManager to launch that line on boot :
    Code:
    insmod /lib/modules/zcache.ko

    zRam:
    To activate zRam, you only need to put a script in your init.d directory (in etc) or using ScriptManager to launch theses lines on boot :
    Code:
    mkswap /dev/block/zram0
    swapon /dev/block/zram0

    Changing by script the governator to TerraSilent
    if you don't want to use (but I recommend noFrill Cpu to do that) an application to change the governator, you just need to do :
    Code:
     echo terrasilent > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

    Tweaking TerraSilent
    in /sys/devices/system/cpu/cpufreq/terrasilent you'll find these files :
    Code:
    debug_mask            --> for debug (possible value 0(disabled),1,2,4)
    up_rate_us             --> µs to wait before ramp up
    down_rate_us         --> µs to wait before ramp down
    sleep_ideal_freq      --> Freq used when sleeping/suspend
    sleep_wakeup_freq  --> Freq use when waking up
    awake_ideal_freq    --> Freq ideal for daily usage
    sample_rate_jiffies  --> DON'T TOUCH UNLESS YOU KNOW WHAT YOU ARE DOING
    ramp_up_step        --> step used when ramp up in Hz (to calcule the new frequency) (0 = maximum freq will be used when ramp up)
    ramp_down_step    --> step used when ramp down in Hz (to calcule the new frequency) (0 = using heuristic to found the best new lowered freq)
    max_cpu_load        --> max load that trigger the freq change for ramp up
    min_cpu_load         --> min load that trigger the freq change for ramp down
    Where you can put your own values. (You have to do that after every boot, the best is to create a script that change the governor to TerraSilent, and set the wanted values)

    FAQ

    How to create a script
    With ScriptManager it's easy, just push the menu button -> New -> Script
    Put the script lines you want
    Menu -> save
    That's done

    Manually : create a file name my-script.sh
    put as first line :
    Code:
    #! /system/bin/sh
    and then what you want your script to do.
    Don't forget to do a
    Code:
    chmod +x my-script.sh
    to make it executable.
    Download (ODIN PACKAGES) :
    http://www.mediafire.com/?cf9aw48dnmiqi

    Source Code
    Kernel : https://github.com/Belphemur/Galaxy-Player-4.0-Kernel
    Initramfs : https://github.com/Belphemur/initramfs_yp-g1

    If you love my work, don't hesitate to click the thanks button :)

    Thanks to
    Steve for the first modded kernel of our device
    Klin1344 for continuing, improving the work of Steves and testing my kernel for the USA version.
    Entropy512 for the battery patch, and a lot of other tweak
    Faux123 for all the patch he have backported to the 2.6.35 kernel (zCache, zRam, etc ...)
    5
    Version 1.3
    • [BUG FIX] Should have corrected the bug with the /data corruption in recovery when in ext4 (but be careful)
    • [CHANGE] Zram built-in not a module anymore
    • [BUSYBOX] Updated busybox to last version 1.20.1 meaning any init.d script will be launched with that version.
    5
    Version 1.2

    [MAJOR BUG FIX]Corrected a bug with the recovery that wasn't able to mount correctly the /data partition, it was leading to a complete wipe of data when applying ZIP that needed that partition to be mounted

    [OPTIMIZATION]Using LZO Compression for ZRam also, after some test, I discover that Snappy compression is not really optimized on our device.
    2
    Someone else recommended Terrasilent over Steven's, but I'm just worried about performance issues from using Terrasilent after reading some posts about it. Why would you recommend Klin's R3 kernel over Terrasilent specifically? I notice in your sig you have the SGP 4.0 and are using CM11. Are there any side effects or issues that come with flashing that on the YP-G1 you've noticed? for instance, in the first post on the CM11 thread, there is a warning that the alarm may not work...I definitely need the alarm to work. have you noticed stuff like this? Any common problems I should watch out for if I flash it? Also, being a noob, I'm unsure if I need to flash a kernel with CM11 or if CM11 includes a kernel with it. Thanks for any advice and help again.

    I recommend the two I mentioned over Terasilent because they both don't have that weird wiping bug. In regards to performance all performed about the same in my opinion.

    CM 11 at first had some slight problems but Zaclimon completely ironed all of them out. I just checked and the alarm works just fine. With flashing all you need is to have is the clockworkmod recovery installed. Before installing backup your current ROM using CWM and follow the instructions Zaclimon wrote. I don't think there's any problems to look out for anymore as he pretty much streamlined the process. Before you flash do you have the Galaxy Player 4.0 or Galaxy S Player 4.0 (it has the physical home button)
    1
    THanks for your hard work in this kernel. You certainly know more about linux kernels than me. :D

    But for some reason now enabling zram causes crashing and reboots but zcache does not. Oh well, at least one of them works!