yashsingh1/xdaforums huggingface dataset:
[Galaxy Note 3 Original Android Development] jcadduono:
I think darklord n5 has some smart manager panel in settings that has options to turn on things that do stuff at boot. I actually suggest switching to dark-au for video recording and lots of bug fixes if you don't mind.

Gives me another idea for a feature... :)

/sbin/setonboot $node $value

$value optional, uses current value if not supplied

Adds $node (a sysfs location) to idleKernel's activate on boot items.

Then you could also do setonboot kcallocation and it would apply your screen color settings during boot splash instead.
[Galaxy Note 3 Original Android Development] kopitalk:
I'm baffled with f2fs. I decided to start afresh to convert my /data and /cache from ext4 to f2fs with twrp-2.8.7.0-idleKernel-6.5.7-hlte-eur. After formatting both to f2fs, and a reboot afterwards, it went back to my previous system in ext4 like it's never been wiped before, but my internal_sd got wiped. Here's the recovery log.

Edit: My internal_sd is still intact, not wiped. Sorry for the misinformation (I saw it wiped in twrp mtp, but once boot to system it's still there). Though the log said formatting to f2fs is successful, turns out it's still ext4 as before.

Edit1: Basic question, does /userdata reside in /dev/block/mmcblk0p25 or mmcblk0p26? I suppose this is where /data/media resides as well?
[Galaxy Note 3 Original Android Development] jcadduono:
can you boot your rom and do

ls -l /dev/block/platform/msm_sdcc.1/by-name/

and paste the results

it's possible i guess that maybe you have a different partition layout than me o.O

on hltecan at least, /userdata is /dev/block/mmcblk0p25

but in your recovery log it definitely shows /dev/block/mmcblk0p26

!!

edit: going over someones N9005 PIT file in hex editor, it looks like /dev/block/mmcblk0p25 is "hidden" partition on N9005 and moves userdata up to 26, there is no hidden partition on my N900W8 pit file

btw you will probably want to use adb shell from cmd or adbputty (way better) to run e2fsck according to that recovery.log

twrp terminal is very limited and interactive applications won't run on them, seems e2fsck is one of them :/

the recovery log does show your format of /data succeeding as you said, and it's returning the right size for the data partition. :s no clue why it wouldn't have worked...

my dad's phone i think is having the same issue, i can't format his data partition to f2fs, it just always goes back to ext4 after reboot.
[Galaxy Note 3 Original Android Development] kopitalk:
There you go.

lrwxrwxrwx root root 2014-08-16 01:54 aboot -> /dev/block/mmcblk0p6
lrwxrwxrwx root root 2014-08-16 01:54 apnhlos -> /dev/block/mmcblk0p1
lrwxrwxrwx root root 2014-08-16 01:54 backup -> /dev/block/mmcblk0p17
lrwxrwxrwx root root 2014-08-16 01:54 boot -> /dev/block/mmcblk0p14
lrwxrwxrwx root root 2014-08-16 01:54 cache -> /dev/block/mmcblk0p24
lrwxrwxrwx root root 2014-08-16 01:54 dbi -> /dev/block/mmcblk0p4
lrwxrwxrwx root root 2014-08-16 01:54 ddr -> /dev/block/mmcblk0p5
lrwxrwxrwx root root 2014-08-16 01:54 efs -> /dev/block/mmcblk0p11
lrwxrwxrwx root root 2014-08-16 01:54 fota -> /dev/block/mmcblk0p16
lrwxrwxrwx root root 2014-08-16 01:54 fsc -> /dev/block/mmcblk0p19
lrwxrwxrwx root root 2014-08-16 01:54 fsg -> /dev/block/mmcblk0p18
lrwxrwxrwx root root 2014-08-16 01:54 hidden -> /dev/block/mmcblk0p25
lrwxrwxrwx root root 2014-08-16 01:54 modem -> /dev/block/mmcblk0p2
lrwxrwxrwx root root 2014-08-16 01:54 modemst1 -> /dev/block/mmcblk0p12
lrwxrwxrwx root root 2014-08-16 01:54 modemst2 -> /dev/block/mmcblk0p13
lrwxrwxrwx root root 2014-08-16 01:54 pad -> /dev/block/mmcblk0p9
lrwxrwxrwx root root 2014-08-16 01:54 param -> /dev/block/mmcblk0p10
lrwxrwxrwx root root 2014-08-16 01:54 persdata -> /dev/block/mmcblk0p22
lrwxrwxrwx root root 2014-08-16 01:54 persist -> /dev/block/mmcblk0p21
lrwxrwxrwx root root 2014-08-16 01:54 recovery -> /dev/block/mmcblk0p15
lrwxrwxrwx root root 2014-08-16 01:54 rpm -> /dev/block/mmcblk0p7
lrwxrwxrwx root root 2014-08-16 01:54 sbl1 -> /dev/block/mmcblk0p3
lrwxrwxrwx root root 2014-08-16 01:54 ssd -> /dev/block/mmcblk0p20
lrwxrwxrwx root root 2014-08-16 01:54 system -> /dev/block/mmcblk0p23
lrwxrwxrwx root root 2014-08-16 01:54 tz -> /dev/block/mmcblk0p8
lrwxrwxrwx root root 2014-08-16 01:54 userdata -> /dev/block/mmcblk0p26
[Galaxy Note 3 Original Android Development] Bushido76:
I can confirm that /data is on /dev/block/mmcblk0p26 in the european N9005 variant.

---------- Post added at 07:27 AM ---------- Previous post was at 07:21 AM ----------

I experience the same problem when starting with a clean F2FS data partition. I have to restore a /data backup first to prevent /data from getting reformatted to ext4.
[Galaxy Note 3 Original Android Development] jcadduono:
Well that confirms that, I just wish it lead to anything that could help me figure this out. All references to formatting go to by-name/userdata so partition location doesn't matter grrrrr.

I just don't know!

It makes sense if it goes back to ext4 if the f2fs partition has no data on it, but for it to go back to ext4 and have all your original data?! :s
[Galaxy Note 3 Original Android Development] Bushido76:
As described in my previous post it seem that the system is changing back /data to ext4 under some conditions (i.e. clean f2fs /data partition). I don't believe it's a problem of the block reference. What could be responsible for that? Bootloader? System? Kernel?

---------- Post added at 07:38 AM ---------- Previous post was at 07:33 AM ----------

I experienced the same problem on my phone. When the system reverts to ext4 automatically my files on /sdcard were "back" after a reboot.
[Galaxy Note 3 Original Android Development] jcadduono:
Yeah that's what's mainly confusing me. When you format it should send a trim command turning the entire partition to 0s it shouldn't be recoverable. As for it turning back to ext4 that is probably just TouchWiz seeing nothing in /data and saying OK might as well reformat for fun!
[Galaxy Note 3 Original Android Development] Bushido76:
Are we sure that this is a "TouchWiz-only" problem? I could imagine that the system is looking for a special file/folder (maybe Android or data) to recognize, whether /data isn't empty. If we find out the logic we could "tweak" this a little bit.
[Galaxy Note 3 Original Android Development] kopitalk:
Ok so I tried formatting via adb recovery, first with cache and it shows successful.

~ # mkfs.f2fs -t 1 /dev/block/mmcblk0p24
F2FS-tools: mkfs.f2fs Ver: 1.4.0 (2014-10-18) [modified by Motorola to reserve space]

Info: Trim is enabled
Info: sectore size = 512
Info: total sectors = 614400 (in 512bytes)
Info: zone aligned segment0 blkaddr: 512
Info: format successful

Then I did a e2fsck and got a lot of errors.

~ # e2fsck /dev/block/platform/msm_sdcc.1/by-name/cache
e2fsck /dev/block/platform/msm_sdcc.1/by-name/cache
e2fsck 1.42.9 (28-Dec-2013)
ext2fs_open2: Bad magic number in super-block
e2fsck: Superblock invalid, trying backup blocks...
/dev/block/platform/msm_sdcc.1/by-name/cache was not cleanly mounted, check forced.
Pass 1: Checking inodes, blocks, and size
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Free blocks count wrong for group #0 (32364, counted=32360).
Fix<y>? yes
Free blocks count wrong for group #1 (32364, counted=32340).
Fix<y>? yes
Free blocks count wrong for group #2 (9660, counted=9659).
Fix<y>? yes
Free blocks count wrong (74388, counted=74359).
Fix<y>? yes
Free inodes count wrong for group #0 (6389, counted=6385).
Fix<y>? yes
Directories count wrong for group #0 (2, counted=5).
Fix<y>? yes
Free inodes count wrong for group #1 (6400, counted=6390).
Fix<y>? yes
Directories count wrong for group #1 (0, counted=1).
Fix<y>? yes
Free inodes count for group #2 (6400, counted=6399).
Fix<y>? yes
Directories count wrong for group #2 (0, counted=1).
Fix<y>? yes
Free inodes count wrong (19189, counted=19174),
Fix<y>? yes
/dev/block/platform/msm_sdcc.1/by-name/cache: ***** FILE SYSTEM WAS MODIFIED *****
/dev/block/platform/msm_sdcc.1/by-name/cache: 26/19200 files (0.0% non-contiguous), 2441/76800 blocks
~ #

After that, voila, back to ext4. Did the same procedure with /data, and lo and behold, back to ext4 :silly: Too bad I can't be possibly write the log here manually (too long).

~ # mkfs.f2fs -t 1 -r 16384 /dev/block/mmcblk0p26
[Galaxy Note 3 Original Android Development] jcadduono:
so a few bugs here...

trim is not working at all. e2fsck shouldn't recover anything if trim worked.

e2fsck needs to be updated then, because it should tell you that the partition is not ext* formatted.

f2fs tools maybe need updating too because when formatting f2fs it should wipe file locations to prevent e2fsck from doing this!

you found the reason that it returns back to ext4 though!

when using mount fstab in init, it tries to mount ext4 first, if that fails it tries to mount f2fs partitions

if ext4 is found and damaged, e2fsck is run (errors=check in fstab) to repair ext4 then freeze init and reboot with fixed ext4 partition

if we are to solve this issue, there are three solutions...

e2fsck needs to be patched to recognize f2fs magic byte so it doesnt try to fix it as ext4

get trim working in twrp

f2fs tools need to be patched in twrp to wipe whatever remains of ext4 fs header

backing up ext4 to f2fs is working because data from backup is overwriting the content that e2fsck is looking for, solving e2fsck overzealous repairing lol (silly init that's what fsck.f2fs is for!)

an alternative might be to run:

dd if=/dev/zero of=/dev/block/platform/msm_sdcc.1/by-name/userdata bs=4096 count=25600

that should write 100MB of zeros to start of userdata partition then you can format it to f2fs and e2fsck should stop trying to turn it back i hope...

not trying myself, guinea pigs are the greatest form of entertainment

edit: 4th solution is i could put f2fs mount above ext4 in priority...that is lazy and probably the easiest solution for me
[Galaxy Note 3 Original Android Development] kopitalk:
I'd have to say restoring ext4 backup on f2fs didn't work for me either. I've tried formatting /data to f2fs using twrp and then restore ext4 backup, no error (and thus I didn't bother to collect the log), but when reboot to system, it got stuck. Went to recovery, blank screen is back. Go all the way to flash stock recovery, wipe data, blah blah blah.

IIRC that's how it's arranged in lean kernel fstab (no system though).
[Galaxy Note 3 Original Android Development] ammarr:
The battery life on this kernel is unbelievable. Last two days, I've ended with 65% battery (3:30 SOT, 30 min calls) and 50% (4:30 SOT, 48min calls, quite a bit on LTE). New Anker battery. Bluetooth connected to pebble. IMAP push for 4 accounts. Browsing on firefox, texting, normal usage (i.e. not looking at a black AMOLED screen).

I've had a couple of days where wlan_rx_wake has hit me with 2 hr wakelocks, not sure if its normal, but I don't really care because I still get more SOT than I need.. I noticed that leankernel has a fix for wlam_rx_wakelock for the Nexus 6p. Is that something we can use?

On a slightly negative note, this means I have no real justification left to get another phone. Was looking at the Nexus 6p, LG G4, or One Plus X. Now, it seems like all of them would be a downgrade in some way, so I'm forced to stay ;)
[Galaxy Note 3 Original Android Development] Gggggas:
Guys does anyone have background processes like Glovebox, last app switcher, easy copy or 3rd party alarm apps getting killed?
[Galaxy Note 3 Original Android Development] jcadduono:
twrp 6.5.8 update is just a retheme, I spent forever trying to find the bug that's causing long boot screen but it seems to be something getting stuck in recovery binary not kernel :S probably selinux related as usual

Oh well. Boot splash is sexy enough to be worth the wait.

By the way, thanks so much for the donation [MENTION=428817]ammarr[/MENTION] !

Glad it's working for you. I can look into the wakelock issue with wlan receive though it's probably excessive multicast from devices on whatever WiFi network you're connected to. Perhaps I can reduce that a little bit. I'll need to poke around that thread and see how others are affected by the mentioned changes.
[Galaxy Note 3 Original Android Development] AM.8:
Hey guy's can anyone share the best settings for more smooth and better battery life? ?

Thanks in advance :)

