[9001][SCRIPTS] The making of ... an ODIN installable package [2011-12-21]

Search This thread

nikagl

Senior Member
Jun 11, 2006
2,878
619
51
Nieuwegein, NL
OnePlus 6
Hmmm... I think this is taking a little longer than expected. So... I extracted boot.img and I see several differences in the init.rc (many can be explained ;)):

1. Cranium has tun.ko added
2. XXKPS has part where mmcblk0p17 (/data) is checked
3. XXKPS has part where pmem_hdmi is set to system permissions (for TV out judging from the comment - weird)
4. XXKPS and Cranium use different bootanim (Cranium = bootanimation and samsung = samsungani)
5. Cranium has some extras for initd...

Furthermore XXKPS has an extra file called "recovery" (Cranium has extra file called tun.ko which again is explainable, and e2fsk which I guess is used for checking the filesystem as a replacement of item 2 above!?).

Honestly I think we should ask people like sakindia123 and manveru0 whether they know what causes this...
 

somboons

Senior Member
Apr 25, 2011
3,183
4,477
Bangkok
Hi nikagl.

Could you guide me abount make odin file for Tab8.9 or help me make scipt for tab8.9?

as below reslt of mount from tab8.9




shell@android:/ # mount
mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mmcblk0p4 /system ext4 ro,relatime,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p5 /cache ext4 rw,nosuid,nodev,noatime,errors=continue,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p8 /data ext4 rw,nosuid,nodev,noatime,barrier=1,data=ordered,noauto_da_alloc,discard 0 0
/dev/block/mmcblk0p1 /efs ext4 rw,nosuid,nodev,noatime,errors=continue,barrier=1,data=ordered 0 0
/dev/fuse /mnt/sdcard fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
shell@android:/ #
 

nikagl

Senior Member
Jun 11, 2006
2,878
619
51
Nieuwegein, NL
OnePlus 6
Hi nikagl.

Could you guide me abount make odin file for Tab8.9 or help me make scipt for tab8.9?

as below reslt of mount from tab8.9




shell@android:/ # mount
mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mmcblk0p4 /system ext4 ro,relatime,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p5 /cache ext4 rw,nosuid,nodev,noatime,errors=continue,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p8 /data ext4 rw,nosuid,nodev,noatime,barrier=1,data=ordered,noauto_da_alloc,discard 0 0
/dev/block/mmcblk0p1 /efs ext4 rw,nosuid,nodev,noatime,errors=continue,barrier=1,data=ordered 0 0
/dev/fuse /mnt/sdcard fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
shell@android:/ #

Hi Somboons,

I am actually not an expert in what Odin does and how it works, I only created some script to automate the tasks using info from others.

Nevertheless, here's some info for you:

1. You will need to have another Odin based ROM for the tab8.9. For these scripts I use a stock ROM from Sammobile which contains the right files:
adsp.mbn
amss.mbn
cache.img.ext4
preload.img.ext4

These files need to be in the baserom folder for the script to build a correct package.

2. To build the Odin package you need three more files, which are exctracted from a device that contains the custom ROM you want to make an Odin package for. So, you first create the device just the way you like it (off course without any user data in it) and extract the three additional packages:

boot.img
recovery.img
system.img.ext4

Where in your case you would have to modify "adb-ExtractRom.cmd" so it extracts the packages from the right locations. Replacing system is easy, you already have the right partition in your script (/dev/block/mmcblk0p4). But bot boot and recovery I could not find the correct partition names for. So... unless you find the right partition locations for boot and recovery, you'll not be able to make an Odin package (or maybe simply use the boot.img and recovery.img of another Odin ROM, I guess that should work also, but you'll have the boot.img and recovery.img of that specific ROM).

Good luck!

Regards,

Nika.
 

broodplank1337

Inactive Recognized Developer
Nov 24, 2011
4,992
10,155
Nijmegen
www.broodplank.net
Hmmm... I think this is taking a little longer than expected. So... I extracted boot.img and I see several differences in the init.rc (many can be explained ;)):

