Profile

Replicant

Replicant 6.0 for the Samsung Galaxy S3

This post contains outdated information and links to outdated images. See the wiki and blog for development updates, up-to-date documentation and current images!See the archived post for documentation about my initial work and findingsSee this post for the Galaxy S2

Changelog of the latest version (replicant-6.0-beta-0001 from 27.1.17)¶

Added support for external WiFi dongles that use the AR9271 chipset Makes it possible to use WiFi with only free software as free firmware exists for the chip

January security updates for the kernel

Changelog of the sixth alpha release (replicant-6.0-alpha-0006 from 6.1.17)¶

Only the most relevant changes are listed.

Fixed sending of longer SMS messages

Fixed entering the SIM lock PIN Previously, if the PIN was entered incorrectly once, every subsequent try failed, even if the PIN was correct.

Reduced the camera preview resolution to speed up the preview a little bit

Moved the build system from Debian Jessie to Debian Stretch and fixed various build errors This allows to use the manifest merger tool and the Eclipse Java compiler from Debian.

Added the possibility to enable llvmpipe as software renderer by making it buildable for ARM See the Tips section below

Applied various performance improvements and fixes for graphics rendering, mostly from the Android-x86 project

Ported various security/privacy enhancements from the CopperheadOS project This includes the possibility to set an encryption password that is different from the lock screen pin/password. The phone will reboot if the PIN was entered incorrectly more than four times. Some privacy enhancements for the browser

llvmpipe has more complete EGL support than the Android software renderer, so more apps work with it, like Firefox-based browser or more recent webviews. Unfortunately, llvmpipe is still too slow to be the default renderer, but I made it possible to switch back and forth between llvmpipe and the Android software renderer. ADB and root over ADB needs to be enabled in the developer settings.

The camera "locks" sometimes or the error "Can't connect to camera" is displayed. Logs might help debugging this, at least the issue with the error message. Recent versions have a fix which allows to take a picture if the camera app seems to be unresponsive and you press the shutter button a second time.

Only the Galaxy S2 and S3 are supported. If you want to help getting other Replicant devices supported: Add the missing device repositories and try to merge the changes from CyanogenMod. If the device is not supported on the CyanogenMod 13.0 branch, you will have to look at forks that took up the development. Merging with an older branch could also be sufficient to get basic functionality working.

Newer webviews can't be used because they don't work with the software rendering Webview version 43.0.2357.134 is currently in use. It was released in July 2015. This can be fixed by making llvmpipe fast enough so it can be used as the default software renderer. Currently, the Android software renderer is the default.

There are still prebuilt binaries in the source tree I got rid of a lot of prebuilt binaries to make the build more trustworthy and to ensure that all tools are properly built from source with free software, but there are still a few left. The gcc-arm-linux-androideabi toolchain needs to be bootstrapped with proper 1st and 2nd stage compilers so it doesn't rely on the sysroot from the NDK. In general, there are still some prebuilt binaries from the NDK, SDK and other places in use, but nearly all of them shouldn't run on the host, but only on the Replicant device.

Please note that the build might even be broken on this branch and there are no git tags on this branch which pin the source code to certain versions.

Then download the source code:

repo sync

The F-Droid binary is downloaded separately. The download script will check if the signature of the F-Droid binary comes from the F-Droid release signing key. You can retrieve the current signing key with the command gpg --recv-key 7A029E54DD5DCE7A. Run the download script to get F-Droid:

./vendor/replicant/get-prebuilts

Before you can build the ROM in the regular way, you need to run a build script that takes care of building the toolchain:

./vendor/replicant/build-toolchain

In order to prevent strange errors, I recommend running the script in a newly opened shell, in which you haven't already run one of the commands like . build/envsetup.sh, lunch or make that change the environment.

Then you can run the regular build commands to create a Replicant 6.0 zip and recovery:

I also added a script that signs your build, takes care of generating the necessary keys and puts everything in the out/dist directory. Using this script, it is possible to rely on your own keys and not on the test keys which are not recommended to use because the private test keys are publicly available. Building from source and flashing the default image that is signed with the test keys basically disables all the security measures in Android that are based on signing keys. The script also makes it possible to use password-encrypted private keys. The images below are signed with my keys using this script. You can run the script the following way:

./vendor/replicant/sign-build i9300

And finally you can flash the recovery in the download mode and sideload the zip in recovery mode:

If you have already built Replicant at some point and now you are getting build errors: Run make clobber and retry in a newly opened shell.If make fails, it may be necessary that run mka org.cyanogenmod.platform-res.