Gesendet von meinem SM-N920C mit Tapatalk
[Galaxy Note 3 Original Android Development] ghalib87:
Default settings is the best one bro.
[Galaxy Note 3 Original Android Development] jcadduono:
builds for japanese variants coming soon! notify your friends on japanese note 3 :) this includes twrp, touchwiz, note5port. --- slim5.1 and cm not available unless they release roms for it.

also rebasing on GOI4 dcm firmware
[Galaxy Note 3 Original Android Development] Bushido76:
Hey JC, did you apply any changes to fstab in the meantime? Are we sure, that we do not have the same problems with ext4 after that change?

---------- Post added at 05:12 AM ---------- Previous post was at 05:07 AM ----------

I'd keep the default settings. They are already optimized for best battery life and good responsiveness. Maybe you can change file system to f2fs to improve the flash speed a little but at the moment there are some constellations in which switching from ext4 to f2fs is not working properly.
[Galaxy Note 3 Original Android Development] jcadduono:
Yup I'll add the f2fs before ext4 fstab changes. It shouldn't interfere with ext4 booting, but I will rely on you guys for feedback.

If you do change from ext4 to f2fs successfully, f2fs is pretty stable now so I do actually recommend trying it out! (once 6.5.9 is up, which will include ALL roms and twrp)

