[ROM][PORTING] Galaxy S3 ROM for the S2

Do you want someone to port the SGS3's ROM to the SGS2?

  • Yes! This is a fantastic idea!

    Votes: 844 85.9%
  • I don't really care...

    Votes: 81 8.2%
  • No! This is a waist of time!

    Votes: 58 5.9%

  • Total voters
    983
Search This thread

Net.silb

Senior Member
Nov 24, 2011
1,042
771
Hi all,

Sadly, I have irrecoverably bricked my S2 and I am no longer as active in the S2 forums. This does not mean you guys should stop trying to port this ROM to the S2 - It is a great device that should still be considered as one of the high-end phones in the market. Even though I've moved on to the S3 I will gladly try to help this project that I started and I am following this thread post by post.

I think it would be a good idea if everyone that has done something for the porting post exactly what they did and what were the results.

Hi guys,

I know that I've been fairly quiet over the past week, and that is because this project is going nowhere. I know we have some general direction of what we have to do, but a lot of fine details are unclear to me and everybody else. These details are ones such as: how to decompile & recompile the apks, which images to resize & how, what folders should be renamed, what files are needed in the new Rom, and more.

I have asked for assistance from the people porting the Sense 4 One X Rom to the S2, and I am waiting for a reply.

Sit tight, and hope for the best!


Hi guys!

This thread is meant to organize the porting of the Galaxy S3 firmware to our Galaxy S2.

The first thing we have to do is make the /system folder of the Rom smaller than 500MB, because that is how our phone is partitioned. To achieve that the first thing we have to do is convert all the XHDPI images in the apks to HDPI images because it will make the apks smaller and anyways - our phone is a HDPI device. After we do this, we will see if we have to trim down on more space in our /system folder.

To test if the Rom will boot after we do the above steps, I deleted a bunch of non-essential apps such as voice talk to make the /system folder smaller than 500MB. I then replaced the /system/app & /system/framework with the modified S3 ones, but unfortunately the Rom did not boot fully and got stuck at boot animation. To figure out why it didn't boot, Pulser suggested that we use a kernel that has adb force enabled and then we can get a logcat and see what the problem is.

For people who want to help meanwhile:

The task that is needed to be done is convert all the XHDPI images in the apks to HDPI images.

How to do this:

1. Download the S3 Rom (below).
2. Download Resizer 1.0 (below).
3. Resize all XHDPI images in all the apks in /system/app & /system/framework.

Download Links:

I9100 Rom - http://www.mediafire.com/?4v6i6isqa3pa4lw

I9300 Rom - http://www.mediafire.com/?9xk39miljh3l9vw

Resizer 1.0 - http://www.mediafire.com/?d6h6lpwm8jxdjxr
 
Last edited:

mad-monk

Senior Member
Jun 27, 2009
157
13
Steenderen
it would be more then WOW to get it ported to the sgs2.
But is it posible to run quad-core kernel/modem/radio software on a dual-core carrier
 
Last edited:

Patroy

Senior Member
Nov 4, 2011
159
30
I thing good intentions are not enough. There must be several developers interested in thic project
 

Net.silb

Senior Member
Nov 24, 2011
1,042
771
Now that we have a few dozen users interested within a few hours of this thread existing, we have to try to raise the awareness of developers in the hope that some of them join the project.

Whoever has names of developers that might be interested, please try and contact them and see if they are interested in joining the project.
 

ata1918

Senior Member
Jan 7, 2010
129
92
Well if any devs are going to do this...There is not much use in porting the UI and the SGSIII theme. Rather shouldn't the emphasis be on the handy features and new apps that Samsung have made?

Sent from my GT-I9100 using xda premium
 
  • Like
Reactions: GalaxyFan88

Yandvoiris

Member
Dec 7, 2011
44
6
very problematic idea
have you seen how much space take an I9300 rom ?

