chenxiaolong / DualBootPatcher

Patches Android ROMs for dual boot support
https://dbp.noobdev.io
Other
527 stars 466 forks source link

Samsung Galaxy S7 Error 1 #1354

Open Jack-Rickwood opened 5 years ago

Jack-Rickwood commented 5 years ago

@chenxiaolong Originally I Posted This Issue: here, but was unable to resolve my issue. A while later, i am gonna take another crack. This time im using unnoficial lineage 16 for s7 as my primary rom, and hydra rom as my secondary one in data slot 1. This time it wont even flash the patched zip (though it flashes fine without). Itjust gives me error 1. MultiBoot.log. It even fails to update the ramdisk when i try to do that in app. Any help at all you could give would be much appreciated.

chenxiaolong commented 5 years ago

I believe the error (at least in recovery mode) is related to how TWRP and DBP handle legacy properties. I will look into this.

It even fails to update the ramdisk when i try to do that in app.

Can you upload MultiBoot.log after attempting to do this?

chenxiaolong commented 5 years ago

The flashing issues in TWRP should be fixed by #1355 (version: 9.3.0.r890.g93a1000c).

Jack-Rickwood commented 5 years ago

Thanks so much! I reset my device and now its setting the ramdisk fine (idk what that was about). So your saying all I have to do is update my twrp and it should flash fine?

Jack-Rickwood commented 5 years ago

Oh, you mean update dbp, okay I'll give it a go. Thx again

Jack-Rickwood commented 5 years ago

@chenxiaolong Ok, for some reason after i finished patching my rom for data-slot-1 on the new version of dualbootpatcher, the ramdisk stopped being able to be updated again, heres the ramdisk-update log. I tried flashing anyway, and this time it got a little further, no error 1, but instead i got an error 2. Heres the log for that.

Jack-Rickwood commented 5 years ago

actually no its an error 1 and its still a twrp one, not a dualbootpatcher one

chenxiaolong commented 5 years ago

Can you try the test APK from here? https://jenkins.noobdev.io/job/DualBootPatcher_Build/1105/ (If it still fails, please post the new logs)

Looks like the issue is that the herolte TWRP is based on Android 6.0 and you were trying to flash an Android 8.0+ ROM. DBP wasn't handling this scenario properly.

Jack-Rickwood commented 5 years ago

Sure thing, I won't be able to test it for about an hour though, because I deleted the ROM to save space, I have a backup at home, so I can test it when I get there. Thanks again.

Jack-Rickwood commented 5 years ago

Ok, the rom im trying to flash to data slot 1 isnt actually oreo, but i have tried anyway. I updated the app to the version you told me to, and the ramdisk still wont update (log). I decided to patch and flash it anyway. This time it worked! The aroma installer opened fine and it finished installation, giving only one error: 'E:recv error on uevent'. The rom now boots fine! Thx for everything! Just in case you want it, heres the latest log. The only problem is, the only reason i wanted to dualboot is for nethunter, and so i patched the kali nethunter kernel and tried to flash it, but it didnt work, there was another twrp error 1.

chenxiaolong commented 5 years ago

I updated the app to the version you told me to, and the ramdisk still wont update (log)

Could you try doing the ramdisk update again and uploading /sdcard/MultiBoot.log? ramdisk-update.log doesn't include all the info, unfortunately.

(The ramdisk update is implemented by flashing a patched empty zip, which is why the logs are there.)

Jack-Rickwood commented 5 years ago

@chenxiaolong Sorry it took so long for me to respond! The ramdisk update seems to have started working again, i dont know why, i havent really changed anything that i can think of. Kali nethunter still wont flash for some reason though, and this time its not a twrp error i dont think. Heres the [log (https://github.com/chenxiaolong/DualBootPatcher/files/2826821/KaliNethunterLog.log) for that. It just says unable to find boot block location! All i did was patch the kernel and flash. Is that the way your supposed to install custom kernels? It says you are supposed to format the data before you flash it. Would that be the problem? If so, how would i format the data for my second rom, without doing so for the first? I tried just normally formatting my data anyway, and it didnt seem to work properly.

Also, if i do a twrp backup, will it backup both roms? After i restored my backup it stopped being able to switch back to my primary rom because it couldnt find the boot image.

chenxiaolong commented 5 years ago

Hmm, could you post a link to the kernel? I'm not sure which path it's not able to find.

All i did was patch the kernel and flash. Is that the way your supposed to install custom kernels?

Yep!

Would that be the problem? If so, how would i format the data for my second rom, without doing so for the first?

You can wipe the data for a ROM, by deleting /data/multiboot/<ROM ID>/data in TWRP.

Also, if i do a twrp backup, will it backup both roms? After i restored my backup it stopped being able to switch back to my primary rom because it couldnt find the boot image.

You'll also need to make sure /sdcard/MultiBoot is backed up because the boot images are stored there. TWRP doesn't include /sdcard in backups by default.

Jack-Rickwood commented 5 years ago

someone actually just compiled the kernel for oreo, so i dont need it so much anymore, but thx so much for your help, and for answering my questions! In case your interested, this is the one: https://www.google.com/amp/s/forum.xda-developers.com/galaxy-s7/development/kernel-kali-nethunter-galaxy-s7-t3475407/amp/. Thx again!