yashsingh1/xdaforums huggingface dataset:
[Optimus One, P500 Android Development] bigsupersquid:
twrp built with f2fs in kernel and TARGET_USERIMAGES_USE_F2FS := true

changes sdcard ext filesystems to f2fs ok but errors while trying to f2fs format internal /cache.

so far I can't get it to flash to the f2fs ext partitions either, I need to look into the updater-script probably.

mount("f2fs", "EMMC", "/dev/block/mmcblk0p2", "/system");

isn't working.

mount: failed to mount /dev/block/mmcblk0p2 at /system: Invalid argument

ah, looking at updater-script from here

ui_print("Format and Mount System, Mount Data...");

run_program("/sbin/mkfs.f2fs", "/dev/block/platform/sdhci-tegra.3/by-name/APP");

run_program("/sbin/busybox", "mount", "/system");

run_program("/sbin/busybox", "mount", "/system");

package_extract_dir("system", "/system");

package_extract_dir("data", "/data");

they don't use the recovery mount commands.

figured this info might be worth sharing.
[Optimus One, P500 Android Development] HardLight:
ROM with /data mounted with f2fs

Download

1. Use TWRP-f2fs and OS2SD partition layout.

Note /data will be formated!

2. Go to Wipe>Advanced Wipe select Data. Then Repair or Change File System>Change File System>F2FS.

3. Install ROM

4. You have /data with f2fs :)

Bugs: recovery can't mount /data (almost resolved)
[Optimus One, P500 Android Development] xu3sno:
Yes, it worked. :victory:

Still using TWRP 2.7.0.0 -20140725. Will try it with TWRP-f2fs later.
[Optimus One, P500 Android Development] xu3sno:
Tested on top of 20140823 and it works! :good: :cool: After flashed the kernel, no need to wipe cache and dalvik cache, hence all links in Link2SD remain.

EDIT: [MENTION=4553005]Notonlyeyes[/MENTION],

After using the kernel for quite sometime, I noticed that the WiFi didn't work. :(

Sorry for disturbing your weekend with this message :).
[Optimus One, P500 Android Development] bigsupersquid:
http://xdaforums.com/showpost.php?p=55142468&postcount=8

f2fs enabled twrp multi .img for testing

flashable zip added to shared download folder as well.
[Optimus One, P500 Android Development] Notonlyeyes:
[MENTION=4685929]xu3sno[/MENTION] it is not a disturbing, it is a pleasure ..sorry, it happened 2 times even in my test, I underestimated the problem ..

I have 2 solutions:

- the first is to with a Explorer deleted wireless.ko in system/lib/module and install 2 times in a row my kernel..reboot and check with the file explorer wireless.ko in system / lib / module

- the second extract from my kernel file wireless.ko, copy with Explorer file in system/lib/module and change the permissions in rw-r-r..and reboot
[Optimus One, P500 Android Development] xu3sno:
Well, you're really a generous man. :)

Didn't work. After reboot no wireless.ko module in /system/lib/modules. :) Then, went to second option.

Yes, now it's working out of the box. Thanks a lot, bro! You made my day, really. :good:

PS:

I flashed the kernel over cm-11-20140830-NIGHTLY with TWRP-2.7.0.0.-20140725 from [MENTION=4974969]HardLight[/MENTION].
[Optimus One, P500 Android Development] HardLight:
CM11 with /system and /data mounted with f2fs

Everything works I think, just follow my previous post for changing /data filesystem type if you didn't do that yet.

/system partition changes to f2fs automatically.

Also use updated TWRP recovery 20140831, now it mounts all partitions.

Download

Update:

What do I need to migrate without loosing data?

[LIST=1]
[*] ADB installed on your PC (somehow adb in recovery working only on linux for me) or use Terminal emuliator on TWRP
[*] sdcard with enough memory to backup whole your /data partition
[/LIST]

How to perform a migration?
[LIST=1]
[*] Reboot to recovery.
[*] Go to Mount menu and make sure that /data and /MicroSD are selected.
[*] Open Command Line (Windows) or Terminal (Linux/OS X) on your PC or Terminal emuliator on TWRP
[*] Type: adb shell and press ENTER (skip this if you are using Terminal emuliator on TWRP).
[*] Type: tar -cvpzf /sdcard/data.tar.gz /data
[*] Wait until operation will finish. If you see any error, it means you don’t have enough free space on your SDcard.
[*] Perform steps to format /data to f2fs.
[*] Go to Mount menu and make sure that /data and /MicroSD are selected.
[*] Now type: tar -xvpzf /sdcard/data.tar.gz -C /
[*] If previous step didn’t produce any error, reboot your phone and check if it’s boot succesfully. If yes, you can safely remove data.tar.gz file from your SD card.
[*] Done. You have migrated to f2fs without loosing your data!
[/LIST]
[Optimus One, P500 Android Development] Notonlyeyes:
[MENTION=4974969]HardLight[/MENTION]