1. Cranium has tun.ko added
2. XXKPS has part where mmcblk0p17 (/data) is checked
3. XXKPS has part where pmem_hdmi is set to system permissions (for TV out judging from the comment - weird)
4. XXKPS and Cranium use different bootanim (Cranium = bootanimation and samsung = samsungani)
5. Cranium has some extras for initd...

Furthermore XXKPS has an extra file called "recovery" (Cranium has extra file called tun.ko which again is explainable, and e2fsk which I guess is used for checking the filesystem as a replacement of item 2 above!?).

Honestly I think we should ask people like sakindia123 and manveru0 whether they know what causes this...
Interesting information :) The only problem is that no one in the i9001 forum is an Odin expert. (we should actually ask a samsung developer, but I think they might not answer that) It's highly experimental for all of us, I like it tho since It has a really high change of succeeding compared to Installing Roms trough CWM. Odin always worked for me, never got any brick/bootloop/hang in recovery. CWM (flashing cranium) caused me a quadrillion bootloops.

btw, I'm thinking of making an app which convert CWM flashables (like extended status bar mod, no roms tho) to an on-the-fly installation (which requires zero manual operations :D) But first have to make broodROM Configurator more stable ;)

Idea's Idea's Idea's, I wish someone in this forum knew AutoIT language (easy mode programming) / Batch, and wanted to help me developing broodROM Configurator ^^
 
Last edited:

despotovski01

Inactive Recognized Developer
Jan 1, 2011
1,522
2,133
Skopje
Interesting information :) The only problem is that no one in the i9001 forum is an Odin expert. (we should actually ask a samsung developer, but I think they might not answer that) It's highly experimental for all of us, I like it tho since It has a really high change of succeeding compared to Installing Roms trough CWM. Odin always worked for me, never got any brick/bootloop/hang in recovery. CWM (flashing cranium) caused me a quadrillion bootloops.

btw, I'm thinking of making an app which convert CWM flashables (like extended status bar mod, no roms tho) to an on-the-fly installation (which requires zero manual operations :D) But first have to make broodROM Configurator more stable ;)

Idea's Idea's Idea's, I wish someone in this forum knew AutoIT language (easy mode programming) / Batch, and wanted to help me developing broodROM Configurator ^^

I would be happy to help you. I only know Visual Basic.NET, but I read that AutoIT has BASIC syntax, so I might be able to do some scripts. :cool: I'm really good at VB.NET, so if you need any help, just ask. :)
 
  • Like
Reactions: broodplank1337

broodplank1337

Inactive Recognized Developer
Nov 24, 2011
4,992
10,155
Nijmegen
www.broodplank.net
I would be happy to help you. I only know Visual Basic.NET, but I read that AutoIT has BASIC syntax, so I might be able to do some scripts. :cool: I'm really good at VB.NET, so if you need any help, just ask. :)
Thanks for your interests :), here is an example of AutoIT script (the GPS part of broodROM Configurator)

The GUI Part:
Code:
GUICtrlCreateLabel("Choose a GPS Server:", 410, 200)
$gpserver = GUICtrlCreateCombo("North-America (Default)", 410, 215, 295, 20, $CBS_DROPDOWNLIST)
GUICtrlSetData($gpserver, "Asia|Europe|Oceania|South-America|Netherlands|China|Russia|India|UK|Germany|France|Japan|Italy|Poland|Malaysia|Korea")
$installgpsserver = GUICtrlCreateButton("Install", 710, 214, 80, 22)


