• If you are experiencing issues logging in, we moved to a new and more secure software and older account passwords were not able to be migrated. We recommend trying to reset your password, then contacting us if there are issues.
  • Nearly done! Migration cleanup is mostly done. There are a small number of issues left that we continue to work on, but all the heavy lifting is done. We still would love to hear feedback over at this thread and also check out the new XDA app! Thanks and we hope you enjoy the new forums, and thanks for your support of XDA <3

[ROM] Unofficial Omnirom 6.0 for Galaxy S 4G

xc-racer99

Senior Member
Aug 28, 2013
667
1,063
0
Code:
Code:
/*
 * Your probably long expired warranty is now void.
 *
 * I am not responsible for bricked devices, dead SD cards,
 * thermonuclear war, or you getting fired because the alarm app failed. Please
 * do some research if you have any concerns about features included in this ROM
 * before flashing it! YOU are choosing to make these modifications, and if
 * you point the finger at me for messing up your device, I will laugh at you 
* and point my finger right back at you.
 */
Installation Instructions
Make sure you have a second partition on your SD card formatted to ext4 before flashing!!!! This can be created with either CWM recovery or with TWRP. gparted on Linux should also work. If you "SD card not supported" try repartitionning. If you get "Encryption unsuccesful" then you need to format the second partition as ext4 (or f2fs, your choice).

If on a BML rom (stock-based GB)...
  • 1. Reboot to recovery
  • 2. Make sure your version of CWM is at least 5.x
  • 3. Install zip. It will reboot a couple of times, don't be worried.
  • 4. If you want gapps, reboot to recovery, wipe data+cache and install gapps.
  • 5. If you want root, flash SuperSU whenever
If on an MTD rom (CM7 and all ICS+)
  • 1. Reboot to recovery
  • 2. Wipe data, dalvik/art cache, system, and cache partitions
  • 3. Install zip
  • 4. If you want root or Gapps, install them now.
The first boot can take several minutes. Be patient. If it takes 10+ minutes, pull the battery and reboot to recovery.

