Error in flashing most of CM based ROMs in Moto X XT1052 EU version - Moto X Q&A

I have Moto x XT1052 EU version and could not flash most of CM based ROMs. It fails with error message as "This package is for device:
xt1052,ghost,xt1053,ghost_retail,xt1055,ghost_usc,xt1056,ghost_sprint,xt1058,ghost_att,ghost_rcica,xt1060,ghost_verizon; this device is " + getprop("ro.product.device") + ".")".
This error is very much annoying. I found some tweak to successfully flash this ROM by following few simple steps:
ROMs causing this issue are,
[ROM] [4.4.4] [OFFICIAL] Ehndroix V 14.10.14 - Ghost
[Rom] [4.4.4] Cyanogenmod 11 for Moto X
N5X Experience ROM
1. Using 7z app, open flashable ROM zip file
2. go to META-INF\com\google\android\
3. drag and drop updater-script on your desktop
4. Open this script file with Notepad++
5. Delete the lines starting from "assert (getprop............ upto abort("this package....." (see screenshot attached)
6. Save the script in Notepad++
7. drag and drop this amended script file back to META-INF\com\google\android\
8. Close zip file
9. Copy to your phone sdcard memory
10. Don't forget to copy relevant gapps file as well
All done. Use your recovery (I prefer latest TWRP) and flash ROM and GAPPS.
Enjoy!!

IDK if I'm doing it wrong but the above edit did not fix the flash error for my xt1052 device. OP could you maybe redo your example picture by selecting/highlighting whatever text/lines need to go... Just to make it absolutely error proof. thx

Or in 7zip, find the updater-script and right-click, then edit.

What recovery are you using? Some XT1052 user reported that the newer twrp recoveries were not functional and we should hence use, 2.6.3.1. I am using the earlier build ( 2.6.3.1 ) and did face any problems. Flashing is easy and quick. Backing up and restoring is a piece of cake. No need of all these steps.
Cheers

TWRP 2.6.3.1 download link below for everybodies reference: Unfortunatly I don't have enough posts to my name to post the link fully so please attach both of the below lines
goo.
im/devs/Hashcode/motox/unlocked/twrp-2.6.3.1-ghost-4.4.img/
This also worked for me.

omnomnomkimiiee said:
Or in 7zip, find the updater-script and right-click, then edit.
Click to expand...
Click to collapse
Did that but no go..
flasherruts said:
What recovery are you using? Some XT1052 user reported that the newer twrp recoveries were not functional and we should hence use, 2.6.3.1. I am using the earlier build ( 2.6.3.1 ) and did face any problems. Flashing is easy and quick. Backing up and restoring is a piece of cake. No need of all these steps.
Cheers
Click to expand...
Click to collapse
Was using latest TWRP and yeah you right 2.6.3.1 works flawlessly no more flash errors! No vibration feedback on 2.6.3.1 though...
JordTOC said:
TWRP 2.6.3.1 download link below for everybodies reference: Unfortunatly I don't have enough posts to my name to post the link fully so please attach both of the below lines
goo.
im/devs/Hashcode/motox/unlocked/twrp-2.6.3.1-ghost-4.4.img/
This also worked for me.
Click to expand...
Click to collapse
Thanks for the link it worked!

