yashsingh1/xdaforums huggingface dataset:
[Galaxy Ace II Android Development] ChronoMonochrome:
Weird, I'll need to check it myself then.
[Galaxy Ace II Android Development] Dr360r:
By the way, the command line worked because after rebooting i no longer find the ramdisk folder in /root.

EDIT: it's wrong. Even after writing the command line again, it's still not there.

Even 4.4.1 won't work if installed through CWM 6.0.5.0
[Galaxy Ace II Android Development] ChronoMonochrome:
Uploaded a new build, should install normally. In the case it doesn't, please first flash chrono kernel r2.22.6 (can be found in a folder "old_versions") before installing latest r4.4.1 release.
[Galaxy Ace II Android Development] Dr360r:
Ok, everything works now, with no need to install 2.22.6
[Galaxy Ace II Android Development] shaqman89:
[MENTION=5695278]ChronoMonochrome[/MENTION]

Version 4.4 installs fine from philz recovery. And from a quick run, it seems everything is fine (WiFi works) . :)

Also, I seem can't able to find 4.4.1, is it removed somehow?

Some things I am curious about:

1. Cache is resized when installation and made to be 3mb. Let's say if I had bigger cache partition before, wouldn't that mean that now I have unused storage in my partition layout?

Going from that, wouldn't it be better to prepare a repartition ourself beforehand?

2. On previous post you said disabling cache (use_cache=0) would give better startup performance, and now even cache partition is used for recovery, so I'm assuming it is disabled by default now. Going from that, it seems that we a don't need cache partition anymore, do we?

In addition, would it be feasible to do some more checking on kernel installation, and auto removal/freeze of NT-app when installing your kernel?

If it's feasible, I think later it'll be good to implement similar checking to remove CKSettings when installing ace2nutzer kernel.
[Galaxy Ace II Android Development] borkins:
There is some tutorials on the net, about booting from 'mmcblk1' (extSDcard).

If it's possible for ACE2 (maybe it's not so difficult) , would be great,

if we can extend the sizes of the internal partitions into the external SD card,

to forget about their size once and for all, and to taste the freedom. :p
[Galaxy Ace II Android Development] shaqman89:
I remember this is being a possibility, though Chrono (or anyone I know here) have ever tried it.

Refer to changelog kernel 4.1 here: http://xdaforums.com/showpost.php?p=64847770&postcount=3772
[Galaxy Ace II Android Development] ChronoMonochrome:
Yes, it was removed, since I found that kernel modules were bugged somehow and could not be load.

This one is anyway unused, unless you enable storing dex cache on that partition (can be done via build.prop, disabled by default on almost codina ROMs I know).

It's always better to resize cache to something about 10 Mb. Unless /cache contains dex files, of course.

Right, in a system, this is disabled by default now. But recovery itself still requires /cache partition and will print errors otherwise. This is why I came to this solution - to resize /cache to some minimum required for recovery, instead of breaking this partition at all. Recovery file is written right after ext4 filesystem and fits on the same partition. Why just not storing recovery file as an usual file in ext4 filesystem? Originally, I wanted to use whole /cache partition for "raw" recovery flashing via dd, like on other android phones, but found that recovery still needs /cache partition.