It's possible that some people's menu/back buttons could be buggy or stop working, or bluetooth/wifi could break completely.

Samsung massively overhauled the BCM bluetooth and wifi driver, and added new firmware and features to the touchkeys.

Updating to 6.6.0 (now decided) kernel WILL flash new firmware to your touchkey memory (home, back, menu buttons).

If the firmware flash fails, your back & menu keys won't work properly.

Flashing any other kernel should downgrade it without a problem though.

They're working fine for me, but I have the latest bootloader and stock firmware.

UPDATE: 6.6.0 is now live... big changes to some drivers so I'm expecting issues :( good news though hltedcm and hltekdi japanese variants are now part of the build group!
[Galaxy Note 3 Original Android Development] aaki_rocker:
what are the issues with 6.6.0 ?
[Galaxy Note 3 Original Android Development] kopitalk:
Seriously dude? Read the post above you... :D
[Galaxy Note 3 Original Android Development] aaki_rocker:
i get it buddy. the newer version has issues with keys and bluetooth.

i just wanted to confirm there are no other issues like random reboots and crashes, so that i can go forward and flash the newer kernel.
[Galaxy Note 3 Original Android Development] kopitalk:
Certainly no other issues other than the "suspected" new hardware drivers. May not have any issues at all though... :good:
[Galaxy Note 3 Original Android Development] Darikus:
issue proximity sensor 6.6.0 hlte-eur :rolleyes:
[Galaxy Note 3 Original Android Development] CatAlex:
Confirm!
[Galaxy Note 3 Original Android Development] Gggggas:
+1 everything else seems to work well
[Galaxy Note 3 Original Android Development] stavca:
+ 1 ...another confirmation of proximity sensor not working on intl. HLTE with CM12.1 based ROM
[Galaxy Note 3 Original Android Development] Pusheka:
Proximity sensor not working on AryaMod 8.0
[Galaxy Note 3 Original Android Development] pleataa:
hy there, on 6.60 version the proximity senzor does not work, on dark au note v3.5. After flash 6.6.0 he work.