to do a proper port the developer will need to creat a new pit file (wich will re format the space on the phone to give larger drive for the system)
and a new bootloader wich he will have to make to work with the new pit
without cusing hard brick to the user
 

Net.silb

Senior Member
Nov 24, 2011
1,042
771
very problematic idea
have you seen how much space take an I9300 rom ?

to do a proper port the developer will need to creat a new pit file (wich will re format the space on the phone to give larger drive for the system)
and a new bootloader wich he will have to make to work with the new pit
without cusing hard brick to the user

Then I guess we'll need one hell of a developer! :p
 

sahibunlimited

Senior Member
Jul 13, 2011
6,839
2,442
Nagpur
very problematic idea
have you seen how much space take an I9300 rom ?

to do a proper port the developer will need to creat a new pit file (wich will re format the space on the phone to give larger drive for the system)
and a new bootloader wich he will have to make to work with the new pit
without cusing hard brick to the user

app folder and framework folder of sgs3 is 470 MB and our system partition is 500 MB so not enough space for other files such as libs,bins,media,etc

Maybe if its ported then devs can remove some bloatware and move some apps to data partition
 

jebuchanan

Senior Member
May 10, 2012
870
773
Well if any devs are going to do this...There is not much use in porting the UI and the SGSIII theme. Rather shouldn't the emphasis be on the handy features and new apps that Samsung have made?

Sent from my GT-I9100 using xda premium

I tend to agree with this

Sent from my GT-I9100 using XDA
 

Doallyn

Member
Feb 28, 2012
19
0
Won't the apps be portable anyway its all 4.0.4 - not sure why you would want the whole ROM for a different phone?
 

tomuknz

Member
Jul 22, 2011
30
0
London
Have been thinking about this all morning... glad people are already on the case!! After using an S3 yesterday, I'd personally be keen for a straight/similar ported ROM where possible rather than pulling out all the best bits. I've had enough of AOSP ROMs for now....
 

