Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ROM doesn't boot up #119

Open
rorre opened this issue Dec 19, 2016 · 60 comments
Open

ROM doesn't boot up #119

rorre opened this issue Dec 19, 2016 · 60 comments

Comments

@rorre
Copy link

rorre commented Dec 19, 2016

Hi~
i already tried this 5 times, and also already fix the rejects.
but the rom doesn't boot, and adb didn't recognize the phone.
already tried many ways, but adb still didn't recognize the phone.

MT6580, kernel 3.18.xx
Infinix Hot 2

here are the reject files.
reject.zip

@imFaa
Copy link

imFaa commented Dec 19, 2016

you have to edit your boot.img manually.and SElinux should be permissive

@rorre
Copy link
Author

rorre commented Dec 19, 2016

Already did that.
Copying from angler patch_bootimg.sh and do some modification.

@imFaa
Copy link

imFaa commented Dec 19, 2016

upload modified patch.bootimg.sh let me see

@rorre
Copy link
Author

rorre commented Dec 19, 2016

Here it is.


#!/bin/bash

BOOTIMG=$1

rm -rf $TARGET_BOOT_DIR
mkdir -p $TARGET_BOOT_DIR
$UNPACKBOOTIMG -i $BOOTIMG -o $TARGET_BOOT_DIR > /dev/null
gunzip $TARGET_BOOT_DIR/boot.img-ramdisk.gz
mkdir -p $TARGET_BOOT_DIR/ramdisk
cd $TARGET_BOOT_DIR/ramdisk
cpio -i < ../boot.img-ramdisk
cd - > /dev/null
if [ ! -f $TARGET_BOOT_DIR/ramdisk/init_vendor ];then
mv $TARGET_BOOT_DIR/ramdisk/init $TARGET_BOOT_DIR/ramdisk/init_vendor
fi
cp -f $PREBUILT_BOOT_DIR/$TARGET_BIT/init $TARGET_BOOT_DIR/ramdisk/init
$MKBOOTFS $TARGET_BOOT_DIR/ramdisk | gzip > $TARGET_BOOT_DIR/ramdisk.gz


OLDCMDLINE=$(cat $TARGET_BOOT_DIR/boot.img-cmdline)
NEWCMDLINE="bootopt=64S3,32S1,32S1 androidboot.selinux=permissive"
for prop in $OLDCMDLINE
do
    echo $prop | grep "androidboot.selinux=" > /dev/null
    if [ $? -eq 0 ];then
        continue
    fi
    NEWCMDLINE="$NEWCMDLINE $prop"
done

echo "NEWCMDLINE: $NEWCMDLINE"

BASEADDR=$(cat $TARGET_BOOT_DIR/boot.img-base)
PAGESIZE=$(cat $TARGET_BOOT_DIR/boot.img-pagesize)
RAMDISKOFFSET=$(cat $TARGET_BOOT_DIR/boot.img-ramdisk_offset)
TAGSOFFSET=$(cat $TARGET_BOOT_DIR/boot.img-tags_offset)

$MKBOOTIMG --kernel $TARGET_BOOT_DIR/boot.img-zImage --ramdisk $TARGET_BOOT_DIR/ramdisk.gz --dt $TARGET_BOOT_DIR/boot.img-dt --base "$BASEADDR" --pagesize "$PAGESIZE" --ramdisk_offset "$RAMDISKOFFSET" --tags_offset "$TAGSOFFSET" --cmdline "$NEWCMDLINE" -o $BOOTIMG

@imFaa
Copy link

imFaa commented Dec 19, 2016

@rorre
Copy link
Author

rorre commented Dec 19, 2016 via email

@imFaa
Copy link

imFaa commented Dec 19, 2016

@rorre
Copy link
Author

rorre commented Dec 19, 2016 via email

@imFaa
Copy link

imFaa commented Dec 19, 2016

only see in boot.img and compare stuff

@rorre
Copy link
Author

rorre commented Dec 19, 2016 via email

@imFaa
Copy link

imFaa commented Dec 19, 2016

