Zipalign script for Stock Roms P500 - Optimus One, P500, V General

Zipalign apks of Stock Roms by using following steps:
Thanks to Senab for the Zip file
Steps:
1. Download the zip file from the following post
http://forum.xda-developers.com/showthread.php?t=594615
2. Extract the file
3. Rename "zipalign_apks" file as "zipalign_apks.sh" and past it into your "/system" folder using root explorer
4. Then put Zipalign file to "/system/bin" folder using root explorer
5. Get the Scripmanager from Market and navigate to "/system" folder, run the zipalign_apks.sh file as root
6.Done
7. My log shows AIME.apk is zipaligned rest all other apps are already zipaligned

knzo's init.d script with zipalign binary is a lot simpler IMO.

Using ROM toolbox does the same thing...

Agreed, one advantage I found here is we can edit the script to zipalign "/system/app" folder applications, once zipaligned then we can remove all these files and save useful memory. It is not required to run zipalign on every boot. Also now new market apps have already been zipaligned hence it is a one time process IMO.

i believe most if not all apps are zipaligned.
anyway i run the steps as in OP
and pretty surprise to see below apps are not yet zip-aligned...
com.tf.thinkdroid.amarket-1.apk
com.mactiontech.X5EA-1.apk
com.cootek.smartinputv5-1.apk
com.cootek.smartinputv5.language.chs-1.apk

sweetpotatoz said:
i believe most if not all apps are zipaligned.
anyway i run the steps as in OP
and pretty surprise to see below apps are not yet zip-aligned...
com.tf.thinkdroid.amarket-1.apk
com.mactiontech.X5EA-1.apk
com.cootek.smartinputv5-1.apk
com.cootek.smartinputv5.language.chs-1.apk
Click to expand...
Click to collapse
1. Can You please post the log file in the "/data" folder.
2. Also, in the script change the "/data/app" to "system/app" and run the script again, you will find that now system files are being zip aligned.
3. I will try this on my P500 and get back to you with my findings.Thanks

Related

[Q] How to make an x-recovery zip off my rom

