Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
nikagl
Old
(Last edited by nikagl; 1st February 2012 at 11:47 PM.)
#1  
nikagl's Avatar
Senior Member - OP
Thanks Meter 371
Posts: 2,025
Join Date: Jun 2006
Location: Nieuwegein, NL

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

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

Regards,

Nika.
Attached Files
File Type: zip BuildOdin.zip - [Click for QR Code] (868.7 KB, 635 views)
File Type: zip BuildOdinCygwin.zip - [Click for QR Code] (868.9 KB, 385 views)
Nika Gerson Lohman
__________________


Current Devices:
Samsung Galaxy S+ (I9001)
Acer Liquid Express E320
Acer Liquid Express E330
Acer Iconia Smart S300 (bricked, sdcard-slot broken)
Acer Iconia Tab A511 (bricked, apx mode & screen broken)

Still looking for the Thank You button? Change your style to XDA 2010 (bottom left hand corner)
The Following 7 Users Say Thank You to nikagl For This Useful Post: [ Click to Expand ]
 
nikagl
Old
(Last edited by nikagl; 18th December 2011 at 11:22 PM.)
#2  
nikagl's Avatar
Senior Member - OP
Thanks Meter 371
Posts: 2,025
Join Date: Jun 2006
Location: Nieuwegein, NL

 
DONATE TO ME
Default Downloads

Just the scripts:
http://forum.xda-developers.com/atta...1&d=1324250313

File that includes BaseRom XXKPS (80 MB):
http://www.multiupload.com/FYGRD3LDFG
Nika Gerson Lohman
__________________


Current Devices:
Samsung Galaxy S+ (I9001)
Acer Liquid Express E320
Acer Liquid Express E330
Acer Iconia Smart S300 (bricked, sdcard-slot broken)
Acer Iconia Tab A511 (bricked, apx mode & screen broken)

Still looking for the Thank You button? Change your style to XDA 2010 (bottom left hand corner)
 
nikagl
Old
(Last edited by nikagl; 18th December 2011 at 11:34 PM.)
#3  
nikagl's Avatar
Senior Member - OP
Thanks Meter 371
Posts: 2,025
Join Date: Jun 2006
Location: Nieuwegein, NL

 
DONATE TO ME
Default What it does...

Here's a little more explanation of what the script does:

