[TOOL] RomGen

ChinmayKunkikar

Senior Member
Nov 15, 2012
1,035
1,119
0
Pune
Use an android terminal emulator on your device. You can download it from the Play Store. If your device is emmc....

Type and enter:
Code:
cat /proc/emmc
See picture for an example... The picture will show a list of partitions. Those partitions are specific to my device (not yours).


Sent from my C525c using Tapatalk
Yeah thanks a lot!

Mine worked with
Code:
cat /proc/devices
But still cannot find the boot.img partition.

Sent from my MT27i using XDA Premium 4 mobile app
 
M

Modding.MyMind

Guest
@cpkunki, try cat /proc/mtd then. As for cat /proc/devices, that command will not provide you with what you are looking for.

Sent from my C525c using Tapatalk
 

ChinmayKunkikar

Senior Member
Nov 15, 2012
1,035
1,119
0
Pune
@cpkunki, try cat /proc/mtd then. As for cat /proc/devices, that command will not provide you with what you are looking for.

Sent from my C525c using Tapatalk
The file /proc/mtd doesn't exist for me.
And I think I got that path.
Will tell you.

Edit -
Yes I got it!
Found it through the updater script of a kernel. :D

Sent from my MT27i using XDA Premium 4 mobile app
 
Last edited:
  • Like
Reactions: EnvyBot
M

Modding.MyMind

Guest
The file /proc/mtd doesn't exist for me.
And I think I got that path.
Will tell you.

Edit -
Yes I got it!
Found it through the updater script of a kernel. :D

Sent from my MT27i using XDA Premium 4 mobile app
That's good, because I was gonna tell you to do that next lol.

Sent from my C525c using Tapatalk
 

ChinmayKunkikar

Senior Member
Nov 15, 2012
1,035
1,119
0
Pune
@munjeni , Mate please take a look at this, it says to give the permissions manually. What permissions should be given to that busybox?

[email protected]:/ $ su
[email protected]:/ # cd /data/local/tmp
d 755 romgen <
/dev/block/mmcblk0p9 /sdcard0/rom.zip <

device name = MT27i
device name2 = pepper
system partition = /dev/block/mmcblk0p10
data partition = /dev/block/mmcblk0p11
cache partition = /dev/block/mmcblk0p12 boot partition = /dev/block/mmcblk0p9
writing zip to = /sdcard0/rom.zip

creating /data/local/tmp/rom folder...
new folder /data/local/tmp/rom created.
error giving perm to /data/local/tmp/rom/busybox! Do it manualy first!
[email protected]:/data/local/tmp #
@Modding.MyMind , can you help.
I'm on XDA after a very long. :)


Sent from my Xperia Sola using XDA Premium 4 mobile app
 
M

Modding.MyMind

Guest
@munjeni , Mate please take a look at this, it says to give the permissions manually. What permissions should be given to that busybox?


@Modding.MyMind , can you help.
I'm on XDA after a very long. :)


Sent from my Xperia Sola using XDA Premium 4 mobile app
Chmod busybox to 755.

644 = rw-r--r--
755 = rwxr-xr-x

Sent from my C525c using Tapatalk
 
Last edited:

ChinmayKunkikar

Senior Member
Nov 15, 2012
1,035
1,119
0
Pune
Chmod busybox to 755.

644 = rw-r--r--
755 = rwxr-xr-x

Sent from my C525c using Tapatalk
Hey, getting the same error again.
After chmod 755 to busybox, I run the script again.
After running, it wipes off the old rom folder and creates a new one. This creates the problem. So, it again gives error in giving perm to busybox.

Were you able to create the rom successfully @Modding.MyMind ?

Sent from my Xperia Sola using XDA Premium 4 mobile app
 
M

Modding.MyMind

Guest
Hey, getting the same error again.
After chmod 755 to busybox, I run the script again.
After running, it wipes off the old rom folder and creates a new one. This creates the problem. So, it again gives error in giving perm to busybox.

Were you able to create the rom successfully @Modding.MyMind ?

Sent from my Xperia Sola using XDA Premium 4 mobile app
Yea, and my busybox is set to perm 755 so it can have in addition, executable rights.
 

SaeedFazlollahzadeh

Senior Member
May 2, 2014
338
50
0
26
Sari
Tool for making a flashable zip directly by dumping rom from your phone, enjoy!

Code:
cd /data/local/tmp
chmod 755 romgen
./romgen -h
  --------------------------------------------------------
.::::..         ROMGEN by Munjeni @ XDA 2013         ..::::.

    **  Tool for making a flashable zip. Enjoy! :)      **
    **--------------------------------------------------**

    ------   USAGE   -----
    Simple command:
    ./romgen device device2 system data cache boot out_zip

    1. device mean: name of the device in updater-script
    2. device2 mean: another name of the device in updater-script
    3. system mean: block device for the system partition updater-script,
                    for example: /dev/block/mmcblk0p10
    4. data mean: block device for the data partition updater-script,
                    for example: /dev/block/mmcblk0p11
    5. cache mean: block device for the cache partition updater-script,
                    for example: /dev/block/mmcblk0p12
    6. boot mean: block device for the boot partition updater-script,
                    for example: /dev/block/mmcblk0p9
    7. out_zip mean: where to write final zip file
                    for example: /sdcard/rom.zip

/data/local/tmp #
I downloaded it. Now what should I do? It contains just a file
 
M

Modding.MyMind

Guest
I downloaded it. Now what should I do? It contains just a file
That file is a shell script. Run the file within your android terminal and it will give instructions on how to use it.
I normally run it from /data/local/tmp. Just a personal preference.

Sent from my C525c using Tapatalk
 

SaeedFazlollahzadeh

Senior Member
May 2, 2014
338
50
0
26
Sari
That file is a shell script. Run the file within your android terminal and it will give instructions on how to use it.
I normally run it from /data/local/tmp. Just a personal preference.

Sent from my C525c using Tapatalk
The romgen.zip is in my sdcard1
I installed Terminal Emulator, but I don't know how to open that
I'm not even an amateur in programming. Please help me how to run it
Should I extract it?

Sent from my C6903 using Tapatalk
 
M

Modding.MyMind

Guest
The romgen.zip is in my sdcard1
I installed Terminal Emulator, but I don't know how to open that
I'm not even an amateur in programming. Please help me how to run it
Should I extract it?

Sent from my C6903 using Tapatalk
Extract the zip. Grab the romgen file and place it at /data/local/tmp. Open up the terminal app.

Change directories to /data/local/tmp:
Code:
cd /data/local/tmp
Now give the file permissions:
Code:
chmod 755 name_of_file
Then, execute the file:
Code:
./name_of_file
Sent from my C525c using Tapatalk
 

SaeedFazlollahzadeh

Senior Member
May 2, 2014
338
50
0
26
Sari
Extract the zip. Grab the romgen file and place it at /data/local/tmp. Open up the terminal app.

Change directories to /data/local/tmp:
Code:
cd /data/local/tmp
Now give the file permissions:
Code:
chmod 755 name_of_file
Then, execute the file:
Code:
./name_of_file
Sent from my C525c using Tapatalk
That's all I've done
But something goes wrong


Sent from my C6903 using Tapatalk
 
M

Modding.MyMind

Guest
Make sure you gain root access. Type and enter, su, then proceed again as I instructed you in my last post.

Sent from my C525c using Tapatalk
 
M

Modding.MyMind

Guest
Add ./ before romgen.

It should look like this:

chmod 755 ./romgen

Sent from my C525c using Tapatalk