It's possible to detect whether NT app or CK app is installed by checking /data/data folder. But I'm not sure how to find the needed apk file to freeze it, since apk could have different names depending on an installation method. I'm afraid it'll require parsing Android.xml file in each apk file, which is not that easy as *.xml files in apps are encoded.
[Galaxy Ace II Android Development] PolishVodka:
You can boot system from external and internal storage, you just need two extra partitions (one for /system and one for /data). I think you can even boot system image (system.img placed somewhere on sdcard and mounted on boot as "loop" partition). We can have many Roms in the same time installed on device (as partition images on sdcard or on extra partitions) and booted which we want after rebooting phone (the best way will be to boot at startup some menu where you'll choose desire Rom).

We have absolutely freedom (its nothing special, every linux device has ability to boot system from any direction, just must have custom kernel where are all modifications) from where system will be booted, everything is defined on kernel side (ramdisk to more precise).

We only cannot change place from where is loaded kernel, no bootloader sources.

Check how's look first, unmodified script executed by our kernel:

https://github.com/TeamCanjica/Samsung_STE_Kernel/blob/3.0.101/usr/u8500_initramfs_files/init

boot.cpio - system ramdisk, depends of android version, from KK cannot boot lower and higher versions of android etc.

recovery.cpio - recovery filesystem, can be any version, CWM/Philz/TWRP/stock. Must be modified to allow flashing packages to other place than standard partitions.

INIT script we can edit to load boot.cpio/recovery.cpio from any place (sdcard/data partition/preload etc.)

We can make dependency when this and this boot.cpio will be loaded (example - if on sdcard is file "rom_selections" and has definition "4.4.4=true", than load this or this boot.cpio. The same doing for recovery.cpio, if in build.prop is "load_twrp=true" than load TWRP recovery from any direction we want.)
[Galaxy Ace II Android Development] ChronoMonochrome:
[MENTION=5701712]shaqman89[/MENTION], [MENTION=5840412]ace2nutzer[/MENTION],

seems that I found a convenient way to detect and freeze NT / CK app:

#!/sbin/sh

APPS_PATHS="/system/priv-app /system/app /data/app"
UNZIP="/system/xbin/unzip"
NTAPP_ICON="res/drawable-hdpi-v4/novathor_icon.png"
NTAPP_PREV_LOCATION="/ramdisk/ntapp.txt"

IS_FOUND=0
IS_FROZEN=0

FREEZE_POSTFIX="~ntapp"

mount /data 2>/dev/null
mount /system 2>/dev/null

LD_LIBRARY_PATH_BACKUP=$LD_LIBRARY_PATH

LD_LIBRARY_PATH="/system/lib"

cd /tmp

freeze_ntapp()
{
if test -f "$1$FREEZE_POSTFIX" ; then
IS_FROZEN=1
echo "NT App is already frozen"
exit
fi

if test -f $1 ; then

$UNZIP -qq $1 $NTAPP_ICON -d /tmp 2>/dev/null
if test -f /tmp/$NTAPP_ICON ; then
rm -f /tmp/$NTAPP_ICON

echo "found NT app: $1"
IS_FOUND=1

echo $1 > $NTAPP_PREV_LOCATION

mv $1 $1$FREEZE_POSTFIX

echo "NT app is frozen: $1 -> $1$FREEZE_POSTFIX"
fi
else
echo "freeze_ntapp: $1: not found"
fi
}

if test -f $NTAPP_PREV_LOCATION ; then
freeze_ntapp $(cat $NTAPP_PREV_LOCATION)
fi

for path in $APPS_PATHS
do
if [ $IS_FOUND -eq 1 ] ; then
break
fi

for i in $(find "$path" -name "*.apk")
do
freeze_ntapp $i

if [ $IS_FOUND -eq 1 ] ; then
break
fi

rm -f /tmp/$NTAPP_ICON
done
done

LD_LIBRARY_PATH=$LD_LIBRARY_PATH_BACKUP

Depending on the ROM used, it might need to adjust unzip flags, for me this script works on 6.0.1 with unzip binary from CM13. Curious to check if it works on kitkat as well :)
[Galaxy Ace II Android Development] ace2nutzer:
Good idea :)

But isn't it much easier to write an script that simply search in /system/priv-app for "NovaThorSettings.apk and if it finds, then just rename in NovaThorSettings.bak and that's it ??!

Later when installing ace2nutzer kernel .. then it should search vor NovaThorSettings.bak and rename in NovaThorSettings.apk ....

Same way for Chrono kernel + CK App .. Not ? :D
[Galaxy Ace II Android Development] ChronoMonochrome:
As I said, I wanted it to be more universal - this means that user can store apk file with whatever name in all the listed in script paths and script should be able to detect app and freeze. For me it takes about 10 seconds before script finds and freezes app (and if this is not first run, it freezes nt app instantly as previously found apk location is "remembered" by script).
[Galaxy Ace II Android Development] ace2nutzer:
Nope, why users should rename the app ? I never consider this.

Usually u should write a script that simply search for the original name of your app ;)

Only make sure that your scripts installs CK App always on the same location ... for me it's /system/priv-app and not /system/app

This way works on all ROM's good enough for me :)

The important thing is only that we'll always use same name and same location for the app.

