trouble w/ cwm edify script for custom zip - Verizon Samsung Galaxy S III

not sure if this is the correct forum for this or not, this is only slightly particular to the Galaxy S III, but anyway:
I wanted to make some changes to framework-res.apk. I'd never done this before, but I was able to decompile it with both apktool and apk manager (which uses apktool i think) and changle some xml files. both programs gave me errors when recompiling, but one spit out a new apk and I decided to try it.
I used ES explorer (like an idiot) and am now bootlooping. I know i can restore a nandroid (my latest is 2-3 weeks old :/) or odin another image + use TB, but I'd rather just restore the old framework-res.apk. So, I've created an install script that should copy the old apk into place. (i took the SD card out and threw it into my PC to put the zip on there)
heres the .zip structure:
Code:
MyFlashableCWM
|
+- META-INF/
| |
| +- com/
| |
| + google/
| |
| +- android/
| |
| + update-binary
| |
| + updater-script
|
+- framework/
|
+ framework-res.apk
here is the contents of updater-script:
Code:
ui_print("");
ui_print("installing the framework-res.apk");
ui_print("");
mount("ext4", "EMMC", "/dev/block/mmcblk0p9", "/system");
package_extract_dir("framework", "/system/framework");
set_perm(0, 0, 644, "/system/framework/framework-res.apk");
unmount("/system");
ui_print("");
ui_print("boom!");
this installs fine but causes bootloop. I'm pretty sure mmcblk0p9 is the correct block. any ideas??

preusstang said:
not sure if this is the correct forum for this or not, this is only slightly particular to the Galaxy S III, but anyway:
I wanted to make some changes to framework-res.apk. I'd never done this before, but I was able to decompile it with both apktool and apk manager (which uses apktool i think) and changle some xml files. both programs gave me errors when recompiling, but one spit out a new apk and I decided to try it.
I used ES explorer (like an idiot) and am now bootlooping. I know i can restore a nandroid (my latest is 2-3 weeks old :/) or odin another image + use TB, but I'd rather just restore the old framework-res.apk. So, I've created an install script that should copy the old apk into place. (i took the SD card out and threw it into my PC to put the zip on there)
heres the .zip structure:
Code:
MyFlashableCWM
|
+- META-INF/
| |
| +- com/
| |
| + google/
| |
| +- android/
| |
| + update-binary
| |
| + updater-script
|
+- framework/
|
+ framework-res.apk
here is the contents of updater-script:
Code:
ui_print("");
ui_print("installing the framework-res.apk");
ui_print("");
mount("ext4", "EMMC", "/dev/block/mmcblk0p9", "/system");
package_extract_dir("framework", "/system/framework");
set_perm(0, 0, 644, "/system/framework/framework-res.apk");
unmount("/system");
ui_print("");
ui_print("boom!");
this installs fine but causes bootloop. I'm pretty sure mmcblk0p9 is the correct block. any ideas??
Click to expand...
Click to collapse
I would put your framework-res.apk in a system/framework folder so would be /system/framework/framework-res.apk. Then your script would just need to be
package_extract_dir("system", "/system"),
I think your script is installing a framework folder in the existing framework folder, and then you will have two framework-res.apks.
Sent from my Iconia A500 using Tapatalk 2

Related

[Resolved] [GUIDE][CWM][GPS]["GPS off-and-on" bug] without root

