[Q] possible to use/format mmcblk0p11 fotakernel partition ? - Xperia SP Q&A, Help & Troubleshooting

Hi,
I'm using a CM11 LBL ROM with Williams kernel. The rom uses the wipedata hack to enter recovery and then extract files on /temp and /
I wonder if I can use the fota partition to put the files already extracted in it to win some time at reboot. I will then modify the scripts to use this partition.
I tried some commands to see what's the size of mmcblk0p11 without success.
So: someone knows this partition size ? (I need about 20MB) Can I format it in ext4 without messing something ?
Thanks.

sambastrakan said:
Hi,
I'm using a CM11 LBL ROM with Williams kernel. The rom uses the wipedata hack to enter recovery and then extract files on /temp and /
I wonder if I can use the fota partition to put the files already extracted in it to win some time at reboot. I will then modify the scripts to use this partition.
I tried some commands to see what's the size of mmcblk0p11 without success.
So: someone knows this partition size ? (I need about 20MB) Can I format it in ext4 without messing something ?
Thanks.
Click to expand...
Click to collapse
I don't think that this gets you much speed. It takes not a single second to move 20mib.
The Rashr recoveries are saved in the fota partition. So it should be possible to use fota for your own stuff.
Have a look how big a rashr recovery is. That's the amount of space you have at least.
Or look how big the fota partition in a stock ftf is.
But I don't think it's worth the time.
Gesendet von meinem
Sony Xperia SP - Cyanogenmod 12.1

Kaffeetrinker said:
I don't think that this gets you much speed. It takes not a single second to move 20mib.
The Rashr recoveries are saved in the fota partition. So it should be possible to use fota for your own stuff.
Have a look how big a rashr recovery is. That's the amount of space you have at least.
Or look how big the fota partition in a stock ftf is.
But I don't think it's worth the time.
Gesendet von meinem
Sony Xperia SP - Cyanogenmod 12.1
Click to expand...
Click to collapse
Thank you for your answer.
recovery img are about 10MB and it seems the partition is about 16MB.
The way recoveries are implemented on my rom it seems to take about 3secs to extract the files and launch the script.
Well, it's more for fun than to win time.
The more important is to know if I can format it without any bad surprise ... In theory there is no reason but ...

I am pretty sure you can format it.
Rashr does it too...
Maybe you should do reasearch how Rashr works.
And google for stuff like "Fota messed up bootloop bricked". That way you can see what the worst thing is that can happen.
And look for partition table problems just in case...
Gesendet von meinem
Sony Xperia SP - Cyanogenmod 12.1

Related

How to specify custom partition layouts?

I just saw an interesting thread in the development section that explains an alternative to the Death SPL. The method there lets you flash ANY rom on any SPL, but I dont really understand how it works.
The thread can be found here: http://forum.xda-developers.com/showthread.php?t=704560
So basically, you shrink the cache partition to allow for more room for the actual ROM(which partition does that go in?)?
To do this do we edit the boot.img in the ROM update.zip? What else do we do?
Could someone explain this in a way a 9th grader could understand?
kingkurry said:
Could someone explain this in a way a 9th grader could understand?
Click to expand...
Click to collapse
Take file by firerat, flash file. omgroflpartitons.
If you don't understand the instructions as they are, wait for it to be perfected before you try anything. This will probably end up being integrated into releases that need it, so you don't need to worry about the specifics at the moment.
Will that patch file work for all ROMs. He said its only been tested with CyanogenMod 5. And I want to understand what im doing, not just do it without thinking about it...
Also, does the recovery patcher decrease the size of the partition that holds the recovery image?
Does it permanently change the size of the recovery partition?
When you flash a ROM, what partition is it being flashed too? Is this the one being increased in size?
What does the boot.img in an update.zip package hold, and is that copied to the boot partition?
Sorry but my curiosity is killing me
OK well to break it down we have 6 partitions on the internal memory:
Misc - Here be dragons
Recovery - Contains recovery system (+seperate recovery kernel) - recovery.img lives here
Boot - Contains kernel & important initialization stuff - boot.img lives here
-------------
System - Contains the whole android system (the "ROM", if you like).. everything else from an update.zip apart from the boot.img
Cache - Used by system and recovery for temporary storage
Userdata - Contains all personal data, downloaded apps, settings etc.
The first three partitions must be left at the default size so don't worry about them.
What this patch does is pass a command to the kernel which remaps the 3 large partitions at boot time. Since we're flashing system images from recovery, we also need to pass the same command to the recovery kernel before attempting to flash the main system, or we'd be writing to one place then telling the kernel to look for it in another.. bad idea.
This method allows any partition setup you like, but the most useful at the moment (and this is the way firerat has set up his scripts to suit cm5) is to make the /system partition just the right size for the "ROM" with a bit of breathing space, make the /cache partition a minimal size for the recovery system to use, then have /userdata fill the remaining space so we can load it up with apps. Since we've reduced cache to a minimal size, it's redirected at boot time to a place on the sdcard instead.. this give us maximum space to divide between /system and /data with no wastage.
Does that help at all..?
Thanks dude. That does help a lot.
Just wondering though, how much breathing space do u need in the system partition?
What does the recovery system use the cache partition for and how do we know what "a minimal size for the recovery system to use" is?
Is it possible to reduce the userdata partition to the minimum possible size a partition can be(if i recall correctly it was 128kb) and use an ext partition on your SD card instead?
If we shrink the Cache partition a lot, does this mean we have to use linux swap to compensate for the lowered amount of cache?
Also do we have to remap the partitions every time we flash a new ROM?
And what are the "dragons"?
kingkurry said:
And what are the "dragons"?
Click to expand...
Click to collapse
He's saying that it's just there. There could be anything from nothing there to a text document containing the ingredients to the cure of AIDs.
Well what about every thing else? Can you guys help me with that? Also what is the total size of all 3 of the big partitions combined?

