Hello xda..I have been working on a custom rom based on 6.0.1 from the past few days and want to integrate xposed framework, supersu and some other mods in it but all are flashable zip files. My question here is how do you actually integrate the contents of .zip files in rom instead of manually flashing the file through recovery? I am looking forward for to your answer guys. Thank you
Fix:
Code:
package_extract_dir("root", "/tmp");
run_program("/sbin/busybox", "unzip", "/tmp/supersu/supersu.zip", "META-INF/com/google/android/*", "-d", "/tmp/supersu");
run_program("/sbin/busybox", "sh", "/tmp/supersu/META-INF/com/google/android/update-binary", "dummy", "1", "/tmp/supersu/supersu.zip");
Add that to your updater script. Make a folder in the root of your zip (where u have system, metainf folder and boot.img) called "root" inside that folder make another called "supersu" inside that folder put SuperSu zip in it and rename the zip to "supersu"
For xposed or other zips just do the same thing.
Replace supersu with the name of the zip... Another alternative would be to use AROMA installer.
Solved
Fix found guys. Thanks to my developer friend ShinySide..
KingRaheel said:
Hello xda..I have been working on a custom rom based on 6.0.1 from the past few days and want to integrate xposed framework, supersu and some other mods in it but all are flashable zip files. My question here is how do you actually integrate the contents of .zip files in rom instead of manually flashing the file through recovery? I am looking forward for to your answer guys. Thank you
Fix:
Code:
package_extract_dir("root", "/tmp");
run_program("/sbin/busybox", "unzip", "/tmp/supersu/supersu.zip", "META-INF/com/google/android/*", "-d", "/tmp/supersu");
run_program("/sbin/busybox", "sh", "/tmp/supersu/META-INF/com/google/android/update-binary", "dummy", "1", "/tmp/supersu/supersu.zip");
Add that to your updater script. Make a folder in the root of your zip (where u have system, metainf folder and boot.img) called "root" inside that folder make another called "supersu" inside that folder put SuperSu zip in it and rename the zip to "supersu"
For xposed or other zips just do the same thing.
Replace supersu with the name of the zip... Another alternative would be to use AROMA installer.
Click to expand...
Click to collapse
This works well for zips where the updater-script is dummy.....
what about the zips like A-Gapps and Arya-Sound mod...where their is a actual working updater-script....
this code doesn't work in this situation....
Related
Hey - I'm looking for a stock, unrooted image of the original BN software. I'd like to restore the image via CWM as mine is screwed up with GApps - a factory reset does not get rid of it.
Thanks!
Just for the gapps there is no need to flash images. btw you don't mention for what model if 8GB or 16GB.
Here's a trick that might work... the gapps zip (most of well done zips) contains a script named updater-script within META-INF >> com >> google >> android >> updater-script which contains the following code:
* Uncompress the gapps zip e.g: gapps-gb-20110828-signed.zip in another folder to get access to updater-script file
ui_print("GApps 20110828");
ui_print(" For Android 2.3.5");
ui_print("Mounting system...");
run_program("/sbin/busybox", "mount", "/system");
show_progress(1, 15);
ui_print("Deleting old APKs...");
delete("/system/app/Books.apk",
"/system/app/BooksPhone.apk",
"/system/app/CarHomeLauncher.apk",
"/system/app/CarHomeGoogle.apk",
"/system/app/FOTAKill.apk",
"/system/app/GenieWidget.apk",
"/system/app/Gmail.apk",
"/system/app/GoogleBackupTransport.apk",
"/system/app/GoogleCalendarSyncAdapter.apk",
"/system/app/GoogleContactsSyncAdapter.apk",
"/system/app/GoogleFeedback.apk",
"/system/app/GooglePartnerSetup.apk",
"/system/app/GoogleQuickSearchBox.apk",
"/system/app/GoogleServicesFramework.apk",
"/system/app/googlevoice.apk",
"/system/app/kickback.apk",
"/system/app/LatinImeTutorial.apk",
"/system/app/Maps.apk",
"/system/app/MarketUpdater.apk",
"/system/app/MediaUploader.apk",
"/system/app/NetworkLocation.apk",
"/system/app/OneTimeInitializer.apk",
"/system/app/SetupWizard.apk",
"/system/app/Provision.apk",
"/system/app/QuickSearchBox.apk",
"/system/app/soundback.apk",
"/system/app/Street.apk",
"/system/app/Talk.apk",
"/system/app/Talk2.apk",
"/system/app/talkback.apk",
"/system/app/Vending.apk",
"/system/app/VoiceSearch.apk",
"/system/app/YouTube.apk",
"/system/etc/permissions/com.google.android.maps.xml",
"/system/etc/permissions/features.xml",
"/system/framework/com.google.android.maps.jar",
"/system/lib/libmicrobes_jni.so",
"/system/lib/libtalk_jni.so",
"/system/lib/libvoicesearch.so");
ui_print("Copying new APKs...");
package_extract_dir("system", "/system");
ui_print("Unmounting system...");
run_program("/sbin/busybox", "umount", "/system");
ui_print("Installation complete!");
Click to expand...
Click to collapse
You could modify it with Notepad or Notepad++(Highly recommended) and for example remove the line "/system/app/YouTube.apk", if you have it installed and don't want the script "delete" it because it is under ui_print("Deleting old APKs..."); section so it will delete all the apps stated after that piece of code.
Then you could remove this part:
ui_print("Copying new APKs...");
package_extract_dir("system", "/system");
Click to expand...
Click to collapse
Because you are modifying the code to be your uninstaller so no apk's will be installed. Once done save changes and replace the original file with your modified by drag and dropping it while you have gapps-gb-20110828-signed.zip opened with WinRAR or 7ZIP.
One more and obvious thing is that you must delete the system folder of the gapps-gb-20110828-signed.zip file or leave the system folder empty (probably is better to keep system folder but empty)
~ Veronica
Sent from XDA premium using my Nook Tablet
lavero.burgos said:
Just for the gapps there is no need to flash images. btw you don't mention for what model if 8GB or 16GB.
Here's a trick that might work... the gapps zip (most of well done zips) contains a script named updater-script within ....
I'LL CONTINUE THIS POST SOON
~ Veronica
Sent from XDA premium using my Nook Tablet
Click to expand...
Click to collapse
I think I fixed the issue, but I'd like to see the rest of your post
PS - 16GB
[EDIT] Ok, I totally fixed it thanks to a couple of users! Here's what I did:
I used cobrato's 1.4.1 zip which I flashed via CWM - this got rid of the Google Setup Wizard, but added extras I did not want. Then I used Indirects One Click Unroot, which performed a factory software install. So now I'm back to 1.4.2 and COMPLETELY stock.
Time to back up this image! That being said, I would sure help some folks if we had totally stock, unrooted images that can be installed via CWM.
Finished my post...
~ Veronica
Hello XDA people,
I'm trying to make a zip file which can be flashed through CWM. The zip file will include:
Code:
a batch of apps in the /system/app folder
The purpose of this zip is to quick install a bunch of apps after installing a new rom.
I'm guessing that simply drag dropping a bunch of apps inside the system/app zip folder will be enough, right?
The problem is that i don't have a dummy flashable zip file to work with. Can someone please help with this?
ps: i've tried app2zip from market, it doesn't work on s5360
its easy,but system partition have a size limit
i've tried making it but keep getting a "status 0 aborted" error.
What is the system size limit?
Will it help if i delete some big apps from system like maps and swype? I already have almost 50mb free on sys partition.
Can you give me the dummy file to test. preferably both for /data/app and /system/app
broadways said:
Hello XDA people,
I'm trying to make a zip file which can be flashed through CWM. The zip file will include:
Code:
a batch of apps in the /system/app folder
The purpose of this zip is to quick install a bunch of apps after installing a new rom.
I'm guessing that simply drag dropping a bunch of apps inside the system/app zip folder will be enough, right?
The problem is that i don't have a dummy flashable zip file to work with. Can someone please help with this?
ps: i've tried app2zip from market, it doesn't work on s5360
Click to expand...
Click to collapse
you need to sign the zip via zip signer (search in themes and apps) and write an updator script (google it)
i dont think size matters much because many rom zips contain only a /system folder
system folder has only 1limitation
the total memory is 222 mb so be carefull about that
your apps should not exceed this size
I got it working... Here is the code for anyone who needs it... found @ META-INF\com\google\android\updater-script file
Code:
ui_print("Partitions mount");
#Properly unmounting to avoid issues
run_program("/sbin/busybox", "umount", "/system");
run_program("/sbin/busybox", "umount", "/cache");
run_program("/sbin/busybox", "umount", "/data");
#Then mounting
run_program("/sbin/busybox", "mount", "/system");
run_program("/sbin/busybox", "mount", "/cache");
run_program("/sbin/busybox", "mount", "/data");
ui_print("System folder application installation");
package_extract_dir("system", "/system");
ui_print("Unmounting partitions");
run_program("/sbin/busybox", "umount", "/system");
run_program("/sbin/busybox", "umount", "/cache");
run_program("/sbin/busybox", "umount", "/data");
ui_print("Finish");
With this code, anyone can load multiple apps from flash in 5 seconds.
There's another problem. While installing apps @ system/app works fine with the above script, a different script for installing apps @ data/app doesn't work at all. I have created a thread for this issue at the following link below:
http://forum.xda-developers.com/showthread.php?p=35698853
broadways said:
Hello XDA people,
I'm trying to make a zip file which can be flashed through CWM. The zip file will include:
Code:
a batch of apps in the /system/app folder
The purpose of this zip is to quick install a bunch of apps after installing a new rom.
I'm guessing that simply drag dropping a bunch of apps inside the system/app zip folder will be enough, right?
The problem is that i don't have a dummy flashable zip file to work with. Can someone please help with this?
ps: i've tried app2zip from market, it doesn't work on s5360
Click to expand...
Click to collapse
I think its better to make a backup using CWM and restore only data.
copy the zip from my signature (stock deadexed)
its for flashing bunch of apps to our device
.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ sent using busybox command via Cytherea phone ~
Spoiler
LESSON 1: dont ask for ETA's, the mod-wanna-be-guy will report it
---------- Post added at 02:24 PM ---------- Previous post was at 02:23 PM ----------
add or delete any apps from app folder..
dont forget to delete framework folder as u not need it..
.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ sent using busybox command via Cytherea phone ~
Spoiler
LESSON 1: dont ask for ETA's, the mod-wanna-be-guy will report it
Hello guys! Hope you can help me with this.
I want to include some apps in my rom, but this app CANT be in the normal /system/app I want that they install as usar app every time i flash. It upose -i read it- that i should create a folder called "data" in the Root of my ROM. So i will have 3 folders: /META-INF/ /system/ and /data/
Along with this i have to edit with notepad++ the updater-script in the directory META-INF\com\google\android and add just below the line package_extract_dir("system", "/system"); the following:
format("yaffs2", "MTD", "userdata");
mount("yaffs2", "MTD", "userdata", "/data");
package_extract_dir("data", "/data");
set_perm(1000, 1000, 0771, "/data");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
And save the file. So i just have to put the .apk files in the /data/ and they will appear like *****in' magic every time i flash... But no, is not working .
Where is the error or what is the right wat to do it? Thanks
And yeah, english is not my native language
mauriciognr said:
Hello guys! Hope you can help me with this.
I want to include some apps in my rom, but this app CANT be in the normal /system/app I want that they install as usar app every time i flash. It upose -i read it- that i should create a folder called "data" in the Root of my ROM. So i will have 3 folders: /META-INF/ /system/ and /data/
Along with this i have to edit with notepad++ the updater-script in the directory META-INF\com\google\android and add just below the line package_extract_dir("system", "/system"); the following:
format("yaffs2", "MTD", "userdata");
mount("yaffs2", "MTD", "userdata", "/data");
package_extract_dir("data", "/data");
set_perm(1000, 1000, 0771, "/data");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
And save the file. So i just have to put the .apk files in the /data/ and they will appear like *****in' magic every time i flash... But no, is not working .
Where is the error or what is the right wat to do it? Thanks
And yeah, english is not my native language
Click to expand...
Click to collapse
If you want the app to be a system app, have you tried extracting the library files in the .apk? Open the .apk using WinRAR (an .apk is real
y like a .zip file) and open the folder 'lib' (if there is one). The folder within should be called something like 'armv7a' or 'armv6'. If your device is an ARMv6 device (search it up) the app may be incompatible with your device if there is no matching 'armv6' folder. If there is, open the folder and extract the .so file(s) and put them under /system/lib/ on your device, either with a root file browser, or with a .zip via CWM, Anyways, what app are you trying to install
?
Codename13 said:
If you want the app to be a system app, have you tried extracting the library files in the .apk? Open the .apk using WinRAR (an .apk is real
y like a .zip file) and open the folder 'lib' (if there is one). The folder within should be called something like 'armv7a' or 'armv6'. If your device is an ARMv6 device (search it up) the app may be incompatible with your device if there is no matching 'armv6' folder. If there is, open the folder and extract the .so file(s) and put them under /system/lib/ on your device, either with a root file browser, or with a .zip via CWM, Anyways, what app are you trying to install
?
Click to expand...
Click to collapse
Thanks for reply, but I already know that and already did it. Due to my phone have REALLY little rom memory. So my dream was to allow some apps to be instaled along with the rom.zip but as a user app. Im sick and tired already have almost a week like 6 hours day making my mod of a rom and now that is ready and sexy i cant "transfer the data folder from de rom.zip to data. Thanks for replay.
Have you looked into dsixda's kitchen? It will load your ROM and add in the bits needed to do what you want. The only downside is it isn't really updated anymore. You could also find a mod that flashes user apps in your phone's respective forum, then open it up and look at the updater-script.
Sent from a Toasted Devil
netwokz said:
Have you looked into dsixda's kitchen? It will load your ROM and add in the bits needed to do what you want. The only downside is it isn't really updated anymore. You could also find a mod that flashes user apps in your phone's respective forum, then open it up and look at the updater-script.
Click to expand...
Click to collapse
Now here I am with identical problem. In my case,
A. There is no forum with other mods for the TV Stick I am coding.
B. Dxixda's Kitchen chocked up with the AMLOGIC Kernel and refused to help further.
So here's my problem that, I have been breaking my head on this for a week now.
I have a TV Stick with android ICS 4.0.4, and has "yafss2" format. I have attached the mountpoint info, partition info and my updater script.
I am trying to mount the /Data Partition so that I can copy a test APK to /Data/App folder for now. Eventually I need to copy other stuff like app data to /data/data.
Although edify script requires the format
mount(type, device, mountpoint);
I need to do
mount("yafss2","MTD", "/dev/block/mtdblock7", "/data");
for some reason, otherwise the AMLOGIC Recovery gives error of missing parameter.
Anyway, even after following that format, its not working.
The subsequent "package_extract_dir" operation is not successful and I can see the files are not getting copied.
I'd dearly appreciate any pointers and advice.
may be you should set the permission on the /data instead of on the /system/app in you updater script.
hope this can help....
tepar said:
may be you should set the permission on the /data instead of on the /system/app in you updater script.
hope this can help....
Click to expand...
Click to collapse
I should have commented out that statement. I realized it after I posted. No it doesn't really matter anyway. The files didn't get copied to there's no permissions to set.
So guys, this is is my 1st thread in xda...Don't know exactly where to post....so sorry if i broke any rule.
please don't delete this...
My question is how to integrate normal flashable zips inside a ROM zip...
I mean the zip in which the updater-script is not dummy
There are some zips available like A-GAPPS 6.0 and AryaSoundMod in which updater-binary is not a actual file...
the main codes are written in updater-script. So how to call this file within main updater-script file so that it get flashed.
Code:
run_program("/sbin/busybox", "unzip", "/tmp/magisk/magisk.zip", "META-INF/com/google/android/*", "-d", "/tmp/magisk");
run_program("/sbin/sh", "/tmp/magisk/META-INF/com/google/android/update-binary", "dummy", "1", "/tmp/magisk/magisk.zip");
We use such line for flashing updater-binary files...
What command should be given for updater-script ???
Please help Devs.
Hello community!
I was wondering if anybody can help me integrate GAPPS in a ROM.
Some ROMS have them inbuilt and don't require a seperate GAPPS installation.
So yeah, is it possible and if yes, what is the procedure?
Device is Note 8 (N950F).
ROM I'm working on currently is stock based but debloated.
Thanks in advance!
SaadatM said:
Hello community!
I was wondering if anybody can help me integrate GAPPS in a ROM.
Some ROMS have them inbuilt and don't require a seperate GAPPS installation.
So yeah, is it possible and if yes, what is the procedure?
Device is Note 8 (N950F).
ROM I'm working on currently is stock based but debloated.
Thanks in advance!
Click to expand...
Click to collapse
Hi ....
first flash gapps after flashing your stock debloated rom and after booting find what apps and files are added by using sort options according to time desending in any file manager like mix and include those files in the same folders in your stock rom........Thats it......
Note: You dont have to update your update-script afterwards.....
Hope this helps
Add this code in the end of your updater script and rename your gapps file to gapps and place it inside your meta-inf folder
Code:
ui_print("Installing GAPPS...");
package_extract_dir("META-INF/gapps", "/tmp/install/bin/gapps");
run_program("/sbin/busybox", "unzip", "/tmp/install/bin/gapps/gapps.zip", "META-INF/com/google/android/*", "-d", "/tmp/install/bin/gapps");
run_program("/sbin/busybox", "sh", "/tmp/install/bin/gapps/META-INF/com/google/android/update-binary", "dummy", "1", "/tmp/install/bin/gapps/gapps.zip");
Trex2017 said:
Add this code in the end of your updater script and rename your gapps file to gapps and place it inside your meta-inf folder
Code:
ui_print("Installing GAPPS...");
package_extract_dir("META-INF/gapps", "/tmp/install/bin/gapps");
run_program("/sbin/busybox", "unzip", "/tmp/install/bin/gapps/gapps.zip", "META-INF/com/google/android/*", "-d", "/tmp/install/bin/gapps");
run_program("/sbin/busybox", "sh", "/tmp/install/bin/gapps/META-INF/com/google/android/update-binary", "dummy", "1", "/tmp/install/bin/gapps/gapps.zip");
Click to expand...
Click to collapse
Thanks, exactly what I was looking for!
Trex2017 said:
Add this code in the end of your updater script and rename your gapps file to gapps and place it inside your meta-inf folder
Code:
ui_print("Installing GAPPS...");
package_extract_dir("META-INF/gapps", "/tmp/install/bin/gapps");
run_program("/sbin/busybox", "unzip", "/tmp/install/bin/gapps/gapps.zip", "META-INF/com/google/android/*", "-d", "/tmp/install/bin/gapps");
run_program("/sbin/busybox", "sh", "/tmp/install/bin/gapps/META-INF/com/google/android/update-binary", "dummy", "1", "/tmp/install/bin/gapps/gapps.zip");
Click to expand...
Click to collapse
Hi, I would like to ask putting gapps-config in the same meta-inf folder will work or not??
MrMoon said:
Hi, I would like to ask putting gapps-config in the same meta-inf folder will work or not??
Click to expand...
Click to collapse
yes , but you have to grep and change all paths to the cnfg file i other files
Can you tell me how you add play store in ROM while editing. I want to do this all step in Android Oreo 8.1 Please help me.
Zip file is corrupt error pops up when I try flashing.
Didn't work
Little more help, please.
Trex2017 said:
Add this code in the end of your updater script and rename your gapps file to gapps and place it inside your meta-inf folder
Code:
ui_print("Installing GAPPS...");
package_extract_dir("META-INF/gapps", "/tmp/install/bin/gapps");
run_program("/sbin/busybox", "unzip", "/tmp/install/bin/gapps/gapps.zip", "META-INF/com/google/android/*", "-d", "/tmp/install/bin/gapps");
run_program("/sbin/busybox", "sh", "/tmp/install/bin/gapps/META-INF/com/google/android/update-binary", "dummy", "1", "/tmp/install/bin/gapps/gapps.zip");
Click to expand...
Click to collapse
hey there pal, I have unpacked the whole ROM package and then I've replaced all the stock apks with the google ones. But once I repack and I install the zip, Android Setup crashes.
I'm on Android 11. Any help?
I would really appreciate it.