The execution part:
Code:
If $msg = $installgpsserver Then

		$readgps = GUICtrlRead($gpserver)

		If FileExists(@ScriptDir & "\src\gps\gps.conf") Then FileDelete(@ScriptDir & "\src\gps\gps.conf")

		If GUICtrlRead($gpserver) = "North-America (Default)" Then $readgps = "north-america"
		If GUICtrlRead($gpserver) = "Europe" Then $readgps = "europe"
		If GUICtrlRead($gpserver) = "Asia" Then $readgps = "asia"
		If GUICtrlRead($gpserver) = "Oceania" Then $readgps = "oceania"
		If GUICtrlRead($gpserver) = "South-America" Then $readgps = "south-armerica"
		If GUICtrlRead($gpserver) = "Netherlands" Then $readgps = "nl"
		If GUICtrlRead($gpserver) = "China" Then $readgps = "cn"
		If GUICtrlRead($gpserver) = "Russia" Then $readgps = "ru"
		If GUICtrlRead($gpserver) = "India" Then $readgps = "in"
		If GUICtrlRead($gpserver) = "UK" Then $readgps = "uk"
		If GUICtrlRead($gpserver) = "Germany" Then $readgps = "de"
		If GUICtrlRead($gpserver) = "France" Then $readgps = "fr"
		If GUICtrlRead($gpserver) = "Japan" Then $readgps = "jp"
		If GUICtrlRead($gpserver) = "Italy" Then $readgps = "it"
		If GUICtrlRead($gpserver) = "Poland" Then $readgps = "pl"
		If GUICtrlRead($gpserver) = "Malaysia" Then $readgps = "my"
		If GUICtrlRead($gpserver) = "Korea" Then $readgps = "kr"


		FileWrite(@ScriptDir & "\src\gps\gps.conf", "NTP_SERVER=" & $readgps & ".pool.ntp.org" & @LF)
		FileWriteLine(@ScriptDir & "\src\gps\gps.conf", "XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra.bin" & @LF & @LF)
		FileWriteLine(@ScriptDir & "\src\gps\gps.conf", "XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra.bin" & @LF)
		FileWriteLine(@ScriptDir & "\src\gps\gps.conf", "XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin")

		Run(@ScriptDir & "\src\pushgps.bat")


	EndIf


The batch part:
Code:
@echo off
title broodROM Configurator
echo.
echo Pushing GPS Settings
echo Make sure your phone has debugging mode enabled
echo.
cd /d %~dp0
adb root
adb wait-for-device
adb remount
adb -d shell mount -o remount rw /system
adb push "gps/gps.conf" "system/etc/gps.conf"
adb -d shell chmod 0644 "/system/etc/gps.conf"
echo.
echo Done... A reboot is necessary for the changes to take effect
pause

As you see the syntax is very easy, If you want to help developing broodROM Configurator pm me pls and we will talk about it ;)
 
  • Like
Reactions: despotovski01

nikagl

Senior Member
Jun 11, 2006
2,878
619
51
Nieuwegein, NL
OnePlus 6
btw, I'm thinking of making an app which convert CWM flashables (like extended status bar mod, no roms tho) to an on-the-fly installation (which requires zero manual operations :D) But first have to make broodROM Configurator more stable ;)

Idea's Idea's Idea's, I wish someone in this forum knew AutoIT language (easy mode programming) / Batch, and wanted to help me developing broodROM Configurator ^^

Yeah, was thinking about creating it from a cwm package too. Shouldn't be too hard (unzip system and create ext4 image with it's content) but requires linux. I doubt cygwin is capable of creating an ext4...

If you need help with broodROM, i'm always there. Maybe create a development topic for it? I'll definitely help. And maybe sometime I'll contribute too (like we talked about)... but time is a bit rare atm...
 

broodplank1337

Inactive Recognized Developer
Nov 24, 2011
4,992
10,155
Nijmegen
www.broodplank.net
Yeah, was thinking about creating it from a cwm package too. Shouldn't be too hard (unzip system and create ext4 image with it's content) but requires linux. I doubt cygwin is capable of creating an ext4...

If you need help with broodROM, i'm always there. Maybe create a development topic for it? I'll definitely help. And maybe sometime I'll contribute too (like we talked about)... but time is a bit rare atm...
Thanks :). I think I will make a development topic for it soon, and my time is rare to atm :p, but that will change in 1 week (internship of 40 hours/week finished)

btw, do you mean broodROM development or broodROM Configurator development? Because the configurator gets 100% priority right now
 

ramzidjoudi

Senior Member
Jun 12, 2011
286
85
thank you for this
it's very interresting


i try it but i have this errors :