Help Please FM support

Note: https://github.com/hicannon/android...mmit/669834afabfa6aa607c80f4ff14afd9c15b4b3c3
[Optimus One, P500 Android Development] mns123:
Now using cm-10.2.0-p500.zip

http://jenkins.androidarmv6.org/view/All/job/android/783/artifact/archive/cm-10.2.0-p500.zip

Spirit FM works out of the box in this. Please make FM work on cm-11 roms
[Optimus One, P500 Android Development] xu3sno:
Yeah it (Nov 16) works on JB and it's already reported in mukulsoni's thread :). Well, according cm-11 known issues it works but need BT as mukulsoni posted in his OP. Mean while, Spirit FM (Nov 16) works as it should be on OMNI ROM, no need BT :cool:
[Optimus One, P500 Android Development] nomancoolboy:
F2fs on p500 ! .. You guys are amazing ..

Will try this ASAP
[Optimus One, P500 Android Development] aaopt:
Quite an impressive undertaking.

I have a new sdcard to play with so I let the new f2fs TWRP partition it. It worked eventually but it formatted /system and /data as ext4.

Then I installed the matching f2fs ROM. First try said it failed to set metadata. Second try claimed to succeed. I am getting repeated force closes of "Android Keyboard (AOSP)". In logcat I see this:

E/AndroidRuntime( 2330): java.lang.RuntimeException: Unable to get provider com.android.inputmethod.dictionarypack.DictionaryProvider: java.lang.ClassNotFoundException: Didn't find class "com.android.inputmethod.dictionarypack.DictionaryProvider" on path: DexPathList[[zip file "/system/app/LatinIME.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
E/AndroidRuntime( 2330):	at android.app.ActivityThread.installProvider(ActivityThread.java:4955)
E/AndroidRuntime( 2330):	at android.app.ActivityThread.installContentProviders(ActivityThread.java:4547)
E/AndroidRuntime( 2330):	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4487)
E/AndroidRuntime( 2330):	at android.app.ActivityThread.access$1500(ActivityThread.java:144)
E/AndroidRuntime( 2330):	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1265)
E/AndroidRuntime( 2330):	at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 2330):	at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime( 2330):	at android.app.ActivityThread.main(ActivityThread.java:5179)

Could it have been a bad flash despite the TWRP success message the second time? df says...

/system 731.0M 313.6M 417.4M 4096
[Optimus One, P500 Android Development] bigsupersquid:
that's normal and is currently hardcoded, I'm considering a filesystem type switch in the partitioner.

You might try removing it from /system and sideloading the apk with adb.
[Optimus One, P500 Android Development] aaopt:
Good thought. Unzipping that APK gives a CRC error.

$ unzip -j cm-11-20140831-OS2SD-f2fs-p500.zip system/app/LatinIME.apk
Archive: cm-11-20140831-OS2SD-f2fs-p500.zip
signed by SignApk
inflating: LatinIME.apk bad CRC 7a8685ce (should be 0705c5a8)

Did I miss the md5sum for the posted ROMS? Just want to check if it is a problem with the zip on my end or at the source.

I "adb push"ed a LatinIME.apk from an internal ROM I built from androidarmv6 source and it's working.
[Optimus One, P500 Android Development] STEELBAS:
Seems that it isn't just you, I also have a corrupted keyboard. Currently trying to get ADB to let me push a different keyboard apk to the phone.
[Optimus One, P500 Android Development] bigsupersquid:
here, flash in recovery

md5 5a34027c7180b588741eb40e271a3d14

os2sd only, by the way, change updater-script system mount point to flash to internal.
[Optimus One, P500 Android Development] STEELBAS:
Thanks!

Anyone else have trouble with the Camera app, too?
[Optimus One, P500 Android Development] xdema:
there are differences between your's 30/08 f2fs rom and HardLight's 31/08 f2fs rom?

with 7zip. i can't edit the 31/08 zip file, while in 30/08 i can change/overwrite files (i.e. the files to mod power<->search buttons)

and with twrp i can flash your but not the HardLight's (a red "failed") tomorrow i'll try to download it again, maybe is a simple download corrupted

thanks for all

[MENTION=2609616]STEELBAS[/MENTION] on 30/08 f2fs i've no problem with camera
[Optimus One, P500 Android Development] bigsupersquid:
could be minor differences, my repo isn't quite pure androidarmv6 but close. my kernel has a few extra tweaks like frandom support, uhid for Bluetooth keyboards, usb fastcharge...

