[Help for Porting ]Stuck in Bootloop - Android Q&A, Help & Troubleshooting

Guys Im porting samsung s plus rom to LG Optimus sol. They same 1 GHz cpu and adreno 205...i swapped all files as mentioned Below..but i have boot loop...in boot image....im using the boot from galaxy plus swapping only ZImage file from base and renamed the "init.devicename.rc" and "unvented.device.rc" to my device name as "init.victor.rc" and "unvented.victor.rc"...both kernel has same init.rc....i also tried of using my base rom also but it has bootloop......some times it bootup showing as "Android is upgrading" and Starting Applications" and start loops.....dono wat to do...plzzz help me out guys...im very close to finish my porting....ill be very thankful to u for helping my first port....
Swap files in bin
am
ami304d
bmgr
brcm_patchram_plus
hci_attach
fix_permissions
ime
input
monkey
pm
port-bridge
rild
servicemanager
vold
copy this all files from base bin folder to port bin folder. all files need beacuse for bluetooth,gsm sensor and other working
after bin folder open etc folder in base and port. now copy following files and folderto port bin folder
folders
before copy folder delete following folder from port then copy following folder from base to port.
bluetooth
dhcpd
firmware
permissions
ppp
wifi
wl
copy this folder from base to port affter deleting folder from port
now we need to copy files from base to port. copy following files
apns-conf.xml
dbus.conf
gps.conf
hosts
media-profiles.xml
resolv.conf
vold.fstab
copy this files from base etc to port etc
after etc go to the lib folder. open lib folder in base and port
folder
now you need to copy following folder from base to port. but before copy delete following folder from port then copy.
modules
hw
egl
copy this folder from base to port. after deleting folder in port.
now time for files. copy following files from base to port
libauth.so
libcm.so
some time you need to copy all audio file from base to port. but some time libbluedroid
libbluetooth
libbluetoothd
libcamera
libcameraservice
libdiag.so
libdbus.so
libdss.so
libdsm.so
libdll
libgsl.so
libgstk_exp.so
libmiscta.so
libmmgsdilib.so
libmmipl.so
libmmjpeg.so
liblog
libnv.so
liboem_rapi.so
liboemcamera.so
libhardware_legacy
liboncrpc.so
libpbmlib.so
libqmi.so
libqueue.so
libril.so
libril-qc-1.so
libsensorservice
libwebcore
libwms.so
libwmsts.so
copy this all files from base lib to port lib
after lib. now time to go usr folder. open usr folder in base and port.
delete following folder in port then copy and following folder from base to port
keychars
keylayout
copy this folder from base to port after delete folder in port
now go to the xbin folder.open xbin folder in base and port. then copy following file from base to port
hcitool
hcidump
hciconfig
now we need to do final step. open build.prop file in base and port. and change following lines from base build.prop to port build.prop
ro.product.board=
ro.product.model=
ro.product.brand=
ro.product.name=
ro.product.device=
ro.product.manufacturer=
ro.build.product=
ro.sf.lcd_density=
ro.sf.hw_lcd_density=

Related

[Q] boot loop after arabic framework.jar

HI
I was running CF-Root-sgs2_XX_OXIKG3-v4.1
then through cwmv4.0.0.2
I have generated a zip file by doing
"Pull /system/framework/framework.jar from your phone and place it in the subfolder framework that you extracted in step 1
If you’re not using a CyanogenMod ROM, then you’ll also need to pull /system/lib/libandroid_runtime.so from your phone and place it in subfolder libandroid_runtime that you extracted in step 1
Double click on commands.exe. Do not close the black cmd screens that will pop up. Once the patch is done, you should get a patched framework.jar in the subfolder generated"
this is for making arabic framework.jar
the files I have pulled were from a super core_1 Kernel with Darkyrom2
then i have changed to CF-Root-sgs2_XX_OXIKG3-v4.1 kernel with cognition_S2-131
I went to cwmv4.0.0.2 and installed the zip file
boot loop happened
how can I fix it
thanks
"1-Download the patch below and extract it to a folder on your computer.
2-Pull /system/framework/framework.jar from your phone and place it in the subfolder framework that you extracted in step 1
3-If you’re not using a CyanogenMod ROM, then you’ll also need to pull /system/lib/libandroid_runtime.so from your phone and place it in subfolder libandroid_runtime that you extracted in step 1
4-Double click on commands.exe. Do not close the black cmd screens that will pop up. Once the patch is done, you should get a patched framework.jar in the subfolder generated
5-Version 0.800 provides a recovery flashable file in folder generated. Place that on your sdcard, reboot into recovery and flash it. If the flashing through recovery didn’t work for some reason, you’ll need to do the following manually:
-Put file generated/framework.jar in your phone at /system/framework/
-Put file generated/libandroid_runtime.so in your phone at /system/lib/ (if this file exists, it shouldn’t if you’re arabizing CM6).
-Put file REQUIRED-IMPORTANT/libicuuc-arabic.so in your phone at /system/lib/ This is extremely important, failing to place this file will result in a boot loop of your device"