if you succeed please let us know and I need your help please send me build.prop here as i am getting build.prop error so have to compare whats wrong
`Traceback (most recent call last):
File "/home/faa/bin/patchrom/tools/releasetools/sign_target_files_apks", line 354, in
main(sys.argv[1:])
File "/home/faa/bin/patchrom/tools/releasetools/sign_target_files_apks", line 341, in main
SignApks(input_zip, output_zip, apk_key_map, key_passwords)
File "/home/faa/bin/patchrom/tools/releasetools/sign_target_files_apks", line 162, in SignApks
new_data = RewriteProps(data)
File "/home/faa/bin/patchrom/tools/releasetools/sign_target_files_apks", line 194, in RewriteProps
assert len(pieces) == 5
AssertionError
Build full ota package: /home/faa/bin/patchrom/onyx/out/fullota.zip
unzipping target target-files...
Warning: could not find SYSTEM/build.prop in

ERROR: couldn't find ro.build.fingerprint in build.prop

/home/faa/bin/patchrom/build/porting.mk:314: recipe for target 'fullota' failed
make: *** [fullota] Error 1`

@rorre
Copy link
Author

rorre commented Dec 19, 2016 via email

@imFaa
Copy link

imFaa commented Dec 19, 2016

i will not use it just want to check structure..and the fingerprint is there in all files i.e in target_files,target_files.zip,stockrom.zip but unfortunately its getting failed.

@shadow25
Copy link

Hi, have you resolve? My phone don't boot too, also applying the changes posted just above (wuxianlin).

@rorre
Copy link
Author

rorre commented Dec 20, 2016 via email

@shadow25
Copy link

I'm using like base the CM13 (official) but also making these changes the smartphone does not boot. I'll try to do some other proof, if I've done something wrong.

@shadow25
Copy link

Finally I'm able to boot but the phone go into bootloop. If anyone can give me a hand, I will post the logcat.

@rorre
Copy link
Author

rorre commented Dec 20, 2016 via email

@VishwaKumaran
Copy link

I build a MIUI ROM too but I stuck at the Samsung logo, did you know how to fix it ?

Phone : Samsung Galaxy S4 Active
ROM : CM13
Boot.img extracted ; http://www.mediafire.com/file/nhez8jccrprmzwd/bootextracted.zip
patchbootimg.sh : http://www.mediafire.com/file/z2a7d0wxiww99mm/patch_bootimg.sh

@shadow25
Copy link

shadow25 commented Dec 21, 2016

In the archive there is the logcat and the dmesg @Rendyindo thanks for your help :)
bootloop.zip

@shadow25
Copy link

@VishwaKumaran you need to edit the boot.img manually and then flash via fastboot command. Seems like the update-script don't do it (I think another error of the patchrom). See the patchrom of wuxianlin post before and reproduce to your boot.img, naturally change the values for your phone.

@VishwaKumaran
Copy link

Therefore I can't flash this ROM via recovery ? Is necessary to flash via fastboot command ?

@rorre
Copy link
Author

rorre commented Dec 21, 2016 via email

@shadow25
Copy link

@VishwaKumaran no, only modified boot.img need to be flashed via fastboot command, you can flash the fullota.zip via TWRP. The steps are: flash fullota.zip, reboot into bootloader and flash modified boot.img, rum fastboot reboot command and the phone will boot.

@VishwaKumaran
Copy link

If I put the modified boot.img in my fullota can I just flashed via TWRP ?

@shadow25
Copy link

I have do it but seems like the boot.img isn't flashed. You can try and if don't boot, flash the modified boot.img manually via fastboot command.

@VishwaKumaran
Copy link

I try many times but they didn't boot. I will try your method

@Hugomm
Copy link

Hugomm commented Dec 22, 2016

@shadow25 @VishwaKumaran

There is a way to flash img files directly from the TWPR.
http://www.droidviews.com/now-flash-image-files-using-twrp-2-8-4-0/
So just place the edited boot.img and flash it that way.

@shadow25
Copy link

@Hugomm the problem isn't flash boot.img (anyway, thanks for this trick ;) ), but the bootloop...

@rorre
Copy link
Author

rorre commented Dec 22, 2016 via email

@imFaa
Copy link

imFaa commented Dec 23, 2016

did you managed to boot?

@shadow25
Copy link

Yes, of course

@imFaa
Copy link

imFaa commented Dec 23, 2016

@shadow25 your ROM booted up?

@shadow25
Copy link

Yes but go into bootloop

@imFaa
Copy link

imFaa commented Dec 23, 2016

Bootloop means it booted to home screen and then rebooting right?

@imFaa
Copy link

imFaa commented Dec 23, 2016

