yashsingh1/xdaforums huggingface dataset:
[ONE Android Development] tobitege:
I'd never start flashing with such low battery. Also with regard to potential random reboots try to format the recovery partition with fastboot command and then reflash TWRP again (as reported by [MENTION=5503367]Criton30[/MENTION] here).

Example commands:

fastboot erase recovery
fastboot flash recovery twrp-2.8.3.0_bacon-signed.zip
fastboot reboot

Late edit: replaced "format" with "erase", thanks [MENTION=5503367]Criton30[/MENTION]
[ONE Android Development] raybit10:
One question.... does this mean that if i am running now "zaphod-AK0.74-temasek-bacon-v3.9-2P-f2fs.zip", I must clean flash Katinatez stock and then flash AK's kernel on top?

(It seems like dirty flashing "zaphod-temasek-stock-bacon-v4.0-2P-f2fs.zip" On top of "zaphod-AK0.74-temasek-bacon-v3.9-2P-f2fs.zip" is way too dirty... lol... right?!? ;))

Thank you for that!

I was hoping to learn that someday!

When i first saw your posts I was so happy that I wasn't the only one with that superstition (or just minor OCD... I don't know how to call it)... LOL :laugh::good:

"oohhhhhh.... the feeling!....."
[ONE Android Development] Criton30:
better is full cleaning....

fastboot erase recovery

fastboot format recovery <-- does not work

fastboot flash recovery recovery.img

fastboot reboot
[ONE Android Development] zaphodbeeb:
Hi,

I have also had this. I dont think its battery related. I occurs on both multirom and Katinatez TWRP. Sometimes it was possible to get around it as follows:

- When the blue TWRP screen appears, touch it. Twrp loaded then (sometimes). Another way I found to get it to load was to try a different method to invoke recovery. Sometimes powering off the phone and using power and volume down would work, or use the go to recovery option in the multirom boot menu, sometimes from the boot to recovery advanced power menu in the rom.

I ended up saving flashable philz, multirom, twrp script on my phone so I could swap when needed. Philz seems to always work.
[ONE Android Development] zaphodbeeb:
To upgrade an existing AK, try this. Do a nandoid backup, install a new version f2fs rom (stock is probably best for this), flash the AK kernel, then restore the Data only from the nandroid.

If you want to make your own flashable version follow my post below.
[ONE Android Development] DerRomtester:
Nice guide you should start an own thread for this.
[ONE Android Development] tobitege:
Nice writeup, [MENTION=3874152]zaphodbeeb[/MENTION]. +1 on [MENTION=4804871]DerRomtester[/MENTION]'s suggestion for a tutorial thread.

On windows one can use the Androit Image Kitchen (AIK) to unpack/pack (boot).img file(s).

It's batch file driven, but can be worked with (WinRAR for drag'n'drop in/out of boot.img to/from archive etc.)

In your above replace mount->busybox code snippets the /system one is there twice.
[ONE Android Development] zaphodbeeb:
How to produce a multirom flashable fsf2 rom

In my post how to make a flashable f2fs rom, you had a choice of producing a f2fs-all type rom or a f2fs-mixed type rom.

To produce a rom that works with multirom you have to make the same choice again as the process is a little different for each as the starting updater-script files are different.

Our starting point here is the f2fs rom that you produced by following the post above.

We only need to make changes to the updater-script here. There are no kernel changes required.

Again I'm using ubuntu here, but all of this is also possible with windows (hint only use notepad++ for making changes to updater-script in windows else you will experience pain and woe).

For f2fs-mixed roms

1. Open your f2fs-mixed rom and open the updater-script.

Find

ifelse(is_mounted("/system"), unmount("/system"));
if ! is_mounted("/system") then
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system", "");
endif;

and replace with

mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system", "");

Next find the lines

if is_mounted("/data") then
package_extract_file("system/bin/otasigcheck.sh", "/tmp/otasigcheck.sh");
package_extract_file("META-INF/org/cyanogenmod/releasekey", "/tmp/releasekey");
set_metadata("/tmp/otasigcheck.sh", "uid", 0, "gid", 0, "mode", 0755);
run_program("/tmp/otasigcheck.sh") != "31744" || abort("Can't install this package on top of incompatible data. Please try another package or run a factory reset");
else

and delete them

Also a few lines further down you will find

end if

delete this also

2. Now save the changed updater-script, and also update the zip file.

For f2fs-all

1. Open your f2fs-all rom and open the updater-script.

replace

ifelse(is_mounted("/system"), unmount("/system"));
if ! is_mounted("/system") then
run_program("/sbin/busybox", "mount", "/system");
endif;

with

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

