Xperia Boot Menu v1.0 - Sony Xperia P, U, Sola, Go

Xperia Boot Menu v1.0
Disclaimer:
- Me (munjeni) is not responsible for anything related to the our project, you using our project on your own risk! If you no want to risk than don't play with Boot Menu! You can play with Boot Menu but on your own risk!
Feature:
- multiboot based on kexec
- posibility for defining: menu title, path to the kernel, path to the ramdisk, kernel cmdline
- posibility for defining max 10 menus
- autoreboot to the first kernel if menu is not moved (stop timer on menu move)
- graphic timer
Instructions:
- create folder "bootmenu", add settings.ini to these folder, modify settings.ini for your needs
- flash bootmenu using fastboot command (fastboot flash boot recovery.img)
- since internal sdcard is only supported by now, you can define only kernel and ramdisk from internal sdcard path! Make sure you define right path and make sure create folders in bootmenu on your internal sdcard
- make sure settings.ini is in internal sdcard in folder bootmenu!!!
- kexec can boot only kexec patched kernels, so your kernel need to have kexec patch!!! Complete kexec patch you can find on my git!
Simple settings.ini (example):
[rom-1]
menutitle=recovery touch white
kernel=/sdcard/bootmenu/examplerom/zImage
ramdisk=/sdcard/bootmenu/examplerom/initrd.gz
cmdline=cachepolicy=writealloc noinitrd init=init board_id=1 logo.nologo root=/dev/ram0 rw rootwait console=null androidboot.console=null androidboot.hardware=st-ericsson [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] mpcore_wdt.mpcore_margin=359 end lpj=24019
# [rom-2]
# menutitle=recovery touch black
# kernel=/sdcard/bootmenu/zImage
# ramdisk=/sdcard/bootmenu/initrd.gz
# cmdline=cachepolicy=writealloc noinitrd init=init board_id=1 logo.nologo root=/dev/ram0 rw rootwait console=null androidboot.console=null androidboot.hardware=st-ericsson [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] mpcore_wdt.mpcore_margin=359 end lpj=24019
# [rom-3]
# menutitle=recovery touch black
# kernel=/sdcard/bootmenu/zImage
# ramdisk=/sdcard/bootmenu/initrd.gz
# cmdline=cachepolicy=writealloc noinitrd init=init board_id=1 logo.nologo root=/dev/ram0 rw rootwait console=null androidboot.console=null androidboot.hardware=st-ericsson [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] mpcore_wdt.mpcore_margin=359 end lpj=24019
# [rom-4]
# menutitle=recovery touch black
# kernel=/sdcard/bootmenu/zImage
# ramdisk=/sdcard/bootmenu/initrd.gz
# cmdline=cachepolicy=writealloc noinitrd init=init board_id=1 logo.nologo root=/dev/ram0 rw rootwait console=null androidboot.console=null androidboot.hardware=st-ericsson [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] mpcore_wdt.mpcore_margin=359 end lpj=24019
# [rom-5]
# menutitle=recovery touch black
# kernel=/sdcard/bootmenu/zImage
# ramdisk=/sdcard/bootmenu/initrd.gz
# cmdline=cachepolicy=writealloc noinitrd init=init board_id=1 logo.nologo root=/dev/ram0 rw rootwait console=null androidboot.console=null androidboot.hardware=st-ericsson [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] mpcore_wdt.mpcore_margin=359 end lpj=24019
# [rom-6]
# menutitle=recovery touch black
# kernel=/sdcard/bootmenu/zImage
# ramdisk=/sdcard/bootmenu/initrd.gz
# cmdline=cachepolicy=writealloc noinitrd init=init board_id=1 logo.nologo root=/dev/ram0 rw rootwait console=null androidboot.console=null androidboot.hardware=st-ericsson [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] mpcore_wdt.mpcore_margin=359 end lpj=24019
# [rom-7]
# menutitle=recovery touch black
# kernel=/sdcard/bootmenu/zImage
# ramdisk=/sdcard/bootmenu/initrd.gz
# cmdline=cachepolicy=writealloc noinitrd init=init board_id=1 logo.nologo root=/dev/ram0 rw rootwait console=null androidboot.console=null androidboot.hardware=st-ericsson [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] mpcore_wdt.mpcore_margin=359 end lpj=24019
# [rom-8]
# menutitle=recovery touch black
# kernel=/sdcard/bootmenu/zImage
# ramdisk=/sdcard/bootmenu/initrd.gz
# cmdline=cachepolicy=writealloc noinitrd init=init board_id=1 logo.nologo root=/dev/ram0 rw rootwait console=null androidboot.console=null androidboot.hardware=st-ericsson [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] mpcore_wdt.mpcore_margin=359 end lpj=24019
# [rom-9]
# menutitle=recovery touch black
# kernel=/sdcard/bootmenu/zImage
# ramdisk=/sdcard/bootmenu/initrd.gz
# cmdline=cachepolicy=writealloc noinitrd init=init board_id=1 logo.nologo root=/dev/ram0 rw rootwait console=null androidboot.console=null androidboot.hardware=st-ericsson [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] mpcore_wdt.mpcore_margin=359 end lpj=24019
# [rom-10]
# menutitle=recovery touch black
# kernel=/sdcard/bootmenu/zImage
# ramdisk=/sdcard/bootmenu/initrd.gz
# cmdline=cachepolicy=writealloc noinitrd init=init board_id=1 logo.nologo root=/dev/ram0 rw rootwait console=null androidboot.console=null androidboot.hardware=st-ericsson [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] mpcore_wdt.mpcore_margin=359 end lpj=24019
Click to expand...
Click to collapse
Download:
- http://d-h.st/UXm
Kernel source code:
- https://github.com/munjeni/android_kernel_xperiago/tree/jb-dev