n9005 eur version
[Galaxy Note 3 Original Android Development] acme1974:
*#0*# put the hand on the sensor and for me work. ..aryamod 8.0

Inviato dal mio SM-N9005 utilizzando Tapatalk
[Galaxy Note 3 Original Android Development] wild wadi:
Confirmed; proximity sensor not working on dark-au v3.5.
[Galaxy Note 3 Original Android Development] mertcanmusic:
+1

Gesendet von meinem SM-N920F mit Tapatalk
[Galaxy Note 3 Original Android Development] Pusheka:
No work. Screen not change to green, no vibration

That's when work.

On 6.6.0 does not work.
[Galaxy Note 3 Original Android Development] acme1974:
Sorry not work

Inviato dal mio SM-N9005 utilizzando Tapatalk
[Galaxy Note 3 Original Android Development] troemer:
Proximity Sensor is working fine here with 6.6.0 and Aryamod 8.
[Galaxy Note 3 Original Android Development] acme1974:
Screenshot please

Inviato dal mio SM-N9005 utilizzando Tapatalk
[Galaxy Note 3 Original Android Development] troemer:
Failure. Proximity Sensor don't work ?. GPS Precision isn't so good as on 6.5.5.
[Galaxy Note 3 Original Android Development] mertcanmusic:
No fix for proximity sensor ? Im use note 5 port (Dark-Au v 3.5)