then find and delete

if is_mounted("/data") then
package_extract_file("system/bin/otasigcheck.sh", "/tmp/otasigcheck.sh");
package_extract_file("META-INF/org/cyanogenmod/releasekey", "/tmp/releasekey");
set_metadata("/tmp/otasigcheck.sh", "uid", 0, "gid", 0, "mode", 0755);
run_program("/tmp/otasigcheck.sh") != "31744" || abort("Can't install this package on top of incompatible data. Please try another package or run a factory reset");
else

A few lines down you will find

end if

delete this line

2. Now save the changed updater-script, and also update the zip file.

Happy f2fs multirom f2fs flashing.:laugh:
[ONE Android Development] zaphodbeeb:
How to produce a flashable rom using a non stock kernel

In my previous post, how to produce a flashable f2fs rom, you produced a rom from the stock kernel. There are of course many other flashable kernels available such as Sensei, AK, and Tyr but when you open these you'll find that they dont contain a boot.img.

So how to produce a flashable version of these? Easy peasy, lemon squeezy. There are other ways of doing this with adb etc but this is real easy.

Using Ubuntu again (only a little)

1. Install your stock f2fs rom to your oneplus, with gapps and SuperSU

2. Install this great little app.

3. Flash your kernel of choice onto your stock f2fs device.

4. Reboot and open the app.

5. Backup your kernel (if you set this so it produces the backup in your downloads folder is easiest).

6. plug your phone into your computer and copy the resulting boot.img file to it

You will see that the resulting file is generally quite large (about 16M). It will still work but ts best to clean it up a little so,

7. place the boot.img file in your boot-tools folder you made from my earlier post.

using terminal, navigate to boot-tools and type

bash unpackimg.sh

to make sure we cleaned up previously when using boot-tools, then

bash unpackimg.sh boot.img

No changes are required so then just type

bash repackimg.sh

You will see a new file appear in the boot-tools folder which needs to be renamed to boot.img before adding it to your new rom. Its now not 16M but something more sensible.

8. Copy and rename your original stock rom to a new name for your mix.

9. Add the new boot.img file (it will over write the original boot.img file in the zip)

10. Finally, flash your new rom.

Please note: The flashable kernels noted here will flash onto f2fs-all or f2fs-mixed setup. When you flash them, they read the environment they are being installed into and apply the necessary changes to the fstab file for the environment, so you dont need to muck about changing this.

Happy f2fs flashing:laugh:
[ONE Android Development] zaphodbeeb:
Hi, the post is correct, as the search is different.

In the first you are replacing one line, and the second a different line. Unfortunately the difference in the code is scrolled off screen so it cant be easily seen immediately.

I did think about a new thread but hopefully a few posts alone should do it and not generate too much off subject matter post. We all Temasek fans here after all.;)

Thanks for the feedback, and details of the windows toolset. I do use windows (as a vm on my Ubuntu laptop) and thats where I like to keep it. Less aggro with viruses, updates etc. I use windows "sparingly".
[ONE Android Development] tobitege:
Excellent posts! Will revisit later when I got my thanks buttons recharged (8 is just no enough per day). :)

Now I saw the difference in the /system mounting, doh! ;)
[ONE Android Development] jcespi2005:
Really helpful guide... Just used archikitchen to unack/repack the kernel, but the tool you posted seems so simple, I'll give a try.

Thanks

Sent from my OnePlus One ;)
[ONE Android Development] merikgvr4:
Loaded 2p rom. Also used beta supersu. When rom booted it asked for password. I put in my pw then it said decryption error. Asked to reboot. I clicked reboot then phone is now bootlooping. Shows the android guy then black screen. Cant get into recovery. Please help.

---------- Post added at 09:47 AM ---------- Previous post was at 09:15 AM ----------

This is exactly what happened to mine. Can you help with getting my phone to boot into fastboot and the steps you used to get the phone working again. Did you lose all the stuff in your phone specvially the pictures?
[ONE Android Development] zaphodbeeb:
What kernels work with f2fs Temasek's rom

;););)Out of the box i.e. Just require to be flashed on a f2fs oneplus (any f2fs or f2fs multirom version).

- AK

- Ark Kernel

- Sensei

- Tyr

- The Green Machine
[ONE Android Development] zaphodbeeb:
Hi,

I havnt played with encryption at all, but I'll try to help.

- First to try to get into recovery. Turn your device off. Then, press the volume down, and power button and hold until it vibrates. When it vibrates release the buttons. You should now get into recovery.

If this doesnt get you into recovery then turn your phone off again. Then press the volume up button and power button. The fastboot logo will appear.

Let me know the result.
[ONE Android Development] merikgvr4:
volume down and power it vibrates but goes back into the bootloop. won't go into recovery.

volume up and power it vibrates and I hear the chime in windows but wont show fastboot. just black screen. my computer shows eject QHSUSB_BULK

I have Philz recovery

edit unplugged phone from computer and held down power and vol up and got the fastboot screen
[ONE Android Development] zaphodbeeb:
ok mate. Try to reflash the recovery img you had previously with fastboot flash recovery whateveryourrecovery.img Was your phone plugged in when you tried to get to recovery and fastboot? If so try to get to recovery without being connected to anything first.
[ONE Android Development] merikgvr4:
when I tried to get to recovery my phone was unplugged. will try to get to recovery again

edit...no go on the recovery. trying the fastboot to reinstall recovery.

edit2.. seems to work. got my twrp recovery loaded and now restoring my old kk backup. much thanks
[ONE Android Development] M5devil:
Thanks to everyone for support! I was able to get to recovery by accessing TWRP app from app store and loading the zip files I want and it rebooted to recovery no problem. Again thanks! And 4.0 is flying fast with green 1.2 kernel.

I'll stick with it for now as it seems stable with no reboots when ambient display is on. Are there any tweaks for the kernel? Also, I'm sorry this s asked before, but how do I enable V and O gestures?
[ONE Android Development] zaphodbeeb:
Best look in the main thread for the kernel for tweaks etc in original development.
[ONE Android Development] phermey:
Sorry. I felt the need to sleep for fifteen hours. Yawn. Glad to see fastboot fashing the recovery worked. It didnt work for me when fb flashing philz back on. I had to go to the cm site. Get the entire cm11s rom broken down for fastboot, and individually flash it that way. It might have been a huge pain... But i got a bit of a education. Which made it worth it.

It has been smooth sailing since then though.
[ONE Android Development] phermey:
i just noticed the write-ups on doing the roms. that was pretty dad gum awesome of you to do that. thanks a ton.
[ONE Android Development] black.ic3:
How about new Temasek SM 4.2? Or as usual, stock versions?
[ONE Android Development] raja_mastana:
[MENTION=3874152]zaphodbeeb[/MENTION]

Thanks a lot for the guide to modify ext4 rom to f2fs. Just tried it on the version 4.2 and it seems to have installed fine. I made the modifications on a windows 7.

During the rom installation - how to get the XXX script installing message. I remember when i installed your roms, there used to be a "Zophod script installing"
[MENTION=4877142]tobitege[/MENTION]

Thanks for the link to Android image kitchen
[ONE Android Development] zaphodbeeb:
Hi,

the easiest way is to download one of the thread roms and look at the updater script. Youll see where those lp commands are added to report status to the user. You can add them where you want in updater-script.
[ONE Android Development] zaphodbeeb:
just sm today. There seems to be problems with the stock version.
[ONE Android Development] smint86:
Hey [MENTION=620710]zaphodbeep[/MENTION], first of all thanks for providing the community with your modificated releases, saves a lot of time (which I'm unfortunately running out of atm). Anyway I'd like to try mixed f2fs and it's advantages, so I'm happy for your offer.

I just got one question so far: As you recommended PhilZ recovery for formatting to f2fs, I'm gonna flash it before I start. In the OP, you link to v6.58.8 by katinez, while there's v6.59.0 available by him, too (https://www.androidfilehost.com/?fid=95857557620392153). Any specific reason for this, bugs with newest version or so?
[ONE Android Development] zaphodbeeb:
Nope both versions are good:good:Less fancy than TWRP but always good for me.
[ONE Android Development] gnan10:
Twrp not working well.rebooting itself. Please someone give me fastboot flashable philz recovery. I am finding only refovery flashable zips here.

And am i only the one who have problems with twrp?

PS:Using latest rom and latest twrp
[ONE Android Development] zaphodbeeb:
open the zip file and extract the .img file from it. You need the .img file for fastboot recovery
[ONE Android Development] M5devil:
As much as I love TWRP interface, I had to also switch to Philz recovery, as it's more stable atm

---------- Post added at 11:37 PM ---------- Previous post was at 11:37 PM ----------

Can someone help me how to activate V and O gestures?
[ONE Android Development] Daemos:
The auto brightness sensor is broken...it keeps the screen at 100% this is with Tyr kernel...will try using stock kernel.

Nope clean install = borked auto brightness sensor.

Figured it out, it's the new modem, flashed back to CM11s latest modem and all is good in the world.
[ONE Android Development] Soul0Reaper:
Oddly with the latest versions, I keep getting "com.android.phone has stopped working"

This is after a clean flash with modem...
[ONE Android Development] mmcneil:
You'll need to reflash a CM11 modem to fix it. Try this:

https://drive.google.com/file/d/0B_lj1EbM6gYRM3pMTmtXdl9xZE0/view?usp=sharing
[ONE Android Development] Soul0Reaper:
Working great after this, thanks a lot!
[ONE Android Development] Daemos:
I lied auto brightness is broken, other Roms are fine
[ONE Android Development] phermey:
i am still sitting back on 3.9 ak. things are good and stable. no reboots or crashes since i flashed. read: ambient off. i moto x speed tested it last night and it beat it consistently by a good second after running through ten daily use apps. my brother was pissed to say the least. the ak kernel does seem to be a bit worse on the battery. but i still get three hours screen over two days. with a half hour of calls. so it is an easy sacrifice for the two second speed bump. i feel like i have the fastest phone on the planet.
[ONE Android Development] nico53laval:
Do we still have to flash recovery and modem when switching from 3.9 to 4.3?
[ONE Android Development] smint86:
Idk about the recovery. But several users reported that proximity sensor is still broken in 4.3 without alpha modem. Besides that, CyanogenMod released the first official CM12 nightly for bacon, which contains the new modem. So I think it will be the way to go, anyway. I'd stick with the new modem, but in the end it's your decision ;).
[ONE Android Development] Daemos:
How about the ambient light sensor? Is that still broken?
[ONE Android Development] jukiewalsh:
[MENTION=3874152]zaphodbeeb[/MENTION] mind sharing your local manifest or checking out mine? I got vanilla cm to build but not temasek, I just wanted to make myself personal builds with custom toolchains.

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="CyanogenMod/android_device_oneplus_bacon" path="device/oneplus/bacon" remote="github" />
<project name="CyanogenMod/android_device_qcom_common" path="device/qcom/common" remote="github" />
<project name="CyanogenMod/android_device_oppo_msm8974-common" path="device/oppo/msm8974-common" remote="github" />
<project name="CyanogenMod/android_device_oppo_common" path="device/oppo/common" remote="github" revision="cm-12.0" />
<project name="anarkia1976/AK-OnePone" path="kernel/oneplus/msm8974" remote="github" revision="cm-12.0-skull-evo-no_lcd_notifier" />
<project name="Archidroid/toolchain" path="prebuilts/gcc/linux-x86/arm/linaro-4.8-arm-linux-androideabi" remote="github" revision="linaro-4.8-arm-linux-androideabi" />
<project name="Archidroid/toolchain" path="prebuilts/gcc/linux-x86/arm/linaro-4.8-arm-eabi" remote="github" revision="linaro-4.8-arm-eabi" />
<project name="kykdev/sabermod-arm-cortex_a15-linux-androideabi-4.8" path="prebuilts/gcc/linux-x86/arm/sabermod-arm-cortex_a15-linux-androideabi-4.8" remote="github" revision="master" />
<project name="kykdev/sabermod-arm-cortex_a15-linux-androideabi-4.9" path="prebuilts/gcc/linux-x86/arm/sabermod-arm-cortex_a15-linux-androideabi-4.9" remote="github" revision="master" />
<project name="Archidroid/toolchain" path="prebuilts/gcc/linux-x86/arm/linaro-4.9-arm-linux-androideabi" remote="github" revision="linaro-4.9-arm-linux-androideabi" />
<project name="Archidroid/toolchain" path="prebuilts/gcc/linux-x86/arm/linaro-4.9-arm-eabi" remote="github" revision="linaro-4.9-arm-eabi" />
<project name="TheMuppets/proprietary_vendor_oppo" path="vendor/oppo" remote="github" />
<project name="TheMuppets/proprietary_vendor_oneplus" path="vendor/oneplus" remote="github" />
<project name="CyanogenMod/android_frameworks_opt_connectivity" path="frameworks/opt/connectivity" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_hardware_qcom_media" path="hardware/qcom/media" remote="github" />
<project name="CyanogenMod/android_hardware_qcom_audio" path="hardware/qcom/audio" remote="github" />
<project name="Christopher83/linaro_toolchains_2014" path="prebuilts/gcc/linux-x86/arm" remote="github" revision="2014.12" />
<project name="SaberMod/android_prebuilts_gcc_linux-x86_arm_sabermod-arm-linux-androideabi-4.9" path="prebuilts/gcc/linux-x86/arm/sabermod-arm-linux-androideabi-4.9" remote="github" revision="master" />
</manifest>
[ONE Android Development] EasyGoingXD:
I am the first time here so please dont hate me :)

Has Temasek dark menus?

I wanna use this Rom with this Kernel...http://xdaforums.com/oneplus-one/development/linaro-optimized-franco-kernel-o3-aosp-t2861919...is is this one the "Any Kernel" or what kernel is inside this built??

And what does this mean...."2p=2 partition version 3p=3 partition version"????
[ONE Android Development] tobitege:
No hate, but most answers can be found in the first post, really. ;)
[ONE Android Development] aaron007:
2p basically means, only cache and data are f2fs formatted.

3p is F2FS all, even system is f2fs formatted. Go with 2p as recommended by the OP. :)

You can flash the latest TYR kernel over the rom with no problems.
[ONE Android Development] steijn0:
Just checked out the last build, it loops for me, checked the md5, wiped cache and dalvik. Was on the stock build before.

Anyone run into this too?
[ONE Android Development] zaphodbeeb:
I take it you are talking about this download.

zaphod-temasek-bacon-sm-v4.5-2P-f2fs.zip

or are you talking about a multirom version? or a f2fs-all version?

Anyhow, it installs fine. Have you formatted your device for f2fs (either for f2fs-all, or f2fs-mixed- for the above rom)? How long did you wait for it to boot?
[ONE Android Development] steijn0:
With stock I meant stock toolchain I've been on the 3p version for a while... I actually wiped system too I am not using multirom, and it was stuck at the boot screen not the cm bootanim...

Thanks for the quick reply
[ONE Android Development] zaphodbeeb:
Hi,

please try to download and flash again. I have had problems uploading to androidfilehost and think the file may have been in error. Apologies. Anyhow I just clean flashed the 3p primary version and all went ok. Its uploaded now.
[ONE Android Development] steijn0:
Then I suppose all is well I'll let you know later!
[ONE Android Development] Daemos:
Why does having an ext4 system partition result in better performance compared to f2fs?
[ONE Android Development] zaphodbeeb:
It's because ext4 is better (faster) for reading small files of information than f2fs, which is exactly what you do (mostly) with the system partition. F2fs is better at larger files.
[ONE Android Development] steijn0:
Benchmarking scores on antutu are totally bonkers, I'm currently using 4.6, 3p sabermod version combined with AK 0.80 check this out!
[ONE Android Development] smint86:
[MENTION=620710]zaphodbeep[/MENTION] Is the current v4.6 sm in OP “special edition“ or the first release by [MENTION=2332422]temasek[/MENTION]? :)
[ONE Android Development] zaphodbeeb:
lol. Didnt even know there was a special edition until I read your post. I went to bed just before Katinatez posted. Testing now. Will be uploading 2 and 3p versions shortly, multirom versions to follow.

All done. Nearly finished uploading to the existing 4.6 folders. Multiroms included.
[ONE Android Development] azsl1326:
Is anyone having issues with the alpha modem and 4.6? I read in the unofficial thread that the solution is to dirty flash cm12 nightly and then the 4.6 build over that. Can we do that since this build is using either 2P or 3P F2FS? My guess would be no.
[ONE Android Development] smint86:
I think so, too. Maybe you could follow the guide to convert the nightly to f2fs, but I don't know of that would affect the update procedure of the partitions.
[ONE Android Development] zaphodbeeb:
I had problems with alpha, so I flashed the full cm12. No problems since. Obvously you have to reformat to ext4 to flash the cm12, then back again to f2fs.
[ONE Android Development] tobitege:
You could try to flash the modem files separately (see https://www.androidfilehost.com/?w=files&flid=19647), which don't touch any of your regular partitions.

It's still open for discussion imho what the full flashing of CM-12 nightly changes - besides the 2 modem files - that make the actual "difference".
[ONE Android Development] steijn0:
Can anyone clue me in on this "special edition" thing?
[ONE Android Development] tobitege:
It's special ed. because of being built with SaberMod toolchain and several compiler optimizations (should be it is snappier).
[ONE Android Development] steijn0:
So both sabermod and other optimizations! Nice!
[ONE Android Development] zaphodbeeb:
Hi, this wont work. The kernel used doesnt have the necessary f2fs commits out of the box. It is possible, but quite a lot of work. I got the kernel working with f2fs previously, but because of the way the rest of the rom works (file compression on cm12 versions etc) it s much work, and difficult to maintain with daily releases. It was some time ago that I tried however.

Easier to take a backup and copy it to your pc/cloud.

zap phone to full ext4 formatted partitions

install cm12

reformat to f2fs (whatever your flavour)

re-instate your backup.

Modem updates are not included in nandroids so you wont overwrite them when you restore.

Takes about 20 minutes end to end. It has worked for me, as I dont seem to have any of the problems others have by flashing various releases of the new modem.