BuildOdin.cmd allows minor customization:
  • ROMName = name of the ROM you are creating (CraniumRC5 in my case)
  • BaseRomFolder = location it takes the BaseRom files from (default = BaseRom)
  • TempBuildFolder = location on device it will use to build your ROM (default = /sdcard/BuildRom, I guess you can also use your /sdcard/external_sd - haven't tested it)
It will execute the following scripts:
  • adb-PushBaseromSdcard.cmd - this will push the files from your baserom folder to the build folder on the device
  • adb-ExtractRom.cmd - will dump your raw ROM data to files
  • adb-MakeImageShell.cmd - will create a tempfile that contains the shell commands that will be executed for tarring and md5-ing the ROM
  • adb-GetRom.cmd - will retrieve the ROM and make a zip-file. It retrieves the ROM and renames it to a time/date based file, this may need some customization in some cases as the date/time naming depends on regional settings...
Any questions? Any tips and tricks to make this better? Let me know!



Regards,


Nika.
Nika Gerson Lohman
__________________


Current Devices:
Samsung Galaxy S+ (I9001)
Acer Liquid Express E320
Acer Liquid Express E330
Acer Iconia Smart S300 (bricked, sdcard-slot broken)
Acer Iconia Tab A511 (bricked, apx mode & screen broken)

Still looking for the Thank You button? Change your style to XDA 2010 (bottom left hand corner)
 
broodplank1337
Old
#4  
broodplank1337's Avatar
Recognized Contributor / Recognized Developer
Thanks Meter 4810
Posts: 3,072
Join Date: Nov 2011
Location: Nijmegen

 
DONATE TO ME
Wow! Thanks man, very nice! You can create the tar/md5 on your computer by just copying the files from your sdcard to /home/username in cygwin folder then use the same commands
Samsung Galaxy S Plus (i9001)

Latest Roms:

broodROM Jellybean
- Powerful, smooth, stable, personalized, awesome battery life (1% per hour) and open source
-- Github here

Android Barebone Packages (ABP)
- Probably currently one of the smallest ROMS of the universe (33mb)
-- Github here


For sources you can visit my Github. Or take a look at all my projects

 
fedexist
Old
(Last edited by fedexist; 19th December 2011 at 03:46 PM.)
#5  
Senior Member
Thanks Meter 7
Posts: 101
Join Date: Nov 2011
Location: Genoa
Thank you! Do I have to use Linux or Windows is good?

edit: I've understood by myself :P, thanks again for your work
 
nikagl
Old
#6  
nikagl's Avatar
Senior Member - OP
Thanks Meter 371
Posts: 2,025
Join Date: Jun 2006
Location: Nieuwegein, NL

 
DONATE TO ME
Quote:
Originally Posted by broodplank1337 View Post
Wow! Thanks man, very nice! You can create the tar/md5 on your computer by just copying the files from your sdcard to /home/username in cygwin folder then use the same commands
Thanks, I'll try cygwin. I tried unxutils, but that added an CRLF instead of LF only at the end of the file and rendered the checksum invalid
Nika Gerson Lohman
__________________


Current Devices:
Samsung Galaxy S+ (I9001)
Acer Liquid Express E320
Acer Liquid Express E330
Acer Iconia Smart S300 (bricked, sdcard-slot broken)
Acer Iconia Tab A511 (bricked, apx mode & screen broken)

Still looking for the Thank You button? Change your style to XDA 2010 (bottom left hand corner)
 
wintel_mac
Old
#7  
wintel_mac's Avatar
Senior Member
Thanks Meter 179
Posts: 450
Join Date: Jun 2011
Location: Nuremberg

 
DONATE TO ME
Quote:
Originally Posted by nikagl View Post
Thanks, I'll try cygwin. I tried unxutils, but that added an CRLF instead of LF only at the end of the file and rendered the checksum invalid
Maybe if you invoke a dos2unix? Or 'perl -i -p -e 's/\r//' <your .md5 file>?
 
nikagl
Old
#8  
nikagl's Avatar
Senior Member - OP
Thanks Meter 371
Posts: 2,025
Join Date: Jun 2006
Location: Nieuwegein, NL

 
DONATE TO ME
Quote:
Originally Posted by wintel_mac View Post
Maybe if you invoke a dos2unix? Or 'perl -i -p -e 's/\r//' <your .md5 file>?
Good thinking, I did try manually changing the file using a hex-editor but that didn't work and wouldn't be a good permanent fix for something automatic.

I'll try soon ...
Nika Gerson Lohman
__________________


Current Devices:
Samsung Galaxy S+ (I9001)
Acer Liquid Express E320
Acer Liquid Express E330
Acer Iconia Smart S300 (bricked, sdcard-slot broken)
Acer Iconia Tab A511 (bricked, apx mode & screen broken)

Still looking for the Thank You button? Change your style to XDA 2010 (bottom left hand corner)
 
nikagl
Old
#9  
nikagl's Avatar
Senior Member - OP
Thanks Meter 371
Posts: 2,025
Join Date: Jun 2006
Location: Nieuwegein, NL

 
DONATE TO ME
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 post #1
Nika Gerson Lohman
__________________


Current Devices:
Samsung Galaxy S+ (I9001)
Acer Liquid Express E320
Acer Liquid Express E330
Acer Iconia Smart S300 (bricked, sdcard-slot broken)
Acer Iconia Tab A511 (bricked, apx mode & screen broken)

Still looking for the Thank You button? Change your style to XDA 2010 (bottom left hand corner)
 
broodplank1337
Old
#10  
broodplank1337's Avatar
Recognized Contributor / Recognized Developer
Thanks Meter 4810
Posts: 3,072
Join Date: Nov 2011
Location: Nijmegen

 
DONATE TO ME
Quote:
Originally Posted by nikagl View Post
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 post #1
Very nice addition! I will use the script for sure
Samsung Galaxy S Plus (i9001)

Latest Roms:

broodROM Jellybean
- Powerful, smooth, stable, personalized, awesome battery life (1% per hour) and open source
-- Github here

Android Barebone Packages (ABP)
- Probably currently one of the smallest ROMS of the universe (33mb)
-- Github here


For sources you can visit my Github. Or take a look at all my projects


 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...

XDA PORTAL POSTS

Nandroid Manager Receives Major Update

Do you find yourself obsessively jumping from ROM to ROM? And do you hate having to restore a full … more

Careers in Android: Recruiter Reveals How Resumes are Chosen – XDA Developer TV

XDA Developer TV Producer Jayce released a video a … more

HttpClient Tutorial to Upload and Download with Your App

Developers wanting to interact with the Internet need to choose a package to do the … more

Profile Flow: A Tasker Alternative

By now, we’re all quite familiar with Tasker, the personal automation app that seems to be able to … more