PHP:
*********** Started: 22/04/2012  8:22:49,92
adb server is out of date.  killing...
* daemon started successfully *
** daemon still not runningerror: cannot connect to daemon
adb server is out of date.  killing...
* daemon started successfully *
3043 KB/s (5405996 bytes in 1.734s)
adb server is out of date.  killing...
* daemon started successfully *
** daemon still not runningerror: cannot connect to daemon
adb server is out of date.  killing...
* daemon started successfully *
2848 KB/s (4739072 bytes in 1.625s)
adb server is out of date.  killing...
ADB server didn't ACK
* failed to start daemon *
error:
adb server is out of date.  killing...
* daemon started successfully *
2870 KB/s (6291456 bytes in 2.140s)
*********** Push done: 22/04/2012  8:23:29,57
adb server is out of date.  killing...
* daemon started successfully *
** daemon still not runningerror: cannot connect to daemon
adb server is out of date.  killing...
* daemon started successfully *
1280+0 records in
1280+0 records out
5242880 bytes transferred in 0.129 secs (40642480 bytes/sec)
adb server is out of date.  killing...
ADB server didn't ACK
* failed to start daemon *
error:
adb server is out of date.  killing...
* daemon started successfully *
133120+0 records in
133120+0 records out
545259520 bytes transferred in 73.883 secs (7380040 bytes/sec)
adb server is out of date.  killing...
* daemon started successfully *
remount succeeded
*********** Extract done: 22/04/2012  8:25:12,42
adb server is out of date.  killing...
* daemon started successfully *
su
mount -o remount rw /system
cd /sdcard/BuildRom
tar -c adsp.mbn amss.mbn boot.img cache.img.ext4 preload.img.ext4 recovery.img s
ystem.img.ext4 >CraniumRC5.tar
cp CraniumRC5.tar CraniumRC5.tar.md5
md5sum -t CraniumRC5.tar>>CraniumRC5.tar.md5
exit
exit
# su
# mount -o remount rw /system
# cd /sdcard/BuildRom
# tar -c adsp.mbn amss.mbn boot.img cache.img.ext4 preload.img.ext4 recovery.img
 system.img.ext4 >CraniumRC5.tar
tar: amss.mbn: No such file or directory
tar: cache.img.ext4: No such file or directory
tar: recovery.img: No such file or directory
tar: error exit delayed from previous errors
# cp CraniumRC5.tar CraniumRC5.tar.md5
# md5sum -t CraniumRC5.tar>>CraniumRC5.tar.md5
# exit
# exit
*********** Image created: 22/04/2012  8:28:13,93
Android Debug Bridge version 1.0.25

 -d                            - directs command to the only connected USB devic
e
                                 returns an error if more than one USB device is
 present.
 -e                            - directs command to the only running emulator.
                                 returns an error if more than one emulator is r
unning.
 -s <serial number>            - directs command to the USB device or emulator w
ith
                                 the given serial number. Overrides ANDROID_SERI
AL
                                 envivornment variable.
 -p <product name or path>     - simple product name like 'sooner', or
                                 a relative/absolute path to a product
                                 out directory like 'out/target/product/sooner'.

                                 If -p is not specified, the ANDROID_PRODUCT_OUT

                                 environment variable is used, which must
                                 be an absolute path.
 devices                       - list all connected devices
 connect <host>:<port>         - connect to a device via TCP/IP disconnect <host
>:<port>      - disconnect from a TCP/IP device
device commands:
  adb push <local> <remote>    - copy file/dir to device
  adb pull <remote> <local>    - copy file/dir from device
  adb sync [ <directory> ]     - copy host->device only if changed
                                 (see 'adb help all')
  adb shell                    - run remote shell interactively
  adb shell <command>          - run remote shell command
  adb emu <command>            - run emulator console command
  adb logcat [ <filter-spec> ] - View device log
  adb forward <local> <remote> - forward socket connections
                                 forward specs are one of:
                                   tcp:<port>
                                   localabstract:<unix domain socket name>
                                   localreserved:<unix domain socket name>
                                   localfilesystem:<unix domain socket name>
                                   dev:<character device name>
                                   jdwp:<process pid> (remote only)
  adb jdwp                     - list PIDs of processes hosting a JDWP transport

  adb install [-l] [-r] <file> - push this package file to the device and instal