Things to Take Note Of
  • I actually have a T959P, not a T959V... It was released by Telus in Canada. It is a very similar device (I can run ROMs for the T959V with limited problems - ie sometimes I get wakelocks and the gps never works), it has a different GPS chipset and also uses different cell bands (but I can still use your guys modems but I lose access to the 850Mhz band). I have created a build specifically for the T959V as best as I can guess.
  • Bluetooth only enables from the notification pulldown, not when you go directly to settings. It does work just fine afterwards though
  • If you're coming from either the last Lollipop build or the initial pre-release Marshmallow build, there is a bug in TWRP that will prevent flashing anything but the ROM. To get around this, please flash the Marshmallow zip, then reboot to recovery, and then follow the typical instructions.
  • If you decide to install gapps at a later date (ie after you've installed the ROM), you must do a factory reset first - otherwise you will get force-closes upon bootup
  • If you come across a bug, feel free to let me know by posting in this thread. I will not be working non-stop on this project, but will try to fix bugs that affect me as this is still my main phone (out of choice, not necessity).
  • This build is very close to the official omni source code. This means that the recovery is TWRP and there aren't any added "features"
  • In order to get it rooted, you need to install SuperSu.
  • Gapps eat up about an extra 30MB of RAM so they slow down the device - tread carefully.
  • Backup Backup Backup! I'm not responsible for you losing any data.

Working
  • Taking pictures
  • RIL
  • SMS
  • Data
  • Recovery
  • Bluetooth
  • Wifi
  • Vibration
  • Video Recording
  • Automatic Brightness
  • Encryption
  • Compass
  • GPS
  • Headset Buttons

Semi-Working
  • Powered-off charging animation - works at first, but then stops working. Seems to be an Omni problem, but it still charges...

What doesn't
  • SElinux is currently in permissive mode. Will not be going to enforcing, this would require a data wipe as well

What's been removed
  • TV-Out - It was removed upstream plus I think binary blobs would need a ton of shimming in Lollipop+

Everything else is not tested!!!

XDA:DevDB Information
Unofficial Omnirom 6.0 for Galaxy S 4G, ROM for the Samsung Galaxy S 4G

Contributors
xc-racer99
Source Code: https://github.com/omnirom

ROM OS Version: 6.0.x Marshmallow
ROM Kernel: Linux 3.0.x
Based On: OmniRom

Version Information
Status: Beta

Created 2016-01-11
Last Updated 2016-05-12
 
Last edited:

xc-racer99

Senior Member
Aug 28, 2013
667
1,063
0
Thanks Time!

Thanks Time!
This would not have been possible without the following people:

Thanks to humberos for bringing Lollipop to the first-gen Galaxy S series. This would not have been possible without his work.
Thanks to FB and Dao for their work on the CM-11 device tree. I used several of their fixes.
Thanks to noiphonehere for his device trees and kernel, most of my work was based off of his.
Thanks to the OMAP4 AOSP team for their work on porting CMA to a 3.0 kernel.
Thanks to bhundven and the other members of teamacid for their work on the aries kernel.
Thanks to all others that have helped get this phone to where it is today!
Thanks to vcmerritt. A name you're probably not familiar with, but he was the only one to create something for the T959P and without him I'd still be on stock...


Build your own!
Follow the instructions at http://docs.omnirom.org/Setting_Up_A_Compile_Environment using the android-6.0 branch
Before doing a repo sync, put the galaxy_s_series.xml file from the Downloads folder in .repo/local_manifests folder of the source tree (create the local_manifests folder if necessary).
After syncing the source, open a terminal and in the directory where you downloaded the source code type "./device/samsung/aries-common/patches/apply_patches.sh" to apply the patches necessary to have a working build. Then run "source ./build/envsetup.sh" and then "brunch galaxys4gmtd". For future builds, only the envsetup and the brunch parts are necessary. Please note that you will have to re-run the apply_patches.sh script after each time that you run repo sync. (Note: the patch script no longer runs automatically)

You should be able to use my trees for other first-gen galaxy S devices. You will need to apply a patch similar to https://github.com/xc-racer99/andro...mmit/fe6bc6b82881a12fc4a5647812f3cf0f52f79c6a to your device tree (if coming from Omni 5.1). I haven't done anything to P1 trees and may have broken the kernel for it...

Changelog

2015-12-20
  • Initial pre-release - many bugs
2015-12-26
  • Second pre-release - fewer bugs, but still plenty
2016-01-07
  • Initial actual release. Quite stable with minimal bugs
2016-01-23
  • Updated Omni Source code
  • Fixed Google Play (and other apps) download error (I think...)
  • New bootanimation - Its the new Omni one - it doesn't fit on our screen the best but it doesn't have one section lit up all the time so the screen doesn't burn in like the old one
  • Freed a bit more RAM
  • Improved zRAM performance by using LZ4 instead of LZO
  • Added T959P build
Changelog for 2016-02-04
  • Updated Omni source code - includes Feb security patches thanks to the Omni Team
  • Brought kernel defconfigs inline with upstream kernel/common (well, as close as possible without breaking things
  • More work on selinux - but its still in permissive mode
  • Added download mirror thanks to @FBis251
md5sum for the T959V - 975730824b335d9521d1201d4dac82b7
md5sum for the T959P - b209b78d3bc5dd4c5f5a7224a9d780c4
Changelog for 2016-02-29
  • Updated Omni source - plenty of new features
  • Low-resource spinner from LegacyXperia (means that the loading spinner isn't the only thing using the CPU)
  • Miscellaneous performance tweaks (see github if interested)
md5sum for T959V: a7aa8cca3259208eafba7c2cccecdbfd
md5sum for T959P: 879256c93a0e58de0fb9c9e1be91e0e9
Changelog for 2016-04-02
  • Security fixes in the kernel
  • Freed roughly ~4MB of RAM in kernel
  • Updated android drivers resulting in better multitasking
  • OpenDelta updating system removed as we weren't using it (it used ~3MB of RAM)
  • Recents menu now has less lag when opened
  • Selinux contexts have changed. It could likely be put to enforcing now but this would require a complete data wipe so its still permissive
  • Live Wallpapers removed - we're low-ram
  • Bootanimation now fits the screen better
  • PowerHAL removed - it was broken and has been for a while...
  • Misc other changes - if you didn't notice problems, you won't notice the solutions :)
  • Known bug - Camera on T959V is broken...
md5sum for T959V: 247a721f4c27c5191a2a460e4c72ba3b
md5sum for T959P: d15339d8aa10f765155bdd8d1bb0c5f5
Changelog for 2016-04-08
  • Fixed camera on T959V
  • Security patch level of April 2, 2016 (latest to date)
  • Headset buttons fixed
T959V md5sum: 2b1560b99402c73275d1f69b3ceb9a22
T959P md5sum: e102cce0d624383fb85a32321c98c645
Changelog for 2016-05-09
  • Uses CMA kernel by default
  • Performance Control can now modify voltages
  • Systemless SuperSU is now supported
  • WebM playback is now working
  • EFS backup in TWRP now works
  • Data on boot should now work - no need to toggle airplane mode anymore
md5sum for T959P - 118789dd68760d9fd18cc961398bf346
md5sum for T959V - f9375a8d9792c3a0d222c113213c014d
Changelog for 2016-06-07
  • Security patch level of June 1, 2016
  • Microphone mute now works when in call
  • Battery now charges to 100% and should read properly after a system crash
  • Standby times should be improved
  • Slightly less RAM - but should result in better graphics performance
  • CMA crashes fixed (at least, I haven't crashed once since I started testing the patch a week or so ago)
  • PowerHAL is back - CPU is boosted when turning screen on to avoid delay
md5sum for the T959P: eeed77fb84189e84f2264e32d18ce454
md5sum for the T959V: b6457319d248029429183c342514b072
Changelog for 2016-08-02
  • First unified build (ie it works on both the T959P and T959V)
  • Screen recording now works in portrait mode
  • MMS should be able to be sent when data is disabled (will still use data though)
  • Default Camera app portrait photos are no longer square
  • SuperSU systemless updated to 2.76
  • Slightly less audio latency with UI sounds (and some sounds have changed)
  • Data should also be working on boot
  • Slight changes to battery and graphics config
  • Security patch level of August 5, 2016 (I'm a time traveller...)
md5sum: df587e0bd69552e0ece4b4ba3e214f45
 
Last edited:

xc-racer99

Senior Member
Aug 28, 2013
667
1,063
0
Source, Downloads, Misc Notes

Main Source
http://github.com/omnirom
Device Specific Source Code
http://github.com/xc-racer99/android_device_samsung_telusgalaxys4gmtd for the device tree (see android-6.0-t959v branch)
http://github.com/xc-racer99/android_device_samsung_aries-common for the common device tree (see android-6.0 branch). The patches folder holds all the necessary patches along with a script to apply the patches.
http://github.com/xc-racer99/android_kernel_samsung_aries for the kernel (see android-6.0 branch)
http://github.com/xc-racer99/proprietary_vendor_samsung for the prop blobs (see android-6.0 branch)

Downloads!
All builds are found at https://drive.google.com/folderview?id=0B7vXjzo0Hj-iOGJ4dmdCd09OZmM&usp=sharing. As well, recent builds are mirrored on https://files.fernandob.com/#xc-racer99/Omni6.0

Gapps
Gapps cause the first boot to be very, very laggy. Things do improve after that. The best way to get through the Setup Wizard (IMO) is to skip everything possible (ie connecting to Wifi, settings up a Google Account, etc) and then reboot. You can manually add a Google Account later in Settings. While any (small) Marshmallow gapps should work, I have had success with OpenGapps pico package from www.opengapps.org (untested on recent builds).

SuperSu
SuperSu can be found at http://forum.xda-developers.com/apps/supersu. If on May 2016+ builds, systemless 2.71 works (other systemless versions may work, untested). If you're on an older build, you need to either force system mode (create a file in /system or /data called .supersu with the contents "SYSTEMLESS=false") or use an older version (ie version 2.52 or earlier). August 2016 build updates the systemless to 2.76.
 
Last edited:

DickyG

Senior Member
Mar 30, 2013
200
41
28
Virginia
As you suggested, Gapps caused lots of problems...made the ROM very slow and laggy, lots of FC's, lots of random reboots, etc. I re-flashed without Gapps. Was able to restore apps with TB and root with SuperSu. The basics...calling, browsing, messaging, camera...are working fine. Haven't taken it for a ride yet, but GPS test picked up 5 satellites and I haven't even taken it outside yet. If I desperately need another app, I guess I can find the .apk somewhere. Since I did a TWRP backup, maybe next week I'll try the pico gapps again and see what happens. At any rate, wonderful work.
 

xc-racer99

Senior Member
Aug 28, 2013
667
1,063
0
New Build Uploaded!

Alright, I've uploaded a new build
Changelog for 2016-01-23
  • Updated Omni Source code
  • Fixed Google Play (and other apps) download error (I think...)
  • New bootanimation - Its the new Omni one - it doesn't fit on our screen the best but it doesn't have one section lit up all the time so the screen doesn't burn in like the old one
  • Freed a bit more RAM
  • Improved zRAM performance by using LZ4 instead of LZO
I've also uploaded a T959P build as I had a request for one. Let me know if you guys find any more bugs.
 

DickyG

Senior Member
Mar 30, 2013
200
41
28
Virginia
New build flashed fine although I had to re-flash the SuperSU zip...no problem since I already had it on my SD card. I'll let it rest up for a day or two and then I'll try to flash the pico-gapps and see if it
will run smoothly....good job.
 

xc-racer99

Senior Member
Aug 28, 2013
667
1,063
0
New build flashed fine although I had to re-flash the SuperSU zip...no problem since I already had it on my SD card. I'll let it rest up for a day or two and then I'll try to flash the pico-gapps and see if it
will run smoothly....good job.
Sounds good. Do note that when/if you flash gapps, you will need to do a complete data wipe first, otherwise you will get force-closes like crazy.

I've always just reflashed SuperSU manually and never relied on the script to restore it so I can't help you there.
 

xc-racer99

Senior Member
Aug 28, 2013
667
1,063
0
Tried to install over MTD SlimSaber with TWRP 2.7.0.0, kept getting Status: 7 error with updater.sh script.

Any way to fix this?

Thanks in advance.
Hmm, going back to to stock with a OneClick/Heimdall/Odin will work for sure.

Alternatively, check if there is an omni.cfg file on your SD card. If there is, delete it and try again. Also, if you can get me the exact wording of the error output that would be great, along with the omni_mtd.log file from the SDcard.
 

SuccubusInc

Member
Dec 2, 2015
32
3
0
21
Temecula
Hmm, going back to to stock with a OneClick/Heimdall/Odin will work for sure.

Alternatively, check if there is an omni.cfg file on your SD card. If there is, delete it and try again. Also, if you can get me the exact wording of the error output that would be great, along with the omni_mtd.log file from the SDcard.
I will Heimdall One-Click back to KJ6 and reflash the ROM after checking for the omni.cfg, and will quote the output and the log if I get another error.

I'll be back by 5:00pm PST. I have school to take care of.

UPDATE:
Tried again after a full wipe [not a restore to stock] and got this:
Installing '/sdcard/omni-6.0.1-20160123_galaxys4gmtd-HOMEMADE.zip'...
Checking for MD5 file...
Skipping MD5 check: no MD5 file found.
assert failed: run_program("/tmp/updater.sh") = = 0
E:Error executing updater binary in zip '/sdcard/omni-6.0.1-20160123_galaxys4gmtd-HOMEMADE.zip'
Error flashing zip '/sdcard/omni-6.0.1-20160123_galaxys4gmtd-HOMEMADE.zip'
Updating partition details...
Is there any kernel/recovery you recommend for flashing after restoring to stock?
I've tried before on AntonX Voodoo Lagfix recovery and got a similar error.
 
Last edited:

xc-racer99

Senior Member
Aug 28, 2013
667
1,063
0
I will Heimdall One-Click back to KJ6 and reflash the ROM after checking for the omni.cfg, and will quote the output and the log if I get another error.

I'll be back by 5:00pm PST. I have school to take care of.

UPDATE:
Tried again after a full wipe [not a restore to stock] and got this:


Is there any kernel/recovery you recommend for flashing after restoring to stock?
I've tried before on AntonX Voodoo Lagfix recovery and got a similar error.
I typically used the Blastoff kernel, but I have my own one-click as I have a Canadian variant.

Also, the omni_mtd.log will tell which part of the updater.sh failed. Another thing to check is if you have a second partition on your SD card. This ROM requires one as /data is put there.
 

SuccubusInc

Member
Dec 2, 2015
32
3
0
21
Temecula
I typically used the Blastoff kernel, but I have my own one-click as I have a Canadian variant.

Also, the omni_mtd.log will tell which part of the updater.sh failed. Another thing to check is if you have a second partition on your SD card. This ROM requires one as /data is put there.
I'll try out Blastoff if I can find it. But it probably failed because I did not partition my sdcard. I'll see if that helps later.

Thanks a lot.
 

SuccubusInc

Member
Dec 2, 2015
32
3
0
21
Temecula
I typically used the Blastoff kernel, but I have my own one-click as I have a Canadian variant.

Also, the omni_mtd.log will tell which part of the updater.sh failed. Another thing to check is if you have a second partition on your SD card. This ROM requires one as /data is put there.
Hey, xc-racer99, after about four assorted blind attempts at installing your work, I flashed back to stock/AntonX kernel with Heimdall and full wiped, then used CWM to create a 4GB partition on my sdcard. The ROM installed through CWM, then TWRP without an error and booted up after fifteen minutes or so of OMNI animation, and is running on my SGS4G without any issues. The only noticeable lag was for the first five minutes after the initial boot. Now my device is gliding smoothly after a few tweaks in the performance settings and turning off background processes. Thank you so very much.

Next time, I'll read the entire post before blundering through the install process with the assumption that I know what I'm doing [as usual].

Sorry for the trouble, if indeed I was any.
 

xc-racer99

Senior Member
Aug 28, 2013
667
1,063
0
New Build Uploaded!

Changelog for 2016-02-04
  • Updated Omni source code - includes Feb security patches thanks to the Omni Team
  • Brought kernel defconfigs inline with upstream kernel/common (well, as close as possible without breaking things
  • More work on selinux - but its still in permissive mode
md5sum for the T959V - 975730824b335d9521d1201d4dac82b7
md5sum for the T959P - b209b78d3bc5dd4c5f5a7224a9d780c4

Still the same bugs present - headset buttons broken (have been on all 3.0 kernel-based ROMs for the Galaxy S 4G), laggy 720p recording, broken webM playback, microphone mute in calls, and bluetooth tethering.

Download link is the same as it always is. Also, thanks to @FBis251, we now have a mirror. It is located at https://files.fernandob.com/#xc-racer99//Omni6.0
 

DickyG

Senior Member
Mar 30, 2013
200
41
28
Virginia
Changelog for 2016-02-04
  • Updated Omni source code - includes Feb security patches thanks to the Omni Team
  • Brought kernel defconfigs inline with upstream kernel/common (well, as close as possible without breaking things
  • More work on selinux - but its still in permissive mode
md5sum for the T959V - 975730824b335d9521d1201d4dac82b7
md5sum for the T959P - b209b78d3bc5dd4c5f5a7224a9d780c4

Still the same bugs present - headset buttons broken (have been on all 3.0 kernel-based ROMs for the Galaxy S 4G), laggy 720p recording, broken webM playback, microphone mute in calls, and bluetooth tethering.

Download link is the same as it always is. Also, thanks to @FBis251, we now have a mirror. It is located at https://files.fernandob.com/#xc-racer99//Omni6.0
Finally got pico gapps to run...the initial setup took quite a while but now that it's settled in, no problems. It's also interesting to note that Link2SD is running fine while it seems to be a major problem for other Lollipop & Marshmallow ROM's on other devices.