[HOWTO] ✏ Compiling Fairphone Open OS / Rooting

Did anybody tried to encrypt the phone with a self-built Android yet? I’m not sure why it’s not working for me. Phone gets stuck on reboot and logcat shows this messages repeating all the time:

I/ThermalEngine( 281): Sensor:pm8941_tz:36558 mC
W/MountService( 6186): Thread MountService still waiting for MountService ready…
W/MountService( 6186): Thread MountService#onDaemonConnected still waiting for MountService ready…
W/MountService( 6186): Thread main still waiting for MountService ready…

2 Likes

Done that.
It said build was successfull.
So I flashed boot system and recovery

But the system won’t start.

I can access fastboot mode and recovery, but when I want to start the phone normally it hangs on the fairphone logo.

What can I do now? Build again? It took like a whole day.

I already tried to wipe cache and stuff in the recovery. Still doesn’t work.

For me on first start after flashing it takes several minutes until the phone exits the Fairphone logo and goes on with booting. Sometimes I think something is broken, but finally it boots up in most cases. :slightly_smiling:
Maybe give it just a few minutes.

I once again tried to compile the source but still failed:

In file included from external/chromium_org/v8/src/heap/heap.h:12:0,
                 from external/chromium_org/v8/src/contexts.h:8,
                 from external/chromium_org/v8/src/objects-inl.h:17,
                 from external/chromium_org/v8/src/v8.h:39,
                 from external/chromium_org/v8/src/transitions.cc:5:
external/chromium_org/v8/src/counters.h:612:41: internal compiler error: Segmentation fault
   StatsCounter* size_of_CODE_AGE_##name() \
                                         ^
external/chromium_org/v8/src/builtins.h:25:40: note: in expansion of macro 'SC'
 #define CODE_AGE_LIST_IGNORE_ARG(X, V) V(X)
                                        ^
external/chromium_org/v8/src/builtins.h:23:3: note: in expansion of macro 'CODE_AGE_LIST_IGNORE_ARG'
   V(Octogenarian, A)
   ^
external/chromium_org/v8/src/builtins.h:34:3: note: in expansion of macro 'CODE_AGE_LIST_WITH_ARG'
   CODE_AGE_LIST_WITH_ARG(CODE_AGE_LIST_IGNORE_ARG, V)
   ^
external/chromium_org/v8/src/counters.h:614:3: note: in expansion of macro 'CODE_AGE_LIST_COMPLETE'
   CODE_AGE_LIST_COMPLETE(SC)
   ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://source.android.com/source/report-bugs.html> for instructions.
make: *** [out/target/product/FP2/obj/STATIC_LIBRARIES/v8_tools_gyp_v8_base_gyp_intermediates/v8/src/transitions.o] Fehler 1

#### make failed to build some targets (02:20:38 (hh:mm:ss)) ####

I followed the official build instructions as well as the notes in this thread. tried on Ubuntu 14.04 LTS running as a kvm vm under an Ubuntu 15.10. dmesg doesn’t show anything useful, I believe. I did a fresh repo sync today. I tried with make -j1. The build failed several times (at different stages and with different but similar errors).

Anybody an idea how to debug?

What’s your gcc --version?

the default on Ubuntu 14.04:

simon@vmubuntu1404:~/fairphone_os$ gcc --version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4

Should work according to the build instructions… :frowning:

I’ve been “giving” it one hour now, but still …:pensive:

How did you flash? Where? What? Can you post details?

I used the Docker-File jftr recommended.
after 24 hrs or so, it said build was successful (or something like that).
Then I flashed in a terminal with fastboot flash boot boot.img etc.

I am using Debian Jessie, with Mate DE.

So you flashed outside docker … with fastboot flashall? Was all that successful? Maybe your are still stuck in fastboot/bootloader? What’s on your screen if you switch the phone on?

My out dir looks like this right now, does yours look similar?

15M	boot.img
13M	cache.img
5,6M	dt.img
4,9M	persist.img
2,7M	ramdisk.img
1,4M	ramdisk-recovery.img
14M	recovery.img
6,0M	splash.img
426M	system.img
137M	userdata.img
1 Like

fastboot flashall brought an error message:

neither -p product specified nor ANDROID_PRODUCT_OUT set

so I flashed only boot system and recovery

How do I flash WITHIN docker?

Yes the out dir is about the same. sizes differ slightly.
and there are some more files:
android-info.txt
boot.img.nonsecure
clean_steps.mk
emmc_appsboot.mbn
aemmc_appsboot.raw
EMMCBOOT.MBN
installed-files.txt
kernel
recovery.img.nonsecure

I know that the phone is not stucked in fastboot (because fastboot doesn’t recognize it) and I also can boot into recovery and restart from there. But it is still hanging on the fairphone logo

1 Like

Don’t! :wink: I just wanted to make sure.

Does “fastboot flash system system.img” tell you the same? That’s all that comes to mind here. ;(

1 Like

no.
fastboot flash system system.img

finished without any error messages (just OKAYs and finish time)

Do I have to flash one of the other files as well, maybe?

No. Only the three (boot.img, recovery.img, system.img). Can you do them one by one? Just to see if there is an error message? I don’t have any more ideas here, sorry.

But if those already went through fine, maybe just leave it like that and try a: fastboot -w flash system system.img

:add-shrug-smiley-here:

1 Like

That’s what I did.
:confused:

I also tried out the modified boot.img with supersu.

Sorry, there is nothing more I can recommend. But you can still use the recovery to reinstall the OTA right?

1 Like

sorry, what does OTA stand for? and where do I get that?
I can access the recovery.

Just if all else fails you can use it to reinstall the FP2 stock software back onto your phone. The thread is a bit confusing to read, but it looks like it worked.

1 Like

Thank you for the link.
Maybe I have to reflash before I send my phone back, bcz I really do not want to have gapps on my phone :slightly_smiling:

If you not in a rush to return the phone … maybe someone else will haven an idea in the meantime. It worked before :slightly_smiling:

Also, I assume you copied all the libs around and the stuff like described in the HOWTO, right? You used docker, so I guess yes, but … sometimes a script can fail for strange reasons … Maybe some logcat logs will help, if available, not sure what state your phone is in after booting …