l it
                                 ('-l' means forward-lock the app)
                                 ('-r' means reinstall the app, keeping its data
)
  adb uninstall [-k] <package> - remove this app package from the device
                                 ('-k' means keep the data and cache directories
)
  adb bugreport                - return all information from the device
                                 that should be included in a bug report.

  adb help                     - show this help message
  adb version                  - show version num

DATAOPTS:
 (no option)                   - don't touch the data partition
  -w                           - wipe the data partition
  -d                           - flash the data partition

scripting:
  adb wait-for-device          - block until device is online
  adb start-server             - ensure that there is a server running
  adb kill-server              - kill the server if it is running
  adb get-state                - prints: offline | bootloader | device
  adb get-serialno             - prints: <serial-number>
  adb status-window            - continuously print device status for a specifie
d device
  adb remount                  - remounts the /system partition on the device re
ad-write
  adb reboot [bootloader|recovery] - reboots the device, optionally into the boo
tloader or recovery program
  adb root                     - restarts the adbd daemon with root permissions
  adb usb                      - restarts the adbd daemon listening on USB  adb
tcpip <port>             - restarts the adbd daemon listening on TCP on the spec
ified port
networking:
  adb ppp <tty> [parameters]   - Run PPP over USB.
 Note: you should not automatically start a PPP connection.
 <tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
 [parameters] - Eg. defaultroute debug dump local notty usepeerdns

adb sync notes: adb sync [ <directory> ]
  <localdir> can be interpreted in several ways:

  - If <directory> is not specified, both /system and /data partitions will be u
pdated.

  - If it is "system" or "data", only the corresponding partition
    is updated.
Accès refusé.
*********** Rom available for upload: 22/04/2012  8:28:17,07
*********** OK?! Press key to make it with shell input
Appuyez sur une touche pour continuer...

and in sdcard i foud directory named BuildRom with these files :

adsp.mbn : 5280 Ko
boot.img : 5120 Ko
CraniumRC5.tar : 549027 Ko
CraniumRC5.tar.md5 : 549027 Ko
preload.img.ext4 : 6144 Ko
system.img.ext4 : 532480 Ko

what to do then?
 

