yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] munjeni:
Compresion level is 9 ! You can compare context of these errored folder in my zip and your working zip, to make sure if its realy duplicated! If you found what cause these problem please let me know!

About 4 arguments to romgen: I not going to change these arguments because every android device model have diferent blok device number so user must to define them (I thinked to automate them but that have no priority by now, maybe later)!
[Android Software/Hacking General [Developers Only]] :
I agree, I basically just removed the format () line in the updater-script all together because I format my device using the custom recovery anyways so I find no need to format it again lol. Personal preference. But yea, those who get errors regarding the arguements will just need to use an update-binary that accepts such arguments or else remove the line altogether. I will update you if I find out what is causing the duplication error. As I said before, I have two roms currently on my device and both have the exact same information in them. One rom I created based on your tool and the other I used a kitchen, but only your rom based on your tool gives me that error while the other rom opens up just fine. I will look in to it. :)
[Android Software/Hacking General [Developers Only]] munjeni:
New version is out, just added 5.th parameter for zip out and added meta-inf update-binary and some otacerts.. bla, but need to make real metadata and otacerts and to sign final zip... need help (tutorial) for them since not understand how it is generated with openssl.
[Android Software/Hacking General [Developers Only]] :
I need a tutorial on how to make these files to work on android period. Lol, I usually have to edit these things with a hex editor but downloading now :)
[Android Software/Hacking General [Developers Only]] TecknoFreak:
Looking great my friend
[Android Software/Hacking General [Developers Only]] munjeni:
I not tried on not-rooted devices but if some one have a free time for trying them... please let me know if tool can make ota on not-rooted devices!
[Android Software/Hacking General [Developers Only]] :
[MENTION=4120742]munjeni[/MENTION]

Is this project open source? If not, then that is ok; I just wanted to ask. :)
[Android Software/Hacking General [Developers Only]] munjeni:
No, all things which have no licence is private projects and I not going to open them public. Is latest version ok now?
[Android Software/Hacking General [Developers Only]] :
I have to remove assert() and format() from the updater-script. When using assert it fails even though the info is correct inside the build.prop file. Format fails because it has four arguments when it will only allow me three at most.

I still get that problem when trying to view the Rom.zip like I mentioned previously. I personally use TWRP, so even with the first to command lines removed from the updater-script it still fails to install the Rom. Guess it is due to the recovery I use. Haven't messed with it too much as of recent. Still playing with it as I try to understand why it doesn't flash.
[Android Software/Hacking General [Developers Only]] munjeni:
Simple open recovery.log which is in /tmp folder, there is a detailed log about error!
[Android Software/Hacking General [Developers Only]] :
For the K2 variants (HTC One SV), its /data/local/tmp. File doesn't exist.
[Android Software/Hacking General [Developers Only]] munjeni:
Sry! Recovery.log is saved to cache partition!
[Android Software/Hacking General [Developers Only]] :
Will flash Rom again and review the log after it fails.
[Android Software/Hacking General [Developers Only]] munjeni:
New version is out! Fixed all bugs, added option for skipping boot.img flashing, added another field for defining another name of device, iternal busybox (no need rooted device by now! If you using no rooted device than you must use /dev/null as a boot partition!)...

For example, to skip boot flashing, do command:

romgen D5503 amami systemblaba datablabla cacheblalba /dev/null outzip_blabla

where /dev/null is boot partition so null will be writen to boot after flashing if you used /dev/null as a boot partition...
[Android Software/Hacking General [Developers Only]] :
Awesome, does this version have the option to choose single partitions. Previously, the command would only allow for all partitions, system, boot, data, cache. Would be good to have the ability to only choose one if needed.