TWRP 2.8.5.0 for cm/ghost
The problem is in the "properties" TWRP sets; the official TWRP builds have
Code:
ro.build.product=moto_msm8960dt
and nothing for
Code:
ro.product.device
. moto_msm8960dt isn't listed in the CM12 script. So I unpacked the official 2.8.5.0, set the ro.product.device=ghost and packed it back. You can do it yourself or just grab the attachment and flash it.
- get the official TWRP image for ghost here: (ok, I'm new and not allowed to post links; it's something with techerrata, twrp2 and ghost)
- get CM12 source (search the net for something like build cyanogenmod 12 lollipop, there's plenty of posts)
(this will take like forever; I *think* you only need the folder android/system/system/core)
- fire up a terminal; notice the paths, make sure you execute the commands in the same directory
- first build mkbootimg and unpackbootimg
Code:
[email protected]:~/android/system/system/core > gcc -o /tmp/mkbootimg libmincrypt/*.c mkbootimg/mkbootimg.c -Iinclude
[email protected]:~/android/system/system/core > gcc -o /tmp/unpackbootimg libmincrypt/*.c mkbootimg/unpackbootimg.c -Iinclude
- unpack the official TWRP image:
Code:
[email protected]:~/twrp/work > /tmp/unpackbootimg -i ../openrecovery-twrp-2.8.5.0-ghost.img
Android magic found at: 0
BOARD_KERNEL_CMDLINE console=ttyHSL0,115200,n8 androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3 maxcpus=2 vmalloc=400M androidboot.write_protect=0 zcache
BOARD_KERNEL_BASE 80200000
BOARD_RAMDISK_OFFSET 02200000
BOARD_SECOND_OFFSET 00f00000
BOARD_TAGS_OFFSET 00000100
BOARD_PAGE_SIZE 2048
BOARD_SECOND_SIZE 0
BOARD_DT_SIZE 835240
- make a new folder, cd to it and extract the ramdisk
Code:
[email protected]:~/twrp/work/rd > gunzip -c ../openrecovery-twrp-2.8.5.0-ghost.img-ramdisk.gz | cpio -i
15231 blocks
- edit the file
Code:
default.prop
(add line ro.product.device=ghost)
- pack the ramdisk back:
Code:
[email protected]:~/twrp/work/rd > find . | cpio -o -H newc | gzip > ../newramdisk.gz
15231 blocks
- make the recovery image (I got the arguments from the output of unpackbootimage, see above)
Code:
[email protected]:~/twrp/work > /tmp/mkbootimg --kernel openrecovery-twrp-2.8.5.0-ghost.img-zImage --ramdisk newramdisk.gz --cmdline 'console=ttyHSL0,115200,n8 androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3 maxcpus=2 vmalloc=400M androidboot.write_protect=0 zcache' --base 0x80200000 --pagesize 2048 --dt openrecovery-twrp-2.8.5.0-ghost.img-dt --ramdisk_offset 0x02200000 -o twrp-2.8.5.0-ghost-modified-for-cm12.img

rrvvrr said:
The problem is in the "properties" TWRP sets; the official TWRP builds have
Code:
ro.build.product=moto_msm8960dt
and nothing for
Code:
ro.product.device
. moto_msm8960dt isn't listed in the CM12 script. So I unpacked the official 2.8.5.0, set the ro.product.device=ghost and packed it back. You can do it yourself or just grab the attachment and flash it.
- get the official TWRP image for ghost here: (ok, I'm new and not allowed to post links; it's something with techerrata, twrp2 and ghost)
- get CM12 source (search the net for something like build cyanogenmod 12 lollipop, there's plenty of posts)
(this will take like forever; I *think* you only need the folder android/system/system/core)
- fire up a terminal; notice the paths, make sure you execute the commands in the same directory
- first build mkbootimg and unpackbootimg
Code:
[email protected]:~/android/system/system/core > gcc -o /tmp/mkbootimg libmincrypt/*.c mkbootimg/mkbootimg.c -Iinclude
[email protected]:~/android/system/system/core > gcc -o /tmp/unpackbootimg libmincrypt/*.c mkbootimg/unpackbootimg.c -Iinclude
- unpack the official TWRP image:
Code:
[email protected]:~/twrp/work > /tmp/unpackbootimg -i ../openrecovery-twrp-2.8.5.0-ghost.img
Android magic found at: 0
BOARD_KERNEL_CMDLINE console=ttyHSL0,115200,n8 androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3 maxcpus=2 vmalloc=400M androidboot.write_protect=0 zcache
BOARD_KERNEL_BASE 80200000
BOARD_RAMDISK_OFFSET 02200000
BOARD_SECOND_OFFSET 00f00000
BOARD_TAGS_OFFSET 00000100
BOARD_PAGE_SIZE 2048
BOARD_SECOND_SIZE 0
BOARD_DT_SIZE 835240
- make a new folder, cd to it and extract the ramdisk
Code:
[email protected]:~/twrp/work/rd > gunzip -c ../openrecovery-twrp-2.8.5.0-ghost.img-ramdisk.gz | cpio -i
15231 blocks
- edit the file
Code:
default.prop
(add line ro.product.device=ghost)
- pack the ramdisk back:
Code:
[email protected]:~/twrp/work/rd > find . | cpio -o -H newc | gzip > ../newramdisk.gz
15231 blocks
- make the recovery image (I got the arguments from the output of unpackbootimage, see above)
Code:
[email protected]:~/twrp/work > /tmp/mkbootimg --kernel openrecovery-twrp-2.8.5.0-ghost.img-zImage --ramdisk newramdisk.gz --cmdline 'console=ttyHSL0,115200,n8 androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3 maxcpus=2 vmalloc=400M androidboot.write_protect=0 zcache' --base 0x80200000 --pagesize 2048 --dt openrecovery-twrp-2.8.5.0-ghost.img-dt --ramdisk_offset 0x02200000 -o twrp-2.8.5.0-ghost-modified-for-cm12.img
Click to expand...
Click to collapse
Hi!
Can you edit newest twrp-2.8.7.0?

BossToroech said:
Hi!
Can you edit newest twrp-2.8.7.0?
Click to expand...
Click to collapse
Done, attached 2.8.7

rrvvrr said:
Done, attached 2.8.7
Click to expand...
Click to collapse
Twrp 2.8.7 does not detect the SD card on my phone. It would be great if you edit twrp 2.8.6 as that worked.

Ishaan Gupta said:
Twrp 2.8.7 does not detect the SD card on my phone. It would be great if you edit twrp 2.8.6 as that worked.
Click to expand...
Click to collapse
I could, it only takes about 10 minutes... But I'm pretty sure you are looking for something else - this thread is about ghost, that's Moto X 2013, which doesn't have an SD card.
Please correct me if I'm wrong.

You are right. Moto X 2013 doesn't have an SD Card slot.

rrvvrr said:
I could, it only takes about 10 minutes... But I'm pretty sure you are looking for something else - this thread is about ghost, that's Moto X 2013, which doesn't have an SD card.
Please correct me if I'm wrong.
Click to expand...
Click to collapse
BossToroech said:
You are right. Moto X 2013 doesn't have an SD Card slot.
Click to expand...
Click to collapse
Thanks for your quick reply.
I am sorry I said wrong. I mean the /data partition. The internal storage.
I am on windows so I could not build the recovery. No idea how to do it.
Thanks for your work. It saved me from editing the updater-script every time.
EDIT: Got it to finally mount /data. Had to wipe everything then flash twrp 2.8.6.0 and then your edited 2.8.7.0.

smohanv said:
I have Moto x XT1052 EU version and could not flash most of CM based ROMs. It fails with error message as "This package is for device:
xt1052,ghost,xt1053,ghost_retail,xt1055,ghost_usc,xt1056,ghost_sprint,xt1058,ghost_att,ghost_rcica,xt1060,ghost_verizon; this device is " + getprop("ro.product.device") + ".")".
This error is very much annoying. I found some tweak to successfully flash this ROM by following few simple steps:
ROMs causing this issue are,
[ROM] [4.4.4] [OFFICIAL] Ehndroix V 14.10.14 - Ghost
[Rom] [4.4.4] Cyanogenmod 11 for Moto X
N5X Experience ROM
1. Using 7z app, open flashable ROM zip file
2. go to META-INF\com\google\android\
3. drag and drop updater-script on your desktop
4. Open this script file with Notepad++
5. Delete the lines starting from "assert (getprop............ upto abort("this package....." (see screenshot attached)
6. Save the script in Notepad++
7. drag and drop this amended script file back to META-INF\com\google\android\
8. Close zip file
9. Copy to your phone sdcard memory
10. Don't forget to copy relevant gapps file as well
All done. Use your recovery (I prefer latest TWRP) and flash ROM and GAPPS.
Enjoy!!
Click to expand...
Click to collapse
I'm getting the same error for cm 12.1 on my moto x 2013 xt1052. What do i do?

Use the modified recovery @rrvvrr posted a few posts back.

Flashing Error
I recently rooted my XT 1052 (Asian version) using TWRP 2.8.6. However, when installing CM 12.1's 30/8 nightly build, I got an error reading "error executing updater binary in zip". Someone help me to solve this problem. I have installed the latest official TWRP 2.8.7.

vamshi03 said:
I'm getting the same error for cm 12.1 on my moto x 2013 xt1052. What do i do?
Click to expand...
Click to collapse
Exit the recovery and try again. If that doesn't work then unzip the Rom.zip file, if it opens with error then re download the Rom, otherwise if it opens without error then make a complete wipe of the phone and try again.
Chimax said:
I recently rooted my XT 1052 (Asian version) using TWRP 2.8.6. However, when installing CM 12.1's 30/8 nightly build, I got an error reading "error executing updater binary in zip". Someone help me to solve this problem. I have installed the latest official TWRP 2.8.7.
Click to expand...
Click to collapse
Sent from my Moto X

Thanks... The file is intact.... I will try it today again...
Sent from my XT1052 using XDA Free mobile app

No use
bushako said:
Exit the recovery and try again. If that doesn't work then unzip the Rom.zip file, if it opens with error then re download the Rom, otherwise if it opens without error then make a complete wipe of the phone and try again.
Sent from my Moto X
Click to expand...
Click to collapse
I did as you had instructed but still no use... The same error keeps on popping up... It's pathetic... even after rooting I can't install CM

Chimax said:
I did as you had instructed but still no use... The same error keeps on popping up... It's pathetic... even after rooting I can't install CM
Click to expand...
Click to collapse
Can you confirm that you are running the latest bootloader version? You could still be on the older bootloader and that's why it returns with errors.
However, if you are reluctant to upgrade bootloader for whatever reason, then you can try and flash an older version of twrp from before 5.1 was released or use another recovery such as cynagoen recovery or cmw if available.
I can explain to you as to why this happens but I prefer you first give it a try.
Sent from my Moto X

Related

[HACK] compiled mkbootimg and unpack/repack linux scripts for boot.img

want to edit your boot.img?
included files in zip: mkbootimg (i compiled this file from android source), unpack-bootimg.pl, repack-bootimg.pl
i edited the repack script to compile the nexus s img correctly.
Code:
--base 0x30000000 --pagesize 4096
first dump original boot.img:
Code:
cat /dev/mtd/mtd2 > /sdcard/boot.img
then drag/drop to your linux box to edit file.
use unpack script:
Code:
./unpack-bootimg.pl boot.img
you will end up with 2 compressed files and 1 folder.
finished editing and want to repack boot.img, for example:
Code:
./repack-bootimg.pl <kernel> <ramdisk-directory> <outfile>
most info and scripts pulled from here: http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images, thanks to the original author.
test your new boot.img:
Code:
fastboot boot boot.img
Two things:
1. if you have any bad blocks in your boot partition, this method will fail to extract the boot.img (you need to skip bad blocks, but cat will just get an error)
2. you can replace just the kernel (leaving the ramdisk and parameters intact) using:
Code:
% fastboot flash zimage zImage
The bootloader will read-modify-write the boot partition, replacing the kernel only.
how would you skip bad blocks? i never thought of a phone as having bad blocks.
k0mpresd said:
i never thought of a phone as having bad blocks.
Click to expand...
Click to collapse
All flash devices can have bad blocks. But it usually isn't something the end user would notice, unless there are so many and something is wrong that you're losing drive space.
edit: more info here if your curious http://en.wikipedia.org/wiki/Flash_memory
hmm, very strange thing happening to me. I've only gotten my boot.img to compile and boot successfully once with this method, but now I can't seem to get it to compile? I keep getting errors of the file name or file type. I'm using the correct usage.. If I compile manually with mkbootimg on the cmd line it'll compile but it won't boot. Just bootloops at the Google splash..
Jroid try my Matr1x kernel and see what happens
Sent from my Nexus S using XDA App
The problem seems to be compiling the boot with the perl scripts, not the kernel itself.
Try manually:
Once unpacked do the boot.img-ramdisk.cpio.gz with the following command (moved to the ramdisk folder):
Code:
#sudo find . | cpio -o -H newc | gzip > ../<your boot name>.img-ramdisk.cpio.gz
Then cd ../
And repack:
Code:
#./mkbootimg --kernel <your boot name>.img-kernel.gz --ramdisk <your boot name>.img-ramdisk.cpio.gz --base 0x30000000 --pagesize 4096 -o boot.img
you can replace just the kernel (leaving the ramdisk and parameters intact) using:
Code:
% fastboot flash zimage zImage
The bootloader will read-modify-write the boot partition, replacing the kernel only.
Click to expand...
Click to collapse
It won't work on the Nexus S.
python08 said:
It won't work on the Nexus S.
Click to expand...
Click to collapse
exactly, i'd love to be able to do this for some testing but it doesn't allow me.
EDIT: yes it does. Swetland is right
Chamb' said:
Try manually:
Once unpacked do the boot.img-ramdisk.cpio.gz with the following command (moved to the ramdisk folder):
Code:
#sudo find . | cpio -o -H newc | gzip > ../<your boot name>.img-ramdisk.cpio.gz
Then cd ../
And repack:
Code:
#./mkbootimg --kernel <your boot name>.img-kernel.gz --ramdisk <your boot name>.img-ramdisk.cpio.gz --base 0x30000000 --pagesize 4096 -o boot.img
Click to expand...
Click to collapse
I've tied compiling a boot both manually (with cmdline) and with the perl scripts and have used a simple kernel.gz and ramdisk.cpio.gz for my file names.. doesn't really matter what I name it as long as it has the correct file format in this .gz and .cpio.gz right? the manual compile goes fine with base 0x30000000 and pagesize 4096
however, it does not boot and will bootloop at the Google splash
Used boot.img extracted from (what ROM ?) cat /dev/mtd/mtd2 ?
Is the phone start with this boot.img (unchanged) if you flash it by typing "fastboot flash..." ?
After that, just try to unpack and repack the boot.img without changes on ramdisk or kernel, if it works that means your changes suck (^^).
These commands (or perl scripts) work perfectly for me.
Lol I will try doing that. The boot.img I used is from stock 2.3.4, edited the ramdisk (specifically init.rc & init.herring.rc)
Like I said, first time I used the perl scripts I edited my ramdisk, threw in a netarchy kernel, it compiled fine and booted. Now if I use the perl script to repack with an aosp kernel, it gives me an error about file name and/or extension being wrong. Or complains it can't find mkbootimg when its there and executable. I'll re run it again and post errors
Sent from my Nexus S
he guys where is the boot image located? not the animation, the google logo at the start of the booting!
Sent from my Nexus S using XDA Premium App
ok so when I used the repack-bootimg.pl script, it kept giving me this error:
Code:
boot.img-kernel.gz Not a directory at ./repack-bootimg.pl line 13.
So I ran mkbootimg manually, without a cmdline comment as stated above. It compiled
and booted beautifully all stock with no init.rc or init.herring.rc edits.
however when I compile a boot.img coupled with a stock kernel and a modified ramdisk, I get a non-booting boot.img. One came out at 2.9 mb and the other at 5.6 mb neither boots using the same cmd that compiled the working boot. Must be my edits.. I literally only changed about 1 line in init.rc and another line in init.herring.rc that causing it not to boot.
By the way, I got some info on a stock boot.img using the unpackbootimg binary (not the perl script) and here's what it outputs:
Code:
#BOARD_KERNEL_CMDLINE console=ttyFIQ0 no_console_suspend
BOARD_KERNEL_BASE 30000000
BOARD_PAGE_SIZE 00001000
I enter that pagesize and it says it's not a valid value when I compile boot.img's
Borky_16 said:
he guys where is the boot image located? not the animation, the google logo at the start of the booting!
Sent from my Nexus S using XDA Premium App
Click to expand...
Click to collapse
part of the kernel
to change-https://github.com/morfic/Samsung-logo
ogdobber said:
part of the kernel
to change-https://github.com/morfic/Samsung-logo
Click to expand...
Click to collapse
yeah i know thanks for the link a helping source though!
Sent from my Nexus S using XDA Premium App
Sorry for the Control C Control V of it, but I just found this topic now..
I`m facing this problem when I try to unpack boot.img..
I have done it 2 days ago but dunno why, now I can`t..
Follows what is happening..
Code:
[email protected]:~/NS-bootwork$ ./unpack-bootimg.pl boot.img
Found a secondary file after the ramdisk image.
According to the spec (mkbootimg.h) this file can exist,
but this script is not designed to deal with this scenario.
The Kernel is built, as a zImage and the WLAN as a bmc3429.ko..
Just repeating, I have built this Kernel 2 days ago in the same way, without any problems, but now I`m struggling on the message after inputting ./unpack-bootimg.pl boot.img..
Dunno what else to try, I re-downloaded the unpack-bootimg.pl from 2 different sources, and still the same error..
Any ideas?
Many thanks..
P.S.: Ubuntu 11.04 x64..
EDIT
Well, I already solve it!
That is what I did..
As unpack-bootimg.pl was not working (don`t know why) I used split_bootimg.pl script, splitting the boot.img and created new ramdisk img..
Code:
./split_bootimg.pl boot.img
mkdir ramdisk
cd ramdisk
gzip -dc ../boot.img-ramdisk.gz | cpio -i
find . | cpio -o -H newc | gzip > ../newramdisk.cpio.gz
Then after just compiled the Kernel with
Code:
./mkbootimg --kernel zImage --ramdisk newramdisk.cpio.gz --base 0x30000000 --pagesize 4096 --cmdline _console_suspend=1 console=bull's -o newtestboot.img'no
Witches includes " --cmdline _console_suspend=1 console=bull's" to not break BT functionality, in the case of Nexus S..
I found the tools here work well: http://glandium.org/blog/?p=2214
...if you then use the code originally posted above:
Code:
sudo find . | cpio -o -H newc | gzip > ../<your boot name>.img-ramdisk.cpio.gz
./mkbootimg --kernel <your boot name>.img-kernel.gz --ramdisk <your boot name>.img-ramdisk.cpio.gz --base 0x30000000 --pagesize 4096 -o boot.img

[DEV] Official Kernel Sources & Ramdisk for Xperia 2011 devices [posted at GITHUB]

[DEV] Official Kernel Sources & Ramdisk for Xperia 2011 devices [posted at GITHUB]
------\\ IMP INFO //-------
LAST UPDATED:
26/March/2012
Latest Kernel Sources:
4.0.2.A.0.74
Latest Ramdisk:
4.0.2.A.0.42
------// IMP INFO \\-------
hello guys,
i have pushed the Official kernel sources and ramdisks for various Xperia 2011 devices to my github account... to keep the various FW versions at same place i have created branches for each kernel/ramdisk... i think this will help other dev/advance users as they can now easily get all relevant files at one place and easily compare changes in firmware sources...
Xperia-2011-Official-Kernel-Sources
(INCLUDES THESE FW VERSIONS)
Xperia-2011-Official-Ramdisks
(INCLUDES THESE FW VERSIONS)
i will try my best to keep those sources updated
regards,
DooMLoRD
Kernel sources for following firmware:
4.0.2.A.0.74
4.0.2.D.0.5
4.1.C.0.7
4.1.C.0.6
4.0.2.A.0.61_62
3.0.1.E.0.88
4.0.2.A.0.58
4.0.2.A.0.42
4.0.2.A.0.9
4.0.1.A.0.284
4.0.1.A.0.283
4.0.A.2.377
4.0.A.2.368
3.0.1.A.0.145_146_148
Ramdisks for following firmware:
4.0.2.A.0.42
4.0.1.A.0.283
4.0.A.2.368
3.0.1.A.0.145
Devices for which ramdisks are posted:
Code:
ST17 - coconut - ACTIVE
LT15 - anzu - ARC
LT18 - ayame - ARC S
WT19 - satsuma - LIVE WALKMAN
ST15 - smultron - MINI
SK17 - mango - MINI PRO
MT15 - hallon - NEO
MT11 - haida - NEO V
R800 - zeus,zeusc - PLAY
MK16 - iyokan - PRO
ST18 - urushi - RAY
Nice work,Doom
Great work. Just to ask... Could you publish the one for Xperia Pro? Thanks.
alvaroag said:
Great work. Just to ask... Could you publish the one for Xperia Pro? Thanks.
Click to expand...
Click to collapse
You want ramdisk for it?
Sent from my LT15i using XDA App
Yes, please, it would be nice and I can't find a way to get it from my phone
alvaroag said:
Yes, please, it would be nice and I can't find a way to get it from my phone
Click to expand...
Click to collapse
i was not able to get new firmware (kernel.sin file)...
since u have the device have u rooted it yet?
use this: http://forum.xda-developers.com/showthread.php?t=1302037
and find the newest superuser update.zip
then after the device is rooted reboot it once... connect device to pc via adb and pull the following files:
Code:
/*
/sbin/*
e.g.: file list from ARC: https://github.com/DooMLoRD/Xperia-2011-Official-Ramdisks/tree/master/ARC
updated kernel sources with 4.0.2.A.0.9 FW sources
Finally, I managed to get the sin files from PC Companion. You can download the kernel SIN from:
http://soporte.opensysperu.com/downloads/kernel_S1-SW-LIVE-883F-PID1-0001-S1-PARTITION.sin
My build number is 4.0.1.A.0.283.
Also, as you have experience developing custom kernels, I would like to ask somethingto you(sorry if it's our of thread)... I've compiled a kernel based on the SE source code(just added the tun/tap driver as built in) following the instructions published by SE, then used the original ramdisk/taken from the kernel image, then used mkbootimg to create the bootable image, and finally booted into it with "fastboot boot boot.img". It showed the SE logo(just the words, not the bootanim) and then the phone turned off. The same happens when I used "fastboot boot" with the stock kernel image. I use "fastboot boot" instead of "fastboot flash kernel" so I can test the kernel without risk bricking my device... Is there somerthing I'm doing wrong? Thanks.
alvaroag said:
Finally, I managed to get the sin files from PC Companion. You can download the kernel SIN from:
http://soporte.opensysperu.com/downloads/kernel_S1-SW-LIVE-883F-PID1-0001-S1-PARTITION.sin
My build number is 4.0.1.A.0.283.
Also, as you have experience developing custom kernels, I would like to ask somethingto you(sorry if it's our of thread)... I've compiled a kernel based on the SE source code(just added the tun/tap driver as built in) following the instructions published by SE, then used the original ramdisk/taken from the kernel image, then used mkbootimg to create the bootable image, and finally booted into it with "fastboot boot boot.img". It showed the SE logo(just the words, not the bootanim) and then the phone turned off. The same happens when I used "fastboot boot" with the stock kernel image. I use "fastboot boot" instead of "fastboot flash kernel" so I can test the kernel without risk bricking my device... Is there somerthing I'm doing wrong? Thanks.
Click to expand...
Click to collapse
the link that u posted is for Xperia Pro right? i will update my gitrepo with the ramdisk from this device...
which defconfig did u use?
are u unpacking/repacking ramdisk or just using the stock ramdisk.cpio.gz and then mkbootimg?
Yes, the image is for Xperia Pro(MK16a).
The exact command I'm using to configure the kernel is:
ARCH=arm CROSS_COMPILE=/opt/android-ndk-r5b/toolchains/arm-eabi-4.4.0/prebuilt/linux-x86/bin/arm-eabi- make semc_iyokan_defconfig​
I've tried using the original ramdisk as well as unpack & repack(changing the logo.rle). The command I used to create the boot image is:
./mkbootimg --base 0x00200000 --kernel /usr/src/android/4.0.A.2.364/kernel/arch/arm/boot/zImage --ramdisk ramdisk.img -o boot.img​
Any idea? Thanks.
alvaroag said:
Yes, the image is for Xperia Pro(MK16a).
The exact command I'm using to configure the kernel is:
ARCH=arm CROSS_COMPILE=/opt/android-ndk-r5b/toolchains/arm-eabi-4.4.0/prebuilt/linux-x86/bin/arm-eabi- make semc_iyokan_defconfig​
I've tried using the original ramdisk as well as unpack & repack(changing the logo.rle). The command I used to create the boot image is:
./mkbootimg --base 0x00200000 --kernel /usr/src/android/4.0.A.2.364/kernel/arch/arm/boot/zImage --ramdisk ramdisk.img -o boot.img​
Any idea? Thanks.
Click to expand...
Click to collapse
Use stock ramdisk as is
Sent from my LT15i using XDA App
pushed 4.0.1.A.0.283 ramdisks for NEO V & PRO
DooMLoRD said:
Use stock ramdisk as is
Sent from my LT15i using XDA App
Click to expand...
Click to collapse
I ran the following commands:
cd /usr/src/android/4.0.A.2.364/kernel
ARCH=arm CROSS_COMPILE=/opt/android-ndk-r5b/toolchains/arm-eabi-4.4.0/prebuilt/linux-x86/bin/arm-eabi- make semc_iyokan_defconfig
nano -w .config
# Add CONFIG_TUN=y
ARCH=arm CROSS_COMPILE=/opt/android-ndk-r5b/toolchains/arm-eabi-4.4.0/prebuilt/linux-x86/bin/arm-eabi- make
cd ../bootimg
cp /usr/src/android/4.0.A.2.364/kernel/arch/arm/boot/zImage .
./unpack-bootimg.pl kernel_S1-SW-LIVE-883F-PID1-0001-S1-PARTITION.sin
cp kernel_S1-SW-LIVE-883F-PID1-0001-S1-PARTITION.sin-ramdisk.cpio.gz ramdisk.cpio.gz
./mkbootimg --base 0x00200000 --kernel zImage --ramdisk ramdisk.cpio.gz -o boot.img
./fastboot boot boot.img​
But it didn't worked. the workds "Sony Ericsson" appear, then the screen gets filled with black and finally the phone turns off.
I tried also with the kernel image, but still the same problem.
alvaroag said:
I ran the following commands:
cd /usr/src/android/4.0.A.2.364/kernel
ARCH=arm CROSS_COMPILE=/opt/android-ndk-r5b/toolchains/arm-eabi-4.4.0/prebuilt/linux-x86/bin/arm-eabi- make semc_iyokan_defconfig
nano -w .config
# Add CONFIG_TUN=y
ARCH=arm CROSS_COMPILE=/opt/android-ndk-r5b/toolchains/arm-eabi-4.4.0/prebuilt/linux-x86/bin/arm-eabi- make
cd ../bootimg
cp /usr/src/android/4.0.A.2.364/kernel/arch/arm/boot/zImage .
./unpack-bootimg.pl kernel_S1-SW-LIVE-883F-PID1-0001-S1-PARTITION.sin
cp kernel_S1-SW-LIVE-883F-PID1-0001-S1-PARTITION.sin-ramdisk.cpio.gz ramdisk.cpio.gz
./mkbootimg --base 0x00200000 --kernel zImage --ramdisk ramdisk.cpio.gz -o boot.img
./fastboot boot boot.img​
But it didn't worked. the workds "Sony Ericsson" appear, then the screen gets filled with black and finally the phone turns off.
I tried also with the kernel image, but still the same problem.
Click to expand...
Click to collapse
unpack-bootimg.pl wont work directly on kernel.sin files
use this:
http://forum.xda-developers.com/showthread.php?t=1262656
I used your script to split the kernel.sin, get the ramdisk, deleted my old boot.img, and then ran mkbootimg again, but nothing, still the same simptom. Any idea?
alvaroag said:
I used your script to split the kernel.sin, get the ramdisk, deleted my old boot.img, and then ran mkbootimg again, but nothing, still the same simptom. Any idea?
Click to expand...
Click to collapse
sorry mate no idea... wht u described should work...
pushed FW 4.0.2.A.0.42 ramdisks for all devices
updated kernel sources with 4.0.2.A.0.42 FW sources

Stock checker zip (prepare for OTA) - Now with more Lollipop!

Here are some flashable zips I've created to check your system partition and optionally replace any files with their stock counterparts. This is particularly useful for preparing your phone for an OTA (when you get those annoying error messages that say "{APP} has unexpected contents"). You'll need to flash the zip for your specific version of Android. You can flash this as many times as you want and can flash the OTA directly after flashing this.
You need a custom recovery to flash these! For the Lollipop OTA, after flashing the correct check/fix zip, you will need to flash the stock recovery in order to install the OTA!
KTU84P to LRX21O
Just check your system files
Code:
File: system_check_hammerhead_lrx21o-from-ktu84p.zip
[url=http://goo.gl/ooEpTy]Google Drive[/url]
[url=http://goo.gl/HPxP9O]MEGA[/url]
MD5: 10e436b5d4042145b3789ee9b9fcecb5
Size: 267 kb
Check and fix your system files:
Code:
File: system_fixer_hammerhead_lrx21o-from-ktu84p.zip
[url=http://goo.gl/mFfusU]Google Drive[/url]
[URL=http://goo.gl/VA9tuo]MEGA[/URL]
MD5: 2ae0f21d76429538f4ae854da67f5857
Size: 153 mb
KTU84M to KTU84P
Just check your system files:
Code:
File: system_check_hammerhead_ktu84m.zip
[url=http://goo.gl/ESNUH0]Google Drive[/url]
[url=http://goo.gl/fYKyvn]MEGA[/url]
MD5: 79b54a842debb992d0ef03eb2d7bc661
Size: 192 kb
Check and fix your system files:
Code:
File: system_fixer_hammerhead_ktu84m.zip
[url=http://goo.gl/sZsjz4]Google Drive[/url]
[url=http://goo.gl/1z732L]MEGA[/url]
MD5: a80331b5406042e2212fa0fe3bfeaa30
Size: 244 mb
KOT49H to KTU84M
Code:
File: check_hammerhead_kot49h_system.zip
[url=http://goo.gl/xLlREk]Google Drive[/url]
[url=http://goo.gl/lNRLlk]MEGA[/url]
MD5: 3a810e0d67e2f7b17af947a9c46664ec
Size: 402 MB
If you want to check the updater-script that is in the zip file without downloading the whole thing, [url=http://pastebin.com/kUAimyYK]I've made a paste for easy access.[/url]
Standard disclaimer: I am not to be held responsible if this messes up your phone in any way. Make sure you have backed up your phone and have backups of your backups. I created it for myself and figured I'd share what I created to benefit others. Just because it works for me does not mean it will work for you. If an alien pops out of your phone or it suddenly implodes or you lose everything on it and have no backups is not my problem.
For those of you who are interested in how I generated this, you'll find the script I created to generate the file below.
System checker script (not for the faint of heart!):
If you want to run this to create the zip file yourself, you'll need a zip file of the system directory for the version you're upgrading from and the OTA zip. I'm sure there's a better way to do all this, but this is what my convoluted mind gave me...
Call the script as (2nd argument is optional) ${0} OTA.zip [system_files.zip]
Code:
#!/bin/bash
# This requires 1 argument: the update zip filename
# Also accepts 1 optional argument: system files zip filesname
update_zip=$1
if [ -z ${update_zip} ]; then
echo "Need to let me know the name of the ota zip file!"
exit 1
fi
extract_dir=/tmp/update_zip_check
update_dir="META-INF/com/google/android"
eval $(echo ${update_zip} | sed 's!\([^\.]*\)\.signed-\([^-]*\)-\([^-]*\)-from-\([^\.]*\).*!update_hash=\1\nhw_name=\2\nnew_ver=$(echo \3 | tr [A-Z] [a-z])\ncurr_ver=$(echo \4 | tr [A-Z] [a-z])!')
system_zip=${2:-$(ls system*${hw_name}*${curr_ver}.zip)}
fixer_zip="system_fixer_${hw_name}_${new_ver}-from-${curr_ver}.zip"
check_zip="system_check_${hw_name}_${new_ver}-from-${curr_ver}.zip"
echo -e "\n\n${update_hash}\n${hw_name}\n${new_ver}\n${curr_ver}\n${system_zip}\n${check_zip}"
sha1sum -c <<EOF
${update_hash} ${update_zip}
EOF
if [ $? != 0 ]; then
echo "${update_zip} doesn't match hash; please re-download"
exit 255
fi
[ -d "${extract_dir}" ] && rm -rf "${extract_dir}"
mkdir "${extract_dir}"
echo "Updating updater-script for checking and replacing files."
unzip -q -d "${extract_dir}" "${update_zip}" "${update_dir}/update-binary" "${update_dir}/updater-script"
# The following was the old way of updating files
#unzip -q "${system_zip}" $(grep -e 'mount' -e 'getprop' -e 'assert(apply_patch_check(' -e 'assert(apply_patch_space(' ${extract_dir}/${update_dir}/updater-script | sed 's|^assert(\(apply_patch_check("/\)\([^"]*\)\(.*")\));|ifelse(\1\2\3, "", (package_extract_file("\2", "/\2"); ui_print("\/\2")));|' | tee -i ${extract_dir}/${update_dir}/updater-script_check | grep -e 'ifelse' | sed 's|^ifelse(apply_patch_check("/system/\([^"]*\)".*|\1|') -d ${extract_dir}
unzip -q -d "${extract_dir}" "${system_zip}" $(grep -e 'mount' -e 'getprop' -e '^apply_patch_check(' -e '^apply_patch_space(' ${extract_dir}/${update_dir}/updater-script | sed 's!^\(apply_patch_.*\) || abort("\\"/system/\(.*\)\\" .*);$!\1 || (ui_print("Need to fix /system/\2"); package_extract_file("\2", "/system/\2"));!' | sed 's!^\(apply_patch_check.*\) || abort("\\"\(EMMC:/dev/block/platform/.*/by-name/boot\).*);$!\1 || (ui_print("Flash boot partition"); package_extract_file("boot.img", "\2"));!' | sed 's!abort!ui_print!' | tee -i ${extract_dir}/${update_dir}/updater-script_fixer | grep -e '^apply_patch_check("/' | sed 's!^apply_patch_check("/system/\([^"]*\)".*!\1!')
sed 's!; package_extract_file([^)]*)!!' ${extract_dir}/${update_dir}/updater-script_fixer >${extract_dir}/${update_dir}/updater-script_check
mv "${extract_dir}/${update_dir}/updater-script_fixer" "${extract_dir}/${update_dir}/updater-script"
cur_dir="$(/bin/pwd)"
cd "${extract_dir}"
echo "Now creating the zip file for flashing."
zip -qr "${cur_dir}/${fixer_zip}" *
mv "${extract_dir}/${update_dir}/updater-script_check" "${extract_dir}/${update_dir}/updater-script"
zip -qr "${cur_dir}/${check_zip}" META-INF
cd "${cur_dir}"
rm -rf "${extract_dir}"
echo 'Done! Please remember to backup any APKs you have replaced on the /system partition of your device; this file will replace with the stock version for your build.'
Clever and people will find this usefull.
Thanks
Very Nice, Thanks
You could also include checks for other partitions (boot, recovery...)
no fix option for KTU84P? or am I blind, cheers for the zips though
pedja1 said:
Very Nice, Thanks
You could also include checks for other partitions (boot, recovery...)
Click to expand...
Click to collapse
In the OTA checks and fixes, the zip checks everything the OTA does, which usually includes free space, modem, and kernel. The zip will alert you to these and, in the case of boot/kernel, it will install the stock kernel. You're on your own for the modem, though.
Natherul said:
no fix option for KTU84P? or am I blind, cheers for the zips though
Click to expand...
Click to collapse
Right now, that file would be HUGE since it would include every file in the system partition. I was planning on waiting for the OTA to drop to make one, but... Give me half an hour and I'll cook something up for you
Edit: I have added a new file that checks and fixes all KTU84P system files.
I have uploaded the new zips for the released OTA! Get them now!
KTU84P to LRX21O
Just check your system files
Code:
File: system_check_hammerhead_lrx21o-from-ktu84p.zip
[url=http://goo.gl/ooEpTy]Google Drive[/url]
[url=http://goo.gl/HPxP9O]MEGA[/url]
MD5: 10e436b5d4042145b3789ee9b9fcecb5
Size: 267 kb
Check and fix your system files:
Code:
File: system_fixer_hammerhead_lrx21o-from-ktu84p.zip
[url=http://goo.gl/mFfusU]Google Drive[/url]
[URL=http://goo.gl/VA9tuo]MEGA[/URL]
MD5: 2ae0f21d76429538f4ae854da67f5857
Size: 153 mb
I'm slightly confused by the red labels. I have version KTU84P and want to return it to stock so I can update using the OTA (when it's available). Which file should I download to ensure my files are stock again? (I would assume the files named KTU84P to Lxxxx would be the ones?)
Also, will this remove root at all so I would be able to simply download and install the OTA?
danaconda1 said:
I'm slightly confused by the red labels. I have version KTU84P and want to return it to stock so I can update using the OTA (when it's available). Which file should I download to ensure my files are stock again? (I would assume the files named KTU84P to Lxxxx would be the ones?)
Also, will this remove root at all so I would be able to simply download and install the OTA?
Click to expand...
Click to collapse
Yes, use the KTU84P to LRX21O to check/fix your KTU84P version. This will not remove root, it just checks the APKs and files that the OTA checks to make sure they're at the right version for patching.
crazycaveman said:
Yes, use the KTU84P to LRX21O to check/fix your KTU84P version. This will not remove root, it just checks the APKs and files that the OTA checks to make sure they're at the right version for patching.
Click to expand...
Click to collapse
Hi how to run that script on Windows?
Im trying to run adb sideload system_fixer_hammerhead_lrx21o-from-ktu84p.zip and Im getting error:
Veryfing update package....
E: footer is wrong
E: signature veryfication failed
Instalation aborted.
Any ideas?
Thanks,
K.
Please help me how to apply fix script.
Thanks,
K.
ikavior said:
Hi how to run that script on Windows?
Im trying to run adb sideload system_fixer_hammerhead_lrx21o-from-ktu84p.zip and Im getting error:
Veryfing update package....
E: footer is wrong
E: signature veryfication failed
Instalation aborted.
Any ideas?
Thanks,
K.
Click to expand...
Click to collapse
Sounds like you have stock recovery; these zip files are like custom ROMs and need a custom recovery (e.g. ClockworkMod, TWRP)
crazycaveman said:
Sounds like you have stock recovery; these zip files are like custom ROMs and need a custom recovery (e.g. ClockworkMod, TWRP)
Click to expand...
Click to collapse
So I cant fix thish without wipe my data ?
ikavior said:
So I cant fix thish without wipe my data ?
Click to expand...
Click to collapse
If your bootloader is locked, that is correct. However, if you are getting an "unexpected contents" error when flashing the OTA and are rooted, you can extract this zip file and replace the file(s) manually with the stock version.
ikavior said:
So I cant fix thish without wipe my data ?
Click to expand...
Click to collapse
Actually, on 4.4 you could root with Towelroot and unlock ur bootloader without wiping.
Script error
So I am getting an error that the script (and the OTA.zip) says the script expects that my device should have 4.4.4/KTU84P/1227136 or 5.0/LRX21O/1570415 release keys but my device has 4.4/KRT16M/893803 release keys. However when looking at device status my device says the following:
-Device Version 4.4.4
-Baseband Version M897A-2.0.50.1.16
-Kernel Version 3.4.0-gd59db4e [email protected] #1
-Build Number KTU84P
I'm in the same situation, the checker and supposed fixer both produce the same message as above. I tried un-rooting and reflashing both zips (I'm on stock recovery but using fastboot to boot into CWM - efrant's old way for the Galaxy Nexus, worked with SuperSu so far) but the message persists.
pauleyc said:
I'm in the same situation, the checker and supposed fixer both produce the same message as above. I tried un-rooting and reflashing both zips (I'm on stock recovery but using fastboot to boot into CWM - efrant's old way for the Galaxy Nexus, worked with SuperSu so far) but the message persists.
Click to expand...
Click to collapse
Instead of using CWM to flash the OTA update, try sideloading the update using the stock recovery. Something has changed with the lollipop update, and it doesn't seem like TWRP or CWM can flash it (at least I haven't been able to do it).
Sent from my Nexus 5 using Tapatalk
Remind me where I can get the stock recovery?
Sent from my Nexus 5 using XDA Free mobile app
efrant said:
Instead of using CWM to flash the OTA update, try sideloading the update using the stock recovery. Something has changed with the lollipop update, and it doesn't seem like TWRP or CWM can flash it (at least I haven't been able to do it).
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
To be honest, "nothing" changed, only that now it reads kitkat's kernel properties instead of the build.prop file directly. As I posted in the help-desk:
RusherDude said:
The fun part is that this is a bug that I saw loong ago coming.. I don't why recoveries can't STILL access android kitkat kernel properties, but they work ok reading the file, so the OTA 4.4.4 worked fine, that tries:
file_getprop("/system/build.prop", "ro.build.fingerprint") == "google/hammerhead/hammerhead:4.4.3/KTU84M/1158763:user/release-keys" ||
file_getprop("/system/build.prop", "ro.build.fingerprint") == "google/hammerhead/hammerhead:4.4.4/KTU84P/1227136:user/release-keys" ||
abort("Package expects build fingerprint of google/hammerhead/hammerhead:4.4.3/KTU84M/1158763:user/release-keys or google/hammerhead/hammerhead:4.4.4/KTU84P/1227136:user/release-keys; this device has " + getprop("ro.build.fingerprint") + ".");
Which works OK, tho if you notice the error case, the description would fail because it uses getprop...
NOW on 5.0 they use the same getprop for both cases, and fail:
getprop("ro.build.fingerprint") == "google/hammerhead/hammerhead:4.4.4/KTU84P/1227136:user/release-keys" ||
getprop("ro.build.fingerprint") == "google/hammerhead/hammerhead:5.0/LRX21O/1570415:user/release-keys" ||
abort("Package expects build fingerprint of google/hammerhead/hammerhead:4.4.4/KTU84P/1227136:user/release-keys or google/hammerhead/hammerhead:5.0/LRX21O/1570415:user/release-keys; this device has " + getprop("ro.build.fingerprint") + ".");
So modifying the update scripts its a simple solutions (tho It changes the file signature and so, and it's official OTA so no way..).
Click to expand...
Click to collapse
This is a custom recoveries bug from 2013 when Kit Kat came out, still unsolved and if they don't do something we will need to flash stock recovery and stuff every OTA from now on.
I didn't understand - does the fixer flashes a new recovery? (currently can't download the zip file to check if there is any recovery img inside.. )

How to patch `system.img` to root the Samsung S10 5G (Qualcomm) device?

Hi All,
Device Detail:
- Samsung S10 5G
- Qualcomm Device
- Model: SM-G977U
- ROM: VZW-G977UVRU2ASH7-20190827135903
- Kernel-Version - Linux version 4.14.83-16633035 ([email protected]) (clang version 6.0.10 for Android NDK) #2 SMP PREEMPT Wed Aug 14 16:23:48 KST 2019
Background: I have
- rooted the device with instructions given by Magisk.
- I can successfully reboot to the recovery rootfs.
Problem: I am trying to modify the `system.img.ext4.lz4` file to root the device with normal boot. I am aware that it will not let the device install OTA Updates.
Unpack-Pack System and make new AP.tar, flash:
- Without any modification to the `system.img`, I have just unpacked `system.img.ext4.lz4`->`system.img.ext4`->`system.img`->mounted to system directory and packed it back to `system.img`->`system.img.ext4`->`system.img.ext4.lz4`.
- Replaced unpack-packed `system.img.ext4.lz4` with the AP `system.img.ext4.lz4` and make a tar of it.
- Then I have flashed it using Odin v3.13 along with BL, CP, and HOME_CSC.
- Odin has show PASS and I have rebooted the device into recovery mode.
- Done the Wipe data/factory reset and reboot to recovery again but released the recovery key combination on splash screen as mentioned in the root instructions .
- The device stuck in a boot loop.
Tries:
1. Disable Dm-verity
- Removed `avb` flag from `boot.img` with
Code:
magiskboot dtb boot.img patch
- Removed `avb` and `verify` flags from `dtbo.img` with
Code:
magiskboot dtb dtbo.img patch
- Patched `ramdisk.cpio` with
Code:
magiskboot cpio ./initrd 'patch false true'
Patched `boot.img` and `dtbo.img` is working fine with magisk patched AP file but the `ramdisk.cpio` creating the issue: Stuck at splash screen when trying to go to recovery after successfully flash with Odin. Download mode is appearing on splash screen.
So, I have used `boot.img` and `dtbo.img` along with unpack-packed `system.img.ext4.lz4` but the result is still a boot loop. I have also tried a combination of `boot.img` and `dtbo.img` along with unpack-packed `vendor.img.ext4.lz4` and flashed the AP.tar with other files but still the result is a boot loop.
So, I want to debug the problem and got to know about `pstore` which preserve the logs when kernel panic.
2. pstore
- Checked that `/sys/fs/pstore` is mounted by the system with following in init file: Grep the pstore using `find . | grep '\.rc' | xargs cat | grep pstore -n -i` and get following result:
Code:
314: # pstore/ramoops previous console log
315: mount pstore pstore /sys/fs/pstore nodev noexec nosuid
316: chown system log /sys/fs/pstore/console-ramoops
317: chmod 0440 /sys/fs/pstore/console-ramoops
318: chown system log /sys/fs/pstore/console-ramoops-0
319: chmod 0440 /sys/fs/pstore/console-ramoops-0
320: chown system log /sys/fs/pstore/pmsg-ramoops-0
321: chmod 0440 /sys/fs/pstore/pmsg-ramoops-0
- Checked the kernel config by pulling the file from /proc/config.gz.
Code:
$ cat config | grep PSTORE
CONFIG_PSTORE=y
CONFIG_PSTORE_ZLIB_COMPRESS=y
# CONFIG_PSTORE_LZO_COMPRESS is not set
# CONFIG_PSTORE_LZ4_COMPRESS is not set
CONFIG_PSTORE_CONSOLE=y
CONFIG_PSTORE_PMSG=y
CONFIG_PSTORE_PMSG_SSPLOG=y
CONFIG_PSTORE_RAM=y
- Check the `ramoops` configuration:
Code:
./sys/module/ramoops/parameters/console_size 262144
./sys/module/ramoops/parameters/dump_oops 1
./sys/module/ramoops/parameters/ecc 0
./sys/module/ramoops/parameters/ftrace_size 262144
./sys/module/ramoops/parameters/mem_address 3241148416
./sys/module/ramoops/parameters/mem_size 1048576
./sys/module/ramoops/parameters/mem_type 0
./sys/module/ramoops/parameters/pmsg_size 262144
./sys/module/ramoops/parameters/record_size 262144
`pstore` setup looks fine but when I am trying the get logs from `sys/fs/pstore` then I found nothing.
I have tried it by two ways:
1. Crash manually with panic kernel using:
Code:
echo 1 > /proc/sys/kernel/sysrq
echo c > /proc/sysrq-trigger
Followed Reading Kernel Logs
2. Flashing non-working rom that cause a boot loop and then flashed a working ROM with rooting steps and checked the file at `sys/fs/pstore`.
I need a favor in:
- Any steps to fix/debug the `pstore` problem?
- Any other way to find the kernel logs?
Update 1: I get the logs from recovery but I am not able to identify the problem.
Logs link: https://drive.google.com/file/d/1b-XNmjpYvH-L8lY0xA0SYr7XcITVCrVS/view?usp=sharing
Description: In this video, I have done the following:
1. Displayed recovery logs before: The last recovery logs are ends with 8.
2. Rebooted the device with a recovery key combination. I have already wipe data partition before making this video.
3. The boot loop happens and in the next reboot, I have pressed the recovery key combination to open the recovery mode where logs that end with 9 displayed.
4. Then I have recorded `last_history`, `last_avc_message_recovery`, `last_log.9` and `last_kmsg.9`
5. `last_history` and `last_avc_message_recovery` looks unchanged(same as before boot loop).
6. Then, I just have tried to mount the system but that didn't work.
7. At last, I have just rebooted the system normally without any recovery key combination.
Some Highlighted logs of last_log.9
exec -f /system/bin/e2fsck -v -y /dev/block/bootdevice/by-name/cache
error: _do_exec: can't run '/system/bin/e2fsck'
(errno 13 : Permission denied)
/system/bin/e2fsck terminated by exit(255)
...
E:Can't read /cache/recovery/last_locale: No such file or directory
...
W:Failed to unmount /efs: Device or resource busy
can't unmount /efs - Device or resource busy
...
W:Failed to set brightness: Invalid argument
I:Screensaver disabled
Atomic Commit failed in DisableNonMainCrtcs
Atomic Commit failed, rc = 0
...
Reboot Recovery Cause is [[BootChecker]RebootRecoveryWithKey]
...
print_recovery_cause() : reboot_reason=[[BootChecker]RebootRecoveryWithKey]
...
[property list]
persist.audio.fluence.speaker=true
...
ro.vendor.build.security_patch=2018-08-05
Supported API: 3
I:/efs is already mounted
W:Failed to unmount /efs: Device or resource busy
check_selective_file:Can't unmount /efs - Device or resource busy
just_reboot_after_update = 1
should_wipe_cahcewipe_cache
-- Wiping cache...
erase_volume(/cache)
...
MDF_I: Completed reset MDF flag!
MDF_I: Completed initialized MDF for Recovery!
mke2fs 1.43.3 (04-Sep-2016)
Discarding device blocksL 4096/153600??????????????????????????????done
Discard takes 0.00051s
Creating filesystem with 153600 4k blocks and 38400 inodes
...
Creating journal (2048 blocks): done
...
copy_logs
...
Cache wipe complete
[Checking pre-multi-csc2]
[start failed section]
sales_code=VZW
Carrier ID=[XAA]
[system partition space check]
The device has /product partition.
[out-recovery]
I:system root image is true, so need to change the unmount point from /system to /system_root
running out-recovery time : 0.000s
running recovery time: 1.738s
copy_avc_msg_to_data(1, )
I:fs_type "ext4" for /cache
copy_file 'proc/avc_msg' 'cache/recovery/last_avc_msg_recovery'
!__RECOVERY_FOR_ASSAMBLY
b_del_recovery_command = true
Rebooting...
## finish_recovery_terminate(del=1, reboot_cmd=reboot, clear_BCB=1)
## finish_recovery(delcmd=1,...
I:Saving locale "en-US"
I:fs_type "ext4" for /cache
I:[libfs_mgr]dt_fstab: Skip disabled entry for partition vm-linux
I:## unlink /cache/recovery/command
copy_logs
I:fs_type "ext4" for /cache
copy_log_file :: create recovery log file '/cache/recovery/log'
copy_log_file :: create recovery log file '/cache/recovery/last_log'
Click to expand...
Click to collapse
Is anyone have experience in detecting problems from the kernel logs?
i can not help you, but we can collect ideas. what about re-sign the system.img? there is a key somewhere, i guess just deleting won't work but maybe it is possible to calculate checksum
or maybe you can switch to SuperSU 2.79 SR3 (latest release from chainfire) or at least look inside the update-binary shell script how to root system.
regarding dm-verity i would start with searching for "verify" flag in your fstabs and remove it. magisk is also doing some hex patches and re-signing, it's the best source to look inside magisk installer zip update-binary/ updater-script, if you have the knowledge to read code
another option is try to port a twrp recovery from another snapdragon (i wonder if somebody did this already) if you can find a porting guide
so the vzw s10 5g is unlockable?
elliwigy said:
so the vzw s10 5g is unlockable?
Click to expand...
Click to collapse
yes
aIecxs said:
yes
Click to expand...
Click to collapse
Figures lol.. I have a g975u from big red n don't plan on buying another lol
aIecxs said:
yes
Click to expand...
Click to collapse
Message me on telegram and I can help you if you help me.. I'm curious in some logs and what not.. I also might have something you can use..
Did you get it working? I have the same phone and I want to use the 600mgz tmobile 5g in a few days, so I need the right rom.
elliwigy said:
so the vzw s10 5g is unlockable?
Click to expand...
Click to collapse
aIecxs said:
yes
Click to expand...
Click to collapse
Snapdragon bootloader unlockable? How?
I'm a VZW customer and can get the phone on an upgrade, but want to root it...
i got a g977p and twrp n magisk working great
do you think it is possible to flash other branding on verizon devices with modded odin?
aIecxs said:
do you think it is possible to flash other branding on verizon devices with modded odin?
Click to expand...
Click to collapse
dunno.. its not possible on n976v..
Was there any luck on rooting the Verizon G977U?
@Vats12 has already successful rooted with magisk in recovery. this thread is for rooting system (kind of rooting where su binary is placed in /system/xbin like for older devices, which breaks OTA)
aIecxs said:
@Vats12 has already successful rooted with magisk in recovery. this thread is for rooting system (kind of rooting where su binary is placed in /system/xbin like for older devices, which breaks OTA)
Click to expand...
Click to collapse
So you want like the supersu method?
ExtremeGrief said:
So you want like the supersu method?
Click to expand...
Click to collapse
Yes, do you know how to do this?
Magisk (guide) does a lot of other things too..
Maybe we can use Magisk to disable the securities and then SuperSu can help in the rooting system?
Vats12 said:
Yes, do you know how to do this?
Magisk (guide) does a lot of other things too..
Maybe we can use Magisk to disable the securities and then SuperSu can help in the rooting system?
Click to expand...
Click to collapse
But why? Safetynet will be gone
What model is the device?
ExtremeGrief said:
But why? Safetynet will be gone
What model is the device?
Click to expand...
Click to collapse
model see OP! i guess because of the buttons needed for booting in magiskrecovery, but the reason is not important only HOW (for Vats12, not for me i don't own this device)
Sorry but this thread needs to be closed
aIecxs said:
model see OP! i guess because of the buttons needed for booting in magiskrecovery, but the reason is not important only HOW (for Vats12, not for me i don't own this device)
Click to expand...
Click to collapse
I don't want to be the one who shouts fake, but the instructions you gave a link to says you have to be able to flash a bootloader first, which means an unlocked blootloader, if you have Verizon rom this is not possible, as the blootloader is locked.
If you did find a way to flash a modified bootloader, or a modified recovery those are the instructions we need, because in fastboot you are unable to do this with a locked bootloader and you are unable to unlock the bootloader on Verizon. If you have a modified bootloader or recovery flashed on your device what did you use to flash it with Odin? Because only way to flash a boot.img is either get into download mode and flash with Odin, or with Edl, if you got into edl mode then can you provide instructions on that, because we would like to know how to get the device into EDL mode as well
Sorry boys this is a hoax.
@DroidisLINUX there is video proof in OP, and again for you:
This is not a tutorial about unlocking and rooting, it is a question how he can modify /system to permanently integrate su

Oneplus 7 pro firmware collection

Ah yes, Oneplus released that new update. Now I must download 2+ GB off my capped data plan, then flash it to recovery, carefully switch back my slot then flash my custom ROM again to the slot I just flashed OOS to and then flash OOS again to the other slot and then I must repeat everything above. After that I must delete the 2 fake partitions the updater created on data because they are useless. Oh wait it doesn't let me delete them who'd have thought?
Seriously? What on earth happened there
A better solution is required, especially something that grants more control. Well here it is
The boring stuff:
I am not responsible for anything you do to your device
These zips contain the following files:
Code:
The firmware (duh)
flashall - flashes both a and b
flash_a - only flashes slot a
flash_b - only flashes slot b
The following partitions found in the official oxygenos zip have been removed:
Code:
vbmeta
boot
dtbo
odm
system
vendor
reserve
india
Because for custom ROM users these partitions are either unused or used by the currently running custom ROM
How to flash?
From TWRP (it doesn't even need to support decryption):
Code:
adb push abl.img aop.img bluetooth.img cmnlib64.img cmnlib.img devcfg.img dsp.img flash_a flashall flash_b hyp.img keymaster.img LOGO.img modem.img oem_stanvbk.img qupfw.img storsec.img tz.img xbl_config.img xbl.img /tmp/
adb shell
cd /tmp
chmod 777 flashall # or flash_a/b
./flashall # or sh flashall or use flash_a/b
I suggest you use one of the flash_a/b scripts to only flash your current slot and test the changes out before running flashall
From termux:
You might need to set selinux to permissive while flashing. Only try to flash your current slot, reboot and if there are no errors flash the other slot
unzip the zip file to a directory and cd to it. If you use termux you should already know this
Just run one of the flashing scripts as root
Note that the flashing takes some time. Do not abort it
From adb root:
Sadly I don't have adb root so if someone has it they can let me know how it goes and how they flashed it
Do NOT believe in myths. You do NOT need to wipe cache/dalvik/any other nonsense while upgrading firmware. Stop wasting your time
Downloads:
Open beta 9: https://glassrom.pw/guacamole-ob9fw.zip
More will be added when I have time
Yes I personally tested this on my device and it was fine. Except that the popup camera pops out sometimes but I just suspect big brother. Nothing abnormal
Happy flashing. Or whatever
Anybody caught the latest OOS release link yet? All I found was an incremental OTA
Is this project discontinued? If yes, I'd like to see a revival of this.
hellcat50 said:
Is this project discontinued? If yes, I'd like to see a revival of this.
Click to expand...
Click to collapse
He doesn't care about support
The link is dead.
Does anyone have this zip?
I need these files
flashall
flash_a
flash_b
in order to make an up to date zip.
alessio89g said:
The link is dead.
Does anyone have this zip?
I need these files
flashall
flash_a
flash_b
in order to make an up to date zip.
Click to expand...
Click to collapse
you can get the file list and the firmware collection from the glassrom device tree
i stopped maintaining this as now i just ship firmware into my roms
Bitbucket
bitbucket.org
flash_a, flash_b and flashall really were just script generated scripts
something like
```
for i in $(ls *img | sed 's/.img$//g')
do
echo dd if="$i".img of=/dev/block/bootdevice/by-name/"$i"_a;
done
```
same for slot b:
```
for i in $(ls *img | sed 's/.img$//g')
do
echo dd if="$i".img of=/dev/block/bootdevice/by-name/"$i"_b;
done
```
concetenate flash_a and flash_b as follows:
```
cat flash_a flash_b > flashall
```
PS: you need to remove the oem_stanvbk_{a,b} entries as that is not an A/B partition. also i have just shown you roughly what i use to generate the flash scripts. there is no guarantee these work. example you might need to remove the $ from the regex

Categories

Resources