yashsingh1/xdaforums huggingface dataset:
[Galaxy S III Android Development] Darkened_Sky:
addon.d backup script to keep kernel at ROM flash

[MENTION=4898097]arter97[/MENTION] after looking into your multiboot.zip I have seen your method to avoid that your kernel gets owerwritten if a second rom is flashed.

I tried to adapt it to an addon.d backup script so that the kernel won't get overwritten if I flash a new nightly. And it is also working: kernel, atweaks, aswitch, their settings and all the drivers are kept. Only thing which isn't working is wifi, so I am forced to flash again the kernel to get wifi functionality back. (edit: solved see below)

Maybe if you have time you could have a look into my script and give me a tip how to solve this problem. Or maybe there is a good reason why I should not do it.

IMO it would be cool to do it that way, espacially because I always forget to reflash the kernel after an update :laugh:

edit: after arter97's help the backup script finally works, so with this it isn't needed anymore to reflash the kernel at each new nightly flash and also the profile is kept that way. so reuploaded the corrected version. :good:
[Galaxy S III Android Development] arter97:
Wow! That's just super epic!

The Wi-Fi fix should be simple. Just symlink /system/lib/modules/dhd.ko to /lib/modules/dhd.ko

I'm not sure about preserving aTweaks' profile.
[Galaxy S III Android Development] Darkened_Sky:
sorry I am still abit noobie with scripts

first tried tried it by adding ln -s /system/lib/modules/dhd.ko /lib/modules/dhd.ko

after failing the other way round ln -s /lib/modules/dhd.ko /system/lib/modules/dhd.ko

but it is again the same behavior as before, no wifi

hm I thought the preserving of atweaks profile is only not recommended if a new kernel version is flashed. but a rom flash shouldn't make trouble.. well but if it does so, the removal of the profile can also be added to the script
[Galaxy S III Android Development] cba1986:
i have the same issue when upgrading the rom. The only solution i found is reflashing the kernel.
[Galaxy S III Android Development] habylab:
Thank you very much for both the replies.

I would like to see a version of your kernel with Archi Optimisations. Just to see how much of a difference they make, as for me, Archi's kernel is consistently smooth, whereas yours occasionally stutters. BUT that may be my settings, frandom etc. and yours has working everything, his doesn't.

Sent from my Linaro SM'd CM11 Galaxy S3, with arter's kernel. A proud Googy Beta tester.
[Galaxy S III Android Development] lovegurulavdev:
Have you turned on Frandom? That would help. What Max and min freq are you on, and governor?

Sent from my Linaro SM'd CM11 Galaxy S3, with arter's kernel. A proud Googy Beta tester.[/QUOTE]

no i just flashed the kernel ... i didnt touch the settings in atweaks ..
[Galaxy S III Android Development] habylab:
Have a go!

Sent from my Linaro SM'd CM11 Galaxy S3, with arter's kernel. A proud Googy Beta tester.
[Galaxy S III Android Development] lovegurulavdev:
i didn't get what you mean ???
[Galaxy S III Android Development] habylab:
Changing values in AK
[Galaxy S III Android Development] arter97:
It is "ln -s /lib/modules/dhd.ko /system/lib/modules/dhd.ko"

(Original file comes first).

After the ROM installation, try getting /system/lib/modules list.

ls -al /system/lib/modules

And post it here.

And yes, you're right! You can safely use previous aTweaks profile for just a new ROM flash. My bad, sorry!
[Galaxy S III Android Development] arter97:
It'll be because of lots of power savings I had added to my kernel... I don't think changing the compiler option would change that.
[Galaxy S III Android Development] Darkened_Sky:
yes as I've written i tried it also that way but wifi still does not work :( (see attached script)

also attached the modules list after the rom flash (without working wifi)
[Galaxy S III Android Development] arter97:
My bad!

Hahaha

Remove the original /system/lib/modules/dhd.ko and THEN symlink!

rm -f /system/lib/modules/dhd.ko

ln -s /lib/modules/dhd.ko /system/lib/modules/dhd.ko
[Galaxy S III Android Development] Darkened_Sky:
yay it's working! Thank you so much :victory:
[Galaxy S III Android Development] habylab:
Sure, thank you! Smoother with frandom off and seeder running!

Looking forward to whatever you do next to this kernel!

Sent from my Linaro SM'd CM11 Galaxy S3, with arter's kernel. A proud Googy Beta tester.
[Galaxy S III Android Development] arter97:
Try without the seeder perhaps.. ;)