BootLoop changing from cyanogenmod

I've a problem changing rom from cyanogenmod to any other rom; if I flash the new one from clockwork I've a boot loop, with all the roms I've tried.
The only thing I can do is go back again to cyanogenmod or flash the whole stock rom, loosing all internal sd card contents, and then install the new rom; but I've to root the stock to install clockwork again.
I hope anyone can understand my bad english, sorry.
Please help! ;-)
Byez.
Inviato dal mio Transformer TF101 usando Tapatalk
Did you do the three wipes before installing? What cwm version do you have installed? The new one with the touch interface would only install MIUI and nothing else for me. Every other rom caused a bootloop. Reverting to cwm 5.0.2.7 solved it for me.
Sent from my Optimus 2X using Tapatalk
in CM /system is EXT4 but stock/some other ROMs use EXT3, so reverting to stock via a nandroid (something I've tried & seen fail) or flashing a ROM thats updater script doesn't format the partition to the type it needs will fail as you'll just overwrite the contents of the EXT4 partition & have a kernel that only supports EXT3, hence bootloops
There a flashable zip files that just format /system (and other partitions too) to whichever you need in one of the stickys in the development section, have a look in here & do some reading in those threads to see if this is the problem you are having or if I'm way off base
as with everything, backup before you mess with it
(I'm pretty new to the P990 so could be missing something)
Tnx, I will look for the script and I think the problem is just the ext4.
Thanks, I will let you know. ;-)
Inviato dal mio LG-P990 usando Tapatalk
smashman42 said:
in CM /system is EXT4 but stock/some other ROMs use EXT3, so reverting to stock via a nandroid (something I've tried & seen fail) or flashing a ROM thats updater script doesn't format the partition to the type it needs will fail as you'll just overwrite the contents of the EXT4 partition & have a kernel that only supports EXT3, hence bootloops
There a flashable zip files that just format /system (and other partitions too) to whichever you need in one of the stickys in the development section, have a look in here & do some reading in those threads to see if this is the problem you are having or if I'm way off base
as with everything, backup before you mess with it
(I'm pretty new to the P990 so could be missing something)
Click to expand...
Click to collapse
This ^^
Sent from my LG-P990

CM7/Zeus v7 alongside any rom with GB bootloader and CM7 alongside v28a

CM7/Zeus v7alongside any rom with GB bootloader and CM7 alongside v28a
Hi!This is my"how to" for installing two roms on one OB.
1.We need to partition sdcard
partition #1 : format it to fat(will be used as sdcard)
partition #2 : format it to ext4(will be used as system of zeus and must be at least 320 MB)
partition #3 : format it to ext4(will be used as data of zeus and must be at least 400 MB)
2.Now if u want:
1.Zeus flash this
2.cm7 flash this
(DO NOT FORGET TO PUT YOUR INTERNAL ROM`S KERNEL TO /sdcard/boot/ and name it nandboot.img!)
3.cm7 alongside v28a flash first this, then flash v28a with SFT, then root your v28a and after that put files from this bin.zip to the /system/bin
3.Now if u want to boot:
1.Zeus type in the terminal
Code:
su
bootzeus
2.cm7 type in the terminal
Code:
su
bootcm7
3.v28c ICS
Code:
su
bootsd
4.your nand rom
Code:
su
bootnand
NOTE:If u change your nand rom first install your new rom and after that copy your new rom's boot.img and put it to /sdcard/boot.img and after that rename it to nandboot.img and after all this install this if your sdrom is cm7 and if Zeus this
Now partition table is:
Code:
Zeus/CM7/v28c ICS
system /dev/block/mmcblk1p2
data /dev/block/mmcblk1p3
CM10
system /dev/block/mmcblk0p8
data /dev/block/mmcblk0p9
YouTube
suleymanovemil8 said:
Hi!So is it possible to boot android from sdcard?I think changing root directory to mmcblk1 in the default kernel kommand line could help, have anyone done smthing like this before?
Click to expand...
Click to collapse
Even if it works you'll still be using the same kernel and ramdisk which will only work on ROM very similar to your base.
Sent from my LG-P970
look what i've found http://forum.xda-developers.com/showthread.php?t=1642185
suleymanovemil8 said:
look what i've found http://forum.xda-developers.com/showthread.php?t=1642185
Click to expand...
Click to collapse
I had a look. It looks promising. Its quite a cheap trick and should work on our phone.
I am on my phone now so I can't study what he did in detail and I'm not entirely sure how he handles kernel switching (yet).
It's a good find.
EDIT: Nothing to do with kernel root or command line though.
Sent from my LG-P970
xonar_ said:
I had a look. It looks promising. Its quite a cheap trick and should work on our phone.
I am on my phone now so I can't study what he did in detail and I'm not entirely sure how he handles kernel switching (yet).
It's a good find.
EDIT: Nothing to do with kernel root or command line though.
Sent from my LG-P970
Click to expand...
Click to collapse
I`ve made script for OB and it works
HTML:
cat /sdcard/boot/sdboot.img > /dev/block/mmcblk0p3
echo Rebooting to SD Rom. Please wait...
sleep 3
reboot
return 0
I have repacked zeus rom`s kernel with sd mounts and put the system partition to mmcblk1p1 but it looks like smthing goes wrong(if sdcard is inserted it reboots to recovery in a few seconds but if I remove sd card it stucks at lg logo) and it have created app, data, etc. folders on data (sd) partition
suleymanovemil8 said:
I`ve made script for OB and it works
HTML:
cat /sdcard/boot/sdboot.img > /dev/block/mmcblk0p3
echo Rebooting to SD Rom. Please wait...
sleep 3
reboot
return 0
I have repacked zeus rom`s kernel with sd mounts and put the system partition to mmcblk1p1 but it looks like smthing goes wrong(if sdcard is inserted it reboots to recovery in a few seconds but if I remove sd card it stucks at lg logo) and it have created app, data, etc. folders on data (sd) partition
Click to expand...
Click to collapse
Make so that it only mount the sd partitions if the sd card is present and is made to be bootable.
Reflashing the boot.img isn't a nice way of doing it since bad flash would result in a bootloop. Linux has the ability to reload a kernel without shutting down. I don't know if the kernel that we use can do that maybe it's worth looking into.
Sent from my LG-P970
xonar_ said:
Make so that it only mount the sd partitions if the sd card is present and is made to be bootable.
Reflashing the boot.img isn't a nice way of doing it since bad flash would result in a bootloop. Linux has the ability to reload a kernel without shutting down. I don't know if the kernel that we use can do that maybe it's worth looking into.
Sent from my LG-P970
Click to expand...
Click to collapse
as i said "and it have created app, data, etc. folders on data (sd) partition"
What if i will move /system #2 to /data partition and both of the systems will have data partition on sdcard?
PS. It worked!Now I have data partition on mmcblk1p2
here it is(this is kernel for cm10(26.10.2012))
suleymanovemil8 said:
What if i will move /system #2 to /data partition and both of the systems will have data partition on sdcard?
PS. It worked!Now I have data partition on mmcblk1p2
Click to expand...
Click to collapse
What are you going to do with the GB thats on the phone and not used?
EDIT: its rebooting to recovery because the kernel is set to reboot to recovery when it's 'panicking'.
Sent from my LG-P970
xonar_ said:
What are you going to do with the GB thats on the phone and not used?
Sent from my LG-P970
Click to expand...
Click to collapse
no this kernel boots with normal system and data at sdcard and now i will make kernel with booting from data directory and with data at sdcard)
YES! I have now two roms on one phone!
suleymanovemil8 said:
YES! I have now two roms on one phone!
Click to expand...
Click to collapse
Do a walkthrough for us! :laugh::laugh:
genarinho said:
Do a walkthrough for us! :laugh::laugh:
Click to expand...
Click to collapse
Yes ,pls
sent from my Nokia 1100 with droid 4.0
Just everyone thats reading this know that it still booting from phone and then reading data from sd. (Not true dualboot yet )
@ sulley
Why not use recovery as the phone boot.img and then normal boot then goes of two sd. CWM sources are available and can be modified so that it works as a boot manager. It will then be actual dual boot because from there you can load kernel from either sd or phone (and unload the recovery kernel and with its dying breath start the new kernel ).A project like this will take A LOT of time and will definitely be more than 6 months. Since it would be based on recovery it should be able to make it work for all phones that can use CWM and have similar boot structure. I will help out on a project like this but I can't be that involved with it since my studies will take up most of my time.
As much I understand, bootloader is needed for dualboot and it applies same on Android. So you got access to our bootloader or just directing the boot.img from 1st ROM to 2nd one? Like handshaking?
xonar_ said:
Just everyone thats reading this know that it still booting from phone and then reading data from sd. (Not true dualboot yet )
@ sulley
Why not use recovery as the phone boot.img and then normal boot then goes of two sd. CWM sources are available and can be modified so that it works as a boot manager. It will then be actual dual boot because from there you can load kernel from either sd or phone (and unload the recovery kernel and with its dying breath start the new kernel ).A project like this will take A LOT of time and will definitely be more than 6 months. Since it would be based on recovery it should be able to make it work for all phones that can use CWM and have similar boot structure. I will help out on a project like this but I can't be that involved with it since my studies will take up most of my time.
Click to expand...
Click to collapse
Well I have installed rom's kernel to the recovery partition but after booting to this new kernel i couldn't boot back tonormal kernel till i reflashed recovery from rom manager
ps.recovery partition is at mmcblk0p4 and boot mcblk0p3
genarinho said:
Do a walkthrough for us! :laugh::laugh:
Click to expand...
Click to collapse
tada!
As I expected, not real dualboot. But very much appreciting try. Keep it up
Anyway i still want to make one rom at nand and anouther on sdcard, but if i set in kernel system directory to mmcblk1p1(sdcard) it starts to boot but smthing goes wrong but it starts to boot and i know it because it creates app, data, app-private etc. folders on data partition of sdcard(mmcblk1p2), i think this is because it remounts sdcard or smthing like this.Any ideas about soving this problem?

Some help with Dual Boot

Finaly i find a way to make phone to boot from SD (Android 5.0.2)...but i need a app (or recovery script) to swith with Internal Rom..
Any can help me?
Done..I find a way. I flash boot.img for internal/external (if i need internal i flash internal, if i need external i flash external)
Use Internal with Android 4.4.4 and External with Android 5.0.2
il3gal said:
Finaly i find a way to make phone to boot from SD (Android 5.0.2)...but i need a app (or recovery script) to swith with Internal Rom..
Any can help me?
Done..I find a way. I flash boot.img for internal/external (if i need internal i flash internal, if i need external i flash external)
Use Internal with Android 4.4.4 and External with Android 5.0.2
Click to expand...
Click to collapse
Can you please explain what you did? You are the first person Ive read about who enabled dual boot for the i9305! AND EVEN WITH LOLLIPOP:laugh:
il3gal said:
Finaly i find a way to make phone to boot from SD (Android 5.0.2)...but i need a app (or recovery script) to swith with Internal Rom..
Any can help me?
Done..I find a way. I flash boot.img for internal/external (if i need internal i flash internal, if i need external i flash external)
Use Internal with Android 4.4.4 and External with Android 5.0.2
Click to expand...
Click to collapse
How? can you make a tutorial for the dual boot process?
Sorry about that but i dont now so much about android. I find blocks for SD Card and i modify boot.img (for external rom)
I explain on large.
Legend:
iBoot = Internal Boot.img
eBoot = External Boot.img
First time do a full backup on sdcard and rom. (i make from recovery)
1. Make a backup on iBoot from Terminal: dd if=/dev/block/platform/dw_mmc/by-name/BOOT of=/sdcard/iBoot.img
2. (i mount sdcard from recovery to partitioning) Make a 3 other partition (i use MiniTool) for system/cache/data
First partiton is SD CARD (fat32) (i split from here 7gb..i have sd 16gb)
Second is a primary ext4 partition for system..i put 1,5gb
Third is a primary ext4 partition for cache..i put 800mb
And last is a primary ext4 partition for data..i put free remaining..~4gb
3. On External Rom, need to unpack boot.img and go to fstab. file to replace:
/dev/block/platform/dw_mmc/by-name/SYSTEM to /dev/block/mmcblk1p2
/dev/block/platform/dw_mmc/by-name/CACHE to /dev/block/mmcblk1p3
/dev/block/platform/dw_mmc/by-name/USERDATA to /dev/block/mmcblk1p4
and repack boot.img
(and make a copy on desktop like eBoot.img) put back on archive and go to META-INF\com\google\android\updater-script and edit ALL line
/dev/block/platform/dw_mmc/by-name/SYSTEM to /dev/block/mmcblk1p2
/dev/block/platform/dw_mmc/by-name/CACHE to /dev/block/mmcblk1p3
/dev/block/platform/dw_mmc/by-name/USERDATA to /dev/block/mmcblk1p4
save..sign archive
4. make 2 archives with iBoot.img and eBoot.img (to switch bethen need a normal flash iBoot or eBoot) (i put 1 archive in attachament for eBoot...for example)(for switch rom need to flash boot.img for Internal or External rom)
5. Flash External Rom (with meta and boot.img changed)
6. Reboot..wait to external rom make files (data files and others)
7. If you want to change rom, enter in recovery and flash iBoot (for internal) and eBoot (for external).
I use 4.4.4 (AMCHA Rom KK for i9305) (for internal ..and this is rom for daily)
And 5.0.2 (NamelessROM 2.0 [BETA] [20150106][Blazing Fast]) (on external..temporary)
I dont now if it work with all rom
I'm not developer
If you dont now how unpack/repack boot.img or sign a zip file..search on google, dont ask me about this
I'm realy happy if a developers was extend this and make a Kernel for this (or App)
i'm inspire from http://forum.xda-developers.com/showthread.php?t=2639112
Sorry for english...And i dont now if this method works for everybody.
edit: Dont forget to unmount /system /data /cache partition before flash ExternalROM.
Thanks for the tutorial, I will try to reproduce the steps when I'm free. Don't worry your English is comprehensible.
LucasBass said:
Thanks for the tutorial, I will try to reproduce the steps when I'm free. Don't worry your English is comprehensible.
Click to expand...
Click to collapse
For some reason if flash eBoot and use External Rom..and you want to go back on Internal Rom..when flash iBoot and restart phone..some time was stuck in bootloader..for solve this (temporary i think), go back in cwm..flash again iBoot, go to Advanced and Reboot in CWM..after phone reboot in cwm, press Reboot devices (normaly)..i dont now why is this problem
other thing is: you can flash without problem other rom on internal. (i try today to flash again 4.4.4). external not affected BUT after flash, need to make backup on iBoot ..i dont now why (because i flash same rom with same configuration)..
Now i use on external: Resurrection_Remix_LP_v5.3.0-20150119-i9305.zip and it works grate
I like people who like try new things . If you need help or you stuck , pm me.
Good luck
Hehe
You mean, you did it as well? and you will try to write it down. Or you will start trying.
I have only once repartioned something before, so I'll wait for good instructions.
Uberharm said:
You mean, you did it as well? and you will try to write it down. Or you will start trying.
I have only once repartioned something before, so I'll wait for good instructions.
Click to expand...
Click to collapse
I'm sorry about instructions..but i search on google all info for try Dual Boot...i dont speak english because i'm from Romania.
I try to explain how i make Dual Boot (manualy) for developers...to make this option much easy..
Someone really needs to make a script! I think this could be implemented in a custom recover. All we need now is just a complete step by step guide.
Thanks in advance to the developer who's going to write this down! ☺

Cant restore stock partition. ADB error.

I've been playing around with Custom ROMS and would like to go back to MIUI now. Problem is that I cant seem to restore back to stock partition. I searched online and there was a tutorial that teaches how to manually wipe the partitions and rewrite them one by one. Problem is that there's something wrong with my phone. When I type "adb shell" it shows an "error:closed" message. Little bit of searching reveals that it is due to outdated ADB. But I checked my ADB version and it is the latest being 1.0.32 or something like that. I couldnt find a newer version. I thought it was a driver issue so I reinstalled the drivers and even tried it on a Mac (I'm windows) but it shows the same error. To be clear, I can push files via ADB no problem. So it leads me to believe that it might be a recovery issue? I'm on TWRP 2.8.7 which I believe is the latest one too. Could someone advice on how I can restore to stock partition? Script doesnt work because it is not accurate to the byte. Thanks
Mi flash
Wysłane z mojego MI 3W przy użyciu Tapatalka
tomekw100 said:
Mi flash
Wysłane z mojego MI 3W przy użyciu Tapatalka
Click to expand...
Click to collapse
I cant use miflash because my partition sizes are not stock.
BUMP for help.
Try to use the Cancro's re-partition script zip (you could easily Googled it) with CWM. It works wonky with TWRP.
First, place the script on your internal storage using MTP through TWRP, then flash the CWM through fastboot. Reboot, then run the script.
rxl.noir said:
Try to use the Cancro's re-partition script zip (you could easily Googled it) with CWM. It works wonky with TWRP.
First, place the script on your internal storage using MTP through TWRP, then flash the CWM through fastboot. Reboot, then run the script.
Click to expand...
Click to collapse
Hi noir, thanks for the reply. Can you confirm that it works on CWM? I'm asking because according to this miui forum thread, it says that the zip method doesnt really restore it to the BYTE, thus causing miflash(fastboot) methods to not work. That was the result of my own trying but I haven tried with CWM recovery.
The annoying part of all this is that I'm on the 16gb version and I dont have enough space to do a nandroid. Hence, would like to reconfirm before I wipe my system again only to fail the partition restore. Thanks!
orenzai said:
Hi noir, thanks for the reply. Can you confirm that it works on CWM? I'm asking because according to this miui forum thread, it says that the zip method doesnt really restore it to the BYTE, thus causing miflash(fastboot) methods to not work. That was the result of my own trying but I haven tried with CWM recovery.
The annoying part of all this is that I'm on the 16gb version and I dont have enough space to do a nandroid. Hence, would like to reconfirm before I wipe my system again only to fail the partition restore. Thanks!
Click to expand...
Click to collapse
TWRP doesn't really detect system2 partition correctly, since it was unmounted. Only CWM, AFAIK, that can detect both system1 and system 2, unmounted or not.
Weird, because I can flash it through MiFlash after using the re-partition script just yesterday. The only problem that I have is that I forgot to format the internal SD too. I simply go to CWM then format the internal SD too. After that, I can flash it through MiFlash just fine.
Can I ask you which re-partition script do you used? Just in case, I attached the script that I used.
rxl.noir said:
TWRP doesn't really detect system2 partition correctly, since it was unmounted. Only CWM, AFAIK, that can detect both system1 and system 2, unmounted or not.
Weird, because I can flash it through MiFlash after using the re-partition script just yesterday. The only problem that I have is that I forgot to format the internal SD too. I simply go to CWM then format the internal SD too. After that, I can flash it through MiFlash just fine.
Can I ask you which re-partition script do you used? Just in case, I attached the script that I used.
Click to expand...
Click to collapse
Hey Noir,
Just to give you an update. I have managed to successfully flash miui7 using miflash. You must be right regarding TWRP not recognising system2, that's what's causing all the error. Thank you very much for your help. Now I can go back to using MIUI.

Categories

Resources