Add my key to your GPG keyringYou can retrieve it from the keyserver of your choice (gpg --recv-key 5816A24C10757FC4).Alternatively, you can download it from here: https://wiedmeyer.de/keys/ww.ascand import it with gpg --armor --import path/to/5816A24C10757FC4.ascThe key should have the following fingerprint: 0F30 D1A0 2F73 F70A 6FEE 048E 5816 A24C 1075 7FC4

You need to flash the new recovery first before you can flash the zip to your device. A full wipe is also necessary. Updating your ADB installation might help if you have problems with ADB.See the wiki for more details.

Replies (135)

This development is so cool that I bought a Galaxy S3 to check it out and flashed the precompiled build.

I tried taking a picture with the rear camera with no microSD card inserted. The preview displays fine, but when taking the short (or better saving) I am getting a force-close of the camera app. Is this a known issue?

Is this a good time to start putting this stuff in the issue tracker? Perhaps Paul could contribute there so everyone can see what needs to happen in order for this to be an official release and we all can pitch in to make it a reality.

Wolfgang, are you going to keep posting new compiled images as cyanogenmod keeps updating upstream?

This is a really great ROM and I'm happy to have got it installed and working. :)

A few things, and wondering if I'm the only one with these issues, or if there is a workaround one can do.

- It feels laggy. I think it's due to the graphical affects. Anyway I can disable Android graphical affects? I believe I do have the proprietary firmware loaded and it still feels laggy (though I think better then before). Feels smoother then before but overall feels a bit slow/laggy.- Any firefox based browser crashes. Which is a pity as I like orfox and firefox browsers.

If anyone needs assistance with getting the firmware loaded, please drop me a mail. Another member was kind enough to help me out.

I tried taking a picture with the rear camera with no microSD card inserted. The preview displays fine, but when taking the short (or better saving) I am getting a force-close of the camera app. Is this a known issue?