It maybe better...
[Galaxy S III Android Development] arter97:
:D :D
[Galaxy S III Android Development] trein91:
Um. CPU undervolting features please?

Sent from my Galaxy S3
[Galaxy S III Android Development] psyntific:
yea arter97. Plz add undervolting too.
[Galaxy S III Android Development] morckx:
zram / swap

I don't think it's free's fault. See /proc/meminfo and /proc/swaps, and for comparison the corresponding results on boeffla 2.3-beta7 (which uses one swap partition per core) in a comparable situation attached.
[Galaxy S III Android Development] habylab:
Ooo okay!

Sent from my Linaro SM'd CM11 Galaxy S3, with arter's kernel. A proud Googy Beta tester.
[Galaxy S III Android Development] arter97:
Not anytime soon. Don't expect it anyways.

That article by AndreiLux still doesn't convinces me.

I don't really like uV implementation made on 4412. Codes are dirty.

I'd like to keep my kernel conservative in area of stability.
[Galaxy S III Android Development] arter97:
Thanks for the /proc dumps!

I'll take a look again :(
[Galaxy S III Android Development] habylab:
Phone definitely seems smoother without seeder and frandom. Never expected that.

Sent from my Linaro SM'd CM11 Galaxy S3, with arter's kernel. A proud Googy Beta tester.
[Galaxy S III Android Development] flither:
so...I'm not a tech guru but I think overclocking should't be included in your kernel, or should be at max 1600. i would never overclock to 1800MHz without solid (-150mV or more) undervolt, this is freaking 1.4V!!! Its gonna be hot this summer :laugh:

Apart from this kernel looks amazing, tempted to try it out :)
[Galaxy S III Android Development] trein91:
Um, afaik isn't it truistic to say undervolting helps battery life? It isn't some new profound theory or anything.
[Galaxy S III Android Development] cba1986:
i use 1704 without any heat issues. What It would be nice to have GPU profiles. I am not referring to UV/OC but profiles as in agni kernel (normal/battsave/perfomance).
[Galaxy S III Android Development] Darkened_Sky:
Second ROM Backup/restore script

i've made a little script with which you can backup/restore your second rom.

in fact it does nothing more than making a .tar archive of it and putting it to your external sd cards root

simply delete the .txt ending and place the script in /system/bin

to execute it, open terminal, type "su" to gain root access (this is important without root it will run but it will prompt an error and wifi and other things won't work) and then type "secbak". after that it will ask you type in a command to backup or restore the whole second rom, only the system or only the data. Note: atm if you only want to restore data or system you have to do a backup before of only system or data.

so simply type in the one you want. hope it is self explaining if you see it. btw backup takes some time but you can switch off your screen or do something else in that time

NOTE: i don't take any responsibility for lost data, by using this script :p In my tests it worked. And yes I know the script may look a bit noobish for more experienced people, but hey it's working :D

[MENTION=4898097]arter97[/MENTION]

as there are such backup possibilities I have a suggestion:

could you put the second rom slot into /data/media. Because at the moment if we want to make a nandroid backup of the primary we always have to backup the second rom with it. This makes the backup size 2 times bigger and the backup and restore time 2 times longer. I personally am doing frequently backups of my primary rom but my secondary rom does not need that frequent backups, and if I need a backup I use the above script.

other problem of the current location of the second rom slot: it is not possible to wipe /data to install another primary rom without delteing the whole second rom.

in /data/media it would be save from wiping and ignored by nandroid backup. I think other dualboot kernels also did it that way

script changelog/progress:

edit:

improved the backup script. now when you select restore it will only delete your current second rom (data/system) if there is really a backup available. Also it looks nicer now hope you like it :cool:

note when you insert the file into system/bin you might have to open it one time with a text editor and press save. otherwise it could happen that it cant be found :confused:

editedit:

again improved script. now you can easily change the backup location to your liking by changing the path in the script behind the DIR variable. also some cleanup and better commentation in the script

edit3: new command for clearing second roms dalvik cache is available

edit4: new version now check itself if "su" was typed in before and prompts a error if not. Also you can now permanently change by tiping "dir" as secbak command where the backup path should be. but i'm still searching for a better way of having a progress bar than having the verbose flag...

updated script here
[Galaxy S III Android Development] flither:
well, not everyone gonna fry their CPU, but would be nice if you could prolong your hardware life with UV, every 5 degrees count :). In another kernel I hit max 70 degrees on 1800MHz with hard UV, but I don't wanna hit 80 degrees without good reason, and lack of UV option is stopping me from flashing this kernel. As for GPU profiles - +1 :good:
[Galaxy S III Android Development] pricey2009:
I don't know what the fuss is about, under/overvolting along with under/over clocking is pointless and will actually damage the phone more over time.