Top Liked Posts

  • There are no posts matching your filters.
  • 42
    Hi all,

    Sadly, I have irrecoverably bricked my S2 and I am no longer as active in the S2 forums. This does not mean you guys should stop trying to port this ROM to the S2 - It is a great device that should still be considered as one of the high-end phones in the market. Even though I've moved on to the S3 I will gladly try to help this project that I started and I am following this thread post by post.

    I think it would be a good idea if everyone that has done something for the porting post exactly what they did and what were the results.

    Hi guys,

    I know that I've been fairly quiet over the past week, and that is because this project is going nowhere. I know we have some general direction of what we have to do, but a lot of fine details are unclear to me and everybody else. These details are ones such as: how to decompile & recompile the apks, which images to resize & how, what folders should be renamed, what files are needed in the new Rom, and more.

    I have asked for assistance from the people porting the Sense 4 One X Rom to the S2, and I am waiting for a reply.

    Sit tight, and hope for the best!


    Hi guys!

    This thread is meant to organize the porting of the Galaxy S3 firmware to our Galaxy S2.

    The first thing we have to do is make the /system folder of the Rom smaller than 500MB, because that is how our phone is partitioned. To achieve that the first thing we have to do is convert all the XHDPI images in the apks to HDPI images because it will make the apks smaller and anyways - our phone is a HDPI device. After we do this, we will see if we have to trim down on more space in our /system folder.

    To test if the Rom will boot after we do the above steps, I deleted a bunch of non-essential apps such as voice talk to make the /system folder smaller than 500MB. I then replaced the /system/app & /system/framework with the modified S3 ones, but unfortunately the Rom did not boot fully and got stuck at boot animation. To figure out why it didn't boot, Pulser suggested that we use a kernel that has adb force enabled and then we can get a logcat and see what the problem is.

    For people who want to help meanwhile:

    The task that is needed to be done is convert all the XHDPI images in the apks to HDPI images.

    How to do this:

    1. Download the S3 Rom (below).
    2. Download Resizer 1.0 (below).
    3. Resize all XHDPI images in all the apks in /system/app & /system/framework.

    Download Links:

    I9100 Rom - http://www.mediafire.com/?4v6i6isqa3pa4lw

    I9300 Rom - http://www.mediafire.com/?9xk39miljh3l9vw

    Resizer 1.0 - http://www.mediafire.com/?d6h6lpwm8jxdjxr
    12
    Resized Apps: (0/190)

    /system/app (0/188)

    /system/framework (0/2)
    8
    Ok guys, a little how-to on de/recompiling apk's, for the people who are interested! (Many asked about it)

    Let's all make sure we don't change this thread in a de/recompiling thread, this thread is ment for porting the S3 Rom...

    To begin with:

    *You do not need the sdk installed, but you will need to have Java runtime installed. I am using Java version "1.6.0_29", but I am sure you can just download the latest java runtime.

    *Download this zip, and take the whole folder named: "ICS APK MANAGER" out of the zip!

    https://dl.dropbox.com/u/25779832/SGS2/ALLES ICS/Take folder ICS APK MANAGER out of this zip.zip

    Put the folder on the desktop of your computer.

    Now, let's start!:

    1) Open folder "ICS APK MANAGER"

    2) You will see 6 folders and a file named "SCRIPT"

    3) Open folder named: "place-apk-here-for-modding" and put in there the apk you want to DE compile

    For testing purposes, we will use SystemUI.apk, take this one:

    https://dl.dropbox.com/u/25779832/SGS2/ALLES ICS/SystemUI.apk

    It's the S3 LF2 stock SystemUI.apk

    So put the above SystemUI.apk in your "place-apk-here-for-modding" folder

    4) Now click on the batch file called: "SCRIPT"

    5) You will see a lot of options. First we need to load dependency files. The systemUI is "depends" on them, like the word says. And you won't be able to decompile the apk properly if you don't load them...

    So how do you do that?

    -Type 10 and hit the "Enter" button

    Now you will read in the command window you will need to drop the dependee file in that window.

    -Because you will probably using this tool for the first time, I recommend you drop the framework-res.apk in the window.

    Use this one, it's the S3 LF2 stock framework-res.apk:

    https://dl.dropbox.com/u/25779832/SGS2/ALLES ICS/framework-res.apk

    So download it from the above link I just gave you and drop it in the window and press "enter"

    6) The program is now decompiling you systemui.apk, the text: "Decompiling apk, test" is shown.

    -When you get an error in the command window, something went wrong, check the log.txt which has appeared in your "ICS APK FOLDER"
    -When it has decompiled properly, you won't get an error in the command window.
    But it is recommended to check your log.txt for errors anyhow!!

    With my above instructions and the systemui and framework-res I provided, you probably won't get any errors!
    So use the above files for testing, other files need other dependency files, so follow this tutorial with the files provided by me.

    7) Ok the apk decompiled properly. Now let's look at the decompiled apk. You can find it in the folder "projects".

    -Open that folder, and you'll see the folder SystemUI.apk. Click on it again, and you'll see a folder: assets, res and smali.

    Also you will see 2 files called AndroidManifest and apktool. This 2 files you will not touch, that's for more advanced users. Same goes for the assets-folder, and for the smali folder. In the smali folder is all the java code behind the apk. (The changes you make there, will later be transformed&recompiled in the classes.dex.) Advanced stuff:D

    -So... you guys concentrate on the res folder. This is the place to be for you guys. (The changes you make there, will later be transformed&recompiled in the resources.arsc.)

    So, to say things of point 7) shortly... The res folder is the place to be. Forget about the rest for now...

    8) I would like to show you guys some small changes we can make, but because a S3 systemui won't work on our S2, we will just REcompile the systemui.apk without changes.(Later we will check for errors)

    -Go back to the main folder, in "ICS APK MANAGER", where you see the folders: "other", "place-apk-here-for-modding", etc.

    9) Click the batch script: "SCRIPT"

    10) Type 11 and hit the "Enter" button.

    -The command screen will show you: "Building apk"

    This will take some time, the S3 apk's are huge in comparance to the S2 files, so it takes much longer. Wait.. Wait....

    -Now the command screen will show you: "Is this a system.apk?(y/n)"

    Type: y and hit the enter button.

    -Now the command screen will show you: " Aside from the signatures, would you like to copy over any.....etc (y/n)

    Type: y and hit the enter button.

    Your apk is now being built.

    11) Now the command screen will show you: " In the apk manager folder, you will find an keep folder.... bla bla bla....

    This is an IMPORTANT step. After getting the above message, open the folder "keep", which has just been created.

    -When you made changes to xml's, delete the resources.arsc in that folder.
    -When you made changes in the smali folder, deltete the classes.dex in that folder.

    To make sure, delete them both!!! That's the easiest and best way. They will be rebuilt anyhow....

    -When you made changes in the "res" folder, the best thing you can do is open the res-folder in the keep folder en delete everything in the res folder. Leave it empty!! They will be rebuilt anyhow....

    So summarizing point 11):

    You delete inside "keep" folder: classes.dex, resources.arsc, and in the res folder(in the keep folder) you delete everything!

    12) After having done the above, go back to the command window. And hit any key! You will see some stuff happening on your screen en now your system.apk is really built and ready!!


    Congratulations!

    Now, because we want to be sure, after having done all the above, we will check the log for recompiling errors.

    If none, well done!!:)

    13) You will find your newly built apk in the same folder als the original systemui.apk, in the "place-apk-here-for-modding" folder.

    -It will be called unsignedSystemUI.apk. Take it out of the folder and put it on your desktop. Don't sign it!! Just rename it to SystemUI.apk.

    You will also notice the "keep" folder has disappeared. Till you build your next apk.

    Say thank you UnderTaker for giving you a new de/recompiling addiction!


    I will tell it you again. We don't need the above to get the S3 Rom to boot!
    So let's not make this a de/recompiling topic.
    There are many topics about what I just explained to you guys.

    I do wish you guys good luck though, trying this out!:D
    5
    Can someone try booting with a kernel that has adb force enabled?

    Then get a logcat and see what the problem is :)
    5
    I've been quietly following this topic for a few days.

    And I admire the persistence of you all to accomplish this!

    It ain't going to be easy. Not as easy as @pulser made you think and perhaps by doing so, he created some false hope.

    The other part of me says, everything must be possible!!


    I think we should save /system space in a different way. And our first goal should be to make it boot. So lets delete a hack of a lot of apk's, that the /system doesn't need to boot.

    Phone doesn't need contacts, mms, phone, youtube, etc to boot...

    About the resizing...

    I don't think we must rename the XHDPI folders. S3 Resources will be looking for that folder names... Most of the png's in there are .9 png's... they will stretch to the right sizes anyhow...

    I think we should use an S2 kernel and S2 libfiles. Problem: the libfiles are connected to frameworkfiles... The libs are looking for id's in the frameworkfiles, and those will not correspond...

    From the other hand: Phone will never boot with S3 libs, due to hardware differences.

    Edit:

    Ok...

    Flashed S3 LEF Rom. Deleted almost all apps in system/app,(I left a Launcher(NOVA), systemui and setupwizard, lollzzz) changed to S2 libs, changed build prop.
    No Joy:-(

    I logcatted the beast.

    Surfaceflinger does seem to start up!

    Error in the other libs though:

    Code:
    E/ICU     (12548): Couldn't open '/system/usr/icu/icudt46l.dat': No such file or directory
    
    E/libcore (12548): Failed to initialize the core libraries; aborting...
    
    F/libc    (12548): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1
    )

    Also failure in Servicemanager, the yamaha-lib:

    Code:
    I/ServiceManager( 1822): Waiting for service media.yamahaplayer...

    Attached the logcatreport:

    https://dl.dropbox.com/u/25779832/SGS2/ALLES ICS/logcat.zip