[HOW-TO][TUTORIAL][WIP]DEODEX, BUILD KERNEL, BUILD CUSTOM ROM and MORE

Hi all,
In this thread, I will try to share the knowledge I have on deodexing, making custom ROMs, modifying initramfs, building kernel and much more.
Please check the below posts for each of these tutorials.
Hope this opens doors to many new ROM and Kernel developers.
NOTE: THESE TUTORIALS ARE WRITTEN FOR GT-I9100. WILL NOT WORK ON OTHER DEVICES. I DON'T TAKE ANY RESPONSIBILITY IF YOU MESS UP AND BRICK YOUR DEVICE OR ANYTHING ELSE. USE AT YOUR OWN RISK.
Deodexing Stock Rom
For GINGERBREAD ROMS:
What you need to have:
xUltimate v2.3.3 - you can download it HERE (Thanks and Credits to Xeudoxus for this awesome app)
Rooted kernel with busybox
JDK installed on your Windows system
If adb is not available in your windows PC, in xUltimate folder open "jar" folder. You'll find adb there.
Extract stock app & framework folders and Deodex:
Connect your device to computer.
Start xUltimate (double-click on Main.exe)
Select option 1. (Pull /system/app)
Once option is done, select option 2. (Pull /system/framework)
In the same folder, now you'll see two new folders (origi_app, origi_frame)
Select option 3 in Main menu (Deodex /system/app)
Once its done, select option 4 in Main menu (Deodex /system/framework)
DONE!!
NOTE: If any apk/odex gives issues while deodexing, remove that corresponding apk and odex from origi_app folder and deodex again. (Mostly the apps which can be downloaded from play store might give errors.. ex: Maps, Voice search etc.)
Now you'll see two new folders done_app and done_frame.
Push deodexed app and framework to device:
Connect your device to PC in USB debugging mode.
Copy done_app and done_frame folders to root of sdcard (/sdcard).
Open Windows command prompt and type the below commands.
Code:
[LIST]
[*]adb shell
[*]su
[*]stop
[*]mount -o remount,rw /dev/block/mmcblk0p9 /system
[*]rm /system/app/*.odex
[*]rm /system/framework/*.odex
[*]busybox cp /sdcard/done_app/* /system/app/
[*]busybox cp /sdcard/done_frame/* /system/framework/
[*]chmod 644 /system/app/*
[*]chmod 644 /system/framework/*
[*]mount -o remount,ro /dev/block/mmcblk0p9 /system
[*]sync
[*]reboot recovery
[/LIST]
In Recovery, Wipe Cache and Wipe Data/Factory reset.
Reboot.
Now you've deodexed app and framework.
For ICS ROMS:
For ICS Roms, the process is quite easy. (Thanks and Credits to jaydvn.)
Download the attached zip file.
Extract it on your windows PC.
Copy your /system/app to _app folder
Copy your /system/framework to _framework folder.
Run AutoDEOToolMain.bat
Follow the instructions.
deodexed jars and apks will be found in deodexed_APK and deodexed_JAR.
Push deodexed app and framework to device:
Connect your device to PC in USB debugging mode.
Copy deodexed_APK and deodexed_JAR folders to root of sdcard (/sdcard).
Open Windows command prompt and type the below commands.
Code:
[LIST]
[*]adb shell
[*]su
[*]stop
[*]mount -o remount,rw /dev/block/mmcblk0p9 /system
[*]rm /system/app/*.odex
[*]rm /system/framework/*.odex
[*]busybox cp /sdcard/deodexed_APK/* /system/app/
[*]busybox cp /sdcard/deodexed_JAR/* /system/framework/
[*]chmod 644 /system/app/*
[*]chmod 644 /system/framework/*
[*]mount -o remount,ro /dev/block/mmcblk0p9 /system
[*]sync
[*]reboot recovery
[/LIST]
In Recovery, Wipe Cache and Wipe Data/Factory reset.
Reboot.
Done.
Enjoy.
Building kernel
Okay. Let's learn how to build kernel for GT-I9100. There are many ways to build. I am just presenting here the way I build and make kernel.
NOTE 1: Follow the instructions exactly.
NOTE 2: Kernel is opensource. If you make any changes to it, you're expected to share your source. (Usually people share it over github )
NOTE 3: FLASHING KERNEL IS RISKY AND DANGEROUS. BE CAREFUL. BUILD AND FLASH ON YOUR OWN RISK.
What you need to have:
Ubuntu 10.04 and above (I use 10.04 )
ARM tool chain (Download HERE. Click on IA32 GNU/Linux TAR under Advanced Packages)
Samsung's opensource kernel for GT-I9100 (Download HERE. Go to Mobile->Mobile Phone-> Select I9100 (update 3 for Gingerbread and update 4 for ICS) and download the zip)
Setting up toolchain:
Extract the tar you downloaded(Suggestion: Extract to one folder where you can have everything. In my case /home/superatmos/build_kernel).
After extracting, you'll see a folder named arm-2010q1. Inside there will be many folders (ex. bin, lib and so on.)
Folder structure will be: /home/<your_name>/build_kernel/arm-2010q1
Setting up kernel:
Extract the zip you've downloaded from samsung's opensource.
You'll find two zips.
Extract GT-I9100_Kernel.tar.gz to /home/<your_name>/build_kernel/
Folder structure: /home/<your_name>/build_kernel/GT-I9100_Kernel
Setting up initramfs:
Samsung's zImage is divided into two parts: Opensource kernel (which you downloaded from samsung's website) and initramfs (which is root file system to boot up the device).
You can extract initramfs from your zImage using the below mentioned links (Credits and Thanks to Chenglu) Original Thread: HERE
To extract initramfs from Gingerbread zImage: HERE
To extract initramfs from ICS zImage: HERE
Folder structure: /home/<your_name>/build_kernel/initramfs
Now the entire setup is ready. Let's start modifying kernel configuration.
Setting up kernel config:
For Gingerbread:
Go to /home/<your_name>/build_kernel/GT-I9100_Kernel/arch/arm/configs folder.
Copy c1_rev02_defconfig file and paste it in kernel root folder (/home/<your_name>/build_kernel/GT-I9100_Kernel/).
Rename c1_rev02_defconfig to .config in kernel root folder.
Now open Makefile which is in your kernel root folder(/home/<your_name>/build_kernel/GT-I9100_Kernel/).
Modify the below lines (I guess line 195 and 196).
For ICS:
Go to /home/<your_name>/build_kernel/GT-I9100_Kernel/arch/arm/configs folder.
Copy u1_defconfig file and paste it in kernel root folder (/home/<your_name>/build_kernel/GT-I9100_Kernel/).
Rename u1_defconfig to .config in kernel root folder.
Now open Makefile which is in your kernel root folder(/home/<your_name>/build_kernel/GT-I9100_Kernel/).
Modify the below lines (I guess line 195 and 196).
Code:
ARCH ?= arm
CROSS_COMPILE ?= /home/<your_name>/build_kernel/arm-2010q1/bin/arm-none-linux-gnueabi-
Save and close.
Modifying kernel configuration:
Now open .config file(which you renamed). If its not seen, it might be hidden. Go to View->Show hidden files and there you go.
Do the below things:
Adding local version:
Change CONFIG_LOCALVERSION=" " to anything you like. I add this way:
CONFIG_LOCALVERSION="-I9100-superatmos"
Adding initramfs path:
You need to let kernel know the path from which it needs to take initramfs.
Change CONFIG_INITRAMFS_SOURCE=" " to ../initramfs (In this tutorial it's the path. If you had copied anywhere else, give the path properly).
Enough for now. Once you get experience, you can modify many configurations as per your liking and save. This configuration can be changed by GUI too with the command make menuconfig.
The Important part: Building the kernel:
For Gingerbread:
Open terminal.
Go to path /home/<your_name>/build_kernel/GT-I9100_Kernel/
Type make.
For ICS:
Open terminal.
Go to path /home/<your_name>/build_kernel/GT-I9100_Kernel/
Type export USE_SEC_FIPS_MODE=true
Type make.
THAT'S ALL. YOUR zImage is ready and is available in /home/<your_name>/build_kernel/GT-I9100_Kernel/arch/arm/boot/zImage.
Install the zImage on the device:
Go to the path where zImage is present and type the below line in command line.
Code:
tar cvf I9100_kernel.tar zImage
Flash the tar using odin.
DONE. CONGRATULATIONS. NOW YOU'VE YOUR OWN KERNEL.
Give me your feedback so that I can improve this tutorial. And post here about how your build went. All the best.
Making custom ROM
Let's move on to make a custom ROM.
Inputs/Feedback/Suggestions are more than welcome. Lets improve this tutorial together for the betterment of the android community.
Steps involved in making a custom ROM:
Getting the system dump from the device.
Deodexing app and framework folders.
Creating various mods by modifying framework and system files.
Modifying build.prop and adding tweaks.
Making META-INF folder and writing an updater-script (edify scripting).
Signing the ROM and making a flashable zip.
Folder Structure:
Before going forward, let's follow the below structure folder to make the tutorial more understandable.
Let our ROM name be CustomROM. The folder structure will be C:\Users\<your name>\CustomROM.
Let's move step by step. Are you ready??
Getting the system dump from the device
Click to expand...
Click to collapse
Make sure USB debugging is ON and connect your device to the PC.
Open command prompt on your windows PC and go to CustomROM folder path.
Type adb devices. You should be able to see the device detected. (If not check environmental variables whether adb is in system path or not. If not present, add the adb path.)
Type the below command to get the dump of system folder.
Code:
adb pull /system system/
Now inside the folder CustomROM, you should be able to see system folder with many folders like app, etc, framework etc inside.
Done with first step.
Deodexing app and framework folders
Click to expand...
Click to collapse
Look HERE how to deodex app and framework folders. Copy the app and framework folders to xUltimate folder, rename them to origi_app and origi_frame and follow the given link to deodex.
NOTE: After deodexing, merge origi_app folder with app folder under C:\Users\<your name>\CustomROM\system\app and origi_frame with framework folder under C:\Users\<your name>\CustomROM\system\framework.
Creating various mods by modifying framework and system files
Click to expand...
Click to collapse
Okay. This the section where your hardwork, innovation and talent comes in. You can use the mods available already, create your own mods, port various mods from other devices and so on.
Below is a list of various mods which can be ported on to GT-I9100. All the credits go these respective thread owners. Thanks to them.
Lidroid 14 toggle mod
Extended power menu with/without header
CRT Off Animation & SIP Over LTE/HSPA
Swipe to remove notifications
NOTE: Let me know more mods with links so that I can add here.
Modifying build.prop and adding tweaks
Click to expand...
Click to collapse
Okay. This is one of those files where you name your ROM(to be visible in settings. ) and add many tweaks.
To name your ROM (to be visible in settings), change the below code.
Code:
ro.build.display.id=CustomROM v1.0
Check the below links for many other tweaks. All credits go to respective thread owners. Thanks to them.
build.prop tweaks by TheFrankenstain
build.prop tweaks by dhlalit11
Making META-INF folder and writing an updater-script (edify scripting)
Click to expand...
Click to collapse
Once you're done with all the modifications, mods and additions, its time to create META-INF folder and make the updater script. Once the user flashes the ROM zip, this is the script that runs and does everything written inside the script. PLEASE BE CAREFUL WITH THIS. TAKE REFERENCE FROM OTHER (SAME DEVICE) ROMS' UPDATER-SCRIPT. (In this case, take reference from other GT-I9100 roms.)
Check the below links for tutorial and how-to on writing edify script and making updater script. All credits go to respective owners of the threads. Thanks to them.
Edify Scripting, Making Flashable ZIPs, ZIP Signing & Key Creation
Edify Scripting Notes
How to Write an Updater-Script with Edify Code
Edify Installation Script Syntax's
NOTE: system folders path, boot/kernel partition path, modem partition path and so on are COMPLETELY DIFFERENT for DIFFERENT DEVICES. Check the partitions for your device properly, carefully and then work on updater-script. TAKE HELP OR REFERENCE FROM OTHER ROM DEVELOPERS FOR YOUR DEVICE.
Lets move on to last step. Making a signing and making a flashable zip.
Signing the ROM and making a flashable zip
Click to expand...
Click to collapse
Make sure, now you should be able to find two folders (META-INF and system) inside C:\Users\<your name>\CustomROM.
Check in THIS thread for test signing your ROM. It WORKS with GT-I9100.
or Check THIS thread to create your own signing key and certificate.
Now you're done with making a custom ROM. Hope to see more custom ROMs from many users.
Give me your feedback so that I can improve this tutorial. And post here about how your custom ROM making went. All the best.
last one
i don't see any tutorials just links to a diff thread and a rom that won't work on i9100
buster041284 said:
i don't see any tutorials just links to a diff thread and a rom that won't work on i9100
Click to expand...
Click to collapse
You're quite fast Updated Deodexing and Building kernel section..
Great thread Superatmos. I'll definately have a go at this.
Quick question ? Am i right in assuming that although your tutorial says to connect your device this line from xUltimate seperceeds that ?
"Alright xUltimate has been updated to v2 What this means is that you do not need your phone connect to your computer to deodex. So you can just manually place the .odex files in (\origi_frame\) and (\origi_app\) and it will deodex. You can also transfer the .odex files from your phone like the last version."
where do I get the zImage to extract the initramfs from? I can't seem to find the zImage on my phone or in the source anywhere.
Great
Very useful.. Added to my favorite.
Thank's man, i'll read that
puccini said:
Great thread Superatmos. I'll definately have a go at this.
Quick question ? Am i right in assuming that although your tutorial says to connect your device this line from xUltimate seperceeds that ?
"Alright xUltimate has been updated to v2 What this means is that you do not need your phone connect to your computer to deodex. So you can just manually place the .odex files in (\origi_frame\) and (\origi_app\) and it will deodex. You can also transfer the .odex files from your phone like the last version."
Click to expand...
Click to collapse
Connect your device to the PC and double click Main.exe inside xUltimate folder. Follow the instructions you see from then. Its quite self explanatory.
If you already have origi_app and origi_frame folders, then just double click on Main Skip.bat.
dmp450 said:
where do I get the zImage to extract the initramfs from? I can't seem to find the zImage on my phone or in the source anywhere.
Click to expand...
Click to collapse
Use ktool (available on market.. compatible with I9100) and click on Dump current kernel. You'll find it on sdcard.
One more way is when you download firmware from sammobile.com, just extract the file and you'll find zImage inside it.
Nice thread,
I m waiting from long time.
Thanks for your work.
Sent from my GT-I9100 using XDA
Making custom ROM section updated
Hi all,
Please find updated custom rom section HERE.
Feedback and suggestions welcome.
Thanks for the kernel part, will come in handy
Enviado desde mi GT-I9100 usando Tapatalk 2
Good tutorial, thanks.
How do you guys sign the rom if you are on Linux (ubuntu for me)
hi superatmos
thanks for this handy thread...may i ask your for a help here?why in my every deodexing always gives error result?
I attach the screenshots.
Many thanks in advance
tks mate will try to pack my own kernel following this method
Sent from my GT-I9100 using Tapatalk 2

[Guide ]How To Port MTK ROMs [For All Chipsets]

This guide is only for MTK! This will work from same chip to same chip for example MT6582 to MT6582 or MT6577 to MT6577
Some devices have different partitions to flash and the ROM you might flash can brick your phone. It can even hard brick your phone. So it is recommended that you do a ReadBack, ClockWorkMod Backup and MTK Droid Root & Tools backup. I am not responsible for bricked phones!!
What you need to port a ROM to your device [Your chipset to Your Chipset only]
1: A ROM to port [in .zip]
2: Your stock ROM [extracted with /system and build.prop]
How To Port ROMs to your Phone:
Extract the ROM to port and you will have these main things:
META-INF
System
boot.img.
If you have them then you are ready for next step.
Open /system folder of stock and rom to port.
Open bin folder of stock ROM and copy these files:
pq
vold
Now replace these files in ROM to Port's /System/Bin folder.
Open lib folder of Stock ROM and get these files:
libcamalgo.so
libcamdrv.so
libcameracustom.so
libdpframework.so
libsensorservice.so
libsync.so
libvcodecdrv.so
Replace all the files mention above to ROM to Port's /system/lib folder.
Now open Stock ROM's /system/etc/ folder and copy these files:
apns.conf.xml
vold.fstab
vold.fstab.nand
Now replace these files in ROM to port's /system/etc folder.
Delete these folders from ROM to Port
/System/vendor/
/System/lib/hw
/System/lib/modules/
/System/etc/WiFi
/System/etc/Firmware
Replace these folders from Stock ROM to ROM to Port:
/System/lib/hw/
/System/lib/modules//System/etc/WiFi/
/System/etc/Firmware/
/System/vendor/
The final step! Press back button to go to the main folder where you have the Stock ROM. Copy boot.img [From Stock ROM]and replace it with the ROM to Port's.
if I helped you hit Thanks button....
Must the two ROMs be the same Android version or doesn't mater?
Any version of Android but the chip should be same
Ex: mtk-6592 to mtk-6592

Help in fixing bugs

Hlo guys,
Please help me to fix sound bug after porting rom in spreadtrum sc7731 kitkat 4 .4.2
here is the guide which i used...
from /system/bin
phoneserver
netd
tc
wpa_supplicant
from /system/lib
hw(whole folder)
modules(whole folder)
egl(whole folder)
libhardware.so
libhardware_legacy.so
libctest.so
libdiskconfig.so
lisensorservice.so
from /system/etc
bluetooth(whole folder)
dhcpcd(whole folder)
firmware(whole folder)
wifi(whole folder)
handheld_core_hardware.xml (from permissions)
platform.xml(from permissions)
from from /system
vendor(whole folder)
usr(whole folder)
Further asking Spreadtrum developers i tried their method too to fix bug here what i did
★Bin
(folder)
tinymix
★etc
(folder)
audio_effects.conf
audio_hw.xml
audio_para
audio_policy.con
tiny_hw.xml
★Lib (folder)
libaudio-resampler.s*o
libaudioeffect_jni.s*o
libaudioflinger.so
libaudiopolicy.so
libaudiopreprocessin*g.so
libaudioutils.so
libtinyalsa.so
libtinyxml.so
libwebrtc_audio_prep*rocessing.so
lib> soundfx
(sub-folder)
libaudiopreprocessin*g.so
libbundlewrapper.so
libdownmix.so
libeffectproxy.so
libldnhncr.so
libreverbwrapper.so
libswdap-mod.so
libvisualizer.so
I took logcat too via alogcat android application(before trying this guide i hope it will help)
Please help guys!! We really need all the help w can get here . . .
No support
https://forum.xda-developers.com/android/general/kitkat-rooting-to-roms-t3560777/post71153851
Try the porting method here
have u replaced whole soundfx folder????
@ki said:
have u replaced whole soundfx folder????
Click to expand...
Click to collapse
yes

DTS High Resolution Audio

Hello once again here is an easy install of Vendor-Arise Numbers. Go to Bliss OS repository on Github and download Vendor-Arise. Then extract zip file with ES File explorer make sure root explorer setting is on and go to the Numbers folder and copy bin folder, etc folder, lib folder, su.d folder and the Arise_version.prop. Then in ES File explorer go to device click on the system folder and click open then paste it will ask you to overwrite click yes to all. We are almost done in the system folder go to the newly pasted su.d folder then copy arisesound_setprop and dtsconfigurator_wrapper and then go to etc folder and then go to init.d folder and paste the two files in the su.d folder. Reboot and happy listening these are compiled binaries no apk the sound is incredible.

Categories

Resources