I would rather not have these options added to this kernel thanks.
[Galaxy S III Android Development] cba1986:
So don't do it it. Nobody is forcing you to OC/UV your phone. I OC/UV my phone since i bought it when it first came out near two years and i didn't fry my CPU, and it is stable as a rock.

I think OC/UV are nice a additions to have when it is optional and you can turn it off. Right now i am more interesting in the new mali drivers :D
[Galaxy S III Android Development] arter97:
Yes it is. Reason why I'm not putting uV in is that it might be only a tiny bit beneficial.

Phone's screen is the highest battery consumer, not the CPU cores' voltage.
[Galaxy S III Android Development] arter97:
I have no idea how to implement GPU profiles. Can anyone explain what does it do on agni's?
[Galaxy S III Android Development] arter97:
The reason I had decided not to put 2nd ROM on /data/media is because some ROMs or tweaks overrides its permission on boot.
[Galaxy S III Android Development] cba1986:
It has to do with the GPU thresholds. I don't know how it is implemented really. I cannot find [MENTION=4365701]psndna88[/MENTION] github.
[Galaxy S III Android Development] trein91:
Reduces CPU temperatures too. (useful if you use zzmoove on OC for smoothness)

Sent from my Galaxy S3
[Galaxy S III Android Development] flither:
And thats the reason I asked for it. Even this couple degrees less on CPU and 1-2 degrees less on battery (tested) would prolong the cells life, maybe not drastically but always.

I'm planning to stay with my s3 a little bit longer than 2 years :laugh:

Anyways, if its too difficult to implement or you just don't want to implement it [MENTION=4898097]arter97[/MENTION], just forget it, its not a life-or-death thing ;)
[Galaxy S III Android Development] habylab:
Well, it could make 1 or 2% difference, but can also cause a reboot that will lose data or at worst corrupt your phone. I'd say it isn't worth the risk.

Sent from my Linaro SM'd CM11 Galaxy S3, with arter's kernel. A proud Googy Beta tester.
[Galaxy S III Android Development] Mostafa Wael:
+1

i am using no undervolting and heat problems are not present

about battery life i am having a rocking 4.5 hrs screen-on-time

so maybe UV has its effect but it is very slight.
[Galaxy S III Android Development] habylab:
You can twist it either way, a study or some 'facts' can be biased in either way. Regardless, it is Arter's choice! Use another kernel if you are that bothered.

Sent from my Linaro SM'd CM11 Galaxy S3, with Archi's kernel. A proud Googy Beta tester.
[Galaxy S III Android Development] DualJoe:
Undervolting should give best benefits on stress, not idle.

I would love to see mV table as well in this kernel.
[Galaxy S III Android Development] lukaaa47:
after I do UV my phone is much cooler
[Galaxy S III Android Development] arter97:
If it got to do with GPU OC/uV, I'm not interested in..
[Galaxy S III Android Development] arter97:
Enough with uV trolls.

Get me scientifically tested data of the power consumption before and after applying uV.

If it seems beneficial, I'll "CONSIDER" it later.

If no such statistics data are given, I'm not interested in implementing a hacky, less-to-none-beneficial stuff in my kernel.

All future uV requests will be ignored.

http://xdaforums.com/showpost.php?p=34153152&postcount=15576
[Galaxy S III Android Development] kadopt:
Using basic electricity laws:

P=IxU

P is power, I is current and U is voltage, so if you lower the voltage you will have less power. But with transistors it's not that linear.

Transistors need a minimum voltage to switch in time with the clock rate specified and instability happens when they switch too late as the voltage is not enough, also in battery powered devices the voltage regulator may drop supplied voltage depending on battery charge.

All in all, if you think is not worth it don't use it. I think it gives results and use it but the Dev of the kernel I use (lord boeffla) does not think the same way but still provided support.

Cheers!

[edit] Did a quick read on the link you provided... I still prefer to believe that my core i7 920 @ 4ghz (stock is 2.66ghz, 1.2v) using 1.28v actually gives results and that using it @ 2.66ghz with 0.98v actually produces lower load temperatures vs 1.2v. These results were heavily tested with linx and other tools.

