@@ -8934,7 +8934,7 @@ menu_flags() {
89348934 else
89358935 menu_items+=(" Enable activation-records flag" )
89368936 fi
8937- menu_items+=(" Enable jailbreak flag" " Enable gasgauge-patch flag" )
8937+ menu_items+=(" Enable jailbreak flag" " Enable multipatch flag" )
89388938 if (( device_proc >= 5 )) ; then
89398939 menu_items+=(" Enable skip-ibss flag" )
89408940 fi
@@ -9011,15 +9011,15 @@ menu_flags() {
90119011 back=1
90129012 fi
90139013 ;;
9014- " Enable gasgauge-patch flag" )
9015- warn " This will enable the --gasgauge-patch flag."
9014+ " Enable multipatch flag" )
9015+ warn " This will enable the --multipatch flag."
90169016 print " * This will enable \" multipatch\" for the custom IPSW."
90179017 print " * This is especially useful for iPhone 4S devices that have issues restoring due to battery replacement."
90189018 print " * This issue is called \" gas gauge\" error, also known as error 29 in iTunes."
90199019 print " * By enabling this, firmware components for 6.1.3 or lower will be used for restoring to get past the error."
9020- print " * This also attempts to get past \" invalid ticket\" error."
9020+ print " * This also attempts to get past \" invalid ticket\" error and other restore errors ."
90219021 local opt
9022- select_yesno " Do you want to enable the gasgauge-patch flag?" 0
9022+ select_yesno " Do you want to enable the multipatch flag?" 0
90239023 if [[ $? != 0 ]]; then
90249024 ipsw_gasgauge_patch=1
90259025 back=1
@@ -10119,21 +10119,19 @@ device_dumpapp() {
1011910119 fi
1012010120
1012110121 local available_apps_base=" $( $ideviceinstaller list --user) "
10122- echo " [" > tmp.json
10123- echo " $available_apps_base " | while read i; do
10124- [[ $i == " CFBundleIdentifier" * ]] && continue
10125- IFS=' , ' read -r CFBundleIdentifier CFBundleShortVersionString CFBundleDisplayName <<< " $i"
10126- CFBundleShortVersionString=" $( echo " $CFBundleShortVersionString " | tr -d ' "' ) "
10127- CFBundleDisplayName=" $( echo " $CFBundleDisplayName " | tr -d ' "' ) "
10128- echo " {\" CFBundleIdentifier\" : \" $CFBundleIdentifier \" ," >> tmp.json
10129- echo " \" CFBundleShortVersionString\" : \" $CFBundleShortVersionString \" ," >> tmp.json
10130- echo " \" CFBundleDisplayName\" : \" $CFBundleDisplayName \" }," >> tmp.json
10131- done
10132- echo " {}]" >> tmp.json
10133- $jq ' del(.[-1])' tmp.json > tmp2.json
10134- local available_apps_json=" $( cat tmp2.json) "
10135-
10136- local available_apps=($( echo $available_apps_json | $jq -r ' to_entries[] | .value.CFBundleIdentifier' | tr ' \n' ' ' ) )
10122+ local available_apps_json=" ["
10123+ while IFS= read -r line; do
10124+ [[ $line == CFBundleIdentifier* ]] && continue
10125+ IFS=' , ' read -r CFBundleIdentifier CFBundleShortVersionString CFBundleDisplayName <<< " $line"
10126+ CFBundleShortVersionString=" ${CFBundleShortVersionString// \" / } "
10127+ CFBundleDisplayName=" ${CFBundleDisplayName// \" / } "
10128+ available_apps_json+=" {\" CFBundleIdentifier\" :\" $CFBundleIdentifier \" ,"
10129+ available_apps_json+=" \" CFBundleShortVersionString\" :\" $CFBundleShortVersionString \" ,"
10130+ available_apps_json+=" \" CFBundleDisplayName\" :\" $CFBundleDisplayName \" },"
10131+ done <<< " $available_apps_base"
10132+ available_apps_json=" ${available_apps_json% ,} ]"
10133+
10134+ local available_apps=($( echo " $available_apps_json " | $jq -r ' to_entries[] | .value.CFBundleIdentifier' | tr ' \n' ' ' ) )
1013710135 local all_apps=(" ${available_apps[@]} " )
1013810136 available_apps+=(" Go Back" )
1013910137 local app_index=0
@@ -10171,7 +10169,7 @@ device_dumpapp() {
1017110169 " Clutch" )
1017210170 local ipa
1017310171 if [[ $device_det == 5 ]]; then
10174- $ssh -p $ssh_port root@127.0.0.1 " /tmp/$dumper_binary $( echo $available_apps_json | $jq --argjson i $app_index -r ' to_entries[$i] | .value.CFBundleDisplayName' ) " & > ssh.log
10172+ $ssh -p $ssh_port root@127.0.0.1 " /tmp/$dumper_binary $( echo " $available_apps_json " | $jq --argjson i $app_index -r ' to_entries[$i] | .value.CFBundleDisplayName' ) " & > ssh.log
1017510173 ipa=" $( cat ssh.log | grep " /var/root/Documents/Cracked/" | tr -d " \t" ) "
1017610174 else
1017710175 $ssh -p $ssh_port root@127.0.0.1 " /tmp/$dumper_binary -d $selected2 " & > ssh.log
@@ -10184,7 +10182,7 @@ device_dumpapp() {
1018410182 esac
1018510183
1018610184 if [[ $check == 0 ]]; then
10187- local ipa_name=" $( echo $available_apps_json | $jq --argjson i $app_index -r ' to_entries[$i].value | if (.CFBundleDisplayName == "") then .CFBundleExecutable else .CFBundleDisplayName end + " " + .CFBundleShortVersionString' ) .ipa"
10185+ local ipa_name=" $( echo " $available_apps_json " | $jq --argjson i $app_index -r ' to_entries[$i].value | if (.CFBundleDisplayName == "") then .CFBundleExecutable else .CFBundleDisplayName end + " " + .CFBundleShortVersionString' ) .ipa"
1018810186 $scp -P $ssh_port root@127.0.0.1:/tmp/$selected2 .ipa " ../saved/applications"
1018910187 $ssh -p $ssh_port root@127.0.0.1 " rm /tmp/$selected2 .ipa"
1019010188 mv " ../saved/applications/$selected2 .ipa" " ../saved/applications/$ipa_name "
0 commit comments