Not quite the way you describe it. Did you take a picture before or does taking pictures not work at all, under all circumstances? A logcat might be helpful.The camera should perform now much better. I switched to the version from CyanogenMod (which is based on Replicant's). Before, the last version from Replicant was used and there are issues when the camera locks up, sometimes already after taking the second picture. CyanogenMod's version doesn't include Paul's latest changes, so bringing the two versions together could be another future enhancement. Another nice thing is that the camera has now working face detection.

Divan Santana wrote:

- It feels laggy. I think it's due to the graphical affects. Anyway I can disable Android graphical affects? I believe I do have the proprietary firmware loaded and it still feels laggy (though I think better then before). Feels smoother then before but overall feels a bit slow/laggy.- Any firefox based browser crashes. Which is a pity as I like orfox and firefox browsers.

There are already effects disabled. It's possible that disabling a few more improves the situation, but the real solution would be to work on the software renderer implementation. See #705. If the egl implementation can be completed, then Firefox based browsers would also work.It shouldn't feel slower than Replicant 4.2, except for the camera preview. Loading the firmware files should not make a difference in the performance of the graphics rendering.

Not quite the way you describe it. Did you take a picture before or does taking pictures not work at all, under all circumstances? A logcat might be helpful.

Taking pictures did not work at all. I could see the preview, but as soon as I took the picture (where it would be saved) the app crashed. I then inserted a microSD card and formatted it to be used as internal memory. Since then, taking pictures worked.

Regarding building: Do you think it could be a good idea to develop a docker build to ease the building process? Not sure if Docker is considered to be libre enough though.

Just tried the new 6.0 alpha 0004 but ran into a severe issue: F-droid fails with an error "Error getting index file" when trying to update package data. Removing cache or all data for the app does not help.

(in the previous alpha 0003 F-droid worked except it couldn't be updated itself: Complained that owner had changed)

I am also trying to build from source, from a minimal Debian Jessie chroot, and so far ran into an arguably minor issue of needing the CAcert.org certificate to clone https://git.replicant.us/replicant/packages_apps_replicantwallpapers (apparently only that one has the problem). I suggest to either use git protocol or mention the requirement in bootstrapping notes.

Just tried the new 6.0 alpha 0004 but ran into a severe issue: F-droid fails with an error "Error getting index file" when trying to update package data. Removing cache or all data for the app does not help.

Strike the above: Silly me, I simply hadn't established a working network connection :-P

I just successfully installed replicant6.0 (0004) on my S3.Thank you all for your work! :)

Here are some thoughts / issues I noticed:

- the notification / battery LED settings are kind of confusing/broken. When I click on the menu item to select a color, the LED switches on, and I can select a color. When I then rotate the screen, the LED starts pulsing, and the pulse settings show up under the color selection. Also, the LED seems to light brighter when setting the color than later on when for example charging.- I had 2 random reboots in 2 days.- the camera app crashed several times.- I installed the enhancement theme with a black lockscreen. When I uninstalled, the lockscreen was still black. Fix: https://www.reddit.com/r/cyanogenmod/comments/41umyo/how_can_i_change_my_lock_screen_wallpaper_on_cm13/- It's somewhat laggy. I don't want to spend my time waiting for my phone to render (unneccessary) animations. I'm currently (since 2 hours) using Mali blobs again, but I feel really bad about it. Probably gonna remove them again. On the one hand, I find it pretty amazing how fast the open source graphics driver already works. However, on the second hand, I'm somehow just much more productive with the proprietary graphics driver.- I really miss the gallery app from CM11. Is it easy to compile it from source? Does anyone know, if it's free software, or are there some licensing issues? I already installed the apk from CM13 and it seems to work fine. I searched F-Droid already ofc, but I could not find anything similar there...

- (not replicant related) I want a dark theme, and could not figure out how to do this. There are several in F-Droid, but none of it changed the settings menu / general UI to a dark one. Also, this 'system UI tuner' seems to be removed from CM/Replicant- (not replicant related) Android becomes bigger and bigger, and I definitely don't like that. These touch bubble in the settings menu... uhm, no. Also, too much eye candy, even w/ all animations I could find disabled (this 'reached end of scrolling' animation, ugh).- (not replicant related) I like the CM11 appearance much more. It's more simple. Android M confuses me (these two dropdowns for example).

After all, besides the LED thing, my comment is probably not very useful for the devs :PSorry for complaining that much. And thank you again for the great work!

- It's somewhat laggy. I don't want to spend my time waiting for my phone to render (unneccessary) animations. I'm currently (since 2 hours) using Mali blobs again, but I feel really bad about it. Probably gonna remove them again. On the one hand, I find it pretty amazing how fast the open source graphics driver already works. However, on the second hand, I'm somehow just much more productive with the proprietary graphics driver.

I find it pretty laggy even with the proprietary driver.

- I really miss the gallery app from CM11. Is it easy to compile it from source? Does anyone know, if it's free software, or are there some licensing issues? I already installed the apk from CM13 and it seems to work fine. I searched F-Droid already ofc, but I could not find anything similar there...

There is LeafPic from f-droid which is great (and newish).

- (not replicant related) I want a dark theme, and could not figure out how to do this. There are several in F-Droid, but none of it changed the settings menu / general UI to a dark one. Also, this 'system UI tuner' seems to be removed from CM/Replicant

- the notification / battery LED settings are kind of confusing/broken. When I click on the menu item to select a color, the LED switches on, and I can select a color. When I then rotate the screen, the LED starts pulsing, and the pulse settings show up under the color selection. Also, the LED seems to light brighter when setting the color than later on when for example charging.

I personally don't using this LED and disabled it, since I using this ROM, (over Settings -> Display & lights -> Lights...).However I noticed a little bug, too. If the power/USB cable is connected while the device (re)boots, the LED starts to glow and after the boot process is finished, it keeps on - even (the light is still disabled in the settings), if I remove the cable, send it to sleep and so on.The only workaround I found yet, is to reboot the device without the cable connected. Strange...

- I had 2 random reboots in 2 days.

I daily use this ROM since a few months, now. I also had 2 unexpected reboots, but in the last 3 months. For me it's laggy, but almost stable.

- the camera app crashed several times.

I'm using Open Camera and I have a strange problem with the camera functionality, too. The app starts and appears to work great. But I just can take 1-3 pictures, before the app still works, but can't take any further pictures. If I close the app with the back button, I still can't take more pictures. While the app closes and starts without any problem, I have to kill the camera process though, start the app again and can take the next 1-3 pictures.Probably you have the same behavior with the difference, that the built-in camera app crashes, instead of appearing to be OK like Open Camera in this case. Strange thing again...

- I really miss the gallery app from CM11. Is it easy to compile it from source? Does anyone know, if it's free software, or are there some licensing issues? I already installed the apk from CM13 and it seems to work fine. I searched F-Droid already ofc, but I could not find anything similar there...

Like Divan Santana said already, LeafPic is a really great, well working alternative.

Wow. Personally, I'm definitely okay with the prop. driver. The only thing I notice: There is a ~0.8s delay when turning the screen off, and ~0.5s when turning it on.Are we talking about the same = adding back the mali libraries? I could live with that performance for the rest of my life :P

@LeafPic:Thanks for the tip. I've only searched for 'gallery', and thus didn't find it back then. However, I can't get it to show any images, I read only "There's nothing to show!". But I've taken several photos... (Btw I also doubt I will find anything better (in my eyes) than the CM gallery. I find it just perfect.)

@Dark theme:Hm, I still could not figure out how to get the settings menu dark. This entire theming concept confuses me.But I tried Greyscale again, and I think I stay with it.

While experimenting, I just had a very weird flickering when scrolling through my apps or switching homescreens. After pressing the home button/opening an app it was gone. I had this 4 times now, but could not reproduce it. It mostly occured while switching themes (only 'Style' and 'Status bar').

I personally don't using this LED and disabled it, since I using this ROM, (over Settings -> Display & lights -> Lights...).

Wow, I find this status LED absolutely beautiful and love it :PBut yes, there's definitely an issue with it.

@camera issue:With the proprietary graphics driver, the camera issues seem to be gone for me. I had them with several camera apps iirc, and in a similar way you (My self) describe.

Like Divan Santana said already, LeafPic is a really great, well working alternative.

Yeah, I tried LeafPic again and got it working :) (After rebooting, my pictures finally showed up.And it's really good. It has far more options than the CM gallery app, and it looks nearly as good as it.Thank you for that. I'd have probably missed it otherwise.

I just had this flickering issue again. I connected it to my laptop and ran 'adb logcat', but that doesn't show anything. Once my phone is in 'flickering mode', it flickers when I touch the display and move something around (just touching is not enough to trigger it). It flickers white I think. (I didn't accidently enable the dev option to flash screen when updating btw.)Last time it occured when starting LeafPic. After exiting it, it was gone. Strange...//update: Oh, I just realize that this is probably Mali-related and will keep quiet until I see this with software gl again. Sorry for that.

