[Android General] @ki:
#############################################################################################

Hello......

This thread is for :-------

1)Android users....:P

2)For kitkat/Lollipop users having chipset spreadtrum sc7731/sc8830/sc9830(sc7731 based)

###############################################################################################

Porting custom recovery

For making custom recovery we need the stock recovery...

For that we have two methods....

.

First method

1)--Download your stock firmware file......which should be in .pac format......(Google it)

2)--Now we need to extract the stock recovery from it.....which should be in .img format..

Folllow this guide......

https://androidmtk.com/extract-spreadtrum-pac-file

Second method

--- If you have rooted your device......

---Then download and install Wanam partition app in your rooted device .....

---Open Wanam partitions .......

--- Give it root permisions....

---Now scroll down and click on recovery .....

Backup it.......

---Now you have backup of your stock recovery

3)--Now we will port custom recovery for our device......

First download (anyone)....[TRY ALL TWRP RECOVERIES ......if touch is not working after porting recovery then try other recoveries............even after poting all of them......if doesnt work then ask me]

Custom recovery list

1)----Twrp recovery

https://drive.google.com/file/d/0B2XDyKNA3VPkeVZNZFVhMmRCUTQ/view?usp=drivesdk

https://drive.google.com/file/d/0B9Cmd-n_gEADb1pUTWtLa2JJczg/view?usp=drivesdk

https://mega.nz/#!6552kALB!e48ZPQJr9LiQTlFzqhpfx861H7p2FA4-AfD_ABpowTY

https://mega.nz/#!PoQHkQAC!qEESaJz576PJuN5M_ka-XTRdmkH8QHvYPSWMhyMbgZ0

https://mega.nz/#!L45QABaI!fQjypzBygWYcDfFwbAQaVv3-U1Qu_KmcvNyRppQBC9Y

https://mega.nz/#!C5pwiD5Z!Ijqh3CeNTi3S2bWMMI_P42mSx9lI3zKTW1CWUQ_pgDA

https://mega.nz/#!G1wGTR5C!fJ7HFGclBHbMXfi6USuYOFP3afDUqZ5c4QJMlIdHj04

2)------Cyanogen permanent (right now for lollipop)

https://mega.nz/#!P0p1TSiZ!M5scN0eVXa-GSQzFDdTAIJ1KKRWE9AZgJQ-g7D5xr0M

3)-----MIUI recovery [Fully function.....backup,restore ....]

https://drive.google.com/file/d/0B1PCS1QUC08TZktfNG01Y21xU3M/view

4)-----Ultra cwm recovery

https://drive.google.com/file/d/0B1PCS1QUC08TLTBCMXVUMnF0ejA/view

5)-----Cyanogen mod recovery[only for flashing zip files][Temporary recovery]

https://drive.google.com/file/d/0B1PCS1QUC08TOGZYbGRrRWpENGs/view

6)------Philz non-touch recovery[only for flashing zip files][Temporary recovery]

https://mega.nz/#!XkoxzIAa!PVU9v-HUDmO6upPgextPKqghlC1n7LvhS1rgzhigM4g

7)-------Temporary Cwm

https://mega.nz/#!Dg4nwYIT!rgggOZ07n55GpqfHl1zrSQBhGwGpUfn30ib5bx8EL6k

################################################## ############################################

Now follow this Guide.......

Things u will need

1.Windows PC

2.carliv image tool.

3.Stock Recovery ..

4.A Custom Recovery that matches with ur phone chipset.

5.Ur flash file -->If Any thing goes wrong ur flash file will help u to recover<--

6.working brain.

Lets Start

[1]create a working folder.

[2]Again create two folder in the working folder stock and port.

[3]Extract the img tool in both folder.

[4]Now Paste the stock and port recovery in recovery resources folder

[5]Now go to ur working folder>stock and run carliv.bat

[6]Now press " r " and Enter

[7]now select ur recovery number and enter

[8]now press 1 and enter

[9]wait for unpack then close it

[10]now go to port folder and run the carliv.bat in port folder

[11]now press r and enter

[12]now press 1 and enter

[13]now wait for extract and dont close this just minimize the it

[14]now open the new folder s in the stock and port folder s

[15]now copy this files from stock to port

recovery.img-base

recovery.img-cmdline

recovery.img-dt

recovery.img-kernel

recovery.img-kernel_offset

recovery.img-pagesize

