Created
January 15, 2017 00:16
-
-
Save dburr/7b350a8c396535d6e04622af55a23606 to your computer and use it in GitHub Desktop.
Translate JP School Idol Festival Skills to English
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# prerequisites: | |
# HonokaMiku - https://github.com/MikuAuahDark/HonokaMiku | |
# Android SDK/platform tools - https://developer.android.com/studio/index.html | |
# if $ANDROID_HOME isn't set by default in your env, then set it here | |
[ -z "$ANDROID_HOME" ] && ANDROID_HOME=/Users/dburr/Library/Android/sdk | |
check_for_android_device() { | |
ADB_PATH="${ANDROID_HOME}/platform-tools" | |
NOT_PRESENT="List of devices attached" | |
ADB_FOUND=`${ADB_PATH}/adb devices | tail -2 | head -1 | cut -f 1 | sed 's/ *$//g'` | |
if [[ ${ADB_FOUND} == ${NOT_PRESENT} ]]; then | |
echo "Android device seems to be missing." | |
return 1 | |
else | |
echo "Android device found." | |
return 0 | |
fi | |
} | |
copy_from_android() { | |
# $1 = remote-path $2 = local-path | |
REMOTE_PATH="$1" | |
LOCAL_PATH="$2" | |
echo "Fetching $REMOTE_PATH to $LOCAL_PATH..." | |
adb shell "su -c 'cp $REMOTE_PATH /mnt/sdcard/temp.file'" | |
adb pull /mnt/sdcard/temp.file "$LOCAL_PATH" | |
adb shell "su -c 'rm -f /mnt/sdcard/temp.file'" | |
} | |
copy_to_android() { | |
# $1 = local-path $2 = remote-path | |
REMOTE_PATH="$2" | |
LOCAL_PATH="$1" | |
echo "Pushing $LOCAL_PATH to $REMOTE_PATH..." | |
adb push "$LOCAL_PATH" /mnt/sdcard/temp.file | |
adb shell "su -c 'cp /mnt/sdcard/temp.file $REMOTE_PATH'" | |
adb shell "su -c 'rm -f /mnt/sdcard/temp.file'" | |
} | |
kill_apk() { | |
echo "Killing $1..." | |
adb shell "am force-stop $1" | |
} | |
if ! check_for_android_device; then | |
exit 1 | |
fi | |
# make sure JPSIF isn't running | |
kill_apk "klb.android.lovelive" | |
# copy unit.db_ from SIF to work on it | |
copy_from_android "/data/data/klb.android.lovelive/files/external/db/unit/unit.db_" "/tmp/unit.db_" | |
# decrypt unit.db_ | |
HonokaMiku /tmp/unit.db_ | |
# patch it | |
sqlite3 /tmp/unit.db_ << _EOF_ | |
UPDATE unit_removable_skill_m SET name='Smile Kiss',description='Add 200 to Smile Stat' WHERE unit_removable_skill_id=1; | |
UPDATE unit_removable_skill_m SET name='Pure Kiss',description='Add 200 to Pure Stat' WHERE unit_removable_skill_id=2; | |
UPDATE unit_removable_skill_m SET name='Cool Kiss',description='Add 200 to Cool Stat' WHERE unit_removable_skill_id=3; | |
UPDATE unit_removable_skill_m SET name='Smile Perfume',description='Add 450 to Smile Stat' WHERE unit_removable_skill_id=4; | |
UPDATE unit_removable_skill_m SET name='Pure Perfume',description='Add 450 to Pure Stat' WHERE unit_removable_skill_id=5; | |
UPDATE unit_removable_skill_m SET name='Cool Perfume',description='Add 450 to Cool Stat' WHERE unit_removable_skill_id=6; | |
UPDATE unit_removable_skill_m SET name='Smile Ring [1st Years]',description='Add 10% to Smile Stat' WHERE unit_removable_skill_id=7; | |
UPDATE unit_removable_skill_m SET name='Pure Ring [1st Years]',description='Add 10% to Pure Stat' WHERE unit_removable_skill_id=8; | |
UPDATE unit_removable_skill_m SET name='Cool Ring [1st Years]',description='Add 10% to Cool Stat' WHERE unit_removable_skill_id=9; | |
UPDATE unit_removable_skill_m SET name='Smile Ring [2nd Years]',description='Add 10% to Smile Stat' WHERE unit_removable_skill_id=10; | |
UPDATE unit_removable_skill_m SET name='Pure Ring [2nd Years]',description='Add 10% to Pure Stat' WHERE unit_removable_skill_id=11; | |
UPDATE unit_removable_skill_m SET name='Cool Ring [2nd Years]',description='Add 10% to Cool Stat' WHERE unit_removable_skill_id=12; | |
UPDATE unit_removable_skill_m SET name='Smile Ring [3rd Years]',description='Add 10% to Smile Stat' WHERE unit_removable_skill_id=13; | |
UPDATE unit_removable_skill_m SET name='Pure Ring [3rd Years]',description='Add 10% to Pure Stat' WHERE unit_removable_skill_id=14; | |
UPDATE unit_removable_skill_m SET name='Cool Ring [3rd Years]',description='Add 10% to Cool Stat' WHERE unit_removable_skill_id=15; | |
UPDATE unit_removable_skill_m SET name='Smile Cross [1st Years]',description='Add 16% to Smile Stat' WHERE unit_removable_skill_id=16; | |
UPDATE unit_removable_skill_m SET name='Pure Cross [1st Years]',description='Add 16% to Pure Stat' WHERE unit_removable_skill_id=17; | |
UPDATE unit_removable_skill_m SET name='Cool Cross [1st Years]',description='Add 16% to Cool Stat' WHERE unit_removable_skill_id=18; | |
UPDATE unit_removable_skill_m SET name='Smile Cross [2nd Years]',description='Add 16% to Smile Stat' WHERE unit_removable_skill_id=19; | |
UPDATE unit_removable_skill_m SET name='Pure Cross [2nd Years]',description='Add 16% to Pure Stat' WHERE unit_removable_skill_id=20; | |
UPDATE unit_removable_skill_m SET name='Cool Cross [2nd Years]',description='Add 16% to Cool Stat' WHERE unit_removable_skill_id=21; | |
UPDATE unit_removable_skill_m SET name='Smile Cross [3rd Years]',description='Add 16% to Smile Stat' WHERE unit_removable_skill_id=22; | |
UPDATE unit_removable_skill_m SET name='Pure Cross [3rd Years]',description='Add 16% to Pure Stat' WHERE unit_removable_skill_id=23; | |
UPDATE unit_removable_skill_m SET name='Cool Cross [3rd Years]',description='Add 16% to Cool Stat' WHERE unit_removable_skill_id=24; | |
UPDATE unit_removable_skill_m SET name='Smile Aura',description='Add 1.8% to entire unit''s Smile Stat' WHERE unit_removable_skill_id=25; | |
UPDATE unit_removable_skill_m SET name='Pure Aura',description='Add 1.8% to entire unit''s Pure Stat' WHERE unit_removable_skill_id=26; | |
UPDATE unit_removable_skill_m SET name='Cool Aura',description='Add 1.8% to entire unit''s Cool Stat' WHERE unit_removable_skill_id=27; | |
UPDATE unit_removable_skill_m SET name='Smile Veil',description='Add 2.4% to entire unit''s Smile Stat' WHERE unit_removable_skill_id=28; | |
UPDATE unit_removable_skill_m SET name='Pure Veil',description='Add 2.4% to entire unit''s Pure Stat' WHERE unit_removable_skill_id=29; | |
UPDATE unit_removable_skill_m SET name='Cool Veil',description='Add 2.4% to entire unit''s Cool Stat' WHERE unit_removable_skill_id=30; | |
UPDATE unit_removable_skill_m SET name='Princess Charm',description='Score boost skills effect enhanced 2.5x' WHERE unit_removable_skill_id=31; | |
UPDATE unit_removable_skill_m SET name='Princess Heel',description='When stamina is max, score wil be boosted by 480x the stamina recovery.' WHERE unit_removable_skill_id=32; | |
UPDATE unit_removable_skill_m SET name='Princess Trick',description='Add 33% to Smile Stat while Perfect Lock is active' WHERE unit_removable_skill_id=33; | |
UPDATE unit_removable_skill_m SET name='Angel Charm',description='Score boost skills effect enhanced 2.5x' WHERE unit_removable_skill_id=34; | |
UPDATE unit_removable_skill_m SET name='Angel Heel',description='When stamina is max, score wil be boosted by 480x the stamina recovery.' WHERE unit_removable_skill_id=35; | |
UPDATE unit_removable_skill_m SET name='Angel Trick',description='Add 33% to Pure Stat while Perfect Lock is active' WHERE unit_removable_skill_id=36; | |
UPDATE unit_removable_skill_m SET name='Empress Charm',description='Score boost skills effect enhanced 2.5x' WHERE unit_removable_skill_id=37; | |
UPDATE unit_removable_skill_m SET name='Empress Heel',description='When stamina is max, score wil be boosted by 480x the stamina recovery.' WHERE unit_removable_skill_id=38; | |
UPDATE unit_removable_skill_m SET name='Empress Trick',description='Add 33% to Cool Stat while Perfect Lock is active' WHERE unit_removable_skill_id=39; | |
_EOF_ | |
# re-encrypt unit.db_ | |
HonokaMiku /tmp/unit.db_ -e -j3 | |
# push it back on to device | |
copy_to_android "/tmp/unit.db_" "/data/data/klb.android.lovelive/files/external/db/unit/unit.db_" | |
# all done, clean up | |
rm -f /tmp/unit.db_ | |
echo "All Done!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note: you will need to re-run this script after every SIF update