I ask because it would allow the possibilty to create a Rom straight from the phone without the need of a computer or the use of a kitchen like dsixda. So for me at least, that would be very resourceful as I am not always by a computer.
[Android Software/Hacking General [Developers Only]] munjeni:
System data cache boot out... but there is only used system and boot partition, data & cache is nothing (probably I will remain only system and boot). So you can use for example "getrom name1 name2 /system_partition /dev/null /dev/null /dev/null out_zip" so only system and fake boot will be dumped!
[Android Software/Hacking General [Developers Only]] munjeni:
Yesterday I noticed bug There is bug when folder is empty or when symlink is inside folder but there no other files! So when tool generate zip these folder is missing in zip but updater-script have line "set perm to folder" which not exist, so installation aborting because a missing folder Will try to solve them soon! Do not flash generated zip since you will get boot loop (you can only if you add missing folders to zip)! I will make new version soon, hope clean!
[Android Software/Hacking General [Developers Only]] munjeni:
New version is out! Hope all bugs solved! Bug is solved by creating empty file .placeholder to all existing folders so zip for sure now have all mised folders, than placeholders is auto removed at finish of the installation :)
[Android Software/Hacking General [Developers Only]] munjeni:
Yes, tested tool yesterday and finaly everything in generated rom is perfect, enjoy!
[Android Software/Hacking General [Developers Only]] munjeni:
Noticed a bug! Romgen failed to find hiden files (files which have . prefix), bug is solved and new version is out!
[Android Software/Hacking General [Developers Only]] ChinmayKunkikar:
Hello [MENTION=4120742]munjeni[/MENTION] bro!

I am trying this tool out.

One problem is that I can't find out the correct partitions in dev/block for /system, /cache, /data and everything.

I am currently on XSola.

So can i use the same paths that you have mentioned in the examples of the script?

Thanks :good:

Edit-

I tried it using the same paths as mentioned in the script in Terminal emulator.

I got an error something like
[Android Software/Hacking General [Developers Only]] Mohamed Yaser:
What is that man its a file with no exentination
[Android Software/Hacking General [Developers Only]] ChinmayKunkikar:
Haha! You need to know some basic stuff about linux terminal. :)
[Android Software/Hacking General [Developers Only]] Mohamed Yaser:
Yes I just have linux but no one guides me
[Android Software/Hacking General [Developers Only]] ChinmayKunkikar:
[MENTION=4120742]munjeni[/MENTION] , please reply mate.

Sent from my Xperia™ Sola...
[Android Software/Hacking General [Developers Only]] :
If your device is emmc then try this either via adb shell or on your device using a terminal emulator:

cat /proc/emmc

With that said, no you cannot use the same partitions mentioned in his layout. Each device is specific to not only their given partitions but their sizes as well. Some devices will share similarities.

---------- Post added at 05:07 PM ---------- Previous post was at 05:05 PM ----------

Its a compiled binary to keep it simple. An executable file more in less. Think of this file as an .exe file on windows ;). There is more to it, but this should help you get started in your research.
[Android Software/Hacking General [Developers Only]] ChinmayKunkikar:
Ok bro I understood. So how do I find those partitions?

Sent from Xperia™ Sola
[Android Software/Hacking General [Developers Only]] :
Use an android terminal emulator on your device. You can download it from the Play Store. If your device is emmc....

Type and enter:

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).
[Android Software/Hacking General [Developers Only]] ChinmayKunkikar:
Yeah thanks a lot!

Mine worked with

cat /proc/devices

But still cannot find the boot.img partition.
[Android Software/Hacking General [Developers Only]] :
[MENTION=4954533]cpkunki[/MENTION], try cat /proc/mtd then. As for cat /proc/devices, that command will not provide you with what you are looking for.
[Android Software/Hacking General [Developers Only]] ChinmayKunkikar:
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
[Android Software/Hacking General [Developers Only]] :
That's good, because I was gonna tell you to do that next lol.
[Android Software/Hacking General [Developers Only]] ChinmayKunkikar:
Haha! Thanks! :)
[Android Software/Hacking General [Developers Only]] ChinmayKunkikar:
@munjeni , Mate please take a look at this, it says to give the permissions manually. What permissions should be given to that busybox?

[MENTION=5537766]Modding.MyMind[/MENTION] , can you help.

I'm on XDA after a very long. :)
[Android Software/Hacking General [Developers Only]] :
Chmod busybox to 755.

644 = rw-r--r--

755 = rwxr-xr-x
[Android Software/Hacking General [Developers Only]] ChinmayKunkikar:
Oh! Got you!

Thanks!

