• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[VRTHEME][DUALBOOT][SEC_DATA][JB4.1.2]New installtheme.sh for 2nd ROM[NEATROM-AROMA]

Search This thread

Troubadour666

Inactive Recognized Contributor
Aug 3, 2012
3,140
7,035
43.7031 - 7.2661
Hi All,

You all know my interest to port rom and mod cwm flasher we all find and test in both XDA Galaxy S II Android Developmentand AND Galaxy S II Themes and Apps threads for 2nd rom with Dorimanx kernel v8.xx embedded :)

so some dualbooters want to use some mods and themes they find and they cant because most (for not sayinf all) are script for 1rst rom usage.

I see a great mod that i can purpose here for your 2nd rom, depends what you have in your 2nd rom, see end of this unique post dedicated to @Jeetu NEATROM-AROMA GREAT MOD :)

So let's have a see about existensZ :)

Most MODS are based on VRTHEME script, which original is :

Code:
#!/sbin/sh
# Copyright VillainROM 2011. All Rights Reserved
# cleanup from last time
[ -d /sdcard/vrtheme-backup ] && rm -r /sdcard/vrtheme-backup

# we need to first go through each file in the "app" folder
# and for each one present,
# apply the modified theme to the APK
# let us copy each original APK here first. 
[COLOR="Navy"]echo "Processing /preload/symlink/system/app/"
busybox mkdir -p /sdcard/vrtheme-backup/preload/symlink/system/app
busybox mkdir -p /sdcard/vrtheme/apply/preload/symlink/system/app
cd /sdcard/vrtheme/preload/symlink/system/app/
for f in $(ls)
do
  echo "Processing $f"
  cp /preload/symlink/system/app/$f /sdcard/vrtheme/apply/preload/symlink/system/app/
  cp /preload/symlink/system/app/$f /sdcard/vrtheme-backup/preload/symlink/system/app/
done
echo "Backups done for system apps"

# repeat for /system/framework now


[ -d /sdcard/vrtheme/system/framework ] && framework=1 || framework=0

if [ "$framework" -eq "1" ]; then
echo "Processing /system/framework"
busybox mkdir -p /sdcard/vrtheme-backup/system/framework
busybox mkdir -p /sdcard/vrtheme/apply/system/framework
cd /sdcard/vrtheme/system/framework
for f in $(ls)
do
  echo "Processing $f"
  cp /system/framework/$f /sdcard/vrtheme/apply/system/framework/
  cp /system/framework/$f /sdcard/vrtheme-backup/system/framework/
done
echo "Backups done for frameworks"
fi

# repeat for /data/app now


[ -d /sdcard/vrtheme/data ] && dataapps=1 || dataapps=0

if [ "$dataapps" -eq "1" ]; then
echo "Processing /data/app/"
busybox mkdir -p /sdcard/vrtheme-backup/data/app
busybox mkdir -p /sdcard/vrtheme/apply/data/app
cd /sdcard/vrtheme/data/app/
for f in $(ls)
do
  echo "Processing $f"
  cp /data/app/$f /sdcard/vrtheme/apply/data/app/
  cp /data/app/$f /sdcard/vrtheme-backup/data/app/
done
echo "Backups done for data apps"
fi[/COLOR]

[COLOR="DarkGreen"]# for each of the system apps needing processed 
cd /sdcard/vrtheme/apply/preload/symlink/system/app/
for f in $(ls)
do
  echo "Working on $f"
  cd /sdcard/vrtheme/preload/symlink/system/app/$f/
  /sdcard/vrtheme/zip -r /sdcard/vrtheme/apply/preload/symlink/system/app/$f *
done
echo "Patched system files"

if [ "$dataapps" -eq "1" ]; then
cd /sdcard/vrtheme/apply/data/app/
for f in $(ls)
do
  echo "Working on $f"
  cd /sdcard/vrtheme/data/app/$f/
  /sdcard/vrtheme/zip -r /sdcard/vrtheme/apply/data/app/$f *

done
echo "Patched data files"
fi