You're simply the best :beer: :beer: :beer:
Inviato dal mio Xperia U usando Tapatalk 4

Not sure if kexec working on Xperia U, I will post kernel, kernel modules, boot menu and my new CWM Touch Recovery v6.0.3.6 ramdisk for test.
Need your help, need output of the command:
adb shell cat /proc/iomem
Xperia U have 1gb ram???
Xperia Go by now have:
00000000-05ffffff : System RAM
0005e000-008fa4c7 : Kernel text
008fc000-00f2e797 : Kernel data
06000000-06efffff : db8500-trace-area
08000000-09ffffff : System RAM
0e800000-1fdfffff : System RAM
1fe00000-1fefffff : kexec_hardboot
1ffe0000-1fffffff : ram_console
40010000-400107ff : lcpa
40010000-400107ff : dma40 I/O lcpa
Click to expand...
Click to collapse
So I am not sure about X-U

munjeni said:
Not sure if kexec working on Xperia U, I will post kernel, kernel modules, boot menu and recovery ramdisk for test.
Need your help, need output of the command:
adb shell cat /proc/iomem
Xperia U have 1gb ram???
Xperia Go by now have:
So I am not sure about X-U
Click to expand...
Click to collapse
Xperia u have 512mb ram
Sent from my Xperia U using xda app-developers app

munjeni said:
Not sure if kexec working on Xperia U, I will post kernel, kernel modules, boot menu and recovery ramdisk for test.
Need your help, need output of the command:
adb shell cat /proc/iomem
Xperia U have 1gb ram???
Xperia Go by now have:
So I am not sure about X-U
Click to expand...
Click to collapse
Here's the output..
And no XU has only 512 mb of ram

Boot menu download link ready, please let me know if booting!
First of all create bootmenu folder inside your internal sdcard, create settings.ini file in bootmenu folder:
Code:
[rom-1]
menutitle=recovery touch white
kernel=/sdcard/bootmenu/examplerom/zImage
ramdisk=/sdcard/bootmenu/examplerom/initrd.gz
cmdline=cachepolicy=writealloc noinitrd init=init board_id=1 logo.nologo root=/dev/ram0 rw rootwait console=null androidboot.console=null androidboot.hardware=st-ericsson [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] mpcore_wdt.mpcore_margin=359 end lpj=24019
Since cmdline settings is from Xperia Go please edit these line and add cmdline for Xperia U !!!
Than create "examplerom" folder in your bootmenu folder, put initrd.gz and zImage from attachment to the example rom folder, reboot to the fastboot and flash bootmenu:
fastboot flash boot recovery.img
Click to expand...
Click to collapse
Reboot and let me know if working!