I searched the forum but i cannot find the answer.
I would like to make an xrecovery zip file off the rom i use.
Is this possible and how.
Thanks.
You can create a nandroid backup instead using Backup and Restore in xRecovery
Titanium Backup for single files.
You can also grab the files that you need to push as an update via Titanium backup. It creates an update.zip with a few files inside that you can extract to another phone if you like...
Nandroid backups are made with xRecovery for the Xperia models. It will give you three files and a checksum file, these can be added to a zip file if you like and restored using xRecovery.
I've found a good article on XDA located here on the subject. It's not specific to the X10 or Xperia models but you might find it worth reading
benz0076 said:
I searched the forum but i cannot find the answer.
I would like to make an xrecovery zip file off the rom i use.
Is this possible and how.
Thanks.
Click to expand...
Click to collapse
I'm not a Dev but this is what I'd do if I wanted to make an update zip of the changes I've made to the Rom installed on my phone. Before you try it, just remember that I could be wrong on this and if your going to create your own package, try it on your own phone before releasing it for public use.
First thing to do would be to extract the files from any ROM update package, but preferably the one that your currently installed one is based on.
If you open the zip file there will be two or more folders. One will be system and the other META-INF. If you drill down through the META-INF folder to the bottom of the folder structure you'll find a file called "update-script" This is the script that XRecovery uses when it updates your phone and you can easily read what's being done.
Eg:
Code:
format DATA:
format CACHE:
format SYSTEM:
copy_dir PACKAGE:system SYSTEM:
And it would continue on with more after that.
The script is formating the Data, Cache, and system partitions on the phone in preparation for installing the new Firmware. It is then copying the contents of the System folder included in the package to the system partition on the phone. The rest after that is setting up symbolic links and setting directory permissions.
If you use ADB to pull the /system folder from you phone, that would be the equivalent of the system folder that is included in the update package.
Code:
md system
adb pull /system system
You could, if you wanted, just replace the system folder in the update package zip with the system folder that you just pulled from your phone and you would have a packaged ROM.
If you wanted to include apps in the package that are not in the /system/app folder you would need to pull the apps that you wanted to include from the /data/app
Code:
md data\app
adb pull /data/app data\app
You would then add the data folder to the rom package so that you would then have three folder instead of two.
data
META-INF
system
After that change the the beginning of the update-script file to look something like this
Code:
format DATA:
format CACHE:
format SYSTEM:
copy_dir PACKAGE:system SYSTEM:
copy_dir PACKAGE:data DATA:
After your all done use something like 7zip to zip everything back up using no compression "Store Only" and you should have a XRecovery installable ROM.
NOTE:
If you have paid apps and are making this ROM for anybody other than yourself to use, make damn sure that you remove them from the /data/app folder before zipping everything up into a package. Including paid apps in your ROM is Warez and won't be tolerated anywhere.
GreatBigDog said:
I'm not a Dev but this is what I'd do if I wanted to make an update zip of the changes I've made to the Rom installed on my phone. Before you try it, just remember that I could be wrong on this and if your going to create your own package, try it on your own phone before releasing it for public use.
First thing to do would be to extract the files from any ROM update package, but preferably the one that your currently installed one is based on.
If you open the zip file there will be two or more folders. One will be system and the other META-INF. If you drill down through the META-INF folder to the bottom of the folder structure you'll find a file called "update-script" This is the script that XRecovery uses when it updates your phone and you can easily read what's being done.
Eg:
Code:
format DATA:
format CACHE:
format SYSTEM:
copy_dir PACKAGE:system SYSTEM:
And it would continue on with more after that.
The script is formating the Data, Cache, and system partitions on the phone in preparation for installing the new Firmware. It is then copying the contents of the System folder included in the package to the system partition on the phone. The rest after that is setting up symbolic links and setting directory permissions.
If you use ADB to pull the /system folder from you phone, that would be the equivalent of the system folder that is included in the update package.
Code:
md system
adb pull /system system
You could, if you wanted, just replace the system folder in the update package zip with the system folder that you just pulled from your phone and you would have a packaged ROM.
If you wanted to include apps in the package that are not in the /system/app folder you would need to pull the apps that you wanted to include from the /data/app
Code:
md data\app
adb pull /data/app data\app
You would then add the data folder to the rom package so that you would then have three folder instead of two.
data
META-INF
system
After that change the the beginning of the update-script file to look something like this
Code:
format DATA:
format CACHE:
format SYSTEM:
copy_dir PACKAGE:system SYSTEM:
copy_dir PACKAGE:data DATA:
After your all done use something like 7zip to zip everything back up using no compression "Store Only" and you should have a XRecovery installable ROM.
NOTE:
If you have paid apps and are making this ROM for anybody other than yourself to use, make damn sure that you remove them from the /data/app folder before zipping everything up into a package. Including paid apps in your ROM is Warez and won't be tolerated anywhere.
Click to expand...
Click to collapse
Thanks i am going to try this and will let you know if it works..
Sent from my X10i using XDA App
Zip for xrecovery
I have some modified .png files for a theme and I need to make a zip for xrecovery, can someone explain IN DETAIL PLZ, on how to do this. this is what i think im supposed to do so far. change .apk to .zip, use 7zip edit files inside, change zip back to apk? thats about where i get lost
CAYCE_VII said:
I have some modified .png files for a theme and I need to make a zip for xrecovery, can someone explain IN DETAIL PLZ, on how to do this. this is what i think im supposed to do so far. change .apk to .zip, use 7zip edit files inside, change zip back to apk? thats about where i get lost
Click to expand...
Click to collapse
Follow this thread... http://forum.xda-developers.com/showthread.php?t=714288

Zipalign script question

I want to add a zipalign script to my rooted odex stock rom KK2, I've got the script that most custom roms seem to use 'S70zipalign'.
Am hoping I don't get shot down in flames for this but is it just a matter of having busy box installed and putting the script in the following folder path system/etc/init.d to get it to zipalign my apps on boot

I would like to deodex the odex system. How Can I do that? Help me pls.

