Related
can anyone tell me what I did wrong here? I flashed it in recovery, but nothing changed, didnt even remove the old file.
Code:
ui_print("Installing Trueblood Boot Animation By Deaconfrost");
show_progress(0.1, 0);
# clearing dalvik cache
ui_print("Removing Old Boot Animation At /system/media/bootanimation.zip");
delete("/system/media/bootanimation.zip");
# copy system
show_progress(0.5, 10);
ui_print("Extracting New Boot Animation To /system/media/bootanimation.zip");
package_extract_dir("system", "/system");
# installation complete
ui_print("Installation Complete");
ui_print("Please Give Me Thanks On XDA");
thanks
deconfrost said:
can anyone tell me what I did wrong here? I flashed it in recovery, but nothing changed, didnt even remove the old file.
Code:
ui_print("Installing Trueblood Boot Animation By Deaconfrost");
show_progress(0.1, 0);
# clearing dalvik cache
ui_print("Removing Old Boot Animation At /system/media/bootanimation.zip");
delete("/system/media/bootanimation.zip");
# copy system
show_progress(0.5, 10);
ui_print("Extracting New Boot Animation To /system/media/bootanimation.zip");
package_extract_dir("system", "/system");
# installation complete
ui_print("Installation Complete");
ui_print("Please Give Me Thanks On XDA");
thanks
Click to expand...
Click to collapse
Code:
[b]run_program("/sbin/mount", "/dev/block/mmcblk0p25", "/system");[/b]
ui_print("Installing Trueblood Boot Animation By Deaconfrost");
show_progress(0.1, 0);
# clearing dalvik cache
ui_print("Removing Old Boot Animation At /system/media/bootanimation.zip");
delete("/system/media/bootanimation.zip");
# copy system
show_progress(0.5, 10);
ui_print("Extracting New Boot Animation To /system/media/bootanimation.zip");
package_extract_dir("system", "/system");
[b]run_program("/sbin/umount", "/system");[/b]
# installation complete
ui_print("Installation Complete");
ui_print("Please Give Me Thanks On XDA");
Try these...
just tried that
getting error (status 6)
scratching my head
deconfrost said:
just tried that
getting error (status 6)
scratching my head
Click to expand...
Click to collapse
Which clockworkmod recovery are you using?
I'm using 3.0.0.6
deconfrost said:
can anyone tell me what I did wrong here? I flashed it in recovery, but nothing changed, didnt even remove the old file.
Code:
ui_print("Installing Trueblood Boot Animation By Deaconfrost");
show_progress(0.1, 0);
# clearing dalvik cache
ui_print("Removing Old Boot Animation At /system/media/bootanimation.zip");
delete("/system/media/bootanimation.zip");
# copy system
show_progress(0.5, 10);
ui_print("Extracting New Boot Animation To /system/media/bootanimation.zip");
package_extract_dir("system", "/system");
# installation complete
ui_print("Installation Complete");
ui_print("Please Give Me Thanks On XDA");
thanks
Click to expand...
Click to collapse
Code:
ui_print("Installing Trueblood Boot Animation By Deaconfrost");
show_progress(0.1, 0);
#mount system
mount("ext3", "EMMC", "/dev/block/mmcblk0p25", "/system");
ui_print("Removing Old Boot Animation At /system/media/bootanimation.zip");
delete("/system/media/bootanimation.zip");
# copy system
show_progress(0.5, 10);
ui_print("Extracting New Boot Animation To /system/media/bootanimation.zip");
package_extract_dir("system", "/system");
# installation complete
ui_print("Installation Complete");
ui_print("Please Give Me Thanks On XDA");
#unmount system
unmount("/system");
Corrections above, forgot to mount and unmount
Sent from me LeeDrOiD loaded Desire HD using the Android XDA Premium app
this is really having me scratch my head
I tried mount and unmount before with same error with various different ways I can find
tried both phunky and lee, same error.
problem in mounting thats about all I can figure out
deconfrost said:
this is really having me scratch my head
I tried mount and unmount before with same error with various different ways I can find
tried both phunky and lee, same error.
problem in mounting thats about all I can figure out
Click to expand...
Click to collapse
Is there any encoding in your updater? Needs to be a clean script, if your on windows, notepad++ is best, on Linux I would recommend Kate
Sent from me LeeDrOiD loaded Desire HD using the Android XDA Premium app
Download this: View attachment update-binary.zip
Extract, and replace yours with this one.
was just downloading notepad++ after I replied last, gonna give that a try now, was using just windows notepad before, have ubuntu on dual boot but I haven't finish setting that up yet, for some funny reason it took over 6hrs to repo sync and it wasnt finished, so I stopped it and start again another time.
phunkycow said:
Download this: View attachment 540717
Extract, and replace yours with this one.
Click to expand...
Click to collapse
sorted
thanks phunky and lee
the binary did the magic
deconfrost said:
sorted
thanks phunky and lee
the binary did the magic
Click to expand...
Click to collapse
No problem, glad you got it sorted!
deconfrost said:
was just downloading notepad++ after I replied last, gonna give that a try now, was using just windows notepad before, have ubuntu on dual boot but I haven't finish setting that up yet, for some funny reason it took over 6hrs to repo sync and it wasnt finished, so I stopped it and start again another time.
Click to expand...
Click to collapse
Glad you got it sorted
Yeh, windows notepad was the issue, utf8 standard formatting, results in additional code being added.
As far as the repo sync goes, 6 hours could be about right.
I personally would specify individual branches, I.e "-b froyo" or "-b gingerbread", the entire thing is just over 6 gig
Sent from me LeeDrOiD loaded Desire HD using the Android XDA Premium app
I might do the repo sync on a day im out for the whole day mine might take longer since Im on 3G.
thanks guys
Dual-boot Powered by U-boot and Custom Kernel on Galaxy Nexus.
Everyone can look at my github for details.
https://github.com/dlhxr
The uboot-tuna repository is for u-boot and the 2nd-kernel-for-galaxy-nexus is for kernel modification.
Edit: I forked the fancykernel repository and change the ramdisk to support image boot in branch fancykernel-ramdisk-imageboot. You can easily use that repository to build an image boot supported kernel.
Instructions are in the post #2, #3 and #4.
The first post is for introduction and some pre-built binaries.
There are pre-built u-boot for dual-boot, tri-boot, quad-boot and quad-recovery-boot!!!
You can find how I modify the u-boot in the branches of uboot-tuna repository.
Dual Boot
View attachment GN_U-Boot_Kernel.zip
* Normal Boot -> No keys are pressed, cyan LED ->Find kernel in /data/media/boot/1st.img
* Recovery Boot -> Volume Up key pressed, green LED -> Go to recovery
* Custom Boot -> Volume Down key pressed, blue LED ->Find kernel in /data/media/boot/2nd.img
!!!It will replace your kernel. Remember to copy your boot.img to /data/media/boot/1st.img first!!!
Tri Boot
View attachment GN_U-Boot_Triboot_Kernel.zip
* First Boot -> No keys are pressed, cyan LED ->Find kernel in /data/media/boot/1st.img
* Third Boot -> Volume Up key pressed, green LED -> Find kernel in /data/media/boot/3rd.img
* Second Boot -> Volume Down key pressed, blue LED ->Find kernel in /data/media/boot/2nd.img
!!!It will replace your kernel. Remember to copy your boot.img to /data/media/boot/1st.img first!!!
Quad Boot Thank Zittoro to remind me about pessing both keys!
View attachment GN_U-Boot_QuadBoot_Kernel.zip
* First Boot -> No keys are pressed, cyan LED ->Find kernel in /data/media/boot/1st.img
* Third Boot -> Volume Up key pressed, green LED -> Find kernel in /data/media/boot/3rd.img
* Second Boot -> Volume Down key pressed, blue LED ->Find kernel in /data/media/boot/2nd.img
* Recovery Boot -> Volume Up and Down keys pressed, yellow LED ->Go to recovery
Quad Boot with Recovery Image Boot
View attachment GN_U-Boot_QuadBoot_Recovery_Kernel.zip
* First Boot -> No keys are pressed, cyan LED ->Find kernel in /data/media/boot/1st.img
* Third Boot -> Volume Up key pressed, green LED -> Find kernel in /data/media/boot/3rd.img
* Second Boot -> Volume Down key pressed, blue LED ->Find kernel in /data/media/boot/2nd.img
* Recovery Boot -> Volume Up and Down keys pressed, yellow LED ->Find recovery image in /data/media/boot/recovery.img. You can put either CWM recovery or TWRP recovery image there.
!!!It will replace your kernel. Remember to copy your boot.img to /data/media/boot/1st.img first!!!
If you want to bulid your own u-boot from source, you can look into post #2.
Three ways to modify the 2nd kernel fully working now!
1. Image Boot Recommanded!
Partition relation for the 2nd kernel.
Code:
system /rdata/media/rom/system.img
data /rdata/media/rom/data.img
cache /rdata/media/rom/cache.img
See post #3 part I
2. Image Folder Mix Boot
Partition relation for the 2nd kernel
Code:
system /rdata/media/2nd/system.img
data /rdata/media/2nd/data
cache /rdata/media/2nd/cache
See post #3 part II
3. Folder Cache Boot
Partition relation for the 2nd kernel.
Code:
system /dev/block/platform/omap/omap_hsmmc.0/by-name/cache
data /rdata/media/2nd/data
cache /rdata/media/2nd/cache
See post #3 part III.
Acknowledgement
twistedumbrella for doing these thing together and his help.
sp3dev for his port of u-boot to galaxy nexus and his help to modify u-boot source.
Jijonhyuni for firstly putting his dual boot kernel on xda.
crayon for his busybox mount way to support HTC DHD multiboot, which inspired me a lot!
Most Frequently Asked Questions Updated on April 18th.
Q: Some of the 4.1 kernels seem not work, right?
A: The init binary in the ramdisk is not compatible. Replace the init in /ramdisk/ by this one.View attachment init.7z
(Don't forget to extract the init in the init.7z first.)
Q: Some kernel has serious color problem, the screen showing a green color?
A: Unpack the kernel and repack it with the cmdline adding "mms_ts.panel_id=18". And I made an easy linux script for this.View attachment Fix_Color.7z:laugh: and an android arm script and binary for people's computer not available.View attachment fix_color_arm.7z I use SManager to execute the script.
Edit: Someone reported his panel_id is not 18, but 162. If 18 doesn't work with your device, try 162.
Q: When I am using the image boot way to dual boot, the zip file seems not being flashed?
A: The TWRP seems not compatible with image boot flashing script and please use CWM recovery instead.
Step 1: How to Modify the U-boot Source
Since developer sp3dev on xda ported u-boot for galaxy nexus, we have the opportunity to exploit it and realize dual-boot on our device. Feel free to email me ([email protected]) or pm me on xda.
Modify the U-boot
Notice: This step can be skipped using my pre-built u-boot.
View attachment GN_U-Boot_Kernel.zip
* Normal Boot -> No keys are pressed, cyan LED ->Find kernel in /data/media/boot/1st.img
* Recovery Boot -> Volume Up key pressed, green LED -> Go to recovery
* Custom Boot -> Volume Down key pressed, blue LED ->Find kernel in /data/media/boot/2nd.img
!!!It will replace your kernel. Remember to copy your boot.img to /data/media/boot/1st.img first!!!
Another pre-built u-boot by me for tri-boot!!!
View attachment GN_U-Boot_Triboot_Kernel.zip
* First Boot -> No keys are pressed, cyan LED ->Find kernel in /data/media/boot/1st.img
* Third Boot -> Volume Up key pressed, green LED -> Find kernel in /data/media/boot/3rd.img
* Second Boot -> Volume Down key pressed, blue LED ->Find kernel in /data/media/boot/2nd.img
!!!It will replace your kernel. Remember to copy your boot.img to /data/media/boot/1st.img first!!!
The pre-compiled version sp3dev provides can only boot one kernel when using android 4.2 system as the main system because sdcard simulation method changed in 4.2 system. The sdcard path is /data/media/0, not /data/media. Sp3dev made the volume down button function to boot from /data/media and it cannot find the kernel we put in sdcard. So I managed to correct the path, successfully boot different kernel on device.
Edit: I change the kernel path to /data/media/boot to make sure the kernel won't be wiped by cwm recovery!
With the help of sp3dev, I successfully change the location of the custom boot kernel to /data/media/boot/2nd.img and the normal boot kernel to /data/media/boot/1st.img.
Firstly, I downloaded the source file of u-boot (https://github.com/Ksys-labs/uboot-tuna) and ARM cross-compiler codesourcery 2010q1-188 version. Exact them to the folder you like.
Change some configuration in /u-boot-source/include/configs/omap4_tuna.h.
Find the following lines.
Code:
"kernel_name=/boot/vmlinux.uimg\0" \
"script_img/boot/vmlinux.scr.uimg\0" \
Change to
Code:
"kernel_name=/meida/boot/1st.img\0" \
"script_img/media/boot/1st.scr.uimg\0" \
And find
Code:
"boot_system=echo Booting SYSTEM; "\
Change one of the lines below it from
Code:
"setenv kernel_part 0xa; " \
to
Code:
"setenv kernel_part 0xc; " \
This one changes the normal boot kernel location and kernel file name to /data/media/boot/1st.img
Now we correct the location for custom boot kernel location. Find the following lines.
Code:
"boot_custom_emmc=echo Booting custom image; " \
"tuna_set_led 4; " \
"setenv loadaddr 0x81f00000; " \
"setenv script_img media/boot/vmlinux.scr.uimg; " \
"setenv kernel_name media/boot/vmlinux.uimg; " \
"setenv script_part 0xc; " \
"setenv kernel_part 0xc; " \
"setenv rootpart 0xc; " \
"setenv devnum 0; " \
"setenv devtype mmc; " \
"setenv bootargs " \
"${dev_extras} root=/dev/${devname}${rootpart} rootwait ro ;"\
"run load_boot_script; " \
"run custom_boot\0" \
Change to
Code:
"boot_custom_emmc=echo Booting custom image; " \
"tuna_set_led 4; " \
"setenv loadaddr 0x81f00000; " \
"setenv script_img /media/boot/2nd.scr.uimg; " \
"setenv kernel_name /media/boot/2nd.img; " \
"setenv script_part 0xc; " \
"setenv kernel_part 0xc; " \
"setenv rootpart 0xc; " \
"setenv devnum 0; " \
"setenv devtype mmc; " \
"setenv bootargs " ANDROID_CMDLINE " ;"\
"run load_boot_script; " \
"run custom_boot\0" \
Save the file and recompile the u-boot using the following script. (Go to source folder first.)
Code:
export PATH=/home/hoary/codesourcery/bin:$PATH
#Note: You should change the path to your codesourcery compiler location.
export ARCH=arm
export CROSS_COMPILE=arm-none-eabi-
make clean
make distclean
make omap4_tuna_config
make -j8 omap4_tuna
And you can find u-boot.bin in your source folder.
Find pre-compiled mkbootimg to make u-boot.bin a flashable img in CWM recovery.
View attachment mkboot-script.zip
Code:
mkbootimg --kernel u-boot.bin --ramdisk /dev/null -o u-boot.aimg
And copy your current kernel (boot.img) to /data/media/boot/1st.img. Using CWM flashable zip or fastboot to flash u-boot to boot partition.
Code:
CWM zip updater-script
package_extract_file("u-boot.aimg", "/dev/block/platform/omap/omap_hsmmc.0/by-name/boot");
Fastboot
fastboot flash boot u-boot.aimg
Step 2: How to Modify the Kernel
There are three ways to modify the kernel.
First one is called image boot, which means we can boot just from images on our device, like system.img, data.img, cache.img.
Second one is called image folder mix boot, which means we can boot from system.img and /data/media/2nd/data, /data/media/2nd/cache folders.
Third one is called folder cache boot, which means we boot from cache partition (mmcblk0p11) and /data/media/2nd/data, /data/media/2nd/cache folders.
I recommand the image boot, because it won't have the possiblity to influence our real system.
Let's begin.
Part I: Image Boot --Booting from images.
See details in https://github.com/dlhxr/2nd-kernel-for-galaxy-nexus/tree/image_boot
An image boot kernel based on learnkernel 6.2 for 4.2
View attachment 2nd_image_boot.7z
This one is color-fixed.
View attachment 2nd_image_boot_color_fixed.7z
Partition relation in the kernel
Code:
system /rdata/media/rom/system.img
data /rdata/media/rom/data.img
cache /rdata/media/rom/cache.img
rdata is the original data partition /dev/block/platform/omap/omap_hsmmc.0/by-name/userdata and I mount it to /rdata instead of /data.
Modify your own kernel
After some study in xda developer Jijonhyuni’s dual boot kernel and a Chinese DHD Multi-boot thread, I managed to change the partition relation in the kernel. There are two files needing to be modified and one file need to be added.
But firstly we should unpack a compiled boot.img for the modification. Using unpackbootimg.
(
One script modified by me. View attachment mkboot-script.zip
See details in extract.sh and pack_boot.sh
Remember to use chmod command to make files in tools folder executable.
Code:
chmod +x ./tools/mkbootimg ./tools/mkbootfs ./tools/unpackbootimg
)
Code:
unpackbootimg –i boot.img
You can get five files.
Code:
boot.img-base
boot.img-cmdline
boot.img-pagesize
boot.img-ramdisk.gz
boot.img-zImage
Unpack the boot.img-ramdisk.gz using
Code:
mkdir ramdisk
cd ramdisk
gzip -dc ../boot.img-ramdisk.gz | cpio –i
OK, let's add a busybox binary.
View attachment busybox.zip
Unzip it and copy busybox to /ramdisk/sbin/busybox.
Then modify two files in ramdisk folder, init.tuna.rc and fstab.tuna.
Find fstab.tuna and modify the system, cache and data mounting line. (Don't forget to delete the check parameter in the data mounting line!)
Code:
[COLOR="Red"]#[/COLOR]/dev/block/platform/omap/omap_hsmmc.0/by-name/system /system ext4 ro wait
/dev/block/platform/omap/omap_hsmmc.0/by-name/efs /factory ext4 ro wait
[COLOR="Red"]#[/COLOR]/dev/block/platform/omap/omap_hsmmc.0/by-name/cache /cache ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic wait,check
/dev/block/platform/omap/omap_hsmmc.0/by-name/userdata [COLOR="Red"]/rdata[/COLOR] ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic [COLOR="Red"]wait,encryptable[/COLOR]=/dev/block/platform/omap/omap_hsmmc.0/by-name/metadata
Then find init.tuna.rc.
The on fs part. Change it to this.
Code:
on fs
mkdir /factory 0775 radio radio
mkdir /rdata 0771 system system
mount_all /fstab.tuna
exec /sbin/busybox mount -t ext4 -o ro /rdata/media/rom/system.img /system
exec /sbin/busybox mount -t ext4 -o noatime,nosuid,nodev,nomblk_io_submit,errors=panic,rw /rdata/media/rom/data.img /data
exec /sbin/busybox mount -t ext4 -o noatime,nosuid,nodev,nomblk_io_submit,errors=panic,rw /rdata/media/rom/cache.img /cache
setprop ro.crypto.fuse_sdcard true
Modifications are done and we need to repack the kernel using following command.
Code:
mkbootfs ramdisk | gzip > ramdisk-new.gz
mkbootimg --cmdline "no_console_suspend=1 console=null " --base 0x10000000 --pagesize 2048 --kernel boot.img-zImage --ramdisk ramdisk-new.gz -o 2nd.img
The parameters like cmdline, base and pagesize can be found in the exact files boot.img-base, boot.img-cmdline, boot.img-pagesize.
If you have a serious color problem using this kernel, you need to add "mms_ts.panel_id=18" to cmdline parameter when repacking the kernel.
Put it in /data/media/boot/2nd.img.
Make some img files by dd command in Ubuntu or other linux system.
Code:
dd if=/dev/zero bs=1M count=500 >> 500.img
And then use mke2fs format the image to ext4 file system.
Code:
mke2fs –T ext4 500.img
Rename them and put them into /data/media/rom/xxx.img
View attachment IMGs.zip Images from 50M to 800M pre-made by me.
Part II: Image Folder Mix Boot --Booting from image and folders.
See details in https://github.com/dlhxr/2nd-kernel-for-galaxy-nexus/tree/image_folder_boot
An Image folder boot kernel based on learnkernel 6.2 for 4.2
View attachment 2nd_image_folder_boot.7z
Partition relation in the kernel
Code:
system /rdata/media/2nd/system.img
data /rdata/media/2nd/data
cache /rdata/media/2nd/cache
rdata is the original data partition /dev/block/platform/omap/omap_hsmmc.0/by-name/userdata and I mount it to /rdata instead of /data.
Modify your own kernel
Firstly, unpack the boot.img using the method in the second post.
Find fstab.tuna and modify the system, cache and data mounting line. (Don't forget to delete the check parameter in the data mounting line!)
Code:
[COLOR="Red"]#[/COLOR]/dev/block/platform/omap/omap_hsmmc.0/by-name/system /system ext4 ro wait
/dev/block/platform/omap/omap_hsmmc.0/by-name/efs /factory ext4 ro wait
[COLOR="Red"]#[/COLOR]/dev/block/platform/omap/omap_hsmmc.0/by-name/cache /cache ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic wait,check
/dev/block/platform/omap/omap_hsmmc.0/by-name/userdata [COLOR="Red"]/rdata [/COLOR] ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic [COLOR="Red"]wait,encryptable[/COLOR]=/dev/block/platform/omap/omap_hsmmc.0/by-name/metadata
Then find init.tuna.rc.
The on fs part. Change it to this.
Code:
on fs
mkdir /factory 0775 radio radio
mkdir /rdata 0771 system system
mount_all /fstab.tuna
exec /sbin/busybox mount -t ext4 -o ro /rdata/media/2nd/system.img /system
mkdir /rdata/media/2nd
mkdir /rdata/media/2nd/data 0775 system system
mkdir /rdata/media/2nd/cache 0775 system cache
exec /sbin/busybox mount --bind /rdata/media/2nd/data /data
exec /sbin/busybox mount --bind /rdata/media/2nd/cache /cache
setprop ro.crypto.fuse_sdcard true
Thirdly, put busybox binary into /ramdisk/sbin/busybox
At last repack the boot.img.
You can find how to make images in Part I: Image Boot.
Part III: Folder Cache Boot
See details in https://github.com/dlhxr/2nd-kernel-for-galaxy-nexus/tree/folder_boot
I call this way to modify the kernel ----Folder Boot.
here is one folder boot kernel packed by me based on leankernel 6.2
View attachment 2nd_folder_boot.7z
The partition relation in the 2nd kernel is
Code:
system /dev/block/platform/omap/omap_hsmmc.0/by-name/cache
data /rdata/media/2nd/data
cache /rdata/media/2nd/cache
rdata is the original data partition /dev/block/platform/omap/omap_hsmmc.0/by-name/userdata and I mount it to /rdata instead of /data.
There are two files needing to be modified and one file need to be added.
Unpack the boot.img.
Firstly, let's add a busybox binary.
View attachment busybox.zip
Unzip it and copy busybox to /ramdisk/sbin/busybox.
Then modify two files in ramdisk folder, init.tuna.rc and fstab.tuna
fstab.tuna
Change like this
Code:
/dev/block/platform/omap/omap_hsmmc.0/by-name/[B][COLOR="Red"]cache[/COLOR][/B] /system ext4 ro wait
/dev/block/platform/omap/omap_hsmmc.0/by-name/efs /factory ext4 ro wait
[B][COLOR="Red"]#[/COLOR][/B]/dev/block/platform/omap/omap_hsmmc.0/by-name/cache /cache ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic wait,check
/dev/block/platform/omap/omap_hsmmc.0/by-name/userdata /[B][COLOR="Red"]rdata[/COLOR][/B] ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic wait,check,encryptable=/dev/block/platform/omap/omap_hsmmc.0/by-name/metadata
Init.tuna.rc
Find on fs and change like this
on fs
Code:
mkdir /factory 0775 radio radio
[B][COLOR="Red"]mkdir /rdata 0771 system system[/COLOR][/B]
mount_all /fstab.tuna
[B][COLOR="Red"]mkdir /rdata/media/2nd
mkdir /rdata/media/2nd/data 0775 system system
mkdir /rdata/media/2nd/cache 0775 system cache
exec /sbin/busybox mount --bind /rdata/media/2nd/data /data
exec /sbin/busybox mount --bind /rdata/media/2nd/cache /cache[/COLOR][/B]
setprop ro.crypto.fuse_sdcard true
Then find # virtual sdcard daemon running as media_rw (1023)
Change from
Code:
service sdcard /system/bin/sdcard /data/media /mnt/shell/emulated 1023 1023
to
Code:
service sdcard /system/bin/sdcard[B][COLOR="Red"] /rdata/media[/COLOR][/B] /mnt/shell/emulated 1023 1023
Repack the 2nd.img and put it in /data/media/boot/2nd.img.
Step 3: How to Modify the updater-script in the Flashable Zip Installer.
Part I: Image Boot
Firstly, add following lines below the first line. assert(getprop("ro.product.device") == "maguro" || getprop("ro.build.product") == "maguro");
Code:
unmount("system");
unmount("data");
unmount("cache");
run_program("/sbin/mkdir", "/rdata");
run_program("/sbin/mount", "-t", "ext4", "/dev/block/platform/omap/omap_hsmmc.0/by-name/userdata", "/rdata");
Replace the following line
Code:
mount("ext4", "EMMC", "/dev/block/platform/omap/omap_hsmmc.0/by-name/system", "/system");
by
Code:
run_program("/sbin/losetup", "/dev/block/loop1", "/rdata/media/rom/system.img");
run_program("/sbin/mount", "-t", "ext4", "/dev/block/loop1", "/system");
Replace the following lines
Code:
format("ext4", "EMMC", "/dev/block/platform/omap/omap_hsmmc.0/by-name/system", "0", "/system");
mount("ext4", "EMMC", "/dev/block/platform/omap/omap_hsmmc.0/by-name/system", "/system");
by
Code:
run_program("/sbin/losetup", "/dev/block/loop1", "/rdata/media/rom/system.img");
run_program("/sbin/mke2fs", "-T", "ext4", "/dev/block/loop1");
run_program("/sbin/mount", "-t", "ext4", "/dev/block/loop1", "/system");
Replace the following line
Code:
mount("ext4", "EMMC", "/dev/block/platform/omap/omap_hsmmc.0/by-name/userdata", "/data");
by
Code:
run_program("/sbin/losetup", "/dev/block/loop2", "/realdata/media/rom/data.img");
run_program("/sbin/mount", "-t", "ext4", "/dev/block/loop2", "/data");
Replace the following line (not include the lines you add at first.)
Code:
unmount("data");
by
Code:
run_program("/sbin/umount", "-d", "/data");
Replace the following line (not include the lines you add at first.)
Code:
unmount("system");
by
Code:
run_program("/sbin/umount", "-d", "/system");
Delete the following line
Code:
package_extract_file("boot.img", "/dev/block/platform/omap/omap_hsmmc.0/by-name/boot");
Add the following line in the end
Code:
run_program("/sbin/umount", "/rdata");
Part II: Image Folder Mix Boot
Firstly, add following lines below the first line. assert(getprop("ro.product.device") == "maguro" || getprop("ro.build.product") == "maguro");
Code:
unmount("system");
unmount("data");
unmount("cache");
run_program("/sbin/mkdir", "/realdata");
run_program("/sbin/mount", "-t", "ext4", "/dev/block/platform/omap/omap_hsmmc.0/by-name/userdata", "/rdata");
Replace the following line
Code:
mount("ext4", "EMMC", "/dev/block/platform/omap/omap_hsmmc.0/by-name/system", "/system");
by
Code:
run_program("/sbin/losetup", "/dev/block/loop1", "/rdata/media/2nd/system.img");
run_program("/sbin/mount", "-t", "ext4", "/dev/block/loop1", "/system");
Replace the following lines
Code:
format("ext4", "EMMC", "/dev/block/platform/omap/omap_hsmmc.0/by-name/system", "0", "/system");
mount("ext4", "EMMC", "/dev/block/platform/omap/omap_hsmmc.0/by-name/system", "/system");
by
Code:
run_program("/sbin/losetup", "/dev/block/loop1", "/rdata/media/2nd/system.img");
run_program("/sbin/mke2fs", "-T", "ext4", "/dev/block/loop1");
run_program("/sbin/mount", "-t", "ext4", "/dev/block/loop1", "/system");
Delete the following line
Code:
mount("ext4", "EMMC", "/dev/block/platform/omap/omap_hsmmc.0/by-name/userdata", "/data");
Delete the following line (not include the lines you add at first.)
Code:
unmount("data");
Replace the following line (not include the lines you add at first.)
Code:
unmount("system");
by
Code:
run_program("/sbin/umount", "-d", "/system");
Delete the following line
Code:
package_extract_file("boot.img", "/dev/block/platform/omap/omap_hsmmc.0/by-name/boot");
Add the following line in the end
Code:
run_program("/sbin/umount", "/rdata");
Modify the orginal line related to data partition. For example.
Replace the following line
Code:
package_extract_dir("data", "/data");
by
Code:
package_extract_dir("data", "/rdata/media/2nd/data");
Part III: Folder Cache Boot
Modify the updater-script to mount /dev/block/platform/omap/omap_hsmmc.0/by-name/cache to /system.
And rember to wipe your cache in CWM recovery, before apply the zip file.
You can also use twistedumbrella's app Dual-Boot Builder to install the system as folder cache boot system.
http://forum.xda-developers.com/showthread.php?t=2192064
Delete the following line in updater-script
Code:
format("ext4", "EMMC", "/dev/block/platform/omap/omap_hsmmc.0/by-name/system", "0", "/system");
Delete the following line in updater-script
Code:
package_extract_file("boot.img", "/dev/block/platform/omap/omap_hsmmc.0/by-name/boot");
Replace the following line in updater-script
Code:
mount("ext4", "EMMC", "/dev/block/platform/omap/omap_hsmmc.0/by-name/system", "/system");
by
Code:
mount("ext4", "EMMC", "/dev/block/platform/omap/omap_hsmmc.0/by-name/cache", "/system");
And replace the package extract for data like this.
Code:
package_extract_dir("data", "/data");
To
Code:
package_extract_dir("data", "/data/media/2nd/data");
Re: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel [24/03]
So if I follow, this is doing the same thing the current dual boot kernels do but needs two kernels?
keep trying... true multi boot will be awesome
In theory this is the u-boot kernel with both the first and second kernel for running two 4.2 ROMs. I haven't tested it, but it should fix the issues with the second kernel by fixing the fstab and then symlinking the directories instead of all that realdata stuff that didn't match up to anything
twistedumbrella said:
In theory this is the u-boot kernel with both the first and second kernel for running two 4.2 ROMs. I haven't tested it, but it should fix the issues with the second kernel by fixing the fstab and then symlinking the directories instead of all that realdata stuff that didn't match up to anything
Click to expand...
Click to collapse
Thank you so much.
But i tested it and something was wrong.
The screen said Cannot mount filesystem on /dev/block/platform/omap/omap_hsmmc.0/by-name/system at /data/media/2nd/system.
And other stuffs...
I see in your fstab.tuna.
Code:
/dev/block/platform/omap/omap_hsmmc.0/by-name/system /data/media/2nd/system ext4 noatime,ro wait
/dev/block/platform/omap/omap_hsmmc.0/by-name/efs /factory ext4 ro wait
/dev/block/platform/omap/omap_hsmmc.0/by-name/cache /data/media/2nd/cache ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic,noauto_da_alloc,data=writeback wait,check
/dev/block/platform/omap/omap_hsmmc.0/by-name/userdata /data/media/2nd/data ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic,noauto_da_alloc,data=writeback wait,check,encryptable=/dev/block/platform/omap/omap_hsmmc.0/by-name/metadata
The second parameter is the mount point, right?
/data/media/2nd/system seems not work.....
dlhxr said:
Thank you so much.
But i tested it and something was wrong.
The screen said Cannot mount filesystem on /dev/block/platform/omap/omap_hsmmc.0/by-name/system at /data/media/2nd/system.
And other stuffs...
I see in your fstab.tuna.
Code:
/dev/block/platform/omap/omap_hsmmc.0/by-name/system /data/media/2nd/system ext4 noatime,ro wait
/dev/block/platform/omap/omap_hsmmc.0/by-name/efs /factory ext4 ro wait
/dev/block/platform/omap/omap_hsmmc.0/by-name/cache /data/media/2nd/cache ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic,noauto_da_alloc,data=writeback wait,check
/dev/block/platform/omap/omap_hsmmc.0/by-name/userdata /data/media/2nd/data ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic,noauto_da_alloc,data=writeback wait,check,encryptable=/dev/block/platform/omap/omap_hsmmc.0/by-name/metadata
The second parameter is the mount point, right?
/data/media/2nd/system seems not work.....
Click to expand...
Click to collapse
# Android fstab file.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
It's not working because you can't really mount something to data without mounting data first and you are trying to have a second data folder inside the first. Basically, the way you are trying to do it won't work.
twistedumbrella said:
# Android fstab file.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
It's not working because you can't really mount something to data without mounting data first and you are trying to have a second data folder inside the first. Basically, the way you are trying to do it won't work.
Click to expand...
Click to collapse
So it is the end?
/data/2nd/system is even not a mount point, but why you write it in fstab.tuna?
How did the dual-boot work deal with the first-mount stuff?
dlhxr said:
So it is the end?
/data/2nd/system is even not a mount point, but why you write it in fstab.tuna?
How did the dual-boot work deal with the first-mount stuff?
Click to expand...
Click to collapse
dlhxr said:
Since I don’t want the 2nd system to have any influence on the 1st system, I choose to put 2nd system into data partition. The partition relation in the 2nd kernel is
Code:
[B][I][U][SIZE="3"]system /data/media/2nd/system[/SIZE][/U][/I][/B]
data /data/media/2nd/data
cache /data/media/2nd/cache
Click to expand...
Click to collapse
/dev/block/platform/omap/omap_hsmmc.0/by-name/system /data/media/2nd/system ext4 noatime,ro wait
I have it that way because you said that was where you were trying to mount...
If this one doesn't work, then you need to restructure the directories to have your "fake" folder as a top-level directory like /udata
twistedumbrella said:
/dev/block/platform/omap/omap_hsmmc.0/by-name/system /data/media/2nd/system ext4 noatime,ro wait
I have it that way because you said that was where you were trying to mount...
If this one doesn't work, then you need to restructure the directories to have your "fake" folder as a top-level directory like /udata
Click to expand...
Click to collapse
ah, I didn't explain myself well....
What I want is to mount /mmcblk0p12(realdata)/media/2nd/system to /system.....etc.
dlhxr said:
ah, I didn't explain myself well....
What I want is to mount /mmcblk0p12(realdata)/media/2nd/system to /system.....etc.
Click to expand...
Click to collapse
mmcblk0p12 mounts as /data in the first ROM correct? So in the second ROM, you are mounting a subdirectory of /data, otherwise you just overwrite the first ROMs data. Maybe it's better to leave you to it.
twistedumbrella said:
mmcblk0p12 mounts as /data in the first ROM correct? So in the second ROM, you are mounting a subdirectory of /data, otherwise you just overwrite the first ROMs data. Maybe it's better to leave you to it.
Click to expand...
Click to collapse
When I boot into the second rom kernel, I need to firstly mount mmcblk0p12 to /realdata and then mount its subdirectory to /data.
When I am in second rom, it would not influence the first rom because I even didn't load the first rom....
twistedumbrella said:
mmcblk0p12 mounts as /data in the first ROM correct? So in the second ROM, you are mounting a subdirectory of /data, otherwise you just overwrite the first ROMs data. Maybe it's better to leave you to it.
Click to expand...
Click to collapse
I made it work and updated my second post in this thread.
But in the second system there's no root access and I can't see what's in data and what's in cache in root explorer....
Don't know what's wrong.
dlhxr said:
I made it work and updated my second post in this thread.
But in the second system there's no root access and I can't see what's in data and what's in cache in root explorer....
Don't know what's wrong.
Click to expand...
Click to collapse
Try this one. I know what's in it and I can explain it if it works, but I don't have a setup to test it on.
twistedumbrella said:
Try this one. I know what's in it and I can explain it if it works, but I don't have a setup to test it on.
Click to expand...
Click to collapse
It doesn't work showing system not mounted (can't find /system/xxxxxx)
I unpacked your kernel and I think we should remove the check part during mounting realdata in fstab.tuna because it uses e2fsck in the system partition to check whether the partition mounted right or not, which lead to an error.
After I changed this, the system boots! But still no root access.....
Maybe my updater-script modification is not right?
At last, great work! Thanks a lot!
dlhxr said:
It doesn't work showing system not mounted (can't find /system/xxxxxx)
I unpacked your kernel and I think we should remove the check part during mounting realdata in fstab.tuna because it uses e2fsck in the system partition to check whether the partition mounted right or not, which lead to an error.
After I changed this, the system boots! But still no root access.....
Maybe my updater-script modification is not right?
At last, great work! Thanks a lot!
Click to expand...
Click to collapse
https://github.com/ThePlayground/uboot-tuna
dlhxr said:
Another u-boot searching another location for kernel by me.
View attachment 1834529
* Normal Boot -> no keys are pressed, cyan LED ->Find kernel in /data/media/boot/1st.img
* Recovery Boot -> Volume Up key pressed, green LED -> Go to recovery
* Custom Boot -> Volume Down key pressed, blue LED ->Find kernel in /data/media/boot/2nd.img
Note: It will replace your kernel. Remember to copy your boot.img to /data/media/boot/1st.img first!
Click to expand...
Click to collapse
Classy... but I have one better for ya:
http://forum.xda-developers.com/showthread.php?t=2009485
twistedumbrella said:
https://github.com/ThePlayground/uboot-tuna
Click to expand...
Click to collapse
it is very interesting...
I followed your git and made the same change (init.rc, init.tuna.rc, fstab.tuna) for leankernel 6.2 and it didn't work...
It is stuck in the u-boot bootimg 2nd kernel on the screen...
Can anyone help me put together a flashable TWRP zip file? I have been trying to figure out the scripting language, but I am having troubles.
What I want to do is create a zip file that just runs a simple batch script to modify my build.prop, so that I can get google wallet to work. This way I can just "flash" it after I update my CM nightlies.
Or is what I am trying to do not even possible?
This is the script I want to run:
cp /system/build.prop /mnt/extSdCard/build.prop.original
mount -o remount,rw /system
sed -i 's/ro\.product\.model=.*/ro\.product\.model=Galaxy Nexus/' /system/build.prop
sed -i 's/ro\.product\.name=.*/ro\.product\.name=yakju/' /system/build.prop
sed -i 's/ro\.product\.device=.*/ro\.product\.device=maguro/' /system/build.prop
sed -i 's/ro\.sf\.lcd_density=.*/ro\.sf\.lcd_density=241/' /system/build.prop
mount -o remount,ro /system
Click to expand...
Click to collapse
which is a modified version of this:
http://wrightrocket.blogspot.com/2013/04/installing-google-wallet-on-verizon.html
The new modded apks for Wallet should not require build.prop changes.
Sent from my SAMSUNG-SGH-I747 using xda app-developers app
ConeyKiller said:
The new modded apks for Wallet should not require build.prop changes.
Sent from my SAMSUNG-SGH-I747 using xda app-developers app
Click to expand...
Click to collapse
I am aware of that, but I would like to be able to update from the play store and not use a modified version. I also included a pixel density modification in the script that I would like done in recovery after I flash a new rom.
Please read forum rules before posting
Questions and Help issues go in Q&A and Help section
Thread moved
Thank you for your cooperation
Friendly Neighborhood Moderator
This is where I have gotten so far. I have written an "updater-script" and placed and "update.sh" in my flashable zip file.
updater-script:
ui_print("");
ui_print("#####################################");
ui_print("# Modifies build.prop #");
ui_print("#####################################");
ui_print("");
ui_print("Mounting /system...");
run_program("/sbin/busybox", "mount", "/system");
set_progress(0.33);
ui_print("");
ui_print("Modifying build.prop");
package_extract_file("update.sh", "/system/update.sh");
set_perm(0, 0, 0777, "/system/update.sh");
run_program("/system/update.sh");
delete("/system/update.sh");
set_progress(0.66);
ui_print("");
ui_print("Unmounting /system...");
unmount("/system");
set_progress(1.0);
ui_print("");
ui_print("Process Finished");
Click to expand...
Click to collapse
update.sh:
#!/system/bin/sh
/system/bin/cp /system/build.prop /system/build.prop.original
/system/xbin/sed -i 's/ro\.product\.model=.*/ro\.product\.model=Galaxy Nexus/' /system/build.prop
/system/xbin/sed -i 's/ro\.product\.name=.*/ro\.product\.name=yakju/' /system/build.prop
/system/xbin/sed -i 's/ro\.product\.device=.*/ro\.product\.device=maguro/' /system/build.prop
/system/xbin/sed -i 's/ro\.sf\.lcd_density=.*/ro\.sf\.lcd_density=241/' /system/build.prop
Click to expand...
Click to collapse
When I try to flash this zip, however, I get what looks like a library error. Does anyone know what is going wrong? Do I need to mount a library directory in addition to system? Any help would be appreciated.
recovery.log:
Modifying build.prop
about to run program [/system/update.sh] with 1 args
CANNOT LINK EXECUTABLE: cannot locate symbol "__memmove_chk" referenced by "/system/bin/sh"...
run_program: child exited with status 1
Click to expand...
Click to collapse
If anyone is curious, I got it to work. I needed to change update.sh to look for files in /sbin/
#!/sbin/sh
/sbin/cp /system/build.prop /system/build.prop.original
/sbin/sed -i 's/ro\.product\.model=.*/ro\.product\.model=Galaxy Nexus/' /system/build.prop
/sbin/sed -i 's/ro\.product\.name=.*/ro\.product\.name=yakju/' /system/build.prop
/sbin/sed -i 's/ro\.product\.device=.*/ro\.product\.device=maguro/' /system/build.prop
/sbin/sed -i 's/ro\.sf\.lcd_density=.*/ro\.sf\.lcd_density=241/' /system/build.prop
Click to expand...
Click to collapse
I've attached my flashable zip file if anyone is interested. This zip makes your device look like a galaxy nexus, and modifies your LCD density to 241. If you want a different density, change the value in the update.sh file in this zip.
This has been tested on my Samsung Galaxy S3 running the 10/09 nightly. After flashing this, I successfully installed google wallet straight from the play store and set up tap-and-pay.
I plan to leave this in my cyandelta directory so that it gets flashed after every nightly. Hopefully this will allow me to leave google wallet installed permanently and install any play store updates. I will let you know how that goes.
EDIT: Just flashed the 10/11 nightly with cyandelta. I had propmod.zip set as my "Install additional zip after ROM 1". Everything seems to have gone smoothly. Play store wallet is still reporting that it is ready for tap and pay. I'll test that it is really working tonight.
Hello everybody .. Hiw i can unpack lollipop system.dat file??
@Skin1980
@S3V3N
Akhayev said:
@Skin1980
Click to expand...
Click to collapse
system.dat? Explain better pls
Skin1980 said:
system.dat? Explain better pls
Click to expand...
Click to collapse
I am sorry .. I downloaded cm12 that based on lollipop and when i opened the rom theres a file named system.new.dat and all the apps inside this file and i wants to port some apps from this file but i cant open it cos its .dat file
Akhayev said:
I am sorry .. I downloaded cm12 that based on lollipop and when i opened the rom theres a file named system.new.dat and all the apps inside this file and i wants to port some apps from this file but i cant open it cos its .dat file
Click to expand...
Click to collapse
try to mount it
Skin1980 said:
try to mount it
Click to expand...
Click to collapse
7zip cannot extract a system.new.dat file and DAEMON tools cannot mount it. I'm hoping ROM devs release their ROMs with the standard format but if they don't, I'm sure someone from the community will easily find a way to extract them.
CM12 system.new.dat apps
Hi,
I had downloaded CM12 just now. There are no apks but only 1-img and 1-dat files in which "system.new.dat" file contains the stuff. Please provide a way to extract apks from system.new.dat file.
Unpack
Anyone figure how to do this?
I would like to know this as well.
I don't know for stock, I'm searching how to do it, but for cm12, you can compile from source directly, there is a thread in development section.
I'm stuck too.
Habaddon said:
I don't know for stock, I'm searching how to do it, but for cm12, you can compile from source directly, there is a thread in development section.
Click to expand...
Click to collapse
This is a chicken and egg problem for me. I want to build a ROM but first want to extract the device firmware for my ROM. (I don't have access to the Nexus 4 phone to install a ROM on and then extract the firmware.)
I've been Googling for a solution without luck.
Followed a clue. I uncommented a debug print statement in simg2img. No luck.
Code:
$ file system.new.dat
system.new.dat: Linux rev 1.0 ext4 filesystem data, UUID=57f8f4bc-abf4-655f-bf67-946fc0f9f25b (extents) (large files)
$ simg2img.py system.new.dat system.new.raw
424620032
'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Not a compressed ext4 file!!
Any ideas?
Yeah, I tried that too, it doesn't work. I ask a dev, in fact, it is simple. All you need to do is mount the img.
mkdir system
sudo mount system.img system
Click to expand...
Click to collapse
Still stuck
Habaddon said:
Yeah, I tried that too, it doesn't work. I ask a dev, in fact, it is simple. All you need to do is mount the img.
Click to expand...
Click to collapse
I'm still confused.
I suspect that the system.new.dat is not a simple image file and is most probably signed in some way. I don't know why the file command says that it is an ext4 filesystem while simg2img.py, with the debug statement which prints the first bytes uncommented, prints only nulls.
BTW, I asked my relative who owns the device to try flashing this ROM and it didn't work because of a known problem whereby rooting was lost. He will try a new ROM.
Plan B will be to pull the firmware via adb but I'm certainly curious about the new Lollipop way of packaging the ROM.
Code:
$ ls -l cm-12-20141123-UNOFFICIAL-mako.zip
-rw-r--r-- 1 zippy zippy 238444354 Dec 6 08:20 cm-12-20141123-UNOFFICIAL-mako.zip
$ unzip cm-12-20141123-UNOFFICIAL-mako.zip
Archive: cm-12-20141123-UNOFFICIAL-mako.zip
signed by SignApk
extracting: system.patch.dat
inflating: META-INF/com/android/metadata
inflating: META-INF/com/google/android/update-binary
inflating: META-INF/com/google/android/updater-script
inflating: META-INF/org/cyanogenmod/releasekey
inflating: boot.img
inflating: file_contexts
inflating: [COLOR="Red"]system.new.dat[/COLOR]
inflating: system.transfer.list
inflating: system/bin/backuptool.functions
inflating: system/bin/backuptool.sh
inflating: system/bin/otasigcheck.sh
inflating: META-INF/com/android/otacert
inflating: META-INF/MANIFEST.MF
inflating: META-INF/CERT.SF
inflating: META-INF/CERT.RSA
$ ls -l system.new.dat
-rw-rw-r-- 1 zippy zippy 424620032 Feb 29 2008 system.new.dat
$ file system.new.dat
system.new.dat: Linux rev 1.0 ext4 filesystem data, UUID=57f8f4bc-abf4-655f-bf67-946fc0f9f25b (extents) (large files)
$ rm -rf # remove the extracted system directory from above
$ mkdir system
$ sudo mount system.new.dat system
[sudo] password for zippy:
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so.
$ dmesg | tail -2
[89035.798766] loop: module loaded
[89035.906824] EXT4-fs (loop0): bad geometry: block count 215040 exceeds size of device (103667 blocks)
I wonder why nobody put up a way to modify this?
I kept looking for the solution from the day lollipop releases, but without any success.
:crying:
Investigating ...
I know more now.
Below is the update-script which calls functions in the update-binary. I highlighted the code in question. This is obviously not a simple filesystem in the system.new.dat. I've hacked at it with ext4.fsck and resize2fs with no luck.
Code:
assert(getprop("ro.product.device") == "mako" || getprop("ro.build.product") == "mako" || abort("This package is for device: mako; this device is " + getprop("ro.product.device") + "."););
ifelse(is_mounted("/system"), unmount("/system"));
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system", "");
package_extract_file("system/bin/backuptool.sh", "/tmp/backuptool.sh");
package_extract_file("system/bin/backuptool.functions", "/tmp/backuptool.functions");
set_metadata("/tmp/backuptool.sh", "uid", 0, "gid", 0, "mode", 0755);
set_metadata("/tmp/backuptool.functions", "uid", 0, "gid", 0, "mode", 0644);
run_program("/tmp/backuptool.sh", "backup");
unmount("/system");
if is_mounted("/data") then
package_extract_file("system/bin/otasigcheck.sh", "/tmp/otasigcheck.sh");
package_extract_file("META-INF/org/cyanogenmod/releasekey", "/tmp/releasekey");
set_metadata("/tmp/otasigcheck.sh", "uid", 0, "gid", 0, "mode", 0755);
run_program("/tmp/otasigcheck.sh") != "31744" || abort("Can't install this package on top of incompatible data. Please try another package or run a factory reset");
else
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/userdata", "/data", "");
package_extract_file("system/bin/otasigcheck.sh", "/tmp/otasigcheck.sh");
package_extract_file("META-INF/org/cyanogenmod/releasekey", "/tmp/releasekey");
set_metadata("/tmp/otasigcheck.sh", "uid", 0, "gid", 0, "mode", 0755);
run_program("/tmp/otasigcheck.sh") != "31744" || abort("Can't install this package on top of incompatible data. Please try another package or run a factory reset");
unmount("/data");
endif;
show_progress(0.750000, 0);
[COLOR="red"]block_image_update("/dev/block/platform/msm_sdcc.1/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat", "system.patch.dat");[/COLOR]
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system", "");
delete("/system/bin/otasigcheck.sh");
unmount("/system");
show_progress(0.020000, 10);
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system", "");
package_extract_file("system/bin/backuptool.sh", "/tmp/backuptool.sh");
package_extract_file("system/bin/backuptool.functions", "/tmp/backuptool.functions");
set_metadata("/tmp/backuptool.sh", "uid", 0, "gid", 0, "mode", 0755);
set_metadata("/tmp/backuptool.functions", "uid", 0, "gid", 0, "mode", 0644);
run_program("/tmp/backuptool.sh", "restore");
delete("/system/bin/backuptool.sh");
delete("/system/bin/backuptool.functions");
unmount("/system");
show_progress(0.050000, 5);
package_extract_file("boot.img", "/dev/block/platform/msm_sdcc.1/by-name/boot");
show_progress(0.200000, 10);
Next, one can look in the source code and try to figure out what it is doing.
Or maybe the next step is to see if there is a host build (i.e. Ubuntu, Fedora, etc) of the binary-update which can be run from the command line into a file which can be mounted.
I'm sure that there is an easy way but finding it is difficult!
Ext2Explorer, Diskinternals Linux Reader can mount, read and extract those system images. But I m not sure if they are fully compatible because in both of these apps which I tried priv-app and some other folders are shown empty. I don't know if normaly there are files in these folders or not.
I've been struggling with these system.new.dat block images since lollipop came out since I need to convert roms to flash onto F2FS system partitions. I searched high and low for a way to mount that image outside of twrp with no luck. So I just used twrp instead... Luckily I've an extra device at my disposal atm. These are the steps I take:
Clean flash a lollipop rom that has a system.new.dat image in twrp.
Reboot system.
When device finishes booting use hardware power button to power down without messing with the rom itself yet so it stays fresh. (It's ok to confirm power down on touch screen.)
In twrp make a backup of only the system partition.
Boot back to system and use the method you prefer to move the file system.ext4.win from /TWRP/BACKUPS/-ur-device-serial/-ur-backup-date on to your pc and rename it system.tar so you can unpack it. (Of course make sure you have the proper decompression tools, which every OS usually does now.)
Now you have the complete fresh contents of /system as you would in a traditional rom zip. You can now do with that as you please. :silly:
Well googling i found this solution http://forum.xda-developers.com/nexus-7/general/guide-unpack-dat-t2970707 @adomol:
I've been struggling with these system.new.dat block images since lollipop came out. I searched high and low for a way to mount that image outside of twrp with no luck. So I just used twrp instead... These are the steps I take:
1.Clean flash a lollipop rom that has a system.new.dat image in twrp.
2.Reboot system.
3.When device finishes booting use hardware power button to power down without messing with the rom itself yet so it stays fresh. (It's ok to confirm power down on touch screen.)
4.In twrp make a backup of only the system partition.
5.Boot back to system and use the method you prefer to move the file system.ext4.win from:
/TWRP/BACKUPS/-ur-device-serial/-ur-backup-date
to your pc and rename it system.tar so you can unpack it. (Of course make sure you have the proper decompression tools, which every OS usually does now.)
Now you have the complete fresh contents of /system as you would in a traditional rom zip. You can do with that as you please, or just throw it into a rom kitchen.
all credits to @adomol
adomol said:
I've been struggling with these system.new.dat block images since lollipop came out since I need to convert roms to flash onto F2FS system partitions. I searched high and low for a way to mount that image outside of twrp with no luck. So I just used twrp instead... Luckily I've an extra device at my disposal atm. These are the steps I take:
Clean flash a lollipop rom that has a system.new.dat image in twrp.
Reboot system.
When device finishes booting use hardware power button to power down without messing with the rom itself yet so it stays fresh. (It's ok to confirm power down on touch screen.)
In twrp make a backup of only the system partition.
Boot back to system and use the method you prefer to move the file system.ext4.win from /TWRP/BACKUPS/-ur-device-serial/-ur-backup-date on to your pc and rename it system.tar so you can unpack it. (Of course make sure you have the proper decompression tools, which every OS usually does now.)
Now you have the complete fresh contents of /system as you would in a traditional rom zip. You can now do with that as you please. :silly:
Click to expand...
Click to collapse
-droidberg- said:
Well googling i found this solution http://forum.xda-developers.com/nexus-7/general/guide-unpack-dat-t2970707 @adomol:
I've been struggling with these system.new.dat block images since lollipop came out. I searched high and low for a way to mount that image outside of twrp with no luck. So I just used twrp instead... These are the steps I take:
1.Clean flash a lollipop rom that has a system.new.dat image in twrp.
2.Reboot system.
3.When device finishes booting use hardware power button to power down without messing with the rom itself yet so it stays fresh. (It's ok to confirm power down on touch screen.)
4.In twrp make a backup of only the system partition.
5.Boot back to system and use the method you prefer to move the file system.ext4.win from:
/TWRP/BACKUPS/-ur-device-serial/-ur-backup-date
to your pc and rename it system.tar so you can unpack it. (Of course make sure you have the proper decompression tools, which every OS usually does now.)
Now you have the complete fresh contents of /system as you would in a traditional rom zip. You can do with that as you please, or just throw it into a rom kitchen.
all credits to @adomol
Click to expand...
Click to collapse
But this won't work when trying to port because you need to swap kernel's (for going between same-device, different-carrier)
Hi.
This is my first time working with ROMs, wanted to see if I could unpack and repack them and have them work, so I would know if my later changes cause problems. I've noticed if I unzip a ROM, then zip it again, without any changes made, I get this error within a few seconds of starting the flash. If I don't unpack and repack the zip, it flashes fine.
I use the Android Kitchen, to unpack/repack, and signed the zip. Anyone know what's going on?
Did a full wipe with TWRP before flash attempt.
Code:
Starting ADB Sideload feature...
Target: google/occam/mako:5.1.1/LMy48M/2167285:user/release-keys
detected filesystem ext4 for /dev/block/platform/msm_sdcc.1/by-name/system
Patching system image unconditionally...
E1001: Failed to update system image.
Updater process ended with ERROR: 7
Thank you,
Josh
Edit your updater-script
find this line
Code:
.... package_extract_file("system.transfer.list"), "system.new.dat.br", "system.patch.dat") ||
abort("E1001: Failed to update system image.");
change to :
Code:
.... package_extract_file("system.transfer.list"), "system.new.dat.br", "system.patch.dat");
Just replace " ||" with ";" and delete line abort("blablabla"):
adislice said:
find this line
Code:
.... package_extract_file("system.transfer.list"), "system.new.dat.br", "system.patch.dat") ||
abort("E1001: Failed to update system image.");
change to :
Code:
.... package_extract_file("system.transfer.list"), "system.new.dat.br", "system.patch.dat");
Just replace " ||" with ";" and delete line abort("blablabla"):
Click to expand...
Click to collapse
hey man when i deleted that line my phone booted in fastboot mode
I solved this by installing the latest version of TWRP and Oxygen OS.
Can anyone please help me correct error 7 with the following updater-script
The error i get is :
Installing zip file '/external_sd/lineage-15.1
20180524-UNOFFICIAL-Ocm.zip
Checking for Digest file...
Target: htc/ocmdtwl_01405/htc_ocmdtwl:8.0.0/OPR6.
170623.013/1010171.4:user/release-keys
detected filesystem ext4 for /dev/block/bootdevice/
by-name/system
Patching system image unconditionally...
E1001: Failed to update system image.
Updater process ended with ERROR: 7
Error installing zip file '/external_sd/lineage-15.
-20180524-UNOFFICIAL-ROm,zip'
Updating partition details...
... done
assert(getprop("ro.product.device") == "htc_ocm" || getprop("ro.build.product") == "htc_ocm" ||
getprop("ro.product.device") == "htc_ocndugl" || getprop("ro.build.product") == "htc_ocndugl" ||
getprop("ro.product.device") == "htc_ocmdtwl" || getprop("ro.build.product") == "htc_ocmdtwl" ||
getprop("ro.product.device") == "ocm" || getprop("ro.build.product") == "ocm" || abort("E3004: This package is for device: htc_ocm,htc_ocndugl,htc_ocmdtwl,ocm; this device is " + getprop("ro.product.device") + ".");
ui_print("Target: htc/ocmdtwl_01405/htc_ocmdtwl:8.0.0/OPR6.170623.013/1010171.4:user/release-keys");
ifelse(is_mounted("/system"), unmount("/system"));
package_extract_dir("install", "/tmp/install");
set_metadata_recursive("/tmp/install", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644);
set_metadata_recursive("/tmp/install/bin", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0755);
mount("ext4", "EMMC", "/dev/block/bootdevice/by-name/system", "/system", "");
run_program("/tmp/install/bin/backuptool.sh", "backup");
unmount("/system");
show_progress(0.650000, 0);
ui_print("Patching system image unconditionally...");
block_image_update("/dev/block/bootdevice/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat.br", "system.patch.dat") ||
abort("E1001: Failed to update system image.");
show_progress(0.100000, 0);
ui_print("Patching vendor image unconditionally...");
block_image_update("/dev/block/bootdevice/by-name/vendor", package_extract_file("vendor.transfer.list"), "vendor.new.dat.br", "vendor.patch.dat") ||
abort("E2001: Failed to update vendor image.");
show_progress(0.020000, 10);
mount("ext4", "EMMC", "/dev/block/bootdevice/by-name/system", "/system", "");
run_program("/tmp/install/bin/backuptool.sh", "restore");
unmount("/system");
show_progress(0.050000, 5);
package_extract_file("boot.img", "/dev/block/bootdevice/by-name/boot");
show_progress(0.200000, 10);
if (getprop("ro.boot.mid") == "2Q4D20000" || getprop("ro.boot.mid") == "2Q4D10000") then
ui_print("This is a DS device - renaming radio props");
mount("ext4", "EMMC", "/dev/block/bootdevice/by-name/system", "/system", "");
rename("/vendor/lib64/libril-qc-ltedirectdisc.so", "/system/vendor/lib64/libril-qc-ltedirectdisc.so");
rename("/vendor/lib64/libril-qc-qmi-1.so", "/system/vendor/lib64/libril-qc-qmi-1.so");
rename("/vendor/lib64/libril-qc-radioconfig.so", "/system/vendor/lib64/libril-qc-radioconfig.so");
rename("/vendor/lib64/libril-qcril-hook-oem.so", "/system/vendor/lib64/libril-qcril-hook-oem.so");
unmount("/system");
endif;
set_progress(1.000000);
Any help is appreciated :s
Try using sideload insted of sd
i had the same error and i could do nothing...then I thought my sd maybe giving the error so i tried the sideload mode and believe me..........it worked
option 2:-if u have backed up your rom (or by anyhow if you can) try flashing another (in my case...an older) version of twrp. it also worked for me. would be glad if this helps you.
---------- Post added at 11:30 PM ---------- Previous post was at 11:05 PM ----------
[/COLOR]
SL.Pirate said:
i had the same error and i could do nothing...then I thought my sd maybe giving the error so i tried the sideload mode and believe......me it worked
but...at the moment i am having another problem...i'd appreciate if someone could help. the rom has been installed correctly (I guess) but...when it reboots,it says encryption unsuccessful. ther'es a key sayng reset phone but nothing happens after pressing it.i tried wiping all the partitions and reinstalling the rom and no use.
Click to expand...
Click to collapse
Solved...had some matters with the data partition.
SL.Pirate said:
Solved...had some matters with the data partition.
Click to expand...
Click to collapse
Such as?
I'm stuck at the same place as you were...
For the posterity :
in TWRP go to advanced > terminal, then create /cache/recovery with
mkdir /cache/recovery
solved the problem for me
Source : https://android.stackexchange.com/q...ineage-16-samsung-galaxy-note-2-gt-n7100-t03g
6mon said:
Such as?
I'm stuck at the same place as you were...
Click to expand...
Click to collapse
it said 'ENCRYPTION UNSUCCESSFULL'
if the samething happens to you....go to twrp,select wipe,advanced wipe and select (only) the data partition. then you gotta select repair or change file system select change file system and then select the correct format for the partition.(in and most of the cases...it is the EXT4 format.go ahead and reboot your device.this should probably work.If not...try other formats also from bottom to to. (HINT:-see what other partitions are formatted to).This should probably work if thats the case.
worked for me .thanks alot
It works!
6mon said:
For the posterity :
in TWRP go to advanced > terminal, then create /cache/recovery with
mkdir /cache/recovery
solved the problem for me
Source : https://android.stackexchange.com/q...ineage-16-samsung-galaxy-note-2-gt-n7100-t03g
Click to expand...
Click to collapse
Thank you so much! Before doing this, my Lenovo Vibe K5 Plus (A6020) wasn't able to install any ROM, but it's over! Now I can install custom ROMs with no flaws :good:
Worked for me as well and much easier than editing the update script. Thanks a lot!
If youre still getting error 7 e1001 then try this.
Boot twrp
Tap advanced tab
Tap file manager/explorer
Tap on /system
Tap + icon on the folder in bottom right corner to modify
Tap chmod 755 to enable r/w for system part.
Try to install again.
That is what worked for me
6mon said:
For the posterity :
in TWRP go to advanced > terminal, then create /cache/recovery with
mkdir /cache/recovery
solved the problem for me
Source : https://android.stackexchange.com/q...ineage-16-samsung-galaxy-note-2-gt-n7100-t03g
Click to expand...
Click to collapse
did the trick for me. Whoever has Error 7 / Error 1001 issues, try this first cant hurt!
6mon said:
For the posterity :
in TWRP go to advanced > terminal, then create /cache/recovery with
mkdir /cache/recovery
solved the problem for me
Source : https://android.stackexchange.com/q...ineage-16-samsung-galaxy-note-2-gt-n7100-t03g
Click to expand...
Click to collapse
Posterity works!!! I found your post by googling and it solved my issue, thanks again!
I have the same issue on S4 mini, but /cache/recovery/ dir is present.
Hello
I am having this issue installing /e/ os on samsung J5 J500F.
I tried making directory /cache/recovery and addind read and write rights to /system but it did not work.
I also tried different version of the os and build as well as different version of TWRP.
I tried removing the assert line in the updater script but the zip file generated then in refused by twrp, It gets me the error "invalid zip file format".
I tried making the zip file with winrar or 7zip using either relatie paths or absolute path, but i still get the same error.
Would someone have an idea ?
Thanks !
Sometimes it is caused due to corrupted file. While transferring file through MTP it is likely to corrupt large files. I had the same problem. Then I tried copying file while in TWRP (sure it is also MTP) and it worked.
HatMan22 said:
Sometimes it is caused due to corrupted file. While transferring file through MTP it is likely to corrupt large files. I had the same problem. Then I tried copying file while in TWRP (sure it is also MTP) and it worked.
Click to expand...
Click to collapse
Hello, thank you very much for your advice, I copied all files through TWRP, so it is probably coming from something else.
I tried downloading the file and and also flashing some other builds or different versions but I still get "failed to update system image error"
Gabriel-Roger said:
Hello, thank you very much for your advice, I copied all files through TWRP, so it is probably coming from something else.
I tried downloading the file and and also flashing some other builds or different versions but I still get "failed to update system image error"
Click to expand...
Click to collapse
Do you have latest TWRP installed? Old TWRP may also cause this issue.