Top Liked Posts

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

    Based on the instructions broodplank posted in the Cranium thread (here), I created some scripts to automate the entire process. Not sure whether you find it useful, but here it is.

    If you want to do it directly on your device with an cwm-installable zip, please go to this topic:
    The making of ... an ODIN installable package with CWM

    It will create a zipped version of the md5-tar file of the package compatible with Odin.

    Instructions

    1. Build your ROM using packages in the forum. Add new apps, change battery, etc., etc. till your satisfied. Make sure not to add sensitive data (user credentials etc)

    2. Download a base-ROM like XXKPS and put the following files in the BaseRom folder:
    adsp.mbn
    amss.mbn
    boot.img
    cache.img.ext4
    preload.img.ext4

    3. Boot your device

    4. Make sure you have BusyBox installed

    5. Connect your device with USB, make sure your sdcard is not mounted on the PC

    6. Make sure you have enough space on the internal sdcard; at least 1,84 GB:
    system.img.ext4 = 532 MB
    tar file = 644 MB
    base rom = 100 MB
    md5 file = 644 MB

    (it would be possible to delete tar file, but I perfer to be safe than sorry)

    7. Start BuildOdin.cmd

    Thanks to broodplank1337 I now also created some scripts to do it through Cygwin. After rethinking this I could have done it easier by invoking the cygwin commands directly, but for now I am doing it through the shell :). See attached.

    Downloads... see next post :cool:

    Regards,

    Nika.
    1
    Interesting information :) The only problem is that no one in the i9001 forum is an Odin expert. (we should actually ask a samsung developer, but I think they might not answer that) It's highly experimental for all of us, I like it tho since It has a really high change of succeeding compared to Installing Roms trough CWM. Odin always worked for me, never got any brick/bootloop/hang in recovery. CWM (flashing cranium) caused me a quadrillion bootloops.

    btw, I'm thinking of making an app which convert CWM flashables (like extended status bar mod, no roms tho) to an on-the-fly installation (which requires zero manual operations :D) But first have to make broodROM Configurator more stable ;)

    Idea's Idea's Idea's, I wish someone in this forum knew AutoIT language (easy mode programming) / Batch, and wanted to help me developing broodROM Configurator ^^

    I would be happy to help you. I only know Visual Basic.NET, but I read that AutoIT has BASIC syntax, so I might be able to do some scripts. :cool: I'm really good at VB.NET, so if you need any help, just ask. :)
    1
    I would be happy to help you. I only know Visual Basic.NET, but I read that AutoIT has BASIC syntax, so I might be able to do some scripts. :cool: I'm really good at VB.NET, so if you need any help, just ask. :)
    Thanks for your interests :), here is an example of AutoIT script (the GPS part of broodROM Configurator)

    The GUI Part:
    Code:
    GUICtrlCreateLabel("Choose a GPS Server:", 410, 200)
    $gpserver = GUICtrlCreateCombo("North-America (Default)", 410, 215, 295, 20, $CBS_DROPDOWNLIST)
    GUICtrlSetData($gpserver, "Asia|Europe|Oceania|South-America|Netherlands|China|Russia|India|UK|Germany|France|Japan|Italy|Poland|Malaysia|Korea")
    $installgpsserver = GUICtrlCreateButton("Install", 710, 214, 80, 22)


    The execution part:
    Code:
    If $msg = $installgpsserver Then
    
    		$readgps = GUICtrlRead($gpserver)
    
    		If FileExists(@ScriptDir & "\src\gps\gps.conf") Then FileDelete(@ScriptDir & "\src\gps\gps.conf")
    
    		If GUICtrlRead($gpserver) = "North-America (Default)" Then $readgps = "north-america"
    		If GUICtrlRead($gpserver) = "Europe" Then $readgps = "europe"
    		If GUICtrlRead($gpserver) = "Asia" Then $readgps = "asia"
    		If GUICtrlRead($gpserver) = "Oceania" Then $readgps = "oceania"
    		If GUICtrlRead($gpserver) = "South-America" Then $readgps = "south-armerica"
    		If GUICtrlRead($gpserver) = "Netherlands" Then $readgps = "nl"
    		If GUICtrlRead($gpserver) = "China" Then $readgps = "cn"
    		If GUICtrlRead($gpserver) = "Russia" Then $readgps = "ru"
    		If GUICtrlRead($gpserver) = "India" Then $readgps = "in"
    		If GUICtrlRead($gpserver) = "UK" Then $readgps = "uk"
    		If GUICtrlRead($gpserver) = "Germany" Then $readgps = "de"
    		If GUICtrlRead($gpserver) = "France" Then $readgps = "fr"
    		If GUICtrlRead($gpserver) = "Japan" Then $readgps = "jp"
    		If GUICtrlRead($gpserver) = "Italy" Then $readgps = "it"
    		If GUICtrlRead($gpserver) = "Poland" Then $readgps = "pl"
    		If GUICtrlRead($gpserver) = "Malaysia" Then $readgps = "my"
    		If GUICtrlRead($gpserver) = "Korea" Then $readgps = "kr"
    
    
    		FileWrite(@ScriptDir & "\src\gps\gps.conf", "NTP_SERVER=" & $readgps & ".pool.ntp.org" & @LF)
    		FileWriteLine(@ScriptDir & "\src\gps\gps.conf", "XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra.bin" & @LF & @LF)
    		FileWriteLine(@ScriptDir & "\src\gps\gps.conf", "XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra.bin" & @LF)
    		FileWriteLine(@ScriptDir & "\src\gps\gps.conf", "XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin")
    
    		Run(@ScriptDir & "\src\pushgps.bat")
    
    
    	EndIf


    The batch part:
    Code:
    @echo off
    title broodROM Configurator
    echo.
    echo Pushing GPS Settings
    echo Make sure your phone has debugging mode enabled
    echo.
    cd /d %~dp0
    adb root
    adb wait-for-device
    adb remount
    adb -d shell mount -o remount rw /system
    adb push "gps/gps.conf" "system/etc/gps.conf"
    adb -d shell chmod 0644 "/system/etc/gps.conf"
    echo.
    echo Done... A reboot is necessary for the changes to take effect
    pause

    As you see the syntax is very easy, If you want to help developing broodROM Configurator pm me pls and we will talk about it ;)