I would like to deodex the Codex system. How Can I do that? 232 Stock-based update. I have the Sony Xperia z2.
This is a very compressed and short guide, but hopefully it'll help you to start (it assumes you already have your phone rooted and have recovery installed) :
1ST OF ALL : MAKE NANDROID BACKUP.
you'll need to have JAVA installed on your machine, download and install that.
- on your device, enable "usb debugging" from developer options
- connect your device to PC, click "allow" on device for usb debugging
- have adb.exe on your pc, navigate to that folder and press shift+right click in empty space in the folder, choose "open command window here"
- in the cmd window that shows up type these commands in order :
adb pull /system/app system/app/
adb pull /system/priv-app system/priv-app/
adb pull /system/framework system/framework/
adb pull /system/vendor/app system/vendor/app
adb pull /system/build.prop system/build.prop
this will get you a folder next to your adb.exe file called "system" with all the files inside
- open system/vendor/app folder and copy "ims" and "chrome customizations" to system/app folder
- open system/framework/ folder and copy "SemcGenericUxpRes" to system/app folder
download deodex tool from here : http://forum.xda-developers.com/galaxy-s5/general/tool-deodex-tool-android-l-t2972025 (if you're not sure if your system is 32 or 64, get the 32 version)
- extract SVADeodexerForArtx32.zip to your c:/ drive
- open SVADeodexerForArt.exe and browse to where your "system" folder is (same folder as adb.exe)
- check app/framework/priv-app in the program options
- click deodex
- once done, create a flashable zip file from the resulting folders (remember to move files from "app" folder back to "framework" and "vendor" folder in the same order, or you'll get FCs)
- have SuperSU and flashable NUT recovery too on sdcard
- flash deodexed zip, then flash SuperSU and NUT recovery files again
- clear cache/dalvik, reboot
This is a rough guide, basically how I do it. if you need further help, post here and I'll try to respond or someone else will help/correct me if I made a mistake.
thanks
i deodexd with SVADeodexerForArtx64.exe
after that
how to create flashble zip
and which folders will i zip?
pls tellme bro
see attached file for creating flashable zip.
you need to copy the deodexed version from the SVADeodexerForArtx64 folder (you'll find app, framework, priv-app folder there) just open the zip with winrar, drag and drop folder, do a replace (don't change any settings).
Remember to move the "SemcGenericUxpRes", "ims" and "chrome customizations" to their respective folders (framework and vendor/app) to avoid FCs
Once you do that, your deodex file is ready to flash, then after that reflash SuperSU and NUTs recovery.
thanks
thanks bro.:laugh::laugh::laugh::laugh::laugh::laugh::laugh:
it is working bro
thanks thanks
and small Dought can i use this empty zip file for future versions like android 6.0
and how to conform my lolipop5.1.1 is deodexed
One question :what does it mean nut recovery???is clockworkmod recovery right?
rameshkotibani said:
thanks bro.:laugh::laugh::laugh::laugh::laugh::laugh::laugh:
it is working bro
thanks thanks
and small Dought can i use this empty zip file for future versions like android 6.0
and how to conform my lolipop5.1.1 is deodexed
Click to expand...
Click to collapse
I'm not sure if this zip will work for Android 6.0 since it's not available to test atm. Let's wait until it's out and see then
To confirm your rom is deodexed, use a file explorer with root acces (es explorer) and navigate to /system/, then do a search for "odex" and you should not find any files.
Cris95 said:
One question :what does it mean nut recovery???is clockworkmod recovery right?
Click to expand...
Click to collapse
NUTs dual recovery is what is used on locked bootloader Z2 phones, it has both CWM and TWRP for you to choose from, just google "NUTs dual recovery Z2" or search the forums here for more details.
thank bro......
ticktock666 said:
see attached file for creating flashable zip.
you need to copy the deodexed version from the SVADeodexerForArtx64 folder (you'll find app, framework, priv-app folder there) just open the zip with winrar, drag and drop folder, do a replace (don't change any settings).
Remember to move the "SemcGenericUxpRes", "ims" and "chrome customizations" to their respective folders (framework and vendor/app) to avoid FCs
Once you do that, your deodex file is ready to flash, then after that reflash SuperSU and NUTs recovery.
Click to expand...
Click to collapse
i did all you said, but after flashing the deodex.zip with the deodexed apk´s inside i get bootloop.
Tried everything but no chance. Always bootloop - damn

Installing xposed

*******KennyG change this to how you need it, I'm just getting the knowledge out. I don't wish to steal credit or work******
Hello fellow xda members, I have used many other sites but haven't been on xda since my droid bionic days... I didn't give up on the v10, i contacted tung and here we are!
Any hoo the method was created by the 6th_Hokage for the boost stylo and it works with a little tweaking on our devices.
Follow the prerequisites from his thread http://forum.xda-developers.com/lg-g-stylo/how-to/guide-xposed-boost-stylo-5-1-1-t3192494
Here they are for quick glance
Required:
Root
Busybox installed on the device: https://play.google.com/store/apps/d....busybox&hl=en
Script Manager: https://play.google.com/store/apps/d...tmanager&hl=en
Package needed Xposed Boost Stylo.zip: https://www.androidfilehost.com/?fid=24052804347813218
Extract the stylo zip to the root of your internal storage
you should see the installer script file and the xposed zip package
download corresponding xposed zip and installer apk
(v80sdk22arm64) and (3.0 alpha 4)
rename the v80sdk22arm64.zip to the v72 found on the root of the sd from the Xposed Boost Stylo.zip
then run it following the instructions from http://forum.xda-developers.com/lg-g-stylo/how-to/guide-xposed-boost-stylo-5-1-1-t3192494 by kakashi aka the6thhokage
5- Open Script Manager and navigate to the installer file (script) and chose script, su then press save .
6- now select the same script and press run and choose the option according to what you want (Yes/No)
7- Wait for the script to finish, now go to Xposed Installer apk that you installed before and select soft reboot (it will turn off just power back on)
8- After restart and you may use Xposed properly
soft reboot and there ya go! Ill add more stuff when I get time
thanks peter muzyka
hey the errors don't hinder it and use kernel auditor to set permissive on boot. I also would like some coffee funds if you feel the need paypal [email protected]
I get this error message when I try to install
it should continue to run, make sure you renamed the xposed zip to the same name as the one in the file and have it placed on the root of your internal storage
I renamed the file and put the folder in the internal storage
As a zip not folder all on the root of the sd. I'll make a all in one after I get with romracer and 6th hokage
got it working. thanks.
@THADDIUS25
Like superdallas said, you must put the files from zip into root of internal storage. your screenshot is showing you put the files under "Xposed+Boost+Stylo V2"
Also did you download v80sdk22arm64 then renamed it? you can find download link from http://forum.xda-developers.com/showthread.php?t=3034811
Need to fix Google Play Store links =)
I just used the steps in this thread: http://forum.xda-developers.com/android/development/install-xposed-framework-to-lg-spirit-t3226809
Clearer steps by playadru182 below: http://forum.xda-developers.com/showpost.php?p=66015228&postcount=48
Also, if anyone is getting a second screen error when making calls after installing xposed. Don't forget to follow @tattedup 's tutorial on second screen fix.
http://forum.xda-developers.com/lg-v10/general/xposed-fixes-screen-t3246515
It doesn't continue to run in my case, it just shows it can't create /proc/self/fd/
Like this?
http://imgur.com/A1FbNtS
Yeah, it does exactly like that.
Make sure Busybox is installed. As in, run the the Busybox app that you downloaded from the Play Store and install it from there.
Yeah busybox isn't installing properly for some odd reason I believe. It does not run like it usually does.
It doesn't say installed when you tried installing it?
https://imgur.com/JTfuKST
It does say installed....
What fixed it for me was either installing Busybox (I forgot ^^ or using the Terminal Emulator way that I mentioned in my comment to the OP.
When I did that it said no such file or directory
When you entered "su" then "sh /sdcard/installer" in the emulator?
Unlike the OP here that says to put the files in the root folder, put it in the /sdcard folder then try it.
I put it in the folder, but still, no such file or directory.

Where do I get the latest ROM with security update to start with modding

Hi,
I have a T-Mobile S5 and I'd like to get a link to the stock ROM with latest security upgrades so that I can debloat and mod it.
Can anyone point me to some resources on how to debloat and create a custom ROM.
Is it possible to use the international ROM and flash it on the T-Mobile S5?
Thanks
1) Download the ROM
Download from sammobile.com (look for G900T, latest should be ~April 2017)
You'll need to make an account (free), and it's pretty slow, but there isn't really an option.
You might be able to grab the international version, but I haven't tried. I heard it's not compatible with some of the US locked versions, but the T-Mobile and AT&T versions were supposed to be exactly the same so they shouldn't have a problem. Also, it probably won't come with Wifi Calling.
2) Extract zip with `unzip` and then, extract the .tar.md5 with `tar -xf`
3) Download sgs2ext4.zip (google it:
forum.xda-developers.com/attachment.php?attachmentid=645192) and extract it
4) Run `java -jar sgs2ext4.jar system.ext4.img system.img` (and then do the same for cache).
5) Mount both images (`mount -o loop system.img system/` and same for cache).
6) Get `sec_csc.zip` from the cache folder and extract it.
7) Make a copy of the system/ mounted folder, chown it to yourself so that you can easily modify it later on.
8) Merge system/ folder from extracted sec_csc.zip with the system/ folder you created.
9) Copy boot.img and system/ into a new folder, let's call it build/
10) Get a copy of META-INF (update-binary is the important one) and also place it in build/
11) Use the updater-script from here: https://forum.xda-developers.com/tm...pment/odexed-development-starter-kit-t3386186 and delete everything between "Symlinking and Setting Permissions" to show_progress (aka get rid of all of the set_metadatas).
12) Generate appropriate permissions (as described here: https://forum.xda-developers.com/tm...pment/odexed-development-starter-kit-t3386186) and place them right after "Symlinking and Setting Permissions".
13) At this point, you should be able to zip everything up and install on your phone. This is a fresh full ROM with no mods and all the bloat.
14) Delete and don't forget to also remove set_metadatas that correspond to whatever you deleted or else the updater will complain that something might have failed. My old post (again: https://forum.xda-developers.com/tm...pment/odexed-development-starter-kit-t3386186) also describes a couple of simple mods you're likely to make.
Note that if you disable selinux, you might not have to deal with permissions, but I think you have to modify boot.img for that, and I don't know how to do that. (Aside: Almost all ROMs posted not by me on this forum have selinux disabled. EG: if you install them, on every boot, it will say something about kernel not being selinux enforcing.) If you need more advanced modding, you'll need to deodex. I don't know how to do that and have never needed to. You'll have to look somewhere else for guides for that.

Categories

Resources