[Galaxy S III I9305 (4G LTE + 2GB RAM) Android Deve] il3gal:
(Sorry for english !!)

!! Some problems with Android 5.1.x installed on External.

[Dual-Boot] I9305 [SCRIPT]

Hi. Because i dont find any kernel/script for I9305 with Dual-Boot, i try to make this script for test roms (but can be use day by day without problem).

This script help to patch .zip rom/kernel/gapps (and other i think) for install him on SDCARD. (without touch your internal rom).

How can you do this? Need to repartition your sdcard in 3 parts

1. With your sdcard data (files/music..etc)

2. external System (for system rom)

3. external Data (for data rom)

What you need to know !!!!

- Thanks on [MENTION=4533145]Nicene Nerd[/MENTION] for this App. I'm inspired from him.

- I'm not a developer.

- I don't now so much about linux (so, script not have a best optimization)

- This script is better good for people who test roms (like Lollipop).

- If you dont try this script, don't say anything. (only if you have some problem/stucks)

- Install on Internal roms like: Amcha / N4 / ..etc (big roms)..because i try to install on external rom and dosen't work

- Rom like Nameless / RR / ..etc can be install on external

- Anyone who want help me to make this script better, say here where need to edit (with what) and who can code help

- Say here what rom/kernel/script work or dosen't work to install on external. For modify script

What you need.

MiniTool Partition Wizard (or other program to repartition sdcard)

USB Cable (for repartition)

A phone (i9305 of course)

SDCARD 16gb (or more) Class 10 (if you have class 4 or other..your external rom run slow)

Backup your sdcard data (for safe)

Backup your phone (for safe)

ROM with root permision.

Water (because is good for your health)

First time you need to repartition sdcard

First partition: FAT32 (split memory from this..is good option)

Second: 1600 mb (1,6 gb) for system

Third: 2500 mb (2,5 gb) minimum memory for data

How can do this:

On MiniTool show your sdcard (like this)

1. Right click on him > Split

2. On New Partition Size you need to have minimum (system + data) 1600 + 2500 = 3600 mb (3,6 gb)..If you want more memory on data, you can type more than 3600 mb (i need more so i split 7000 mb)

After write your value, press ok

Now look like this

3. Right click on new partition (H on me) > Delete

Now you have unallocated partition

4. Right click on unallocated partiton > Create > Ok (on warning)

5. On box you need to edit:

Create As: Primary

File System: Ext4

Partition Size: 1600 (because is system partition)

After this. Press Ok

6. Right click on unallocated partition > Create > Ok (on warning)

Create As: Primary

File System: Ext4

Partition Size: dont modify

After this. Press Ok

7. Before press Apply, check if look like this

Now you can press Apply and wait

Good

After sdcard was partitioned, go to next step

Put my script on your SDCARD

(Why in sdcard? because internal/external rom view the sdcard everytime)

(internal/external rom have separated 'internal memory')

1. Unrar on desktop (right click on archive > extract here)

2. Copy 'db' folder to your sdcard

3. Check if 'db' folder is on your sdcard

4. With file explorer (i use Root Browser), go to db folder and install 'terminal.apk'

5. After install run him

On terminal:

Type: su (for superuser permision)

Type: cd /mnt/extSdCard/db (or anywhere is db folder location..on LolliPop is: cd extSdCard/db)

Type: sh db.sh

Now you are in script menu

Option: 1 -> Save Internal BOOT.IMG

Option: 2 -> Flash Internal BOOT.IMG and Reboot phone (if not reboot, try to reboot manualy)

Option: 3 -> Mount Internal partitions on root direcotry (/.dbSystem & /.dbData)

Option: 4 -> Clean Internal partitions (use this if you are in External rom)

Option: 5 -> Save External BOOT.IMG

Option: 6 -> Flash External BOOT.IMG and Reboot phone (if not reboot, try to reboot manualy)

Option: 7 -> Mount External partitions on root direcotry (/.dbSystem & /.dbData)

Option: 8 -> Clean External partitions (use this if you are in Internal rom)

Option: 9 -> Patch file for External rom (file like rom/gapps/pa-gapps/kernel..etc)

Option: 0 -> uMount /.dbSystem & /.dbData

Option: fb -> Flash manualy BOOT.IMG file

Option: ie/ei (hidden command) -> I'm work on this.. Is a experimental function. Don't use it

Patch files for external rom:

1. Copy on 'db' folder rom who want to patch, gapps archive and kernel your need

2. Run script on terminal

3. Need to save your Internal boot.img (Option 1 on menu)

4. Option 8 to clean your external partitions (if was used before with other rom).

5. Option 9 to patch

6. Type rom/gapps/kernel..etc archive name like: my_rom.zip > And press enter

7. Wait to patch (all patched files have pre name ext-

NOTE: If you patch rom/kernel (with boot files), you need to watch if script modify any fstab file. If no, external rom not work!

8. After you patch all you archive need..go to recovery (i use TWRP 2.8.5.0) and flash him but need to kep order:

- First ROM zip

- Second GAPPS (or PA-GAPPS) (or without this)

- Third KERNEL (if is need)

- .. other patched scripts

9. After flashing, reboot and wait to new external rom start up

(if you have any error (boot loop/other) you can flash internal boot stored in "sdcard/db/.db/.imgs/boot-int.zip")

10. After your external rom is ON, install 'terminal.apk' from sdcard

11. Run script on terminal

12. Save your External BOOT.IMG (Option 5)

13. Enjoy with your external rom.

(To switch rom you have option 2 and 6 or flash manualy .zip stored in "sdcard/db/.db/.imgs/boot-*.zip")

I forgot something?

Another explain: http://xdaforums.com/showpost.php?p=59570171&postcount=11

Changelog

Version 1.3:

+ Removed experimental (duplicate partitions)

+ Removed rsync

+ Add check "Where i am now" for check what system mounted (internal/external) for optimized script

+ On start, check if rom/kernel changed and you can save new rom much easy

+ Disabled some options from menu (depend where are you (internal/external) rom)

+ On mount/ckeab internal/external partitions, now check if is mounted property

+ Terminal updated at last version

Version 1.2:

+ Some bug fixes (major bug fixes)

+ Add rsync for Duplicate Partition (ie/ei command. hidden command because not work now

+ Patch init. files from kernel (work with pureSTOCK / pureCM kernel) (i'm not tested, but you can flash now a big rom (like Amcha/N4 Lite) in external rom)

Version 1.1:

+ Some bug fixes

+ Mkdir folder check after create

Version 1.0:

+ It's alive !