Skip to content
This repository has been archived by the owner on Sep 11, 2023. It is now read-only.

Add support for combined boot/recovery partitions #174

Merged
merged 12 commits into from
Sep 5, 2016

Conversation

chenxiaolong
Copy link
Owner

No description provided.

@Caio99BR
Copy link
Contributor

Caio99BR commented Sep 4, 2016

https://gist.github.com/Caio99BR/84fce44b91c4e9951efb82e3d1493651

In ramdisk update it do "Creating Android boot image" 2 times
It now change default.prop and other ramdisk things, but not patch the fucking init.sh :(

@Caio99BR
Copy link
Contributor

Caio99BR commented Sep 5, 2016

Also it break my Sony Home Screen

@chenxiaolong
Copy link
Owner Author

chenxiaolong commented Sep 5, 2016

It's good that init.sh is not being patched :) It's now patching /init inside of /sbin/ramdisk.cpio. So when init.sh extracts that file, /init is created properly.

EDIT: If you extract /sbin/ramdisk.cpio:

  • /init should be a symlink to /mbtool
  • /init.orig should exist

@Caio99BR
Copy link
Contributor

Caio99BR commented Sep 5, 2016

It's good that init.sh is not being patched :) It's now patching /init inside of /sbin/ramdisk.cpio. So when init.sh extracts that file, /init is created properly.

It look a lot more good, but my home screen is broken and ... i cant start DualBootPatcher app :/

@chenxiaolong
Copy link
Owner Author

chenxiaolong commented Sep 5, 2016

It look a lot more good, but my home screen is broken and ... i cant start DualBootPatcher app :/

Crap, that's bad... Does logcat still work?

EDIT: If adb still works, can you check if installd is running (ps | grep installd) and also post the /sdcard/MultiBoot/appsync.log file? I wonder if the app sharing stuff is broken.

@Caio99BR
Copy link
Contributor

Caio99BR commented Sep 5, 2016

Yup, but the shit ROM of Sony is spamming it

Also in "Apps" > "Downloaded" show "No apps"

@Caio99BR
Copy link
Contributor

Caio99BR commented Sep 5, 2016

@chenxiaolong
Copy link
Owner Author

Yup, but the shit ROM of Sony is spamming it

Can I take a look at the full logcat (even if it is shit :P)?

@Caio99BR
Copy link
Contributor

Caio99BR commented Sep 5, 2016

caio@c9:~/Downloads$ adb reboot; adb wait-for-device; adb logcat | tee log.txt
https://gist.github.com/Caio99BR/0c23573439bed6e424e197f9a07509a8

After adb connection close/open
caio@c9:~/Downloads$ adb logcat | tee log.txt
https://gist.github.com/Caio99BR/bb523af5bc6c332b2fdbff54f7ef3435

@chenxiaolong
Copy link
Owner Author

Looks like an SELinux issue:

E/PackageManager( 1062): Unable to copy native libraries
E/PackageManager( 1062): java.io.IOException: Cannot set SELinux context for /data/app-lib/asd.vector.sensor-1
E/PackageManager( 1062):    at com.android.server.pm.PackageManagerService.copyNativeLibrariesForInternalApp(PackageManagerService.java:5496)
E/PackageManager( 1062):    at com.android.server.pm.PackageManagerService.scanPackageLI(PackageManagerService.java:4945)
E/PackageManager( 1062):    at com.android.server.pm.PackageManagerService.scanPackageLI(PackageManagerService.java:4049)
E/PackageManager( 1062):    at com.android.server.pm.PackageManagerService.scanDirLI(PackageManagerService.java:3766)
E/PackageManager( 1062):    at com.android.server.pm.PackageManagerService.<init>(PackageManagerService.java:1539)
E/PackageManager( 1062):    at com.android.server.pm.PackageManagerService.main(PackageManagerService.java:1108)
E/PackageManager( 1062):    at com.android.server.ServerThread.initAndLoop(SystemServer.java:281)
E/PackageManager( 1062):    at com.android.server.SystemServer.main(SystemServer.java:1289)
E/PackageManager( 1062):    at java.lang.reflect.Method.invokeNative(Native Method)
E/PackageManager( 1062):    at java.lang.reflect.Method.invoke(Method.java:515)
E/PackageManager( 1062):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:814)
E/PackageManager( 1062):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:630)
E/PackageManager( 1062):    at dalvik.system.NativeStart.main(Native Method)

The app sharing code can definitely cause something like this. If you flash the original /sdcard/MultiBoot/[ROM ID]/boot.img.before-ramdisk-update.img, does everything work again? If yes, I'll make a build with app sharing removed for you to test.

@Caio99BR
Copy link
Contributor

Caio99BR commented Sep 5, 2016

