[THEME][K2_CL][4.1.2][DEODEXED] Red Hot / Cool Blue - HTC One SV

Standard disclaimer: I am not responsible for any damages to your phone, reputation or employment status as a result of the use of these themes
Your system must be deodexed to use this theme. If it's not, visit this thread here:
http://forum.xda-developers.com/showthread.php?t=2363150
Red Hot
Hey guys, so i put together a little theme for you guys. let me know what you think.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Download Here
Red Hot Theme
To install, simply flash in recovery.
Optional Home Screen Setup:
here are the instructions to get your home screen to look like the screen shot:
http://forum.xda-developers.com/showthread.php?t=2025464
The thread is from the nexus 7 section, but it works for our phone
Cool Blue
Download Here
CoolBlue Theme
To install, simply flash in recovery.
thanks goes to:
O_splatterhand for the quick toggles.
Guspeed for the base files i used. ​

Ok, big thanks to lordvincent 90 and Guspeed. I took both of their work and merged them together. I thought both were phenomenal and so, I wanted a piece of them both on my phone lol.
Here is picture 1
Sent from my C525c using Tapatalk

Here is picture 2
Sent from my C525c using Tapatalk

Here is picture 3
Sent from my C525c using Tapatalk

Picture 4..
Sent from my C525c using Tapatalk

Very nice

Picture 5...
If you notice with the others, the notification bar is transparent, so I had to blackened it out so it would be more fitting for the wallpaper my brother made for me. Overall, just straight sick lol.
Sent from my C525c using Tapatalk

@lordvincent 90
Picture, or it didn't happen
Sent from my C525c using Tapatalk

Hey bro, I'm posting here so I can attach the vrTheme Template.
I redid the updater-script since the one I already sent you.
Basically the layout of this script goes as followed:
It will copy and paste the backup.sh file over to the /tmp folder of the recovery.
It will then run a security check of that backup.sh file when commanded to run it.
If the file does not run like it is suppose to (which means the file wasn't copied over properly) then it will abort the installation immediately and notify the user on the screen as well as giving a suggestion that they review their recovery log.
If the backup.sh runs then it will proceed forward with the installation.
The backup.sh will copy your build.prop file over to the /tmp folder of your recovery.
Then the updater-script will read the fingerprint found within the build.prop file.
If the fingerprint does not match then it will delete the copied backup.sh and build.prop file, abort the installation, and let the user know that their Rom is incompatible.
If the fingerprint does match then it will give an ok to proceed forward with the installation.
At this point some other scripts will be applied to the device.
Installtheme.sh will basically read the zip directories and pull those same apps by copying them over into a temporary directory. At this point it will unzip all apps as instructed and start injecting the modifications.
When done it will rezip all the apps and push them back to their respectable locations then chmod each app accordingly.
It will also make a backup of the original apps which can be found at /cache/vrtheme-backup on your device.
After the theme installation is complete you may reboot the device.
It is not needed to wipe dalvick cache.
You don't need to wipe anything really, but if it makes you feel comfortable then do so lol.
The updater-script isn't written out like you normally would see with any other updater-script.
This script is written out to be fairly intelligent.
If you or anyone else want this template then feel free to download it . With that said, you can use this template to apply themes for both odex and deodex Roms .
--Happy Hunting!!
To review the updater-script click below:
Code:
##########################################################################################
# Script By Modding.MyMind #
# K2_CL Partition Info #
# #
# Highly recommended to research and put your own phone's partition info here #
# so you have a handy reference when editing the updater-script. #
# #
# mmcblk0p22: "misc" #
# mmcblk0p21: "recovery" #
# mmcblk0p20: "boot" #
# mmcblk0p35: "system" #
# mmcblk0p29: "local" #
# mmcblk0p36: "cache" #
# mmcblk0p37: "userdata" #
# mmcblk0p25: "devlog" #
# mmcblk0p27: "pdata" #
# mmcblk0p38: "fat" #
# mmcblk0p30: "extra" #
# mmcblk0p32: "carrier" #
# mmcblk0p16: "radio" #
# mmcblk0p17: "adsp" #
# mmcblk0p15: "dsps" #
# mmcblk0p18: "wcnss" #
# mmcblk0p19: "radio_config" #
# mmcblk0p23: "modem_st1" #
# mmcblk0p24: "modem_st2" #
# mmcblk0p31: "skylink" #
# mmcblk0p33: "cdma_record" #
# mmcblk0p34: "reserve" #
# #
# Modifications to make this a smart updater. #
# 1: Backup build.prop so it can be accessed after installing /system #
# or so the device can be properly confirmed in general. #
# 2: Check if backup.sh is already installed for security checks and rom compatibility. #
# #
# #
# #
##########################################################################################
package_extract_file("backup.sh", "/tmp/backup.sh");
set_perm(0, 0, 0777, "/tmp/backup.sh");
run_program("/sbin/busybox", "mount", "/system");
ifelse(
run_program("/tmp/backup.sh"),
(
ui_print(" ");
ui_print("Checking For Compatibility!");
ifelse(
file_getprop("/tmp/build.prop", "ro.build.fingerprint") == "htc/sprint_wwe_boost/k2cl:4.1.2/JZO54K/209682.6:user/release-keys",
(
ui_print(" ");
ui_print("Compatible Rom Detected!");
delete("/tmp/backup.sh");
delete("/tmp/build.prop");
ui_print("--Ok to proceed!");
ui_print(" ");
ifelse(
is_mounted("/system") == "/system", unmount("/system")
);
ifelse(
is_mounted("/data") == "/data", unmount("/data")
);
ifelse(
is_mounted("/cache") == "/cache", unmount("/cache")
);
ui_print(" ");
ui_print("Preparing To Inject Theme.");
#####################################################################
# Double checking to insure they are unmounted! Harmless procedure. #
#####################################################################
ui_print(" ");
ifelse(
is_mounted("/system") == "/system", unmount("/system")
);
ifelse(
is_mounted("/data") == "/data", unmount("/data")
);
ifelse(
is_mounted("/cache") == "/cache", unmount("/cache")
);
#############################################################
# Beginning the injection of modified images and xml files. #
#############################################################
ui_print(" ");
ui_print("Final Preparations...");
ui_print(" ");
ui_print(" ");
run_program("/sbin/busybox", "mount", "/system");
run_program("/sbin/busybox", "mount", "/data");
run_program("/sbin/busybox", "mount", "/cache");
ui_print("Injecting!!!");
package_extract_dir("vrtheme", "/cache/vrtheme");
set_perm(0, 0, 0755, "/cache/vrtheme/installtheme.sh");
set_perm(0, 0, 0755, "/cache/vrtheme/zip");
set_perm(0, 0, 0755, "/cache/vrtheme/cleanup.sh");
set_perm(0, 0, 0755, "/cache/vrtheme/zipalign");
run_program("/cache/vrtheme/installtheme.sh");
ui_print(" ");
ui_print("Theming Completed!");
ui_print(" ");
#######################
# Performing cleanup. #
#######################
run_program("/cache/vrtheme/cleanup.sh");
######################
# Unmounting mounts. #
######################
ui_print("--> Unmounting partitions");
run_program("/sbin/umount", "/system");
run_program("/sbin/umount", "/data");
#################################################
# Let user know that the injection is complete. #
#################################################
ui_print(" ");
ui_print("Injection Done!");
),
(
##############################################################################################################
# Rom found incompatible so remove copied build.prop and backup.sh file then unmount and abort installation. #
# Notify user of the current status. #
##############################################################################################################
ui_print(" ");
ui_print(" ");
delete("/tmp/backup.sh");
delete("/tmp/build.prop");
run_program("/sbin/umount", "/system");
run_program("/sbin/umount", "/data");
ui_print("Incompatible Rom Detected!");
ui_print("Not Recommended To Continue!");
)
);
),
(
run_program("/sbin/umount", "/system");
ui_print("ERROR READING YOUR ROM'S FINGERPRINT!");
ui_print("Please review your recovery.log!");
ui_print(" ");
ui_print("This Installation Will Be Aborted!");
)
);

Awesome! Great work!

Modding.MyMind said:
Hey bro, I'm posting here so I can attach the vrTheme Template.
I redid the updater-script since the one I already sent you.
Basically the layout of this script goes as followed:
It will copy and paste the backup.sh file over to the /tmp folder of the recovery.
It will then run a security check of that backup.sh file when commanded to run it.
If the file does not run like it is suppose to (which means the file wasn't copied over properly) then it will abort the installation immediately and notify the user on the screen as well as giving a suggestion that they review their recovery log.
If the backup.sh runs then it will proceed forward with the installation.
The backup.sh will copy your build.prop file over to the /tmp folder of your recovery.
Then the updater-script will read the fingerprint found within the build.prop file.
If the fingerprint does not match then it will delete the copied backup.sh and build.prop file, abort the installation, and let the user know that their Rom is incompatible.
If the fingerprint does match then it will give an ok to proceed forward with the installation.
At this point some other scripts will be applied to the device.
Installtheme.sh will basically read the zip directories and pull those same apps by copying them over into a temporary directory. At this point it will unzip all apps as instructed and start injecting the modifications.
When done it will rezip all the apps and push them back to their respectable locations then chmod each app accordingly.
It will also make a backup of the original apps which can be found at /cache/vrtheme-backup on your device.
After the theme installation is complete you may reboot the device.
It is not needed to wipe dalvick cache.
You don't need to wipe anything really, but if it makes you feel comfortable then do so lol.
The updater-script isn't written out like you normally would see with any other updater-script.
This script is written out to be fairly intelligent.
If you or anyone else want this template then feel free to download it . With that said, you can use this template to apply themes for both odex and deodex Roms .
--Happy Hunting!!
Click to expand...
Click to collapse
What would I need to mod in the updater-script to make this flash correctly on the K2_PLC_CL?
HTC K2_PLC_CL

Krsmqn said:
What would I need to mod in the updater-script to make this flash correctly on the K2_PLC_CL?
HTC K2_PLC_CL
Click to expand...
Click to collapse
Download attachment and go to line 49 and replace the fingerprint id with your device.
Sent from my C525c using Tapatalk
---------- Post added at 05:23 PM ---------- Previous post was at 05:19 PM ----------
The template uses busybox so is more in less designed to work only with TWRP recovery.
Sent from my C525c using Tapatalk

Modding.MyMind said:
Download attachment and go to line 49 and replace the fingerprint id with your device.
Sent from my C525c using Tapatalk
---------- Post added at 05:23 PM ---------- Previous post was at 05:19 PM ----------
The template uses busybox so is more in less designed to work only with TWRP recovery.
Sent from my C525c using Tapatalk
Click to expand...
Click to collapse
Changed this line to match what is in my build.prop:
Code:
file_getprop("/tmp/build.prop", "ro.build.fingerprint") == "htc/sprint_wwe_boost/k2cl:4.1.2/JZO54K/209682.6:user/release-keys
Ok. Will I need to edit the partition info too? Cause if so, these partitions are not on my device:
Code:
mmcblk0p32: "carrier"
mmcblk0p31: "skylink"
"skylink" & "carrier" ...the blocks are there but used by other things.
Thanks!

Krsmqn said:
Ok. Will I need to edit the partition info too?
Thanks!
Click to expand...
Click to collapse
They are there as a reference.
Anything with a # symbol means they are commented out. So in other words they do nothing but only allow for the purpose of taking notes without interference with the rest of the script.
As for the use of busybox, it calls for a partition but its universal regardless which device it is. I only gave restrictions for it being K2_CL because apps from other devices are known for having different names when looking at them from the inside and when that is the case the theme tends to be either incomplete and/or could cause issues depending upon what exactly is being themed. Especially if it pertains to xml files. That theme template I pm you earlier is incomplete anyways lol. Still much more work to be done. But you can try it out and see.
Sent from my C525c using Tapatalk

Modding.MyMind said:
They are there as a reference.
Anything with a # symbol means they are commented out. So in other words they do nothing but only allow for the purpose of taking notes without interference with the rest of the script.
As for the use of busybox, it calls for a partition but its universal regardless which device it is. I only gave restrictions for it being K2_CL because apps from other devices are known for having different names when looking at them from the inside and when that is the case the theme tends to be either incomplete and/or could cause issues depending upon what exactly what is being themed. Especially if it pertains to xml files.
Sent from my C525c using Tapatalk
Click to expand...
Click to collapse
Ok. I edited my above post but it seems you answered my question regardless. Are the red hot & cool blue themes compatable with this themer?

Krsmqn said:
Ok. I edited my above post but it seems you answered my question regardless. Are the red hot & cool blue themes compatable with this themer?
Click to expand...
Click to collapse
of course, @lordvincent 90 would just need to take his modified files and place them within the template. I mention him because he knows exactly which files are modified whereas myself or anyone else would most likely have to sort through it all lol. But I am pretty sure he plans to do this because using a vrTheme makes the flashable zip dramatically smaller in size while still pretty much being able to do the same thing as if you were to provide the entire apk itself which can get pretty bulky in size lol.
Sent from my C525c using Tapatalk

Didn't flash. I must have edited the script wrong. Got 1 parse error. Here's the log.
HTC K2_PLC_CL

Krsmqn said:
Didn't flash. I must have edited the script wrong. Got 1 parse error. Here's the log.
HTC K2_PLC_CL
Click to expand...
Click to collapse
You have to edit line 49 when changing the fingerprint. Below I have posted lines 39-49. Yours should look EXACTLY like this with the exception of what is highlighted in red. The highlighted red is what you must change to your own device fingerprint.
Code:
39 package_extract_file("backup.sh", "/tmp/backup.sh");
40 set_perm(0, 0, 0777, "/tmp/backup.sh");
41 run_program("/sbin/busybox", "mount", "/system");
42 ifelse(
43 run_program("/tmp/backup.sh"),
44 (
45 ui_print(" ");
46 ui_print("Checking For Compatibility!");
47
48 ifelse(
49 file_getprop("/tmp/build.prop", "ro.build.fingerprint") == "[COLOR="Red"][B]htc/sprint_wwe_boost/k2cl:4.1.2/JZO54K/209682.6:user/release-keys[/B][/COLOR]",

So..... Thanks to @old.splatterhand, I now have a deodexed rom! How can I get these awesome themes to work on my K2_PLC_CL?

Krsmqn said:
So..... Thanks to @old.splatterhand, I now have a deodexed rom! How can I get these awesome themes to work on my K2_PLC_CL?
Click to expand...
Click to collapse
Send me your framework-res.apk and SystemUI.apk.
I can diff the files, but I can't guarantee you that the themes will be complete because they were built using the K2_CL variant and on 4.1.2. So it is most likely guaranteed that there will be different filenames. Send them to me in a PM so I may review them and hopefully the difference won't be to great. I have to work today so won't be able to look at them until later on this evening (east coast time).
Sent from my C525c using Tapatalk
---------- Post added at 07:07 AM ---------- Previous post was at 06:46 AM ----------
@Krsmqn
Forgot to mention that I will need your com.htc.resources.apk file also.
Sent from my C525c using Tapatalk

Related

[Script] Simple tar backup and restore for devs [FINISHED!]

To all of the ROM makers here, please stop using those bonsai data-backup/data-restore scripts, as they don't work. I'm assuming they used to work since everyone here seems to be using them, but something has changed (maybe something in CWM 5.x?) and now all those data-backup and data-restore scripts do is make phones not work.
I've taking those scripts and rewritten them using the tar command. busybox's tar doesn't have many options, but it does preserve file permissions and ownership, so it makes for an adequate backup tool. HUGE thanks to SenseiSimple for the ideas and improvements. See SenseiSimple's post, here.
EDIT: Here is the final version!
updater-script BACKUP EXAMPLE
Code:
ui_print("************************************************");
ui_print(" TAR BACK UP / RESTORE EXAMPLE");
ui_print("************************************************");
show_progress(1.000, 0);
set_progress (0.100);
#EXTRACT BACKUP SCRIPT
ui_print("Preparing tools...");
package_extract_file("tools/busybox", "/tmp/busybox");
package_extract_file("tools/tar-backup", "/tmp/tar-backup");
set_perm(0, 0, 0755, "/tmp/tar-backup");
set_perm(0, 0, 0755, "/tmp/busybox");
#CREATE BACKUP
set_progress (0.350);
ui_print("Backing up - this may take a while...");
run_program("/sbin/mount","/sdcard");
run_program("/sbin/mount","/data");
run_program("/tmp/tar-backup","backup");
unmount("/data");
#RECOVER BACKUP
set_progress (0.600);
ui_print("Recovering backed up data...");
run_program("/sbin/mount","/data");
run_program("/tmp/tar-backup","recover");
# run_program("/tmp/tar-backup","recover","delete");
# run_program("/tmp/tar-backup","recover","archive");
unmount("/data");
set_progress(1.000);
show_progress(1.000, 0);
tar-backup script
edit the value of ROMName=YourROMName (you should only have to edit this file once for all your ROM versions, it's not version-dependent), that's it.
Code:
#!/tmp/busybox sh
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU Library General Public License as published
# by the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# License GPLv2+: GNU GPL version 2 <http://gnu.org/licenses/gpl.html>
#
# toadlife, SenseiSimple, XDA Community, Bonsai
# invoke with
# run_program("/tmp/tar-backup","backup");
# run_program("/tmp/tar-backup","recover" [,"delete"|"archive"]);
# - "delete" option deletes the backup file
# - "archive" option renames the backup file for archiving (otherwise, it is left alone and replaced on next backup/flash)
ROMName=MyAwesomeROM
platbuild=EI22
PATH=/tmp:/sbin:$PATH
datadir=/data
backdir=/sdcard/ROMBackup-$platbuild
backfile=$backdir/$ROMName.tgz
TEST="busybox test"; TAR="busybox tar"; MKDIR="busybox mkdir"
if [ "$1" = "backup" ]; then
rm /data/dalvik-cache/*
rm /data/lost+found/*
rm $backfile
if $TEST -d $datadir ; then
$TEST ! -d $backdir && $MKDIR $backdir
$TAR pczf $backfile $datadir
if $TEST $? -ne 0 ; then
echo "Backup failed!"; exit 1
else
echo "Backup completed"; exit 0
fi
fi
elif [ "$1" = "recover" ]; then
if $TEST -f $backfile; then
$TAR pxzf $backfile
if [ "$2" = "delete" ]; then
rm $backfile;
elif [ "$2" = "archive" ]; then
archdate=`date +%Y%m%d-%I%M`
archfile=$backdir/$ROMName-$archdate.tgz
mv $backfile $archfile
fi
echo "Restore Completed!"; exit 0
else
echo "Restore failed!"; exit 1
fi
else
echo "Backup - Invalid argument"; exit 1
fi
Example CWM package (unsigned) that uses the script.
BTW, I have tested this script several times with test builds of my ROM and also tested it going from SleeperROM 1.x to my ROM. In sleeper ROM I started with blank slate, installed a few apps, configured my email and set a wallpaper. I then installed a test build of my ROM CleanGB with this backup restore script and I had no problems after flashing; all of my data and settings, including the apps in /data from sleeper ROM came over.
Thank you for this. I proposed this to ERA for Legendary and also to the Bonsai crew.
Sent from my SPH-D700 using XDA App
UNIFIED BACKUP SCRIPT - INSTRUCTIONS/DIFFERENCES
SUMMARY The motivation is threefold, as Toadlife initiated with the purpose of modernizing the backup scripts to better protect the data file attributes in backup by using Tar rather than streaming to Cpio, it's possible with adding this improvement to add new functionality and prevent cluttering up users' sdcards with various ROM folders/editions. They will now all be located by ROM name (i.e. SleeperROM, CleanGB, StarskyROM, RandomROM, LegendaryROM *.tgz) in the /sdcard/ROMBackup-EI22/*.tgz directory.
In your ROM package
1. REPLACE /tools/data-backup and /tools/data-restore
2. WITH /tools/tar-backup (script below)
3. UPDATE ROMName=CleanGB with your rom name
in your updater-script, replace
Code:
package_extract_file("tools/data-backup", "/tmp/data-backup");
package_extract_file("tools/data-restore", "/tmp/data-restore");
set_perm(0, 0, 0755, "/tmp/data-backup");
set_perm(0, 0, 0755, "/tmp/data-restore");
with
Code:
package_extract_file("tools/tar-backup", "/tmp/tar-backup");
set_perm(0, 0, 0755, "/tmp/tar-backup");
updater-script USAGE:
1. REPLACE: run_program("/tmp/data-backup");
2. WITH run_program("/tmp/tar-backup", "backup");
3. REPLACE: run_program("/tmp/data-restore");
4a. WITH run_program("/tmp/tar-backup", "recover"); - Leave the backup in place, will be overwritten in the future
4b. OR run_program("/tmp/tar-backup", "recover","delete"); To delete the backup file when complete
4c. OR run_program("/tmp/tar-backup", "recover","archive"); To archive (with date) the backup file when complete
MINIMAL updater-script BACKUP EXAMPLE
Code:
ui_print("************************************************");
ui_print(" TAR BACK UP / RESTORE EXAMPLE");
ui_print("************************************************");
show_progress(1.000, 0);
set_progress (0.100);
#EXTRACT BACKUP SCRIPT
ui_print("Preparing tools...");
package_extract_file("tools/busybox", "/tmp/busybox");
[B]package_extract_file("tools/tar-backup", "/tmp/tar-backup");[/B]
[B]set_perm(0, 0, 0755, "/tmp/tar-backup");[/B]
set_perm(0, 0, 0755, "/tmp/busybox");
#CREATE BACKUP
set_progress (0.350);
ui_print("Backing up - this may take a while...");
run_program("/sbin/mount","/sdcard");
run_program("/sbin/mount","/data");
[B]run_program("/tmp/tar-backup","backup");[/B]
unmount("/data");
#RECOVER BACKUP
set_progress (0.600);
ui_print("Recovering backed up data...");
run_program("/sbin/mount","/data");
[B]run_program("/tmp/tar-backup","recover");
# run_program("/tmp/tar-backup","recover","delete");
# run_program("/tmp/tar-backup","recover","archive");[/B]
unmount("/data");
set_progress(1.000);
show_progress(1.000, 0);
FILE: /tools/tar-backup
edit the value of ROMName=YOURROMNAME (you should only have to edit this file once for all your ROM versions, it's not version-dependent), that's it.
Code:
#!/tmp/busybox sh
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU Library General Public License as published
# by the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# License GPLv2+: GNU GPL version 2 <http://gnu.org/licenses/gpl.html>
#
# toadlife, SenseiSimple, XDA Community, Bonsai
# invoke with
# run_program("/tmp/tar-backup","backup");
# run_program("/tmp/tar-backup","recover" [,"delete"|"archive"]);
# - "delete" option deletes the backup file
# - "archive" option renames the backup file for archiving (otherwise, it is left alone and replaced on next backup/flash)
[B]ROMName=CleanGB[/B]
platbuild=EI22
PATH=/tmp:/sbin:$PATH
datadir=/data
backdir=/sdcard/ROMBackup-$platbuild
backfile=$backdir/$ROMName.tgz
TEST="busybox test"; TAR="busybox tar"; MKDIR="busybox mkdir"
if [ "$1" = "backup" ]; then
rm /data/dalvik-cache/*
rm /data/lost+found/*
rm $backfile
if $TEST -d $datadir ; then
$TEST ! -d $backdir && $MKDIR $backdir
$TAR pczf $backfile $datadir
if $TEST $? -ne 0 ; then
echo "Backup failed!"; exit 1
else
echo "Backup completed"; exit 0
fi
fi
elif [ "$1" = "recover" ]; then
if $TEST -f $backfile; then
$TAR pxzf $backfile
if [ "$2" = "delete" ]; then
rm $backfile;
elif [ "$2" = "archive" ]; then
archdate=`date +%Y%m%d-%I%M`
archfile=$backdir/$ROMName-$archdate.tgz
mv $backfile $archfile
fi
echo "Restore Completed!"; exit 0
else
echo "Restore failed!"; exit 1
fi
else
echo "Backup - Invalid argument"; exit 1
fi
Example CWM package (unsigned) to augment these instructions - pay attention to your version of Busybox vs the one included.
SenseiSimple said:
Thanks, i'll be giving it a spin for the next release!
I'm wondering, should we perhaps standardize the directory the backups go into and name the actual backup file accordingly?
I for one hate my sd card filling up with a bunch of random folders, backups included. (i know this is trivial, but since you've provided a good change to the backup method...)
will put the backup into /sdcard/EI22_ROM_Backup/CleanGB.tgz
since we don't automatically delete the backup, i assume for precautionary reasons, best for them to pile up in one place, no?
Click to expand...
Click to collapse
Couldn't agree more. Seems like I'm constantly cleaning backup files off my sdcard.
Why not delete the backup file after the restore? Otherwise a flashaholic will have a whole bunch of these files on their card as well as their nandroids, titanium backups, ROMs, pics etc. Just add a delete to the script.
kennyglass123 said:
Why not delete the backup file after the restore? Otherwise a flashaholic will have a whole bunch of these files on their card as well as their nandroids, titanium backups, ROMs, pics etc. Just add a delete to the script.
Click to expand...
Click to collapse
That's my mentality on it. But in case something goes wrong with the restore, maybe, you have the whole backup file to dissect? that was the only reason i could think of to keep all the cruft in which case, at least have them all consolidated.
I will definitely include this in my rom. Thanks
Sent from my SPH-D700 using XDA App
SenseiSimple said:
That's my mentality on it. But in case something goes wrong with the restore, maybe, you have the whole backup file to dissect? that was the only reason i could think of to keep all the cruft in which case, at least have them all consolidated.
Click to expand...
Click to collapse
Everyone should already be making a nandroid before flashing anything and then can always use advanced restore data. My issue is until you start looking at your sd card, you don't know ROMs have left backups behind. Nuke em...lol.
SenseiSimple said:
Thanks, i'll be giving it a spin for the next release!
I'm wondering, should we perhaps standardize the directory the backups go into and name the actual backup file accordingly?
I for one hate my sd card filling up with a bunch of random folders, backups included. (i know this is trivial, but since you've provided a good change to the backup method...)
(my edits in bold)
Click to expand...
Click to collapse
Sounds good to me. Putting them both in one script would be easier too. I'll use the second revision. You could allways pass another varible to the script to tell it weather or not to delete the backup.
SenseiSimple said:
That's my mentality on it. But in case something goes wrong with the restore, maybe, you have the whole backup file to dissect? that was the only reason i could think of to keep all the cruft in which case, at least have them all consolidated.
Click to expand...
Click to collapse
Ten years sysadminning had led me to be extremely wary of deleting data, so I'm always inclined to keep backups.
Ten years sysadminning had led me to be extremely wary of deleting data, so I'm always inclined to keep backups.
Click to expand...
Click to collapse
I know that personally if something messed up with the re-install phase of the flashing, i'd want the backup file to still be available... it would be nice to have a unified backup dir, and maybe even an option in CWM to delete backups left by roms - it becomes somewhat of a redundancy of CWM's backup at that point, but it's not as if we can invoke the CWM backup routine from script anyway...
toadlife said:
Sounds good to me. Putting them both in one script would be easier too. I'll use the second revision. You could allways pass another varible to the script to tell it weather or not to delete the backup.
Click to expand...
Click to collapse
i deleted my script from the post, on testing, i just can't get it to run - in theory it's a great idea - the single script file is sound but running it from the updater_script with run_program("/tmp/data_save","backup"); for example, just doesn't run it... i've tried variations using
run_program("/sbin/sh","/tmp/data_save","backup");
run_program("/tmp/busybox","sh","/tmp/data_save","backup");
each are no-go...
individually, the scripts work... is there a limitation that the only way run_program can pass arguments is to a binary and not a shell script? that's all i can think of
EDIT:
I GOT IT, will post up the revision in a moment
SenseiSimple said:
EDIT:
I GOT IT, will post up the revision in a moment
Click to expand...
Click to collapse
Crud. I just posted updated version at the top that contains a variable to control deletion of the backup file.
Can you update the script to take a variable that controls whether or not the backup file gets deleted?
It may be worthwhile to add the current date to the filename - it keeps the current backup and restore for a flash fresh, but allows archival copies to be trivially stored ala Nandroid.
k0nane said:
It may be worthwhile to add the current date to the filename - it keeps the current backup and restore for a flash fresh, but allows archival copies to be trivially stored ala Nandroid.
Click to expand...
Click to collapse
This could be done right after the restore finishes...if the file is not set to be deleted...
Code:
date=`date +.%m.%d.%Y.%I:%M`;
newromname={$romname}{$date}
newbackfile=/sdcard/${build}_ROM_Backup/$newromname.tgz
mv $backfile $newbackfile
SenseiSimple said:
EDIT:
I GOT IT, will post up the revision in a moment
Click to expand...
Click to collapse
Sorry, I got impatient and rolled them into one script myself. It tags the files with the date if the delete option is not set. The script is in the first post.
toadlife said:
To all of the ROM makers here, please stop using those bonsai data-backup/data-restore scripts, as they don't work. I'm assuming they used to work since everyone here seems to be using them, but something has changed (maybe something in CWM 5.x?) and now all those data-backup and data-restore scripts do is make phones not work.
I've taking those scripts and rewritten them using the tar command. busybox's tar doesn't have many options, but it does preserve file permissions and ownership, so it makes for an adequate backup tool.
EDIT: I've rewritten the scripts so that both backup and restore functionality are in one script. Thanks SenseiSimple for the idea!
tar-backup
Code:
#!/tmp/busybox sh
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU Library General Public License as published
# by the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# License GPLv2+: GNU GPL version 2 <http://gnu.org/licenses/gpl.html>
#
#
# tar data backup and restore
# based on bonsai data backup/restore scripts
# by toadlife , SenseiSimple and the Epic 4G XDA community
#
# Call from your updater script like so...
#
# Backup: run_program("/tmp/tar-backup", "backup");
# Restore: run_program("/tmp/tar-backup", "restore"[, "delete"]);
#
# optional "delete" switch will cause the backup file to be deleted after
# restore
#
#
romname=CleanGB
build=EI22
datadir=/data
PATH=/tmp:/sbin:$PATH
BB=/tmp/busybox
backfile=/sdcard/${build}_ROM_Backup/$romname.tgz
if [ "$1" = "backup" ]; then
$BB rm /data/dalvik-cache/*
$BB rm /data/lost+found/*
$BB rm $backfile
if $BB test -d $datadir; then
$BB test ! -d /sdcard/${build}_ROM_Backup && $BB mkdir /sdcard/${build}_ROM_Backup
$BB tar pczf $backfile $datadir
if $BB test $? -ne 0; then
echo "Backup failed!"
exit 1
else
echo "Backup completed"
exit 0
fi
fi
fi
if [ "$1" = "restore" ]; then
if $BB test -f $backfile; then
$BB tar pxzf $backfile
echo Restore Completed!
if [ "$2" = "delete" ]; then
rm $backfile
else
DATE=`date +%Y.%m.%d.%I%M`;
newromname=$romname.$DATE
newbackfile=/sdcard/${build}_ROM_Backup/$newromname.tgz
mv $backfile $newbackfile
fi
exit 0
else
echo Restore failed!
exit 1
fi
fi
Here is an example package that uses the script.
Click to expand...
Click to collapse
From looking at it, it doesn't look like there should be issues... Nice work!
and with the improved handling of tarballs through CWM, this thing should be nice and fast! =)
Your version still didn't work for me, same issue i was facing with mine.
I updated post #4 with an updated version based on a combination of yours and the one i was late providing, i've tested it several times with the three options.
What are you thoughts? Try it out and if it works update your code detail with it, my mini-tutorial can be linked complementary to it
EDIT I just remembered/experienced that CWM (5.0.2.7 afaik) has a bug in which it doesn't provide the right datetime. So the archive feature may be broken until that is fixed. http://forum.xda-developers.com/showthread.php?p=19689193#post19689193 - mine shows several years off "jan 01, 2005 01:00" and the archives overwrite themselves... perhaps we need to serialize/number rather than date
SenseiSimple said:
Your version still didn't work for me, same issue i was facing with mine.
Click to expand...
Click to collapse
What issue? It worked great for me.
SenseiSimple said:
EDIT I just remembered/experienced that CWM (5.0.2.7 afaik) has a bug in which it doesn't provide the right datetime. So the archive feature may be broken until that is fixed. http://forum.xda-developers.com/showthread.php?p=19689193#post19689193 - mine shows several years off "jan 01, 2005 01:00" and the archives overwrite themselves... perhaps we need to serialize/number rather than date
Click to expand...
Click to collapse
IIRC, Jan 1 2005 is the date you get when you pull the battery. Apparently it resets the internal clock on the device. When doing a normal reboot or power down the current date is retained.
Anyhow, yours looks fine. I'll test it out later today and will edit my top post with your revision.
toadlife said:
What issue? It worked great for me.
IIRC, Jan 1 2005 is the date you get when you pull the battery. Apparently it resets the internal clock on the device. When doing a normal reboot or power down the current date is retained.
Anyhow, yours looks fine. I'll test it out later today and will edit my top post with your revision.
Click to expand...
Click to collapse
Cool thanks, sorry for the delay. about the time, i had indeed recently pulled the battery without booting in between.
The issue i had with my original script and yours was something to do with busybox applets/builtins between /tmp/busybox and /sbin/busybox... i'm not sure what version of busybox i had included with my rom, but i substituted mine with yours (mine was 1.9MB which i've noticed in a few different roms, yours and the one in ICS releases are 2MB), and for good measure combined our two scripts, everything magically came together, oddly enough with the combined script, both busybox versions work.

Aroma, Edify, updater script Question and Answer thread.

This thread is intended for those of you who are currently creating updater scripts or using Aroma and need some help with your scripts. Be it syntax errors, or things just not working properly. Here you can post your script and get some quick-time help to get your work up and running. I have notified Amarullz, the creator of Aroma, and he will be dropping by here as well to help guide you on your way.
The reason I created this thread is to not clutter up the original Aroma thread will questions on Syntax errors. There were enough posts in there that I felt a dedicated thread was justified.
Click to expand...
Click to collapse
More stuff to come...
If you do not know what AROMA is then you are missing out. Check out the Installer here, created by Amarullz
Original Aroma Thread:
[MOD][2.00] AROMA Installer :: 120425-020 :: Open Source​
List of stuff pasted from the original Aroma thread, thanks to Amarullz​
Prop File FormatThe prop file format was simple plain text format with (=) token as delimiter between key and values, and newline as delimiter between one key=values with another key=values.
Code:
key1=value1
key2=value2
key_3=value3
last.name=amarullz
It can be easily accessed with file_getprop in updater-script like this:
Code:
file_getprop("example.prop","key1");
With above code, the file_getprop function will return the value of key1, it will returned "value1". We can use it for our needs in if/if else statement. We can use others characters in keys, like dot (.) and underscore, but please be careful, that you don't add some quotes in the values. Here the wrong prop file format:
Code:
key1="value1" [COLOR="Red"]# add quotes[/COLOR]
key2="value2" [COLOR="Red"]# add quotes[/COLOR]
first name=james [COLOR="Red"]# Key name with space[/COLOR]
AROMA Installer Default Prop Temporary Locations
When playing with AROMA Installer aroma-config files, almost all things that manipulated prop files will be saved relatively on AROMA temporary directory located in /tmp/aroma-data/, so if we pass the prop filename like this: writetmpfile("test.prop","key1=ok");, the test.prop will be located at /tmp/aroma-data/test.prop.
Quick Example
In this example case, the aroma-config will create temporary prop file that will be readed by updater-script:
aroma-config:
Code:
writetmpfile(
"kernel.prop",
"snq =yes\n"+
"call.2way=no\n"
);
updater-script:
Code:
if
file_getprop("/tmp/aroma-data/kernel.prop","snq") == "yes"
then
# Install Kernel
write_raw_image("/tmp/boot.img", "boot");
endif;
if
file_getprop("/tmp/aroma-data/kernel.prop","call.2way") == "yes"
then
# Do Something here
else
# Do Something here
endif;
With this feature, it's enough to archive customizable installation, and the aroma-config will be able to communicate with updater-script.​
EDIFY SCRIPT
Edify Script was simple script sintax to configure the behavior of binaries executable. In AROMA Installer, there is 2 edify script in the META-INF/com/google/android folder. The aroma-config and updater-script. Both files has it own use, and accessed by different binary executable, but use the same sintax, It's called edify.
The aroma-config used to configuring the UI in AROMA Installer, it will accessed directly by AROMA Binary Executable ( update-binary ), and updater-script will be used to configuring commands for installations (extract files, create symlinks, change permissions, format, mount, etc), and will be accessed directly by update-binary-installer. This couple script use the same sintax but have different functions that can be used.​Basic Edify SintaxEdify Script was function base script, similar to C language, but without any supported statement except if else. You also can't create function, only bundled functions available for the script. All commands will call functions name with some arguments, and ends by semicolon, like this:
Code:
function_name( argument1, argument2, argument3 );
Edify also supporting simple concat-ing string, just like some other languages like Javascript or Java. Using plus (+).
Code:
function_name("Concat this " + "Strings" + " as one argument");
All Edify function's arguments was in type string. Edify doesn't support others data type, however, we can insert some integer values into arguments, but it in the fact it will be treated as string.
Code:
function_name( 50, 20, "55" );
We can't do any math calculation in edify script, so the script below is invalid:
Code:
function_name( 50 + 50 );
If you use the string with plus operator, it will only concat the strings just like the 2nd example:
Code:
function_name( "50" + "50" ); [COLOR="Green"]# Result = "5050"[/COLOR]
For commenting the code, we can use the sign character (#), only line comment was supported, just like an unix shell comment sintax:
Code:
[B]# This is comments[/B]
function_name("Lorem ipsum dolore…");
Code writing isn't strict, so we can safely use space or new line between function and arguments:
Code:
function_name(
"First Argument",
getvar("config"),
"Third Argument"
);
The functions in Edify Script can returned values. But just like an arguments, it's only supported string type data. The good thing is this String can be converted into Boolean for conditions need. The string with contents will have true Boolean, and the empty string will have false Boolean.
"" = false
"1" = true
"yes" = true
"no" = true
"0" = true
Control StructuresEdify only supported limited control structure. Only if, and if else supported. But this control structures is enough to make an interactive installer. The basic sintax of if structure is:
Code:
if
"comparison"=="comparison"
then
.. commands ..
endif;
And for if else structure is:
Code:
if
"comparison"=="comparison"
then
.. true commands ..
else
.. false commands ..
endif;
We don't have any looping control structure, the Next and Back features in Wizard UI was handled by program automatically.​Comparison & Logical OperatorsEdify script doesn't supporting arithmetic operators, but it supported simple comparison and logical operators, Just like other programming languages base on C (java, php, javascript). It use simple operator sintax:
Code:
# Equal
val1 == val2
# Not Equal
val1 != val2
# Or
val1 || val2
# And
val1 && val2
# Not
!val1
# Logical & Comparison
(val1 == val2)||(val3 != val4)
(val1 == val2)&&(val3 != val4)
!((val1 == val2)&&(val3 != val4))
Yes, it doesn't support less than and greater than comparison, because it's only supported with string and Boolean string only. For Integer comparison use cmp function, but it's only supported in aroma-config script.​String and Escape CharactersFortunately Edify support common string sintax. It's also supported escape characters for newline. The string in Edify defined with double quoted (") and ended with double quoted. Here the basic manipulation of string in Edify:
Code:
# Newline use \n:
"Hi, AROMA Installer is\nAWSOME!!!"
# Concat multiple lines:
"Lorem Ipsum Dolore sit\n"+
"Amet, lorem ipsum dolore\n"+
"sit amet, lorem ipsum\n"+
"dolore sit amet."
# Escape Characters:
"You can add\tTabs, \" Quote, \\ Backslash…"
# Hex Characters:
"It was character A : \x41"
Not Supported Operators in EdifyThere is a lot of operator features in common programming languages that not supported by edify, like assignment operator for inserting something into variable, bitwise operator for manipulating bits within integer, and arithmetic operators for doing simple math calculations.
All this limited has been added via functions (except bitwise), but only available for aroma-config script, and only simple operations supported.​
What UI's AROMA Installer Supported
AROMA Installer had 4 main type of Customizable User Interfaces, the Wizard UI, Dialog UI, Splash UI and Installer UI. And un-customizable Menu UI for selecting About, Help, Tools and Quit Installer.​Wizard UI
The Wizard UI was the main User Interface in AROMA Installer, it's contain Back and Next button in navigation bar just like Computer common Installer programs (Windows Installer, NSIS Install System, InstallShield). Users can navigate trough the screens, or back to previous screens if something not right in configurations. Users can select Typical or Customize installations, and Users can customize what packages to install.
AROMA Installer support many Wizard UI, and here the completed list of it's UI:
checkbox – UI to show checkboxes in groupable list, the selected items will be saved in prop format, and can be accessed with file_getprop.
selectbox – It's like checkbox, but it's only able to check 1 items per group.
textbox – It will show the textbox, you can read text file to show it into the textbox
viewbox – It's like Textbox, but not scrollable, and only supported limited text length
agreebox – It's like Textbox, but with agree checkbox, user can't step to next page if the checkbox not already checked. Useful to show License or Terms of Use Interface.
menubox – This UI will show list of menu to select, there is no Next button, because when User select the item, it will automatically step into next page. And The selected menu will be saved in temporary prop file.
Dialog UIWhile Wizard UI will shown it's interface in Fullscreen, the Dialog UI will shown it's interface in Popup Window, It was useful for some needs, like show confirmation for "Are You Sure want to format the partitions?", or show Alert Dialog for "Thanks for using my ROM". Here the complete list of Dialog UI in AROMA Installer:
alert – Show popup dialog, with limited text length and Only the OK button.
confirm – Show popup dialog, with limited text length and contains 2 customizable Button "Yes" and "No", with return value true for "Yes" and false for "No".
textdialog – Show scrollable text popup dialog, with long text length support and Only OK Button.
Splash UIThis UI Simply show the Splash Screen from png files with custom delay before it show next page. The image will automatically position in center of screen depended from it's image size. The background will be blended in blur and darkest color.​Installer UIWhen configuration invoke the install UI, it will start an installation, and show the installer UI with description text on top window, textbox for installer information in middle, and progress text and bar in bottom of screen. The installation will not cancelable, and there is no buttons or menu to select before installation finished, The Next and Save Logs button will be shown after installation finished. And next Wizard UI can't do Back command beyond this installer UI, so the Installer UI will only shown once time only in flash process.​
What Functions AROMA Installer SupportedThere is so many functions that you can used for your needs, The available functions was the common functions that may be usable for installations, but not supported very complex things. AROMA Installer support simple comparison, math, system partition information, and simple set and get variables.
Here the list of functions that you can used:
setcolor – Set UI Color Scheme
ini_set – Set Aroma Configuration settings
calibrate – Calibrating Touch Screen
getvar – Get Variable
setvar – Set Variable
appendvar – Append string into variable
prependvar – Prepend string into variable
file_getprop – Get prop value of some key from prop file.
readfile – Read text file from zip content
readfile_aroma – Read text file from zip content relatively from aroma META-INF folder.
getdisksize – Get partition total size
getdiskfree – Get partition free size
getdiskusedpercent – Get partition used size in percentage
cmp – Simple integer comparison ( >, <, ==, >=, <=, != )
cal – Simple math calculator ( +, -, /, * )
iif – Inline if
if else – If and Else Statement
pleasewait – Show please wait/loading progress when calculating/doing hard process that took a lot of time.
writetmpfile – Write/create temporary file with text contents
exit – terminate installation.
Custom Fonts
You can customize your AROMA Installer Fonts. The AROMA Installer use 2 type of fonts "Big" and "Small", the Big font used in Title and the Small Font used in almost any controls. To use the custom fonts, copy the big.png or small.png into META-INF/com/google/android/aroma/fonts.
List of Custom Fonts Currently Available to Download - by amarullz
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
​Download Custom Fonts ( 5 Fonts ) [+]​Create Your Own Font
You can also create your own fonts, it was plain png (32 bit color depth). All letter was arranged in ASCII order Start from ASCII 32 (space) to ASCII 95 ( ~ char) then ( © - Copyright ) character.
Here the letter list:
Code:
!”#$%&’()*+,-./0123456789:;<=>[email protected] JKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~©
In the first row picture, there is pixel to seperate one letter to next letter, because AROMA Installer didn't use fixed size fonts ( console fonts like courier ). The fonts will rendering from 2nd row into end of rows. Here the example:
NOTE: AROMA Installer only need alpha channel for this, the color of fonts will using the AROMA color scheme defined in aroma-config. The width separator (in first row pixel) should be full opaque (alpha=100% or 255).
If you make your own fonts, please fell free to post here...​Other Custom Fonts
You can also use third party custom fonts created by other xda-developers users. Here some custom font list:
Monospace Font - by mickey-r
Click to expand...
Click to collapse
Functions Reference
__________________________________________________________________________________________________________
amarullz said:
CONFIGURATION FUNCTIONS
setcolor
Descriptions:
Set AROMA Installer Color Scheme. It can also defined in themes with theme.prop file
Sintax:
void setcolor(colorname, hexcolor);
Parameters:
colorname - Name of color to be set. colorname with "_g" for gradient color.
winbg, winbg_g : Main/Top Most Window Backgroud
winfg : Main/Top Most Window Text Foreground
winfg_gray : Main/Top Most Window Gray Text Foreground
dialogbg, dialogbg_g : Popup Window Backgroud (Alert, Confirm, About)
dialogfg : Popup Window Text Foreground
textbg, textbg_g : Textbox, Checkbox, and any scrollable UI Background
textfg : Textbox, Checkbox, and any scrollable UI Text Foreground
textfg_gray : Gray Text ( on Optionbox/Checkbox Item Description )
controlbg, controlbg_g : Control / Button / Checkbox border - Background Color
controlfg : Button Text Color
selectbg, selectbg_g : Selected Element Background ( Pushed/focused Button/items, etc )
selectfg : Selected Element Text/Foreground Color
titlebg, titlebg_g : Window Title Background
titlefg : Window Title Text Foreground Color
navbg, navbg_g : Bottom Bar (Navigation Bar) Background. Next-Previous Area
scrollbar : Scrollbar indicator color
border, border_g : Common Border Color
progressglow : Progress Animation Color
hexcolor - Hexadecimal Color in RGB. it support 3 and 6 characters hexadecimal started with #. example: "#a8e" or "#ff5599".
Return Value: none
Examples:
Code:
# Set Color with 3 chars hexcolor
setcolor("winbg", "#444");
setcolor("winbg_g", "#222");
setcolor("textbg", "#333");
setcolor("textfg", "#fff");
# Set Color with 6 chars hexcolor
setcolor("textfg_gray", "#bbbbbb");
setcolor("controlbg", "#446699");
setcolor("controlbg_g", "#223355");
ini_set
Descriptions:
Sets the value of a AROMA Installer configuration option
Sintax:
void setcolor(configname, newvalue);
Parameters:
configname - Configuration name to be set.
roundsize : Set Corner size of rounded rectangle for common controls (default:"3")
button_roundsize: Set Corner size of rounded rectangle for button controls (default:"2")
window_roundsize : Set Corner size of rounded rectangle for main window (default:"4")
transition_frame : Set number of frames for transition (default:"5")
text_ok : Set text for common OK text (default:"OK")
text_next : Set text for wizard next button (default:"Next >")
text_back : Set text for wizard back button (default:"< Back")
text_yes : Set text for default yes button (default:"Yes")
text_no : Set text for default no button (default:"No")
text_about : Set text for About menu (default:"About & Informations")
text_calibrating : Set text for Calibration Menu (default:"Calibrating Tools")
text_quit : Set text for Quit Menu (default:"Quit Installation")
text_quit_msg : Set text for Quit Confirmation Message (default:"Are you sure to quit the Installer?")
rom_name : Set ROM Name Information
rom_version : Set ROM Version Information
rom_author : Set ROM Author Information
rom_device : Set ROM Device Information
customkeycode_up : Set Alternative keycode for up key (navigate up)
customkeycode_down : Set Alternative keycode for down key (navigate down)
customkeycode_select : Set Alternative keycode for select key (select an item)
customkeycode_back : Set Alternative keycode for back key
customkeycode_menu : Set Alternative keycode for menu key
newvalue - New value to be set for configname
Return Value: none
Examples:
Code:
# Set ROM Informations
ini_set("rom_name", "AROMA ROM");
ini_set("rom_version", "1.0");
ini_set("rom_author", "amarullz");
ini_set("rom_device", "HTC Desire (bravo)");
# Set Custom Text
ini_set("text_ok", "OK Man");
ini_set("text_next", ">>");
ini_set("text_back", "<<");
# Set Alternative Key Code - You can use keycapture tool
# to capture your device keycode
ini_set("customkeycode_up", "115");
ini_set("customkeycode_down", "114");
ini_set("customkeycode_select", "116");
ini_set("customkeycode_menu", "229");
ini_set("customkeycode_back", "158");
calibrate
Descriptions:
Set Touch Screen Calibration Data. Different device may had different touch screen calibration data. To get calibration data, press menu, select calibration tools then follow the intructions.
Sintax:
void calibrate(divx, addx, divy, addy [, alternative_method]);
Parameters:
divx - Division value for horizontal touchscreen to display resolution.
addx - Add value for horizontal alignment.
divy - Division value for vertical touchscreen to display resolution.
addy - Add value for vertical alignment.
alternative_method [Optional] - Use alternative method for touch screen handling if normal method not works in your device (default:"no")
Return Value: none
Examples:
Code:
# HTC Desire Calibrated Data
calibrate("7.90","20","7.90","20");
# Alternative method Calibrated Data
calibration("1.8447", "37", "1.2158", "27", "yes");
calibtool
Descriptions:
Start calibration tool.
Sintax:
void calibtool(dummy_arguments);
Parameters:
dummy_arguments - Edify should pass at least 1 arguments. Just Pass "" for it
Return Value: none
Examples:
Code:
# Start Calibrating Tools
calibtool("");
theme
Descriptions:
Set AROMA Installer Theme will be used in next display.
Sintax:
void theme(theme_name);
Parameters:
theme_name - Theme Name will be used. It was theme directory name located in "META-INF/com/google/android/aroma/themes"
Return Value: none
Examples:
Code:
# Use ICS Theme located at:
# META-INF/com/google/android/aroma/themes/ics
theme("ics");
VARIABLE FUNCTIONS
getvar
Descriptions:
Get Variable
Sintax:
variable_value getvar(varname);
Parameters:
varname - Variable Name
Return Value: Variable Value
Examples:
Code:
# Show "testvar" value in alert
alert(
"Value of testvar",
getvar("testvar")
);
setvar
Descriptions:
Set Variable
Sintax:
void setvar(varname, value);
Parameters:
varname - Variable Name to be set
value - New Value for Variable
Return Value: none
Examples:
Code:
# Set new value for "testvar"
setvar("testvar", "This is only test!!");
# Now Show the "testvar" value in alert
alert(
"Value of testvar",
getvar("testvar")
);
appendvar
Descriptions:
Append new value after previous value, it's like concating strings ( previous_value + newvalue )
Sintax:
void appendvar(varname, value);
Parameters:
varname - Variable Name to be set
value - New Value to be appended in variable
Return Value: none
Examples:
Code:
# Set new value for "testvar"
setvar("testvar", "This is only test!!");
# Append new value
appendvar("testvar", "Add String");
# "testvar" now will contain "This is only test!!Add String"
prependvar
Descriptions:
Prepend new value before previous value, it's like concating strings ( newvalue + previous_value )
Sintax:
void prependvar(varname, value);
Parameters:
varname - Variable Name to be set
value - New Value to be prepended in variable
Return Value: none
Examples:
Code:
# Set new value for "testvar"
setvar("testvar", "This is only test!!");
# Prepend new value
prependvar("testvar", "Add String!! ");
# "testvar" now will contain "Add String!! This is only test!!"
PROP FILE HANDLER FUNCTIONS
file_getprop
Descriptions:
Read prop file value for given keyname
Sintax:
prop_value file_getprop(filename, keyname);
Parameters:
filename - Absolute path of prop file in filesystem
keyname - Prop Key Name
Return Value: Value of prop for given keyname
Examples:
Code:
# Get value of "item.1.1" from /tmp/aroma-data/custom.prop
alert(
"Value of Prop",
file_getprop("/tmp/aroma-data/custom.prop", "item.1.1")
);
prop
Descriptions:
Same with file_getprop, but will read relatively from AROMA Temporary Directory "/tmp/aroma-data/"
Sintax:
prop_value prop(filename, keyname);
Parameters:
filename - Relative path of prop file in AROMA Temporary Directory "/tmp/aroma-data/"
keyname - Prop Key Name
Return Value: Value of prop for given keyname
Examples:
Code:
# Get value of "item.1.1" from /tmp/aroma-data/custom.prop
alert(
"Value of Prop",
prop("custom.prop", "item.1.1")
);
zipprop
Descriptions:
Same with file_getprop, but will read the prop file from Zip
Sintax:
prop_value zipprop(zip_path, keyname);
Parameters:
zip_path - Absolute path of prop file in Zip ( don't add "/" in first character )
keyname - Prop Key Name
Return Value: Value of prop for given keyname
Examples:
Code:
# Get value of "item.1.1" from META-INF/com/google/android/aroma/custom.prop
alert(
"Value of Prop",
zipprop("META-INF/com/google/android/aroma/custom.prop", "item.1.1")
);
resprop
Descriptions:
Same with zipprop, but will read the prop file from Zip relatively from AROMA Resource Directory "META-INF/com/google/android/aroma/"
Sintax:
prop_value resprop(zip_path, keyname);
Parameters:
zip_path - Relative path of prop file in Zip from AROMA Resource Directory "META-INF/com/google/android/aroma/"
keyname - Prop Key Name
Return Value: Value of prop for given keyname
Examples:
Code:
# Get value of "item.1.1" from META-INF/com/google/android/aroma/custom.prop
alert(
"Value of Prop",
resprop("custom.prop", "item.1.1")
);
sysprop, property_get
Descriptions:
Read system property value for given keyname
Sintax:
prop_value property_get(keyname);
prop_value sysprop(keyname);
Parameters:
keyname - Prop Key Name
Return Value: Value of prop for given keyname
Examples:
Code:
# Get Device Board Name
alert(
"Device Board Name",
sysprop("ro.product.board")
);
# Get Board Platform
alert(
"Device Board Name",
property_get("ro.board.platform")
);
FILESYSTEM FUNCTIONS
writetmpfile
Descriptions:
Write string into file in AROMA temporary
Sintax:
void writetmpfile(filename, value);
Parameters:
filename - Destination file in AROMA temporary directory
value - String that will be write into the file
Return Value: none
Examples:
Code:
# It will saved in from /tmp/aroma-data/test.txt
writetmpfile("test.txt", "This is test text");
# Show the content in alert with readtmpfile
alert(
"Value of test.txt",
readtmpfile("test.txt")
);
# Show the content in alert with read
alert(
"Value of test.txt",
read("/tmp/aroma-data/test.txt")
);
write
Descriptions:
Write string into file in filesystem
Sintax:
void write(filename, value);
Parameters:
filename - Absolute path to Destination file
value - String that will be write into the file
Return Value: none
Examples:
Code:
# It will saved in from /sdcard/test.txt
writetmpfile("/sdcard/test.txt", "This is test text");
# Show the content in alert with read
alert(
"Value of test.txt",
read("/sdcard/test.txt")
);
readtmpfile
Descriptions:
Read string from file in AROMA temporary directory
Sintax:
content_of_file readtmpfile(filename);
Parameters:
filename - File in AROMA temporary directory that will be readed
Return Value: Content of file in String
Examples:
Code:
# It will read data from /tmp/aroma-data/test.txt
# then save it in variable
setvar(
"testvar",
readtmpfile("test.txt")
);
read
Descriptions:
Read string from file in filesysten
Sintax:
content_of_file read(filename);
Parameters:
filename - Absolute path to Destination file that will be readed
Return Value: Content of file in String
Examples:
Code:
# It will read data from /sdcard/test.txt
# then save it in variable
setvar(
"testvar",
read("/sdcard/test.txt")
);
ZIP CONTENT HANDLING FUNCTIONS
readfile
DEPRECATED!!! - Identical with zipread. Will be deleted soon.​
readfile_aroma
DEPRECATED!!! - Identical with resread. Will be deleted soon.​
zipread
Descriptions:
Read string from file in zip
Sintax:
content_of_file zipread(zip_path);
Parameters:
zip_path - Absolute path to Destination file in zip that will be readed
Return Value: Content of file in String
Examples:
Code:
# It will read data from zip content "META-INF/com/google/android/aroma/text.txt"
# then save it in variable
setvar(
"testvar",
zipread("META-INF/com/google/android/aroma/text.txt")
);
# It will read data from zip content "tmp/text.txt"
# then save it in variable
setvar(
"testvar2",
zipread("tmp/text.txt")
);
resread
Descriptions:
Read string from file in zip relatively from AROMA Resource Directory "META-INF/com/google/android/aroma/"
Sintax:
content_of_file resread(zip_path);
Parameters:
zip_path - Relative path of file in Zip from AROMA Resource Directory "META-INF/com/google/android/aroma/" that will be readed
Return Value: Content of file in String
Examples:
Code:
# It will read data from zip content "META-INF/com/google/android/aroma/text.txt"
# then save it in variable
setvar(
"testvar",
resread("text.txt")
);
ZIP EXTRACT FUNCTIONS
ziptotmp
Descriptions:
Extract file from zip content into AROMA Temporary directory, and automatically chmod it for executable.
Sintax:
void ziptotmp(zip_path, destination_name);
Parameters:
zip_path - Absolute path to Destination file in zip that will be extracted
destination_name - Extracted target filename
Return Value: none
Examples:
Code:
# It will extract "tmp/busybox" into "/tmp/aroma-data/busybox"
ziptotmp("tmp/busybox", "busybox");
# Now we can execute it
exec("/tmp/aroma-data/busybox","ls","-l");
restotmp
Descriptions:
Extract file from zip content in AROMA Resource Directory "META-INF/com/google/android/aroma/" into AROMA Temporary directory, and automatically chmod it for executable.
Sintax:
void restotmp(zip_path, destination_name);
Parameters:
zip_path - Relative path of file in Zip from AROMA Resource Directory "META-INF/com/google/android/aroma/" that will be extracted
destination_name - Extracted target filename
Return Value: none
Examples:
Code:
# It will extract "META-INF/com/google/android/aroma/busybox" into "/tmp/aroma-data/busybox"
restotmp("busybox", "busybox");
# Now we can execute it
exec("/tmp/aroma-data/busybox","ls","-l");
EXEC FUNCTIONS
zipexec
Descriptions:
Extract file from zip into AROMA temporary, chmod it, and execute it.
Sintax:
exit_status zipexec(zip_path [, argument1, argument2, ... ]);
Parameters:
zip_path - Absolute path of zip content that will be executed
arguments [Optional] - Command line Arguments
Return Value: Return exit status. "0" for common success status
The output buffer/stdout will be automatically saved into "exec_buffer"
Examples:
Code:
# It will extract and run "META-INF/com/google/android/aroma/test.sh"
zipexec("META-INF/com/google/android/aroma/test.sh");
# With Arguments
zipexec("META-INF/com/google/android/aroma/test.sh", "argument1", "argument2");
# Get Return Status
if
zipexec("META-INF/com/google/android/aroma/test.sh") == "0"
then
alert(
"Exec Status",
"Shell was executed successfully"
);
endif;
# Get STDOUT
zipexec("META-INF/com/google/android/aroma/test.sh");
alert(
"Exec STDOUT",
getvar("exec_buffer")
);
resexec
Descriptions:
Same as zipexec, but it will extract and run the file from zip relatively from AROMA Resource Directory "META-INF/com/google/android/aroma"
Sintax:
exit_status resexec(zip_path [, argument1, argument2, ... ]);
Parameters:
zip_path - Relative path of zip content from AROMA Resource Directory "META-INF/com/google/android/aroma/" that will be executed
arguments [Optional] - Command line Arguments
Return Value: Return exit status. "0" for common success status
The output buffer/stdout will be automatically saved into "exec_buffer"
Examples:
Code:
# It will extract and run "META-INF/com/google/android/aroma/test.sh"
resexec("test.sh");
# With Arguments
resexec("test.sh", "argument1", "argument2");
# Get Return Status
if
resexec("test.sh") == "0"
then
alert(
"Exec Status",
"Shell was executed successfully"
);
endif;
# Get STDOUT
resexec("test.sh");
alert(
"Exec STDOUT",
getvar("exec_buffer")
);
run_program, exec
Descriptions:
Run executable from filesystem
Sintax:
exit_status run_program(path [, argument1, argument2, ... ]);
exit_status exec(path [, argument1, argument2, ... ]);
Parameters:
zip_path - Absolute path to executable
arguments [Optional] - Command line Arguments
Return Value: Return exit status. "0" for common success status
The output buffer/stdout will be automatically saved into "exec_buffer"
Examples:
Code:
# It will run "ls" command
run_program("/sbin/ls");
# or
exec("/sbin/ls");
# With some Arguments
run_program("/sbin/ls", "-l", "/sdcard");
# Mounting Device
exec("/sbin/mount", "-t", "auto", "/system");
# Get Return Status
if
exec("/sbin/mount", "-t", "auto", "/system") == "0"
then
alert(
"Exec Status",
"Mount was executed successfully"
);
endif;
# Get STDOUT
exec("/sbin/ls", "-l", "/sdcard/*.zip");
alert(
"List of Zip in SDCARD",
getvar("exec_buffer")
);
Click to expand...
Click to collapse
XDA forum topic on Edify Script Syntax:
Edify script language​​
Tutorial on Edify Script Syntax
[TUT] Edify Installation Script Syntax's​​
Information on Edify scripts and CWM
[INFO] Edify scripts in CWM recovery ​​
Aroma Log/Tmp Puller V1
This can pull log files/tmp files and other files from an aroma execution. It also allows packaging of just aroma or whole rom files
Aroma Log/Tmp Puller V1
By: Kevinrocksman​​
Common Errors
This post is intended to display the most common errors made while writing a script:
1.
Adding that damn extra comma that we all know you do not need:
Code:
selectbox(
#-- Title
"Main Title",
#-- Sub Title
"Your lovely subtitle:",
#-- Icon: <AROMA Resource Dir>/icons/default.png or <ThemeDir>/icon.default.png
"@default",
#-- Will be saved in /tmp/aroma/mods.prop
"mods.prop",
#----------------[ Selectbox With Groups ]--------------------#
# TITLE | SUBTITLE | Initial Value #
#-------------+------------------------------------+-----------------#
"Words", "", 2, #-- Group 1. key = "selected.1"
"Words", "", 1, #-- selected.1 = 1
"Words", "", 0 #-- selected.1 = 2
);
NO COMMA AFTER THAT LAST '0'​
****************************************************************************************************************************************
****************************************************************************************************************************************
****************************************************************************************************************************************
****************************************************************************************************************************************
2.
End all of your if statements:
Code:
if
something then
if
something then
Do stuff
stuff happens
endif;
endif;
Many nested if statements can be difficult to track, and it is very easy to forget to end them all.
You can go down your list of code to count your if and endif statements.
When I write code and write any ifs, I also write the endif so I do not forget to add it later.
If you get a random syntax error on the LAST LINE of your script, it is usually caused by an expected end statement.​
************************************************** ************************************************** ************************************
************************************************** ************************************************** ************************************
************************************************** ************************************************** ************************************
************************************************** ************************************************** ************************************
3.
Selected options are not executed but no error is reported.
aroma-config
Code:
menubox(
#-- Title
"Would you like to rdo stuff?",
#-- Sub Title
"Please Select:",
#-- Icon
"icons/apps",
#-- Will be saved in /tmp/aroma/whatever.prop
"whatever.prop",
#-------------------------+-----------------[ Menubox Items ]-------------------+---------------#
# TITLE | SUBTITLE | Something #
#-------------------------+-----------------------------------------------------------+-----------------#
"Option 1","This will do some stuff",0, #-- selected.0
"Option 2","This will something different",0, #-- selected.0
"Option 4","This will probably explode",0, #-- selected.0
"Option 4!","This option doesn't do sh*t but you can select if you want",1 #-- selected.0
);
Notice #-- selected.0
updater-script
Code:
if prop("whatever.prop","selected.0")=="1" then
#-- Do Option 1
alert(
#-- Title
"This is option 1",
#-- Text
"Option 1, do some stuff."
);
Notice the key is selected.0 also. If these are not matched, nothing will happen, or something else will happen depending on the key specified.
Makes sure your key values in your select boxes, check boxes, menu boxes etc. translate properly to your updater-script.​
Here is a way to find out if you have your keys coded correctly:
Turge said:
if you guys use "adb shell" and verify the contents of the prop file before running the install script (or immediately after moving to the next menu), you can see exactly what to expect and update your aroma/updater-script code accordingly:
Code:
adb shell
cat /tmp/aroma/choice.prop
cat /tmp/aroma/tweaks.prop
Click to expand...
Click to collapse
************************************************** ************************************************** ************************************
************************************************** ************************************************** ************************************
************************************************** ************************************************** ************************************
************************************************** ************************************************** ************************************
4. not really an error
icon usage:
Icons of any size can be supplied. But they will automatically be rendered at 72x72 pixels. ​
and this one
another one???
ok, last one...
First lol
Great thread idea! I know you didn't exactly come up with it but glad someone finally decided to post it...
Thanks for all your efforts. Let me kick the start off, my aroma-config is attached since it is long. I get a syntax error in line 744 which doesn't exist, last line is 740. Before that there was a code but I removed it but still get an error in the same line.
abo_mara7 said:
Thanks for all your efforts. Let me kick the start off, my aroma-config is attached since it is long. I get a syntax error in line 744 which doesn't exist, last line is 740. Before that there was a code but I removed it but still get an error in the same line.
Click to expand...
Click to collapse
What error does it give you?
EDIT:
Code:
#-- Uninstall button mapping
if prop("cammode-clean.prop","selected")=="1" then
#-- Confirm Demo 1
if
confirm(
#-- Title
"Stock mapping",
#-- Text
"Are you sure that you want to return to stock button mapping?",
#-- Icon (Optional)
"@info"
)=="yes"
then
alert("Result","Done...");
else
alert("Result","Cancelled...");
endif;
Line 668, I think you need another endif here. You have two 'if' but one 'endif'
a great idea for all us newbie's and the blind!
I have a problem I think we my updater script. for some reason, that I can't see, when it gets to the end after installing the kernel I selected it seems to peform an additional extract of another kernels lib files. Could someone take a look and tell me if they can see what I can't!
Code:
####
## MOUNT & FORMAT
####
ui_print(" ");
ui_print("@Formatting SYSTEM and DATA Partitions");
# unmount
ui_print(" -Unmounting partitions...");
unmount("/system");
unmount("/data");
set_progress(0.05);
# format
ui_print(" -Formatting partitions & cache...");
format("MTD", "system");
format("MTD", "userdata");
format("MTD", "cache");
set_progress(0.1);
# re-mount
ui_print(" -Re-mounting partitions...");
mount("MTD", "system", "/system");
mount("MTD", "userdata", "/data");
set_progress(0.15);
####
## EXTRACT BASE PACKAGES
####
ui_print(" ");
ui_print("@Extracting Base ROM Files");
package_extract_file("check_data_app", "/tmp/check_data_app");
set_perm(0, 0, 0777, "/tmp/check_data_app");
run_program("/tmp/check_data_app");
set_progress(0.20);
ui_print(" -Extracting /data files...");
package_extract_dir("data", "/data");
set_perm(2000, 2000, 0771, "/data/local");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
set_progress(0.25);
ui_print(" -Extracting /system files...");
package_extract_dir("system", "/system");
set_progress(0.3);
####
## EXTRACT SELECTED MODS
####
ui_print(" ");
ui_print("@Extracting Launcher");
# Launcher
if
file_getprop("/tmp/aroma/mods.prop","selected.1") == "1"
then
ui_print(" -Installing SS Launcher (Free Version)..");
package_extract_file("opt/launchers/com.ss.launcher.apk", "/data/app/com.ss.launcher.apk");
endif;
if
file_getprop("/tmp/aroma/mods.prop","selected.1") == "2"
then
ui_print(" -Installing Go Launcher EX...");
package_extract_file("opt/launchers/com.gau.go.launcherex-1.apk", "/data/app/com.gau.go.launcherex-1.apk");
endif;
if
file_getprop("/tmp/aroma/mods.prop","selected.1") == "3"
then
ui_print(" -Installing ADW Launcher (Free Version)...");
package_extract_file("opt/launchers/org.adw.launcher-1.apk", "/data/app/org.adw.launcher-1.apk");
endif;
if
file_getprop("/tmp/aroma/mods.prop","selected.1") == "4"
then
ui_print(" -Installing Rosie Launcher (Ghost Edition)...");
package_extract_file("opt/launchers/Rosie.apk", "/data/app/Rosie.apk");
endif;
if
file_getprop("/tmp/aroma/mods.prop","selected.1") == "5"
then
ui_print(" -Installing AOSP Launcher...");
package_extract_file("opt/launchers/Launcher2.apk", "/data/app/Launcher2.apk");
endif;
if
file_getprop("/tmp/aroma/mods.prop","selected.1") == "6"
then
ui_print(" -Installing Holo Launcher...");
package_extract_file("opt/launchers/com.mobint.hololauncher-1.apk", "/data/app/com.mobint.hololauncher-1.apk");
endif;
set_progress(0.35);
ui_print(" ");
ui_print(" ");
ui_print("@Extracting Statusbar and Animation Mods");
#Statusbar & Animation
if
file_getprop("/tmp/aroma/mods.prop","selected.3") == "1"
then
ui_print(" -Installing Blurange with 4.0 animation...");
package_extract_file("opt/Blurange/SystemUI.apk", "/system/app/SystemUI.apk");
package_extract_file("opt/Blurange/framework-res.apk", "/system/framework/framework-res.apk");
endif;
if
file_getprop("/tmp/aroma/mods.prop","selected.3") == "2"
then
ui_print(" -Installing Black & White with Fly animation...");
package_extract_file("opt/Black&White/SystemUI.apk", "/system/app/SystemUI.apk");
package_extract_file("opt/Black&White/framework-res.apk", "/system/framework/framework-res.apk");
endif;
if
file_getprop("/tmp/aroma/mods.prop","selected.3") == "3"
then
ui_print(" -Installing Colourful with Ruldolf animation...");
package_extract_file("opt/Colourful/SystemUI.apk", "/system/app/SystemUI.apk");
package_extract_file("opt/Colourful/framework-res.apk", "/system/framework/framework-res.apk");
endif;
set_progress(0.4);
####
## EXTRACT ROSIE ADD-ONS
####
ui_print(" ");
ui_print("@Extracting & Installing Add-ons ");
# Rosie Utility
if
file_getprop("/tmp/aroma/customize.prop","item.1.1") == "1"
then
ui_print(" -Installing Rosie Utility add-on...");
package_extract_dir("opt/rosie/app/", "/sytem/app");
endif;
set_progress(0.45);
# Wallpaper Chooser
if
file_getprop("/tmp/aroma/customize.prop","item.1.2") == "1"
then
ui_print(" -Installing Wallpaper Chooser...");
package_extract_dir("opt/wallpaper/app/", "/system/app");
endif;
set_progress(0.5);
ui_print("@Half way there. I hope you're sitting comfortably!");
ui_print("If you're reading this then");
ui_print(". ");
ui_print(".. ");
ui_print("... ");
ui_print(".... ");
set_progress(0.55);
####
## SYMLINKS
####
ui_print(" ");
ui_print("@Configuring SYSTEM Files");
ui_print(" -Creating Toolbox...");
symlink("toolbox", "/system/bin/cat");
symlink("toolbox", "/system/bin/chmod");
symlink("toolbox", "/system/bin/chown");
symlink("toolbox", "/system/bin/chownto");
symlink("toolbox", "/system/bin/cmp");
symlink("toolbox", "/system/bin/date");
symlink("toolbox", "/system/bin/dd");
symlink("toolbox", "/system/bin/df");
symlink("toolbox", "/system/bin/dmesg");
symlink("toolbox", "/system/bin/getevent");
symlink("toolbox", "/system/bin/getprop");
symlink("toolbox", "/system/bin/hd");
symlink("toolbox", "/system/bin/id");
symlink("toolbox", "/system/bin/ifconfig");
symlink("toolbox", "/system/bin/iftop");
symlink("toolbox", "/system/bin/insmod");
symlink("toolbox", "/system/bin/ioctl");
symlink("toolbox", "/system/bin/ionice");
symlink("toolbox", "/system/bin/kill");
symlink("toolbox", "/system/bin/ln");
symlink("toolbox", "/system/bin/log");
symlink("toolbox", "/system/bin/ls");
symlink("toolbox", "/system/bin/lsmod");
symlink("toolbox", "/system/bin/lsof");
symlink("toolbox", "/system/bin/mkdir");
symlink("toolbox", "/system/bin/mount");
symlink("toolbox", "/system/bin/mv");
symlink("toolbox", "/system/bin/nandread");
symlink("toolbox", "/system/bin/netstat");
symlink("toolbox", "/system/bin/newfs_msdos");
symlink("toolbox", "/system/bin/notify");
symlink("toolbox", "/system/bin/printenv");
symlink("toolbox", "/system/bin/ps");
symlink("toolbox", "/system/bin/renice");
symlink("toolbox", "/system/bin/rm");
symlink("toolbox", "/system/bin/rmdir");
symlink("toolbox", "/system/bin/rmmod");
symlink("toolbox", "/system/bin/route");
symlink("toolbox", "/system/bin/schedtop");
symlink("toolbox", "/system/bin/sendevent");
symlink("toolbox", "/system/bin/setconsole");
symlink("toolbox", "/system/bin/setprop");
symlink("toolbox", "/system/bin/sleep");
symlink("toolbox", "/system/bin/smd");
symlink("toolbox", "/system/bin/start");
symlink("toolbox", "/system/bin/stop");
symlink("toolbox", "/system/bin/sync");
symlink("toolbox", "/system/bin/top");
symlink("toolbox", "/system/bin/umount");
symlink("toolbox", "/system/bin/uptime");
symlink("toolbox", "/system/bin/vmstat");
symlink("toolbox", "/system/bin/watchprops");
symlink("toolbox", "/system/bin/wipe");
set_progress(0.60);
####
## ACCESS CONTROL & PERMISSIONS
####
ui_print(" ");
ui_print("@Configuring Access Control Lists");
ui_print(" -Configuring Busybox...");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 0, 0777, 0777, "/system/etc/init.d");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
set_perm(0, 3003, 06755, "/system/bin/ip");
set_perm(0, 3003, 02750, "/system/bin/netcfg");
set_perm(0, 3004, 02755, "/system/bin/ping");
set_perm(0, 2000, 06750, "/system/bin/run-as");
set_progress(0.65);
set_perm_recursive(1002, 1002, 0755, 0440, "/system/etc/bluetooth");
set_perm(0, 0, 0755, "/system/etc/bluetooth");
set_perm(1000, 1000, 0640, "/system/etc/bluetooth/auto_pairing.conf");
set_perm(3002, 3002, 0444, "/system/etc/bluetooth/blacklist.conf");
set_perm(1002, 1002, 0440, "/system/etc/dbus.conf");
set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
set_perm(0, 0, 06755, "/system/bin/su");
symlink("/system/bin/su", "/system/xbin/su");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 1000, 0755, "/system/xbin/busybox");
symlink("/system/xbin/busybox", "/system/bin/busybox");
set_progress(0.70);
####
## EXTRACT SELECTED KERNEL
####
ui_print(" ");
ui_print("@Extracting & Installing Selected Kernel Package");
#Underworld w/SBC
if
file_getprop("/tmp/aroma/mods.prop","selected.2") == "1"
then
ui_print(" -Installing Underworld Kernel w/SBC...");
assert(package_extract_file("opt/kernels/underworld_sbc/boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
package_extract_dir("opt/kernels/underworld_sbc/system/lib/modules", "/system/lib/modules/");
endif;
#Underworld
if
file_getprop("/tmp/aroma/mods.prop","selected.2") == "2"
then
ui_print(" -Installing Underworld Kernel...");
assert(package_extract_file("opt/kernels/underworld/boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
package_extract_dir("opt/kernels/underworld/system/lib/modules", "/system/lib/modules/");
endif;
#Classic
if
file_getprop("/tmp/aroma/mods.prop","selected.2") == "3"
then
ui_print(" -Installing Classic Kernel...");
assert(package_extract_file("opt/kernels/classic/boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
package_extract_dir("opt/kernels/classic/sytem/lib/modules", "/system/lib/modules/");
endif;
#Classic w/sbc
if
file_getprop("/tmp/aroma/mods.prop","selected.2") == "4"
then
ui_print(" -Installing Classic Kernel w/SBC...");
assert(package_extract_file("opt/kernels/classic_sbc/boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
package_extract_dir("opt/kernels/classic/system/lib/modules", "/system/lib/modules/");
endif;
if
file_getprop("/tmp/aroma/mods.prop","selected.2") == "5"
then
ui_print(" -Installing Lionfish Kernel...");
assert(package_extract_file("opt/kernels/lionfish/boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
package_extract_dir("opt/kernels/lionfish/system/lib/modules", "/system/lib/modules/");
endif;
if
file_getprop("/tmp/aroma/mods.prop","selected.2") == "6"
then
ui_print(" -Installing Lionfish Kernel w/SBC...");
assert(package_extract_file("opt/kernels/lionfish_sbc/boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
package_extract_dir("opt/kernels/lionfish_sbc/system/lib/modules", "/system/lib/modules/");
endif;
set_progress(0.75);
####
## BUSYBOX, DALVIK2SD
####
ui_print(" ");
ui_print("Configuring Base Modifications");
ui_print(" -Extracting busybox...");
package_extract_file("installbusybox", "/tmp/installbusybox");
set_perm(0, 0, 0777, "/tmp/installbusybox");
run_program("/tmp/installbusybox");
set_progress(0.8);
ui_print(" -Moving Dalvik-cache to SD...");
package_extract_file("move_cache_sd", "/tmp/move_cache_sd");
set_perm(0, 0, 0777, "/tmp/move_cache_sd");
run_program("/tmp/move_cache_sd");
set_progress(0.85);
set_progress(0.9);
set_progress(0.95);
####
## INSTALLATION COMPLETE
####
set_progress(1.0);
ui_print(" ");
ui_print("@Finished!");
ui_print("@Urayamashi Installation Complete. A B.o.B is now in your hands");
thanks if anyone can help
Dblfstr said:
What error does it give you?
Click to expand...
Click to collapse
SYNTAX ERROR!!! aroma-config on line 691 col 1 >> Which is the last line,, and it is empty
E:ERROR in /sdcard/.....zip
(Status 1)
Installation aborted
abo_mara7 said:
SYNTAX ERROR!!! aroma-config on line 691 col 1 >> Which is the last line,, and it is empty
E:ERROR in /sdcard/.....zip
(Status 1)
Installation aborted
Click to expand...
Click to collapse
Did you see my edit?
Besides, I had 740 lines? Either way, a syntax error on the last line means it is expecting an "end" there. That does not mean that the "end" should be at the last line, it means that you left an 'end' off else where that it does not recognize until the script is finished. Thus, it reports syntax error on the last line.
Robobob1221 said:
a great idea for all us newbie's and the blind!
I have a problem I think we my updater script. for some reason, that I can't see, when it gets to the end after installing the kernel I selected it seems to peform an additional extract of another kernels lib files. Could someone take a look and tell me if they can see what I can't!
Code:
####
## MOUNT & FORMAT
####
ui_print(" ");
ui_print("@Formatting SYSTEM and DATA Partitions");
# unmount
ui_print(" -Unmounting partitions...");
unmount("/system");
unmount("/data");
set_progress(0.05);
# format
ui_print(" -Formatting partitions & cache...");
format("MTD", "system");
format("MTD", "userdata");
format("MTD", "cache");
set_progress(0.1);
# re-mount
ui_print(" -Re-mounting partitions...");
mount("MTD", "system", "/system");
mount("MTD", "userdata", "/data");
set_progress(0.15);
####
## EXTRACT BASE PACKAGES
####
ui_print(" ");
ui_print("@Extracting Base ROM Files");
package_extract_file("check_data_app", "/tmp/check_data_app");
set_perm(0, 0, 0777, "/tmp/check_data_app");
run_program("/tmp/check_data_app");
set_progress(0.20);
ui_print(" -Extracting /data files...");
package_extract_dir("data", "/data");
set_perm(2000, 2000, 0771, "/data/local");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
set_progress(0.25);
ui_print(" -Extracting /system files...");
package_extract_dir("system", "/system");
set_progress(0.3);
####
## EXTRACT SELECTED MODS
####
ui_print(" ");
ui_print("@Extracting Launcher");
# Launcher
if
file_getprop("/tmp/aroma/mods.prop","selected.1") == "1"
then
ui_print(" -Installing SS Launcher (Free Version)..");
package_extract_file("opt/launchers/com.ss.launcher.apk", "/data/app/com.ss.launcher.apk");
endif;
if
file_getprop("/tmp/aroma/mods.prop","selected.1") == "2"
then
ui_print(" -Installing Go Launcher EX...");
package_extract_file("opt/launchers/com.gau.go.launcherex-1.apk", "/data/app/com.gau.go.launcherex-1.apk");
endif;
if
file_getprop("/tmp/aroma/mods.prop","selected.1") == "3"
then
ui_print(" -Installing ADW Launcher (Free Version)...");
package_extract_file("opt/launchers/org.adw.launcher-1.apk", "/data/app/org.adw.launcher-1.apk");
endif;
if
file_getprop("/tmp/aroma/mods.prop","selected.1") == "4"
then
ui_print(" -Installing Rosie Launcher (Ghost Edition)...");
package_extract_file("opt/launchers/Rosie.apk", "/data/app/Rosie.apk");
endif;
if
file_getprop("/tmp/aroma/mods.prop","selected.1") == "5"
then
ui_print(" -Installing AOSP Launcher...");
package_extract_file("opt/launchers/Launcher2.apk", "/data/app/Launcher2.apk");
endif;
if
file_getprop("/tmp/aroma/mods.prop","selected.1") == "6"
then
ui_print(" -Installing Holo Launcher...");
package_extract_file("opt/launchers/com.mobint.hololauncher-1.apk", "/data/app/com.mobint.hololauncher-1.apk");
endif;
set_progress(0.35);
ui_print(" ");
ui_print(" ");
ui_print("@Extracting Statusbar and Animation Mods");
#Statusbar & Animation
if
file_getprop("/tmp/aroma/mods.prop","selected.3") == "1"
then
ui_print(" -Installing Blurange with 4.0 animation...");
package_extract_file("opt/Blurange/SystemUI.apk", "/system/app/SystemUI.apk");
package_extract_file("opt/Blurange/framework-res.apk", "/system/framework/framework-res.apk");
endif;
if
file_getprop("/tmp/aroma/mods.prop","selected.3") == "2"
then
ui_print(" -Installing Black & White with Fly animation...");
package_extract_file("opt/Black&White/SystemUI.apk", "/system/app/SystemUI.apk");
package_extract_file("opt/Black&White/framework-res.apk", "/system/framework/framework-res.apk");
endif;
if
file_getprop("/tmp/aroma/mods.prop","selected.3") == "3"
then
ui_print(" -Installing Colourful with Ruldolf animation...");
package_extract_file("opt/Colourful/SystemUI.apk", "/system/app/SystemUI.apk");
package_extract_file("opt/Colourful/framework-res.apk", "/system/framework/framework-res.apk");
endif;
set_progress(0.4);
####
## EXTRACT ROSIE ADD-ONS
####
ui_print(" ");
ui_print("@Extracting & Installing Add-ons ");
# Rosie Utility
if
file_getprop("/tmp/aroma/customize.prop","item.1.1") == "1"
then
ui_print(" -Installing Rosie Utility add-on...");
package_extract_dir("opt/rosie/app/", "/sytem/app");
endif;
set_progress(0.45);
# Wallpaper Chooser
if
file_getprop("/tmp/aroma/customize.prop","item.1.2") == "1"
then
ui_print(" -Installing Wallpaper Chooser...");
package_extract_dir("opt/wallpaper/app/", "/system/app");
endif;
set_progress(0.5);
ui_print("@Half way there. I hope you're sitting comfortably!");
ui_print("If you're reading this then");
ui_print(". ");
ui_print(".. ");
ui_print("... ");
ui_print(".... ");
set_progress(0.55);
####
## SYMLINKS
####
ui_print(" ");
ui_print("@Configuring SYSTEM Files");
ui_print(" -Creating Toolbox...");
symlink("toolbox", "/system/bin/cat");
symlink("toolbox", "/system/bin/chmod");
symlink("toolbox", "/system/bin/chown");
symlink("toolbox", "/system/bin/chownto");
symlink("toolbox", "/system/bin/cmp");
symlink("toolbox", "/system/bin/date");
symlink("toolbox", "/system/bin/dd");
symlink("toolbox", "/system/bin/df");
symlink("toolbox", "/system/bin/dmesg");
symlink("toolbox", "/system/bin/getevent");
symlink("toolbox", "/system/bin/getprop");
symlink("toolbox", "/system/bin/hd");
symlink("toolbox", "/system/bin/id");
symlink("toolbox", "/system/bin/ifconfig");
symlink("toolbox", "/system/bin/iftop");
symlink("toolbox", "/system/bin/insmod");
symlink("toolbox", "/system/bin/ioctl");
symlink("toolbox", "/system/bin/ionice");
symlink("toolbox", "/system/bin/kill");
symlink("toolbox", "/system/bin/ln");
symlink("toolbox", "/system/bin/log");
symlink("toolbox", "/system/bin/ls");
symlink("toolbox", "/system/bin/lsmod");
symlink("toolbox", "/system/bin/lsof");
symlink("toolbox", "/system/bin/mkdir");
symlink("toolbox", "/system/bin/mount");
symlink("toolbox", "/system/bin/mv");
symlink("toolbox", "/system/bin/nandread");
symlink("toolbox", "/system/bin/netstat");
symlink("toolbox", "/system/bin/newfs_msdos");
symlink("toolbox", "/system/bin/notify");
symlink("toolbox", "/system/bin/printenv");
symlink("toolbox", "/system/bin/ps");
symlink("toolbox", "/system/bin/renice");
symlink("toolbox", "/system/bin/rm");
symlink("toolbox", "/system/bin/rmdir");
symlink("toolbox", "/system/bin/rmmod");
symlink("toolbox", "/system/bin/route");
symlink("toolbox", "/system/bin/schedtop");
symlink("toolbox", "/system/bin/sendevent");
symlink("toolbox", "/system/bin/setconsole");
symlink("toolbox", "/system/bin/setprop");
symlink("toolbox", "/system/bin/sleep");
symlink("toolbox", "/system/bin/smd");
symlink("toolbox", "/system/bin/start");
symlink("toolbox", "/system/bin/stop");
symlink("toolbox", "/system/bin/sync");
symlink("toolbox", "/system/bin/top");
symlink("toolbox", "/system/bin/umount");
symlink("toolbox", "/system/bin/uptime");
symlink("toolbox", "/system/bin/vmstat");
symlink("toolbox", "/system/bin/watchprops");
symlink("toolbox", "/system/bin/wipe");
set_progress(0.60);
####
## ACCESS CONTROL & PERMISSIONS
####
ui_print(" ");
ui_print("@Configuring Access Control Lists");
ui_print(" -Configuring Busybox...");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 0, 0777, 0777, "/system/etc/init.d");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
set_perm(0, 3003, 06755, "/system/bin/ip");
set_perm(0, 3003, 02750, "/system/bin/netcfg");
set_perm(0, 3004, 02755, "/system/bin/ping");
set_perm(0, 2000, 06750, "/system/bin/run-as");
set_progress(0.65);
set_perm_recursive(1002, 1002, 0755, 0440, "/system/etc/bluetooth");
set_perm(0, 0, 0755, "/system/etc/bluetooth");
set_perm(1000, 1000, 0640, "/system/etc/bluetooth/auto_pairing.conf");
set_perm(3002, 3002, 0444, "/system/etc/bluetooth/blacklist.conf");
set_perm(1002, 1002, 0440, "/system/etc/dbus.conf");
set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
set_perm(0, 0, 06755, "/system/bin/su");
symlink("/system/bin/su", "/system/xbin/su");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 1000, 0755, "/system/xbin/busybox");
symlink("/system/xbin/busybox", "/system/bin/busybox");
set_progress(0.70);
####
## EXTRACT SELECTED KERNEL
####
ui_print(" ");
ui_print("@Extracting & Installing Selected Kernel Package");
#Underworld w/SBC
if
file_getprop("/tmp/aroma/mods.prop","selected.2") == "1"
then
ui_print(" -Installing Underworld Kernel w/SBC...");
assert(package_extract_file("opt/kernels/underworld_sbc/boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
package_extract_dir("opt/kernels/underworld_sbc/system/lib/modules", "/system/lib/modules/");
endif;
#Underworld
if
file_getprop("/tmp/aroma/mods.prop","selected.2") == "2"
then
ui_print(" -Installing Underworld Kernel...");
assert(package_extract_file("opt/kernels/underworld/boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
package_extract_dir("opt/kernels/underworld/system/lib/modules", "/system/lib/modules/");
endif;
#Classic
if
file_getprop("/tmp/aroma/mods.prop","selected.2") == "3"
then
ui_print(" -Installing Classic Kernel...");
assert(package_extract_file("opt/kernels/classic/boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
package_extract_dir("opt/kernels/classic/sytem/lib/modules", "/system/lib/modules/");
endif;
#Classic w/sbc
if
file_getprop("/tmp/aroma/mods.prop","selected.2") == "4"
then
ui_print(" -Installing Classic Kernel w/SBC...");
assert(package_extract_file("opt/kernels/classic_sbc/boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
package_extract_dir("opt/kernels/classic/system/lib/modules", "/system/lib/modules/");
endif;
if
file_getprop("/tmp/aroma/mods.prop","selected.2") == "5"
then
ui_print(" -Installing Lionfish Kernel...");
assert(package_extract_file("opt/kernels/lionfish/boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
package_extract_dir("opt/kernels/lionfish/system/lib/modules", "/system/lib/modules/");
endif;
if
file_getprop("/tmp/aroma/mods.prop","selected.2") == "6"
then
ui_print(" -Installing Lionfish Kernel w/SBC...");
assert(package_extract_file("opt/kernels/lionfish_sbc/boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
package_extract_dir("opt/kernels/lionfish_sbc/system/lib/modules", "/system/lib/modules/");
endif;
set_progress(0.75);
####
## BUSYBOX, DALVIK2SD
####
ui_print(" ");
ui_print("Configuring Base Modifications");
ui_print(" -Extracting busybox...");
package_extract_file("installbusybox", "/tmp/installbusybox");
set_perm(0, 0, 0777, "/tmp/installbusybox");
run_program("/tmp/installbusybox");
set_progress(0.8);
ui_print(" -Moving Dalvik-cache to SD...");
package_extract_file("move_cache_sd", "/tmp/move_cache_sd");
set_perm(0, 0, 0777, "/tmp/move_cache_sd");
run_program("/tmp/move_cache_sd");
set_progress(0.85);
set_progress(0.9);
set_progress(0.95);
####
## INSTALLATION COMPLETE
####
set_progress(1.0);
ui_print(" ");
ui_print("@Finished!");
ui_print("@Urayamashi Installation Complete. A B.o.B is now in your hands");
thanks if anyone can help
Click to expand...
Click to collapse
Does it doe this for all kernals, meaning which ever kernal you pick, you get different kernal libs?
Or just the classic kernal?
I ask because for each kernal you pick, you have two options: Kernal and Kernal with SBC.
Furthermore, you have specified a different directory for each option:
opt/kernels/lionfish/sytem/lib/modules
opt/kernels/lionfish_sbc/sytem/lib/modules
Except for classic, you have:
Code:
#Classic
if
file_getprop("/tmp/aroma/mods.prop","selected.2") == "3"
then
ui_print(" -Installing Classic Kernel...");
assert(package_extract_file("opt/kernels/classic/boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
package_extract_dir("opt/kernels/classic/sytem/lib/modules", "/system/lib/modules/");
endif;
#Classic w/sbc
if
file_getprop("/tmp/aroma/mods.prop","selected.2") == "4"
then
ui_print(" -Installing Classic Kernel w/SBC...");
assert(package_extract_file("opt/kernels/classic_sbc/boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
package_extract_dir("opt/kernels/classic/system/lib/modules", "/system/lib/modules/");
endif;
Which both point to opt/kernels/classic/sytem/lib/modules for the libs instead of opt/kernels/classic_sbc/sytem/lib/modules
Dblfstr said:
Does it doe this for all kernals, meaning which ever kernal you pick, you get different kernal libs?
Or just the classic kernal?
I ask because for each kernal you pick, you have two options: Kernal and Kernal with SBC.
Furthermore, you have specified a different directory for each option:
opt/kernels/lionfish/sytem/lib/modules
opt/kernels/lionfish_sbc/sytem/lib/modules
Except for classic, you have:
Code:
#Classic
if
file_getprop("/tmp/aroma/mods.prop","selected.2") == "3"
then
ui_print(" -Installing Classic Kernel...");
assert(package_extract_file("opt/kernels/classic/boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
package_extract_dir("opt/kernels/classic/sytem/lib/modules", "/system/lib/modules/");
endif;
#Classic w/sbc
if
file_getprop("/tmp/aroma/mods.prop","selected.2") == "4"
then
ui_print(" -Installing Classic Kernel w/SBC...");
assert(package_extract_file("opt/kernels/classic_sbc/boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
package_extract_dir("opt/kernels/classic/system/lib/modules", "/system/lib/modules/");
endif;
Which both point to opt/kernels/classic/sytem/lib/modules for the libs instead of opt/kernels/classic_sbc/sytem/lib/modules
Click to expand...
Click to collapse
Thanks for the reply.
I missed that! But actually on complete there seemed to be an additional extract which pulls the lionfish lib file, no matter which kernel is installed. For both lionfish kernel this isn't a problem as they use the same modules I'm guessing.
I pulled the log and this is what happens after installation complete
Code:
Finished!
Urayamashi Installation Complete. A B.o.B is now in your hands
script result was [@Urayamashi Installation Complete. A B.o.B is now in your hands]
stem/usr/srec/config/en.us/dictionary/basic.ok"
Extract: /system/usr/srec/config/en.us/dictionary/cmu6plus.ok.zip
Extract: /system/usr/srec/config/en.us/dictionary/enroll.ok
Extract: /system/usr/srec/config/en.us/g2p/en-US-ttp.data
Extract: /system/usr/srec/config/en.us/grammars/VoiceDialer.g2g
Extract: /system/usr/srec/config/en.us/grammars/boolean.g2g
Extract: /system/usr/srec/config/en.us/grammars/phone_type_choice.g2g
Extract: /system/usr/srec/config/en.us/models/generic.swiarb
Extract: /system/usr/srec/config/en.us/models/generic11.lda
Extract: /system/usr/srec/config/en.us/models/generic11_f.swimdl
Extract: /system/usr/srec/config/en.us/models/generic11_m.swimdl
Extract: /system/usr/srec/config/en.us/models/generic8.lda
Extract: /system/usr/srec/config/en.us/models/generic8_f.swimdl
Extract: /system/usr/srec/config/en.us/models/generic8_m.swimdl
Extract: /system/xbin/a2sd
Extract: /system/xbin/apps2sd
Extract: /system/xbin/busybox
Extract: /system/xbin/dexdump
Extract: /system/xbin/nano
Extract: /system/xbin/pascal_link
Extract: /system/xbin/sqlite3
Extract: /system/xbin/sysro
Extract: /system/xbin/sysrw
Extract: /system/xbin/wireless_modem
Extract: /system/app/WallpaperChooser.apk
wrote boot partition from /tmp/boot.img
Extract: /system/lib/modules/bcm4329.ko
Extract: /system/lib/modules/cifs.ko
Extract: /system/lib/modules/sequans_sdio.ko
Extract: /system/lib/modules/tun.ko
Extract: /system/lib/modules/wimaxdbg.ko
Extract: /system/lib/modules/wimaxuart.ko
Installer Sucessfull (Status 0)
End at : Thu Jul 12 17:27:51 2012
I have removed a bit of code from the end of the updater but I haven't got round to testing it yet
Will add it in the main thead when i got my laptop... Thanks
Sent from my HTC Sensation XE with Beats Audio Z715e using xda app-developers app
Ok this seems to be very good thread
How to obtain screen calibration data and fix it in aroma-config?
For few phones calibration takes lots of time, so how to collect that data and define it in aroma config to avoid irritating calibration every time you flash the zip?
varun.chitre15 said:
Ok this seems to be very good thread
How to obtain screen calibration data and fix it in aroma-config?
For few phones calibration takes lots of time, so how to collect that data and define it in aroma config to avoid irritating calibration every time you flash the zip?
Click to expand...
Click to collapse
If you look in the aroma-config near the top it tells you what to do
##
# Calibrate Touchscreen
#
# For other device, run the installer, then press "menu"
# and select Calibrating Tools. Follow Instructions, and make
# sure the touch screen has been valid in the testing step.
#
# In the end, there will be alert dialog with calibration data
# ( green ), replace this calibrate() function with that data.
#
calibrate("1.7794","33","1.0941","40");
Click to expand...
Click to collapse
Once you done this record the calibration number and add it below this text unquoted in the aroma-config. You can see my calibration above
Robobob1221 said:
If you look in the aroma-config near the top it tells you what to do
Once you done this record the calibration number and add it below this text unquoted in the aroma-config. You can see my calibration above
Click to expand...
Click to collapse
Yes correct.. And please dont include calibration proccess for user, it was annoyed, user only will think the installer was suck. I found that in some rom before, ask user to calibrate the touch screen before starting installation proccess.
Sent from my HTC Sensation XE with Beats Audio Z715e using xda app-developers app
Hi,
My below question is for updater-script:
Can I put one function within another?
For instance: ui_print(file_getprop("/tmp/aroma-data/install.prop","selected.0"));​
I have tried this, and it returns nothing and it doesn't give me syntax error.
I know it is possible for aroma-config.
Thanks in advance!

[Tutorial] Edify Scripts,Making Flashable Zips

This is a WIP.
Edify Scripting Commands
I came across the problem of creating flash-able ZIP files and Edify scripting and in the interests of sharing and helping this great community I would like to share what I have found and hopefully learn more through discussion, I certainly am no expert and am always willing to learn.
So I would like to try and put together a guide to Edify scripting commands and what their function is. I hope we can all collaborate to make this a helpful source of information to all budding devs...we all have to start somewhere right!?
***Please, if there are any mistakes in this post or if you can help by adding further info please post below, thanks***
If any of you have ever flashed a zip,ROM you most probably see things written on the recovery screen like wiping data,wiping cache or CM10 by so and so.You ever wonder how these things are written??
Well the answer is in Edify script.So all those of you who wanna learn how to do all that have to learn the commands used in Edify scripting.
Interested???
Ok lets begin...
Print text in the recovery during flashing process:
Code:
ui_print("Your text here");
Code:
ui_print(" ");
This simply prints a line of text in the recovery, it has no actual effect on the flashing process, if you want a blank line just leave a blank space as the second example.
Controlling the progress bar:
I believe I understand this correctly, if not please do post below with further clarification.
Code:
show_progress(0.000000, 0);
or
Code:
set_progress(0.000000);
You have two choices when controlling the progress bar, the first example allows you to define fractions of the progress bar and how long they will take to fill. The second example just allows you to specify that the bar fills to a certain fraction at whatever point during the flashing process.
The command is defined as:
set_progress(progress bar fraction, duration in seconds to fill defined fraction);
Click to expand...
Click to collapse
For example the following code lines interspersed with your other commands would fill a fifth of the progress bar every five seconds:
Code:
show_progress(0.200000, 5);
ui_print(" ");
show_progress(0.200000, 5);
ui_print(" ");
show_progress(0.200000, 5);
ui_print(" ");
show_progress(0.200000, 5);
ui_print(" ");
show_progress(0.200000, 5);
This process will only complete if the script takes long enough to flash, therefore you need to be aware of what you are actually flashing and how long it will take when defining these values.
If you wish to just define a fraction without fill without a time scale you can use the following command:
Code:
set_progress(0.000000);
It is also best practice to include this element in your scripts as it will reassure people that their handset hasn't frozen during a flash.
Mounting/Unmounting a partition:
This has to be dealt with care as without mounting the required partition you can't do any modification.
To mount a partition you need to use the following syntax:
mount("filesystem-type", "partition-type", "device-specific-location", "mount-point");
filesystem-type: "ext3" or "yaffs2" (edison is ext4)
partition-type: "EMMC" or "MTD" (edison is EMMC)
location: Device specific address(eg. system is /dev/block/mmcblk1p21 )
mount-point: the partition you want to mount (eg./system etc)
Click to expand...
Click to collapse
Example command would be:
Code:
mount("ext3", "EMMC", "/dev/block/mmcblk1p21", "/system");
To unmount a partition you need to input the following command:
Code:
unmount("/system");
Obviously replace the mount partition with whatever partition you are working in.
Format a partition:
To format a partition you need to use the following syntax:
format("filesystem-type", "partition-type", "device-specific-location", "0");
Click to expand...
Click to collapse
Example:
format("ext3", "EMMC", "/dev/block/mmcblk1p21", "0");
Some scripts include the "0" and some do not, not sure exactly on the function difference when included or not, again clarification would be great.
Flashing the contents of your ZIP file:
To flash an entire directory i.e. to copy the contents of the entire directory from your zip into the respective folders in ROM:
Code:
package_extract_dir("system", "/system");
To flash a single file:
Code:
package_extract_file("youtube.apk", "/data");
These commands are structured as follows:
Entire directory:
package_extract_dir ("zipfileSource", "destination-partition");
Click to expand...
Click to collapse
Single File:
package_extract_file ("file", "device-specific-mountpoint");
Click to expand...
Click to collapse
Deleting folders & files:
You can delete multiple folders or files using just one command, as follows:
To delete files:
Code:
delete("file-path-1", "file-path-2", "file-path-3);
To delete folders/directories:
Code:
delete_recursive("directory-path-1", "directory-path-2", "directory-path-3");
Setting Permissions
Here are the basics for setting permissions.
If you want to research the reasons behind this, there is some useful information on Linux permissions here: chmod wiki,
Set permissions of a file or set of files:
set_perm(uid, gid, mode, "filepath1", "filepath2")
uid - user id
gid - group id
mode - permission mode
filepath... - file to set permission on
Click to expand...
Click to collapse
Example:
Code:
set_perm(0, 0, 06755, "/system/xbin/su");
Set permissions of a directory or set of directories and all files and folders within them:
set_perm_recursive(uid, gid, dirmode, filemode, "dirpath1", "dirpath2")
uid - user id
gid - group id
dirmode - permission to set to directories contained within the specified directory
filemode - permission to set to files contained within the specified directory
dirpath... - directory to set permission on
Click to expand...
Click to collapse
Example:
Code:
set_perm_recursive(0, 0, 0755, 0644, "/system");
Permissions syntax explained...so I can understand it lol (if I do then anyone can!):
The following are the pre-defined Android UID's & GID's. Taken from the following link: Android UIDs and GIDs
AID_ROOT 0 /* traditional unix root user */
AID_SYSTEM 1000 /* system server */
AID_RADIO 1001 /* telephony subsystem, RIL */
AID_BLUETOOTH 1002 /* bluetooth subsystem */
AID_GRAPHICS 1003 /* graphics devices */
AID_INPUT 1004 /* input devices */
AID_AUDIO 1005 /* audio devices */
AID_CAMERA 1006 /* camera devices */
AID_LOG 1007 /* log devices */
AID_COMPASS 1008 /* compass device */
AID_MOUNT 1009 /* mountd socket */
AID_WIFI 1010 /* wifi subsystem */
AID_ADB 1011 /* android debug bridge (adbd) */
AID_INSTALL 1012 /* group for installing packages */
AID_MEDIA 1013 /* mediaserver process */
AID_DHCP 1014 /* dhcp client */
AID_SHELL 2000 /* adb and debug shell user */
AID_CACHE 2001 /* cache access */
AID_DIAG 2002 /* access to diagnostic resources */
/* The 3000 series are intended for use as supplemental group id's only. */
/* They indicate special Android capabilities that the kernel is aware of. */
AID_NET_BT_ADMIN 3001 /* bluetooth: create any socket */
AID_NET_BT 3002 /* bluetooth: create sco, rfcomm or l2cap sockets */
AID_INET 3003 /* can create AF_INET and AF_INET6 sockets */
AID_NET_RAW 3004 /* can create raw INET sockets */
AID_MISC 9998 /* access to misc storage */
AID_NOBODY 9999
AID_APP 10000 /* first app user */
"root", AID_ROOT
"system", AID_SYSTEM
"radio", AID_RADIO
"bluetooth", AID_BLUETOOTH
"graphics", AID_GRAPHICS
"input", AID_INPUT
"audio", AID_AUDIO
"camera", AID_CAMERA
"log", AID_LOG
"compass", AID_COMPASS
"mount", AID_MOUNT
"wifi", AID_WIFI
"dhcp", AID_DHCP
"adb", AID_ADB
"install", AID_INSTALL
"media", AID_MEDIA
"shell", AID_SHELL
"cache", AID_CACHE
"diag", AID_DIAG
"net_bt_admin", AID_NET_BT_ADMIN
"net_bt", AID_NET_BT
"inet", AID_INET
"net_raw", AID_NET_RAW
"misc", AID_MISC
"nobody", AID_NOBODY
Click to expand...
Click to collapse
You will need to also understand the way file permissions are represented:
Example = drwxrwxrwx
-Use Root Explorer to find the UID, GID, and permissions for a file. Permissions are the string that looks like some variation on 'rwxr-xr--' next to each file. Long press and choose "change owner" to get the UID and GID. You just want the number next to "owner" and "group", respectively.
-If you're replacing a file, look up these settings for the existing copy and use them. If you're adding a file, just find a file that does the same functions and copy what it has (for example, installing an app to /system/app? Just look at these settings for any other app in that directory).
-MODE is technically a 4-bit string, but the first character can be omitted. There doesn't seem to be any android file permissions with the first character set. For good practice, I think it's safe to assume you can always use a leading 0 unless you know otherwise for something specific. Or, just use a 3-digit MODE, which says to leave those settings as they are (disabled by default). (I.e. 0644=644).
The next 9 characters define the file permissions. These permissions are
given in groups of 3 each.
The first 3 characters are the permissions for the owner of the file or directory.
Example = -rwx------
The next 3 are permissions for the group that the file is owned by.
Example = ----rwx---
The final 3 characters define the access permissions for everyone not part of the group.
Example = -------rwx
There are 3 possible attributes that make up file access permissions.
r - Read permission. Whether the file may be read. In the case of a
directory* this would mean the ability to list the contents of the
directory.
w - Write permission. Whether the file may be written to or modified. For
a directory* this defines whether you can make any changes to the contents
of the directory. If write permission is not set then you will not be able
to delete* rename or create a file.
x - Execute permission. Whether the file may be executed. In the case of a
directory* this attribute decides whether you have permission to enter*
run a search through that directory or execute some program from that
directory
You set these permissions using the following binary based numerical system:
Code:
0: --- No Permissions (the user(s) cannot do anything)
1: --x Execute Only (the user(s) can only execute the file)
2: -w- Write Only (the user(s) can only write to the file)
3: -wx Write and Execute Permissions
4: r-- Read Only
5: r-x Read and Execute Permissions
6: rw- Read and Write Permissions
7: rwx Read, Write and Execute Permissions
Click to expand...
Click to collapse
Default Linux permissions:
For Files:
"Read" means to be able to open and view the file
"Write" means to overwrite or modify the file
"eXecute" means to run the file as a binary
For Directories:
"Read" means to be able to view the contents of the directory
"Write" means to be able to create new files/directories within the directory
"eXecute" means to be able to "Change Directory" (cd) into the directory
Most of the time you set "Read" and "eXecute" together on directories (kind of useless when set by themselves)
Interestingly through further research it seems this system is based on the Octal Binary system...I may be wrong...
Further Commands:
In progress...
So, this is by no means an exhaustive list and I would appreciate it that if I have made any mistakes people make me aware in this thread and I can update this tutorial.
I would also like to add further commands and their uses, if people can provide more I will add them too.
I hope this helps people out! Many thanks!
Credits: wilskywalker for his guide from which I got the ideas and the knowledge.
How to create the flashable zip:
You will need the following:
Android SDK, ADB & Fastboot set up for your handset.
Notepad++
7Zip
Setting up your zip directories:
you will need to create the following folder structure (these are case sensitive):
/META-INF/com/google/android
Click to expand...
Click to collapse
All flash-able zips include this file structure, the final folder 'android' will contain two files:
update-binary
updater-script
Click to expand...
Click to collapse
update-binary: I have been unable to find much information on the update-binary file other than they seem to be chip set specific (if anyone can shed further light on these I will include it here). For the sake of compatibility I have attached the update binary from the latest CyanogenMod Nightlies for the Atrix 2 at the bottom of this thread - You can of course download the latest nightly and extract the update-binary file yourself as the attached one will obviously begin to date.
For anybody having problems flashing it is worth ensuring you have an up to date version of the update-binary (obviously the one attached to this thread will gradually become out of date).
updater-script: This we can create ourselves, to ensure it works properly we will use Notepad++.
Open Notepad++ and start a new file, with the following settings:
Format: Unix
Encoding: ANSI
Default Language: Normal Text
Click to expand...
Click to collapse
Save this file as:
File name: updater-script
File type: All types (*.*)
Click to expand...
Click to collapse
You can now begin writing your edify script in this file.
I'm explaining a simple example script for your better understanding.
Code:
assert(getprop("ro.product.board") == "edison");
ui_print(" ");
ui_print("confirming device edison");
ui_print(" ");
ui_print("success");
ui_print(" ");
show_progress(0.200000, 5);
ui_print("Mounting your system...");
mount("ext3", "EMMC", "/dev/block/mmcblk1p21", "/system");
ui_print(" ");
show_progress(0.200000, 5);
ui_print("updating system files");
package_extract_dir("system", "/system");
ui_print(" ");
show_progress(0.200000, 5);
ui_print("unmounting system");
unmount("/system");
ui_print(" ");
show_progress(0.200000, 5);
ui_print("by your name");
show_progress(0.200000, 5);
ui_print(" ");
***EMPTY LINE***
assert(getprop("ro.product.board") == "edison");
Click to expand...
Click to collapse
This is checking you are flashing the correct handset, this is not a requirement, but is best practice. Just insert another device name in the place of "edison" if you so wish, or remove the command all together.
mount("ext3", "EMMC", "/dev/block/mmcblk1p21", "/system");
Click to expand...
Click to collapse
This is the specific mount point for the edison system partition, if you wish to flash a different partition, data for instance you can get the mount points for your device by entering the following code over ADB:
Code:
adb shell "mount > /sdcard/PHONENAME_mountinfo.txt"
This will place a text file on your sdcard with the mount points for your specific device (remember to swap 'PHONENAME' with your device name e.g. 'edison').
Additionaly here are the mount points for data and cache for A2
Cache:
mount("ext3", "EMMC", "/dev/block/mmcblk1p22", "/cache");
Click to expand...
Click to collapse
Data:
mount("ext3", "EMMC", "/dev/block/mmcblk1p25", "/data");
Click to expand...
Click to collapse
package_extract_dir("system", "/system");
Click to expand...
Click to collapse
This command extracts the files you wish to flash from the zip and flashes them to the phone, it is formatted as follows ("package-path", "/destination-path"). So for this example you are telling it to flash everything from the 'system' folder in your zip to the /system partition of your handset. You can obviously change these values for different partitions.
unmount("/system");
Click to expand...
Click to collapse
This simply unmounts whatever partition you previously mounted.
ui_print(" ");
Click to expand...
Click to collapse
Shows text in the recovery whilst the flash is ongoing, you can put whatever you please between the double quotes, you must leave a space if you wish to have a blank line.
show_progress(0.200000, 5);
Click to expand...
Click to collapse
Controls what the progress bar in the background is displaying, it is formatted as follows (fragment, seconds).
***EMPTY LINE***
Click to expand...
Click to collapse
This is not actually text, you simply need to leave a blank line at the end of your script before you save it for it to work.
FYI, this means in fact your script could look like this and still work:
Code:
ui_print(" ");
show_progress(1.000000, 30);
mount("ext3", "EMMC", "/dev/block/mmcblk1p21", "/system");
package_extract_dir("system", "/system");
unmount("/system");
ui_print(" ");
***EMPTY LINE***
But that just isn't that pretty, or as deceptively complicated lol!
Make sure you save your edify script.
Files to flash:
You now need to create a further folder, this needs to be named based on where within the system you are flashing, for the sake of this example we are flashing to the system partition, so create this folder path(of course the structure depends on what are files you need to flash and their location):
/system/app
Click to expand...
Click to collapse
Place whatever files you wish to flash within this file e.g:
/system/app/nameofapp.apk
Click to expand...
Click to collapse
Creating your .zip file:
Select both of your top directories and their contents 'META-INF' and 'system' and package them into a .zip file with 7zip using the following settings:
Archive: name_of_your_file
Archive Format: zip
Compression level: Store
Update mode: Add and replace files
Click to expand...
Click to collapse
And there you have it, your very own flash-able .zip file.
How to sign your update.zip:
You don't actually need to sign your zip file for it to work as most custom recoveries now support unsigned zips, for aspiring developers and the more cautious among us though the how to will be updated later.
For now you can use the META-INF folder from the attached zip as is just modify the updater-script according to your requirments.
How to create your own private signing key & certificate:
You will need the following download:
Open SSL
If you want to create your own private keys for signing, here's what you need to do.
As before extract the OpenSSL files to a folder in the root of your c:\ drive, preferably named 'openssl' for ease of cmd line navigation. Then input the following:
Code:
cd\openssl\
openssl genrsa -out key.pem 1024
openssl req -new -key key.pem -out request.pem
openssl x509 -req -days 9999 -in request.pem -signkey key.pem -out certificate.pem
openssl pkcs8 -topk8 -outform DER -in key.pem -inform PEM -out key.pk8 -nocrypt
You can then replace 'key.pk8' & 'certificate.pem' with your own files.
I have attached an example flashable .zip file that includes a updater-script and the update-binary.Use that as a base or example to set your zip up.
I really hope this has helped folks out, if so please consider hitting the 'Thanks' button!
Happy flashing!
May the -Mass times Acceleration-be with you...
Thanks a TON!! You must've read my mind because I planned on trying to figure this out this weekend.lol BTW, what program are you using to write these scripts?
Brought to you by time and relative dimensions in space.
1BadWolf said:
Thanks a TON!! You must've read my mind because I planned on trying to figure this out this weekend.lol BTW, what program are you using to write these scripts?
Brought to you by time and relative dimensions in space.
Click to expand...
Click to collapse
Lol.
Notepad++ is the unanimous choice.
Also always leave one blank line at the bottom or the script won't work.
May the -Mass times Acceleration-be with you...
deveshmanish said:
Notepad++ is the unanimous choice.
Also always leave one blank line at the bottom or the script won't work.
May the -Mass times Acceleration-be with you...
Click to expand...
Click to collapse
I thought so but wanted to be sure. Thanks again.
Brought to you by time and relative dimensions in space.
Thanks for putting this together..
At first it seems a little complex for an aspiring modder, but still a great reference for the novice as well as the experienced modders..
Maybe offer some example scripts..? Feel free to use some from any of my zips.. Also, that goes for people trying to make their own - look at what others have done as examples.
Also might be worth noting the default permissions for system are 0644 - meaning if you are only installing things that need those perms (like an .apk, .jar or .so, etc), then you don't need to specify permissions in the updater-script.
EDIT: another text editor worth trying is Sublime Text 2 (thanks to cogeary for the tip) - need to eventually pay for the license (or find another way around it) or you will get pop-ups.
It's for both Windows and Linux (I use it in Ubuntu constantly, and mostly Notepad++ in Windows).
Sent from my MB865 using xda app-developers app
alteredlikeness said:
Thanks for putting this together..
At first it seems a little complex for an aspiring modder, but still a great reference for the novice as well as the experienced modders..
Maybe offer some example scripts..? Feel free to use some from any of my zips.. Also, that goes for people trying to make their own - look at what others have done as examples.
Also might be worth noting the default permissions for system are 0644 - meaning if you are only installing things that need those perms (like an .apk, .jar or .so, etc), then you don't need to specify permissions in the updater-script.
Sent from my MB865 using xda app-developers app
Click to expand...
Click to collapse
I'm definitely going to try and make this simpler.BTW great idea of putting sample zips together for reference.Thanks.
And yeah some stuff needs to be added even the path for data and cache partitions.And also I'm thinking of adding a slight explanation of busybox.The folder structure of a zip and what files it contains those are also on the to-do list.
Will get back to this once I'm done playing with MIUIv5.Enjoying it so far.
May the -Mass times Acceleration- be with You...
OP updated with guide to create the flashable zip.
Nice Tut Sir Its Very Helpful...
Yeah... I love this thread and use it often too excellent job op!
Interesting tutorial. What got me interested in this thread is. I want to convert a recovery.img to a flashable recovery zip so I can easily switch recoveries without odin. I have seen apps that can create flash zip automatically, but none of them support of adding recovery.img. Thanks.

[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

Maintaining build.prop changes in ROM Updates

Hey guys,
So, I am using CM currently, and use CyanDelta to update every couple of days (it works so well!). It works great because I can have it flash Franco Kernel and SuperSU after updating, so those are maintained at least. Annoying part is, every time I update, my build.prop is being overwritten. I scale my DPI down to 405 in order for everything to be ungigantic, and when it gets changed back, it essentially erases my home screens. So, every update, I have to re-apply my settings, and re-do my homescreens. I'm just wondering if you guys have come up with a way to maintain build.prop changes between ROM updates? I feel like there may be a script or something out there, but with some cursory searching around, I can't find jack.
Thanks!
Just copy your current build.prop to your sd when u flash a new build copy and paste over the new one change permissions reboot
Sent from my SM-N910C using XDA Free mobile app
duvalbmarley said:
Just copy your current build.prop to your sd when u flash a new build copy and paste over the new one change permissions reboot
Sent from my SM-N910C using XDA Free mobile app
Click to expand...
Click to collapse
What happens if there are important build.prop changes in an update though?
Transmitted via Bacon
timmaaa said:
What happens if there are important build.prop changes in an update though?
Transmitted via Bacon
Click to expand...
Click to collapse
Most changes are not build.prop related and if it is it would be easier to just copy and paste those changes to the build.prop u copied on your sd card.. and if it's the same rom then it should be no problem or even if it's 2 different roms with the same Base just make sure to copy your original before replacing incase anything goes wrong.... I'm just throwing out a solution what do you suggest the op do??? Don't bash the helper give a helping hand or don't comment
Sent from my SM-N910C using XDA Free mobile app
duvalbmarley said:
Most changes are not build.prop related and if it is it would be easier to just copy and paste those changes to the build.prop u copied on your sd card.. and if it's the same rom then it should be no problem or even if it's 2 different roms with the same Base just make sure to copy your original before replacing incase anything goes wrong.... I'm just throwing out a solution what do you suggest the op do??? Don't bash the helper give a helping hand or don't comment
Sent from my SM-N910C using XDA Free mobile app
Click to expand...
Click to collapse
Whoa, calm down. I'm not bashing you, just asking a question, in order to work with you to come up with the best solution. I agree, most changes aren't contained in the build.prop, but every now and again there could be one or two and it'd take more time checking the two build.props against other than it would just changing the DPI and setting up screens after a flash. I just don't think this solution, while it may work, is a very elegant or practical one, considering that you'd need to waste time to check the build.prop anyway.
@kmakiki, what launcher do you use? I use the app Texdroider to adjust my DPI to 370 after each nightly flash too, but my home screens are never affected. I use Nova Launcher.
Transmitted via Bacon
timmaaa said:
Whoa, calm down. I'm not bashing you, just asking a question, in order to work with you to come up with the best solution. I agree, most changes aren't contained in the build.prop, but every now and again there could be one or two and it'd take more time checking the two build.props against other than it would just changing the DPI and setting up screens after a flash. I just don't think this solution, while it may work, is a very elegant or practical one, considering that you'd need to waste time to check the build.prop anyway.
@kmakiki, what launcher do you use? I use the app Texdroider to adjust my DPI to 370 after each nightly flash too, but my home screens are never affected. I use Nova Launcher.
Transmitted via Bacon
Click to expand...
Click to collapse
Well in my situation I have speed tweaks Internet tweaks dpi changes and a bunch of other tweaks I add to build.prop and i would rather just copy one or two lines then to add every tweak and change after every update
Sent from my SM-N910C using XDA Free mobile app
duvalbmarley said:
Well in my situation I have speed tweaks Internet tweaks dpi changes and a bunch of other tweaks I add to build.prop and i would rather just copy one or two lines then to add every tweak and change after every update
Sent from my SM-N910C using XDA Free mobile app
Click to expand...
Click to collapse
Yeah, but what I'm saying is that it would be time consuming to actually go through each build.prop line by line to discover if there are any that are different or added/removed. It isn't the adding of lines that's the problem, it's having to find out if you need to.
Transmitted via Bacon
timmaaa said:
Yeah, but what I'm saying is that it would be time consuming to actually go through each build.prop line by line to discover if there are any that are different or added/removed. It isn't the adding of lines that's the problem, it's having to find out if you need to.
Transmitted via Bacon
Click to expand...
Click to collapse
Most developer's have change logs to show what was updated and if it's build.prop changes which most likely it won't be u could just ask or it should be posted in change log let's not argue about the changes let's find another solution besides copy and paste since no one has came up with another option
Sent from my SM-N910C using XDA Free mobile app
duvalbmarley said:
Most developer's have change logs to show what was updated and if it's build.prop changes which most likely it won't be u could just ask or it should be posted in change log let's not argue about the changes let's find another solution besides copy and paste since no one has came up with another option
Sent from my SM-N910C using XDA Free mobile app
Click to expand...
Click to collapse
I think the best solution for him is to just change the launcher he's using, that's where the problem lies.
Transmitted via Bacon
flash this zip (attachement)
it will add a file called 99-DPI.sh to
/system/addons.d/ and, by that, it will be executed after every rom flash that uses the backupscripts (cm,... )
the script will replace the default ro.sf.lcd_density to a value you specify (the new default value is 360, this is what i use)
you can add a file called .dpi to your sdcard (/sdcard/.dpi) which contains a number (e.g. 405), then this value will be used after each rom flash.
if you have some questions then feel free to ask :>
[edit]
i just read the whole thread (i was missing some posts)
the 99-DPI.sh can be used to edit any build.prop change, you just have to add some lines, it should be self explaining.
@aHcVolle can u explain more on how to dd new lines to be added into build. Prop
Thnx in advance
@kmakiki i just think of it what if u edit the build. Prop in the cyandelta zip file b4 flashing it?
Ma7mu7 said:
@aHcVolle can u explain more on how to dd new lines to be added into build. Prop
Thnx in advance
Click to expand...
Click to collapse
Can you give more info in what you are trying to do?
aHcVolle said:
Can you give more info in what you are trying to do?
Click to expand...
Click to collapse
Thanks for the fast reply i want to add some lines to build.prop other than changing the dpi i.e disabling bootanimation 3g tweaks etc..
Ma7mu7 said:
Thanks for the fast reply i want to add some lines to build.prop other than changing the dpi i.e disabling bootanimation 3g tweaks etc..
Click to expand...
Click to collapse
OK, edit the file script/99-DPI.sh
remove everything between restore) and ;;
and add your stuff between those 2.
example:
Code:
restore)
echo "dummy_var=1" >> /system/build.prop
ui_print "added line to build.prop"
;;
that should be everything you need.
aHcVolle said:
OK, edit the file script/99-DPI.sh
remove everything between restore) and ;;
and add your stuff between those 2.
example:
Code:
restore)
echo "dummy_var=1" >> /system/build.prop
ui_print "added line to build.prop"
;;
that should be everything you need.
Click to expand...
Click to collapse
Sooo it should be
Code:
restore)
echo "dummy_var=1" >> /system/build.prop
ui_print "added line to build.prop"
debug.sf.nobootanimation=1
ro.config.hw_quickpoweron=true
persist.sys.shutdown.mode=hibernate
dev.bootcomplete=0 ;;
Instead of
Code:
restore)
# We only have work when restoring....
if [ -f $FILE ]; then
# The DPI file is existing, lets check its content
FILEDPI=$(cat $FILE)
# Convert to int (maybe not needed)
(( FILEDPI=$FILEDPI+0 ))
Right?
No
Code:
restore)
echo "debug.sf.nobootanimation=1" >> /system/build.prop
echo "ro.config.hw_quickpoweron=true" >> /system/build.prop
echo "persist.sys.shutdown.mode=hibernate" >> /system/build.prop
echo "dev.bootcomplete=0" >> /system/build.prop
ui_print "added 4 lines to build.prop"
;;
aHcVolle said:
No
Code:
restore)
echo "debug.sf.nobootanimation=1" >> /system/build.prop
echo "ro.config.hw_quickpoweron=true" >> /system/build.prop
echo "persist.sys.shutdown.mode=hibernate" >> /system/build.prop
echo "dev.bootcomplete=0" >> /system/build.prop
ui_print "added 4 lines to build.prop"
;;
Click to expand...
Click to collapse
Thank you very very much just last question
What abt the rest
Code:
# We only have work when restoring....
if [ -f $FILE ]; then
# The DPI file is existing, lets check its content
FILEDPI=$(cat $FILE)
# Convert to int (maybe not needed)
(( FILEDPI=$FILEDPI+0 ))
Shall i just delete them or keep the,m?
Ma7mu7 said:
Thank you very very much just last question
What abt the rest
Code:
# We only have work when restoring....
if [ -f $FILE ]; then
# The DPI file is existing, lets check its content
FILEDPI=$(cat $FILE)
# Convert to int (maybe not needed)
(( FILEDPI=$FILEDPI+0 ))
Shall i just delete them or keep the,m?
Click to expand...
Click to collapse
you can delete them.
make the file look like this:
Code:
#!/sbin/sh
# persistant dpi by volle
# credits: nuclearmistake for ui_print cmd
# Print function
export OUTFD=$(ps | grep -v "grep" | grep -o -E "update_binary(.*)" | cut -d " " -f 3); #BIG props to Chainfire
[ ! $OUTFD ] && export OUTFD=$(ps | grep -v "grep" | grep -o -E "/tmp/updater(.*)" | cut -d " " -f 3); #BIG props nuclearmistake for TWRP-izing
ui_print() { if [ $OUTFD ]; then echo "ui_print $*" 1>&$OUTFD; fi; return 0; }
case "$1" in
pre-backup)
;;
backup)
;;
post-backup)
;;
pre-restore)
;;
restore)
echo "debug.sf.nobootanimation=1" >> /system/build.prop
echo "ro.config.hw_quickpoweron=true" >> /system/build.prop
echo "persist.sys.shutdown.mode=hibernate" >> /system/build.prop
echo "dev.bootcomplete=0" >> /system/build.prop
ui_print "added 4 lines to build.prop"
;;
post-restore)
;;
*)
ui_print " Unkown command $1"
;;
esac
@aHcVolle thanx for the script.
i was also searching how to add lines to build.prop in recovery and it works perfect :good:
aHcVolle said:
you can delete them.
make the file look like this:
[/code]
Click to expand...
Click to collapse
I have a question about combining scripts.
I managed to combine 2 scripts.
First one i created with Android Flashable Zip Creator to install to flash apps in recovery.
Second one is the Fermion Blackhole script to remove bloatware and unwanted apps, also in recovery.
I just copied part of the blackhole into the 1st scipt. I tested it and it works.
Code:
ui_print("@Starting the install process");
ui_print("Setting up required tools...");
ui_print("Mounting Partitions...");
ui_print(" ");
run_program("/sbin/busybox","mount", "/system");
run_program("/sbin/busybox","mount", "/data");
set_progress(0.1);
ui_print("@Installing System Apps");
package_extract_dir("customize/APKs-System/APKs-System_appz", "/system/app");
set_progress(0.2);
set_progress(0.25);
set_progress(0.3);
set_progress(0.4);
set_progress(0.5);
set_progress(0.6);
set_progress(0.7);
set_progress(0.8);
set_progress(0.9);
ui_print("-Sending bloatware to a blackhole.");
delete_recursive(
"/system/app/BasicDreams",
"/system/app/Browser",
"/system/app/Camera2",
"/system/app/CMFileManager",
"/system/app/CMWallpapers",
"/system/app/Eleven",
"/system/app/Email",
"/system/app/Exchange2",
"/system/app/Galaxy4",
"/system/app/Gallery2",
"/system/app/HoloSpiralWallpaper",
"/system/app/LatinIME",
"/system/app/LiveWallpapers",
"/system/app/LiveWallpapersPicker",
"/system/app/Microbes",
"/system/app/NoiseField",
"/system/app/PhaseBeam",
"/system/app/PhotoPhase",
"/system/app/PhotoTable",
"/system/app/PicoTts",
"/system/app/VisualizationWallpapers",
"/system/app/WhisperPush"
);
delete_recursive(
"/system/priv-app/AudioFX",
"/system/priv-app/CellBroadcastReceiver",
"/system/priv-app/Mms",
"/system/priv-app/MmsService",
"/system/priv-app/OmniSwitch",
"/system/priv-app/Trebuchet",
"/system/priv-app/Wallet"
);
set_progress(0.9);
set_metadata_recursive("/system/addon.d", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/app", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/etc/permissions", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/etc/preferred-apps", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/framework", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/priv-app", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
ui_print("-Unmounting system partition.");
run_program("/sbin/busybox", "umount", "/system");
run_program("/sbin/busybox", "umount", "/data");
ui_print("");
ui_print("Done debloating your device!");
ui_print("@Finished Install");
set_progress(1);
Is it possible to add your script to the updater.script ? What part should i copy ? And also can i just add the /script folder into my zip flash file ?
These are the 2 files i use to edit build.prop :
Code:
ui_print("Persistant DPI mod by volle");
ui_print(" Mounting /system");
ifelse(is_mounted("/system"), unmount("/system"));
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
ui_print(" Extracting backupscript");
package_extract_file("script/99-DPI.sh", "/system/addon.d/99-DPI.sh");
set_perm(0, 0, 0777, "/system/addon.d/99-DPI.sh");
ui_print(" Running backupscript");
assert(run_program("/system/addon.d/99-DPI.sh","restore"));
ui_print(" Unmounting /system");
unmount("/system");
ui_print("Everything done");
Code:
#!/sbin/sh
# persistant dpi by volle
# credits: nuclearmistake for ui_print cmd
# Print function
export OUTFD=$(ps | grep -v "grep" | grep -o -E "update_binary(.*)" | cut -d " " -f 3); #BIG props to Chainfire
[ ! $OUTFD ] && export OUTFD=$(ps | grep -v "grep" | grep -o -E "/tmp/updater(.*)" | cut -d " " -f 3); #BIG props nuclearmistake for TWRP-izing
ui_print() { if [ $OUTFD ]; then echo "ui_print $*" 1>&$OUTFD; fi; return 0; }
case "$1" in
pre-backup)
;;
backup)
;;
post-backup)
;;
pre-restore)
;;
restore)
echo "qemu.hw.mainkeys=0" >> /system/build.prop
ui_print " HW Mainkeys set"
;;
post-restore)
;;
*)
ui_print " Unkown command $1"
;;
esac

Categories

Resources