Our phone would behave similarly but testing must be done and not all chips behave the same even with the same asv value! [/edit]

Sent from my SGS3 with Temasek 's CM11, Boeffla kernel & Tapatalk Pro!
[Galaxy S III Android Development] d1rekt0r:
People who make thse CPUs and device manufscturers know much much better than you and anyone else on thse forums , if it was giving results without sacrificing anything else (cpu lifetime , slow freq scaling ?) than you would see those UV values as factory defaults.

I personally will never OC or UV. If you want better performance , maybe wait for those new mali drivers or buy new device , if you want more battery life its 100x better and safer to buy extended battery.
[Galaxy S III Android Development] JustArchi:
Bull**** my friend. Engineers must obey factory rules, and this includes applying fully rock solid stable voltages, which will work stable on every device.

And you know that every device is different and is more/less tolerant toward voltages, alright?
[Galaxy S III Android Development] d1rekt0r:
Welll thats what I said , at least what I tried to say , my english kinda sux.
[Galaxy S III Android Development] cba1986:
The voltages are never touched nor the min or max freq. It affects the freq scaling.
[Galaxy S III Android Development] arter97:
Then his kernel has a custom governor for GPU?
[Galaxy S III Android Development] cba1986:
I don't know that much. But there are several kernel's that allow you to modify the freq scaling manually. instead, agni offers you some pre-defined profiles to avoid the user to make mistakes.
[Galaxy S III Android Development] arter97:
Sounds interesting. I'll take a look later.
[Galaxy S III Android Development] arter97:
Sorry for not putting out any updates recently..

Exam period on all Korean high schools.. busy studying..

Please wish me good luck XD
[Galaxy S III Android Development] RibozoM:
I am pretty sure that you can handle them all your exams. Best lucks for you mate :good:
[Galaxy S III Android Development] habylab:
Good luck!

Sent from my Linaro SM'd CM11 Galaxy S3, with Archi's kernel. A proud Googy Beta tester.
[Galaxy S III Android Development] Mostafa Wael:
good luck with your exams arter

wish you the best :)

and no worries about not updating the kernel as long as you are still developing it

take your time
[Galaxy S III Android Development] itizar1:
i have a problem with kernel, i can't set any application up, also can't use even your integrated apps

tried with cm11 and omni and my device is i9300
[Galaxy S III Android Development] habylab:
Can't help with the above!

Anyway, what governor do people use here? Zzmoove, pegasusq+ or...?

Sent from my Linaro SM'd CM11 Galaxy S3, with Archi's kernel. A proud Googy Beta tester.
[Galaxy S III Android Development] pricey2009:
Try liquidsmooth or neatrom.. And only install this kernel after rebooting at least twice from a fresh install..
[Galaxy S III Android Development] pricey2009:
I use zzmoove set to yankextreme battery and limit CPU to 1200mhz max.. Results on attachment (PS I have 6000mah battery)
[Galaxy S III Android Development] truereason7:
UMS mode

I need to UMS mode :crying::crying::crying:

because I use window XP
[Galaxy S III Android Development] supreethms:
Windows XP support is dead. GO for a Linux OS. ASAP. :P

If you need UMS, download some app from the play store.

SG USB Mass Storage Enabler
[Galaxy S III Android Development] lukaaa47:
why this kernel has not so frequently updates?
[Galaxy S III Android Development] cba1986:
Because the developer [MENTION=4898097]arter97[/MENTION] has a real life.
[Galaxy S III Android Development] lmulli:
Have a look one page back and you will see the dev informing people that he has exams at the moment.
[Galaxy S III Android Development] lukaaa47:
in july??????????????''
[Galaxy S III Android Development] habylab:
Yes? He is younger, not that that matters, and I had exams around this time until mid July!

Give the man time!

Sent from my Linaro SM'd CM11 Galaxy S3, with Archi's kernel. A proud Googy Beta tester.
[Galaxy S III Android Development] regaber:
In Korea the academic year is not on the same schedule as in europe or the usa. I think it starts around february / march.
[Galaxy S III Android Development] bornlivedie:
It's not the same in every country, you know... he's from South Korea.
[Galaxy S III Android Development] Mostafa Wael:
scholar year is not the same all over the world, nor all over the school departments