btw: i'm using for 2 years always same name and location .. so it shouldn't make any problems, at least for me.
[Galaxy Ace II Android Development] ChronoMonochrome:
AFAIK, unlike Nt app, CK app might have different name and might be even installed in /data/app - depending on the way installed, it might be e.g. /system/app/CK_app_0.9.x.x.apk or /system/priv-app/CK_app_0.9.x.x.apk or even /data/app/com.mars.army.chronokernelsettings.apk . And just for some clarification, I don't maintain any installers for CK app nor use it myself, but some users prefers to install it. Thereby, for me it's more convenient to write such script in the way it was written.
[Galaxy Ace II Android Development] ace2nutzer:
@up

Yes, then it makes sense. :)

But speaking only for me personally, i really don't care much for non latest builds ... i don't want to consider, no support nothing.

I was only speaking for latest builds and upwards compatibility.. nothing more.

Usually the most users only want to test always latest version of chrono kernel and ace2nutzer kernel... that's why i don't want to consider old builds.

But if it works fine for both kernels.. and on kitkat .. u can provide it. . no problem bro ;)
[Galaxy Ace II Android Development] shaqman89:
[MENTION=5695278]ChronoMonochrome[/MENTION]

Unfortunately I can't get the script to run. Am I missing something?

What I did was:

1. Copy it using notepad++, and save it as remove-ntapp.sh

2. Push it to /storage/sdcard0/

3. Since it's vfat, I copied it to /etc/init.d

4. Chmod to 755

5. Execute it

What I got is :

sh: /etc/init.d/remove-ntapp.sh: No such file or directory

I tried it both using terminal emulator, and adb on VanirKK using ace2nutzer kernel.

Am I doing something wrong here?
[Galaxy Ace II Android Development] ChronoMonochrome:
Better to execute it from recovery (as it is supposed to).

P.s. on windows, notepad++ will encode text in DOS format by default, it must be converted into UNIX format.

Later I'll compile unzip static binary, as I'm not sure that this script will work from any recovery.
[Galaxy Ace II Android Development] shaqman89:
Yeah, I did remember about the encoding, it changed it early on. :good:

Anyway, I just tried it from CWM, and overall it worked and fast (less than I second), but I guess it need to mount ramdisk first.

The output I got is:

found NT app: /system/priv-app/NovaThorSettings.apk
./remove-ntapp.sh: line 70: can't create /ramdisk/ntapp.txt:nonexistent directory
NT app is frozen: /system/priv-app/NovaThorSetings.apk -> /system/priv-app/NovaThorSettings.apk~ntapp

Overall, it did worked though :good: :good:
[Galaxy Ace II Android Development] ChronoMonochrome:
Weird thing, I never seen /ramdisk being automatically unmouted by TWRP. Probably CWM tries to be too smart to decide, which partitions to mount and unmount :laugh:

Ah, I got it now. It was supposed to be executed from CK, ace2nutzer's kernel should use some other partition than /ramdisk (since it can't be guaranteed that this partition exists at all).
[Galaxy Ace II Android Development] shaqman89:
LOL. You're right. I forgot to mention that I executed it from ace2nutzer kernel. :D

I think it's safe to say that the script is working though, and could be included in later versions of kernel.
[Galaxy Ace II Android Development] Noxialis:
I seem to be having trouble with the latest iteration of this kernel @.@

Flashing 4.4 leaves me with PhilZ and sdcard0 being unreadable, also, storages are swapped with no way for me to swap them back (I tried that fstab thing from ramdisk, no dice)

Any ideas on how I can help with this?
[Galaxy Ace II Android Development] ChronoMonochrome:
Flash odin kernel, then TWRP recovery from there and again latest kernel. Can you also check the free space on /cache? And please attach kernel insall log (last_kernel_install.txt from /ramdisk).
[Galaxy Ace II Android Development] Noxialis:
So now I suddenly managed to get 4.4 on by doing that and flashing both 4.4 and TWRP 2.8.7, but for the sake of it, here you go.

Doing that "use_swap=0" trick again, see if it works
[Galaxy Ace II Android Development] ChronoMonochrome:
So have you managed to get TWRP installed? Philz is not currently supported when using 6.0.x ROMs.
[Galaxy Ace II Android Development] Noxialis:
Everything works now. Got TWRP 2.8.7 working

