Skip to content
This repository has been archived by the owner on Feb 13, 2018. It is now read-only.

Commit

Permalink
AROMA: Still WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
JustArchi committed Dec 1, 2014
1 parent a4215b7 commit 0882fb2
Show file tree
Hide file tree
Showing 7 changed files with 176 additions and 78 deletions.
94 changes: 39 additions & 55 deletions META-INF/com/google/android/aroma-config
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,10 @@ agreebox(
resread("tos.txt"),

#-- Checkbox Text
"<~terms.check>",
"<~archidroid.common.terms.check>",

#-- Unchecked Alert Message
"<~terms.unchecked>"
"<~archidroid.common.terms.unchecked>"
);

if resexec("exec/archidroid_check_experimental.sh", getvar("archidroid_version_type")) == "0" then
Expand Down Expand Up @@ -235,7 +235,7 @@ textbox(

form(
"<~archidroid.preset>",
"<~archidroid.preset.desc>",
"<~archidroid.custom.desc>",
"@apps",
"archidroidinstallmode.prop",

Expand All @@ -253,7 +253,7 @@ form(

if file_getprop("/tmp/aroma-data/archidroidinstallmode.prop", "preset") == "recovery" then
form(
"<~archidroid.custom>",
"<~archidroid.preset.recovery>",
"<~archidroid.custom.desc>",
"@apps",
"archidroidrecovery.prop",
Expand All @@ -275,19 +275,30 @@ endif;

if file_getprop("/tmp/aroma-data/archidroidinstallmode.prop", "preset") == "previous" then
setvar("preset_version_probe", read(getvar("adaroma") + "/version.txt"));
if getvar("preset_version_probe") != getvar("preset_version") then
alert("ArchiDroid Wizard", "<~archidroid.detect.previouspreset.fail>", "@alert");
writetmpfile("archidroidinstallmode.prop", "preset=custom\n");
if getvar("preset_version_probe") == "" then
alert("ArchiDroid Wizard", "<~archidroid.detect.previouspreset.fail.notavailable>", "@alert");
back("1");
else
writetmpfile("archidroid.prop", read(getvar("adaroma") + "/archidroid.prop"));
if getvar("preset_version_probe") != getvar("preset_version") then
alert("ArchiDroid Wizard", "<~archidroid.detect.previouspreset.fail.incompatible>", "@alert");
back("1");
else
writetmpfile("archidroid.prop", read(getvar("adaroma") + "/archidroid.prop"));
endif;
endif;
endif;

if file_getprop("/tmp/aroma-data/archidroidinstallmode.prop", "preset") == "previousexpert" then
setvar("preset_version_probe", read(getvar("adaroma") + "/version.txt"));
writetmpfile("archidroidinstallmode.prop", "preset=custom\n");
if getvar("preset_version_probe") != "" then
if getvar("preset_version_probe") == "" then
alert("ArchiDroid Wizard", "<~archidroid.detect.previouspreset.fail.notavailable>", "@alert");
back("1");
else
writetmpfile("archidroid.prop", read(getvar("adaroma") + "/archidroid.prop"));
writetmpfile("archidroidinstallmode.prop", "preset=custom\n"); # Allow edition on the next page
if getvar("preset_version_probe") != getvar("preset_version") then
alert("ArchiDroid Wizard", "<~archidroid.detect.previouspreset.expert.fail.incompatible>", "@alert");
endif;
endif;
endif;

Expand Down Expand Up @@ -359,8 +370,8 @@ if file_getprop("/tmp/aroma-data/archidroidinstallmode.prop", "preset") == "cust
"gapps-hangouts", "Google Hangouts", "<~archidroid.gapps.hangouts.desc>", "check.checked",
"gapps-maps", "Google Maps", "<~archidroid.gapps.maps.desc>", "check.checked",
"gapps-search", "Google Search", "<~archidroid.gapps.search.desc>", "check.checked",
"gapps-speech", "Google Speech", "<~archidroid.gapps.core.desc>", "check.checked",
"gapps-street", "Google Street", "<~archidroid.gapps.speech.desc>", "check.checked",
"gapps-speech", "Google Speech", "<~archidroid.gapps.speech.desc>", "check.checked",
"gapps-street", "Google Street", "<~archidroid.gapps.street.desc>", "check.checked",
"gapps-youtube", "YouTube", "<~archidroid.gapps.youtube.desc>", "check.checked",

"xposed", "<#selectbg_g>Xposed</#>", "", "group",
Expand All @@ -375,7 +386,7 @@ if file_getprop("/tmp/aroma-data/archidroidinstallmode.prop", "preset") == "cust
"mxplayer", "MXPlayer", "<~archidroid.apps.mxplayer.desc>", "check.checked",
"spiritfm", "Spirit FM", "<~archidroid.apps.spiritfm.desc>", "check.checked",
"cooltool", "CoolTool", "<~archidroid.apps.cooltool.desc>", "check.checked",
"rootbrowser", "Root Browser", "<~archidroid.apps.rootbrowser.desc>", "check.checked",
"esfileexplorer", "ES File Explorer", "<~archidroid.apps.esfileexplorer.desc>", "check.checked",

"architweaks", "<#selectbg_g>ArchiDroid Tweaks</#>", "", "group",
"navibar", "<~archidroid.tweaks.navibar>", "<~archidroid.tweaks.navibar.desc>", "check",
Expand Down Expand Up @@ -449,63 +460,36 @@ if file_getprop("/tmp/aroma-data/archidroidinstallmode.prop", "preset") != "reco
#########################
### ARCHIDROID DETECT ###
#########################
setvar("resexec_retstatus",resexec("exec/archidroid_detect.sh"));

if getvar("resexec_retstatus") == "0" || getvar("resexec_retstatus") == "1" then
if confirm(
"ArchiDroid Detect",
"<~archidroid.detect.fail>",
"@info",
"<~archidroid.detect.fail.yes>",
"<~archidroid.detect.fail.no>"
) == "yes" then
alert("ArchiDroid Detect", "<~archidroid.detect.fail.alert.yes>", "@info");
writetmpfile(
"archidroidwipe.prop",
"wipe=yes\n"
);
else
alert("ArchiDroid Detect", "<~archidroid.detect.fail.alert.no>", "@alert");
setvar("resexec_retstatus", "2");
endif;
endif;
if getvar("resexec_retstatus") == "2" then
if resexec("exec/archidroid_detect.sh") == "0" then
# User has ArchiDroid, wipe is not mandatory
if confirm(
"ArchiDroid Detect",
"<~archidroid.detect.pass>",
"@info",
"<~archidroid.detect.pass.yes>",
"<~archidroid.detect.pass.no>"
) == "yes" then
# User wants to wipe anyway
alert("ArchiDroid Detect", "<~archidroid.detect.pass.alert.yes>", "@info");
writetmpfile(
"archidroidwipe.prop",
"wipe=no\n"+
"force=no\n"
"wipe=yes\n"
);
if confirm(
"ArchiDroid Detect",
"<~archidroid.detect.force>",
"@alert"
) == "yes" then
writetmpfile(
"archidroidwipe.prop",
"wipe=no\n"+
"force=yes\n"
);
else
writetmpfile(
"archidroidwipe.prop",
"wipe=no\n"+
"force=no\n"
);
endif;
else
alert("ArchiDroid Detect", "<~archidroid.detect.pass.alert.no>", "@info");
# User doesn't want to wipe
alert("ArchiDroid Detect", "<~archidroid.detect.pass.alert.no>", "@alert");
writetmpfile(
"archidroidwipe.prop",
"wipe=yes\n"
"wipe=no\n"
);
endif;
else
# User doesn't have ArchiDroid, wipe is mandatory
alert("ArchiDroid Detect", "<~archidroid.detect.fail>", "@alert");
writetmpfile(
"archidroidwipe.prop",
"wipe=yes\n"
);
endif;
endif;

Expand Down
12 changes: 7 additions & 5 deletions META-INF/com/google/android/aroma/exec/archidroid_detect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# exit 0 -> No build.prop detected, we can't check ArchiDroid existance. Full wipe?
# exit 0 -> All fine, we're running ArchiDroid
# exit 1 -> All fine, we're NOT running ArchiDroid
# exit 2 -> All fine, we're running ArchiDroid
# exit 2 -> No build.prop detected, we can't check ArchiDroid existance. Full wipe?

if [ -f /system/build.prop ]; then
if [[ -f "/system/build.prop" ]]; then
# We're not after full wipe
if [ "$(grep -qi "ArchiDroid" "/system/build.prop"; echo $?)" -eq 0 ]; then
if [[ "$(grep -qi "ArchiDroid" "/system/build.prop"; echo $?)" -eq 0 ]]; then
# We're running ArchiDroid"
exit 2
exit 0
else
# We're not running ArchiDroid
exit 1
fi
else
exit 2
fi

exit 0
133 changes: 125 additions & 8 deletions META-INF/com/google/android/aroma/langs/en.lang
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,134 @@
# E-mail (optional) : JustArchi@JustArchi.net
#


### ArchiDroid strings
archidroid.apps.cooltool.desc=Highly customizable app that shows you useful information about your device (e.g. CPU usage) on the top
archidroid.apps.esfileexplorer.desc=Very good file manager replacement for android
archidroid.apps.greenify.desc=Saves battery by hibernating background apps when you're not using them
archidroid.apps.lmt.desc=Enhances your device with PIE functionality, gestures support and more
archidroid.apps.mxplayer.desc=Hardware-accelerated video player for android
archidroid.apps.spiritfm.desc=Real, tuned, over-the-air FM radio app. Does not require internet access
archidroid.apps.titaniumbackup.desc=A core app for every rooted user. Let's you backup/restore apps and their data on the fly

archidroid.bcm=BCM profiling
archidroid.bcm.archidetect.desc=ArchiDetect tries to detect proper firmware for your device automatically

archidroid.bootanimation=Bootanimation
archidroid.bootanimation.archi1.desc=First ArchiDroid bootanimation, from 1.X times
archidroid.bootanimation.archi2.desc=Second ArchiDroid bootanimation, from 2.X times
archidroid.bootanimation.archi3.desc=Third ArchiDroid bootanimation, from 3.X times
archidroid.bootanimation.logcat.desc=Live logcat log instead of bootanimation, powered by logcat lite app
archidroid.bootanimation.none.desc=No bootanimation, for slightly faster boot
archidroid.bootanimation.stock.desc=Bootanimation provided by the base system

archidroid.changelog=Changelog
archidroid.changelog.desc=What's new

archidroid.common.current=Current
archidroid.common.default=Default value
archidroid.common.density=Density
archidroid.common.detected=Detected
archidroid.common.none=None
archidroid.common.terms.check=I agree with terms and conditions
archidroid.common.terms.unchecked=Please check the agreement!

archidroid.custom=Customize
archidroid.custom.desc=Modify settings as you please

archidroid.detect.fail=ArchiDroid could not detect itself currently flashed, therefore a data wipe (factory reset) is mandatory. ArchiDroid will clean your /data partition prior to flashing. Your internal sd card content is safe!
archidroid.detect.pass=ArchiDroid successfully detected itself being currently flashed. Would you like to wipe your data regardless?
archidroid.detect.pass.no=No, don't wipe my old data
archidroid.detect.pass.yes=Yes, wipe my old data
archidroid.detect.pass.alert.no=Alright, but keep in mind that ROM may not work properly with incompatible data!
archidroid.detect.pass.alert.yes=Good decision, ArchiDroid will make sure that /data is clean prior to flashing!

archidroid.detect.previouspreset.expert.fail.incompatible=Warning! Your old preset failed integrity check. Make sure that your chosen options are valid!
archidroid.detect.previouspreset.fail.incompatible=Sorry, your old preset failed integrity check. You can try expert mode if you know what you're doing
archidroid.detect.previouspreset.fail.notavailable=Sorry, it seems like you don't have any old preset yet

archidroid.experimental=
archidroid.experimental.desc=

archidroid.gapps.bksync.desc=
archidroid.gapps.calendargoogle.desc=
archidroid.gapps.calsync.desc=
archidroid.gapps.core.desc=
archidroid.gapps.faceunlock.desc=
archidroid.gapps.gmail.desc=
archidroid.gapps.googleplus.desc=
archidroid.gapps.googletts.desc=
archidroid.gapps.hangouts.desc=
archidroid.gapps.maps.desc=
archidroid.gapps.search.desc=
archidroid.gapps.speech.desc=
archidroid.gapps.street.desc=
archidroid.gapps.youtube.desc=

archidroid.hardswap.desc=
archidroid.hardswap.size.0.desc=
archidroid.hardswap.size.default.desc=

archidroid.kernel=
archidroid.kernel.archi.desc=
archidroid.kernel.stock.desc=

archidroid.keyboard=
archidroid.keyboard.google.desc=
archidroid.keyboard.stock.desc=

archidroid.launcher=
archidroid.launcher.google.desc=
archidroid.launcher.nova.desc=
archidroid.launcher.stock.desc=

archidroid.preset=
archidroid.preset.barebones=
archidroid.preset.barebones.desc=
archidroid.preset.custom=
archidroid.preset.custom.desc=
archidroid.preset.group=
archidroid.preset.previous=
archidroid.preset.previous.desc=
archidroid.preset.previousexpert=
archidroid.preset.previousexpert.desc=
archidroid.preset.recovery=Recovery
archidroid.preset.recovery.desc=

archidroid.preview=
archidroid.preview.desc=

archidroid.recovery.twrp.desc=

archidroid.superuser.chainfire.desc=
archidroid.superuser.koush.desc=
archidroid.superuser.none.desc=

archidroid.thirdparty=
archidroid.thirdparty.desc=

archidroid.tos=
archidroid.tos.desc=

archidroid.tweaks.cellbroadcasts=
archidroid.tweaks.cellbroadcasts.desc=
archidroid.tweaks.navibar=
archidroid.tweaks.navibar.desc=

archidroid.xposed.desc=
archidroid.xposed.gravitybox.desc=
archidroid.xposed.xprivacy.desc=


### AROMA strings
text_ok=OK
text_next=Next
text_about=About
text_back=Back
text_yes=Yes
text_calibrating=Calibrating tools
text_next=Next
text_no=No
text_about=About
text_calibrating=Calibrating Tools
text_quit=Quit Installation
text_ok=OK
text_quit_msg=Are you sure to quit the installer?

### ArchiDroid strings
text_quit=Quit installation
text_yes=Yes

### End of file
15 changes: 5 additions & 10 deletions META-INF/com/google/android/updater-script
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,8 @@ if file_getprop("/tmp/aroma-data/archidroidrecovery.prop", "recovery") == "none"
ui_print("<b><#ff0000>RunOnce</#><#ecec36>@</#><#0cdfdf>ArchiDroid</#><#ecec36>:~</#><#c00cdf>$</#></b> Install mode detected");
run_program("/tmp/archidroid.sh", "INSTALL");
else
if file_getprop("/tmp/aroma-data/archidroidwipe.prop", "force") == "no" then
ui_print("<b><#ff0000>RunOnce</#><#ecec36>@</#><#0cdfdf>ArchiDroid</#><#ecec36>:~</#><#c00cdf>$</#></b> Update mode detected");
run_program("/tmp/archidroid.sh", "UPDATE");
else
ui_print("<b><#ff0000>RunOnce</#><#ecec36>@</#><#0cdfdf>ArchiDroid</#><#ecec36>:~</#><#c00cdf>$</#></b> Forced update mode detected");
run_program("/tmp/archidroid.sh", "UPDATE", "FORCE");
endif;
ui_print("<b><#ff0000>RunOnce</#><#ecec36>@</#><#0cdfdf>ArchiDroid</#><#ecec36>:~</#><#c00cdf>$</#></b> Update mode detected");
run_program("/tmp/archidroid.sh", "UPDATE");
endif;

delete("/tmp/archidroid.sh");
Expand Down Expand Up @@ -674,9 +669,9 @@ if file_getprop("/tmp/aroma-data/archidroidrecovery.prop", "recovery") == "none"
package_extract_dir("_archidroid/apps/cooltool", "/");
endif;

if file_getprop("/tmp/aroma-data/archidroid.prop", "rootbrowser") == "1" then
ui_print("<b><#ff0000>root</#><#ecec36>@</#><#0cdfdf>ArchiDroid</#><#ecec36>:~</#><#c00cdf>#</#></b> Installing Root Browser");
package_extract_dir("_archidroid/apps/rootbrowser", "/");
if file_getprop("/tmp/aroma-data/archidroid.prop", "esfileexplorer") == "1" then
ui_print("<b><#ff0000>root</#><#ecec36>@</#><#0cdfdf>ArchiDroid</#><#ecec36>:~</#><#c00cdf>#</#></b> Installing ES File Explorer");
package_extract_dir("_archidroid/apps/esfileexplorer", "/");
endif;

set_progress(0.90);
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 0882fb2

Please sign in to comment.