I'd have to unpack and diff them both to see.

my twrp may not cooperate with the 3108, I haven't checked.

also the recovery log helps sometimes to figure out exactly why something won't flash.
[Optimus One, P500 Android Development] bigsupersquid:
I kept seeing this repeat in logcat on thunderc, checked, and it happens on thunderg too.

over and over again.

W/SchedPolicy( 597): add_tid_to_cgroup failed to write '1192' (Permission denied); policy=0

W/System.err( 597): java.lang.SecurityException: No permission to set to given group

this commit fixes it.

But, I put it in init.qcom.rc, rather than digging into the stock init.rc.

I actually think it should go upstream to androidarmv6 (since it affects more than one msm7x27 device, and it's a simple fix) but I don't have any gerrit set up yet.

It goes after "on boot", like so:

on boot

##fix "add_tid_to_cgroup failed to write" errors
chmod 0660 /dev/cpuctl

# allow reading kernel command line
chmod 0644 /proc/cmdline
[Optimus One, P500 Android Development] angelgzg:
How to get other dictionaries to the keyboard? Spanish eg

And I try to install the gapps and installs but then when you restart the phone do not appear in

It also seems to not work on 3G data, or maybe just be my
[Optimus One, P500 Android Development] aaopt:
That happened to me too. Then I went back to TWRP and tried again and the second time it worked. Odd...
[Optimus One, P500 Android Development] angelgzg:
If it works for me
[Optimus One, P500 Android Development] aaopt:
Speaking as an outsider, I'd encourage you [MENTION=2980661]bigsupersquid[/MENTION] and [MENTION=4974969]HardLight[/MENTION] to set up gerrit. Aside from this fix I would think they would be interested in incorporating some of your other changes. Looking at your github it seems you have a separate device profile for the OS2SD build. If the changes for OS2SD can be isolated enough such that the same tree can build both ways based on the device name-- and it seems you are moving in that direction-- then I see no reason they wouldn't want to support that. If it becomes an official part of androidarmv6 then I guess their jenkins would wind up building both flavors of ROM for all the variants, including p505/509 etc.

For now, this ROM seems to run well on my p509. Haven't tried with a SIM card.

Any idea why the androidarmv6 build, and this ROM as well, doesn't include Email.apk? I notice Exchange2.apk under "extras" in the zip fie but no Email.apk ... and nothing in the updater script seems to be trying to install anything from under extras/ anyway. (For my current purposes I don't actually need Email.apk, just thought it was odd to have Exchange2.apk backend building without Email.apk.)
[Optimus One, P500 Android Development] ruelericsapalaran:
Link2SD problem

I decided to install Link2SD in my device so that the clearing of cache will be automatic since my device is slowing down a bit for a reason I don't know. Unfortunately, after the phone restarted, it got into a bootloop. Is there any chance to still retrieve the text messages and other data on my device?
[Optimus One, P500 Android Development] bigsupersquid:
pull email from my last thunderc os2sd build (it's a bit stale but should work.)

I'm getting to gerrit, eventually. i have thunderc playing nice together with thunderg in the kernel now, and maybe this weekend I'll have the rest of thunderc stable enough to consider upstreaming (but they build internal only, psyke83 specified no interest in os2sd because he'd already played with something similar while originally fixing up the kernel, and internal is hard to fit on thunderc.) i doubt it though.:silly:

that one patch, I'd consider sending up, but figure I'd see if HardLight wanted to do it as I'm fairly sure he's already set up for that.

there are crazinesses in my device folder to handle dual mode building since i haven't completely puzzled out the way that all works yet. i know what to isolate though and as I've had time I've been trying to refine it into a lunchable format. failed so far but I'm persistent and gettin' more learned all the time, eh?

---------- Post added at 07:27 AM ---------- Previous post was at 06:48 AM ----------

the whole deal with os2sd is running everything from the sd card already except for /cache. use a dedicated cache cleaning app instead.

so link2sd totally borks everything up.

your /data partition mounted in recovery in os2sd mode has all your stuff in it. unless link2sd copied some of it over to /system as well.
[Optimus One, P500 Android Development] haoss07:
Some debugging needed

i have some people complaining about hearing themselves when they call me . anyone had this problem ? any ideas ?
[Optimus One, P500 Android Development] xdema:
didn't you use original LG p500 headphones? that can be the problem, i've that problem with some headphones
[Optimus One, P500 Android Development] ibub:
That can also be a network problem. I have experienced that in poor signal area. Or can be noise cancellation problem using speakerphone or headphones.
[Optimus One, P500 Android Development] haoss07:
sadly. non of the above applies to my problem. i don't use headphones or put them on speaker . its a normal call.

signal is also good. i live in the middle of a big city . never had problems.with signal. :(
[Optimus One, P500 Android Development] HardLight:
[14/09/08] f2fs

New version:

Improved mount options for f2fs.

Fixed ram usage not shown in Settings>Apps>Running.

Also here is attached flashable zip of Dialer.apk with white-listed call recording feature.

Please note that I'm not taking any responsibilities of this call recording option in Dialer. Use it only if it is legal on your country!

EDIT: Gapps updated!
[Optimus One, P500 Android Development] haoss07:
hmm. i installed latest rom. with the new file system . flashed gaps like 5 times. but i'm still missing the market app. ideas ?
[Optimus One, P500 Android Development] haoss07:
Tried the new gaps. i'm stuck at boot animation :(

L.E. managed eventually to make it work. data partition got f*ket up
[Optimus One, P500 Android Development] angelgzg:
wifi does not work and not because the system appears as particionde occupies full 370 mb this
[Optimus One, P500 Android Development] xdema:
did someone else have issue with in call microphone (low volume) on last rom?
[Optimus One, P500 Android Development] HardLight:
Data2sd 14/09/10

After using OS2SD for over a month I've decided to try mount /data on sdcard and leave /system on internal.

This is how DATA2SD born.

The main reason of this change is to fix phone slow downs which occurred while I was using OS2SD. Sometimes it appeared as phone just won't wake up from sleep for a minute after key was pressed. So until cause of I/O performance drop will be found I'll be experimenting with this project.

I'm testing this for a day, but overall performance seems to be much better.

Main highlights of DATA2SD:

/system mounted on internal

/data mounted on sdcard partition 4 with f2fs

Rom uses OS2SD partition layout

New Gapps uploaded to fit on internal, install PrebuiltGmsCore.apk as user app, (GoogleSearch.apk optional)

To flash Rom and Gapps use twrp-2.7.1.0-20140831-MULTI-F2FS-p500.zip with Internal mode on

Downloads:

ROM

Google drive

GAPPS

Google drive

TWRP

Google drive
[Optimus One, P500 Android Development] bigsupersquid:
sometimes that lag is so bad it won't screen on and just falls back asleep. it is definitely a problem.

started trying this: (in system.prop, thunderc since my o1 broke)

# sleep modes

pm.sleep_mode=3

#usage:

#pm.sleep_mode=0 -> collapse suspend

#pm.sleep_mode=1 -> collapse (will totally power off the cpu)

#pm.sleep_mode=2 -> sleep (cpu is still on, but put into low power mode (registers are still saved)

#pm.sleep_mode=3 -> slow Clock and Wait for Interrupt (lowered frequency and voltage)

#pm.sleep_mode=4 -> wait for interrupt (no change in cpu clock or voltage)

in the system props seems to help with the slow wake.

mode 0,1,2 all lag badly on wakeup. need to test 4 and see it it's better, but it'll probably remove any deep sleep benefits.

and apparently 3 is the default. My experimental builds are all that's using 0,1,2.
[Optimus One, P500 Android Development] aaopt:
I tested a couple CM11 internal ROMs before trying OS2SD. Nothing worked well for me, at least not after I installed GApps. Seems the space on the system partition was just too tight. What I really wanted to try was something like DATA2SD but reusing space from the internal /data partition for /system/app and/or /system/priv-app. But I decided to just go with your OS2SD setup because standards are good... and that way I wouldn't have to make my own TWRP.

So I bought a few SanDisk Ultra 16GB cards, very reasonable at Amazon. Actually they were on sale for even less yesterday but I had already bought three last week. I was impressed by how much faster TWRP was to install ROMs to the new SD card vs installing to internal. I do still definitely see lag on wake though.

So, I have to ask... considering OS2SD vs DATA2SD, is DATA2SD really better for overall performance? Or, aside from lag on wake, maybe OS2SD is faster?

DATA2SD is definitely more important than OS2SD. And it seems some people may want to choose. Using current TWRP with DATA2SD (but OS internal) ROMs is not ideal though. If you want to back up both data and system, you have to do them separately and switch modes in between. Am I right?

The idea that TWRP can support both internal and external data, and both internal and external system, is wonderful. But to make it really seamless, it needs work. One approach:

Remove the mode switch button.

ROM install zips should go back to explicit mounting rather than relying on TWRP fstab.

Update zips and GApps zips should continue to use your busybox trick.

After every zip install-- including between zips when stacking multiple zips-- and during TWRP boot, TWRP should rewrite its own fstab. All the /data and /system related mounts from its own fstab should be removed, and replaced by the /data and /system related mounts from the boot.img partition's fstab. (Removing "ro" but keeping other boot options.)

I'm not saying it's easy, but if you can pull it off, TWRP would be much more seamless. No need to worry about mode switch, no need to remember to switch to "internal" mode before you do anything if the currently installed ROM is "internal", and all the TWRP mount and backup buttons should "do the right thing" regardless of whether the currently installed ROM is internal, DATA2SD, or OS2SD.
[Optimus One, P500 Android Development] xdema:
so, if i've understand your list, with this pm.sleep we can save max battery with the mode 1 (cpu power off->so we have to restore registers etc.), mode 2 make apps sleep.

I've few problem of phone wake up, with old os2sd, sometimes happens when i lock&unlock one after one. (sandisk ultra class 10 SDHC I )

on 2nd p500 has a lot of wake up issue, and generic lag with os2sd f2fs & gapps (transcend class 10 SDHC) maybe it's a problem related to the sd
[Optimus One, P500 Android Development] bigsupersquid:
I've had very little luck playing with the pm sleep settings.

better to watch your ram usage and kill unnecessary things running if it gets too high.
[Optimus One, P500 Android Development] xdema:
about the installation method, automatic recognize the type of rom by twrp & backup etc. i agree with you but i think these changes could be done when the project will be more stable/tested :)

about performance comparatives between data2sd & os2sd, aren't we here to do that? ;)

Thanks to [MENTION=4974969]HardLight[/MENTION] i'll have something to do this rainy week end :D

no the ram was "empty", no apps installed except gapps, i have took a 2nd sd from sandisk to test the problem, but now i'll test the data2sd :D

the "strange" is with daily phone i've 99 apps on the phone, RAM: usually 300mb used & 120 free (whatsapp, message, swiftkey, copilot and settings, take >20mb each one) the others are not enabled to automatically start up (amazon, appfree,titanium), so i've ram when needed.

some apps lags on start (i.e. settings), but it's ok, and few seconds (1-3 max) of wake up problem sometimes (as i said when i try to fast lock&unlock ) on 18/08 os2sd rom.
[Optimus One, P500 Android Development] bigsupersquid:
card may shut down during sleep and be unreadable until it remounts. gotta check into that more.
[Optimus One, P500 Android Development] angelgzg:
That I can do to make wifi work?

Edit: Work
[Optimus One, P500 Android Development] bigsupersquid:
I got this accepted upstream so it should be fixed in jenkins builds from here on out.

turns out I did have my gerrit account set up but hadn't done anything with it.
[Optimus One, P500 Android Development] patil.ketan:
Edit: I installed DATA2SD version ROM and GAPPS. But I am not able to add google account, everytime I try it says, "Unable to contact google servers Please try later"

Is there a workaround to this?
[Optimus One, P500 Android Development] aaopt:
How big did you make your system partition? I had this error when installing an internal ROM and it seemed to be because the internal system partition wasn't quite big enough.
[Optimus One, P500 Android Development] patil.ketan:
Ohh sorry I had typo there... :(

I actually installed data2sd f2fs versions of ROM and gapps

I think the SD card partition should not matter for that.

Is there any other gapps version i can try?
[Optimus One, P500 Android Development] haoss07:
i think this also happen to me this morning. usually i have problems waking up the device. but this morning i had the symptoms of a removed card with the rom on it (os2sd ). screen black with backlight on it. adb could not connect to get a log
[Optimus One, P500 Android Development] HardLight:
New OS2SD

Hi all,

After investigation why phone was slowing down after a while of usage even on DATA2SD, I found that the real cause of that was huge apps (fb, google play and etc) staying in background services and using to many phone recourses. After configuring greenify to put those and some system apps to sleep, now phone runs smoothly. I always have about 130 MB free RAM and it indicates that there are very few background apps running, try to keep this on your phones too.

Because I see no difference of performance between OS2SD and DATA2SD, I'll probably cancel DATA2SD branch from now.

Also new OS2SD f2fs build is uploaded.

Download
[Optimus One, P500 Android Development] haoss07:
can u provide a list of system apps that you tested and are safe to greenify ?

what they should help also :)

P.S. any changelog for last version ?
[Optimus One, P500 Android Development] HardLight:
There is no sorting in greenify by app type so can't say nothing specific, but probably all apps is safe to hibernate. Just look apps under settings>apps>running and try hibernate them. If some functions won't work degreenify app.

Changelog is same as cm, no additional tweaks are needed for now.