[Samsung Galaxy Player 4.0, 5.0] Supermaster34:
How to port ROMs to the Galaxy Player series​

The Galaxy Player range of devices have a lot of potential, but we could do with some more development going on. I'm mainly writing this guide to encourage more people to develop their own roms eventually and this will provide a good starting point. This guide will help you to create a CWM flashable rom.

WARNING:

This is an experimental method which means that it will not always work, especially for roms which have manufacturer skins such as Touchwiz, Sense etc...

Required packages, programs etc:

For this guide, you will require:

A Samsung Galaxy Player with CWM recovery

A USB cable or any other method to transfer files to your device

An archive explorer such as 7zip or Winrar although any archive explorer should do.

A text editor - I highly recommend Notepad++

A nandroid backup or some sort of recovery rom that you can restore from in case something goes wrong

Apktool for advanced users who want to edit system apps

Instructions:

Find a ROM you want to port and pm/email the dev asking for their permission to port it. This is probably the most important step in the process. Wait a few days for a reply if you have to. The most annoying thing for a dev to see are unauthorised ports - its happened to me and its not nice. If you have no reply after a week, it might be a better idea to move onto a different ROM. If the original dev refuses to allow you access to their work, then do not keep bugging them about it and move onto a new project. The galaxy players are ARM v7 devices so pick a rom from an ARM v7 device to port. A very large list of devices and their processor architecture type is available here.​

Once you have the permission of the original dev, you should download the ROM you want to port. To keep things simple, let's rename it to Original. Then you need a base ROM from your device. If you are porting a GB ROM, use a CM7 or similar base. If you are porting an ICS ROM, use a CM9 or similar base. Let's rename this to Player. Bear in mind that your ported rom will have the same issues that your base rom has so its a good idea to pick the most bug free rom as a base. It's also a good idea to use open source roms as a base as they usually have more support over a range of devices so it may be easier to fix bugs.​

Open both ROMs side by side using an archive explorer. Open the system folder and delete the app, framework and media folders from Player. Then select the app, framework and media folders from Original and copy them to Player​

Navigate to Player/META-INF/com/google/android and open the updater-script in a text editor such as Notepad++. Edit the ui_print lines so those lines match the corresponding lines in the Original rom. Feel free to edit any of the lines, but it is best to modify as little as possible if you are unsure of what you are doing.​

You will now have a functional port of a rom, so you can copy Player to your device and flash it. If the rom boots then great! If the rom fails to boot, check the basic troubleshooting section below.​

If you want to make changes to some of the system apps, such as theming or changing their layout, use apktool to decompile them. Then you can edit the apps and recompile them properly. System apps must have the correct signature or your rom will not boot correctly. Check the troubleshooting section below for instructions on how to correctly sign system apps​

Important

Remember this is not the end of development. In most scenarios this method will work, but there will be certain cases where the rom won't boot or certain aspects will not work.

Although the rom will have basic functionality, you should add your own tweaks to improve the functionality of your rom. You can port a fairly stock like rom such as CM9 and you can make it into your own rom by adding speed tweaks, theming the system apps, adding unique features and anything else you can think of.

If you choose to release your ported rom, you must give credit to the original developer and it's usually a good idea to give credit to the developer of the base rom you used. In addition, Please be aware that users will be asking you for help with any issues they occur, so be prepared to provide support. It's always a good idea to test your rom yourself to make sure it actually does what you claim it does.

Basic Troubleshooting

There are many reasons why a rom may not boot and the first thing you should do is obtain a logcat. My preferred method of doing so is to first install the Android SDK and then you need to set up your environment variables so your PATH variable is set to the location of Android-SDK/platform-tools. Then you should open a terminal window or command promt and enter adb logcat > [folder path]/logcat.txt . The logcat can then be opened in a text editor and look through it to see if there are any errors where a fatal error or something similar occurs.

Another thing you can try is to copy libandroid_runtime.so from Original to Player and see if the rom boots.

If this also fails then you can try copying LMprec_508.emd and PFFprec_600.emd from /system/media from the Base rom (you may need to redownload it) and copy it to /system/media of Player. Then flash the .zip file again to see if it now boots.

More to follow

Tips and tricks

My file host of preference is Mediafire as it typically has the fastest downloads. However some people cannot access Mediafire so it might be useful to have other mirrors available

Screenshots are a good way of showing people what your rom looks like so people can see whether they would like to try your rom

A changelog is useful for people to see what's new in the latest version so they know whether it is worth updating

You must be willing to take criticism and you must be able to be critical about your own work. Nobody knows everything, so if someone makes a suggestion that you don't like, try and see whether they actually have a vaild point. Also use Google and the XDA website to find fixes to issues instead of ignoring them as this will aid your development work in the long run.

Don't be afraid to ask for help!