Or just a Mi logo?

@shadow25
Copy link

Only Mi logo

@imFaa
Copy link

imFaa commented Dec 23, 2016

That's not a bootloop bro...I reached there at first attempt without modifying anything..the big problem is that a good knowledge devs are not helping otherwise we all get a working miui ROM.here is my repo one dev told me to push everything on github then he will help me but till now no help.

https://github.com/farooque7508/Miui8_Onyx

@shadow25
Copy link

Bootloop means "bootanimation loop" and this is what I have. I tried to not change anything in boot.img (except SELinux) but the device would stop to my smartphone logo. I'll try again and let you know.
P.S. I have made your own modifications, including those of boot.img

@imFaa
Copy link

imFaa commented Dec 23, 2016

You are good...I am not a programmer don't even know how to make or edit scripts...I just ask everything too google and it answers everything...but how to get logs in this situation..one of patchrom dev asking for logs, and I can't even get that. do you know how to get logs in bootloop?

@VishwaKumaran
Copy link

To me it's didn't boot at all !! ( stuck on Samsung logo ). I try much times for no result. I try porting method, Xiaomi MI 2S have the same processor as my Galaxy S4 Active but not the same density pixel Xiaomi ~342 xhdpi and Galaxy S4 Active ~441 xxhdpi. But to make the porting method can I use also some patchrom folders ? If yes what's folders or files I should replace ? Moreover for the update-script can I use the update-script from patchrom ROM ?

@imFaa
Copy link

imFaa commented Dec 23, 2016

@VishwaKumaran give me your boot.img will do some work on it.

@shadow25
Copy link

shadow25 commented Dec 23, 2016

@farooque7508 Also I'm not a programmer but I'm learning through xda forum. To take logcat into bootloop you need to edit your default.prop file into ramdisk folder of boot.img for enable adb permission. After that you can use the terminal of your PC to take it (see this)
@VishwaKumaran you need to edit manually your boot.img or you can't cross the boot logo

@imFaa
Copy link

imFaa commented Dec 23, 2016

@shadow sorry to bother but I can't find post related to default.config of ramdisk can you please tell me or can you please point me out to that specific post?

@VishwaKumaran
Copy link

Here is my boot.img :
http://www.mediafire.com/?ud88lazjon84fnp
Moreover when I flash the boot.img via fastboot the device can't be detected whereas I enable the adb permission in the default.prop

@shadow25
Copy link

@farooque7508 sorry, my mistake, it's default.prop and from what I have see in your repositories, you have do yet the right changes to boot.img ;) now take the logcat bro
@VishwaKumaran check if your device is recognized from your PC with adb devices command. If it's recognized, then there are problems with boot.img

@VishwaKumaran
Copy link

I will try it, however can you check the boot.img if I have do the right configuration ?

@VishwaKumaran
Copy link

Moreover if I do a mistake in the frameworks files, can I get this issue ?

@imFaa
Copy link

imFaa commented Dec 24, 2016

@VishwaKumaran if you do some mistake in framework the build process will never complete.
Post your boot.img will see if you did a right config.

@VishwaKumaran
Copy link

Download the boot.img : http://www.mediafire.com/?ud88lazjon84fnp

@imFaa
Copy link

imFaa commented Dec 24, 2016

@VishwaKumaran download new boot img from here and flash in recovery
https://drive.google.com/open?id=0Bzct65GWV98MR19mQVl6UjFsakk

@rorre
Copy link
Author

rorre commented Dec 24, 2016 via email

@rorre
Copy link
Author

rorre commented Dec 24, 2016 via email

@muralivijay
Copy link

Anyone fixed boot loop ? Iam still stuck at mi logo :(

@VishwaKumaran
Copy link

Yes upload your MIUI project on github. You should edit the boot.img

@Hugomm
Copy link

Hugomm commented Mar 25, 2017

I wasnt able at the end, so I left the project on compiling for Bacon

@rorre
Copy link
Author

rorre commented Mar 25, 2017 via email

@Hugomm
Copy link

Hugomm commented Mar 25, 2017

Same here, I cant even adb to log...

@VishwaKumaran
Copy link

Upload what you have do in your github and send me the link I will help you to build it

@muralivijay
Copy link

Yes adb is not working .. tried all thing about enable adb .. but adb not working... So unable to see logcats .... Only mi boot animation is come ... No more move ....:/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants