patchrom icon indicating copy to clipboard operation
patchrom copied to clipboard

ROM doesn't boot up

Open rorre opened this issue 9 years ago • 60 comments

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

rorre avatar Dec 19 '16 09:12 rorre

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

imFaa avatar Dec 19 '16 10:12 imFaa

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

rorre avatar Dec 19 '16 10:12 rorre

upload modified patch.bootimg.sh let me see

imFaa avatar Dec 19 '16 10:12 imFaa

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

rorre avatar Dec 19 '16 10:12 rorre

https://github.com/wuxianlin/MIUI_patchrom_Find5/tree/marshmallow/overlay/boot/ramdisk

try comparing ramdisk with this

imFaa avatar Dec 19 '16 11:12 imFaa

Ok.

Pada tanggal 19 Des 2016 18.08, "Farooque" [email protected] menulis:

https://github.com/wuxianlin/MIUI_patchrom_Find5/tree/ marshmallow/overlay/boot/ramdisk

try comparing ramdisk with this

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MiCode/patchrom/issues/119#issuecomment-267938953, or mute the thread https://github.com/notifications/unsubscribe-auth/AGPQhcT4K-GeTm6kT7MG3tvrVn61qvTyks5rJmWPgaJpZM4LQgrr .

rorre avatar Dec 19 '16 11:12 rorre

Or this http://forum.xda-developers.com/showpost.php?p=69191801&postcount=1234

imFaa avatar Dec 19 '16 11:12 imFaa

I think that's for manual porting.

Pada tanggal 19 Des 2016 18.23, "Farooque" [email protected] menulis:

Or this http://forum.xda-developers.com/showpost.php?p=69191801&postcount=1234

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MiCode/patchrom/issues/119#issuecomment-267941764, or mute the thread https://github.com/notifications/unsubscribe-auth/AGPQhapyUlxXIh1w7GWJRPa4kjWReI7Yks5rJmk9gaJpZM4LQgrr .

rorre avatar Dec 19 '16 11:12 rorre

only see in boot.img and compare stuff

imFaa avatar Dec 19 '16 11:12 imFaa

Alright.

Pada tanggal 19 Des 2016 18.50, "Farooque" [email protected] menulis:

only see in boot.img and compare stuff

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MiCode/patchrom/issues/119#issuecomment-267946270, or mute the thread https://github.com/notifications/unsubscribe-auth/AGPQhd96Xl7v9N4npYKcPPTvCN21Xf_Wks5rJm99gaJpZM4LQgrr .

rorre avatar Dec 19 '16 11:12 rorre

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`

imFaa avatar Dec 19 '16 11:12 imFaa

Just copy ro.build.fingerprint line from your stock rom. You can't use other device fingerprint.

Pada tanggal 19 Des 2016 18.54, "Farooque" [email protected] menulis:

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`

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MiCode/patchrom/issues/119#issuecomment-267947023, or mute the thread https://github.com/notifications/unsubscribe-auth/AGPQhVzNnXc6ZvTFuWkKU-YOA-UZN8Ojks5rJnCMgaJpZM4LQgrr .

rorre avatar Dec 19 '16 11:12 rorre

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.

imFaa avatar Dec 19 '16 12:12 imFaa

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

shadow25 avatar Dec 20 '16 09:12 shadow25

I still didn't test. Since its use CM13 as base, so then i use CM13 too, even through there is some error in some script, i need to fix that. So, it finally builded and i still didn't test it, maybe about this weekend.

Pada tanggal 20 Des 2016 16.58, "shadow25" [email protected] menulis:

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

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MiCode/patchrom/issues/119#issuecomment-268202162, or mute the thread https://github.com/notifications/unsubscribe-auth/AGPQhYXKGSxtQBuB1ZmaKw6ZRZGkb31pks5rJ6aqgaJpZM4LQgrr .

rorre avatar Dec 20 '16 10:12 rorre

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 avatar Dec 20 '16 10:12 shadow25

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

shadow25 avatar Dec 20 '16 20:12 shadow25

Just post the logcat :)

Pada tanggal 21 Des 2016 3.46 AM, "shadow25" [email protected] menulis:

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

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MiCode/patchrom/issues/119#issuecomment-268354861, or mute the thread https://github.com/notifications/unsubscribe-auth/AGPQhVX2jcfcjrNFPadqKKV_SpGHRxkgks5rKD6GgaJpZM4LQgrr .

rorre avatar Dec 20 '16 22:12 rorre

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

VishwaKumaran avatar Dec 21 '16 07:12 VishwaKumaran

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

shadow25 avatar Dec 21 '16 08:12 shadow25

@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.

shadow25 avatar Dec 21 '16 08:12 shadow25

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

VishwaKumaran avatar Dec 21 '16 09:12 VishwaKumaran

Use dd command or use the image flash option on TWRP lol

Pada tanggal 21 Des 2016 16.06, "VishwaKumaran" [email protected] menulis:

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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/MiCode/patchrom/issues/119#issuecomment-268472045, or mute the thread https://github.com/notifications/unsubscribe-auth/AGPQhVSy8TpwRqnhVFjXEKPh0GujbWJqks5rKOv7gaJpZM4LQgrr .