Will try soon. :)
[Android Software/Hacking General [Developers Only]] ChinmayKunkikar:
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 [MENTION=5537766]Modding.MyMind[/MENTION] ?
[Android Software/Hacking General [Developers Only]] :
Yea, and my busybox is set to perm 755 so it can have in addition, executable rights.
[Android Software/Hacking General [Developers Only]] ChinmayKunkikar:
[MENTION=5537766]Modding.MyMind[/MENTION] , I was able to do it perfectly with adb yesterday.

Thanks for your every tip and help.

And thanks [MENTION=4120742]munjeni[/MENTION] for this tool! :)
[Android Software/Hacking General [Developers Only]] munjeni:
Enjoy! :)
[Android Software/Hacking General [Developers Only]] SaeedFazlollahzadeh:
I downloaded it. Now what should I do? It contains just a file
[Android Software/Hacking General [Developers Only]] :
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.
[Android Software/Hacking General [Developers Only]] SaeedFazlollahzadeh:
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?
[Android Software/Hacking General [Developers Only]] :
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:

cd /data/local/tmp

Now give the file permissions:

chmod 755 name_of_file

Then, execute the file:

./name_of_file
[Android Software/Hacking General [Developers Only]] SaeedFazlollahzadeh:
That's all I've done

But something goes wrong
[Android Software/Hacking General [Developers Only]] :
Make sure you gain root access. Type and enter, su, then proceed again as I instructed you in my last post.
[Android Software/Hacking General [Developers Only]] SaeedFazlollahzadeh:
Here are two pics of Romgen location and Terminal Emulator screen

I entered as you said, but nothing happens

In which part I am doing wrong?
[Android Software/Hacking General [Developers Only]] :
Add ./ before romgen.

It should look like this:

chmod 755 ./romgen
[Android Software/Hacking General [Developers Only]] SaeedFazlollahzadeh:
It says can execute. Permission denied
[Android Software/Hacking General [Developers Only]] SaeedFazlollahzadeh:
Should I change the permission?

I mean by Root Explorer
[Android Software/Hacking General [Developers Only]] :
You are trying to change it's permission from your sdcard. Your sdcard won't allow it because it is a vfat partition. Place the romgen file at /data/local/tmp and THEN set your permissions. Either use chmod or do it with an app like root explorer or es explorer.
[Android Software/Hacking General [Developers Only]] SaeedFazlollahzadeh:
So change the permission to what? RW-R? Or something else?
[Android Software/Hacking General [Developers Only]] :
755 would be rwx-r-x-r-x
[Android Software/Hacking General [Developers Only]] ezknives:
OK... I've been reading over the posts here am I correct to believe I can make a flashable zip of my current system with this via my device only... Motorola RAZR M stock deodexed 4.4.2... Thank you kindly for your time
[Android Software/Hacking General [Developers Only]] :
Yes
[Android Software/Hacking General [Developers Only]] ezknives:
I apologize for the bother but could one provide a touch of assistance... Thank you kindly

Edit...