recovery.img_offset

recovery.img-compress

recovery.img-tags_offset

[16]Now go to ramdisk>etc now open recovery.fastb with notepad++ in both folder (stock and port)

[17]now match the path of /system , /data , /chahce from stock recovery.fastb to port recovery.fastb

[18]Now Save It

[19]now open the minimized cmd/carliv then press any key

[20]now press 2 and enter

[21]Now go to port>output then u will see ur ported recovey.img

################################################## ############################################

Now if you followed all steps clearly then......You have successfully ported custom recovery for your device.....

Note:Temporary recoveries are only for flashing.....

do not use them for porting

....

4)--Flashing custom recovery

_____If your phone is rooted.....

Then download flashify/Rashr from play store and flash with it....

____If your phone is not rooted.....

Then flash it via fastboot.....

Now you have custom recovery installed......

##############################################################################################

Rooting

----Now download this zip file.....and transfer to ur phone.....

https://download.chainfire.eu/696/SuperSU/UPDATE-SuperSU-v2.46.zip?retrieve_file=1

----;Boot to recovery by pressing Power button+Vol down button respectively.......(it may be different for your device)

----Now click on install and choose the zip file we have downloaded.......Reboot

Now you have successfully rooted your device....

Check the root access by Root checker app......

##############################################################################################

Now come to the second part......i.e......to port custom roms to our device.......

Pre-required things .......

1)A zip extractor and compressor......

2)Boot.img of your device......

3)Brain.....

4)Little patience........

5)Customrom(i will provide the link)

6)Stock rom(provided by the manufacturer)

FOR KITKAT USERS

Step 1:Make a folder.......with any name u want

Extract the customrom.zip to port folder

Step 2:Delete from port folder and paste it from your stock rom(u can take the files by using a root explorer from your phone)

----Open system in port folder

1)----Open LIB folder

----Delete these Folders in lib folder and replace with the folder from your stock rom

/egl ( for fix graphic )

/hw ( for fix audio, sensor, camera, GPS, bluetooth, & FM Radio )

/modules ( for fix Wi-Fi, bluetooth, graphic, mounting partition, & FM Radio )

/soundfx ( for fix audio )

Add or replace these files from your stock rom

Note:If some files are not present then ignore.....

libaudio-resampler.so ( for fix audio)

libaudioeffect_jni.so ( for fix audio )

libaudioflinger.so ( for fix audio )

libaudiopolicy.so ( for fix audio )

libaudioutils.so ( for fix audio )

libbluetooth_jni.so ( for fix bluetooth)

libbt-client-api.so ( for fix bluetooth )

libbt-hci.so ( for fix bluetooth )

libbt-utils.so ( for fix bluetooth )

libbt-vendor.so ( for fix bluetooth )

libEGL.so ( for fix graphic )

libengbt.so ( for fix bluetooth )

libGLES_trace.so ( for fix graphic )

libGLESv1_CM.so ( for fix graphic )

libGLESv2.so ( for fix graphic )

libhardware.so ( for fix Fm Radio )

libhardware_legacy.so ( for fix bluetooth & Wi-Fi )

libMali.so ( for fix graphic )

libRS.so ( for fix Fm Radio )

librs_jni.so ( for fix Fm Radio )

libRScpp.so ( for fix Fm Radio )

libRSCpuRef.so ( for fix Fm Radio )

libRSDriver.so ( for fix Fm Radio )

libSR_AudioIn.so ( for fix Fm Radio )

libsrec_jni.so ( for fix Fm Radio )

libsrid.so ( for fix Fm Radio )

libtinyalsa.so ( for fix audio )

libtinyxml.so ( for fix audio )

libwebrtc_audio_preprocessing.so ( for fix audio )

libwpa_client.so ( for fix Wi-Fi )

2)-----open BIN folder

Add or replace these files from stock rom

bdt ( for fix bluetooth )

dhcpcd ( for fix bluetooth & Wi-Fi )

hostapd ( for fix bluetooth & Wi-Fi )

phoneserver ( for fix Internet from Mobile Data )

start-ssh ( for fix Tunneling VPN Access networking )

tinycap ( for fix audio services )

tinymix ( for fix audio services )

tinyplay ( for fix audio services )

wcnd ( for fix bluetooth )

wpa_cli ( for fix Wi-Fi )

wpa_supplicant ( for fix Wi-Fi )