Hello
I use dungphp's Pyramid HTC WWE 1.35.401.1 - Real 3D [V2.2][RAF 1.9GB] ROM and was not able to change gps.conf with ES Explorer (missing root).
I will share what i've done to solve this problem for me:
1. Downloading Fix Flash player with video streaming from here
2. extracting the ZIP file
3. delete folders: sd-ext and system
4. create folders: system/etc and etc
5. create your own gps.conf.
Mine is:
NTP_SERVER=europe.pool.ntp.org
XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra.bin
XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra.bin
XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin
SUPL_HOST=supl.google.com
SUPL_PORT=7276
GPS1_CLEANUP_ENABLED=0
Click to expand...
Click to collapse
6. copy gps.conf to the folders: etc and system/etc
7. edit the file: META-INF\com\google\android\updater-script
Should look like this:
ui_print("------------------------------------------------");
ui_print(" UPDATE anythings to the builds ");
ui_print(" From DUNGPHP ");
ui_print("------------------------------------------------");
show_progress(0.500000, 0);
mount("MTD", "system", "/system");
mount("MTD", "etc", "/etc");
delete("/system/etc/gps.conf");
delete("/etc/gps.conf");
package_extract_dir("system","/system");
package_extract_dir("etc","/etc");
set_perm(1000, 1000, 0644, "/system/etc/gps.conf");
set_perm(1000, 1000, 0644, "/etc/gps.conf");
show_progress(0.000000, 0);
unmount("/system");
unmount("/etc");
ui_print("All done !");
Click to expand...
Click to collapse
8. Pack the folders META-INF, etc and system to a zip file (Fix_gps_conf.zip)
9. Copy this zip-file to your sd-card
10. Shut down your device and start CWM
11. Choose Install zip file from SD card and choose your zip
12. When done, reboot

[Q] reassemble boot.img

