[GUIDE] How to mod your stock ROM - T-Mobile Samsung Galaxy S II SGH-T989

Overview
This is my second GUIDE post. My first GUIDE explains how to compile the kernel from source. Follow that guide first before reading on. You can find it here: http://forum.xda-developers.com/showthread.php?t=1516051
This guide will get you started on how to modify your file-system (ROM). I will go over some examples of changing your phone functionality to show you how things are done. After that it is up to you to change what ever you want.
This first post will contain general information and requirements. The 2nd post will have guides on how to modify the initramfs. The 3rd post will have example modifications of the ROM.
These instructions work for both T989 (T-Mobile) and I727 (AT&T) variants of the Samsung Galaxy S2 phones. I do not take any credit for these instructions. I am just gathering what I learned from other posts and articles. I have listed the references below.
Requirements
The following instructions assumes you are using Ubuntu. I am using version 10.10.
ADB Setup
Android Debug Bridge (ADB) is a command line tool that allows you to command your phone via a USB connection. This requires you to turn on "USB debugging" on your phone. To do this on your phone goto Settings->Applications->Development. Make sure "USB debugging" is checked.
To get ADB and setup the USB driver go here: http://esausilva.com/2010/05/13/setting-up-adbusb-drivers-for-android-devices-in-linux-ubuntu/
Java Setup
In order to change the functionality of your Android system you will sometimes need to edit the jar/apk files. To do this you will need the Java Development Kit (JDK). Install the JDK with this:
Code:
sudo apt-get install sun-java6-jdk
Still Under Construction