What I don't understand is, why the heck does recovery suddenly change to Philz?
[Galaxy Ace II Android Development] ChronoMonochrome:
It was preinstalled by either of older than r4.4 builds. It might seem a bit confusing but installation of r4.4 triggers using of Philz, because it fails to install TWRP (according to your log). That's actually a bug, though it can be triggered only with very specific configuration - recovery won't be installed from CWM (as it can't unmount /cache where is located recovery) which leads in using Philz that is only critical for 6.0.x users. So far there is no better solution than pre-installing TWRP to avoid this consequence.
[Galaxy Ace II Android Development] Noxialis:
I think I just found another bug (more like it haunted me in my sleep lol)

Storages are swapped on 4.4 with no way of turning them back.

Whenever I connect phone to PC, PC reads two instances of sdcard0.

DiskInfo says that sdcard1 is mounted as sdcard0

Oh right, you asked about cache when on CK4.4 right? Cache read 300MB not mounted
[Galaxy Ace II Android Development] ChronoMonochrome:
Okay lets clarify one thing. In your logs the system detected is 6.0.x, but you say that you use 4.4.x. Did you modify build.prop?
[Galaxy Ace II Android Development] Noxialis:
Oh, my bad, what I meant by 4.4 was Kernel version @.@ :silly:

I guess I should be typing r4.4 instead of simply "4.4" lol xD Again, sorry
[Galaxy Ace II Android Development] ChronoMonochrome:
New build r4.4.2 is up!

Changelog

reverted genfstab script code for 6.0.x

updated ramdisk for UltimateROM 6.0.x

fixed init.d scripts to properly run on Marshmallow

adjusted Dynamic governor tunables for better performance

added NT App freezer script to an installer (not tested)

added misc fixes from CM gerrit
[Galaxy Ace II Android Development] Noxialis:
Yay I was looking forward to this :victory:

Will flash later
[Galaxy Ace II Android Development] Noxialis:
Latest build works (so does swap so yay :victory: )

Works on latest CM13 build as well
[Galaxy Ace II Android Development] mfawonkpo:
Working perfectly on cm 13 :)
[Galaxy Ace II Android Development] zzenyoo:
Can i use R4.4.2 on stock, rooted JB 4.1.2 NB1 (now i have R2.24.7 & TWRP 2.8.7.0)?
[Galaxy Ace II Android Development] borkins:
I got two SW reboots so far on latest CK r4.4.2 and CM11 - 20160313.

Before a month, I've made a little changes to the partitions sizes, and there is no HW reboots for now.

Now the important partitions sizes are divisible by 2 ( in sectors, kib & mib ).

Model: MMC SEM04G (sd/mmc)
Disk /dev/block/mmcblk0: 7733248s
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
10 1024s 3071s 2048s PIT
6 3072s 6143s 3072s CSPSA FS
7 8192s 28671s 20480s ext4 EFS
2 28672s 61439s 32768s ext4 Modem FS
14 63488s 67583s 4096s SBL
16 67584s 71679s 4096s SBL_2
1 71680s 104447s 32768s PARAM
12 104448s 108543s 4096s IPL Modem13 108544s 141311s 32768s Modem
15 141312s 174079s 32768s Kernel
17 174080s 206847s 32768s ext4 Kernel2
3 206848s 1517567s 1310720s ext4 SYSTEM
5 1517568s 6760447s 5242880s ext4 DATAFS
4 6760448s 6825983s 65536s ext2 CACHEFS
9 6825984s 6826111s 128s ext2 HIDDEN
8 6826112s 7733214s 907103s fat32 UMS