rorre avatar Dec 21 '16 09:12 rorre

@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.

shadow25 avatar Dec 21 '16 09:12 shadow25

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

VishwaKumaran avatar Dec 21 '16 10:12 VishwaKumaran

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.

shadow25 avatar Dec 21 '16 10:12 shadow25

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

VishwaKumaran avatar Dec 21 '16 10:12 VishwaKumaran

@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.

huguetto avatar Dec 22 '16 08:12 huguetto

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

shadow25 avatar Dec 22 '16 09:12 shadow25

Ok, i just tried, same result, bootloop But i found some interesting info. Sometimes, the dalvik-cache stucks at wifi-services.jar Or patchrom-core.jar or Core-.jar Or Patchrom-core.jar and core-.jar

*** means i forgot the word.

Pada tanggal 22 Des 2016 16.51, "shadow25" [email protected] menulis:

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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/MiCode/patchrom/issues/119#issuecomment-268761652, or mute the thread https://github.com/notifications/unsubscribe-auth/AGPQheVYIDFVbos9JnnBvaGCcK-5znDbks5rKkgZgaJpZM4LQgrr .

rorre avatar Dec 22 '16 10:12 rorre

did you managed to boot?

imFaa avatar Dec 23 '16 16:12 imFaa

Yes, of course

shadow25 avatar Dec 23 '16 18:12 shadow25

@shadow25 your ROM booted up?

imFaa avatar Dec 23 '16 18:12 imFaa

Yes but go into bootloop

shadow25 avatar Dec 23 '16 18:12 shadow25

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

imFaa avatar Dec 23 '16 18:12 imFaa

Or just a Mi logo?

imFaa avatar Dec 23 '16 18:12 imFaa

Only Mi logo

shadow25 avatar Dec 23 '16 18:12 shadow25

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

imFaa avatar Dec 23 '16 18:12 imFaa

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

shadow25 avatar Dec 23 '16 18:12 shadow25

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?

imFaa avatar Dec 23 '16 18:12 imFaa

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 ?

VishwaKumaran avatar Dec 23 '16 18:12 VishwaKumaran

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

imFaa avatar Dec 23 '16 19:12 imFaa

@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

shadow25 avatar Dec 23 '16 19:12 shadow25

@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?

imFaa avatar Dec 23 '16 19:12 imFaa

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

VishwaKumaran avatar Dec 23 '16 19:12 VishwaKumaran

@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

shadow25 avatar Dec 23 '16 19:12 shadow25

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

VishwaKumaran avatar Dec 23 '16 20:12 VishwaKumaran

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

VishwaKumaran avatar Dec 23 '16 20:12 VishwaKumaran

@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.

imFaa avatar Dec 24 '16 05:12 imFaa

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

VishwaKumaran avatar Dec 24 '16 06:12 VishwaKumaran

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

imFaa avatar Dec 24 '16 10:12 imFaa

I had it too. Should i upload my boot.img? adb still wont detect my device D:

Pada tanggal 24 Des 2016 17.38, "Farooque" [email protected] menulis:

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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/MiCode/patchrom/issues/119#issuecomment-269079026, or mute the thread https://github.com/notifications/unsubscribe-auth/AGPQhfE1K6obJ29WQSlvtmDA_isksnByks5rLPYfgaJpZM4LQgrr .

rorre avatar Dec 24 '16 10:12 rorre

My boot.img https://drive.google.com/file/d/0B5rQF1eijfidMVk1d09kc2Q5RFE/view?usp=drivesdk

Pada tanggal 24 Des 2016 17.45, "RendyAK" [email protected] menulis:

I had it too. Should i upload my boot.img? adb still wont detect my device D:

Pada tanggal 24 Des 2016 17.38, "Farooque" [email protected] menulis:

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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/MiCode/patchrom/issues/119#issuecomment-269079026, or mute the thread https://github.com/notifications/unsubscribe-auth/AGPQhfE1K6obJ29WQSlvtmDA_isksnByks5rLPYfgaJpZM4LQgrr .

rorre avatar Dec 24 '16 10:12 rorre

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

muralivijay avatar Mar 25 '17 08:03 muralivijay

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

VishwaKumaran avatar Mar 25 '17 10:03 VishwaKumaran

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

huguetto avatar Mar 25 '17 11:03 huguetto

I already try so mucchh things, but I still cant manage it to boot.. And still.. adb cant detect the device ;-;

Pada tanggal 25 Mar 2017 18.02, "Hugomm" [email protected] menulis:

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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/MiCode/patchrom/issues/119#issuecomment-289204989, or mute the thread https://github.com/notifications/unsubscribe-auth/AGPQhQS5mbGLRXPS4PstTmNxYGhfHZf0ks5rpPRHgaJpZM4LQgrr .

rorre avatar Mar 25 '17 11:03 rorre

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

huguetto avatar Mar 25 '17 11:03 huguetto

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

VishwaKumaran avatar Mar 25 '17 19:03 VishwaKumaran

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 ....:/

muralivijay avatar Mar 28 '17 17:03 muralivijay