Wow. Personally, I'm definitely okay with the prop. driver. The only thing I notice: There is a ~0.8s delay when turning the screen off, and ~0.5s when turning it on.Are we talking about the same = adding back the mali libraries? I could live with that performance for the rest of my life :P

Perhaps it's not the graphics that is slow for me, but rather the system performance. Maybe it runs out of mem or swaps or something. But at time's I found it really slow.Rebooting seems to help.

Although it feels too slow for my taste, for now I switched back to the software gl driver. It feels somehow better... (but I'm wondering if this enhances security in any way, since the bootloader isn't free?)

I noticed:

- overall slow performance ;) (I think this is not likely to change, until something like the lima project is ready for using it?)- the aforementioned pixel line bug in horizontal view occurred again, iirc in LeafPic- no more flickering (I had that only w/ proprietary mali driver).- Focal (camera app from F-Droid) crashes immediately when opened. logcat: http://dpaste.com/3DZ6VAE- LeafPic feels a lot smoother than for example browsing the settings menu. yeaw :) I can live with that.- replicant stock camera app is buggy. one time it stayed dark, I had to restart it. And, clicking on the last taken picture in the top right corner crashes the camera app for me.- (unrelated & unimportant) CM13 Gallery App crashes :( :P

By the way, are there any security concerns with publishing logcats? I think some MAC addresses could appear there? What about IMEI? Thanks for any hints on that!

Another question:Can I modify the lockscreen clock to the same as the homescreen clock widget? I like the thinner font much more.

I just encrypted my Galaxy S3 running Replicant 6.0.Now I notice some notifications on every boot: First the Replicant logo appears for about 35 seconds.Then 4 notifications quickly following each other are shown:- "Optimizing app ?/16" - "Optimized apps." (or something similar)- "Preparing CM settings storage." - "Finishing boot." Then I get asked for my encryption password, and finally Replicant finished booting.Btw. I changed the password from the lockscreen PIN with:

First of all, thanks a bunch for working on this!On the FSF forums and IRC everyone agrees that Replicant is a critical project. However, for some reason, it does not attract new developers. Paul has been fighting hard to keep it afloat all by himself. I bet all Replicant users are grateful you were able to step in and embrace the 6.0 port. This port is really a must to keep Replicant alive. A lot of new apps are showing up on F-Droid without Android 4.2 support, things are starting to look ugly.

After finishing your work on the Galaxy S3, it would be really nice if you could take a look at the 3 other devices supported by Replicant 4.2 and still available in CM13:Galaxy S2 (I9100)Galaxy Nexus (I9250)Galaxy Note 2 (N7100)

I have one spare Galaxy S2 I can ship you. If you are up to it just drop me a line.Taking a look at the issue tracker and forums, the Galaxy S2 seems to be on par with the S3 in terms of number of Replicant users. The other two (Galaxy Nexus and Note 2) seem to have only a few users.