Gesendet von meinem SM-N920F mit Tapatalk
[Galaxy Note 3 Original Android Development] jcadduono:
Proximity sensor will be fixed in a few hours, no changes at all made to GPS probably just not hitting enough towers. Seems to be the only issue reported so I really hope it is the only issue before I start another 2 hour build lol
[Galaxy Note 3 Original Android Development] Bushido76:
What is the intention of a new touchkey firmware? Is my back button working as fingerprint sensor after the update? ?
[Galaxy Note 3 Original Android Development] CatAlex:
Only Proximity issue for me.

GPS works fine on "my" ROM and Modem.
[Galaxy Note 3 Original Android Development] jcadduono:
It gives roms a new hook for simultaneous menu key and back key press function. It's probably only used in marshmallow though. :/

Samsung's comments in their code says it can be used in lollipop to turn off app pinning but doesn't seem to be implemented in DOH1 ROM yet.

I actually had most of those changes in the kernel a while back and had to revert them because N9005 users couldn't use their back and menu buttons lol.

Update: ok big problem now I can't get proximity sensor to work on any version of idleKernel, it just reports 8cm at all times.

Update 2: nevermind apps don't even work with proximity sensor, it's definitely reporting properly @ cat /sys/class/sensors/proximity_sensor/state

yup cat /sys/class/sensors/proximity_sensor/state works on all versions including 6.6.0 but all apps keep reporting 8 cm????

does reverting to 6.5.5 fix the proximity sensor for anyone?
[Galaxy Note 3 Original Android Development] troemer:
For me yes
[Galaxy Note 3 Original Android Development] vladcasandra:
Yes reverting to 6.5.5 fix the proximity sensor
[Galaxy Note 3 Original Android Development] Pusheka:
Yes 6.5.5 fix it
[Galaxy Note 3 Original Android Development] jcadduono:
ok found my problem...needed to recalibrate my sensor now i see it working in 6.5.5.

got it working in 6.6.0 it seems to be a bug in the driver code rather than the firmware binary. gonna try nailing down the bug, i hate reverting updates.

if it's still not working when i upload 6.6.1, you guys can open terminal emulator or adb and do

(blow into earspeaker to remove any dust, place phone on ground facing up, make sure nothing is above earspeaker for at least 3 ft)

su

echo 1 > /sys/class/sensors/proximity_sensor/prox_cal

chown system:system /efs/prox_cal (not need, added to ramdisk in 6.6.1)

chmod 0644 /efs/prox_cal (not need, added to ramdisk in 6.6.1)

(reboot through power menu or type sync && reboot)

this will recalibrate the adc offset for proximity sensor making sure it responds to the right closeness distance

fix here: https://github.com/jcadduono/idleKernel-note3/commit/11146ae84057137d8b71513d42c9dcea2df84258 (fixed again, forgot to sync calibration from prox_cal on enable proximity sensor :) )