Model: MMC SEM04G (sd/mmc)
Disk /dev/block/mmcblk0: 3866624kiB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
10 512kiB 1536kiB 1024kiB PIT 6 1536kiB 3072kiB 1536kiB CSPSA FS
7 4096kiB 14336kiB 10240kiB ext4 EFS 2 14336kiB 30720kiB 16384kiB ext4 Modem FS
14 31744kiB 33792kiB 2048kiB SBL16 33792kiB 35840kiB 2048kiB SBL_2
1 35840kiB 52224kiB 16384kiB PARAM
12 52224kiB 54272kiB 2048kiB IPL Modem
13 54272kiB 70656kiB 16384kiB Modem
15 70656kiB 87040kiB 16384kiB Kernel
17 87040kiB 103424kiB 16384kiB ext4 Kernel2
3 103424kiB 758784kiB 655360kiB ext4 SYSTEM
5 758784kiB 3380224kiB 2621440kiB ext4 DATAFS
4 3380224kiB 3412992kiB 32768kiB ext2 CACHEFS
9 3412992kiB 3413056kiB 64.0kiB ext2 HIDDEN
8 3413056kiB 3866607kiB 453552kiB fat32 UMS

Model: MMC SEM04G (sd/mmc)
Disk /dev/block/mmcblk0: 3776MiB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
10 0.50MiB 1.50MiB 1.00MiB PIT
6 1.50MiB 3.00MiB 1.50MiB CSPSA FS
7 4.00MiB 14.0MiB 10.0MiB ext4 EFS
2 14.0MiB 30.0MiB 16.0MiB ext4 Modem FS
14 31.0MiB 33.0MiB 2.00MiB SBL
16 33.0MiB 35.0MiB 2.00MiB SBL_2
1 35.0MiB 51.0MiB 16.0MiB PARAM
12 51.0MiB 53.0MiB 2.00MiB IPL Modem
13 53.0MiB 69.0MiB 16.0MiB Modem
15 69.0MiB 85.0MiB 16.0MiB Kernel
17 85.0MiB 101MiB 16.0MiB ext4 Kernel2
3 101MiB 741MiB 640MiB ext4 SYSTEM
5 741MiB 3301MiB 2560MiB ext4 DATAFS
4 3301MiB 3333MiB 32.0MiB ext2 CACHEFS
9 3333MiB 3333MiB 0.06MiB ext2 HIDDEN
8 3333MiB 3776MiB 443MiB fat32 UMS
[Galaxy Ace II Android Development] fonzacus:
help with philz recovery

hi, im currently systemless and trying to look for help

http://xdaforums.com/galaxy-ace/ace-2-help/help-ace-ii-firmware-t3404378

searching through the internet ive seen many people with similar status 7 issues, none of the fixes have been able to help me. the status 7 pops up when i try to flash anything via recovery. is there any way out of this other than using odin? im hoping odin will work later on as that is the last ditch attempt at fixing an android

*EDIT*

now recovery doesnt work, odin mode works. now issue isnt kernel or recovery related
[Galaxy Ace II Android Development] pokorny17:
Great, but...

I think that someone will fix wifi bug, i can't turn on wifi, it's still says: turning on... Stock JB with Chrono Kernel App.

Posted on my GT-I8160
[Galaxy Ace II Android Development] Sidebandit:
I use version r4.1.1 a couple of updates back (Jan) and have no probs on stock with anything.
[Galaxy Ace II Android Development] ChronoMonochrome:
New build R4.5 is UP!

Changelog:

Fixed MCDE bugs in WS2401 display driver (coloured stripe on the bottom part of display when waking up a phone)

Changed recovery partition – now installs along with kernel on the same partition (new standalone recovery installers are coming soon)

Set of patches from android kernel for SDIV / UDIV emulation

Reduced boottime by removing internal sdcard mount point (for swapped storages variant only) - thanks to [MENTION=5840412]ace2nutzer[/MENTION] for hint

Fixed and enabled sdcardfs by default on 4.4.4 ROMs – both battery life and speed improved

LMK tuned more aggresively

Changes in zRam script – now it uses upto 400Mb of RAM