if [ "$framework" -eq "1" ]; then
cd /sdcard/vrtheme/apply/system/framework
for f in $(ls)
do
  echo "Working on $f"
  cd /sdcard/vrtheme/system/framework/$f/
  /sdcard/vrtheme/zip -r /sdcard/vrtheme/apply/system/framework/$f *
done
echo "Patched framework files"
fi[/COLOR]

[COLOR="DarkRed"]# and now time to zipalign
cd /sdcard/vrtheme/apply/preload/symlink/system/app/
busybox mkdir aligned
for f in $(ls)
do
  echo "Zipaligning $f"
  /sdcard/vrtheme/zipalign -f 4 $f ./aligned/$f
done

if [ "$dataapps" -eq "1" ]; then
cd /sdcard/vrtheme/apply/data/app/
busybox mkdir aligned
for f in $(ls)
do
  echo "Zipaligning $f"
  /sdcard/vrtheme/zipalign -f 4 $f ./aligned/$f
done
fi

if [ "$framework" -eq "1" ]; then
cd /sdcard/vrtheme/apply/system/framework/
busybox mkdir aligned
for f in $(ls)
do
  echo "Zipaligning $f"
  /sdcard/vrtheme/zipalign -f 4 $f ./aligned/$f
done
fi[/COLOR]