The app sharing code can definitely cause something like this. If you flash the original /sdcard/MultiBoot/[ROM ID]/boot.img.before-ramdisk-update.img, does everything work again? If yes, I'll make a build with app sharing removed for you to test.

Yes, all is working again now

@chenxiaolong
Copy link
Owner Author

@Caio99BR OK, that's good. Can you try this build? https://jenkins.noobdev.io/job/DualBootPatcher_Build/label_exp=dualbootpatcher-builder%20&&%20fast,target=android-all-gcc/202/

It's exactly the same as this PR, except it also removes app sharing support.

@Caio99BR
Copy link
Contributor

Caio99BR commented Sep 5, 2016

I will check it on CM11

@chenxiaolong
Copy link
Owner Author

Ok, I just saw this from the logs before:

E/SELinux ( 1062): file_context_open: Error getting file context handle (Permission denied)

So it cannot read /file_contexts. Can you post the output of ls -lZ /file_contexts?

@Caio99BR
Copy link
Contributor

Caio99BR commented Sep 5, 2016

Before patching:

root@D2114:/ # ls -lZ /file_contexts
-rw-r----- system system u:object_r:rootfs:s0 file_contexts

After patching (just switched to patched img):

root@D2114:/ # ls -lZ /file_contexts
-rw-r----- root root u:object_r:rootfs:s0 file_contexts

@Caio99BR
Copy link
Contributor

Caio99BR commented Sep 5, 2016

It is really simple and bad XD

@Caio99BR
Copy link
Contributor

Caio99BR commented Sep 5, 2016

@chenxiaolong
Copy link
Owner Author

https://www.diffchecker.com/xMw8niWt

Nice find! That would definitely cause problems. And it's an easy fix too.

This fixes incorrect file ownership after a file has been patched during
the boot process.
@Caio99BR
Copy link
Contributor

Caio99BR commented Sep 5, 2016

Now it's fine!
Can you add BootUI, please :P
graphics_backends is fbdev, flag used is TW_GRAPHICS_FORCE_USE_LINELENGTH, pixel_format is RGBX_8888, cpu_temp_path i not defined on TWRP but it is showed, theme is portrait_hdpi
And i used this patch: https://gerrit.omnirom.org/#/c/18815/
EDIT1: https://github.com/TeamVee-SS/android_device_sony_falconss device tree link

If no, thanks a lot! :D

NOTE: Also check bootui on primary
NOTE2: I have look at that EDIT in begin now :P, i have extracted it before you say

@chenxiaolong
Copy link
Owner Author

Now it's fine!

Awesome, great :P

Can you add BootUI, please :P
graphics_backends is fbdev, flag used is TW_GRAPHICS_FORCE_USE_LINELENGTH, pixel_format is RGBX_8888, cpu_temp_path i not defined on TWRP but it is showed, theme is portrait_hdpi

Sure, which device should I add it for? honami?

And i used this patch: https://gerrit.omnirom.org/#/c/18815/

Not necessary because overlay graphics will not be used unless it is explicitly listed in the device yml file.

@Caio99BR
Copy link
Contributor

Caio99BR commented Sep 5, 2016

Sure, which device should I add it for? honami?

Add for... ALL 3 :P (armani, tianchi, falconss)
I think the fbdev is like default and work on all
If not my device is falconss :)

@chenxiaolong
Copy link
Owner Author

I don't know what device armani is, but I added it for falconss, honami, and tianchi :)

@Caio99BR
Copy link
Contributor

Caio99BR commented Sep 5, 2016

I don't know what device armani is, but I added it for falconss, honami, and tianchi :)

XD, ok armani not exist (maybe yet :P)

Now you can close:
#8

OOOPS, we forget this device:
#74

And also by last, and less important (why not add in Milestone 9?):
#93

I will test it now 👍

@chenxiaolong
Copy link
Owner Author

Now you can close:
#8

Done!

OOOPS, we forget this device:
#74

And also by last, and less important (why not add in Milestone 9?):
#93

I'll add both of these tomorrow. Should be easy enough :)

@chenxiaolong chenxiaolong merged commit 4793b50 into 9.0.0-staging Sep 5, 2016
@chenxiaolong chenxiaolong deleted the combined_recovery branch September 5, 2016 16:41
@Caio99BR
Copy link
Contributor

Caio99BR commented Sep 5, 2016

Only reporting, i have tested it on Xperia T2 Ultra and app just crash, without reason, when i go to ROMs it just crash, no log, and no logcat until end of week. Idk if is because recovery is missing (Pure Sony Stock ROM 5.1), but is only it.
I will open a issue when i get logcat and try some things 👍

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

Successfully merging this pull request may close these issues.

3 participants