How To Modify Initramfs
If you ever flash any of the custom ROM released by the great developers found in this forum you should be familiar with the terms "insecure kernel" and "init.d support." With an "insecure kernel" you can easily root your phone by bypassing the security through using ADB. With "init.d support" you can make automatic scripts to run at bootup. Both of these features require you to modify your initramfs.
In this post I will show you how to modify your initramfs to enable these features and in the future I will add more examples here.
If you do not know what a initramfs is or where to get it then you need to read my first GUIDE here: http://forum.xda-developers.com/showthread.php?t=1516051
Insecure Kernel
An insecure kernel allows ADB as root and commands like "adb remount" to enable write mode for your system. To make an insecure kernel it is a matter of modify the file "default.prop" in your initramfs. Open up this file with a text editor and change the line
Code:
ro.secure=1
to
Code:
ro.secure=0
After you make the change recompile the kernel with the modified initramfs using my kernel building guide. If you search in the forums there are guides on how to use your insecure kernel to root your phone.
Change Boot Image
In the initramfs folder you will find "initlogo.rle" This is the logo that appears during boot. You can replace this with a custom image as long as the format is compatible. When I have time, I will post the programs to convert from "rle->raw->png" and back "png->raw->rle" (search for "from565" and "to565").
Init.d Support
TODO (Sorry I have been really busy lately. I'll post this as soon as I get some free time. Basically you need to modify "init.rc" in your initramfs directory)

Introduction to Modifying ROM
In this post I will explain how to modify your stock ROM to include features like "volume wake-up" and more.
Getting your stock ROM
First we need to get a copy of your ROM. I found the easiest way to get this is to flash ClockworkMod and doing a backup of your phone to an external sd card. Connect your phone to your computer and grab the file called "system.ext4.tar" in your backup folder. This is your filesystem or ROM. Extract it to a working folder.
If you do not have ClockworkMod, please search the forums for instructions. ClockworkMod is a replacement for your default "Recovery" partition.
System folders
Here is a walkthrough of the folder structure of the system:
app\ - folder containing your apps (apk)
bin\ - folder containing binary executables
csc\ - consumer software customization, contains the software packages specific to your carrier
etc\ - system configurations
fonts\ - fonts folder
framework\ - folder containing android core files
lib\ - folder containing libraries (like .dll in windows) and modules (drivers)
media\ - folder containing media files
T9DB\ - looks like it contains keyboard layouts
tts\ - text to speech
usr\ - user settings
vsc\ - ????
xbin\ - alternate folder to hold binary executables???
build.prop - android settings file
CSCFiles.txt - carrier specific configuration file???
CSCVersion.txt - Configuration version???
SW_Configuration.xml - List of version numbers
The folders with question marks I am not sure of. If you know please post them here and I will update the list.
Understanding Odex and Deodex
Before getting your hands dirty, you need to know what odex and deodex means. Here is a good article on the issue: http://www.talkandroid.com/guides/m...n-the-all-inclusive-explanation/#.T1f7BN7Km9V
Remove Apps
All of your stock apps are in the "app" directory. You can remove all the bloat apps from this directory if you like.
Change Android Settings
You can modify "build.prop" in you system directory to change different Android settings. You can read more about the different settings here:
http://www.android-hilfe.de/root-ha...imus-3d/145592-tweaks-scripts-collection.html
Volume Wakeup
This volume wakeup guide was adapted from these two guides: http://www.jordanhotmann.com/2011/08/how-to-change-default-orientation-of.html and http://forum.xda-developers.com/showthread.php?p=18226553
In this guide I will show you how to modify your system files to allow waking up your phone with the volume keys instead of just the power key. This will prolong the life of the power key.
Requirements
This mod requires an edit to a jar file (Java archived file), specifically the file "/system/framework/android.policy.jar." To do this we need some tools that will disassemble the jar or apk file so we can edit the source code. After that we need to assemble it back and overwrite the original file(s).
Download the 4 files located here (smali-1.3.2.jar, baksmali-1.3.2.jar, baksmali, and smali): http://code.google.com/p/smali/downloads/list
Put the 4 files in a folder which is included in your path. For example, I placed the files in my home directory under a folder called bin (~/bin). Then in my ".bashrc" file I have this call at the end of the script:
PATH=~/bin:$PATH
This allows you to make calls to "baksmali" and "smali" in any directory.
Still Under Construction

To Do List
- How to make ClockworkMod flashable ROM. I have no clue how to do this. I always modify my ROM in place using "root explorer" and/or ABD, so I have never needed to flash a new one. It would be great if someone can post a guide on how to do this. Thanks.
*Update - See post #7. Thanks to one5
- How to modify cpu voltage and frequency
- How to change boot animation
My Request
I am still very new to all of this and android in general. I learned everything I posted here from reading other guides and articles on the internet and this forum. Through my searching, I found that the information on this stuff are there but very spread out making it very hard to find. This is why I started these guides to help out noobs like me. A central place where all the T989 (and I727, didn't forget you guys) noobs can come to learn.
I thank anyone for thanking me but my goal is to not get my "thank you" meter up. All I ask is if you learn something in regards to android development, please post up a GUIDE so everyone can benefit.
Also, my last request is if you see any errors or optimization to my steps please leave a note and I will change them.
Thank you.
References
http://esausilva.com/2010/05/13/setting-up-adbusb-drivers-for-android-devices-in-linux-ubuntu/
http://www.jordanhotmann.com/2011/08/how-to-change-default-orientation-of.html
http://www.neopeek.com/viewtopic.php?f=24&t=6801
http://www.talkandroid.com/guides/m...n-the-all-inclusive-explanation/#.T1a_ed7Km9V
http://www.freeyourandroid.com/guide/de-odexing_with_baksmali

Can't wait to read the full guide.
Sent from my SGH-T989 via Satanic Unicorns.

+1 can't wait for full guide.
Maybe i can do my own roms. If i trust myself.. Lol
cheers!!

How to make ClockworkMod flashable ROM
To make a flashable ROM:
Make a folder to dump the files from your phone, for example a folder named ROM on your desktop.
From CMD: adb pull / C:\Users\(yourusername)\Desktop\ROM
Download AutoUpdateCreator
Open CreateUpdateZip.exe and follow the directions.
Your ROM will be added to the generatedZips folder.

one5,
Thanks for the guide on making the ROM flashable.

one5 said:
To make a flashable ROM:
Make a folder to dump the files from your phone, for example a folder named ROM on your desktop.
From CMD: adb pull / C:\Users\(yourusername)\Desktop\ROM
Download AutoUpdateCreator
Open CreateUpdateZip.exe and follow the directions.
Your ROM will be added to the generatedZips folder.
Click to expand...
Click to collapse
thanks for the link. this is way nicer than doing it by hand.

Reserved
Sent from my SGH-T989 using xda premium

how could I easily make my phones kernel inscure... Semms like it should be easy but not sure... Im on ICS so befor I go doing all this just wanted to know if their was a easy way to get adb up and running again. without making a whole kernel I guess is what I want to know

Rushing said:
how could I easily make my phones kernel inscure... Semms like it should be easy but not sure... Im on ICS so befor I go doing all this just wanted to know if their was a easy way to get adb up and running again. without making a whole kernel I guess is what I want to know
Click to expand...
Click to collapse
If your on the stock T-mobile ICS update, just root it with the oden method. If your on one of the roms on here than you probably are already insecure.
---------- Post added at 11:34 AM ---------- Previous post was at 11:07 AM ----------
one5 said:
To make a flashable ROM:
Make a folder to dump the files from your phone, for example a folder named ROM on your desktop.
From CMD: adb pull / C:\Users\(yourusername)\Desktop\ROM
Download AutoUpdateCreator
Open CreateUpdateZip.exe and follow the directions.
Your ROM will be added to the generatedZips folder.
Click to expand...
Click to collapse
Works like a charm!! However, that command will also pull all data off int. & ext. sd storage. I was meaning to back them up any ways lol. Thanks to you and op!

Rushing said:
how could I easily make my phones kernel inscure... Semms like it should be easy but not sure... Im on ICS so befor I go doing all this just wanted to know if their was a easy way to get adb up and running again. without making a whole kernel I guess is what I want to know
Click to expand...
Click to collapse
Here is a guide if your stock. http://forum.xda-developers.com/showthread.php?p=23343879

This ROM AOSP, or TW, o wait, its neither.

It doesn't have to be a rom to be under development, loopy. Guides are very helpful to the community.
No offense loopdog just saying...
Sent from my SGH-T989 using xda premium

Rushing said:
It doesn't have to be a rom to be under development, loopy. Guides are very helpful to the community.
No offense loopdog just saying...
Sent from my SGH-T989 using xda premium
Click to expand...
Click to collapse
Guides are indeed very helpful and this looks like a good one. Correct me if I'm wrong, but I was under the impression that any thread in development had to involve coding. It had to provide something that can be flashed or installed. IMHO, guides and tutorials; in general. Questions, of course Q&A. Apps and themes, pretty self explainetary. Development, all that is done thru coding involving Android and is flashable

Agreed my friend but I've noticed that on many forums guides may go under development and even get stickied in some cases. Just saying the scope is just a bit more wide than flashables and code oriented posts... TheRe should be a section just for guides I think that would make it really easy to find guides anyway... Peace threadjack over .
Sent from my SGH-T989 using xda premium

15 toggles
Any known Guides to implement 15 Toggles to a TW Rom ??? can't find one for our device !!!
Thanks

Tornade69 said:
Any known Guides to implement 15 Toggles to a TW Rom ??? can't find one for our device !!!
Thanks
Click to expand...
Click to collapse
Yes. well what do you mean exactly by implement?
Sent from my SGH-T989 using xda premium

Rushing said:
Yes. well what do you mean exactly by implement?
Sent from my SGH-T989 using xda premium
Click to expand...
Click to collapse
I want to add this mod in my own custom rom but can't find how to do it...
Sent from my SGH-T989 using xda app-developers app

Related

Android Dev. How-To Guide: Compiling the Android/Linux kernel for the Epic Touch 4G

Android Development How-To: Compiling the Android/Linux kernel for the Epic Touch 4G.
NOW INCLUDES ROOT!!!
Introduction: This guide is meant for people who want to get started with android development and don't know where to start. This thread can also be used as a reference place for android development on the et4g. This guide well first be on compiling the android kernel and flashing it to your phone and, I well update it on a regular basis for more complex mods and such to get you familiar with the android platform. If at anytime anyone would like to add more to this, pm me with what you would like to add or fix. Android is an open-source wonderland and I feel like more people should experience the fun of android development. Just remember I am not responsible if you do something stupid and break your phone!
First, we are going to get familiar with the android kernel by compiling a stock build and flashing it with Odin to your et4g.
What you need to download to compile the kernel:
Samsung open-source kernel and platform files. Available at: Samsung Open Source
Type in: Sph-d710 in the search bar in the link and download latest source.
initramfs files (More on this later) (includes cwm, busy box, and of course root! Thanks to chris41g for his help.) Files available at: Initramfs Files
Tool chain for compiling: Available at: Arm-toolchain
Preferably Ubuntu or another Distro. Of Linux running on a partition or Virtual machine.
Step 1: Were going to unzip the source you got from Samsung and take a short look around.
unzip the source and unzip the file that says, “SPH-D710_GB_Kernel.tar.gz” and, open it up. You are now looking at the kernel source for the Epic touch 4g! Okay I well not go over to much whats is here but, I well add a more in depth look in the kernel soon.
Scroll to the bottom of the source and you should see a document that says, "makefile". We are just going to add a name for your stock compile of the kernel, to make it a little more special. Open it and go to where it says Extra version and add your last name ,just make it all lower case letters or it wont compile correctly. When you flash it to your phone, the about phone panel in setting well say: Kernel version: 2.6 [last name you chose] now.
Step 2: Lets get started!
Open terminal in Linux and change your directory to the kernel. You do this by putting,
“cd” and then typing where your kernel source is then hit enter. My terminal looked like this:
cd /home/shane/Desktop/SPH-D710_GB_Kernel
Click to expand...
Click to collapse
Step 3: Tell terminal where your tool chains you downloaded are located.
The kernel is compiled using a tool chain, and the terminal needs to know where the tool chain is to compile. (The tool chain is the folder called “arm-2009q3” )Start by typing this in the terminal:
export CROSS_COMPILE=
Click to expand...
Click to collapse
Then after that put where your tool chain is located. Also when you are entering where it is at, you need to put a “/bin/arm-none-eabi-” at the end of the directory. This shows the terminal that the compiling tools are under the folder bin and starts with arm-none-eabi- and the android compilation adds the last word for the compiler program it needs. (you can see this if you go into the bin folder under the “arm-2009q3 folder.) For adding the tool chain I entered this:
export CROSS_COMPILE=/home/shane/Desktop/arm-2009q3/bin/arm-none-eabi-
Click to expand...
Click to collapse
Then hit enter.
Step 4: Clean the kernel, enter configuration files and make the modules.
Enter this command:
sudo make clean
Click to expand...
Click to collapse
Then enter password and hit enter.
Then it well say something like:
make: /opt/toolchains/arm-2009q3/bin/arm-none-linux-gnueabi-gcc: Command not found
Click to expand...
Click to collapse
IGNORE THIS! It is just a fragment in a configuration file that says the toolchain is not in the default location. But, we changed the tool chain location in step 3 so it well compile correctly.
This cleans up and organizes the kernel for compilation.
Now enter this command in terminal:
make c1_rev05_na_spr_defconfig
Click to expand...
Click to collapse
This is the configuration files for the epic touch 4g and well compile the kernel based off what is in these files.
Now were going to compile all the modules so wifi,vibration... work.
Enter this in terminal:
make modules
Click to expand...
Click to collapse
Step 5: Moving the newly compiled modules to the initramfs/lib/modules folder.
We are now going to move the modules from the newly compiled modules to the initramfs files. So that wifi and vibration well be working in our kernel.
*Initramfs files are the root filesystem of the kernel and does processes the kernel can't do itself while its booting.
You can do this by terminal or by hand. We are just moving the modules to the initramfs to be used when compiling the kernel.
You can type this into terminal (Where it says “Path to initramfs” you need to replace with your own path to the initramfs folder + /lib/modules) :
cp drivers/samsung/j4fs/j4fs.ko Path to initramfs/lib/modules
cp drivers/scsi/scsi_wait_scan.ko Path to initramfs/lib/modules
cp drivers/bluetooth/bthid/bthid.ko Path to initramfs/lib/modules
cp drivers/net/wireless/bcm4330/dhd.ko Path to initramfs/lib/modules
cp drivers/samsung/vibetonz/vibrator.ko Path to initramfs/lib/modules
cp drivers/staging/westbridge/astoria/switch/cyasswitch.ko Path to initramfs/lib/modules
Click to expand...
Click to collapse
This copies the new modules out of the kernel source and puts them in the initramfs/lib/modules folder to be used later.
Now once you enter that press enter.
Step 7: Compiling the android kernel with initramfs.
Type this in terminal:
make -j5 CONFIG_INITRAMFS_SOURCE=Path to initramfs file
Click to expand...
Click to collapse
*Remember to replace the “path to initramfs file” with the path to the initramfs file.
Okay this well take anywhere from 5-15 mins. to compile depending on your system.
Step 8: Were done compiling, lets make something flashable for Odin!
Just type in terminal:
cd arch/arm/boot/
Click to expand...
Click to collapse
Then type:
tar cvf MyKernel.tar zImage
Click to expand...
Click to collapse
This well zip up the zimage (the kernel) you just compiled to something flashable in odin.
If you open up the kernel source file and go to arch/arm/boot you well see the zimage you compiled and, the Mykernel.tar file for Odin. Double check and right click on the zimage and make sure it is around 5-6 MB before flashing.
Step 9: Flashing to your phone.
Go to a windows computer and download Odin.(if you have rooted your phone using zedomax's method you should have it installed already)
Okay now open it up and place the Mykernel.tar file in the PDA section of Odin. Now download the drivers for your phone if you haven't.(I assume you already have.) Then put your phone in download mode (hold volume down button and power button on start up and push volume up button when the warning pops up) Now plug your phone into the computer and make sure “auto-reboot” is the only box checked in Odin. Hit start and your phone well be flashed with a kernel you compiled yourself! If you did this right your phone should start up. If it is stuck in a boot loop, immediately put back in download mode and flash to stock. Link available here to stock files:
http://forum.xda-developers.com/showthread.php?t=1409634
and, try to figure out what you did wrong while compiling and try again!
Good job you have finished!
Step 10: The future and your new phone!
I would like to include more android kernel mods and stuff in the future but, wanted to get this out there to get people familiar with the android compiling process. I want this guide to be something people reference as they start to develop, by using the methods here along with kernel and U.I mods on the platform being implemented in the future. My ultimate goal is to at least know I helped at least one person get into android development so, if I helped you please leave a reply or say thanks. If anyone has ideas to add to the post, please pm me.
Have fun developing!
I'll take this...
and this...
One more...
Awesome!!!! I have been patiently awaiting this. THANK YOU SOOO MUCH!!!!
Sent from my SPH-D710 using xda premium
Thank you! Definitely will be referring to this during my free time. Can't wait to see what else gets added
Sent from my SPH-D710 using xda premium
Awesome!! tyvm!!
Wow... How awesome is this? I have been looking for something like this for a long time. I will be watching for updates. Thank you very much.
all u need now is a video tutorial
My man!!! Thank you for this!!
Sent from this phone
Awesome guide, I am looking forward to giving this a go soon. Just curious but how difficult is the process to include a custom recovery?
dtm_stretch said:
Awesome guide, I am looking forward to giving this a go soon. Just curious but how difficult is the process to include a custom recovery?
Click to expand...
Click to collapse
It all depends if you wanted to flash a already made custom recovery (cwm) then we would just haved to root the kernel then build and flash the recovery. If you were to make a fully custom recovery with custom functions made by you then it could get a little more tricky but, I am guessing you just mean flashing a custom recovery like cwm. Which is not terribly hard but, not neccesary easy eather depending on how hard it is to obtain root.
I might update the guide in the future. Showing how to do something like this but, I have a few more ideas for the guide before I include this.
You nailed it, I was curious about adding root and CWM(or a variation of it). I am more than content with figuring out what you have posted so far.
Thank you so much. This is absolutely great!
Sent from my SPH-D710 using XDA App
Awesome guide. Thank u so much for this. Hope for many more.
Sent from my Nexus S 4G using xda premium
Very awesome thanks for the share!!
Sent from my SPH-D710 using XDA App
Great Guide!
Very informative and well put, Thank You.
thank you very much for this! Gives me something new to try out. Thanks again!!!
Sent from my SPH-D710 using Tapatalk
Thanks for this effort. Unfortunately I don't have anything to contribute to your work. I consider myself a budding developer and have been diligently teaching myself to program with the use of some great texts over the last 2 weeks. While I have much to learn this guide and hopefully any additions you make will help me dive nose first into Android development like I've been hoping to for the last couple of years.
I hope you continue to add more into this guide and it becomes a great resource for others like me.
Great Job!
obelisk79 said:
Thanks for this effort. Unfortunately I don't have anything to contribute to your work. I consider myself a budding developer and have been diligently teaching myself to program with the use of some great texts over the last 2 weeks. While I have much to learn this guide and hopefully any additions you make will help me dive nose first into Android development like I've been hoping to for the last couple of years.
I hope you continue to add more into this guide and it becomes a great resource for others like me.
Great Job!
Click to expand...
Click to collapse
I hope it helps!

Cooking My 1st Rom (Experts plzzzz have a look :o)

hey everyone
i'm trying to build my first rom, not sure what i am doing but still trying
i would like to list what i've done, and i would love if Dev's could confirm/correct what i've done.
So this is my status :
** Env: winxp & VMware (linux ubuntu 10.11)
1- Kitchen : dsixda-Android-Kitchen-0.188-0-ge5d2a45
url: http://forum.xda-developers.com/showthread.php?t=633246
2- Rom : Pre-rooted Stock Gingerbread (3.14.405.1)
url: http://forum.xda-developers.com/showthread.php?t=1200261
3- using Kernel Gingercakes0.9cfs_2way_HAVS
url: http://forum.xda-developers.com/showthread.php?t=1254272
- extracted current Rom's Kernel (using kitchen), replaced zImage, then re-packed boot.img,
also replaced bcm4329.ko at /system/lib/modules with the one in the Kernel's update zip file.
4- added ext4 support (the Mod was at the rom thread)
- by adding the lib/modules files & the init.d/00ext4 file
5- deodexed both /system/app & /system/framework : using the kitchen menu.
6- added NANO editor : using the kitchen menu.
7- custom bootanimation functionality (/data/local) : using kitchen menu.
8- zipaligned apk files under /system/app : using kitchen menu.
i will continue adding mods and so, but i need someone -please- to confirm or correct my steps
one major thing i am not sure about is that i can use the gingercackes kernel with a bravo rom?
i mean not a ported Rom from Ace.
also there was more than one update package for kernel to use, i picked cfs_2way_HAVS as a test
there were more like SVS and so.. what is the diferences -short words will be good -
any help will be gratfuly appreciated.
thanks.
This isn't building a Rom, this is taking someone else's rooted stock and adding options using dsixda kitchen. There isn't really anything that can go wrong. Children can do it. In fact they do...
Sent from my HTC Desire using Tapatalk
rootSU said:
This isn't building a Rom, this is taking someone else's rooted stock and adding options using dsixda kitchen. There isn't really anything that can go wrong. Children can do it. In fact they do...
Sent from my HTC Desire using Tapatalk
Click to expand...
Click to collapse
OMG that was OUCH
ok i said i am new , don't know if words are really critical this way
build , customize , or adding options ...
i am not claiming it for me, as i mentioned all URLs i used
so i am not stealing anyone's hard work ... right?
i was really happy when i saw a reply to my thread, but really got surprised when i red it.
just like a pull-back
even you did not answer any question ...
thanks .
Sorry, not meant to be a dig. You just select what options you want and select build. If you can press buttons on a keyboard, you're doing it right. It can't be simpler. There is literally no advice to give.
Sent from my HTC Desire using Tapatalk
rootSU said:
Sorry, not meant to be a dig. You just select what options you want and select build. If you can press buttons on a keyboard, you're doing it right. It can't be simpler. There is literally no advice to give.
Sent from my HTC Desire using Tapatalk
Click to expand...
Click to collapse
no problem.
hello again,
in case anyone still interested . the rom as described above was flashed and successfully booted
- the compass still not fixed in the kernel
i will try SNQ's kernel ...
- will try to add trackpad-wake.
- maybe adding the extended power menu.

[SCRIPT]Automatic Porting![Windows and Linux][Works with all devices now!]

I just wrote a script that would automatically port ANY carrier's gs3 roms to ANY other carrier's devices
So now u can use all the roms other carriers get
Let me know if there are any errors(not including not found errors)
THIS ON OMG! DROID
http://omgdroid.com/script-released...-iii-custom-rom-to-any-other-carriers-device/
The future of this:
1. Ill add all the proprietary files from all the carriers so u dont have to have a base. DONE
2. UNIVERSAL ZIPS FOR ALL US GS3S THIS WILL TAKE A LONG TIME CUZ I HAVE TO LEARN HOW TO USE AROMA OR WRITE AN UPDATER-SCRIPT BUT IT WILL COME!!!(If anyone wants to teach me how to do those just pm me.) DONE BUT NOT GONNA RELEASE YET
3.Ability to automatically port ANY phones ROM to ANY other phone as long as they have the same dpi, manufacturer, and arm version. WORKING ON THIS. LEARNING PYTHON
How to use:
Linux:
1. download the rom u want to port and a rom on the SAME android version as the rom u want to port
2. unzip both of them and place both folders in the same folder
3. download the script and place it in the folder with the two rom folders
4. open a terminal and cd to the directory
5. run:
Code:
chmod +x portscript.sh
./portscript.sh
6. PROFIT
FOR WINDOWS I RECOMMEND CYGWIN AND THE LINUX VERSION. THE WINDOWS VERSION IS KINDA MESSED UP.
Windows(experimental):
1. download the rom u want to port and a rom on the SAME android version as the rom u want to port
2. unzip both of them and place both folders in the same folder
3. download the script and place it in the folder with the two rom folders
4. rename the rom you want to port's folder to port
5. double-click on portscript.bat
6. PROFIT
How to port rom from galaxy nexus or any other xhdpi armv7 samsung device:
1. inside ur base rom, open META-INF/com/google/android/updater-script as a text file and copy the mount points (like mount(/dev/block/mmcblk0p8, /system) you would copy /dev/blockmmcblk0p8)
2. Download script and do the porting procedure
3. open up the rom u are porting's META-INF/com/google/android/updater-script and replace the mounting with the values u copied.
4. save and move the updater-script to ur base's META-INF/com/google/android/ and replace
NEW!!!
NO NEED FOR BASE:
1. download the nobase script zip and extract it somewhere
2. download a device's proprietary files zip and extract it into the folder of the script
3. run the script and follow directions!
how to add a device to the nobase script:
download and unpack the zip with ur desired carrier/android version
run the portdiffs.sh and follow directions!
Disclaimer:
Im not responsible for anything that might go wrong
Changelog:
v3: more fixes
v2: fixed update-binary being update_binary
DLs:
.bat s are windows, .sh is linux.
portscriptnobase is linux
https://docs.google.com/folder/d/0B2qlFDXo6JOreUY3RjFkRm1aeFU/edit
Thanks to d3athsd00r for helping
does this apply for international GS3????
ice3186 said:
does this apply for international GS3????
Click to expand...
Click to collapse
Probably
Sent from my SAMSUNG-SGH-I747 using Tapatalk 2
What!! No way dude!!
White Hot! GS3.
cpu999 said:
I just wrote a script that would automatically port ANY carrier's gs3 roms to ANY other carrier's devices
So now u can use all the roms other carriers get
Let me know if there are any errors(not including not found errors)
How to use:
1. download the rom u want to port and a rom on the SAME android version as the rom u want to port
2. unzip both of them and place both folders in the same folder
3. download the script and place it in the folder with the two rom folders
4. open a terminal and cd to the directory
5. run:
Code:
chmod +x portscript.sh
./portscript.sh
6. PROFIT
Disclaimer:
Im not responsible for anything that might go wrong
DLs:
Realease 1 (Prealpha)
Click to expand...
Click to collapse
I am probably treading into an area that I have no business going to - but I would love to try this - and don't have enough knowledge to follow your instructions - was hoping you could explain the last few steps - I am going to sound like a real noob - but I don't understand some of the language -
what do you mean when you say "open a terminal and cd to the directory" ? if you can simplify that a little - I think I can do this and would love to try -
I think it means that I need to put save the roms and the script you have provided and place them in my C drive - then open a command prompt in that file (shift and right click I believe) is that correct?
second question - when I tried to download the file you provided from the lnk - it opened GOOGLE DRIVE and said I needed to request permission to access the file - ? I clicked request and am now waiting for some kind of response
?
cpu999 said:
Probably
Sent from my SAMSUNG-SGH-I747 using Tapatalk 2
Click to expand...
Click to collapse
No that will not work. If this does simple recovery mount point changes & build prop changes that will work for the family of SGS3 that share the same hardware. It will not work for i9300 as that has a different set of hardware. Thus, different libs and what not.
I doubt this script has the ability to decompile & merge correctly smali. Or has a downloadable collection of libs for i9300. Probably only works for the SGS3 variants like AT&T, telus, tmobile, etc.
iBotPeaches said:
No that will not work. If this does simple recovery mount point changes & build prop changes that will work for the family of SGS3 that share the same hardware. It will not work for i9300 as that has a different set of hardware. Thus, different libs and what not.
I doubt this script has the ability to decompile & merge correctly smali. Or has a downloadable collection of libs for i9300. Probably only works for the SGS3 variants like AT&T, telus, tmobile, etc.
Click to expand...
Click to collapse
Thanks
will be adding that to the OP
mocsab said:
I am probably treading into an area that I have no business going to - but I would love to try this - and don't have enough knowledge to follow your instructions - was hoping you could explain the last few steps - I am going to sound like a real noob - but I don't understand some of the language -
what do you mean when you say "open a terminal and cd to the directory" ? if you can simplify that a little - I think I can do this and would love to try -
I think it means that I need to put save the roms and the script you have provided and place them in my C drive - then open a command prompt in that file (shift and right click I believe) is that correct?
second question - when I tried to download the file you provided from the lnk - it opened GOOGLE DRIVE and said I needed to request permission to access the file - ? I clicked request and am now waiting for some kind of response
?
Click to expand...
Click to collapse
this script only works in linux for now.
Ill create a windows one once I have time
LuRock said:
What!! No way dude!!
White Hot! GS3.
Click to expand...
Click to collapse
Its just an automation of my method of porting
yea it def will not work for 9300 youll have to change a lot of stuff just to get it booting
cpu999 said:
this script only works in linux for now.
Ill create a windows one once I have time
Click to expand...
Click to collapse
so if lets say i got a tmobile gs3 and want to port an att rom, will it add wifi calling too?
even if it ports the wifi calling from tmobile..it won't work on att. it'll not be recognized as it requires tmobile service to really work.
Sent from my SAMSUNG-SGH-I747 using xda premium
lazarat said:
so if lets say i got a tmobile gs3 and want to port an att rom, will it add wifi calling too?
Click to expand...
Click to collapse
no.
this is just a simple script that would port things.
it just makes the rom compatible wiht ur phone
cpu999 said:
no.
this is just a simple script that would port things.
it just makes the rom compatible wiht ur phone
Click to expand...
Click to collapse
Oh ok thanks..althogh up till this point i have had no problems using att roms on my tmo gs3
Being a windows user I have to wait until you create a version for that - can't wait to try i t- I am not a developer but if this works - it opens all kinds of opportunties to try new thing s- I am adventurous = and I ahve insurance on my phone - lol - looking forward to giving this a shot -
I was wondering when someone was going to do this. I was going to if I could ever get time away from my real job. Thanks for the contribution!
Sent from my GS3 using xda premium
Sorry of this is a dumb question but if this script works then I could use this to use T-Mobile roms on my att s3?
Sent from my htc_jewel using xda app-developers app
wwevoxnj said:
Sorry of this is a dumb question but if this script works then I could use this to use T-Mobile roms on my att s3?
Sent from my htc_jewel using xda app-developers app
Click to expand...
Click to collapse
its ANY us gs3 rom to ANY us gs3 rom
Wow I can't wait for a windows version of this!! I'm addicated to flashing roms haha.
Sent from my htc_jewel using xda app-developers app
I've flashed many T-Mobile roms on my at&t / rogers s3 already...
FreeGS3 r6, Gigajule, Wicked v5 all works great as long as you flash the right kernel and never flash a modem...
Sent from my SGH-T999 using Tapatalk 2

[DEV] [Q&A] Please Post all Questions about Development here, lets keep this clean...

[DEV] [Q&A] Please Post all Questions about Development here, lets keep this clean...
Yoo Here you guys can post random questions regarding development etc
We have already a bunch of threads here regarding Development about AROMA Installer, Theming, ROM Making & I'm getting like a Billion PM's everyday​About:
- AROMA Installer
- Flashable ZIPs
- Framework
- Theming
- Modding
- De/Re-Compiling
- Tweaking
- ...
Finally, someone took the proper step to start this kind of thread,. However, it seems like that I am first with some kind of question and here it is:
Me and a buddy are going to developing our own custom ICS ROM for Arc S (it is our first - so don't blame anyone of us, thanks! :c) and I am going to create an flashable ZIP file for some testing to see other peoples critic and reaction over the ROM and I have searched Google like an madman but can't find any good guide on how to make my own ZIP file.. Do u got any tips or something?
Destroyedbeauty said:
Finally, someone took the proper step to start this kind of thread,. However, it seems like that I am first with some kind of question and here it is:
Me and a buddy are going to developing our own custom ICS ROM for Arc S (it is our first - so don't blame anyone of us, thanks! :c) and I am going to create an flashable ZIP file for some testing to see other peoples critic and reaction over the ROM and I have searched Google like an madman but can't find any good guide on how to make my own ZIP file.. Do u got any tips or something?
Click to expand...
Click to collapse
Sure...
First you need a /system file.
You can mod the ROM on your phone, and than make a backup.
Than you can extract this backup using Yaffey.
Now you extract the system.img and put the /system in a .zip
Now the next part..
Download any flashable ROM for Xperia, and put META-INF in your .zip folder and edit the updater script placed in the folders to suit your ROM.
Now you must have inside the .zip "system" and "meta-inf". Make Sure that /system is extracting to /system
Best Regards
Destroyedbeauty said:
I have searched Google like an madman but can't find any good guide on how to make my own ZIP file
Click to expand...
Click to collapse
Makes me wonder what some People class as "searching", especially when they claim they can't find what's already been Posted - create a flashable zip
XperienceD said:
Makes me wonder what some People class as "searching", especially when they claim they can't find what's already been Posted - create a flashable zip
Click to expand...
Click to collapse
So True...
Which is the latest version of ULTIMATE HD ROMS??
Sent From My Xperia Arc S
AlwaysAsk said:
Which is the latest version of ULTIMATE HD ROMS??
Sent From My Xperia Arc S
Click to expand...
Click to collapse
2.0

[Q] Difference Between Toro/Maguro Roms

Hello,
I am learning about rom development, and want some information about porting a rom from one version of the Nexus to another. There are a couple roms that are on the GSM Nexus that I would like to see on the Verizon Nexus. Where can I find documentation on what the differences are between the same rom running on both versions of the phone? Is this just the binaries found on the Google Developer page, or is there more that would be required for porting from maguro to toro?
There's more to it. There's some lib files that might be needed in order for some stuff to work properly. But its real easy tho. Make sure the ROM u want to port is the same android version. So for example u want to port a 4.2.1 ROM make sure your base ROM is also a 4.2.1 like cm 10.1. Then u just copy some files from one ROM to another. So u go into your ROM that u want to port and u open it with 7zip go to system folder and copy app fonts framework and media folder and copy them to your base ROM. Then u go into the lib folder and copy libandroid_runtime.so and paste that into system lib folder of your base. Then it should work. That would be the basic way of doing it. As far as building from source I can't help u there lol. Good luck.
Sent from my Galaxy Nexus using xda premium
Ok, how do I know which lib files I need? Is there somewhere I can go that says this file does this, this file does that? For example if the camera doesnt work, or if sound doesnt work, how do I know which files are needed for those?
Also, why copy the app fonts framework and the media folder?
Wingdom said:
Ok, how do I know which lib files I need? Is there somewhere I can go that says this file does this, this file does that? For example if the camera doesnt work, or if sound doesnt work, how do I know which files are needed for those?
Also, why copy the app fonts framework and the media folder?
Click to expand...
Click to collapse
Because the framework folder has all the mods from the ROM. As far as camera u don't have to worry about that since they are both the same phone. The only lib file u need to change is the one I mentioned. That's the one that usually will give u a problem booting up. But that's what I was told u need to change and it works.
Sent from my Galaxy Nexus using xda premium
Is there a place that documents what all of these files do? I am trying to go a couple levels deeper than just "Do it because it works". I am hoping to find a place that will explain why, so I can track down bugs when they pop up.
Wingdom said:
Is there a place that documents what all of these files do? I am trying to go a couple levels deeper than just "Do it because it works". I am hoping to find a place that will explain why, so I can track down bugs when they pop up.
Click to expand...
Click to collapse
I see. I'm not to that level yet. Try Google search or maybe even YouTube see if u find something. I do know u will need knowledge on how to use adb so u can do logcats when errors occur. Good luck man.
Sent from my Galaxy Nexus using xda premium
Alright, I got the rom to boot, but I am not getting any signal or wifi. What files do I need to get these working? I want specifics, not copy over all files in a single folder, because I dont want to lose any of the customization already in the rom.
I once ported a version of minco to Toro before there was an official version. I figured out which files to swap by comparing file by file two roms - one maguro one Toro. Any file that was divergent file size got swapped except systemui.apk and frameworkres.apk. I used two bugless beast roms as a base. It worked perfectly.
Wingdom said:
Hello,
I am learning about rom development, and want some information about porting a rom from one version of the Nexus to another. There are a couple roms that are on the GSM Nexus that I would like to see on the Verizon Nexus. Where can I find documentation on what the differences are between the same rom running on both versions of the phone? Is this just the binaries found on the Google Developer page, or is there more that would be required for porting from maguro to toro?
Click to expand...
Click to collapse
There are hardly any differences. I looked at it a lot when the jelly bean developer preview was released for gsm devices and I 'ported' it for toro. I had a list of the differences, but apparently lost it. I want to say that there are only 10-15 differences. The way I found out what the main differences were was by comparing the same build of CM for toro and maguro using Beyond Compare using a binary comparison. Some files may be different, but if you compare the bits directly...you can sometimes see it's only a build date/time and not a real difference.
edit 1 - To try to answer some of your questions, try libsec-ril_lte.so and libsecril-client.so (and the apn stuff listed below) for signal AND bcmdhd.cal and bcm4330.hcd for wifi. For camera, I think I remember fRom being needed. For GPS, you'll want sirfgps.conf, gps.omap4.so, gps.conf, and lib_gsd4t.so from toro.
edit 2 - Ahhh, I found a post where I listed the difference between maguro and toro that I found (it may not be all inclusive, but it should give you a good start!). These were from the CM roms, so toro factory images have a couple more things like MyVerizon.apk, VerizonSSO.apk, VZWBackupAssistant.apk, and libmotricity.so (needed for VerizonSSO.apk).
Code:
\system\app\BIP.apk
\system\app\RTN.apk
\system\app\VZWAPNLib.apk
\system\app\VZWAPNService.apk
\system\etc\gps.conf
\system\etc\permissions\android.hardware.telephony.cdma.xml
\system\etc\permissions\com.vzw.vzwapnlib.xml
\system\etc\permissions\com.vzw.hardware.lte.xml
\system\etc\permissions\com.vzw.hardware.ehrpd.xml
\system\etc\wifi\bcmdhd.cal
\system\etc\apns-conf.xml
\system\etc\NOTICE.html.gz
\system\lib\hw\gps.omap4.so
\system\lib\lib_gsd4t.so
\system\vendor\etc\sirfgps.conf
\system\vendor\firmware\bcm4330.hcd
\system\vendor\lib\libsec-ril_lte.so
Thank you! That is exactly what I was looking for. I do have one more question. How is a power menu (hold power button to get reboot, recovery, hotboot, etc..) added to a rom?
Wingdom said:
Thank you! That is exactly what I was looking for. I do have one more question. How is a power menu (hold power button to get reboot, recovery, hotboot, etc..) added to a rom?
Click to expand...
Click to collapse
You have to modify the android policy jar in framework from code. There is a modded jar in the apps and themes forum, or you could try and lift the file or of your favorite custom ROM, like cyanogenmod.
Wingdom said:
Thank you! That is exactly what I was looking for. I do have one more question. How is a power menu (hold power button to get reboot, recovery, hotboot, etc..) added to a rom?
Click to expand...
Click to collapse
Glad to see you have some initiative! If you want the .smali edits for the advanced power menu, I have attached a .zip containing the comparison of the mod for my 4.2.1 stock AOSP rom. You need to add the 3 GlobalActions$11xx.smali files (in the attached .zip) to \smali\com\android\internal\policy\impl when you decompile your android.policy.jar with apktool. The 2 .pdf's show the smali edits to the 2 files that need modified. There are just a few lines added/changed. The changes for GlobalActions.smali are on page 19 of the .pdf. If you need a working apktool for 4.2.1, you can get one the I compiled using paulobrein's patch HERE.
I'm glad to see people helping a fellow who whats to turn user-to-dev.
Sent from my Galaxy Nexus using Tapatalk 2
Wingdom said:
Alright, I got the rom to boot, but I am not getting any signal or wifi. What files do I need to get these working? I want specifics, not copy over all files in a single folder, because I dont want to lose any of the customization already in the rom.
Click to expand...
Click to collapse
Try flashing the radios. Here is a link: http://forum.xda-developers.com/showthread.php?t=1890585
Wingdom said:
Alright, I got the rom to boot, but I am not getting any signal or wifi. What files do I need to get these working? I want specifics, not copy over all files in a single folder, because I dont want to lose any of the customization already in the rom.
Click to expand...
Click to collapse
I know this is old but... How did it go?
I was trying to port cm-Resurrection_Remix_LP_v5.3.9-20150319-maguro to toro by comparing Resurrection_Remix_KK_v5.1.5-20140609-toro with that maguro but CM12 structure and format is completely different than KK...

Categories

Resources