AD9295 said:
Here's the output..
And no XU has only 512 mb of ram
Click to expand...
Click to collapse
Thanks, so kexec will working I am sure Enjoy guys!
For example if you want to boot your android rom, simple extract ramdisk from boot image, create new folder in bootmenu folder for example my_stock_rom, add [rom-2 settings lines for your new rom, modify path to "my_stock_rom", use zImage from cwm.rar, use modules from cwm.rar and put into your android /system/lib/modules folder... new menu will apear in boot menu... etc Note: autoreboot is automatically set to the [rom-1] (first menu) so if you want to automatically boot "my_stock_rom" simple move them to the top of the settings.ini ... Enjoy!!!

munjeni said:
Boot menu download link ready, please let me know if booting!
First of all create bootmenu folder inside your internal sdcard, create settings.ini file in bootmenu folder:
Code:
[rom-1]
menutitle=recovery touch white
kernel=/sdcard/bootmenu/examplerom/zImage
ramdisk=/sdcard/bootmenu/examplerom/initrd.gz
cmdline=cachepolicy=writealloc noinitrd init=init board_id=1 logo.nologo root=/dev/ram0 rw rootwait console=null androidboot.console=null androidboot.hardware=st-ericsson [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] mpcore_wdt.mpcore_margin=359 end lpj=24019
Since cmdline settings is from Xperia Go please edit these line and add cmdline for Xperia U !!!
Than create "examplerom" folder in your bootmenu folder, put initrd.gz and zImage from attachment to the example rom folder, reboot to the fastboot and flash bootmenu:
Reboot and let me know if working! If not working please give me output of the command "adb shell cat /proc/iomem"
Click to expand...
Click to collapse
I would like to help but I dont know hot add and modify settings.ini..
Edit: I learnt how to do that.. will post results when I get back from college.. Sorry but i have to attend today..

Another example:
Since I not sucesfully booted android from sdcard, we need to prepare ramdisk of the future sdcard rom boot, modify them to use partitions from sdcard instead of using partitions from emmc!!! Need help for them!!!
So example is:
kexec cwm which have modified partitions table (sdcard partitions) -> load them into bootmenu -> boot them -> since these cwm will load sdcard partitions we can install an rom.zip regulary to these partitions using these cwm (cwm will install android to these sdcard partition) -> rom.zip updater-script need allso modification because we need to edit for example all lines which contain for example /dev/block/mmcblk0p** and change for example to the /dev/block/loop**
Ramdisk cwm or rom need allso reparation -> /dev/block/mmcblk0p** need changes to the /dev/block/loop** since for sdcard boot we need to mount system,data,cache partitions to the /dev/loop devices.
ETC...BLABLA Thats all we need for multiboot!!!

AD9295 said:
I would like to help but I dont know hot add and modify settings.ini..
Edit: I learnt how to do that.. will post results when I get back from college.. Sorry but i have to attend today..
Click to expand...
Click to collapse
No problem mate, I am sure most experienced users will help and get them working, and post the results Good thing is we have boot menu and kexec working, so all other things will come soon, I am sure
Waiting your creations and modifications. Want to see message "sucesfully booted rom from sdcard" :laugh: First of all waiting confirmation about working Boot Menu v1.0 in Xperia U !

munjeni said:
No problem mate, I am sure most experienced users will help and get them working, and post the results Good thing is we have boot menu and kexec working, so all other things will come soon, I am sure
Waiting your creations and modifications. Want to see message "sucesfully booted rom from sdcard" :laugh: First of all waiting confirmation about working Boot Menu v1.0 in Xperia U !
Click to expand...
Click to collapse
How can I modify sdcard since its emmc,I dont understand.
How to create partitions on it for system,data,cache or this supports kernels only?

XperianPro said:
How can I modify sdcard since its emmc,I dont understand.
How to create partitions on it?
Click to expand...
Click to collapse
You no need to modify emmc! Simple create file based ext4 partition and mount them on boot time to the loop device For get these to work you need to modify ramdisk, fstab...etc of the rom

munjeni said:
Not sure if kexec working on Xperia U, I will post kernel, kernel modules, boot menu and my new CWM Touch Recovery v6.0.3.6 ramdisk for test.
Need your help, need output of the command:
adb shell cat /proc/iomem
Xperia U have 1gb ram???
Xperia Go by now have:
So I am not sure about X-U
Click to expand...
Click to collapse
i know this is too noob but does xperia go have 1 gb ram?isnt it 512m?

can i flash the attached recovery.img in an unlocked xperia u running ics??

bibhu059 said:
can i flash the attached recovery.img in an unlocked xperia u running ics??
Click to expand...
Click to collapse
No, only JB !

chessmanyaki said:
i know this is too noob but does xperia go have 1 gb ram?isnt it 512m?
Click to expand...
Click to collapse
have 512 !

Guys, found a bug in Boot Menu! For example shifting trought menu failed to select right thing, for examle it select an submenu but boot another rom ...I will fix them in next version! You ca duplicate menus and experiment by now

munjeni said:
Guys, found a bug in Boot Menu! For example shifting trought menu failed to select right thing, for examle it select an submenu but boot another rom ...I will fix them in next version! You ca duplicate menus and experiment by now
Click to expand...
Click to collapse
I've got to say I'm really impressed anytimes you release/post something, many thanks for your progress
I guess that, at first look, it is not working for locked bootloader, but it seems your recovery handles the boot menu and kexec thing : would it be possible to port your recovery to our locked bootloader "a la" atis' patch ? I guess we won't be able to straight boot your recovery because of its' kernel, but would it be portable to ICS kernel&codes to, lets say => load your recovery by loading ramdisk like atis', then kexec to an unsigned kernel ?
edit: partially answered myself: we need to enable kexec support therefore I guess "official kernels" don't =/

Sympnotic said:
I've got to say I'm really impressed anytimes you release/post something, many thanks for your progress
I guess that, at first look, it is not working for locked bootloader, but it seems your recovery handles the boot menu and kexec thing : would it be possible to port your recovery to our locked bootloader "a la" atis' patch ? I guess we won't be able to straight boot your recovery because of its' kernel, but would it be portable to ICS kernel&codes to, lets say => load your recovery by loading ramdisk like atis', then kexec to an unsigned kernel ?
edit: partially answered myself: we need to enable kexec support therefore I guess "official kernels" don't =/
Click to expand...
Click to collapse
Stock kernel doesn't support it. He has said it earlier himself

Yup, I read too fast, was excited about this post and I've used to read "kexec could be our way out of locked bootloader" (@Xperianpro, some of his posts)
Anyone knows if an official kernel had kexec support in the past ? Even if it's GB *not really hoping*

Related

[Q] ubuntu using tux_mind's kernel: What can I do?

I have read several threads on installing ubuntu (or gentoo) on the transformer 201, but I am stick to this for...well days:
ant
/dev/mmcblk0p8:/boot/zImage
+newroot=/dev/mmcblk1p1:/:/sbin/init,single rootwait console=tty1
gives (root_chooser.log)
unable to find "newroot=" in "tegra_wdt.heartbeat=30 tegra_wdt.heartbeat=30 tegraid=30.1.3.0.0 [email protected] commchip_id=0 androidboot.serialno=0xf androidboot.commchip_id=0 video=tegrafb no_console_suspend=1 console=ttyS0,115200n8 debugj_uartport=lsport,0 usbcore.old_scheme_first=1 [email protected] [email protected] core_edp_mv=0 audio_codec=wm8903 board_info=245:0:2c:be:28 tegraboot=sdmmc gpt gpt_sector=62078975 android.kerneltype=normal androidboot.productid=0x00 androidboot.carrier=wifi-only root=/dev/mmcblk1p1:/:/sbin/init,single console=tty1"
----
old ubuntu internal
/dev/mmcblk0p8:/boot/zImage:/boot/initrt.gz
+console=tty1 newroot=/dev/mmcblk0p8:/ubuntu.img/:/sbin/init
gives (root_chooser-log)
try_(loop/initrd)_mount "/newroot/ubuntu.img/" on /newroot/ - Not a directory ... which is really strange since some people reported this works and via busybox I can chroot into the image.
these are the 2 .kernel-files I tried, and the log...I experience kernel PANICs ... the sys suddenly boots into android.
And: must the .root -file really exist in /data/ ? what content? or is this just v2?
Any help very welcome!
d.

Master for help

cat cmdline with my mobile phone
Display
Console=ram loglevel=4 sec_debug.level=0 sec_watchdog.sec_pet=5 androidboot.debug_level=0x4f4c [email protected] s3cfb.bootloaderfb=0x67000000 lcdtype=4358215 consoleblank=0 lpcharge=0 lpj=3977216 vmalloc=384m oops=panic pmic_info=53 cordon= 0653ef15a4c428c90f5475ff4ea5b4f0 connie=SCH-I959_CTC_CHN_327f22b16468ca830ca01968a36fb3ad androidboot.emmc_checksum=3 androidboot.odin_download=1 androidboot.bootloader=I959KEUBMG2 androidboot.serialno=4d006707773d4071 snd_soc_core.pmdown_time=1000
BoardConfig.mk
The kernel configuration
BOARD_KERNEL_BASE: = 0x10000000
BOARD_KERNEL_PAGESIZE: = 2048
BOARD_KERNEL_CMDLINE: = console=ttySAC2115200n8 vmalloc=512M androidboot.console=ttySAC2
IS boardConfig.mk not configured incorrectly? so core do not start up.
Can samsung bootloader check the boot.img CSC?

Master for help

cat cmdline with my mobile phone
Display
Console=ram loglevel=4 sec_debug.level=0 sec_watchdog.sec_pet=5 androidboot.debug_level=0x4f4c [email protected] s3cfb.bootloaderfb=0x67000000 lcdtype=4358215 consoleblank=0 lpcharge=0 lpj=3977216 vmalloc=384m oops=panic pmic_info=53 cordon= 0653ef15a4c428c90f5475ff4ea5b4f0 connie=SCH-I959_CTC_CHN_327f22b16468ca830ca01968a36fb3ad androidboot.emmc_checksum=3 androidboot.odin_download=1 androidboot.bootloader=I959KEUBMG2 androidboot.serialno=4d006707773d4071 snd_soc_core.pmdown_time=1000
BoardConfig.mk
The kernel configuration
BOARD_KERNEL_BASE: = 0x10000000
BOARD_KERNEL_PAGESIZE: = 2048
BOARD_KERNEL_CMDLINE: = console=ttySAC2115200n8 vmalloc=512M androidboot.console=ttySAC2
IS boardConfig.mk not configured incorrectly? so core do not start up.
Can samsung bootloader check the boot.img CSC?

Packing boot image for Desire 610 A3UL

I am following this tutorial on my desire 610: http://http://whiteboard.ping.se/Android/Debian
All has gone well so far, the system works in chroot, etc etc etc, thats not the problem. My problem is that i cant seem to pack a boot image that works for the phone. I know the problem is with my boot image, because if the init script had been initalised, I had a line at the start which would start a log file, and the system would bootloop. Instead it takes me to the fastboot menu when i power on.
I have used the tool to unpack the boot image, found at http://whiteboard.ping.se/Android/Unmkbootimg , and its output was this:
Code:
unmkbootimg version 1.2 - Mikael Q Kuisma <[email protected]>
Kernel size 6004624
Kernel address 0x8000
Ramdisk size 1017204
Ramdisk address 0x2008000
Secondary size 0
Secondary address 0xf00000
Kernel tags address 0x1e00000
Flash page size 2048
Board name is ""
Command line "console=ttyHSL0,115200,n8 androidboot.hardware=qcom user_debug=31 ehci-hcd.park=3"
*** WARNING ****
This image is built using NON-standard mkbootimg!
OFF_KERNEL_ADDR is 0xFE208100
OFF_RAMDISK_ADDR is 0x00208100
OFF_SECOND_ADDR is 0xFF100100
Please modify mkbootimg.c using the above values to build your image.
****************
Extracting kernel to file zImage ...
Extracting root filesystem to file initramfs.cpio.gz ...
All done.
---------------
To recompile this image, use:
mkbootimg --kernel zImage --ramdisk initramfs.cpio.gz --base 0x1dfff00 --cmdline 'console=ttyHSL0,115200,n8 androidboot.hardware=qcom user_debug=31 ehci-hcd.park=3' -o new_boot.img
---------------
I have tried doing as it says and compiling mkbootimg with those settings, however it still does not work. Could anyone possibly see what im doing wrong? And if not, does anyone have a copy of mkbootimg that works for the Desire 610?
Thanks in advance
falseascension said:
I am following this tutorial on my desire 610: http://http://whiteboard.ping.se/Android/Debian
All has gone well so far, the system works in chroot, etc etc etc, thats not the problem. My problem is that i cant seem to pack a boot image that works for the phone. I know the problem is with my boot image, because if the init script had been initalised, I had a line at the start which would start a log file, and the system would bootloop. Instead it takes me to the fastboot menu when i power on.
I have used the tool to unpack the boot image, found at http://whiteboard.ping.se/Android/Unmkbootimg , and its output was this:
Code:
unmkbootimg version 1.2 - Mikael Q Kuisma <[email protected]>
Kernel size 6004624
Kernel address 0x8000
Ramdisk size 1017204
Ramdisk address 0x2008000
Secondary size 0
Secondary address 0xf00000
Kernel tags address 0x1e00000
Flash page size 2048
Board name is ""
Command line "console=ttyHSL0,115200,n8 androidboot.hardware=qcom user_debug=31 ehci-hcd.park=3"
*** WARNING ****
This image is built using NON-standard mkbootimg!
OFF_KERNEL_ADDR is 0xFE208100
OFF_RAMDISK_ADDR is 0x00208100
OFF_SECOND_ADDR is 0xFF100100
Please modify mkbootimg.c using the above values to build your image.
****************
Extracting kernel to file zImage ...
Extracting root filesystem to file initramfs.cpio.gz ...
All done.
---------------
To recompile this image, use:
mkbootimg --kernel zImage --ramdisk initramfs.cpio.gz --base 0x1dfff00 --cmdline 'console=ttyHSL0,115200,n8 androidboot.hardware=qcom user_debug=31 ehci-hcd.park=3' -o new_boot.img
---------------
I have tried doing as it says and compiling mkbootimg with those settings, however it still does not work. Could anyone possibly see what im doing wrong? And if not, does anyone have a copy of mkbootimg that works for the Desire 610?
Thanks in advance
Click to expand...
Click to collapse
I just use Blobtools and linux's standard abootimg. I'll find some links and do a quick Howto when I get home tonight.
MiniBlu
MiniBlu said:
I just use Blobtools and linux's standard abootimg. I'll find some links and do a quick Howto when I get home tonight.
MiniBlu
Click to expand...
Click to collapse
Cheers! looking forward to getting this thing actually working
Aha! Using abootimg made it work. Wish i knew about that earlier...
There's still a few errors though, need to fix that. Thanks for your help, you literally saved probably hours and hours more work if I hadnt known about this. Much appreciated

boot.img ramdisk gzip compression issue

Hi. Im having a problem.
Im trying to modify my stock boot.img. Im able to unpack it, and gunzip the ramdisk. But Im unable to produce 1:1 output when I gzip it. In other words, if I decompress the ramdisk, then recompress it without ANY modifications to the ramdisk contents, the new gzip is way different. The goal is to be able tear down stock boot.img, then rebuild it and the resulting boot.img be exactly the same as stock.
Im trying to do this so to ensure my tools are perfect. That way I can disable SEandroid/Selinux and enable adb at boot. The resulting boot.img will not work in my case, failing to boot into Android.
Im on Samsung Galaxy J3 SM-J320R4. Trying to create a new root method for this device. Thanks guys.
LeviathaninWaves said:
Hi. Im having a problem.
Im trying to modify my stock boot.img. Im able to unpack it, and gunzip the ramdisk. But Im unable to produce 1:1 output when I gzip it. In other words, if I decompress the ramdisk, then recompress it without ANY modifications to the ramdisk contents, the new gzip is way different. The goal is to be able tear down stock boot.img, then rebuild it and the resulting boot.img be exactly the same as stock.
Im trying to do this so to ensure my tools are perfect. That way I can disable SEandroid/Selinux and enable adb at boot. The resulting boot.img will not work in my case, failing to boot into Android.
Im on Samsung Galaxy J3 SM-J320R4. Trying to create a new root method for this device. Thanks guys.
Click to expand...
Click to collapse
The size doesnt matter
What ve u changed in boot image xactly
Romeotamizh said:
The size doesnt matter
What ve u changed in boot image xactly
Click to expand...
Click to collapse
I fixed my original issue by using minigzip and mkbootfs. The compression output is correct. I can make changes to my boot.img, flash it and boot to Android. But I cant seem to disable SElinux nor enable adb at boot. Below is my default.prop settings, after modification.
#
# ADDITIONAL_DEFAULT_PROPERTIES
#
rild.libpath=/system/lib/libsec-ril.so
persist.cne.feature=0
persist.radio.lte_vrte_ltd=1
persist.radio.apm_sim_not_pwdn=1
persist.radio.add_power_save=1
persist.data.netmgrd.qos.enable=false
persist.radio.snapshot_enabled=1
persist.radio.snapshot_timer=22
persist.eons.enabled=false
telephony.lteOnCdmaDevice=1
persist.security.ams.enforcing=0
ro.secure=0
ro.allow.mock.location=1
ro.debuggable=1
ro.adb.secure=0
ro.build.selinux=0
ro.zygote=zygote32
dalvik.vm.image-dex2oat-Xms=64m
dalvik.vm.image-dex2oat-Xmx=64m
dalvik.vm.dex2oat-Xms=64m
dalvik.vm.dex2oat-Xmx=512m
ro.dalvik.vm.native.bridge=0
debug.atrace.tags.enableflags=0
camera2.portability.force_api=1
persist.sys.usb.config=mtp,adb
#
# BOOTIMAGE_BUILD_PROPERTIES
#
ro.bootimage.build.date=Mon May 2 14:20:19 KST 2016
ro.bootimage.build.date.utc=1462166419
ro.bootimage.build.fingerprint=samsung/j3lteusc/j3lteusc:6.0.1/MMB29M/J320R4TYU1APE1:user/test-keys
I also found 2 lines in init.rc
setprop selinux.reload_policy
I set them both to 0
Added into my cmdline when rebuilding the boot.img
enforcing=0
androidboot.selinux=permissive
Im able to boot but SEandroid is still enforcing. Adb at boot still not working. Am I missing something? Do I HAVE to recompile the kernel?
LeviathaninWaves said:
I fixed my original issue by using minigzip and mkbootfs. The compression output is correct. I can make changes to my boot.img, flash it and boot to Android. But I cant seem to disable SElinux nor enable adb at boot. Below is my default.prop settings, after modification.
#
# ADDITIONAL_DEFAULT_PROPERTIES
#
rild.libpath=/system/lib/libsec-ril.so
persist.cne.feature=0
persist.radio.lte_vrte_ltd=1
persist.radio.apm_sim_not_pwdn=1
persist.radio.add_power_save=1
persist.data.netmgrd.qos.enable=false
persist.radio.snapshot_enabled=1
persist.radio.snapshot_timer=22
persist.eons.enabled=false
telephony.lteOnCdmaDevice=1
persist.security.ams.enforcing=0
ro.secure=0
ro.allow.mock.location=1
ro.debuggable=1
ro.adb.secure=0
ro.build.selinux=0
ro.zygote=zygote32
dalvik.vm.image-dex2oat-Xms=64m
dalvik.vm.image-dex2oat-Xmx=64m
dalvik.vm.dex2oat-Xms=64m
dalvik.vm.dex2oat-Xmx=512m
ro.dalvik.vm.native.bridge=0
debug.atrace.tags.enableflags=0
camera2.portability.force_api=1
persist.sys.usb.config=mtp,adb
#
# BOOTIMAGE_BUILD_PROPERTIES
#
ro.bootimage.build.date=Mon May 2 14:20:19 KST 2016
ro.bootimage.build.date.utc=1462166419
ro.bootimage.build.fingerprint=samsung/j3lteusc/j3lteusc:6.0.1/MMB29M/J320R4TYU1APE1:user/test-keys
I also found 2 lines in init.rc
setprop selinux.reload_policy
I set them both to 0
Added into my cmdline when rebuilding the boot.img
enforcing=0
androidboot.selinux=permissive
Im able to boot but SEandroid is still enforcing. Adb at boot still not working. Am I missing something? Do I HAVE to recompile the kernel?
Click to expand...
Click to collapse
Its nothing to do with kernel
Romeotamizh said:
Its nothing to do with kernel
Click to expand...
Click to collapse
Mind elaborating on that? I'm stuck over here.
LeviathaninWaves said:
Mind elaborating on that? I'm stuck over here.
Click to expand...
Click to collapse
The kernel doesnt contain any information on adb
Or selinux
Romeotamizh said:
The kernel doesnt contain any information on adb
Or selinux
Click to expand...
Click to collapse
Then why am I seeing so much SElinux stuff in the kernel source code?
Did you donde any Solution.?
Did you find any Solution.?

Categories

Resources