Do I need to run the full ( ./romgen device device2 system data cache boot out_zip) then specify like ( ./romgen device (name of device) device2 (name of device) system (where its at) data (where its at) cache (where its at) boot (where its at) out_zip (where its going)? Again thank you kindly for your time
[Android Software/Hacking General [Developers Only]] :
[MENTION=5359863]ezknives[/MENTION], I would assist but his script is formatted in a language I can't read and he doesn't wish to release the source, so personally, I am not fully aware as to how or what the script actually does behind the scenes. You would need to reach out to the developer.
[Android Software/Hacking General [Developers Only]] ezknives:
OK... I'll give it another shot... I'll restore an unmodified nandroid and attempt it... I'll post screens and tag op if it fails again
[Android Software/Hacking General [Developers Only]] SaeedFazlollahzadeh:
Still has the problem
[Android Software/Hacking General [Developers Only]] ezknives:
Try simply placing the contents of the zip in the tmp then chmod 755 /romgen then ./romgen.... But idk
[Android Software/Hacking General [Developers Only]] SaeedFazlollahzadeh:
What's IDK?
[Android Software/Hacking General [Developers Only]] ezknives:
Idk = I don't know... When you get there I just typed ./romgen xt907 <-- as that's what my device is... But...
[Android Software/Hacking General [Developers Only]] SaeedFazlollahzadeh:
Still error

I think I should leave it and give up
[Android Software/Hacking General [Developers Only]] ezknives:
OK... You set the permissions for it in the first screen... No need to chmod again... And your already in the folder... Su has been granted...I believe at this point if you still have that same window open just ./romgen (name of your device) ... If you don't have that window open.... Su then CD data/local/temp then ./romgen (name of your device)... But again I'm not sure
[Android Software/Hacking General [Developers Only]] SaeedFazlollahzadeh:
And still the same error

I'm running on 4.4.4, there's no problem?

I think maybe that's the problem
[Android Software/Hacking General [Developers Only]] munjeni:
You guys not using romgen correctly! See how it working here -> http://xdaforums.com/showthread.php?t=2662941 ...just example! You need to find right path to the your block device since many of the phones not use the same DEV path, you need to consult experienced users to give you info about system,data,cache,boot dev path on your phone if you don't know what it is! Allso apending -h parameter to romgen (./romgen -h) will give you help screen about usage! Hope info is enought and hope this help! DO not send me pm related to romgen, please!
[Android Software/Hacking General [Developers Only]] munjeni:
I can see you have xperia z1? Here is romgen usage for your phone, read them -> http://xdaforums.com/showthread.php?t=2662941 ...just simple folow instructions, enter these commands and you are done for sure!
[Android Software/Hacking General [Developers Only]] ezknives:
I know the path of where everything is how do I tell it where to get it from... No mater what I put in it tells me -h for help... Or..
[Android Software/Hacking General [Developers Only]] munjeni:
For help screen enter:

./romgen -h

Its happening since you not pass ALL NEEDED parameters to romgen!
[Android Software/Hacking General [Developers Only]] ezknives:
OK thank you kindly for your time I apologize for bothering... I'm not understanding how to provide it with the needed parameters... So I'll just leave it alone I guess...
[Android Software/Hacking General [Developers Only]] munjeni:
You need few informations before you begin! You can see all these info if you open updater-script of the an rom for your phone!

Example info you need:

1. device model (for example amami).

2. device model number (for example D5503)

3. device path for system partition (/dev/block/mmcblk0pXXX???

4. device path for data partition (/dev/block/mmcblk0pXXX???

5. device path for cache partition (/dev/block/mmcblk0pXXX???

6. device path for boot partition (/dev/block/mmcblk0pXXX???

7. path to the external or internal storage where your zip will be stored (for example /storage/sdcard1/rom.zip)

When you collect all the info than you can beging with this for example:

./romgen amami D5503 /dev/block/mmcblk0pXX /dev/block/mmcblk0pXX /dev/block/mmcblk0pXX /dev/block/mmcblk0pXX /storage/sdcard1/rom.zip

When all parameters is right passed to romgen, romgen will start generating your zip package.
[Android Software/Hacking General [Developers Only]] SaeedFazlollahzadeh:
There are a lot of mmcbll0p files with different numbers

I should write for example 10 for all, or choose different numbers?

---------- Post added at 01:42 PM ---------- Previous post was at 01:28 PM ----------

That's it

But …

Where did I wrong?

---------- Post added at 01:55 PM ---------- Previous post was at 01:42 PM ----------

It's now going

And for example, if I wanna use it, I should install it in recovery?

---------- Post added at 01:55 PM ---------- Previous post was at 01:55 PM ----------

It's now going

And for example, if I wanna use it, I should install it in recovery?
[Android Software/Hacking General [Developers Only]] :
You need to UNZIP THE ZIP FILE. Inside the ZIP FILE will be another file called romgen. Grab that file and place it at /data/loca/tmp.

Now, change it's permission to ONLY THAT FILE.
[Android Software/Hacking General [Developers Only]] SaeedFazlollahzadeh:
Now it made flashable file

To use it, I should install it in recovery?
[Android Software/Hacking General [Developers Only]] :
All those mmcblk with the bunch of numbers are YOUR PARTITIONS. Don't just start writing to any of them. Each one has a specific purpose. One is your system partition, the other your data, and so on. You guys really shouldnt be messing around with your phone's like this if you are not getting it. I would hold on to the romgen file for now and continue to learn the very basics of android first. Otherwise, you two are going to do something that will wreck your device.
[Android Software/Hacking General [Developers Only]] SaeedFazlollahzadeh:
I don't know. I used the same numbers as there were in the help

Now file is ready
[Android Software/Hacking General [Developers Only]] :
Don't flash that zip. What you saw in the help were only examples. You need to find out what they are for your device specifically. They are different across other devices.

---------- Post added at 06:54 AM ---------- Previous post was at 06:53 AM ----------

For example, my device, it would be, /dev/block/mmcblk0p25 for the system. For you it would be something else.

---------- Post added at 06:55 AM ---------- Previous post was at 06:54 AM ----------

type and enter, cat /proc/emmc

See if that brings up a list on your terminal. If it does it will show you what yours are.
[Android Software/Hacking General [Developers Only]] SaeedFazlollahzadeh:
But how can I use it? It isn't useless, is it?
[Android Software/Hacking General [Developers Only]] :
Unless you can confirm that the partitions you selected are the correct partitions then yes, that zip you made is useless.

Do what I said before. Type and enter, cat /proc/emmc

That should show you a list of your partitions and which one is which. Use that list in regards to romgen.
[Android Software/Hacking General [Developers Only]] :
cat /proc/emmc

copy and paste that....
[Android Software/Hacking General [Developers Only]] munjeni:
OMG :) [MENTION=5845992]SaeedFazlollahzadeh[/MENTION] I sugesting to you to learn basic linux commands before you hard brick your phone! DO IN MIND If you dump wrong partition and install them to the wrong one (for example to the ta partition lol) your phone will be hard bricked (DEAD)!!! I sugest you to lern carefully xda stuf because probably you will brick your phone very soon with your short and fast tests, your short tests probably will get fatal very soon! Think about that!
[Android Software/Hacking General [Developers Only]] munjeni:
[MENTION=5845992]SaeedFazlollahzadeh[/MENTION] ...At least did you read this -> http://xdaforums.com/showthread.php?t=2662941 ??? On these link you can see right command for your phone Z1 !!!
[Android Software/Hacking General [Developers Only]] SaeedFazlollahzadeh:
I just write them in Terminal Emulator?

I think if we go further , my brain will have error 501
[Android Software/Hacking General [Developers Only]] munjeni:
Did you see terminal emulator on my post? :cyclops: You can try but since I not tested I can not let you know.
[Android Software/Hacking General [Developers Only]] SaeedFazlollahzadeh:
I thought it was easier, but I give up now

Thanks buddy

Wish you best
[Android Software/Hacking General [Developers Only]] :
Hold on to the romgen file for now bro. When you learn more about android and basic linux commands this will come to be very easy for you. This isn't hard at all. The difficulty level is "easy", but you must understand how linux works and how android works or you will be lost and possibly destroy your phone.
[Android Software/Hacking General [Developers Only]] SaeedFazlollahzadeh:
Ok thanks

But I think it's hard for me as beginner because my mother tongue is not English

I should learn its basics in my own language
[Android Software/Hacking General [Developers Only]] ezknives:
Works good great work... I was gonna go through the files make sure everything thing was there and read the update script make sure it looks good before flashing but get the error show in screen... I used

ls -al /dev/block/platform/msm_sdcc.1/by-name

to get the path if that's relevant... should I be concerned about it...
[Android Software/Hacking General [Developers Only]] munjeni:
Thats not possible to have these error in zip, probably compresion manager you have installed have a bug! You can open with an archive manager on your pc to see if that is realy zip related!

And one more... are you sure you have /dev/block/platform/msm_sdcc.1/by-name... ?? I sugest you to look into an working updater-script to get all partitions path related to your phone! On xperia z1c its /dev/block/platform/msm_sdcc.1/by-name but some phones use /dev/block/mmcblk0pxxxx.. so make sure you chose and find right path before you proced.
[Android Software/Hacking General [Developers Only]] ezknives:
Pretty certain here and command

./romgen RAZRM XT907 /dev/block/mmcblk0p36 /dev/block/mmcblk0p38 /dev/block/mmcblk0p35 /dev/block/mmcblk0p31 /storage/sdcard1/rom.zip

I don't have access to a PC... Do all my apk modifying and what not directly from mobile...