[COLOR="Indigo"]# time to now move each new app back to its original location
cd /sdcard/vrtheme/apply/preload/symlink/system/app/aligned/
cp * /preload/symlink/system/app/
chmod 644 /preload/symlink/system/app/*
if [ "$dataapps" -eq "1" ]; then
cd /sdcard/vrtheme/apply/data/app/aligned/
cp * /data/app/
chmod 644 /data/app/*
fi
if [ "$framework" -eq "1" ]; then
cd /sdcard/vrtheme/apply/system/framework/aligned/
cp * /system/framework/
chmod 644 /system/framework/*
fi

# Do not remove the credits from this, it's called being a douche
echo "VillainTheme is done"
# we are all done now[/COLOR]

- in this script, there are 4 parts :


1 - making a backup of all original APKs to be modded by flasher (a simple cp command for each APK).


by order : preload/symlink/system/app, system/framework and data/app


2 - moding process with a zip command to merge vrtheme folder copyied before during updater-script execution in original APK (copyied before too) to need to be modded.

by order : preload/symlink/system/app, data/app and system/framework.


3 - zipalign process of the APKs freshly modded.

by order : preload/symlink/system/app, data/app and system/framework.


4 - copy of the news modded APKs in their original folder respectively.

by order : preload/symlink/system/app, data/app and system/framework.

To mod an APK, installtheme uses zip command to merge a folder copyied in sdcard during flash process, in it. ,Fortunaly and we know that, all APKs files are structured like ZIP files :) .
Its the updater-script that copy each structure APKs folder of all apks to be modded in the rom in the external SDCARD. In the past , i change these few lines in updater-script but now, it's not necessary with this NEW METHOD.

The only line we have to modify in the updater-script from a VRTHEME MOD ZIP file we want to see run in 2nd rom are the lines relative to the destination folder of the copy of real apks that have to been changed or added by DEV on you rom during its flash. As for a flash a modded ZIP ROM for 2nd rom, updater-script from MODs need to be modified to copy /preload/symlink/system/app from ZIP MOD to /data/sec_data/ folder of 2nd rom, that's all. Its the same if the MOD have an AROMA installer embedded (+ vrtheme folder, like last @Jeetu great mods).

So, according you have your good updater-script of your new mod for 2nd rom usage you want, you can replace installtheme.sh in ZIP MOD by those in attachment "new-installtheme_For2ndRomONLY.sh", and for all mod you will find in future and you want to use in your 2nd rom, use this.

the 3 images below show you what i have done :
To make this run in 2nd ROM, we have to make some little changes, exactly 4 lines in the installtheme.sh script, according we know how to mod updater-script in an another thread or as i explain in this post....but it's not the purpose here.

1fac.png

above, backup of apks to be modded, i correct 2 lines from original, copy (cp) each apk to be merged by zip command adding a folder in it, from /data/sec_data/ instead of /preload/symlink/system/app/ if we were in 1rst rom. 2nd rom uses /data/sec_data/ instead of /preload/ partition folder.


29ym.png

Above,no changes in these two processes in one image : zip command on each apk to be modded and zipalign process for each of them after.


8f2p.png

Above again, just 2 lines touched, copy back the new zipalinged apks in original folder of rom, instead of /preload/symlink/system/app , we put them in /data/sec_data/ folder of 2nd rom.


in attachment, FOR TEST, find 3 files for the very great AROMA MOD for NeatROM from @Jeetu.
if you havent NeatROM in 2nd rom you could find one shared here (thanks to @nik60), with kernel @dorimanx v8.xx runing here
Special thanks to @_Sale_ for his great NEATROM.

Donwload "1-For2ndRomONLY-NEATROM_AROMA-updater-script.pdf", rename it "updater-script" and put it in \NEATROM_AROMA\META-INF\com\google\android\ folder of NEATROM-AROMA.ZIP from @Jeetu, here.

Download "2-For2ndRomONLY-NEATROM_AROMA-installtheme.sh.pdf", rename it "installtheme.sh" and put it in \NEATROM_AROMA\vrtheme\ folder of NEATROM-AROMA.ZIP from Jeetu too.

Download "3-For2ndRomONLY-create_preload_symlinks.pdf" , rename it "create_preload_symlinks" and to put in \NEATROM_AROMA.zip\Jeetu\ folder of NEATROM-AROMA.ZIP from Jeetu too.

thanks.
test and report :)
 

Attachments

  • new-installtheme_For2ndRomONLY.sh.pdf
    3.6 KB · Views: 28
  • 2-For2ndRomONLY-NEATROM_AROMA-installtheme.sh.pdf
    3.6 KB · Views: 17
  • 3-For2ndRomONLY-create_preload_symlinks.pdf
    372 bytes · Views: 11
  • 1-For2ndRomONLY-NEATROM_AROMA-updater-script.pdf
    27.1 KB · Views: 14

duhhh

Senior Member
Apr 16, 2007
773
215
Plovdiv
ok I download
"1-For2ndRomONLY-NEATROM_AROMA-updater-script.pdf"
"2-For2ndRomONLY-NEATROM_AROMA-installtheme.sh.pdf"
"3-For2ndRomONLY-create_preload_symlinks.pdf"
rename it as updater-script, installtheme.sh and create_preload_symlinks
then I replace it in zip as you say ,flash and got no statusbar,only Back To Kill and Bootanimation are in my phone from mod :confused:
 

Troubadour666

Inactive Recognized Contributor
Aug 3, 2012
3,140
7,035
43.7031 - 7.2661
ok I download
"1-For2ndRomONLY-NEATROM_AROMA-updater-script.pdf"
"2-For2ndRomONLY-NEATROM_AROMA-installtheme.sh.pdf"
"3-For2ndRomONLY-create_preload_symlinks.pdf"
rename it as updater-script, installtheme.sh and create_preload_symlinks
then I replace it in zip as you say ,flash and got no statusbar,only Back To Kill and Bootanimation are in my phone from mod :confused:

Have you enough space in your external card ? And can you retry with this one? I correct some "/" in some package_extract_dir lines...
thanks
 

Attachments

  • corected-For2ndRomONLY-NEATROM_AROMA-updater-script.pdf
    27 KB · Views: 8
Last edited:

Troubadour666

Inactive Recognized Contributor
Aug 3, 2012
3,140
7,035
43.7031 - 7.2661
fla**** again and now
status 0
installation finished
no statusbar
yes I choose 23 aokp trans

Make space on external and choose another systemui because aokp you choose put sysyemui.apk in system/app folder instead of preload/.... /app so I make the same instead of data/sec_data. Choose another systemui and I check that for 23 aokp trans

finaly test this new one in attachments

Sent from my GT-I9100 using Tapatalk 2
 

Attachments

  • corectedII-For2ndRomONLY-NEATROM_AROMA-updater-script.pdf
    27.1 KB · Views: 6
Last edited:

Troubadour666

Inactive Recognized Contributor
Aug 3, 2012
3,140
7,035
43.7031 - 7.2661
i think there is an incompatibility with this 23AOKPtrans and the vrtheme applyied after in updater-script, according choices you make after 23 aokp in Aroma menu display....
i post here a result of test with aroma vivek buildv7 rom from @corruptionfreeindia and 23 aokp trans works but there are some more file added by DEV to make it work, not only systemui.apk and i dont know realy if @Jeetu does the same with vrtheme choice in its aroma after we choose 23 aokp trans. i'm not sure to be understand with my bad english :)

thanks.
 
Last edited:
  • Like
Reactions: Christian Nothing

Troubadour666

Inactive Recognized Contributor
Aug 3, 2012
3,140
7,035
43.7031 - 7.2661
I went to see that there are 2 version of installtheme.sh in XDA for VRTHEME files :)
one manage /system/app/ folder and we know that in this folder there are the "ln" files from /preload/symlink/system/app/ , dont know if this can be useful to submit this remark :)
fortunaly, in the two scripts, /preload/symlink/system/app/ is the 1rst folder where APKs are to be themed 1rst :) , i dont know too if this could have impact on jb sammy 4.1.2 rom.
and fortunaly too, the use of each other depends of managment folder in the flasher, we have the choice to put /xxxxxxxx.apk/ folder to be merge during installtheme process in /vrtheme/preload/...../app/ or /system/app/

image of comparison :

9t0.png

8zla.png


qzzo.png


wgjb.png


dsnq.png


in attachments, the two installtheme.sh scripts i can find.

thanks again.
 

Attachments

  • AllFoldersManaged-installtheme.sh.txt
    3.7 KB · Views: 10
  • WithoutManagmentOfSystemFolder-installtheme.sh.txt
    4.7 KB · Views: 4

ran816

Senior Member
Sep 27, 2011
69
7
Is it possible to use dual boot with Gingerbread and jellybean ? I wanna keep GB cause of wifi adhoc support...
 

Top Liked Posts

  • There are no posts matching your filters.
  • 5
    Hi All,

    You all know my interest to port rom and mod cwm flasher we all find and test in both XDA Galaxy S II Android Developmentand AND Galaxy S II Themes and Apps threads for 2nd rom with Dorimanx kernel v8.xx embedded :)

    so some dualbooters want to use some mods and themes they find and they cant because most (for not sayinf all) are script for 1rst rom usage.

    I see a great mod that i can purpose here for your 2nd rom, depends what you have in your 2nd rom, see end of this unique post dedicated to @Jeetu NEATROM-AROMA GREAT MOD :)

    So let's have a see about existensZ :)

    Most MODS are based on VRTHEME script, which original is :

    Code:
    #!/sbin/sh
    # Copyright VillainROM 2011. All Rights Reserved
    # cleanup from last time
    [ -d /sdcard/vrtheme-backup ] && rm -r /sdcard/vrtheme-backup
    
    # we need to first go through each file in the "app" folder
    # and for each one present,
    # apply the modified theme to the APK
    # let us copy each original APK here first. 
    [COLOR="Navy"]echo "Processing /preload/symlink/system/app/"
    busybox mkdir -p /sdcard/vrtheme-backup/preload/symlink/system/app
    busybox mkdir -p /sdcard/vrtheme/apply/preload/symlink/system/app
    cd /sdcard/vrtheme/preload/symlink/system/app/
    for f in $(ls)
    do
      echo "Processing $f"
      cp /preload/symlink/system/app/$f /sdcard/vrtheme/apply/preload/symlink/system/app/
      cp /preload/symlink/system/app/$f /sdcard/vrtheme-backup/preload/symlink/system/app/
    done
    echo "Backups done for system apps"
    
    # repeat for /system/framework now
    
    
    [ -d /sdcard/vrtheme/system/framework ] && framework=1 || framework=0
    
    if [ "$framework" -eq "1" ]; then
    echo "Processing /system/framework"
    busybox mkdir -p /sdcard/vrtheme-backup/system/framework
    busybox mkdir -p /sdcard/vrtheme/apply/system/framework
    cd /sdcard/vrtheme/system/framework
    for f in $(ls)
    do
      echo "Processing $f"
      cp /system/framework/$f /sdcard/vrtheme/apply/system/framework/
      cp /system/framework/$f /sdcard/vrtheme-backup/system/framework/
    done
    echo "Backups done for frameworks"
    fi
    
    # repeat for /data/app now
    
    
    [ -d /sdcard/vrtheme/data ] && dataapps=1 || dataapps=0
    
    if [ "$dataapps" -eq "1" ]; then
    echo "Processing /data/app/"
    busybox mkdir -p /sdcard/vrtheme-backup/data/app
    busybox mkdir -p /sdcard/vrtheme/apply/data/app
    cd /sdcard/vrtheme/data/app/
    for f in $(ls)
    do
      echo "Processing $f"
      cp /data/app/$f /sdcard/vrtheme/apply/data/app/
      cp /data/app/$f /sdcard/vrtheme-backup/data/app/
    done
    echo "Backups done for data apps"
    fi[/COLOR]
    
    [COLOR="DarkGreen"]# for each of the system apps needing processed 
    cd /sdcard/vrtheme/apply/preload/symlink/system/app/
    for f in $(ls)
    do
      echo "Working on $f"
      cd /sdcard/vrtheme/preload/symlink/system/app/$f/
      /sdcard/vrtheme/zip -r /sdcard/vrtheme/apply/preload/symlink/system/app/$f *
    done
    echo "Patched system files"
    
    if [ "$dataapps" -eq "1" ]; then
    cd /sdcard/vrtheme/apply/data/app/
    for f in $(ls)
    do
      echo "Working on $f"
      cd /sdcard/vrtheme/data/app/$f/
      /sdcard/vrtheme/zip -r /sdcard/vrtheme/apply/data/app/$f *
    
    done
    echo "Patched data files"
    fi
    
    if [ "$framework" -eq "1" ]; then
    cd /sdcard/vrtheme/apply/system/framework
    for f in $(ls)
    do
      echo "Working on $f"
      cd /sdcard/vrtheme/system/framework/$f/
      /sdcard/vrtheme/zip -r /sdcard/vrtheme/apply/system/framework/$f *
    done
    echo "Patched framework files"
    fi[/COLOR]
    
    [COLOR="DarkRed"]# and now time to zipalign
    cd /sdcard/vrtheme/apply/preload/symlink/system/app/
    busybox mkdir aligned
    for f in $(ls)
    do
      echo "Zipaligning $f"
      /sdcard/vrtheme/zipalign -f 4 $f ./aligned/$f
    done
    
    if [ "$dataapps" -eq "1" ]; then
    cd /sdcard/vrtheme/apply/data/app/
    busybox mkdir aligned
    for f in $(ls)
    do
      echo "Zipaligning $f"
      /sdcard/vrtheme/zipalign -f 4 $f ./aligned/$f
    done
    fi
    
    if [ "$framework" -eq "1" ]; then
    cd /sdcard/vrtheme/apply/system/framework/
    busybox mkdir aligned
    for f in $(ls)
    do
      echo "Zipaligning $f"
      /sdcard/vrtheme/zipalign -f 4 $f ./aligned/$f
    done
    fi[/COLOR]
    
    [COLOR="Indigo"]# time to now move each new app back to its original location
    cd /sdcard/vrtheme/apply/preload/symlink/system/app/aligned/
    cp * /preload/symlink/system/app/
    chmod 644 /preload/symlink/system/app/*
    if [ "$dataapps" -eq "1" ]; then
    cd /sdcard/vrtheme/apply/data/app/aligned/
    cp * /data/app/
    chmod 644 /data/app/*
    fi
    if [ "$framework" -eq "1" ]; then
    cd /sdcard/vrtheme/apply/system/framework/aligned/
    cp * /system/framework/
    chmod 644 /system/framework/*
    fi
    
    # Do not remove the credits from this, it's called being a douche
    echo "VillainTheme is done"
    # we are all done now[/COLOR]

    - in this script, there are 4 parts :


    1 - making a backup of all original APKs to be modded by flasher (a simple cp command for each APK).


    by order : preload/symlink/system/app, system/framework and data/app


    2 - moding process with a zip command to merge vrtheme folder copyied before during updater-script execution in original APK (copyied before too) to need to be modded.

    by order : preload/symlink/system/app, data/app and system/framework.


    3 - zipalign process of the APKs freshly modded.

    by order : preload/symlink/system/app, data/app and system/framework.


    4 - copy of the news modded APKs in their original folder respectively.

    by order : preload/symlink/system/app, data/app and system/framework.

    To mod an APK, installtheme uses zip command to merge a folder copyied in sdcard during flash process, in it. ,Fortunaly and we know that, all APKs files are structured like ZIP files :) .
    Its the updater-script that copy each structure APKs folder of all apks to be modded in the rom in the external SDCARD. In the past , i change these few lines in updater-script but now, it's not necessary with this NEW METHOD.

    The only line we have to modify in the updater-script from a VRTHEME MOD ZIP file we want to see run in 2nd rom are the lines relative to the destination folder of the copy of real apks that have to been changed or added by DEV on you rom during its flash. As for a flash a modded ZIP ROM for 2nd rom, updater-script from MODs need to be modified to copy /preload/symlink/system/app from ZIP MOD to /data/sec_data/ folder of 2nd rom, that's all. Its the same if the MOD have an AROMA installer embedded (+ vrtheme folder, like last @Jeetu great mods).

    So, according you have your good updater-script of your new mod for 2nd rom usage you want, you can replace installtheme.sh in ZIP MOD by those in attachment "new-installtheme_For2ndRomONLY.sh", and for all mod you will find in future and you want to use in your 2nd rom, use this.

    the 3 images below show you what i have done :
    To make this run in 2nd ROM, we have to make some little changes, exactly 4 lines in the installtheme.sh script, according we know how to mod updater-script in an another thread or as i explain in this post....but it's not the purpose here.

    1fac.png

    above, backup of apks to be modded, i correct 2 lines from original, copy (cp) each apk to be merged by zip command adding a folder in it, from /data/sec_data/ instead of /preload/symlink/system/app/ if we were in 1rst rom. 2nd rom uses /data/sec_data/ instead of /preload/ partition folder.


    29ym.png

    Above,no changes in these two processes in one image : zip command on each apk to be modded and zipalign process for each of them after.


    8f2p.png

    Above again, just 2 lines touched, copy back the new zipalinged apks in original folder of rom, instead of /preload/symlink/system/app , we put them in /data/sec_data/ folder of 2nd rom.


    in attachment, FOR TEST, find 3 files for the very great AROMA MOD for NeatROM from @Jeetu.
    if you havent NeatROM in 2nd rom you could find one shared here (thanks to @nik60), with kernel @dorimanx v8.xx runing here
    Special thanks to @_Sale_ for his great NEATROM.

    Donwload "1-For2ndRomONLY-NEATROM_AROMA-updater-script.pdf", rename it "updater-script" and put it in \NEATROM_AROMA\META-INF\com\google\android\ folder of NEATROM-AROMA.ZIP from @Jeetu, here.

    Download "2-For2ndRomONLY-NEATROM_AROMA-installtheme.sh.pdf", rename it "installtheme.sh" and put it in \NEATROM_AROMA\vrtheme\ folder of NEATROM-AROMA.ZIP from Jeetu too.

    Download "3-For2ndRomONLY-create_preload_symlinks.pdf" , rename it "create_preload_symlinks" and to put in \NEATROM_AROMA.zip\Jeetu\ folder of NEATROM-AROMA.ZIP from Jeetu too.

    thanks.
    test and report :)
    2
    Once again great work mate!! Thanks a lot
    Check your PM
    2
    fla**** again and now
    status 0
    installation finished
    no statusbar
    yes I choose 23 aokp trans

    Make space on external and choose another systemui because aokp you choose put sysyemui.apk in system/app folder instead of preload/.... /app so I make the same instead of data/sec_data. Choose another systemui and I check that for 23 aokp trans

    finaly test this new one in attachments

    Sent from my GT-I9100 using Tapatalk 2
    2
    all works except 23 aokp trans

    can you take and test corrected_II i post .
    i put systemui.apk from 23 aokp trans in the good folder.
    if 23AOKPTRANS works, i update OP :)
    thanks.
    1
    Thanks i missed here :)