for example i am beginning a new scholar session tomorrow and my exams will start on the 8th of October :)
[Galaxy S III Android Development] Darkened_Sky:
script updated http://xdaforums.com/showpost.php?p=53922457&postcount=854

now all nandroid backups supported to be restored as second ROM :victory:
[Galaxy S III Android Development] Kapiljhajhria:
Q 1. Why this warning? My phone is connected to wall charger not PC.

Q2. just wondering that even when my mobile is connected to PC, what is the purposes of making this app inaccessible during that time?

Q3. This is the first time i will be using this kernel. Won't be using dual ROM function.

a) do i still need to use the recovery provided here or can i use any other recovery that supports f2fs

(Will be using f2fs) if i use only one ROM.

b) will updating my ROM require some special procedure or can i update like I am used to...that is just flashing the new version file. (I know the answer is normal procedure just want to make sure.)

New to this kernel and f2fs

Tried searching thread but was not able to find answer to Q 1 & 2.
[Galaxy S III Android Development] Mostafa Wael:
hey Darkened_Sky

you are really working hard :good:

thanks

i hope arter97 put your script at OP

that's the right place of your work

at least a reference to your posts and tutorial
[Galaxy S III Android Development] Darkened_Sky:
1,2) I think it is because you can change charging settings and it is not suggested to use it while charging the phone (probably security feature)

3)a) you can use each f2fs supporting recovery. but I think arter97 provides here the latest philz touch. but it is your choice

b) just flash the new file. system partition is ext4 so even if system is formatted by rom update it stays how it is. data stays f2fs as long as you do not format it yourself

thanks for the kind words ;)

I simplified the installation of my script. now it can simply be flashed through recovery and it will also add an addon.d backup script so that my script (and the onandroid script) are kept while a nightly flash.

can be found in the link I provided above :cool:
[Galaxy S III Android Development] you_man:
Hi [MENTION=4898097]arter97[/MENTION]. How to remove the tails from the nucleus during the transition to a different kernel?
[Galaxy S III Android Development] Mostafa Wael:
so i have a tiny simple request

since this is one of the ground-breaking kernels here, why won't our kernel has a special unique boot logo?

it would be amazing :good:

of course it's not of first priority but i think it is a good idea after ironing out all bugs (if any are still there :laugh: ) and fixing all problems

i will be trying the dualboot feature in a couple of days, as i am now on holiday (yeah my last holiday before starting the new scholar session :( )

thanks everybody
[MENTION=4898097]arter97[/MENTION] wish you good luck with your exams :D :highfive:
[Galaxy S III Android Development] arter97:
Q1,2 : purpose of making aTweaks inaccessible is to prevent configuration corruptions with power management profiles like Powerboost. Please read the OP about Powerboost. Still other than Powerboost, my kernel has some features specialized with USB/AC connection. To apply those settings properly I need users to use aTweaks while unplugged.

Q3.a : The recovery provided on this thread is purely for f2fs support. It doesn't contains anything specific to my kernel(including dual-boot). You're free to choose any other recovery(but if you're using f2fs, you need to make sure you're installing the right recovery with f2fs support)

Q3.b : f2fs - nothing. Dual-boot : read the OP.
[Galaxy S III Android Development] arter97:
I'd like to say that for myself! Thanks for the scripts ;)

I actually haven't travelled through your dual-boot related scripts but I was actually going to ask you about including kernel preservation on CM update script to aTweaks :P
[Galaxy S III Android Development] arter97:
Remove /data/.arter97, /sdcard/.arter97, aTweaks(and its data), aSwitch(and its data) and reflash the ROM.
[Galaxy S III Android Development] arter97:
I'm not a big fan of custom boot logo or anim provided by the kernel. (And yes, I also did not really liked the Siyahkernel's.) It also delays the boot time.

And ultimately, I think that's a ROM job to do :D
[Galaxy S III Android Development] Darkened_Sky:
sure. I just wanted to include a method to enable/disable the kernel keeper script through my script, but if you make this possible through your atweaks app it is even better :good:

edit:

btw could you tell me how exactly the command to reboot into second ROM of your aswitch app works?
[Galaxy S III Android Development] Mostafa Wael:
so i am back to this beauty and i freshly installed it now!

i am charging it now to 100% so i can do a fair test of battery life, exactly like what i did with ArchiKernel :D

with ArchiKernel i cracked the 4 hours screen-on time "4hrs:18min precisely"

let's see what can i do with this beast

afterwards i will be trying the dualboot feature ofcourse