(I didn't get a response in the thread for this ROM, I hope I'll have more luck here.)
I'm currently running crDroid 11, but the camera is almost unusable. Thus I'm now trying to install G930FXXU8EUE1_DevBase_v7.4.zip using TWRP 3.7.0_9-0 from https://forum.xda-developers.com/t/...laxy-s7-herolte.3333770/page-83#post-87570457.
However, I get the following error:
Code:
Installing zip file '/external_sd/G930FXXU8EUE1_DevBase_v7.4.zip'
Unmounting System...
Failed! Can't unzip 7za package!
Aborting, no changes have been made
I've tried this with the rooted and unrooted boot image from crDroid installed.
How can I troubleshoot this?
I managed to install it:
Installed twrp-3.6.2_9-0-herolte.img
Installed BL_G930FXXU8EUE1.zip from https://androidfilehost.com/?w=files&flid=287434
Extract G930FXXU8EUE1_DevBase_v7.4.zip
in ./META-INF/com/google/android/update-binary, make the following change:
# Check device using bootloader prefix
getprop ro.bootloader | grep "^$BLPREFIX" >/dev/null
if [ $? -ne 0 ] ; then
ui_print "This ROM is designed for $BLPREFIX, but not aborting!"
ui_print " "
# abort
fi
cd G930FXXU8EUE1_DevBase_v7.4
zip -r -9 G930FXXU2xxxx_DevBase.zip META-INF options.prop ALEXNDR
Related
it's fixed in the lastest code of Quarx at github
and the lastest version of CWM is updated to 3.1.0.0--- perfect
the lastest version of bootmenu is 0.8.3
and the version 0.8.0 within CM7 Beta6 has bugs.
and 0.8.3 can install zip of MIUI , but failed to CM7, the auothor of bootmenu
CM7: FAIL → for reasons of CM7 backuptool.sh (unmount command)
i fount how to fix it.
just remove the code "umount $S" of line 151 , it will be fine. see detail like this:
backuptool.sh:
Code:
....
S=/system
....
case "$1" in
backup)
mount $S #
check_prereq;
if [ $PROCEED -ne 0 ];
then
rm -rf $C
mkdir -p $C
for file_list in get_files get_custom_files; do
$file_list | while read FILE REPLACEMENT; do
backup_file $S/$FILE
done
done
fi
umount -1 $S # ---------- [COLOR="Red"] just write this code like this (line 151[/COLOR])
;;
....
Man, why you create a thread? This is a rom problem, so post it in that rom thread.
Anyway thanks for the info, will be useful for quarx.
i found the reason
[email protected] said:
i found the reason
Click to expand...
Click to collapse
所以另开一帖,为了显示你很牛逼?
我跟帖子 怕q大看不到。对不起了!!!
send thats to quarx , maybe on git hub of issues
For the devs here that have jumped into the MTD fray, you might have noticed that `reboot recovery` from the shell does not work on MTD ROMs.
CM devs are trying to figure out exactly why reboot to recovery doesn't work like it did on TW ROMs, but for now, here is a hack that will make `reboot recovery` from the shell work.
Place the following in a text file named 'reboot' and copy it into /system/bin
Code:
#!/system/bin/sh
if [ ! "$1" ]; then
sync; /system/bin/toolbox reboot
echo rebooting!
elif [ $1 == "recovery" ]; then
system/xbin/busybox devmem 0x57fff800 32 0x5EC0B007
sync
/system/bin/toolbox reboot
else
echo "Reboot wrapper for Epic MTD"
echo
echo "Usage: reboot [recovery]"
echo
fi
Right now CM7 has this reboot to recovery from the shell working by embedding that `devmem` line from the above script in their toolbox binary. You could also use the toolbox binary from the new CM build, but their toolbox binary lacks many of the functions that TW based roms toolbox has, and it caused major problems for me when I tried to use it, so it's easiest to use this script instead.
NOTE: I didn't figure this out myself. Credit goes to noobnl for sharing the devmem command with me.
I am currently compiling a Red Wolf custom recovery for Xiaomi Mi A2 lite (daisy). Sources are synced, device tree etc. all set up correctly. Now I am facing a rather banal-looking error during build. cp refuses to copy a directory, because -r is not specified in the build file.
I obviously tried to find the build file (rw_recovery/out/build_omni_daisy.ninja) and add the -r argument, but it seems to be regenerated at the beginning of every build process, as the process still fails and the previously changed line appears unchanged when opening the file after the attempted build.
These are the build steps:
Code:
. build/envsetup.sh
lunch omni_daisy-eng #config for the device
mka bootimage #device uses boot.img as recovery
This command leaves me with the following error:
Code:
[ 99% 6883/6884] Prebuilt (rw_recovery/out/target/product/daisy/kernel)
FAILED: rw_recovery/out/target/product/daisy/kernel
/bin/bash -c "(rm -f /home/luca/rw_recovery/out/target/product/daisy/kernel) && (cp rw_recovery/out/target/product/daisy/obj/KERNEL_OBJ/arch/arm64/boot/ rw_recovery/out/target/product/daisy/kernel )"
cp: -r not specified; omitting directory 'rw_recovery/out/target/product/daisy/obj/KERNEL_OBJ/arch/arm64/boot/'
ninja: build stopped: subcommand failed.
17:13:06 ninja failed with: exit status 1
I would love to hear any suggestions about how to force ninja to execute the command with -r. Alternatively, suggestions about where to find the file from which the above mentioned build file is recreated after executing mka command are much welcomed as well.
Hi all,
You may or may not already be familiar with it, but there was a very nice script created by Joseph Miller to install new factory images (with or without locking the device). What I would like to do is to see how much of the script can be migrated to work with Pixel 4/4 XL.
Based on your experience with updating your 4/4 XL, do you see anything in the deuce script for the Pixel 2 that would need to be revised for use on a Pixel 4?
I'm certainly willing to test on my own device and any feedback would be appreciated. (I am relatively new to the Pixel 4 XL but very familiar with the Pixel 2 XL.)
.sh version is below:
Code:
#!/bin/sh
echo "Welcome to Deuces Flashing Script!"
echo "v5.0-Linux"
#to create a log, run: "script -c ./deuce-flash-all-v5.0.sh logfile.log"
echo "Checking if Fastboot binary is accessible.."
if [ -f "fastboot" ];
then
echo "\033[32m fastboot binary exists in script directory.\033[0m"
fb="./fastboot"
else
echo "\033[33mfastboot binary does not exist in script directory\033[0m" >&2
command -v fastboot | ( read fb; echo "\033[33mFound $fb. Will try to use this.\033[0m" )
fb="fastboot"
fi
echo "Checking if Fastboot works correctly"
if $fb --version
then
echo "\033[32m fastboot returned a version, continuing..\033[0m"
else
echo "\033[31m fastboot not working correctly.\033[0m"
exit 1
fi
echo "Checking if device is detected via Fastboot."
if [ -z $($fb devices -l) 2> /dev/null ]
then
echo "\033[31mDevice not detected in fastboot.\033[0m"
exit 1
else
echo "\033[32m Device detected!\033[0m"
fi
echo "Insuring unzip package is installed and accessible"
if unzip 1> /dev/null
then
echo "\033[32m unzip detected!\033[0m"
else
echo "\033[31m unzip is not installed, or is not working correctly!\033[0m"
echo "\033[33mplease install via:\033[0m"
echo "\033[33msudo apt install unzip\033[0m"
echo "\033[33mor\033[0m"
echo "\033[33msudo yum install unzip\033[0m"
exit 1
fi
zipcount="$(ls *.zip 2>/dev/null | wc -l)"
if [ "${zipcount}" -eq 1 ]
then
zipname="$(ls *.zip)"
echo ""
echo "\033[32mImage to flash: ${zipname}\033[0m"
elif [ "${zipcount}" -gt 1 ]
then
echo "\033[31m More than 1 zip!\033[0m"
echo "\033[31mPlease have only 1 zip file in the script folder.\033[0m"
zipnames="$(ls *.zip)"
echo "\033[33m${zipnames}\033[0m"
exit 1
else
echo "no zip files!"
exit 1
fi
echo -n "Are you SURE you want to continue? (y/N) "
read answer1
if echo "$answer1" | grep -iq "^y" ;then
echo "\033[33mThis Tool will reformat partitions in your device!\033[0m"
echo "\033[33mIt will attempt to keep your user data!\033[0m"
echo "\033[33mData could be lost! - Use At Your Own Risk!\033[0m"
echo -n "Continue? (y/N) "
read answer2
if echo "$answer2" | grep -iq "^y" ;then
echo "Checking if bootloader is unlocked."
echo "Look at device to confirm if script is waiting..."
$fb flashing unlock
echo "There will be errors if already unlocked, ignore."
else
echo "Aborting..."
exit 1
fi
else
echo "Aborting..."
exit 1
fi
echo "extracting the main image zip..."
unzip -j -o ${zipname} -d _work/
echo "setting active partition slot to A"
$fb --set-active=a
echo "flashing bootloader & radio..."
$fb flash bootloader _work/bootloader*.img
rm -rf _work/bootloader*.img
$fb reboot-bootloader
sleep 5
$fb flash radio _work/radio*.img
rm -rf _work/radio*.img
$fb reboot-bootloader
echo "extracting secondary image zip..."
zipname2="$(ls _work/*.zip)"
unzip -j -o ${zipname2} -d _work/
mkdir _work/_ 2>/dev/null
mv _work/*_other.img _work/_/ 2>/dev/null
echo "setting active partition slot to B"
$fb --set-active=b
bimgs="$(ls _work/_/*.img)"
for bimg in $bimgs
do
part=$(ls _work/_/*_other.img | cut -d "_" -f3 | cut -d "/" -f2)
echo $part
$fb flash $part $bimg
rm -rf $bimg
done
rm -rf _work/_
echo "setting active partition slot to A"
$fb --set-active=a
aimgs=$(ls _work/*.img)
for aimg in $aimgs
do
part=$(echo $aimg | cut -d "/" -f2 | cut -d "." -f1)
echo $part
$fb flash $part $aimg
rm -rf $aimg
done
echo -n "\033[33mDo you want to format user data? (y/N) \033[0m"
read answer3
if echo "$answer3" | grep -iq "^y" ;then
echo "\033[33m!!!This will wipe all your data!!!\033[0m"
echo -n "\033[31mAre you SURE? (y/N) \033[0m"
read answer4
if echo "$answer4" | grep -iq "^y" ;then
echo "Formatting user data.."
$fb format userdata 2>/dev/null
$fb reboot-recovery 2>/dev/null
echo "\033[32mDone!\033[0m"
else
echo "\033[36mSkipped formatting userdata.\033[0m"
echo "\033[32mDone!\033[0m"
exit
fi
else
echo "\033[36mSkipped formatting userdata.\033[0m"
echo "\033[32mDone!\033[0m"
exit
fi
exit
.bat version is here.
Note: I recommend placing the latest flashboot somewhere in your $PATH and running the script from within the unzipped factory image folder (where you have also unzipped the image zip).
Edit: Updated deuce script to v5.0 (thanks quorn23!)
Just a heads up, you're using an older version of the script, see original thread https://forum.xda-developers.com/pixel-2-xl/development/tool-deuces-bootloop-recovery-flashing-t3704761
I haven't tested it yet, but the 5.0 apparently works with A10 skimming through the last few pages in the thread. Once the Kernel is updated with the new sources (dez broke face unlock) i might have a look. What i probably would do is prepatch the boot image with magisk, besides that i would assume it's pretty straight forward, as it's AOSP.
Edit: as context, i'm coming from the pixel 2xl as well, i generally been using the Deuce script to update the 2 XL, if i recall correctly the only change i made was to adapt it to flash TWRP as well, which is currently not needed as not available for the 4 XL. (Devs wife is pregnant, so he's busy with more important personal life stuff currenty)
quorn23 said:
What i probably would do is prepatch the boot image with magisk, besides that i would assume it's pretty straight forward, as it's AOSP.
Click to expand...
Click to collapse
Out of habit, I've always re-added magisk manually, but you're right, this will require some additional dance steps without twrp. What i like about the original sh script is that the core dependency (for most scenarios) is a recent fastboot.
After setting up Magisk root and MagiskHide Props, I was a bit disappointed to learn that you loose root after a LOS OTA update (which comes out every week). So, I decided to make a bash script to help me automate restoring root. This script still needs to run on your computer rather than on the phone, but it is still a major improvement to the manual process. I am sure smart people can adapt this script to be a BAT script that will work on Windows.
Prerequisites
USB Debugging enabled on your OnePlus 6.
ADB/Fastboot installed on your computer.
It is assumed that you already have root, you just temporarily lost it after an OTA update.
You will need python 3. You will also need to install at least re and requests packages using pip.
Python script for extracting boot.img from the payload.bin provided here https://wiki.lineageos.org/extracti...ing-proprietary-blobs-from-payload-based-otas
It is expected that you put it into `scripts` folder within your current working directory (from where you run the script).
Python script to download the latest LOS zip from the website created by me. Here are the contents of that downloadLOS.py script which is expected to be in your working directory.
Python:
import re
import requests
# Get HTML text of the downloads webpage
webpage = requests.get("https://download.lineageos.org/enchilada").text
# Get the firmware urls
pattern = r"(https:.*nightly.*signed\.zip)\""
matches = re.findall(pattern, webpage, flags=0)
matches.sort(reverse=True)
# Get the latest firmware URL
latestOSURL = matches[0]
# Extract firmware name
name = latestOSURL.split('/')[-1]
print("Latest firmware: " + name)
print("Download link: " + latestOSURL)
# Download the latest firmware
print("Downloading...")
with open(name, "wb") as f:
f.write(requests.get(latestOSURL).content)
print("Done!")
Magisk Root Automation Script
Before running the script, install the latest OTA update through the updater app and reboot once that is done.
The script is quite self explanatory. The steps are:
Download the latest LOS zip using downloadLOS.py script.
Extract boot.img and vbmeta.img from the zip using unzip and update-payload-extractor. These are needed for rooting.
Copy boot.img to phone's Download folder.
Here the script pauses, waiting for you to go into Magisk app to patch the boot.img that was just copied. Hit any key once you are done.
The patched boot image is copied to your computer and both boot images are removed from the phone.
The phone now reboots into bootloader. The script pauses. Hit any key once your phone is in bootloader.
Both boot_a and boot_b are flashed with patched boot image. vbmeta partition is also flashed.
The phone reboots.
Firmware files are cleaned from your folder.
flash.sh
Bash:
#!/bin/bash
echo "Launching python script to download latest firmware ..."
python3 ./downloadLOS.py
echo ""
echo "Extracting boot.img ..."
echo "----"
unzip lineage*.zip 'payload.bin'
python3 ./scripts/update-payload-extractor/extract.py payload.bin --output_dir ./ --partitions boot vbmeta
echo "----"
echo ""
echo "Copying boot.img to phone... "
echo "----"
adb push ./boot.img /storage/emulated/0/Download
echo "----"
echo ""
read -t 1 -n 1
echo "Press any key after done patching boot... "
while [ true ] ; do
read -t 3 -n 1
if [ $? = 0 ] ; then
break ;
else
continue ;
fi
done
echo "Copying patched boot.img to PC... "
echo "----"
adb shell mv /storage/emulated/0/Download/magisk_patched* /storage/emulated/0/Download/magisk_patched.img
adb pull /storage/emulated/0/Download/magisk_patched.img magisk_patched.img
echo "----"
echo ""
echo "Removing boot images from phone... "
echo "----"
adb shell rm /storage/emulated/0/Download/boot.img
adb shell rm /storage/emulated/0/Download/magisk_patched.img
echo ""
echo "Rebooting to bootloader... "
echo "----"
adb reboot bootloader
read -t 1 -n 1
echo "Press any key when in bootloader... "
while [ true ] ; do
read -t 3 -n 1
if [ $? = 0 ] ; then
break ;
else
continue ;
fi
done
echo "----"
echo "Flashing both boots... "
echo "----"
fastboot flash boot_a magisk_patched.img
fastboot flash boot_b magisk_patched.img
echo "----"
echo ""
echo "Flashing vbmeta... "
echo "----"
fastboot flash vbmeta --disable-verity --disable-verification vbmeta.img
echo "----"
echo ""
fastboot reboot
echo ""
echo "Done rooting!"
echo "Cleaning up local files ..."
rm *.img
rm *.bin
rm *.zip
echo "Complete!"
Notes
If you have slow internet and do not want to download the update twice. You could remove the whole downloadLOS.py section and use a separate script pullLOS.sh to pull the LOS update from your phone BEFORE YOU REBOOT after installing the update. After you reboot you loose root and cannot access it. For this you will need to enable rooted debugging in developer options.
Bash:
#!/bin/bash
adb root
echo "Copying update zip from the phone ..."
adb shell mv /data/lineageos_updates/lineage* /data/lineageos_updates/lineage.zip
adb pull /data/lineageos_updates/lineage.zip lineage.zip
adb shell rm /data/lineageos_updates/lineage.zip
echo "----"
echo ""
Attachment
Attachments contains:
scripts folder for your convenience containing LOS extractor scripts. Feel free to remove and re-download from source.
downloadLOS.py python script to download the latest LOS zip from the website.
flash.sh the main script
pullLOS.sh optional script for those who want to avoid re-downloading OTA update.
I hope you guys find it helpful! Let me know if you encounter any problems.
Doesn’t your device factory reset afterwards?
Will it copy your data over to your device again?
I think you are misunderstanding something. This is only if you already have LineageOS 19.1 and Magisk root.
LineageOS has over the air (OTA) updates. They release them every week. They do not touch your data. You just install through Settings -> System -> Updater, reboot and you are good to go. The same way OTAs work in OOS.
The problem is that you loose your Magisk root. In order to bring it back you need to patch and flash a boot partition again (and also vbmeta). Flashing boot partition does not do anything to your data. The script just automates what you would have to do by hand.
Isn't it the same outcome as with Magisk "Install on inactive partition after OTA" option?
I always install OTAs and select that option on Magisk and reboot.
jfromeo said:
Isn't it the same outcome as with Magisk "Install on inactive partition after OTA" option?
I always install OTAs and select that option on Magisk and reboot.
Click to expand...
Click to collapse
You could be right, but I have never seen / not been able to find this option. Maybe it is only available right after an OTA, don't know.