You can get it from my new blog http://ultimaterom.h1n.ru/ . Enjoy!
[Galaxy Ace II Android Development] UmurMaden:
does this update fix wi-fi problem on stock rom?
[Galaxy Ace II Android Development] ChronoMonochrome:
No, I don't remember if I was fixing this yet as I've forgiven of that issue, however, after a quick check on sources I haven't found anything that could cause it not to work on stock. If there are still problems with wifi, someone probably should upload logcat and dmesg logs.
[Galaxy Ace II Android Development] PolishVodka:
Stock JB searching for WiFi driver in /lib/modules/dhd.ko (from libhardware_legacy sources), maybe here is present one of oldest drivers still? Or WiFi driver is only in /system/lib/modules/dhd.ko and system cannot load it from there (try to make a soft link from /system/lib/modules/dhd.ko to /lib/modules/dhd.ko).
[Galaxy Ace II Android Development] ChronoMonochrome:
It should not be a problem, since stcok ramdisk has such symlink. The problem has come from wifi driver update, which lately was reverted (there are no leftovers from those changes).
[Galaxy Ace II Android Development] SevenUp9:
Hello. I'm an avid ROM flasher and last time I've flashed CM13 by SergeyL. Why am I asking you for help? Because there's Chrono Kernel with it's management app. My question is how do these Depp Sleep stages work? I mean Stage 3-5 in I/O menu. Thanks for help and have a nice day! :o
[Galaxy Ace II Android Development] ace2nutzer:
State 4 is best for battery lifetime .. while state 5 isn't stable .. so just use "4".
[Galaxy Ace II Android Development] ChronoMonochrome:
1. this issue might be caused due to complexity of the script or due to changes in NT-APP.

2. it seems not to be related to kernel, zram script is working on latest Vanir build.
[Galaxy Ace II Android Development] ChronoMonochrome:
New build r4.6 is up!

Changelog:

Multi-device kernel project: added support for Janice (untested)

Re-added some of MCDE changes (changing LCDCLK frequency and video modes is available again)

Fixed Wifi bug on JB 4.1.2 (probably)

Fixed boot up issue on MM 6.0.1

Fixed zram script issue on some ROMs (untested)

Disabled CONFIG_BOUNCE and decreased vmalloc size to 150 Mb (HighMem is enabled again to support 6.0.1 and resized to 8 Mb from the original size of ~120Mb) - for the better memory management

Changed CMDLINE to forcibly use unused 1 MB of RAM - thanks to [MENTION=5840412]ace2nutzer[/MENTION] for this finding!

Allowed editing of cmdline (/ramdisk/cmdline.txt). Warning: here be dragons! So far the only tested and working cmdline's are ones with changed vmalloc size (not less than 128Mb) and with changed HWMEM size (72 Mb is only tested - works different on each devices and known to work unstable on Lollipop and Marshmallow). Don't touch if you're unsure what you are doing. Changing of cmdline requires re-flashing kernel package (r4.6 or higher). Remember that after editing file /ramdisk/cmdline.txt must match in size with the original one, otherwise kernel installer will refuse to change cmdline!

Changed LowMemoryKiller implementation to the one from tuna kernel by [MENTION=3390093]MWisBest[/MENTION]

Download link is available here.

Enjoy!
[Galaxy Ace II Android Development] saimyounas786:
is ddr stable at 1190
[Galaxy Ace II Android Development] ChronoMonochrome:
No, this is unstable in 99% of cases. You might want not to change DDR freq. to anything higher than 975 MHz. Remember that changing DDR frequency is at your own risk!
[Galaxy Ace II Android Development] [-GuTi-]:
Yep, WiFi on stock is fixed :)
[Galaxy Ace II Android Development] borkins:
[MENTION=2380052]shaqman[/MENTION], try to put the shebang line ( #!/system/bin/sh ) as first line of the 'zram' script.
[Galaxy Ace II Android Development] shaqman89:
Unfortunately, it still didn't work.

Applying this to the first line works.

Yeah, I forgot to try that, thanks.
[Galaxy Ace II Android Development] Culateralligator:
You tried CM12.1 with maximum DDR overclock...

What kernel version were you using?
[Galaxy Ace II Android Development] shaqman89:
[MENTION=5695278]ChronoMonochrome[/MENTION]

On latest kernel, internal storage (since it is swapped, it should be /storage/sdcard1) isn't mounted.

In addition, at times wifi module seems not to be loaded. It usually loads back normally after a reboot, but after sometimes rebooting again wifi module isn't loaded anymore. Unfortunately, I couldn't reproduce it in a definite way.

Anyway, here is a last_kmsg: https://www.dropbox.com/s/yr4ssrp7ggzcxaa/last_kmsg?dl=0

Somehow accessing kmsg always return blank. I tried using tail, cat, and even a file explorer, but they either return blank or keeps loading indefinitely.

This happened on cm11.