3)------open etc folder

Delete these folders in port folder and paste from you stock rom......

bluetooth ( for fix bluetooth )

dhcpcd ( for fix bluetooth & Wi-Fi )

wifi ( for fix wifi)

Add or replace these files from stock rom.....

audio_effects.conf ( for fix audio services )

audio_hw.xml ( for fix audio hardware integration )

audio_para ( for fix audio hardware integration

audio_policy.conf ( for fix audio services )

connectivity_calibration.ini ( for fix Wi-Fi )

connectivity_configure.ini ( for fix Bluetooth )

tiny_hw.xml ( for fix audio hardware integration )

4)-----From system/usr/ folder

delete idc folder in port and paste from your stock....

5)------Delete boot.img and logo.bin(if any ) in you port folder ........and add your stock boot.img

6)-----Now compress it as zip and flash through recovery.....

First wipe data,dalvik,cache,system and then flash the rom...

Note: Do not use this method to port any other rom like cm,Miui,lewa .....

Guide for porting Emui rom(Kitkat)...Use the above method.....

the only change is that we have to do some modifications in stock boot.img.

Pre required things....

1)--A img file extractor(like AIK,CARLIV.......for more google is there)

2) your stock boot.img....

Lets start .....

Step 1)Unpack boot.img stock

Step 2)Move to ramdisk folder and find file init.environ.rc

Stel 3)Open init.environ.rc in a text editor.

Step 4)Find line "Export bootclasspath....

Step 5)Select line from export bootclasspath ......to the end and replace with this

export BOOTCLASSPATH /system/framework/core.jar:/system/framework/conscrypt.jar:/system/framework/okhttp.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/framework2.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/webviewchromium.jar:/system/framework/globalconfig-common.jar:/system/framework/hwEmui.jar:/system/framework/hwServices.jar:/system/framework/hwAndroid.policy.jar:/system/framework/hwframework.jar:/system/framework/hwcustframework.jar:/system/framework/HwKeyguardFlash.jar

Step 6)Save file and then repack img.....place it in emui rom

##############################################################################################

##############################################################################################

FOR LOLLIPOP USERS

Step 1:Make a folder...

Extract the customrom.zip to port folder

Step 2:Delete from port folder and paste it from your stock rom(u can take the files by using a root explorer from your phone)

---------open system folder.....

1)---------Open bin folder

---------Delete this file in port folder and copy from your stock

sensorservice

2)-------open etc folder

Delete these folder in port and copy these folders from stock...

Bluetooth

dhcpcd

wifi

permissions

Delete this file from port folder and copy from your stock.....

fallback_fonts.xml

3)--------Open lib folder

Delete these folder from port and copy from stock

egl

modules

Delete these files from port and copy from stock....

libsurfaceflinger.so

libsensorservice.so

libmedia_jni.so

libEGL.so

libGLES_trace.so

libGLESv1_CM.so

libGLESv2.so

open hw folder and replace from your camera.sc8830.so and sensors.so

4)---------copy the whole usr folder to port.......except a file named keylayout in usr folder

Now compress it and and flash......

First wipe data,dalvik,cache then flash the rom..

##############################################################################################

##############################################################################################

Fixing bugs....

KITKAT

1)----Camera

(do this if camera doesnt works....otherwise dont)

Step 1: Replace system/lib/hw/camera.8830.so

Step 2: Open camera.8830.so with Notepad

Step 3:Find lib files name in it.

Step 4:Copy lob files to system/lib

Don't Replece/Overwrite any Existing file.Just skip for it.

Step 5:Reboot

2)---If dolby fc(only when required)

then flash this

https://mega.nz/#!sQpEDZpB!ufFUzkND5srVAcSbp8N1o8V5cbtBIkVPS6vWJid4EwQ

LOLLIPOP

1)---Auto rotate fix(flash after every rom flashing-manadatory.....if it doesnt works.....then post a reply with this problem and your partitiom details..)

https://mega.nz/#!0Yl22DqD!KmnsS_OnC7gmf5fHb0V4AuNdGdM_TtTLd2MNTyteaQA

###########################################################

New roms.....with guide

https://xdaforums.com/showpost.php?p=73897215&postcount=345

###################################

Credit:

Advan s4p and s4k group

Spreadtrum porting assassins

Parthib

Su droid

Android MTK

And all who helped me......:)

Hit the thanks button if i helped u....