and here, just in case... https://github.com/jcadduono/idleKernel-note3/commit/e7a546acbfb19a932e075cb9a045f359a2f102c3

6.6.1 compiling.... :(

compiling is a good time to watch jessica jones on netflix what do you guys like to do when you compile 156** kernels lol

it's really even more awful uploading them. that's about 1 GB of flashable tars and zips, compressed down to 380 MB in a 7z (I can't help but think maybe I should just generate tars and regen zips from server side lol...)

on my canadian internet, limited to 55 KB/s upload, that's like an hour and 55 minutes ><

ok better idea...git repository on the server too, build script uses ssh to update git sources and then build over there so i can enjoy my cpu time and internets in peace
[Galaxy Note 3 Original Android Development] Pusheka:
6.6.0 when the proximity sensor was not working, the battery life was great :)
[Galaxy Note 3 Original Android Development] Darikus:
please create video institutions how change ext4 to f2fs? :what::beer:
[Galaxy Note 3 Original Android Development] jcadduono:
Sorry guys, I spent a lot of time trying to find a way to get a screen session running so I could build on the server instead of having to upload.

My server has a pretty decent processor, so I figure it's a good option.

Here's the solution I came up with, in case anybody ever tries this themselves lol...

On my PC:

build-idlekernel-release.sh:

#!/bin/sh
[ -z "$VER" ] && {
echo "you forgot to specify a version again, idiot"
exit 0
}
ssh -t yourname@server.com "tmux new -s buildidle \"VER=$VER /home/yourname/build/idleKernel-release.sh\""

On idleKernel.com server:

/home/yourname/build/idleKernel-release.sh:

#!/bin/sh
export VER
cd /home/yourname/build
./sync-idleKernel.sh
./build-idleKernel.sh
echo "ALL COMPILED."

/home/yourname/build/sync-idleKernel.sh:

#!/bin/sh
cd /home/yourname/build/idleKernel-note3
git remote update
for branch in $(git branch | cut -c 3-); do
git checkout $branch
git reset --hard origin/$branch
done

/home/yourname/build/build-idleKernel.sh:

#!/bin/sh
export RDIR="/home/yourname/build/idleKernel-note3"
export VER
cd $RDIR
git clean -xdf
git reset --hard HEAD
for branch in $(git branch | cut -c 3-); do
git checkout $branch
./build_all.sh
git clean -xdf
git reset --hard HEAD
done
echo "ALL DONE!"

Started builds about 10 mins ago, then found out I didn't even have "zip" installed so restarting lol!
[Galaxy Note 3 Original Android Development] jcadduono:
First back up your internal storage to your PC or external sdcard, it will be wiped when switching data to a new filesystem format

Flash the latest TWRP for your device (3.0.0 or newer has f2fs support on hlte!)

Make sure a microSD card is inserted, or use OTG USB Storage.

Boot into recovery.

Press [Backup].

Put [X] in System and Data only.

* Optionally enable compression

WARNING: Make sure it says "Storage: Micro SDcard" or "Storage: USB Storage" (you'll lose everything if it doesn't)

Swipe to start the backup, and wait for it to finish successfully.

Go back to main menu and navigate to [Wipe] -> [Advanced Wipe].

Put [X] in System only.

Navigate to [Repair or Change File System] -> [Change File System] -> [F2FS].

Your System partition should now be f2fs formatted.

Go back to the Wipe menu.

Press [Advanced Wipe].

Put [X] in Data only.

Navigate to [Repair or Change File System] -> [Change File System] -> [F2FS].

Your Data partition should now be f2fs formatted.

Go back to main menu.

Press [Settings].

Put [X] in "Use rm -rf instead of formatting."

Go back to main menu.

Press [Restore].

Select the backup you made earlier.

Put [X] in System and Data.

Swipe to restore, and wait for it to complete successfully.

Go back to main menu.

Navigate to [Reboot] -> [System].

Finally... Scream in agony when it doesn't boot ;)

Otherwise hit Thanks on my post? <3
[Galaxy Note 3 Original Android Development] 6h0st:
Proximity sensor is not working on AryaMod 8. Just confirming. Battery life is better without Proximity sensor. Maybe you should add a feature for this in ik-terminal. :) (to be able to keep Proximity sensor off).