I am trying to reassemble a boot.img a split up from my installed ROM.
This is what i did
Split the boot.img using split_bootimg.pl
Split the ramdisk using "gunzip -c ../ramdisk.gz | cpio -i" from within an empty folder
Then reassemble the ramdisk "find . | cpio -o -H newc | gzip > ../newramdisk.gz"
Reassemble the boot.img "mkbootimg --kernel kernel --ramdisk ramdisk.gz -o newboot.img"
An no, I made no changes at all to anything. I just split, reassemble and flash the image.
When I flash this newboot.img, my phone just stops at the alpharev boot image. adb is not yet started, so can't get any logcat either.
How in "someones name" do you successfully assemble a kernel and ramdisk image? All tutorials I can find, use this method, and I have tried them with different boot.img, different ways and such and nothing works.
EDIT:
I flash it using an update.zip with the fallowing updater-script content
Code:
mount("MTD", "system", "/system");
assert(package_extract_file("boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
unmount("/system");
Figured it out. HTC Desire needs "--base 0x20000000" added to the mkbootimg command.
So new question. Is it different from each phone? Because these tutorials are not phone variant specific, they talk in general.

[CWM] BloatWare Remover V2

It took me a hour to make, a lots of restoring backup and a lot of Error 6 and stupid typo's inside the script xD (oops).
But I finnaly get a working script! :highfive:
Reminder: It is my first work here so be nice to me ​
The script is based of the one you can find here: click I have modified this completly.
This script simply removes bloatware apps.
The script:
Code:
ui_print(" Bloatware Remover Script ");
ui_print("+++++++++++++++++++++++++++");
ui_print(" prepared by ");
ui_print(" [email protected] ");
ui_print(" ");
ui_print("+++++++++++++++++++++++++++");
ui_print(" Modified by ");
ui_print(" [email protected] ");
ui_print("+++++++++++++++++++++++++++");
ui_print(" ");
ui_print("Start to remove the Bloatware");
show_progress(0.500000, 0);
ui_print(" ");
ui_print("Mounting system...");
run_program("/sbin/busybox", "mount", "/system");
ui_print(" ");
ui_print("Deleting bloatware applications...");
delete("/system/app/aldiko-standard-1.2.6.1-samsung-s1.apk");
delete("/system/app/BuddiesNow.apk");
delete("/system/app/DualClock.apk");
delete("/system/app/Dlna.apk");
delete("/system/app/Days.apk");
delete("/system/app/Exchange.apk");
delete("/system/app/FactoryTest.apk");
delete("/system/app/GenieWidget.apk");
delete("/system/app/InfoAlarm.apk");
delete("/system/app/KiesAir.apk");
delete("/system/app/lcdtest.apk");
delete("/system/app/MiniDiary.apk");
delete("/system/app/PressReader.apk");
delete("/system/app/SamsungAppsUNA3.apk");
delete("/system/app/signin.apk");
delete("/system/app/SocialHub.apk");
delete("/system/app/Stk.apk");
delete("/system/app/syncmldm.apk");
delete("/system/app/syncmlds.apk");
delete("/system/app/wssyncmlnps.apk");
delete("/system/app/MusicHub.apk");
delete("/system/app/Layar-samsung.apk");
delete("/system/app/SamsungappsUNA3.apk");
delete("/system/app/Telegraaf.apk");
delete("/system/app/thinkdroid.apk");
delete("/system/app/WriteandGo.apk");
delete("/sytem/app/YouTube.apk");
delete("/system/app/MMM_for_Smartphone.1.7.3.apk");
delete("/system/app/Talk.apk");
delete("/system/app/PlusOne.apk");
delete("/system/app/UnifiedInbox.apk");
ui_print("DONE");
ui_print(" ");
ui_print("Deleting bloatware odexfiles...");
delete("/system/app/BuddiesNow.odex");
delete("/system/app/DualClock.odex");
delete("/system/app/Dlna.odex");
delete("/system/app/Days.odex");
delete("/system/app/Exchange.odex");
delete("/system/app/FactoryTest.odex");
delete("/system/app/GenieWidget.odex");
delete("/system/app/InfoAlarm.apk");
delete("/system/app/KiesAir.odex");
delete("/system/app/lcdtest.odex");
delete("/system/app/MiniDiary.odex");
delete("/system/app/PressReader.odex");
delete("/system/app/SamsungApps.odex");
delete("/system/app/signin.odex");
delete("/system/app/SocialHub.odex");
delete("/system/app/Stk.odex");
delete("/system/app/syncmldm.odex");
delete("/system/app/syncmlds.odex");
delete("/system/app/wssyncmlnps.odex");
delete("/system/app/WriteandGo.odex");
delete("/system/app/YouTube.odex");
delete("/system/app/Talk.odex");
delete("/system/app/PlusOne.odex");
delete("/system/app/UnifiedInbox.odex");
ui_print("DONE");
ui_print("Unmounting system...");
unmount("/system");
ui_print(" ");
ui_print(" ");
ui_print("Removing complete! YAAY");
ui_print("++++++++++++++++++");
show_progress(0.900000, 0);
ui_print(" ");
ui_print(" ");
ui_print("Reboot your phone! And leave a Thanks!");
show_progress(1.000000, 0);
I am very proud of it mainly because its my first work here on XDA!!
Instructions:
- Download attachment
- Put on SD
- Reboot recovery
- Flash Bloatware remover V2
- Reboot phone
- Done
REMINDER: The touchwiz launcher of Samsung is bugged as hell so you can do three thing to prevent pointless holes in your launcher
- Perform factory reset
- Reboot phone go to settings > apps > Manage apps > all > Touchwizlauncher/TWlauncher> delete data
- Apply this mod/zip right after flashing stock rom (CWM is required so flash that after flashing stock)
You can easy mod this script by your self.
To save any app remove the lines:
Example: You want to save youtube remove these two lines:
Code:
delete("/system/app/YouTube.odex")
delete("/system/app/YouTube.apk")
If you want to add files:
Add these lines inside the script
Code:
delete("/system/app/nameofapp.odex")
delete("/system/app/nameofapp.apk")
REMINDER: The script is pretty sensitive so copy/paste the name perfect (it will either results in an error or not removed app)
Lists of apps that can be removed safely:
Link 1
Link 2
CREDITS:
XeLLaR* and Stepie22 for help inside OT thread
encik_racun for original script
Regards and leave a thanks
Edit: Thread needs to be moved by a mod (reported already)
Nice! I used it for my gaming backup and worked very good! Thanks!
Gesendet von meinem QW TB-1517 mit Tapatalk 4

[APP] Calendar 4.0.3 Recovery Flashable Zip

Ei there, i had search a lot for a Calendar flashable zip to install it on my phone, didn't find it, so i create my own
This is my first flashable zip so any advice will be welcome
You can find the zip in the attached file
The Calendar Version is: 4.0.3-eng.brandon.20120324.170615
As i said this is my first Zip so...just take a look to what i've done, just to be sure
This is the folder:
META-INF (folder)
--- CERT.RSA (file)
--- CERT.SF (file)
--- MANIFEST.MF (file)
--- com (folder)
------ google (folder)
--------- android (folder)
------------ update-binary (file)
------------ update-script (file)
system (folder)
--- app (folder)
------ Calendar.apk (file)
Inside update-script:
Code:
show_progress(0.500000, 0);
ui_print("");
ui_print("********************************************");
ui_print("Installing Calendar APK Stock AOSP");
ui_print("********************************************");
ui_print("");
run_program("/sbin/busybox", "mount", "/system");
ui_print("Deleting calendar apk...");
delete("/system/app/Calendar.apk");
ui_print("");
ui_print("Installing new files...");
package_extract_dir("system", "/system");
ui_print("");
ui_print("********************************************");
ui_print("Install Completed");
ui_print("********************************************");
unmount("/system");
Everything correct?
I reused those from another zip:
CERT.RSA
CERT.SF
MANIFEST.MF
is that bad?

[Guide] Making Mod Pack for a ROM

its about making patch modpack for my rom and
making update script full...
So,Let's start...
________________________________________
________________________________________
How to make modpack or patch...
Frist make sure that what you want to add on your
rom..like i want to add my modded
systemui,framwork_res,some importent app,some
brinery like su,mkbootimg,some wallpaper,new
ringtone,boot logo,boot animation and some app
with data...
ok now i explain you somethings which are very
very important...
frist in a modpack this folders are added..like>>>
1.Meta_inf
2.data
3.sdcard
4.system...etc etc...
you will also see more folder or file but now i will
tell you about this folders ^^^...
1.Meta_inf...
i think everybody know this folder...i give a short
example...
in this folder you will found update script and
update brinary...
[Q]what is update script?
[Ans.] updater-script - it is just a text file which
contains all the commands which tells the
clockworkmod what to do with the given
zip file. the updater-script is written in the edify
scripting language.
[Q]what is update brinary?
[ans] update-binary - it is a binary which is
requiered by the clockworkmod to translate the
human readable format of the updater-
script to machine readable format for execution
of the updater-script in our device.
now i think you would understand what is update
script and brinary...
ok now 2.Data folder...in data folder you can add
some app with data...fir this what you need?!!
Frist install your app on your mobile and mod
it...like i want to add Xposed installer with
frimwere updated in my modpack...so frist i
installed the app and open it..then click on install/
update...then reboot my device...now my modding
was complete...now its time to add it with data...
.
so i made a folder on sdcard like (modpack for my
rom) then open it and made another folder name
(data) then in data folder i made two folders like
(app) and (data)
then i opened root explorer and went to root
derectory...then go to data...then go to app folder
and choosed my app thats mean xposed...then
copied it to sdcard/modpack/data/app and again
go to root derectory/data...this time i go to data
folder and find my apps data.then copy it to
sdcard/modpack/data/data...thats all...
This is an example...now you can add you app
with data like i had added...but i recommend you
that dont add more then 4 apps with data...
ok now 3.sdcard...
by this folder you can add anythings to your
sdcard...like i want to add some themes of mi
home luncher and all kernel,profile of viper 4
fx...frist made (sdcard)folder on your sdcard/
modpack...now copy all things from your sdcard
which you want to add..like i copied viper4fx
folder from my sdcard and paste it to sdcard/
modpack/sdcard...you can add themes in this way
too...just copied the themes with the whole
derctory in your sdcard/modpack/sdcard
folder...like i copied miui folder to my sdcard/
modpack/sdcard folder...beacuse all themes of
miui are in miui folder...
now comes 4.System folder.. so make a folder
(system) on your sdcard/modpack...then open
system folder and made some folder like
app,etc,lib,bin,xbin etc if you want to add
somethings on your roms system folder..i think
every body know this folder...if you want to add
your modded app,just sing it and drop it to...
Now full completed...you can see some extra
folders and files...if you want to add these to then
comment here i will told you how add these
folder...or you can pm me too
________________________________________
now its time to make update script for your
modpack..
...........
frist copy a meta_inf to your sdcard/modpack and
open update script...delect all things...
you can edit this line as your wish>>>
ui_print(“xolo – next level”);
now see what is ui print?
ui_print – This command prints the prints the
word inside the quotations
Example – ui_print(“xolo – next level”); prints
xolo next level in your cwm recovery
______________________
then you need to mount system partition...and
also another pertition like data,etc (if you want
to add anythings to this folderd)...but no need to
mount sdcard...For mount system-
mount(“ext4″, “EMMC”, “/
dev/block/mmcblk0p5″, “/system”);
if you want to mount data folder then write data
insted of system like-
mount(“ext4″, “EMMC”, “/
dev/block/mmcblk0p5″, “/data”);
okey...done mounting...
Now see what is mount?
mount – This command mounts the partition, if
you want to add files to system partition you
have to mount system partition, data for data
partition
To mount system - mount(“ext4″, “EMMC”, “/
dev/block/mmcblk0p5″, “/system”);
Here mmcblk0p5 is the name of system
partition for mtk 6589 chipsets (this name
varies from device to device)
To mount data - mount(“ext4″, “EMMC”, “/dev/
block/mmcblk0p7″, “/data”); (partition name
varies from device to device)
_____________________
Now formating...what is format>
format - This command formats the partition
specified
It is highly recommended to include this
command to format system and data if you are
making updater-script for ROM
To Format system - format(“ext4″, “EMMC”, “/
dev/block/mmcblk0p5″, “0″);(partition name
varies from device to device)
To Format data - format(“ext4″, “EMMC”, “/
dev/block/mmcblk0p7″, “0″);(partition name
varies from device to device)
NB.dont use it in your modpacks script its for
custom rom....
_______________________
Now you done mounting and its time to install all
things in all folder thats mean extracting...like
sustem folder will extract in your system
pertition...data folder will be in data pertition
and sdcard folder in your sdcard...for extract
system files use this command>>>
package_extract_file(”system“,”/system”)
for data>>> just delect system and add data like.
package_extract_file(”data“,”/data”)
for sdcard do same...
Now what is this>>>
package_extract_dir(” “, “/”) – This command
extracts all the files from the folder mentioned
inside first quotation to the partition or
directory
inside second quotation
For system - package_extract_dir(“system”, “/
system”);
(this copies all files from system folder in zip to
system partition in phone)
For data - package_extract_dir(“data”, “/
data”);
____________________
Ok now symlink...
symlink("mksh", "/system/bin/sh");
the above command creates a symlink.
okay, now let's see about symlinks,
symlink is nothing but shortcuts, for example if
a file is requiered in two different places instead
of copy pasting the file
in two different locations, the file is copied to
one of the two locations and in the other
location a shortcut to the file(symlink)
is created. the source and the symlink can have
different names (actually this is the prime use
of symlinks).
to explain in a noob friendly manner,
take the above symlink, it creates a shortcut
(symlink) for the command "mksh" and places
it in the path of the operating system.
the shortcut(symlink) directs to the file "/
system/bin/sh" , so whenever the os gets a
request to execute the "mksh" command, the
actual
binary that gets excuted will be "/system/bin/
sh" .
creating symlinks saves a lot of space because
instead of copying the whole file and placing it
in requiered places we are just
creating shortcuts which directs to the source
file which can be placed anywhere in the file
system (generally placed in the path of the os)
i think you understood...if you not then dont
use...its just use then when you want to add
somethings on system/bin folder and its for
advance user..
______________________
ok now seting permission..its not need if you
wont want anything in system/bin...but if add
then you must need add permission for this gile
and seting petmission are really too much easy
and so funny just see what is it and how to
set>>>
set_perm_recursive - This command sets
permission for folders
here android uses unix permission system
in unix
4 – read
2 – write
1 – execute
so
rwx is 4+2+1 = 7
rw is 4+2 = 6
rx is 4+1 = 5
Example - set_perm_recursive(0, 0, 0755,
0644, “/system”);
In this 0 is a user id for owner that refers to
root. It means that permission owner for
system folder. and 0 is root user means it
unrestricted access to system. it is given in
order to run programs to run properly
second 0 also refers to root. but here it refers
to group id 0
we are only seeing about folders because
“set_perm_recursive” is a command that sets
permission to folders
next 0755 it means rwxr-xr-x permission has
been given to system folder and rw-r-r is set
for all folders inside system folder
hope you understan...
___________________
Now another things...and its use in seting
permissions to but its defferent just see>>>
set_perm – This command sets permission for
a specific file
Example - set_perm(1000, 1000, 0640, “/
system/etc/bluetooth/auto_pairing.conf”);
here the 1000 refers to user id system and
0640 is rw-r—–
and this command sets the permission rw-r—–
for the file auto_pairing.conf
this is use for one files auto_praing.conf
__________________
Now you need to unmount these folder which you
mounted...see it>>>
unmount – This command unmounts the
partition
Example - unmount(“/system”); – unmounts
system...you need to unmount another folder
too..like for unmount data>>>
unmount(“/data”);
___________________
ok guys all done...i hope you understood all that i
have told...if you not then ignore it...and now try
to make a script for your modpack...
____________________
now give you a short example of my modpack and
update script...
...................
in my modpack i have these folders>>>
1.meta_inf,
2.data,
3.sdcard,
4.system,
.....now have a look in my script >>>
ui_print("====================
===============");
ui_print("Installing cayno x v2 modpack for all
cayno x users");
ui_print(" ");
ui_print(" By: MD.Shafikul main dev of cayno x ");
ui_print("====================
===============");
ui_print("");
ui_print("mounting system");
show_progress(0.500000, 0);
mount("ext4", "EMMC", "/dev/block/mmcblk0p5", "/
system");
ui_print("mounting data");
mount("ext4", "EMMC", "/dev/block/mmcblk0p5", "/
data");
show_progress(0.200000, 0);
ui_print("[ ] Installing all files");
package_extract_dir("system", "/system");
show_progress(0.200000, 0);
package_extract_dir("data", "/data");
ui_print("installing themes ");
package_extract_dir("sdcard", "/sdcard");
set_perm(0, 1000, 0755, "/system/xbin/busybox");
symlink("/system/xbin/busybox", "/system/bin/
busybox");
ui_print("letast busybox installed");
run_program("/system/xbin/busybox", "--install", "-
s", "/system/xbin");
ui_print("installing abrouted!");
show_progress(0.500000, 0);
set_perm(0, 0, 06755, "/system/xbin/su");
symlink("/system/xbin/su", "/system/bin/su");
set_perm_recursive(0, 0, 0777, 0777, "/system/etc/
init.d");
ui_print("init.d activated!");
ui_print("jocking man... ");
show_progress(0.200000, 0);
unmount("/system");
ui_print("[*] unmount system succeced! ");
unmount("/data");
ui_print("[*] unmount dataoo succeced! ");
unmount("/sdcard");
ui_print("");
ui_print(" Thanks for downloading cayno x ");
ui_print(" Auto rebooting ");
sleep(2);
ui_print(" Please wait... ");
sleep(2);
run_program("/sbin/sleep", "5");
run_program("/sbin/reboot");
^^^^^thats all that i wrote
_______________________________________
NB.(must read)>>>1.General rule in updater-script
– all commands
should end with semi colon ; otherwise it
will show error and if cwm or twrp shows status
7 error the error is in updater-script
2.if you dont understand then ignore beacuse its
can bootlooped...
3.if felt in installing zip then pm me pr comment
here or give me your script i will try my best to
correct it...
4.if the post help you,then give me some
respect...please..
5.dont forget to click on like botton its can
inspared me to write more post...
6.if you copy these post then give me credit,if
you not then i will understood that you are a
busted...
7.and never stop customization
Credit goes to my friend Md. Shafiqul for writting this..
HIT A THANKS IF I HAVE HELPED YOU

Categories

Resources