[HOW-TO][ROOT][4NOOBS] Resize sdcard0 and internal storage to maximize space for apps - Sony Xperia T, TL, TX, V

Ever since I bought my Xperia TL (LT30at), I've been upset at the ridiculous allocation of onboard memory: only 1.97GB were available for apps. The rest was allocated to an emulated external SD card, which meant that any app installed on it would lose widgets and suffer from other weird glitches on reboot. I've searched all over the place and couldn't find a solution until @teidus shared his method (per my research, it has been used on older devices from other manufacturers as well). I tried it and adjusted the steps to ensure 100% compatibility with my phone (and added explanations so that other devices could be tested).
See proof in the attached screenshots.
WARNING: You will lose a lot of data if you don't follow this guide!
WARNING: These operations require a rooted device. If you are running unrooted Android 4.3 or newer, you cannot proceed.
NOTE: All of these changes will be reversed if you flash an FTF that includes partition-image.sin.
DISCLAIMER: I'm not responsible for bricked devices and data loss from power surges, hardware damage, or changes to the linked software. Always check the native manuals for all the tools listed here!
Required Downloads:
1. Flashtool, which includes ADB (got questions about it? - ask them here) - requires installation
2. @[NUT]'s dual XZDualRecovery. I'm linking to v2.7.94 BETA installer. If you wish to check for a more recent version, go to his download page and do a page search (CTRL+F) for XT-lockeddualrecovery[version-goes-here].installer.zip. (got questions about it? - ask them here) - unzip to a location you'll remember (say, C:\xperia-resize\recovery\)
3. FTF with your phone's 4.1.2 firmware - save it to the default Flashtool firmware directory (C:\flashtool\firmwares\)
4. File system utilities (attached) - unzip to a location on your phone's physical SD card you'll remember (say, fs-utils\)​
The Guide (skip all the way to the bottom for the short guide if you know how to backup and flash FTFs):
1. Back up all data stored on internal storage:
Option 1: Connect your phone to the computer and save it to a computer drive.
Option 2: Open a file manager on the phone and copy it to a physical SD card (/sdcard1).​2. Back up your current installation with either Online Nandroid or your current recovery and remove the SD card for safety.
3. Flash your phone with basic 4.1.2 install.
3.1 Turn off the phone.
3.2 Launch Flashtool.
3.3 Click the thunderbolt icon on the left and select Flashmode.
3.4 Select the appropriate 4.1.2 FTF from the list (it'll be there if you saved it to c:\Flashtool\firmwares\).
3.5 Tick "No final verification" checkbox on the right, click Flash, and when prompted, hold the VOLUME DOWN button, and connect the phone to the computer. The operation will take about 10 minutes. DISREGARD THE INSTRUCTIONS IN THE ANIMATION. Xperia T/TL doesn't have a hardware Back button.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
3.6 When flashing is complete, boot the phone.​
4. Connect your phone to the computer and let the computer recognize it.
5. Enable USB debugging.
5.1 Go to (System) Settings -> Developer options and flip the switch in the top-right corner of the screen.
5.2 Look a bit down (toward the middle of the screen) and check USB debugging.​6. Install the dual recovery.
6.1 Go to the location on your computer where you extracted dual recovery (e.g., C:\xperia-resize\recovery\).
6.2 Double-click install.bat.
6.3 Press 3 on your keyboard for the option 3. Installation on unrooted ROM.
6.4 Follow the instructions on your computer's screen.
6.5 When you will try to reboot the phone back into Android, the recovery will prompt you to root the OS. Do that.​
7. Boot into PhilZ Touch recovery by opening App Drawer, starting NDR Utils, and selecting the appropriate option.
8. When the phone boots into recovery, connect it to the computer.
9. Start ADB.
If you don't know where ADB is, press WIN + R on your computer keyboard, type cmd in the pop-up window, hit ENTER, then copy & paste this command (paste by right-clicking the command prompt window): cd C:\Flashtool\x10flasher_lib. Then type adb shell and hit ENTER again.​10. Execute the following commands one-by-one (you can copy & paste, hit enter, and wait for the output):
Code:
umount /storage
parted /dev/block/mmcblk0
print
These commands unmount all drives, launch parted utility for mmcblk0 (onboard flash storage), and show the partition table.​11. Record the beginning of the partition Userdata and the end of the partitionSDCard. These are the limits of your new partitions The numbers are in megabytes (MB) unless specified.
For Xperia T/TL, Userdata begins at 1621 and SDCard ends at 15.6GB. Xperia V (and any other device with less than 16GB of storage) will definitely have a different value.​
12. Remove the last 2 partitions by executing the following commands:
Code:
rm 14
rm 15
13. Calculate the new end point for Userdata, which is also the new start point for SDCard:
1621 (or another number you recorded in step 11) + additional space = new end. I added 4GB (4 ×1024MB = 4096MB) so my new end point was 7865. I advise to add at least 2GB (2048MB) to feel safe about having enough storage for apps. DON'T TRY TO REMOVE SDCARD ALTOGETHER BY ALLOCATING ALL OF THE AVAILABLE SPACE TO USERDATA! Emulated storage is coded into OS environment and requires additional modifications to work properly.​14. Create and name new partitions by executing the following commands (don't copy the text in parentheses):
The system might throw several errors in the process. When prompted, just type ignore and hit ENTER.​
Code:
mkpartfs logical ext2 1621 7865 (change the numbers as appropriate for your device)
name 14 Userdata
mkpartfs logical ext2 7865 15.6GB (change the numbers as appropriate for your device and notice the GB to make sure the partition extends to the end of the onboard storage)
name 15 SDCard
quit
These commands create the partitions with ext2 file system and given beginning and end parameters, rename them as required, and close parted.​15. "Damage" the internal, emulated SD card so that it could be formatted properly later.
Tap Mounts and storage -> Format /storage/sdcard0 -> default and confirm the operation.​16. Insert the physical SD card (sdcard1) that you removed in step 2 back into the device.
Make sure it's mounted by tapping Mounts and storage and checking its status (it should say unmount /storage/sdcard1/). If not, mount it by tapping on the appropriate option.​17. Execute the following commands one-by-one in the ADB command prompt:
Code:
cd /storage/sdcard1/fs-utils (the directory name will be different if you didn't follow my conventions)
tune2fs -j /dev/block/mmcblk0p14
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p14
e2fsck -fpDC0 /dev/block/mmcblk0p14
These commands convert Userdata partition into the appropriate ext4 filesystem, which is not supported natively in the recovery environment.​18. Reboot the device into full Android.
18.1 Remove the physical SD card for safety.
18.2 Tap Back until you make it to the top level of recovery. Then tap the top option Reboot the device.​19. When Android loads fully, you'll notice a notification about storage file system. Tap it and follow the prompts to format it.
20. Insert the physical SD card and reboot into the recovery you used to create the backup in step 2 to restore it.
In PhilZ, that's Backup and Restore -> Restore from /storage/sdcard1.​21. Reboot back into full Android and copy the files saved from internal storage back into it. Then reboot again so that apps recognize the data.
DONE!​
Short guide/list of ADB commands and other events (*enclosed in asterisks*) if you know the safety drill:
Code:
*flash 4.1.2 & install dual recovery*
*boot into PhilZ Touch*
adb shell
umount /storage
parted /dev/block/mmcblk0
print
*record start point of Userdata and end point of SDCard*
rm 15
rm 14
mkpartfs logical ext2 1621 7865
name 14 Userdata
mkpartfs logical ext2 7865 15.6GB
name 15 SDCard
*Mounts and storage -> Format /storage/sdcard0 -> default -> confirm*
*insert physical SD card*
*Mounts and storage -> Mount /storage/sdcard1*
cd /storage/sdcard1/fs-utils
tune2fs -j /dev/block/mmcblk0p14
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p14
e2fsck -fpDC0 /dev/block/mmcblk0p14
*remove physical SD card*
*reboot*
*format emulated SD card*
*reboot recovery*
*restore backup*
*reboot*
*restore sdcard0/*
*reboot*

nice, i was looking for a way to increase the /data after switching to Omni and ART
Will try ASAP..
PS: i think this thread should be added in ALL IN ONE THREAD Section:good::victory::victory::victory:

raghulrr said:
PS: i think this thread should be added in ALL IN ONE THREAD Section
Click to expand...
Click to collapse
That's a request to @gregbradley.

#6 would be the most welcomed way to resize partitions, but unfortunately it's not so easy as it was e.g. with ZTE Blade. But altogether it's good to know that you can resize them now! Thanks!

nice tutorial brother... i'll be trying tommorow
Sent from S5J using Tapatalk

Thanks
Thank you I was definetly looking for it
Thanks

@TO: I couldn't test ist but I think made a little mistake:
I think you want want to execute the programms wich are in the Directory in wich you made the cd. So you have to add ./ before each command.
I don't have such a device, to test it by myself: You said you have to make a new virtual SD. Some ROMes have a vold.fstab in /etc. Mayby it't enough to change this file to be able to remove the SD Partition completly.

Partitionator said:
@TO: I couldn't test ist but I think made a little mistake:
I think you want want to execute the programms wich are in the Directory in wich you made the cd. So you have to add ./ before each command.
I don't have such a device, to test it by myself: You said you have to make a new virtual SD. Some ROMes have a vold.fstab in /etc. Mayby it't enough to change this file to be able to remove the SD Partition completly.
Click to expand...
Click to collapse
I was writing the guide as I was executing commands so everything is exactly as I entered it. I obviously removed all steps that turned out to redundant and wrong.

Will that work with the Xperia Arc S?!
What is the difference between your method and the [MOD]{CM10.1}{CM10.2}{CM11}{AOSP}Working Int2Ext for Xperia 2011 [ART-compatible]?

metaljoker said:
Will that work with the Xperia Arc S?!
What is the difference between your method and the [MOD]{CM10.1}{CM10.2}{CM11}{AOSP}Working Int2Ext for Xperia 2011 [ART-compatible]?
Click to expand...
Click to collapse
These are some great questions! This approach is very different from all Int2Ext scripts:
HUGE NOTE: This works only for devices where the onboard NAND capacity is at least 8GB. That means that 2011 devices with 1-4GB of onboard memory are better off with mounting the physical SD card as /data.
This is a semi-permanent modification to the partition table (it'll work fine if you do factory reset and flash a new ROM .zip but the allocation will be reset every time you flash FTF, possibly even if you exclude partition-image because each .sin contains its offset and size bits).
This approach is compatible with locked bootloaders because support of init.d comes from the kernel.
This approach allows you to allocate as much or as little of onboard NAND storage to each of the 2 partitions (/data and /storage/sdcard0) used for storing apps and their data instead of just allocating the entire physical SD card.
This approach allows you to live a life independent of your physical SD card (i.e., your apps still work and your phone boots up just fine even if the physical SD card dies).

bsined said:
These are some great questions! This approach is very different from all Int2Ext scripts:
HUGE NOTE: This works only for devices where the onboard NAND capacity is at least 8GB. That means that 2011 devices with 1-4GB of onboard memory are better off with mounting the physical SD card as /data.
This is a semi-permanent modification to the partition table (it'll work fine if you do factory reset and flash a new ROM .zip but the allocation will be reset every time you flash FTF, possibly even if you exclude partition-image because each .sin contains its offset and size bits).
This approach is compatible with locked bootloaders because support of init.d comes from the kernel.
This approach allows you to allocate as much or as little of onboard NAND storage to each of the 2 partitions (/data and /storage/sdcard0) used for storing apps and their data instead of just allocating the entire physical SD card.
This approach allows you to live a life independent of your physical SD card (i.e., your apps still work and your phone boots up just fine even if the physical SD card dies).
Click to expand...
Click to collapse
That's a great info! There are steps in the thread that aren't clear enough not only for me but also for others, that's for sure.
For those who have partitioned their SDcard, unlocked BL & rooted phones, should have their own line of steps, however I feel like I might mistake something in case I use it.
P.S.:
01. You didn't answer my question whether this is compatible with my phone, did you?!
02. There should be a video demonstration for this method for it is new in this website, don't you think?!
03. unzip to a location on your phone's physical SD card you'll remember (say, fs-utils\) what do you mean by remember "say, fs-utils\" ??

@up
It depend on your partition scheme, which ones are on the end of memory (physical).
Wysłane z mojego GT-I8160 przy użyciu Tapatalka

batlin said:
@up
It depend on your partition scheme, which ones are on the end of memory (physical).
Wysłane z mojego GT-I8160 przy użyciu Tapatalka
Click to expand...
Click to collapse
I have a 1GB partitioned SDcard for the apps! Does this info help?!
How the heck could I install the TeamWin Recovery Project (TWRP) ??!!

metaljoker said:
That's a great info! There are steps in the thread that aren't clear enough not only for me but also for others, that's for sure.
For those who have partitioned their SDcard, unlocked BL & rooted phones, should have their own line of steps, however I feel like I might mistake something in case I use it.
P.S.:
01. You didn't answer my question whether this is compatible with my phone, did you?!
02. There should be a video demonstration for this method for it is new in this website, don't you think?!
03. unzip to a location on your phone's physical SD card you'll remember (say, fs-utils\) what do you mean by remember "say, fs-utils\" ??
Click to expand...
Click to collapse
SD partitioning and status of the bootloader should not have any effect on the process. However, root is required in order to install recovery.
1. Theoretically, this mod is compatible with any device that has the latest version of CWM or TWRP. I've tested it with Xperia TL and Nook Tablet 16GB. However, if your device's total available user storage (/data + /storage/sdcard0) is 4GB or less, you will likely require a physical SD card for storing your apps, user data, and whatever is written to sdcard0 by default.
2. Although I realize that some people learn best by watching instead of reading, this procedure is very quick when your device's recovery supports all the required commands. I repartitioned Nook Tablet in barely 10 minutes. If I were to make a screen cast of it, 90% of the video would be just moving the mouse around or waiting for the phone to boot. The longest operation is to create the journal, which takes about 10 seconds by the phone.
3. "Say" = "for example". Create a folder on the physical SD card and call it "fs-utils".

bsined said:
SD partitioning and status of the bootloader should not have any effect on the process. However, root is required in order to install recovery.
1. Theoretically, this mod is compatible with any device that has the latest version of CWM or TWRP. I've tested it with Xperia TL and Nook Tablet 16GB. However, if your device's total available user storage (/data + /storage/sdcard0) is 4GB or less, you will likely require a physical SD card for storing your apps, user data, and whatever is written to sdcard0 by default.
2. Although I realize that some people learn best by watching instead of reading, this procedure is very quick when your device's recovery supports all the required commands. I repartitioned Nook Tablet in barely 10 minutes. If I were to make a screen cast of it, 90% of the video would be just moving the mouse around or waiting for the phone to boot. The longest operation is to create the journal, which takes about 10 seconds by the phone.
3. "Say" = "for example". Create a folder on the physical SD card and call it "fs-utils".
Click to expand...
Click to collapse
WOW! I am very impressed for answering each question in an informative way! W E L L D O N E! ! :good:
I'll take my chances since I've read your lines. Wish me luck!
I'll get back to you once I encounter the unexpected, or maybe not. We'll see! Here goes nothing...

metaljoker said:
WOW! I am very impressed for answering each question in an informative way! W E L L D O N E! ! :good:
I'll take my chances since I've read your lines. Wish me luck!
I'll get back to you once I encounter the unexpected, or maybe not. We'll see! Here goes nothing...
Click to expand...
Click to collapse
I realized that I've forgotten to include roll-back instructions if anything goes wrong. Here's the short version:
1. You better have made Nandroid backup of your system and have copied the content of your /storage/sdcard0
2. Find a stock, rootable FTF on the forums, download it, and flash it using Flashtool
3. Install recovery on the reflashed device
4. Restore backup from recovery and copy the content back to /storage/sdcard0

ADB Shell
Sorry if this silly questions
I want use your mod on my XV, but I've some problem (on Windows 8.1 Pro 64bit)
1. When I reboot from PhilZ Touch recovery for a first time, i don't get root question
2. Cause i don't get about root question, so i try root from PhilZ Touch recovery menu
3. When I try run adb shell on TWRP recovery, there no device notif (I already install Windows Update : http://support.microsoft.com/kb/2917929 and use Flashtool Driver 1.5)
So, am i mis something? Where i got wrong? Thanks before

thunder888 said:
Sorry if this silly questions
I want use your mod on my XV, but I've some problem (on Windows 8.1 Pro 64bit)
1. When I reboot from PhilZ Touch recovery for a first time, i don't get root question
2. Cause i don't get about root question, so i try root from PhilZ Touch recovery menu
3. When I try run adb shell on TWRP recovery, there no device notif (I already install Windows Update : http://support.microsoft.com/kb/2917929 and use Flashtool Driver 1.5)
So, am i mis something? Where i got wrong? Thanks before
Click to expand...
Click to collapse
I guess is the problem is with Win8 and ADB drivers. However, just to be sure, try attaching the phone to the computer to test ADB when it's booted to PhilZ and full Android. If the phone is not recognized, search the forum for a fix (there should be one). Unfortunately, my only Win8 machine is Surface RT, which doesn't accept ADB drivers, so I can't test anything myself.

bsined said:
I guess is the problem is with Win8 and ADB drivers. However, just to be sure, try attaching the phone to the computer to test ADB when it's booted to PhilZ and full Android. If the phone is not recognized, search the forum for a fix (there should be one). Unfortunately, my only Win8 machine is Surface RT, which doesn't accept ADB drivers, so I can't test anything myself.
Click to expand...
Click to collapse
Yes, i agree. But if I attach phone at full Android and run ADB, it can be recognized. I'll reinstall my windows and will give a report later. Thanks :good:

My dearest friend...
My phone was revered back to original. In order to have it rooted it took me 17 hours
1] Regarding the "Flash your phone with basic" my phone's already rooted which means that I do not need to flash an FTF file. In case I need to, which version?! Would that harm anyhow?
2] I'm stopped at 6.5. Because I do not have the TWRP installed on my phone.
3] My Recovery is CWM-based Recovery v6.0.4.7, if no problem then how can I Start ADB?!!!
Obviously, I'm not even half way. I need your help my friend!
* Xperia Arc S

Related

NAND flash help

--Formality of newness here--
I'm a noob to flashing my Vogue, so maybe I'm just ignorant of something important, but I'm a programmer, been using linux for a decade, and comfortable hacking devices, so don't spare me any gory details.
Also, many thanks to everyone who has made this possible. The haret bootloader version is amazing, and I'm sure a nand version is even nicer.
--My problem--
I've never tried to flash my Vogue, so as of a few hours ago, it was a vanilla, but updated Sprint Vogue with a type 3 display panel. It has the latest official Sprint radio (3.42.30?).
I started with tatnai's recently stickied FAQ thread in this forum (I can't link it due to being a new member). I followed the steps linked to unlock my phone. I installed 2.31 CoKe and verified it in my bootloader. So far so good.
I then used RUU and VOGUIMGx320.NBH from the 2010-02-04 dated version of vogueeclairnbh.zip file. It succeeded. Resetting the device loads the Android linux kernel. All is well.
Now for my failure. I load a FAT32 formatted SD card with, say, myn's WarmDonut androidinstall.tar file under /sdcard/andboot/. [ignorethis]and copy in the latest zImageEclair (renamed to zImage of course) and the latest initrd.gz, [/ignorethis] hold the center button down through a hardware reset, it boots into the replimenu like this (minus whitespace and some truncation):
Code:
Android Installer
Choose options for installation or choose defaults
(*) Sys on NAND
( ) Sys on SDCard [...]
( ) Sys on Ext [...]
(*) Data on NAND
( ) Data on SDCard[...]
( ) Data on Ext [...]
[B]1. Fix Permissions[/B]
2. Clear Dalvik Cache
3. Backup /data
3. Restore /data
4. Wipe /data
5. Start Recovery Mode
6. Quit
For more info [...]
Notice that option #1 is not an install option. Running #1, I get errors from umount saying it can't mount /system or /data, which I assume is because it's not installed yet. Same with options 2 through 4. Recovery mode does allow me to mount the SD card as a block device, and quit leaves the installer menu.
Intution is telling me that it's not unlocked correctly and that the Android Installer can't write to nand, but without sourcecode for it, I'm kind of at a dead end of my knowledge, and I can't find a similar issue posted here or at PPCgeeks.
What am I missing? Let me know if I need to provide any more information.
If you're flashing to nand, you don't need a(n additional) zImage or initrd. maybe they're throwing the installer off.
I've removed them from my andboot folder, so that androidinstall.tar is the only file in there and retried. The same menu is presented without an install option. I also just reflashed the phone with the non-eclair nbh and got the same results.
I've used this andboot no-rootfs method with haret before, so I've got a pretty clear idea of what should happen, I just don't know what's gone wrong.
Ok, silly question re: folder structure - you should have just /andboot on the root of your sdcard, not /sdcard/andboot. I can't tell from your post.
burrgrinder said:
--Formality of newness here--
I'm a noob to flashing my Vogue, so maybe I'm just ignorant of something important, but I'm a programmer, been using linux for a decade, and comfortable hacking devices, so don't spare me any gory details.
Also, many thanks to everyone who has made this possible. The haret bootloader version is amazing, and I'm sure a nand version is even nicer.
--My problem--
I've never tried to flash my Vogue, so as of a few hours ago, it was a vanilla, but updated Sprint Vogue with a type 3 display panel. It has the latest official Sprint radio (3.42.30?).
I started with tatnai's recently stickied FAQ thread in this forum (I can't link it due to being a new member). I followed the steps linked to unlock my phone. I installed 2.31 CoKe and verified it in my bootloader. So far so good.
I then used RUU and VOGUIMGx320.NBH from the 2010-02-04 dated version of vogueeclairnbh.zip file. It succeeded. Resetting the device loads the Android linux kernel. All is well.
Now for my failure. I load a FAT32 formatted SD card with, say, myn's WarmDonut androidinstall.tar file under /sdcard/andboot/. [ignorethis]and copy in the latest zImageEclair (renamed to zImage of course) and the latest initrd.gz, [/ignorethis] hold the center button down through a hardware reset, it boots into the replimenu like this (minus whitespace and some truncation):
Code:
Android Installer
Choose options for installation or choose defaults
(*) Sys on NAND
( ) Sys on SDCard [...]
( ) Sys on Ext [...]
(*) Data on NAND
( ) Data on SDCard[...]
( ) Data on Ext [...]
[B]1. Fix Permissions[/B]
2. Clear Dalvik Cache
3. Backup /data
3. Restore /data
4. Wipe /data
5. Start Recovery Mode
6. Quit
For more info [...]
Notice that option #1 is not an install option. Running #1, I get errors from umount saying it can't mount /system or /data, which I assume is because it's not installed yet. Same with options 2 through 4. Recovery mode does allow me to mount the SD card as a block device, and quit leaves the installer menu.
Intution is telling me that it's not unlocked correctly and that the Android Installer can't write to nand, but without sourcecode for it, I'm kind of at a dead end of my knowledge, and I can't find a similar issue posted here or at PPCgeeks.
What am I missing? Let me know if I need to provide any more information.
Click to expand...
Click to collapse
If you start recovery mode and plug your device into a linux box you should be able to connect to it using adb (http://cs-alb-pc3.massey.ac.nz/vogue/files/adb) use "adb shell" to get a shell and you will be able to see why it doesn't find the tar file. Look at /init, see how it mounts the sdcard and try the same commands.
Hope this helps.
agree with the comments above. your problem does not have to do with unlocking. it has to do with your file structure or formatting of the sdcard or something along those lines preventing it from seeing the file.
things that may be wrong:
1. the andboot folder is named incorrectly
2. the andboot folder is not in the root of the sdcard (as mentioned above)
3. your androidinstall.tar is not correctly named, or is still zipped, or something of that nature. make sure you look at that file from your computer with it set to NOT hide extensions, so that you aren't missing that it is actually called androidinstall.tar.zip.
as dzo said, from the install menu hit Start recovery mode, then you can hook it up to any computer (usb mass storage function will work) and check all of these out.
Sorry about all this fuss. I finally determined that this menu is caused by a bad/misformatted SD card. The device was seeing it as in the slot, and would even mount it correctly in recovery mode, but nothing could be read by the Vogue. After swapping out to a new one, all is well.
Thanks for everyone's quick replies and insight.

Mods and tweaks for LG Optimus L3 E405

ALL TWEAKS AND MOD FOR E405 WILL BE ADDED HERE TIME TO TIME
SO PLEASE SUBSCRIBE AND PRESS THANX BUTTON IF I'VE HELPED YOU IN ANY MANNER
all these mods are tested by me and/or others. still if any of them bricked ur phone, that will be only ur fault. test or use any of them at ur own risk.
Rooting-
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Working-tested by me.
PLEASE CHARGE YOUR PHONE AT LEAST 60% BEFORE DOING THIS
No. of steps-10
1. Download and install LG United Drivers From Official Site
Link-http://www.lg.com/in/support-mobile/lg-E405
(see pic to know what to download)
2. Download SuperOneClickv1.7-ShortFuse.zip
Link-http://www.mediafire.com/?6f1sttgi1rc1q72
3. Disable your antivirus as it can block or can delete any file without your permission between the completion of whole process leaving you a soft bricked phone. SuperOneClick will run an exploit, your antivirus can show it as a virus or infection but after the process you can do a full system scan and there will be no virus in your system.
4.Extract SuperOneClick to desktop or any drive.
5. Connect your device to PC through data cable and connect in PC Software Mode.
6. Now go to Settings-> Applications-> Development-> Enable USB Debugging (in your phone)
7. Go to the folder where you have extracted SuperOneClick and run SuperOneClick.exe (see pic) (1)
8. Now select rageagainstthecage (2) as you can see in the pic and click on ROOT (3).
9. Wait for a while till you can see rooted and it will ask you to run a superuser command, say yes or no its up to you. yes is preferred.
10. Close SuperOneClick, Disconnect your Device. You can see a new app in there 'Super User', run it. If it starts.
Congrats, you are rooted but if it get force closed, then just connect device with usb debug enable and run superoneclick again with rageagainstthecage as mentioned above, this time you'l be rooted.
PLEASE SUBSCRIBE, RATE AND PRESS THANX BUTTON IF I'VE HELPED YOU IN ANY MANNER
My Work:
Mods For Lg L3 E405 Dual
Micromax Canvas Music Kernel Development Thread
How to mod lewa os PIM.apk (sms)
Multi Boot MTK Devices
Custom recoveries for Canvas Music A88 and Canvas 2 A110
Micromax Canvas Music Custom Rom's Patches
MT6577 Auto Focus Fix
CWM Recovery
Credits to dansh for build the first version of CWM Recovery for E405, all below versons are mine with changes
(See video tutorial if having any problem, links below)
1. Download terminal emulator from given links and install it to your E405.
(google play)-https://play.google.com/store/apps/details?id=jackpal.androidterm&hl=en
(apk)-http://www.papktop.com/android-terminal-emulator-1-0-32.html
2. Download the Recovery file from the link.
CWM (normal version for user's not using link2sd and 3 partition system)
http://www.4shared.com/file/PSf8-KOF/cwmrecovery.html?
Stock Recovery
http://www.4shared.com/file/V0-hm93J/recoverystock.html?
3. Connect your E405 to pc in mass storage mode and move/copy 'cwmrecovery.img' to Internal SD (1GB)
4. Run the Terminal Emulator (see video tutorial for ease, links below)
Now, type the following commands-
after $ type
su (press enter) (terminal'll ask for superuser permission, grant it)
you'll see this
#
now type after #
dd(single space here)if=/sdcard/cwmrecovery.img(single space here)of=/dev/block/mmcblk0p17 (press enter)
above command should look like this in terminal-
$ su
# dd if=/sdcard/cwmrecovery.img of=/dev/block/mmcblk0p17
you'll see 'some records in some records out etc etc'
press the back soft-key to exit the terminal.
you can use 'recoverystock.img' by just replacing 'cwmrecovery.img' in all commands.
You can reboot to recovery by pressing and holding volume up (or down, hard reset gone, you can use recovery to reset your phone now) when the device is powering on.
See the images to know how to make a back up using CWM Recovery.
Videos-
Old Recovery Wroking-
http://www.youtube.com/watch?v=y7vckwBHWyY&feature=youtu.be
VIDEO TUTORIAL-
http://www.youtube.com/watch?v=8r8YpHQJTeo&feature=youtu.be
UPDATE:
New CWM Recovery for link2sd and 3 partition system users.
Flash using old CWM Recovery and reboot to recovery.
http://www.mediafire.com/?s1bgcmf80a87xbd
Features of link2sd version-
This will mount and backup in third partition of ur sd card instead of first
1st-fat (smallest size) <--------- Previous recovery backup and mount location
2nd-EXT4/3/2 1gb
3rd-Fat32 (rest of the space) <--------- this recovery mount and backup in this partition.
this version will make backup of
system, data, cache, recovery, boot and also .android-secure
Another version is under testing
Features-
will backup sd-ext (all apps linked by link2sd)
wipe option added for sd-ext
complete backup of the phone (nothing left)
test backup was of size 1.5 gb
will be out soon.
PLEASE SUBSCRIBE, RATE AND PRESS THANX BUTTON IF I'VE HELPED YOU IN ANY MANNER
Link2SD
1. Download and install Link2D from any given link.
2. Root your phone (if not rooted) (guide is previously posted on the page).
3. Download a Partition manager (Link given).
4. Insert your card in card reader and back up all your files to the computer because partitioning will wipe your data.
5. Open Mini Tool (partition manager's name) in your computer. Locate your SD card (be careful in choosing and make sure not to choose the drive of your computer).
6. Right click and choose Delete.
7. Again Right click and create a FAT (not fat32) PRIMARY partition and choose the smallest size possible.
8. Then create a EXT2 PRIMARY partition of 1 GB (not bigger) which will be used with Link2SD.
9. Create a FAT32 partition for the remaining space left on the SD card, by the same way you created EXT2.
10. Click the “Apply” button on the top left corner and wait for it to finish the process. Done.
11. Put back your SD card to your phone and switch it on.
12. Open Link2sd. You will be prompted to choose between ext2, ext3, ext4 and FAT32. Select ext2. (ext4 is also working in my case, try if working for u)
13. It will say mount script created. Reboot your phone now.
14. Open link2sd and if the message doesn’t show up, you succeded.
15. Go to Link2sd>Settings>check the autolink (to automatically move apps upon installation) (Optional).
16. If you already have some apps, select “move to phone” then after moving select “Create Link” (be sure to check the three files: app, dalvic-cache and library files).
Links:-
Partition manager- http://download.cnet.com/MiniTool-Partition-Wizard-Home-Edition/3000-2094_4-10962200.html
Link2SD (google play)- https://play.google.com/store/apps/details?id=com.buak.Link2SD
Link2SD (APK)- http://dl.apktops.com/app/201208/Link2SD_2.2.1.apk
Note: EXT2 is old, EXT4 is the fastest among 3 (EXT2,EXT3,EXT4) but not compatible in all ROMS and often requires kernel that supports EXT4.
So you can/should try all of them and keep the best one that works with your rom.
PLEASE SUBSCRIBE, RATE AND PRESS THANX BUTTON IF I'VE HELPED YOU IN ANY MANNER
Move All Existing Apps to the SD Card (internal sd) WITHOUT ROOTING
NOTE:don't move launchers, widgets and all the apps that you want to keep running when your phone is mounted or when you just switched it on, till external memory prepares. u can not use widgets if the are moved to sd
Tools required-
1. Drivers of your phone
2. Oracle’s Java JDK
3. Android SDk
# As in this tutorial, you have to connect your phone to pc in ‘pc software’ mode, so you have to install all the drivers in your pc, required by your phone. Look on official site of your phone to download the drivers or search for a cd/memory card in the phone box.
For LG Drivers, download and install in pc from here (around 10mb file, see image to know what to download)
Link-http://www.lg.com/in/support-mobile/lg-E405
(see bottom half of the image to know what to download)
1. Enable USB Debugging
Open the Settings screen, tap Applications, and select Development.
Tap the USB Debugging checkbox to enable it.
You may want to disable debug mode after completing this process.
#if USB Debug is grayed and u are not able to tick it, just in case, then plug your device to pc via data cable and connect in 'pc software' mode. now go to above said location in you phone and enable usb debug now.
# (If you don’t already have Oracle’s Java JDK installed on your computer, you’ll have to download and install it before installing the Android SDK ie mentioned in next step)
link for Oracle’s Java JDK-http://www.oracle.com/technetwork/java/javase/downloads/jdk7u9-downloads-1859576.html
(check " Accept License Agreemen" and click "jdk-7u9-windows-i586.exe" on this page)
2. Install the Android SDK
link-http://developer.android.com/sdk/index.html
(click "Download the SDK for Windows")
#note the path of installation, you'll need it later OR change the location of android sdk to a simpler path like root directory (C: or D: etc) for ease.
3. After you’ve installed both, JDK first and then Android SDK,
launch the SDK Manager from your Start menu.
Click on Start-> All Programs-> Android SDK Tools-> SDK Manager
Android SDK will open.
4. Now uncheck all check boxes (if checked by default) and select "Android SDK Platform-tools" and click the Install button to download and install it.
5. After the process completes, connect your Android device to your computer with USB cable (if not connected in step 1 or removed after it, you may have to enable usb debug again, plz refer to step 1 now).
Windows should locate the device and install the appropriate drivers automatically. If it doesn’t, you may have to download and install the appropriate drivers from your Android device’s manufacturer. Do not mount the device after connecting it – just plug it in. Use "PC Software" instead.
6. Open a Windows Explorer window and navigate to the android-sdk\platform-tools folder.
On x64 Windows, you’ll find this folder at C:\Program Files (x86)\Android\android-sdk\platform-tools by default.
Check C:\Program Files\Android\android-sdk\platform-tools if you’re using a 32-bit version of Windows.
#This will be the path where you have Android SDK in step 2.
i've told u to note it.
now plz look where u've installed it.
7. Launch a Command Prompt window (CMD) in this folder.
For this, press and hold shift key, right or left shift doesn't matters
right click anywhere (holding the shift) in empty space and select "Open command window here".
CMD will open.
8. Now type "adb devices" and press Enter.
You should see your connected Android device.
9. Now at last, type the following and press enter to set the default install location to your SD card:
ALL THE COMMANDS ARE CASE SENSITIVE
adb shell pm setInstallLocation 2
If you want to revert this change later and install apps to the internal storage by default, run this command:
adb shell pm setInstallLocation 0
code meanings-
0-auto
1-internal storage
2-external storage
(optional)
to know where the apps will be stored now run the following command
adb shell pm getInstallLocation
the result will be 2, ie external storage.
10. Now close CMD, disconnect your Device and start moving apps to sd without root
In you device, open the Settings screen, tap Applications, and select Manage Applications. Select the app you want to move and tap the Move button on its details screen.
PLEASE SUBSCRIBE, RATE AND PRESS THANX BUTTON IF I'VE HELPED YOU IN ANY MANNER
UNBRICK YOUR LG OPTIMUS L3 E405 and E400 WITH KDZ UPDATER
No. of steps-15
LET THE PHONE CHARGE OR AN HOUR OR TWO OR MORE
DISABLE YOUR ANTIVIRUS TEMPORARILY
1. Download LG Optimus L3 USB Driver
2. Download LG Optimus L3 stock firmware/rom from the page given at the end. (according to your network provider and country)
3. Download and extract KDZ updater on desktop or in any directory.
4. Install Microsoft XML parser (by running msxml.msi in the extracted folder)
5. Restart your computer.
6. Now, switch off your phone (ignore this, as assumed you can't even switch it on kidding)
7. Remove the battery and reinsert it. Press and hold Volume Up button and Volume Down button together. While you are pressing both buttons, press the Power/Lock button. DON'T LEAVE VOLUME UP DOWN BUTTONS TILL YOU GET TO EMERGENCY MODE (yellow screen with Emergency mode written on it). ALSO DON'T REMOVE THE BATTERY ONCE YOU REACHED EMERGENCY MODE.
8. Connect your phone to the computer via the USB Cable.
9. Run KDZ updater as Administrator.
10. Choose the following options in KDZ Updater (also see image):
Type: 3GQCT
Phone Mode: DIAG
KDZ file is the one you downloaded in step 2
CHOOSE CORRECT OPTIONS & RECHECK THEM TWICE OR THRICE!!
(these settings are for l3 only don't try on any other random phone)
11. Click 'Launch Software Update' and pray to god.
12. Go for a walk or talk to the mirror as it will take a while for the rom to be flashed.
13. At last you will se 'Finished'. Your phone will be switched off, switch it on normally. (or it can restart by itself, wait for about half minute before trying to switch it on)
14. It will take more time in switching on once, after that you can use it normally.
15. It is preferable to do a hard reset after flashing by this method.
LG Optimus L3 USB Driver
Link-http://www.lg.com/in/support-mobile/lg-E405
LG Optimus L3 stock firmware/rom
Link-http://lg/-phone-firmware.com/index.php?id_mod=11
KDZ updater
Link-http://www.unclenet.de/files/KDZ_FW_UPD_EN.7z
PLEASE SUBSCRIBE, RATE AND PRESS THANX BUTTON IF I'VE HELPED YOU IN ANY MANNER
How to use game gardian
Wanna cheat in any game???
download game gardian and follow the instructions (pics)
apk:
http://www.mediafire.com/?lumaz3036caain0
mirror:
http://www.mediafire.com/?sdh57bfv9krk559
PLEASE SUBSCRIBE, RATE AND PRESS THANX BUTTON IF I'VE HELPED YOU IN ANY MANNER
MOUNT LINK2SD PARTITION (i.e. EXT PARTITION) AS SYSTEM MEMORY (i.e. 157 mb default)
this is for the partition structure created to use with link2sd (ie fat, ext, fat32)
REMOVE ALL SCRIPTS U ARE USING TO MOUNT EXT PARTITION AND MAKE A TITANIUM BACKUP OF ALL APPS
FLASH THE ATTACHED BOOTINT.IMG USING CWM (DO A NANDROID BACKUP FIRST AND RESTORE DATA ONLY AFTER FLASHING)
OR
extract init.rc of boot.img and edit it. (for extracting u need Cygwin for windows and dsixda-Android-Kitchen or kernel kitchen, google about them)
do the following in init.rc
1. search 'on fs'
on fs
comment out 'mount yaffs2 [email protected] /data nosuid nodev' with #
like this
# mount mtd partitions
# Mount /system rw first to give the filesystem a chance to save a checkpoint
mount yaffs2 [email protected] /system
#mount yaffs2 [email protected] /system ro remount
#mount yaffs2 [email protected] /data nosuid nodev
mount yaffs2 [email protected] /persist nosuid nodev
mount yaffs2 [email protected] /cache nosuid nodev
mount yaffs2 [email protected] /persist nosuid nodev
now on 'on emmc-fs'
replace
wait /dev/block/mmcblk0p21
exec /system/bin/demigod_make_ext4fs -l 160M /dev/block/mmcblk0p21 /data
exec /system/bin/e2fsck -y /dev/block/mmcblk0p21
mount ext4 /dev/block/mmcblk0p21 /data nosuid nodev noatime barrier=1 data=ordered noauto_da_alloc errors=continue
with
wait /dev/block/mmcblk1p2
wait /dev/block/mmcblk1p2
wait /dev/block/mmcblk1p2
exec /system/bin/demigod_make_ext4fs -e /dev/block/mmcblk1p2 /data
exec /system/bin/e2fsck -y /dev/block/mmcblk1p2
mount ext4 /dev/block/mmcblk1p2 /data nosuid nodev noatime barrier=1 data=ordered noauto_da_alloc errors=continue
save it
pack the boot.img and flash it using cwm
if u have any cwm flashable package with u then extract 'META-INF>com>google>android>updater-script' and edit it with notepad++
delete everithing it it and paste this
run_program("/sbin/busybox", "mount", "/system");
package_extract_file("boot.img", "/tmp/boot.img");
assert(run_program("/system/bin/dd", "if=/tmp/boot.img", "of=/dev/block/mmcblk0p9")=="0");
run_program("/sbin/busybox", "umount", "/system");
save it and drag and drop it to it's location, i.e. 'META-INF>com>google>android> here'
now drag and drop boot.img in the zip (no folder, the zip itself)
make a nandroid backup and flash this.
now, advance restore ONLY data using cwm recovery and reboot
PLEASE SUBSCRIBE, RATE AND PRESS THANX BUTTON IF I'VE HELPED YOU IN ANY MANNER
MOUNT EXTERNALSD AS INTERNALSD
THIS MOD IS UNDER TESTING, PLEASE DON'T REPORT BUGS
edit init.rc and do search this
#exec /system/bin/resize2fs /dev/block/mmcblk0p20
now remove all # from
# [START] LGE_USE_INTERNAL_FAT
#wait /dev/block/mmcblk0p20
#exec /system/bin/resize2fs /dev/block/mmcblk0p20
#exec /system/bin/e2fsck -y /dev/block/mmcblk0p20
#mount vfat /dev/block/mmcblk0p20 /mnt/sdcard
# [END] LGE_USE_INTERNAL_FAT
to make it like to like like this
# [START] LGE_USE_INTERNAL_FAT
wait /dev/block/mmcblk1p3
exec /system/bin/resize2fs /dev/block/mmcblk1p3
exec /system/bin/e2fsck -y /dev/block/mmcblk1p3
mount vfat /dev/block/mmcblk1p3 /mnt/sdcard
# [END] LGE_USE_INTERNAL_FAT
add this above "mount vfat /dev/block/mmcblk1p3 /mnt/sdcard" if not mounting
unmount /dev/block/mmcblk0p20
OR FLASH THE ZIP
PLEASE SUBSCRIBE, RATE AND PRESS THANX BUTTON IF I'VE HELPED YOU IN ANY MANNER
ICS THEME FOR STOCK ROM (see images)
THIS IS FOR TESTING ONLY. IF WORKING, PLEASE COMMENT. THEN I'LL UPDATE THE THEME WITH MORE THEMED APP (only UI is themed in this version)
Flashing this is simple as 1, 2 and 3.
1. download and move/copy both zips to internal/external sd card
2. reboot to recovery and make a nandroid backup.
3. flash "1.zip" (from where u've placed it in step 1)
4. reboot.
if there is no bootloops and the phone starts up normally the proceed, otherwise restore cwm backup from recovery.
5. reboot to recovery and flash "2.zip"
6. reboot.
Enjoy
Zips:-
http://www.mediafire.com/?s5jv658c6ujoj4x
http://www.mediafire.com/?a5nr8m75k453ars
PLEASE SUBSCRIBE, RATE AND PRESS THANX BUTTON IF I'VE HELPED YOU IN ANY MANNER
thanks mate .
this is exact what I want!
needs to test some of them
there is one question
are you done all this things on your lg e 405 dual sim and is your phone work still normally? )
and is there any bug after rooting the phone I means some ppl says get buged in wifi or something like that...
thanks
x625 said:
thanks mate .
this is exact what I want!
needs to test some of them
there is one question
are you done all this things on your lg e 405 dual sim and is your phone work still normally? )
and is there any bug after rooting the phone I means some ppl says get buged in wifi or something like that...
thanks
Click to expand...
Click to collapse
i've tested all of them and rotting doesn't caused any bug in my case.
Im very glad to see you support here .
I newly bought a L3 E405 dual and had some trouble with it.
1)
firstly I must thank you for your rooting method (post #1) it worked for me and I my biggest problem solved.. millions of thanks to you my bro.
2)
But after a wile I encountered another major trouble . the phone extremely rapidly get fulled (internal system usable memory is only 157 mb!!! wtf!
although i have bought and installed an external sd card it is completely useless and even using app2sd apps on market many apps leave half of size on system memory some other apps dont support app2sd feat. and in result after installing 10-15 little routine apps (not games just needed essential apps) the phone get notification of low size and hangs and stop wifi and ... I installed external sd card on this phone but it is completely useless coz even app2sd moved apps take size on internal sd card not external!!! why !!!
now how could I overcome this problem with best and simple revertable steps? I know you posted some solution before but I want to know which method you personally recommend duo to you said some method still in test mod and im noob in android & adb & programming and dont want to breik my phone.
my phone has 2 year exchanging guaranty and dont want to void it i Know I already voided it because successfully rooted it with your method before but i think I can unroot it with that button on superoneclick software again.
3)
I only rooted my phone but still having fear to instal CWM on it . is that ok also to install CWM also? I just have low system memory problem and dont want any tweaks on my phone if they aren't necessary for it. my other season of fear is I didnt find my installed firmware county code . my phone is on V10G version sw but there are many E405 V10G firmware in here I dont know which is mine . and my living country in not listed there ( how could i find my firmware locale on my E405??
and more Q
what is the difference & benefit and advantages of link2sd over app2sd apps? I mean why we must use complicated steps of link2sd (partitioning & needs roots and ... when there is simple app2sd feat of our native android phone enhanced with app2sd apps on market? I dont got that ??
in your post #7 line #3 you said :
FLASH THE ATTACHED BOOTINT.IMG
and in end of post #8 you said:
OR FLASH THE ZIP
I cant see any attached ZiP files on that posts where could I find them?
in recovery mod tweak post you said you are preparing another new version of recovery soon . is there any new news ? i m so exited approximate date of release
thank you so so much for your helps
U already helped me so much for rooting my phone
million million tanks!!
and sory for such long story
x625 said:
Im very glad to see you support here .
I newly bought a L3 E405 dual and had some trouble with it.
1)
firstly I must thank you for your rooting method (post #1) it worked for me and I my biggest problem solved.. millions of thanks to you my bro.
2)
But after a wile I encountered another major trouble . the phone extremely rapidly get fulled (internal system usable memory is only 157 mb!!! wtf!
although i have bought and installed an external sd card it is completely useless and even using app2sd apps on market many apps leave half of size on system memory some other apps dont support app2sd feat. and in result after installing 10-15 little routine apps (not games just needed essential apps) the phone get notification of low size and hangs and stop wifi and ... I installed external sd card on this phone but it is completely useless coz even app2sd moved apps take size on internal sd card not external!!! why !!!
now how could I overcome this problem with best and simple revertable steps? I know you posted some solution before but I want to know which method you personally recommend duo to you said some method still in test mod and im noob in android & adb & programming and dont want to breik my phone.
my phone has 2 year exchanging guaranty and dont want to void it i Know I already voided it because successfully rooted it with your method before but i think I can unroot it with that button on superoneclick software again.
3)
I only rooted my phone but still having fear to instal CWM on it . is that ok also to install CWM also? I just have low system memory problem and dont want any tweaks on my phone if they aren't necessary for it. my other season of fear is I didnt find my installed firmware county code . my phone is on V10G version sw but there are many E405 V10G firmware in here I dont know which is mine . and my living country in not listed there ( how could i find my firmware locale on my E405??
and more Q
what is the difference & benefit and advantages of link2sd over app2sd apps? I mean why we must use complicated steps of link2sd (partitioning & needs roots and ... when there is simple app2sd feat of our native android phone enhanced with app2sd apps on market? I dont got that ??
in your post #7 line #3 you said :
FLASH THE ATTACHED BOOTINT.IMG
and in end of post #8 you said:
OR FLASH THE ZIP
I cant see any attached ZiP files on that posts where could I find them?
in recovery mod tweak post you said you are preparing another new version of recovery soon . is there any new news ? i m so exited approximate date of release
thank you so so much for your helps
U already helped me so much for rooting my phone
million million tanks!!
and sory for such long story
Click to expand...
Click to collapse
u can use lik2sd as you are not much familiar with android. i'll recommend to mount a EXT4 partition as your /data as this is better than link2sd (my personal opinion) but link2sd is fine and simple. and mounting EXT4 as /data will also give you large space for application's data also, which is not possible with link2sd. try using link2sd, you'll get to know what i am talking about.
which country do you belong?
CWM is must. as in any case, if you are unable to boot your phone than there is only kdz method to recovery, other then restoring CWM backup. and cwm backup restoration is much easier, better and safe than using kdz. also for flashing/installing .zip, you'll need CWM Recovery.
in any case you want to go back to stock recovery, u r free to do so.
app2sd will only move your apps to internal sd but link2sd will link them on your external sd. in app2sd apps will take a small amount of storage of your system memory while in link2sd only data will remain in system memory.
sorry about the zips. zips of recovery and boot are ready and uploaded on mediafire and on my blog, will add them here if few days.
thanks for quick reply.
you helped me a lot.
idont know how to appriciate you.
I done it (link2sd tweak) . I created ext2 partition on sd with pc partition manager (step1). and then on my phone I run link2sd app and run ext2 scrip (step2). and worked good.
you mentioned I can also use ext4. you meanthat I replace any ext2 with ext4 format in step1 or step 2 only ?? or in both steps must use ext4 choice??
and what is the pros and cons of using ext4 instead of normal ext2 . and is the stock kernel support this format officially?
Im on 2.3.6 with build number GRK39F sofware version V10g 15 nov -2012 . and my country is IRAN .and my phone firmware handle persian (farsi) languge characters (not only arabic) in menu and keyboard and dont want too loose that after update or installing new firmware for this reson I need to find my own phone firmware version but in lg-phone-firmware.com there is no any iran country ?
could you please tell me what is the exact step by step method of reinstalling stock firmware after I mesed up somethig ? you said it is better and safer flash firmware with CWM but i dont know how do that . is that possible to explain more this TWO different ways separately (kdz way and recovery way) . thank a lot .
yes stock kernel support EXT4, you can replace EXT4 in every step your've done with EXT2.
how to flash kdz has been already posted. and for cwm recovery. once you are in cwm recovery, you can see backup and restore. select it to backup to external or internal sd, similarly, use it to restore an old backup.
you can make a backup of current rom, can do anything you want and if anything wrong happens, just restore your backup.
Wow!
Finally i have done it?
Now i have cwm with supported backup to external sd. + link2sd with ext4 . script.
You are my hero sudeep!
Now im waiting for more and more SIMPLE FLASHABE tweaks from you not just working with terminal command.
Maye be you release your final version of your custom rom !!
Anyway i always checks this topic and thanks so so much to you
Sent from my LG-E405 using Tapatalk 2
Another good tweak for gaming
Try using Chainfire3D (Gingerbread)....It improves GPU a lot
Best Regards
Has anyone heard of any other tweaks improving L3 performance on CM9?
Will Chainfire 3D be working on ICS ?
nice
i've rooted my phone like in thread, and i can use apps that needs root perms (like link2sd)
but when i use Android Commander, i get Root Acess: NO
what to do?

[WIP][ThinkTank] Alternate Boot Methods (Safely boot CM10 from usb)

This thread is for brainstorming and developing safe ways of booting our OUYAs to use custom ROMs.
I've developed an initial method that allows OUYA to boot CM 10 from a usb thumb drive that does not require you to mess with any of your internal storage at all! This allows you to keep your OUYA in pristine stock condition, while still enjoying CM 10 from an external thumb drive.
Unfortunately it does require you to setup the thumb drive in a particular way to allow it to be used and this may be difficult for some users without Linux experience. I hope some will find it useful and plan to develop easier methods in the future (probably involving a custom recovery image with the ability to setup the thumb drive for you)
I plan to post more details on how I achieved this so that others can use the knowledge and apply it to other roms or develop improved solutions, but I might work on some other things first. Mainly it involved unpacking/repacking the Android boot.img (google it and there are tutorials about how to do this, I also recommend checking out the "abootimg" program from the Ubuntu packages) and modifying a couple of the init/fstab files.
Note that the zip I am going to link to is not a flashable zip, extract it and follow the instructions in the README which I am including below. Also note the the Google apps are not included - so if you want them you will need to add them yourself. Just be aware things you add to the system partition will need correct permission set.
One of my other ideas I'm going to eventually try is swapping the boot/recovery partitions so that the device normally boots up into recovery and then will have an option to reboot into the recovery partition which would actually boot a full rom for regular use. This may still be dangerous on OUYA though, so is not recommended unless you know what you're doing. I have a Notion Ink Adam which I can boot into APX mode (a low-level nVidia recovery mode that can be used to restore the device in the case of bricking, unfortunately we do not have this level of acces on OUYA), so it will be much safer for me to experiment on it. I haven't really developed on it before though (in fact this OUYA bit is my first major Android development apart from doing/tweaking some CM builds from source myself for some of my devices), so it may take me some time to set stuff up to experiment with it.
Eventually I think we need some form of bootloader for the OUYA. I have read about some very interesting kexec hardboot patches that were developed for the original Nexus 7 that it would be very awesome if we could port to OUYA - that would allow us to boot the patched kernel and have it boot us into kernels/roms stored elsewhere.
Please post any feedback or ideas. Sorry the current method isn't that easy yet and I hope the instructions make sense - hopefully others can also help clarify.
If you'd like to donate to me, I'm certainly not going to turn you away, but keep the other devs in mind 'cause I haven't done that much yet! ( PayPal: [email protected] )
~Troop
ouya-sda123-boot by Trooper_Max
Safely boot your OUYA to CM 10 without messing with your internal storage! (fast thumb drive recommended!)
========
Credits:
========
khanning88 for the initial CM10 Experimental ROM - this is just a repackaging/reconfiguration of it.
mybook4, sonofskywalker3, rayman, professorpoptart for their CWM recovery
And of course the CyanogenMod/ClockworkMod team for the basis of everything!
=========
Contents:
=========
ouya-cm10-system.img:
ext4 system image dumped from CM 10 experimental OUYA rom
ouya-sda123-boot.img:
Android boot.img to boot CM 10 from thumb drive partitions (details below)
==============
Prerequisites:
==============
For this current method, you will need to be able to partition the thumb drive into three ext4 partitions. This probably means you need Linux - if you don't have a Linux system, I highly recommend checking out pendrivelinux.com for methods of booting Linux off of a thumb drive (I recommend Ubuntu 12.04 LTS or whatever version you are comfortable with).
I hope to develop more methods in the future that will be easier than this, but this is the initial method.
=============
Instructions:
=============
1. Partition the thumb drive with three ext4 partitions - note that they must be the first three partitions on the thumb drive, and I would likely just dedicate a thumb drive to this. I recommend using Disk Utility or gparted (usually both available from an Ubuntu thumb drive).
* The first partition will be the data partition and should be the largest
* Note that Android will create the virtual sd card at /data/media
* The second partition will be system (OUYA internal system is 512 M)
* The third partition will be cache (OUYA internal cache is 768 M)
* Feel free to adjust the size of the partitions, but I'd recommend sticking close to the stock sizes
* I've tested this on an 8 GB as well as a smaller 4 GB thumb drive, bigger should not be a problem
2. Note the device name of your thumb drive - It will likely be sdX where X is a letter corresonding to the order it was mounted in - I would expect it to be sdd if it happens to be the fourth drive connected to your machine. The system partition will then be sdX2.
3. Write the ouya-cm10-system.img to the second partition of the thumb drive. It is crucial that the files get copied into the partition with the correct permissions.
* The easiest way to ensure this is to use dd to do a byte for byte copy of the system image directly over the partition, but this is also very dangerous if you type it wrong, so be sure you have the write device name for your thumbdrive.
* I recommend looking in the Disk Utility or gparted, or running "mount", "df -h", and "cat /proc/partitions", to make sure you have an understanding of what drives are what device names before continuing
* Once you are certain of the device name, ie sdX2, where X is the letter for the thumb drive and 2 denotes the second partition which we are using as system, run "dd if=ouya-cm10-system.img of=/dev/sdX2 bs=4M" as administrator (on Ubuntu either by sticking the word "sudo" in front of the command or running "sudo su" first to switch to root)
* This command will not show any output until the end and may take a little while.
4. Clean/fix the filesystem and resize the filesystem to fill the partition.
* Run "esfsck -fp /dev/sdX2" as administrator
* Run "resize2fs /dev/sdX2" as administrator
5. Thumb drive is now ready (the data/cache partitions can be empty ext4, Android will fill them in). Connect it to the OUYA. Through a hub is fine - just be sure it is the only thumb drive connected at boot.
6. Boot the OUYA into fastboot mode. The only real way to do this right now is to first boot up the OUYA normally, then use "adb reboot bootloader" to reboot into the bootloader. You should be able to run "fastboot devices" then and see a device listed.
7. Boot ouya-sda123-boot.img using the command "fastboot boot ouya-sda123-boot.img". You should see it download to the OUYA and it should start booting.
8. Wait patiently. Remember that CM boots slow the first time and depending on the speed of your thumb drive may boot even slower. You can however type "adb devices" to see if it has started the adb daemon. If you don't see a boot animation after a while, you can try running "adb shell" and if you get a permission error, it probably means you didn't flash the system partition correctly, but hopefully all goes well. Note though that once it gets farther into the boot sequence it will turn off the adb daemon so you will lose adb access until it boots up and you can re-enable it.
9. Enjoy CM 10 on your OUYA without having messed with your internal storage! Just be sure not to let your OUYA fall asleep, as it may not be able to wake back up! I'm guessing this is because I was using a hub and so when it falls asleep, the thumb drive essentially gets disconnected and it cannot immediately find it again when it tries to resume. I'd recommend using a wakelock application or power toggle to keep the screen on all the time, etc.
========
For Help
========
Look for us on the XDA Developers Forum under the appropriate threads! Keep in mind that using this method to boot CM 10 may introduce new bugs that would not have occurred using CM 10 the regular way, so be sure to report problems in the appropriate place and mention what methods you used!
Click to expand...
Click to collapse
http://troopermax.com/releases/ouya-sda123-boot.zip
(be gentle - it's 145 MB, I use shared hosting, so feel free to mirror)
md5sum: 49c8e16e27b6deb9d1e8e86363b56f2f
Mirror: http://www.mediafire.com/download/hban76kzeys6ybd/ouya-sda123-boot.zip
~Troop
I'm including some rough developer details here for now about how I did it.
Many thanks once again to the OUYA CWM recovery, I found it insanely useful: http://forum.xda-developers.com/showthread.php?t=2295645
The main part was unpacking/modifying/repacking the boot.img (which contains the kernel/ramdisk/etc)
abootimg helped with this greatly:
http://manpages.ubuntu.com/manpages/precise/man1/abootimg.1.html
Then I followed instructions I found via google for unpacking/repacking the ramdisk:
http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
The partitions the OUYA uses are mostly defined in fstab.cardhu:
# Android fstab file.
#<src> <mnt_point> <type> <mnt_flags> <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
# We remount because we first mount as rw in order to generate NVSI symlink. See init.rc for details.
/dev/block/platform/sdhci-tegra.3/by-name/APP /system ext4 ro,remount wait
/dev/block/platform/sdhci-tegra.3/by-name/CAC /cache ext4 noatime,nosuid,nodev,journal_async_commit,data=writeback,nodelalloc,errors=panic wait
/dev/block/platform/sdhci-tegra.3/by-name/UDA /data ext4 noatime,nosuid,nodev,journal_async_commit,data=writeback,nodelalloc,errors=panic wait,encryptable=/dev/block/platform/sdhci-tegra.3/by-name/MDA
Click to expand...
Click to collapse
I found that I could use fastboot to boot into the CWM recovery and then use adb pull to dump images of the internal OUYA partitions, using the paths above, ex. "adb pull /dev/block/platform/sdhci-tegra.3/by-name/APP ouya-system.img" to dump the system partition. I did a regular clockwordmod backup first, but adb pull was useful here for pulling raw images.
So after backing up my OUYA stock system, I actually did flash the CM10 rom so that I could dump the partitions to my computer using adb. The main reason I did this was to ensure the system partition gets generated with the correct permissions. I didn't boot into CM10 though, though I was tempted. Instead I restored back to my backup to put my OUYA back in stock condition.
With the system image dumped into a file, I used resize2fs to shrink the file to the minimum size (resize2fs -fM ouya-system.img) This probably wasn't absolutely necessary since it would compress down in the zip, but this allows it to be written to smaller partition sizes.
http://manpages.ubuntu.com/manpages/precise/en/man8/resize2fs.8.html
Here is what I modified the fstab.cardhu to:
# Android fstab file.
#<src> <mnt_point> <type> <mnt_flags> <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
# We remount because we first mount as rw in order to generate NVSI symlink. See init.rc for details.
/dev/block/sda2 /system ext4 rw wait
/dev/block/sda3 /cache ext4 noatime,nosuid,nodev,journal_async_commit,data=writeback,nodelalloc,errors=panic wait
/dev/block/sda1 /data ext4 noatime,nosuid,nodev,journal_async_commit,data=writeback,nodelalloc,errors=panic wait
Click to expand...
Click to collapse
Pretty straightforward, except that I removed the encryptable part on /data (not sure how that bits work and if I might have broken it) and made system read/write.
Also note, that I removed the initial read/write mounting of system in init.cardhu.rc since I was having trouble with it mounting from there (I'm guessing because my usb hub/thumb drive weren't yet available when that tried)
Here's the relevant part of init.cardhu.rc:
Before:
on fs
setprop ro.crypto.tmpfs_options size=128m,mode=0771,uid=1000,gid=1000
setprop ro.crypto.umount_sd false
# PLEASE DO NOT REMOVE NVSI SYMLINK! IF CHANGES ARE NEEDED PLEASE ENSURE THAT NVSI SYMLINK IS ALWAYS CREATED.
# Mount system to allow NVSI symlink
mount ext4 /dev/block/platform/sdhci-tegra.3/by-name/APP /system rw
# Create NVSI filter symlink
symlink /data/data/com.nvidia.NvCPLSvc/files/com.nvidia.nvsiutilv1.xml /system/etc/permissions/com.nvidia.nvsiutilv1.xml
mount_all /fstab.cardhu
#chmod for OUYA parameters
chmod 0644 /dev/block/mmcblk0p5
Click to expand...
Click to collapse
After:
on fs
setprop ro.crypto.tmpfs_options size=128m,mode=0771,uid=1000,gid=1000
setprop ro.crypto.umount_sd false
# PLEASE DO NOT REMOVE NVSI SYMLINK! IF CHANGES ARE NEEDED PLEASE ENSURE THAT NVSI SYMLINK IS ALWAYS CREATED.
# Mount system to allow NVSI symlink
#mount ext4 /dev/block/sda2 /system rw
mount_all /fstab.cardhu
# Create NVSI filter symlink
symlink /data/data/com.nvidia.NvCPLSvc/files/com.nvidia.nvsiutilv1.xml /system/etc/permissions/com.nvidia.nvsiutilv1.xml
#chmod for OUYA parameters
chmod 0644 /dev/block/mmcblk0p5
Click to expand...
Click to collapse
Basically I commented out the mount command - before it was mounting system read/write for a moment to insert the symlink and let the filesystem update itself before remounting read-only in the fstab. The way I do it now it is simply mounted read/write from the fstab and left that way (some may consider this unsafe, but it is good for development... not too hard to remount it read-only if you so desire) I also shifted the symlink command down below the mount all command so it would hopefully still work... not sure what that was for, but they made it sound really important! XD
I also commented out this part about the usb drive since it doesn't really make sense anymore:
# Mount usb drives as /usbdrive. Generally usb drives are formatted with FAT
# filesystem, so we support FAT as of now.
#on device-added-/sys/block/sda
# mount vfat /dev/block/sda /mnt/usbdrive
Click to expand...
Click to collapse
I think those were all the changes I made before repacking it, though it did take me 5 attempts to get a working ramdisk so I may have lost track of something at some point. Those should be the key changes at least.
I also initially used raw dumps of the data and cache partitions on my thumb drive as well to make sure it would work. Then I tested to make sure it would work if they were empty ext4 partitions, which they do - Android fills them in as necessary. So only the system image was necessary to include. (and of course the boot.img for fastbooting)
This was a little bit harder than I had anticipated because I'd previously only looked into this type of thing for Gingerbread devices which aren't set up the same way. I'd kinda been hoping to get a solution where the user could just drop a system.img and data.img onto a fat32 usb thumb drive and the boot.img would loop mount them off the thumb drive. I haven't tried this for Gingerbread, but it seems pretty straightforward. It's not straightforward anymore here since fat32 sdcards aren't used anymore. Being familiar with Linux though, I am happy they are using ext4 everywhere and using the same space alloation for /data and /sdcard so you don't have to worry about which one to make big, but it does make some things more complicated for more average users. It's probably still possible to get the OUYA to do what I wanted, but more complicated and not sure it's worth pursuing over other methods which may be more fruitful.
Hope that's enough details to enlighten some people who may be wondering about the methods used here. My goal is to not only develop new ways of booting the OUYA, but also to share how I accomplished things so that others can learn from it.
~Troop
Is this similar to the Nook HD + CM10 boot?
---------- Post added at 05:07 AM ---------- Previous post was at 04:58 AM ----------
Wait that was blank a second ago. I am downloading now. I will mirro with my mediafir stuff if I can get it to work.
kairnage said:
Is this similar to the Nook HD + CM10 boot?
---------- Post added at 05:07 AM ---------- Previous post was at 04:58 AM ----------
Wait that was blank a second ago. I am downloading now. I will mirro with my mediafir stuff if I can get it to work.
Click to expand...
Click to collapse
Sorry, I was setting up the posts...
I'm not sure this is similar to any solution currently used on other devices, but I do know that other developers have used similar methods to develop their roms.
I don't have a Nook and haven't looked into what they use too much, but we may very well be able to learn from their work.
~Troop
So I dug up an old nvflash package from my Notion Ink Adam and tested it to make sure it still works (with the Adam in APX mode it allows me to directly flash the device with a new partition layout and flash the partitions directly). After verifying I had it setup correctly, I swapped the boot and recovery images and ran it again and sure enough... now when I boot my Adam normally, the recovery rom comes up, and when I boot my Adam into recovery it loads the normal rom - so the theory seems to work.
So I think the next thing I will try is building a new recovery for OUYA from source and adding an option to reboot into "recovery" to the menu, allowing it to be stored on the boot partition and the real boot.img to be stored on the recovery partition, allowing you to boot the OUYA and it comes up in recovery, then you select the new reboot option and it would reboot into "recovery" which would load a full rom. You could then safely flash boot images to the recovery partition without fear of bricking your device.
I think it should work nicely, but not sure how long it will take me since I need to set my build machine back up.
For those who are confused, read more about how these ideas started below!
~Troop
Trooper_Max said:
I think this is a great idea that needs more attention:
mybook4 said:
Devs, I propose the following to get rid of the potential brick risk:
Since we can't get into recovery manually (via HW buttons), let's reverse the role of SOS (recovery) and LNX (kernel). Since LNX is the booting kernel partition, let's flash recovery there and flash the kernel to the recovery partition. I believe we could do this by modifying the fstab and having our updater-scripts flash to the appropriate partitions.
From a cold start, a user will enter recovery (a minor inconvenience for safety). Depending on how we modify the recovery.fstab, getting to the ROM could be as simple as pressing power twice (recovery does a reboot system now and its fstab has the system actually reboot to the recovery partition, which is the ROM's kernel).
Definitely not straightforward, but should prevent bricks. Thoughts?
Sent from my Nexus 7 using xda premium
Click to expand...
Click to collapse
But then I'm definitely biased, because I had the same idea:
Trooper_Max said:
I agree with everyone it would be nice if we had a hardware means to boot into some kind of recovery or flashing mode to flash stock images.
But I was trying to think if there is anything we can do if we don't get that... (guess that makes me a pessimist >_>)
Let me preface this with don't try anything I'm describing here unless you know what you're doing, these are half-baked thoughts of someone who doesn't even have their OUYA yet:
What if we could swap the boot and recovery partitions? (I haven't received my OUYA yet, so I'm not even aware of what partitions it has, so assuming it has them, and yeah, it wouldn't be quite that simple)
Basically what I mean is when the device tries to boot normally, it would boot up a stable recovery rom. (ie the boot partition that normally has the kernel and then loads the rest of the rom instead just has a recovery rom)
Then you have the recovery partition be what boots the full rom. That way you only chance bricking your device when you flash the boot partition, which if we can get a stable recovery rom that works for this, wouldn't be often. We would probably want to modify the recovery to have a 3 second/configurable timer where if you don't do anything it boots into the "recovery" partition which would boot up the full rom.
Basically the boot partition becomes a new recovery rom which gets used like GRUB to boot into the "recovery" partition which boots up your actual rom, or maybe it could also boot from USB or netboot or whatever...
Pretty much what we need is a solid bootloader, sound about right? Let me know if any of this makes sense/doable or if I'm entirely off base here! I don't know if I will have the time to try any of this when I do get my OUYA, but wanted to share some ideas, please proceed at your own risk!
EDIT: Alternatively, the boot partition could be left stock and the recovery partition could be used as a bootloader to boot into USB or other options for loading roms without messing with the stock boot experience and risking bricking the device. ie in this configuration if you boot your device normally it would be stock, if you reboot into "recovery" it would load up a custom rom. Or instead of a custom rom, a custom recovery with bootloader capabilities.
~Troop
Click to expand...
Click to collapse
And I do plan to try this idea out eventually, but I've got some other ideas I intend to try out first.
The first one I hope to have done by the end of this weekend (hopefully sooner though) is to reconfigure this experimental CM build to be usable without touching any of the internal storage space. I plan to have a modified boot.img that will load system/data/sdcard folders off a usb thumb drive. This method would be completely safe, though a little inconvenient because you would need to use adb to reboot the OUYA into bootloader mode so that you can then fastboot it to load the modified boot.img, but after that it could be disconnected and would be running using only external storage. You're essentially using a computer to jumpstart your OUYA into CM10, while leaving everything on the OUYA itself in pristine stock condition. Then I plan to try out arm versions of adb/fastboot so I can use my tablet or possibly phone (USB OTG) to jumpstart the OUYA instead of having to rely on my computer all the time.
I think this will be an extremely safe way of using external ROMs until we can get some kind of special bootloader figured out.
So if anyone is thinking about trying CM10, but leery of messing with their OUYA, just wait another week or so and I should have a safe, non-intrusive solution worked out!
I welcome any input/thoughts on these ideas! And if anyone knows how to do the things I'm describing and wants to beat me to the punch, feel free and run with these ideas - I won't mind as long as you share your work and give me a little credit if any credit is due!
~Troop
Click to expand...
Click to collapse
I just ordered a 64GB PNY off Amazon. Once I get it Tuesday I am going to try this. I am uploading to my mediafire now to mirror.
Trooper_Max said:
So I dug up an old nvflash package from my Notion Ink Adam and tested it to make sure it still works (with the Adam in APX mode it allows me to directly flash the device with a new partition layout and flash the partitions directly). After verifying I had it setup correctly, I swapped the boot and recovery images and ran it again and sure enough... now when I boot my Adam normally, the recovery rom comes up, and when I boot my Adam into recovery it loads the normal rom - so the theory seems to work.
Click to expand...
Click to collapse
After some more playing with my Adam, I noticed that when I reboot into "recovery" which I have booting a CyanogenMod rom and then I reboot and from the reboot menu select "Reboot", it reboots into CyanogenMod again (even though I didn't expect it to). From the reboot menu I tell it to reboot into "recovery" and it boots into CM again, which that part makes sense, since I have the CM boot image stored in the recovery partition. So I got to thinking that maybe when you tell it to reboot into recovery it sets an SOS signal (the recovery partition is sometimes refered to as SOS) and when you boot a normal rom from recovery, it never clears that signal because it isn't normally booting that way. Whereas a true recovery rom knows it needs to clear that signal so you don't get stuck booting into the recovery rom all the time.
I was close - I scanned the recovery source on CM's github and found this bit:
https://github.com/CyanogenMod/android_bootable_recovery/blob/jellybean/recovery.c said:
// Reset to normal system boot so recovery won't cycle indefinitely.
struct bootloader_message boot;
memset(&boot, 0, sizeof(boot));
set_bootloader_message(&boot);
Click to expand...
Click to collapse
So there seems to be a "bootloader message" that tells it whether to boot from the boot or recovery partition. I was going to say we need to be careful how we reboot the device and probably modify the custom rom to be able to reset the boot message, but I just realized we can do better and use this to our advantage. We could set our custom rom to always clear the boot message so that you have to go through the recovery rom each time to boot the system normally, but we could also have the option of selectively resetting the bootloader message - purposefully get ourselves stuck rebooting into "recovery" all the time because that is our normal rom, then from our normal rom have the option of resetting the bootloader message when we want to go into our recovery image stored on the boot partition.
Something to think about - I don't like getting stuck out of my recovery image either, so we gotta be sure we can reset the bootloader message when we need to... I'm going to play with this some more tomorrow, but not sure how far I will get.
EDIT: More info on the bootloader message - seems it is stored on the misc partition. The more I think about this too, the more I'm not sure swapping the boot/recovery is much safer - if we had them swapped, but then the rom gets stuck in a boot loop before it can reset the bootloader message, we'd be stuck always booting into "recovery" and into the boot loop, so we'd be in just as much trouble as if we'd gotten our boot partition to cause boot loops. So whereas normally flashing the boot partition is potentially dangerous, in this scenario flashing the recovery partition would be potentially dangerous - you gotta be sure it's going to be able to reset the bootloader message. We could try to mitigate this by modifying the boot process to reset the bootloader message very early in the boot process (ie before the potential bootloop) so that if we get stuck, the next time we reboot, we'll reboot normally into the recovery rom.
But then we could also do just the opposite of that without swapping the boot/recovery partitions - very early in the boot process, modify the bootloader message to tell the bootloader to boot into recovery - that way if we get stuck the next time we boot up will be into recovery. Then later when the system successfully boots, we could reset the bootloader message so that after a successful boot the next boot will be another normal one instead of into recovery. If we get this right a failed boot would automatically take us to recovery on the next boot, while a successful boot would boot normally on the next boot. So this would be a way to build in some "brick-protection" into the boot.img to make it safer to flash. It'd probably be safest to not reset the bootloader message until the user actually selects the shutdown option - that way any abnormal reboot would cause it to come up into recovery mode.
So I'm not sure swapping boot/recovery partitions really buys us anything anymore, since it also swaps which partition is potentially dangerous to flash. The solution in either case is going to be to cleverly manipulate the bootloader message as described above. So we might just want to not swap them to minimize confusion and focus instead on building "brick-protection" like this into our boot images.
https://github.com/CyanogenMod/android_bootable_recovery/blob/jellybean/bootloader.h said:
/* Bootloader Message
*
* This structure describes the content of a block in flash
* that is used for recovery and the bootloader to talk to
* each other.
*
* The command field is updated by linux when it wants to
* reboot into recovery or to update radio or bootloader firmware.
* It is also updated by the bootloader when firmware update
* is complete (to boot into recovery for any final cleanup)
*
* The status field is written by the bootloader after the
* completion of an "update-radio" or "update-hboot" command.
*
* The recovery field is only written by linux and used
* for the system to send a message to recovery or the
* other way around.
*/
struct bootloader_message {
char command[32];
char status[32];
char recovery[1024];
};
/* Read and write the bootloader command from the "misc" partition.
* These return zero on success.
*/
int get_bootloader_message(struct bootloader_message *out);
int set_bootloader_message(const struct bootloader_message *in);
Click to expand...
Click to collapse
kairnage said:
I just ordered a 64GB PNY off Amazon. Once I get it Tuesday I am going to try this. I am uploading to my mediafire now to mirror.
Click to expand...
Click to collapse
Sounds nice - I'm tempted to get a nice big new thumb drive myself... I don't have any that big >_>
~Troop
I've been following your think tank and I agree with your latest idea 100%
Sending a message for bootloader to always boot into recovery if the system wasn't shut down normally is clean and simple.
I am curious though what about development, with nvflash requiring encryption of commands first mistake will render your ouya unusable.
dexter84 said:
I've been following your think tank and I agree with your latest idea 100%
Sending a message for bootloader to always boot into recovery if the system wasn't shut down normally is clean and simple.
I am curious though what about development, with nvflash requiring encryption of commands first mistake will render your ouya unusable.
Click to expand...
Click to collapse
Glad you agree with my new idea!
As far as development, yeah, that is why I used my Notion Ink Adam for some of the testing that I did.
As far as developing for OUYA, I don't think we are limited by not having nvflash, we just have to be more careful. Personally, if I were developing anything, I would use my above methods to fastboot boot images that load everything else from a thumb drive at least until whatever I'm developing becomes stable enough that I want to use it more permanently. Then I would be very careful about how I flash it.
Heck, if you wanted to be really safe, you could flash recovery images to both the boot and recovery partitions and just use external boot methods
In the long term though, I hope we can develop a bootloader based on the kexec hardboot patches for the original Nexus 7, which would allow booting completely off boot images stored in other locations, loading partitions from other locations. Other locations could even just be the virtual sd card if you don't want to use external media, but at that point we'd have a safe extra bootloader stored on the boot partition.
http://forum.xda-developers.com/showthread.php?t=2104706
Hope that makes sense.
~Troop
I was not aware that any content of RAM can survive a reboot, hard kexec booting custom OS from USB or image is definitely a safe solution, looks like all the pieces are there.
Wish I had something more than ouya alone, since you have your Adam are you going to try to develop something ?
dexter84 said:
I was not aware that any content of RAM can survive a reboot, hard kexec booting custom OS from USB or image is definitely a safe solution, looks like all the pieces are there.
Wish I had something more than ouya alone, since you have your Adam are you going to try to develop something ?
Click to expand...
Click to collapse
I do intend to, but I don't have a great deal of time to devote to Android development, so not sure how long it will take me. I'm trying to find what time I can though. This past weekend/last week I had a bit more than usual.
~Troop
Trooper_Max said:
http://troopermax.com/releases/ouya-sda123-boot.zip
(be gentle - it's 145 MB, I use shared hosting, so feel free to mirror)
md5sum: 49c8e16e27b6deb9d1e8e86363b56f2f
~Troop
Click to expand...
Click to collapse
Here is a mirror for you.
http://www.mediafire.com/download/hban76kzeys6ybd/ouya-sda123-boot.zip
I tried this on my new 64GB and it wouldn't boot, but it's a brand new card so it might be the problem. I'll try a known good card later.
kairnage said:
Here is a mirror for you.
http://www.mediafire.com/download/hban76kzeys6ybd/ouya-sda123-boot.zip
I tried this on my new 64GB and it wouldn't boot, but it's a brand new card so it might be the problem. I'll try a known good card later.
Click to expand...
Click to collapse
Sorry you had trouble - a couple other things to be wary of:
Have only the one thumb drive connected, at least until it boots - the boot.img looks for the data partition as sda1, the system partition as sda2, and the cache partition as sda3. If some other storage device is connected, it might be labeled sda by the OUYA depending on the order it finds them in and then the thumb drive might become sdb or so on.
It worked for me through a hub, but it may also be worth trying it directly if you have trouble.
Guessing you did this, but give it some time, booting from thumb drive especially on the first boot is slower. It's not too long, but it was long enough that for a moment I thought I'd failed again. Of course the thumb drive I was using wasn't built for speed, so YMMV.
If you're still having trouble - even on my failed attempts at boot images for this (it took me 5 tries at getting the ramdisk to get it bootable), I was still able to connect to it using adb. I ran adb on Linux, running adb as root to bypass all that udev configuration stuff - it's just easier, and if the OUYA/device failed to mount the system partition, it might not match the configuration you expect anyway. If you're able to run "adb shell" but it gives you a permission error about not being able to access the shell binary on the system partition, that probably means you didn't setup the system partition correctly - it's crucial that it get set up with the right permissions, which is why I provided the image so it could just be written directly with dd.
I'm going to try to put together a recovery image that can partition the thumb drive for you and flash an arbitrary update.zip to the thumb drive, but not sure when I will be able to have that ready. The initial version will not be able to patch the boot.img though, so that will still need to be modified like the one I have provided, but maybe in a future version I can get it to also modify the boot.img for loading the information from the thumb drive.
Let me know if you continue to have issues or if you do get it working! And if anyone else has got it working, please post so I can at least know someone got it working. It worked for me, and I don't see why it shouldn't work for anyone else, but if there is something conflicting I want to figure it out.
EDIT: I just remembered when I was looking into the swapping boot/recovery stuff, I noticed in the recovery source that there already are some tools that might be able to help partition the thumb drive and fix permissions included in the recovery source:
https://github.com/CyanogenMod/android_bootable_recovery/tree/jellybean/utilities
Tonight I'll see if I can put together some new instructions using those tools that might be easier and less error-prone. I'm hoping those tools can be applied to the thumb drive anyway, I'll try and figure that out tonight.
~Troop
Trooper_Max said:
Sorry you had trouble - a couple other things to be wary of:
Have only the one thumb drive connected, at least until it boots - the boot.img looks for the data partition as sda1, the system partition as sda2, and the cache partition as sda3. If some other storage device is connected, it might be labeled sda by the OUYA depending on the order it finds them in and then the thumb drive might become sdb or so on.
It worked for me through a hub, but it may also be worth trying it directly if you have trouble.
Guessing you did this, but give it some time, booting from thumb drive especially on the first boot is slower. It's not too long, but it was long enough that for a moment I thought I'd failed again. Of course the thumb drive I was using wasn't built for speed, so YMMV.
If you're still having trouble - even on my failed attempts at boot images for this (it took me 5 tries at getting the ramdisk to get it bootable), I was still able to connect to it using adb. I ran adb on Linux, running adb as root to bypass all that udev configuration stuff - it's just easier, and if the OUYA/device failed to mount the system partition, it might not match the configuration you expect anyway. If you're able to run "adb shell" but it gives you a permission error about not being able to access the shell binary on the system partition, that probably means you didn't setup the system partition correctly - it's crucial that it get set up with the right permissions, which is why I provided the image so it could just be written directly with dd.
I'm going to try to put together a recovery image that can partition the thumb drive for you and flash an arbitrary update.zip to the thumb drive, but not sure when I will be able to have that ready. The initial version will not be able to patch the boot.img though, so that will still need to be modified like the one I have provided, but maybe in a future version I can get it to also modify the boot.img for loading the information from the thumb drive.
Let me know if you continue to have issues or if you do get it working! And if anyone else has got it working, please post so I can at least know someone got it working. It worked for me, and I don't see why it shouldn't work for anyone else, but if there is something conflicting I want to figure it out.
EDIT: I just remembered when I was looking into the swapping boot/recovery stuff, I noticed in the recovery source that there already are some tools that might be able to help partition the thumb drive and fix permissions included in the recovery source:
https://github.com/CyanogenMod/android_bootable_recovery/tree/jellybean/utilities
Tonight I'll see if I can put together some new instructions using those tools that might be easier and less error-prone. I'm hoping those tools can be applied to the thumb drive anyway, I'll try and figure that out tonight.
~Troop
Click to expand...
Click to collapse
I could get into ADB as well but was only seeing the stock system. Actually now I think it was the adapter I was using. At first I assumed it was the microsd because it would hang on boot. But after trying a known good card it did the same. I remembered having issues with an adapter that has the indicator light to show it was connected on a tablet before. I tried a generic Kingston adapter and it sees the cards now. Of course I had already wiped them back to stock partitions. LOL Oh well, start again tomorrow.
For anyone who doen't have a Linux box handy or an extra thumb drive to boot a live USB, here are some quick instructions on how to partition the thumb drive from the OUYA itself. You can connect the thumb drive either before or after booting, it doesn't really matter. I'm using all fastboot/adb commands here so they are easy to recognize. If you're knowledgeable about how to use adb/fastboot, feel free to execute the commands however you're comfortable.
Type all the adb/fastboot commands as specified - if it doesn't begin with adb or fastboot, it isn't a command. All /dev paths you type into the commands should be related to /dev/block/sda (your thumb drive), not any internal partitions or you could mess up your OUYA!!!
Boot up the OUYA normally, then reboot into the bootloader:
adb reboot bootloader
Boot CWM using fastboot:
fastboot boot OuyaCWMrecovery6.0.3.2.img
Print partition information for the thumb drive:
adb shell parted /dev/block/sda print
Model: USB Flash Memory (scsi)
Disk /dev/block/sda: 8128MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.3kB 6000MB 6000MB primary ext4
2 6000MB 7000MB 1000MB primary ext4
3 7000MB 8000MB 1000MB primary ext4
Click to expand...
Click to collapse
(note in the example output above I already have it partitioned)
Here I was using an 8 GB thumb drive, you can see the size where it says 8128MB.
Delete Partitions from thumb drive: (be sure you don't have anything important on your thumb drive)
adb shell parted /dev/block/sda rm 1
adb shell parted /dev/block/sda rm 2
adb shell parted /dev/block/sda rm 3
(note that you only need to delete partitions that showed up in the table when you printed it, here I deleted 1,2,3, since I had 3 partitions above and the parted commands will say you may need to update your fstab, but that is not relevant here so don't worry about it)
Create 3 primary partitions (adjust the sizes as necessary):
adb shell parted /dev/block/sda mkpart primary 1 6000
adb shell parted /dev/block/sda mkpart primary 6000 7000
adb shell parted /dev/block/sda mkpart primary 7000 8128
Check your paritions again:
adb shell parted /dev/block/sda print
Format your partitions as ext4:
adb shell mke2fs -t ext4 /dev/block/sda1
adb shell mke2fs -t ext4 /dev/block/sda2
adb shell mke2fs -t ext4 /dev/block/sda3
Push the cm10 system image onto the device: (this will take a little while)
adb push ouya-cm10-system.img /tmp/ouya-cm10-system.img
Check that it copied correctly:
adb shell ls -l /tmp
-rw-rw-rw- 1 root root 260308992 Jul 27 2013 ouya-cm10-system.img
-rw-rw-rw- 1 root root 3587 Jan 1 02:12 recovery.log
Click to expand...
Click to collapse
(Note the size... I'm pretty sure copying it /tmp put it into the ramdisk, but our OUYA has enough ram for this)
Write the cm10 system image onto /dev/block/sda2: (this will take a little while)
adb shell dd if=/tmp/ouya-cm10-system.img of=/dev/block/sda2 bs=4M
Check/fix the filesystem:
adb shell e2fsck -fp /dev/block/sda2
Resize the filesystem to fill the partition:
adb shell resize2fs /dev/block/sda2
(Unfortunately, it looks like resize2fs is not included in CWM, so this step would need to be done on the computer)
At this point, the thumb drive should be good, so you just gotta reboot back to the bootloader and boot the boot image:
Reboot to the bootloader again:
adb reboot bootloader
Boot the modified boot image I provided:
fastboot boot ouya-sda123-boot.img
Not sure if that's necessarily easier or harder to follow than the other instructions... I'd probably rather do the partitioning on a desktop with GUIs, but for some who don't have a Linux box handy it might be easier to use the OUYA as a little Linux box
I'm sure you noticed this method still used dd to write the system image, just run from the OUYA instead. I looked into just extracting the system files from the CM10 zip onto the OUYA, but fixing the permissions was not as easy as I thought it would be - the /system partition permissions are actually fixed by the updater script as referred to here:
http://fokke.org/site/content/howto-create-android-updatezip-package
It's actually a scripting language and the script also creates symlinks and does other stuff.
You'd have to extract/modify the updater script to not use the internal partitions and then execute it (I think using the edify program)... still less straightforward than using dd if you have the image handy like I gave you... But I may look into this as another option. The knowledge will certainly be relevant when I look to build a custom CWM recovery to allow you to flash zips to the thumb drive instead of the internal partitions.
~Troop
Thanks to csonger for feedback, which may be handy if you have system partition issues:
csonger said:
I tried both methods (under linux and with ouya as well), but neither of them worked for me. My 8 gig pen couldn't boot.
The first thing is that the system image is 256MB and the tutorial says the System partition needs 512MB or 1GB.
After the boot failures I checked the pendrive. The second (system) partition was 256MB. It is ok when we use dd, but it was full. 100% usage.
First I run the e2fsck command to check for filesystem problems and it found some inode issues on it.
Following the fs fix the resize2fs command did the job and I had got a 1 gig System partition.
After that my pendrive could boot the cyanogenmod image without problems.
May be someone else has the same problem as me. Please share with them.
Thanks for your work:
csonger
Click to expand...
Click to collapse
I didn't have those issues myself for some reason, but I'll investigate and see what instructions I need to update!
Thanks again for the feedback!
~Troop
Finally got my Linux partition back up and running so I can give this a go again.
It's been trying to boot CM for about 15 minutes now, ADB does see it, but I think it might no like the partitions I did.I did 2GB for system and 1GB for cache. I will repartition and try again.
kairnage said:
It's been trying to boot CM for about 15 minutes now, ADB does see it, but I think it might no like the partitions I did.I did 2GB for system and 1GB for cache. I will repartition and try again.
Click to expand...
Click to collapse
That should be fine, I would think... If you continue to have trouble, try running e2fsck and resize2fs on the system partition, as csonger suggested. (In case you didn't already)
I was confused when I came up with the instructions that it worked without me doing resize2fs since I figured that would be needed to expand the filesystem to fill the partition, but somehow it worked anyway and even looked like it was expanded, but I'd probably just forgot to refresh my view after dd.
Note that you can run the commands with just the partition as an argument: (I added -fp to e2fsck to automatically find/fix problems)
e2fsck -fp /dev/sdX2
resize2fs /dev/sdX2
(Where X is the letter for your thumb drive)
Without a size specified, resize2fs resizes the filesystem to fill the partition.
Hope that helps!
EDIT: I went back and fixed the instructions with this addition now that I've tested it a little more. Unfortunately, I noticed that CWM does not include resize2fs and I didn't spot any other programs handy within CWM to do the trick, so you can't quite do this part on the OUYA. I will look into alternate instructions or building my own CWM that includes resize2fs or just plain automates this more.
~Troop

[Q] Full tutorial to put KitKat on N1. Who wants to test?

Hi all, I wrote a long-winded Tutorial to put Evervolv KitKat on a stock N1. I don't have a stock N1 (I stumbled all the way through this process and got done yesterday, was so excited I wrote this tutorial) and don't know how to get it back to stock, so I'm wondering if anyone who has one and has experience putting new ROMs on other devices would like to test this out and let me know if anything doesn't work as written. Please go ahead if you like and reply your updates! Once it's dialed I'll make it a thread in the N1 ROMs forum.
Here's the text:
How to put KitKat on a Nexus One (And have computing power & space to spare):
Things you'll need:
1. A Windows/Linux computer with internet connection, USB port, and terminal
2. A USB Cable
3. A Nexus One with the most recent stock gingerbread rom (Settings->about, look for Android 2.3.6 or GRK39F, else apply/google updates to get to that version)
Before you begin, note that you're playing with a generally safe form of fire, but when playing with fire, you may brick your phone. The maker of this guide and any sites you visit during the process assume no responsibility, the user assumes full responsibility for lost work and damaged or ruined phones. Your warranty will be voided about six times over. Save all your stuff somewhere, save apps with Titanium Backup (Google it) or something, and do a full Nandroid backup (Goog that too) before you begin. You will be fully wiping your phone and SD card multiple times. Make sure at every step of the process that your battery is at least half full. Running out of battery during an update can cause bricks. In this guide, “Boot” means standard boot, the way it normally turns on. Not hboot or fastboot or recovery.
I did part of this from a Windows7 computer on Cygwin and part on Ubuntu 12.04, each presented some annoyance but by far the greatest was due to my Linux ineptitude with PATH and Root. If you're trying the same, I've made an appendix for that.
It may help to have a brief conceptual overview of what you'll be doing in case you run into snags and have to step out of the walkthrough. Your N1 has a few basic parts: Internal memory that is chopped into 3 partitions: One for the system files (System) , one for the files that they will need to make during the first bootup and use in order to operate, along with your apps and their created files (Data) and one for temporary files that your OS and apps can regenerate (Cache). Somewhere in there it also has space for a Radio (that also includes some critical power functions, flashing a new radio is the easiest way to brick an N1 but we won't), as well as a Recovery partition and an Hboot&Fastboot partition. We will be messing with Recovery and Hboot. The virtual machine that turns all the friendly pseudo-english computer code into 1s and 0s for the processor to deal with is called Dalvik, named after a town in Iceland where some old dev's family is from. It has its own Cache (the VM, not the town, as there are no longer any fish in Iceland ). It's SOP to wipe Cache & Dalvik before and after applying any updates, and wipe Data (Factory reset) before applying most updates. Sometimes when my phone bogs I reboot to recovery and wipe caches just for funsies. This makes it take longer to boot the phone and to use each app just the first time after that, while the files are created fresh. The phone also should have an SD-Card. You should have or buy an 8+MB, Class 10 SD card. The class relates to read/write speed, anything less than 10 will noticeably slow your Nexus One's operation. Why?
Because we're going to put some of your operating system on the SD card. We're going to use a special recovery system (aka recovery ROM) called “4ext” to partition your SD card. Mine is 16GB, partitioned to 14GB for storage and 2GB to use as fake internal memory, where my system's Data and Cache live. The KitKat System files that normally live on internal memory's System partition are too big for a normal N1, so we'll use a special Hboot called BlackRose to repartition your internal memory so you can fit KitKat, and then after you first boot it up we'll use an app called Mounts2SD to install a startup script so that every other time you boot it up after that, it will know to find Data and Cache on the SD card. In order to install BlackRose, you'll need to be running CyanogenMod Rom as your main OS, and in order to do that you'll need ClockWorkMod Recovery ROM. So the installation order will be: ClockworkMod recovery->Cyanogen7OS (Gingerbread based)->4ext recovery to partition SD card->BlackRoseHboot to repartition internal memory->Evervolv KitKat-based N1 ROM-> run Mounts2sd for startup scripts ->reboot to your new life among the anatomically modern cyborgs (and then you're on your own for getting all your apps and music and contacts and stuff back on the phone from wherever you saved it).
Ready? Here we go!
1. Install the Android SDK on your computer.
1. Get the appropriate version here: http://developer.android.com/sdk/index.html
2. Unzip it.
3. Run the setup.exe (if using windows)
4. When asked which packages to install, choose “Android SDK Tools”, “SDK Platform Android 2.1″, and “Usb Driver package” (If you use eclipse, check that last link for instructions on using the ADT plugin (Not the same ADT that cuts your paycheck, much less inept))
5. Make sure the USB drivers installed properly (windows).
1. Go to printers and devices in the control panel, or device manager
2. If you see an android device with no warnings, you're golden. If it has warnings, right click it and go properties->update driver (driver can be found in your android sdk directory where you unzipped the sdk bundle, in \usb_driver).
6. Boot up your N1 and plug it in to the computer. If the computer recognizes it and they play nice, you're set with the sdk. To extra check, open terminal and cd to the sdk's platform-tools folder that should contain the adb utility. Type #adb devices and see if it comes up with a message telling you that it's running a daemon on a port like 5037, and then lists something like HT9CPP800063 device. This is your phone, it's telling you you're beyond connected. You've got the sdk working. Else have your friend Google help you get the SDK properly installed.
2. Root the phone so it will let you dig in.
1. Put your N1 in USB debugging mode (Settings > Applications > Development > USB Debugging)
2. In the terminal, in the platform-tools folder, type #adb reboot bootloader. (((My phone has a power hardware issue and will not reboot while plugged in ever to any mode ever at all ever, if yours does too you can unplug (first type #adb kill-server to make it ok to unplug) the usb cable, power down, wait five seconds, and hold the trackball and power button to power back up into the bootloader, then plug in again. There was a lot of unplugging, waiting fifteen seconds, booting while holding buttons, plugging in, adb devices -ing that I will omit henceforth due to low likelihood that you have the same problem.)))
3. Using the onscreen directions on the phone and the hard buttons, navigate to fastboot mode. It may be unresponsive and throw some not-found messages for five seconds before it lets you do anything.
4. In the terminal on your computer, in the platform-tools folder, type #fastboot devices to see if your devices is connected (it should come up with the same HT#XXX###### number).
5. This step will gain Root access, unlock the bootloader, and WIPE ALL YOUR ****. Now type #fastboot oem-unlock . You may have to accept the warranty voiding. If for whatever reason it doesn't work, use this method http://code.google.com/p/bexboot/, and unzip the files to the platform-tools folder.
6. Using the phone buttons, reboot. Your little lock logo during the bootup should be unlocked now.
7. Power down and boot again for good measure. Re-enable usb debugging in the phone app dev settings.
3. Get ClockworkMod Recovery.
1. Download koush's ClockworkMod Recovery from : recovery-clockwork-5.0.2.0-passion.img and put it in the platform-tools folder.
2. To make sure the file is not corrupted and will not brick your goods, check the md5sum. This is the result of a complicated equation that easily reveals even a single flipped bit in the file by vastly changing the output. Google how to do this, in windows you'll need to download a tool like winmd5free. The output for this particular file should be: md5: 45716c8d51ed2375873f01f0b14b2184 If it's anything else don't use it.
3. Reboot to the bootloader again, either by #adb reboot bootloader or by powering up while holding the trackball, and navigate to fastboot.
4. Verify that you're connected with #fastboot devices
5. Flash ClockworkMod Recovery by typing #fastboot flash recovery recovery-clockwork-5.0.2.0-passion.img
6. It should give a success message. Reboot to recovery from the fastboot menu. It should be a sweet new blue and white ClockWorkMod recovery. Power down and reboot to recovery by holding volume up as you power up, just for good measure.
4. Get CyanogenMod7 ROM.
1. On your computer, go to http://download.cyanogenmod.org/?device=passion&type=stable and download the latest stable CM7 zip. Put it in the platform-tools folder.
2. Check its md5 as you did in part 3.
3. Do #adb-devices, which should give you that serial again, and the word recovery.
4. Place the zip file on the root of your SD card by doing #adb push cm-7.2.0-passion.zip /sdcard/
5. If that last step failed, try running #adb shell mount /sdcard or #adb kill-server then #adb devices then #adb shell mount /sdcard, then try the push again. Or mount the sdcard through the recovery menu before running that push command. Or use your computer's file system to drag and drop the .zip to the root (lowest) folder of the sd card.
6. Using the recovery menu, in backup and restore options, backup your current ROM.
7. In the format menu, do a wipe data/factory reset. Wipe the cache and dalvik cache while you're at it.
8. Back in the main recovery menu, do install zip → choose zip from sd card.
9. Select that CM7 zip file.
10. Return to the main menu and reboot the system. It should come up with a totally different looking leaner meaner version of Gingerbread, that gives you more control and speed and saves battery. But even with this system, given modern app sizes, you'll soon run out of room on the internal memory if you stop now. And besides, you're having too much fun.
5. Get 4EXT recovery
1. Go to 4ext.net and download the free .apk file: http://www.4ext.net/get.php?apk Congratulations if you're about to install your first not market app (apps are now .apk, not just something you get from the store's GUI.). Save it in platform-tools. Or, to be really nice to Max, you can just buy the app in the play store and skip the next two steps.
2. Enable USB debugging, plug in and #adb-devices.
3. # adb install 4EXTRecoveryUpdater.apk. You should get back a success message in a fistful of seconds.
4. At this point you may need to back out to regular settings, turn on wifi, and hook up to your wifi router.
5. Open the 4ext recovery updater app. Go to settings. Allow superuser permissions and everything else. It should detect Nexus One, connect to the internet, and boot you back to the main menu.
6. Go to online install. They're all release candidates and no stable versions, so just go with the newest one. Select install.
7. Wait for it to finish and then reboot to recovery, either by # adb reboot recovery or manually. You should have a beautiful new touchscreen recovery.
6. Partition your SD Card
1. In recovery, go to tools->partition sd card->remove all partitions and start from scratch.
2. For the first Ext partition, where you'll be keeping a good chunk of your OS, The consensus online is not to go above either 1.5GB or 2GB. I'm working fine with 2GB aka 2048MB.
3. You can skip the 2nd Ext partition.
4. The internet says Swap size should be 0.
5. Internet says File system should be ext4. This should do the partitioning, the rest of your SD card will still be great for storage as before.
7. Repartition internal memory using BlackRose:
1. I have never used BlackRose on Windows, but here goes: go here : http://forum.xda-developers.com/showthread.php?t=1270589 and download this zip archive: http://forum.xda-developers.com/attachment.php?attachmentid=1016437&d=1334971685; It has windows and linux files. The site also has a manual in case this walkthrough lets you down.
2. Unzip it into a folder in your platform-tools. Execute it with a ./ in linux or a .exe in win. It should say waiting for devices.
3. Reboot your phone manually. BlackRose should hijack the startup, install itself, and quit. Boot your phone up again.
4. Blackrose is rumored to have an interactive guide to partitioning, but it didn't work for me and at least some other genius on the internet, but being an industrious Austrian, he figured out the fix: Run Blackrose in Editor mode. Type resize as prompted.
5. The post here http://forum.xda-developers.com/showthread.php?t=2540366 on Evervolv KitKat implies that 250MB for System works with enough space for Gapps (Google does not allow their standard apps like Play Store to be included with Mod roms anymore, so you will need to install them from recovery too, but they distribute them bundled so it's not hard.), and some commenter said 260MB, but that didn't work for me long enough to run startup scripts and move some of it off. So I had to redo it and I went with 265MB for System and 10MB for Cache, which is working fine. Give it a name, I went with Kat.
6. BlackRose will shut down, but it will leave a golden turd in the form of a file called hboot_brcust.nb0 probably in the folder called “other.” That's what you want.
7. Put that file in the same folder as the Blackrose utilities fastboot-l and fastboot-w if it's not already there. Then boot your phone into fastboot again, via adb or manually. I think. Maybe try this from being standard booted up if the next part doesn't work.
8. Run # fastboot-l flash hboot hboot_brcust.nb0 . Windozers should use fastboot-w instead. Blackroot will wait for the device again.
9. Reboot your phone into the bootloader manually, by holding the trackball while powering up. The image should install on this boot, resizing your phone's internal memory partitions.
10. Run # fastboot -w. Your Bootloader should be loaded up, with the 1st line saying something about BlackRose and the 2nd line saying 265/10/161. This is how you know it worked. That 265 is where it's at for KitKat. Your main OS had been destroyed, but your Recovery ROM should still work.
8. Install Evervolv KitKat.
1. Go here http://evervolv.com/devices/passion and download the latest stable release. At press time that's the 4.0.0p4.2 version. Save it to platform-tools.
2. Reboot to Recovery from the menu in the BlackRose bootloader.
3. Do # adb devices. Then do # adb push ev_passion-4.0.0p4.2-perdo-squished.zip /sdcard/ . If it doesn't work, try using the touch recovery menu to toggle mount USB, then push, then unmount. Or mount USB, use the computer's file system to move the file to the root of the sd card, then unmount USB. Or try as root if you're using linux.
4. From the main recovery menu, select install zip from SD card → choose zip → select the ev_passion-4... zip. Wait up, it could take a while.
5. Success!! Right? Right. #adb kill-server, you can unplug now and won't need to plug back in! Reboot the phone, you're getting perilously close! This boot could take five plus minutes, or just one, but be patient.
9. Install Gapps.
1. You are such a lucky dog. Gapps bundled updates are available through the Evervolv toolbox. So you can get Play Store and everything else will come easy. Go to settings → wifi, turn it on, hook it up to your wifi router.
2. Back up to settings, and go Evervolv Toolbox → Updates and swipe over to the Gapps section. Tapp the most recent Gapps-kk zip. Tap the down arrow to download.
3. Reboot manually to recovery.
4. From the main recovery menu, select install zip from SD card → choose zip → select the gapps-kk... zip. This could also take a sec.
5. Reboot again! You're almost done! When it's all loaded up, Play Store should now be installed, as well as various google options that you can enable through the Evervolv settings.
10. Install Mounts2sd.
1. Go to the Play Store and get Mounts2sd.
2. Hit the top right corner for application settings. You'll need to install a startup script. Agree, give it permanent superuser status.
3. Reboot.
4. Go back into Mounts2sd, and go to the Tool menu (Wrench). Note that boxes aren't checked unless they're green-checked.
5. Enable the Cache to move cache partition to data or sd-ext. Storage threshold is up to you. Make sureApplications, Libraries, Data, and Media are all checked. Dalvik should stay unchecked, System apps can too.
6. Reboot again.
11. You're done!!! Or at least we're done. You still have to restore your apps and put all that music back on and figure out how to resync your contacts and... Good Luck.
12. If you want to get extra tricky, it's believed to be possible to leave app data on the real internal memory by default, and use Titanium Backup to move the data of most of your apps to the SD-ext, thereby leaving the data of your favorite apps on real internal memory. Use at your own risk.
ENJOY!!
Appendix 1:
Linux PATH env: I put all my android stuff in a file called androidy, so my path to my platform-tools was /androidy/adt/sdk/platform-tools, and my blackrose was in there too. So to set my PATH, I used: $ export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/sean/androidy/adt/sdk/platform-tools:/home/sean/androidy/adt/sdk/platform-tools/blackrose_120421/binary"
In order to make sure that while using it as root (as was necessary for some fastbot operations), I referenced the same PATH instead of the messed up root PATH, I used sudo env PATH = $PATH a few times.
Appendix 2:
The only actual bug I've noticed in a few days with this ROM is that my Chrome bookmarks don't add shortcuts to the homescreen when I tell them to from within Chrome. The widget-adder (longpress homescreen) has a bookmark option though, so if you bookmark it you can put it on the homescreen from there.
Huge Thanks to everyone involved with ClockworkMod, Cyanogen, 4Ext, BlackRose, and Evervolv!
Sources:
http://wiki.cyanogenmod.org/w/Install_CM_for_passion
http://nexusonehacks.net/nexus-one-...n-how-to-unlock-bootloader-on-your-nexus-one/
http://marian.schedenig.name/2012/07/22/installing-android-4-ics-on-the-google-nexus-one/
http://forum.xda-developers.com/showthread.php?t=2540366&page=24
Wooooh, Amazing book ! Everything is soo.... deep. In my opinion, tutorials should be only few lines.
Some mistakes :
Why installing CM7 and then backing up ? (You can install non market apps without CM7, and when flashing CM7 you erase all user data)
Why using m2sd if the rom has a built-in feature called a2sd ?
Why installing CWM then 4EXT recovery ? (TWRP is a touch one, and you can flash recovery once you have root access)
"You should have or buy an 8+MB, Class 10 SD card" ? typo ?
In my mind, big steps should be :
1) Backup SD, and SMS and Apps
2) Root
3) Install recovery (TWRP is advised by evervolv, but CWMRecovery is OK)
4) Partition SD
5) Install Blackrose (using 260mB system)
6) Flash ROM
7) Flash GAPS
8) A2SD Y N Y
Notes :
About SD-Ext size, i recommend reading this post from his creator : http://forum.xda-developers.com/showthread.php?t=1716124
A2SD is an old version of INT2EXT+
Using terminal is not friendly for beginners. Avoid it at maximum.
Provide a link for a MD5 sum checker.
I don't know if it works with actual stock rom, but when i rooted my n1, i used SuperOneClick. Plug, Click, Wait, Smile. (I still have it if needed)
ldFxl said:
In my opinion, tutorials should be only few lines.
Click to expand...
Click to collapse
This tutorial doesn't need to exist at all. All the information is available elsewhere on the internet, I did nothing original. Its only value is that it puts all the information in full detail in one place so you don't have to look in the forums for elaboration on each line of a more concise tutorial. Hopefully with info this detailed, someone with more chops than me could script it.
ldFxl said:
Why installing CM7 and then backing up ? (You can install non market apps without CM7, and when flashing CM7 you erase all user data)
Why using m2sd if the rom has a built-in feature called a2sd ?
Click to expand...
Click to collapse
I had already installed CM7 when I thought to write this, Marian (my 3rd source) seems pretty skilled as he is the only one who could make BlackRose work for me so I trusted his advice that it was the easiet procedure he found. Have you put TWRP Recovery on from stock after unlocking the bootloader (fastboot oem unlock)? And have you successfully repartitioned SD (fat32 &ext4) from TWRP? If so and you want to quickly write up the steps, I'd gladly replace my steps 3-6, that would save people a lot of time and doing.
ldFxl said:
Why installing CWM then 4EXT recovery ? (TWRP is a touch one, and you can flash recovery once you have root access)
Click to expand...
Click to collapse
4EXT is also touch, CWM cannot repartition SD. If you can go stock to TWRP this might be the best option. Or if not, stock to 4ext.
ldFxl said:
"You should have or buy an 8+MB, Class 10 SD card" ? typo ?
Click to expand...
Click to collapse
Yes! Thanks.
ldFxl said:
Using terminal is not friendly for beginners. Avoid it at maximum.
Click to expand...
Click to collapse
Don't you have to use terminal to use the built in A2SD? At any rate, it didn't work for me (I'm kind of a beginner), Mounts2SD's GUI seemed a little more beginner friendly. Also I certainly wouldn't have been able to make BlackRose work
ldFxl said:
Provide a link for a MD5 sum checker.
Click to expand...
Click to collapse
Good idea
ldFxl said:
I don't know if it works with actual stock rom, but when i rooted my n1, i used SuperOneClick. Plug, Click, Wait, Smile. (I still have it if needed)
Click to expand...
Click to collapse
I once used SuperOneClick on another phone, it looked like it struggled and finally worked with a DDoS style attack, it seemed simpler to just do it the way the manufacturer intended (if that's even a thing). But I suppose if it works with one click it really is simpler as seen by the user. Anyone have a report on whether it worked from stock N1?
Fituate said:
I had already installed CM7 when I thought to write this, Marian (my 3rd source) seems pretty skilled as he is the only one who could make BlackRose work for me so I trusted his advice that it was the easiet procedure he found. Have you put TWRP Recovery on from stock after unlocking the bootloader (fastboot oem unlock)? And have you successfully repartitioned SD (fat32 &ext4) from TWRP? If so and you want to quickly write up the steps, I'd gladly replace my steps 3-6, that would save people a lot of time and doing.
Click to expand...
Click to collapse
On my first flash, i was pretty beginner, so i followed a tutorial ; ) . And they used CWM. But flashing a recovery procedure from .img file doesn't differ with the recovery. TWRP allows you to partition SDCard. I did it last week (on HTC wildfire S, TWRP 2.6 as for N1).
Flashing step is the same -> just replace img file name. You can get it Here (From official TWRP Website)
Procedure from TWRP Website said:
Download the above file. Turn off your device. Turn on the device and keep holding volume down until a menu shows up. Select fasboot from the menu list. Plug the device into your computer. If you have the right drivers installed, your screen should now say FASTBOOT USB. Run the following command via the command line:
fastboot flash recovery recoveryfilename.img
Note that you will need to change the last part to match the name of the file that you just downloaded. This method requires that you have the drivers installed that come with the HTC Sync software that are available here. You will also need adb and fastboot for your computer.
Click to expand...
Click to collapse
6. Partition your SD Card
1. In recovery, Tap Advanced
2. Tap Partition SD Card
3. Set 2048 (MB max) on EXT Size and 0 on Swap Size
4. Tap EXT4 then swipe to start partitioning
Fituate said:
3. Reboot your phone manually. BlackRose should hijack the startup, install itself, and quit. Boot your phone up again.
Click to expand...
Click to collapse
Backrose is a custom Bootloader-> it replaces your HBoot/Fastboot
You don't need to reboot your phone to install blackrose. You just need your phone in ADB over USB, then the win setup will install blackrose.
Once done, run setup again, your phone will automaticaly go to HBoot, then choose 1, and 1 again.
Then enter "resize", "260" and "8".
In case that the installer don't work correctly, you can get flashable HBOOT from [Provide a nb0 (texasice recommend 260/8/168) AND MD5 Checksum]
While googling to find some infos (I don't remember me unlocking my bootloader) I found this guide : http://forum.xda-developers.com/wiki/HTC_Nexus_One/Flashing_Guide
Apperently SuperOneClick does not even need unlocked bootloader on 2.3.3 or previous ...
Isn't what we are trying to write down ?
There are many links pointing to this forum aswell.

[Guide] Repartition internal storage to get more space on /data

**DISCLAIMER**
**I WILL NOT BE RESPONSIBLE IF YOUR PHONE DIES.**
**PROCEED AT YOUR OWN RISK**
**IF YOU MESS UP, USE SP FLASH TOOLS TO FLASH ROM IN THE FORMAT ALL+ DOWNLOAD MODE**
A lot of space in the internal storage in sprout4 devices is wasted. This will give you a bit more space in userdata. I put this guide in Android One General, but this will apply to most devices. At least to those devices that use GPT partitions like the Sprouts do.
Requirements:
An Android device (duh)
TWRP Materialized by musfiqus, from here: http://forum.xda-developers.com/cro...p-materialised-twrp-recovery-android-t3088715 It includes the Parted binary. Some other builds of TWRP don’t have that. You need it.
Something resembling intelligence
Patience
A PC (Windows , Linux, Mac, whatever) is optional. The instructions here use a PC, but if you don’t have one, you can type commands in TWRP terminal).
ADB drivers, if you’re using a PC.
A hardware calculator. Using an on-screen calculator so many times is going to get you to go Hulk.
Here’s how to do it.
Reboot to TWRP recovery, and open a terminal / Command Prompt. Take a backup of IMEI.
Type:
adb shell
You’ll get a screen like this:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Type :
parted /dev/block/mmcblk0
By default, Parted uses MB as the storage unit. To prevent possible unused space after repartitioning, we’ll use sectors as a unit instead.
Type
unit s
This’ll change to sectors.
Type
print
It’ll give a warning, just type
i
Then:
print free
At the top, you’ll see that the sector size is written. Write this number down somewhere. For my Android One 4GB, the sector size is 512 bytes.
Now, you need to understand what the list means. Each horizontal row shows the details of a partition.
The 1st column shows the partition number.
The 2nd column shows the start offset of that partition. That means that the partition starts at the location mentioned.
The 3rd column shows where the partition ends. Notice that each partition starts exactly 1 sector after the previous one ends.
The 4th column is obviously the size of the partition.
The 5th column is the file system used by the partition. If nothing is written in this column, that means that it’s a binary partition.
The 6th column is the partition name.
You’ll see that the sizes in that list are weird. They’re not in any standard unit you might know. That’s because we used sectors instead of megabytes. The ‘s’ after each number indicates that it’s in sectors. (You can use the default MB unit (1MB=1000 KB. 1KB=1000bytes), or the MiB unit (1MiB=1024 KiB), but that just might leave 1 or 2 MB of space unused. So, I’m using sectors).
Remember that 1 sector = 512 bytes for my phone.
There’s some free space at the top and bottom of the list. Leave that free space there. Do not make partitions using those.
To convert sectors to MiB or KiB:
1s = 512bytes (Use the sector size you wrote down previously for this step, it might not be 512 bytes for you)
1024 bytes = 1 KiB
1024 KiB = 1 MiB
1024 MiB = 1GiB
So, 4833280s = (4833280 x 512) B = 2474639360 B
= (2474639360 / 1024) KiB = 2416640 KiB
= (2416640 /1024) MiB = 2360 MiB
= (2360 / 1024) GiB = 2.30 GiB
We’ll use another terminal window with sizes in MiB now. So open another Parted prompt in a new terminal / command prompt window, but instead of
unit s,
this time, write
unit MiB
Type “print”, “i”, and “print free” again.
Look at my 11th partition. Its size is 8MiB. I know that this logo partition doesn’t need more than 2 MiB. So, I’ll make it smaller.
When you make partitions smaller, all the data inside will be lost. So, we need to back up the partitions first.
Open a 3rd terminal window. Type
adb shell dd if=/dev/block/mmcblk0p11 of=/microSD/p11
The “dd” command copies bytes from the “if=” location, to the “of=” location. The internal storage is /dev/block/mmcblk0. The “p11” after that refers to the partition we are backing up. Notice that in the Parted list, “logo” has a partition number of “11”. So the general command to back up partitions is
adb shell dd if=/dev/block/mmcblk0p<partition_number> of=/microSD/p<partition_number>
From recovery, unmount all partitions except microSD and oem. Then back up partitions 11, and 13 from PC. We will copy the files from OEM instead of using dd. So type
adb shell mkdir /microSD/oem
adb shell cp –a /oem/ /microSD/oem
Go to /microSD/oem/oem/app with TWRP’s file manager, and delete everything there.
Open the 1st terminal with sizes in sectors.
Type
rm 11
This will delete the oem partition. Type
print free
Partition 11 has been replaced with free space. Let’s make the Logo partition 2MiB. 2MiB = 4096s. The start sector is 113920, so the end sector needs to be (113920 + 4096 - 1) = 118015.
The command to create partitions is:
mkpart <name> <start_sector> <end_sector>
name <partition_number> < name>
So, type:
mkpart logo 113920s 118015s
name 11 logo
Some free space has appeared below logo. If you type “print free” on the 2nd terminal, with units set to MiB,
You’ll see that logo is now only 2 MiB, and an extra 6 MiB of free space is available. Also, oem takes 64 MiB. Open the 3rd terminal, from which you took backups, and type
adb shell df /oem
Divide the number under “used” with 1024. That’ll tell you how much space is being used. My oem partition is 64 MiB, but it’s only using about 6MiB. Typical. Not all space in the partition is available for file storage, so I’ll make the oem partition 11 MiB.
Unmount oem from recovery. Open the 1st terminal window, with sizes in sectors.
Type
rm 12
print free
11MiB = 22528s. new End size will be (118016 + 22528 - 1)s = 140543s
Type
mkpart oem 118016s 140543s
name 12 oem
Look at the 1st partition listing in this post. Oem had a ext4 file system. Open the 3rd terminal window. Type:
adb shell make_ext4fs /dev/block/mmcblk0p12
This will make an ext4 file system. Type “print free” in the MiB terminal. Things look good. Copy back the contents of oem. Mount oem from recovery, and type:
adb shell cp -a /microSD/oem/oem/* /oem/
If you get out of space errors, delete oem, and make it a bit larger. Now type:
adb shell chown root:root /oem/oem.prop
adb shell chmod 644 /oem/oem.prop
This will fix permissions of oem.prop.
I won’t change sizes of partition 13. So I’ll make it occupy 33536s from location 140544s. End sector will be (134400 + 33536 – 1)s = 174079s. So do it like the last two times. If you want to change the size of system, read my next post below first. I suggest that you keep the size of system intact. So, delete system, make it again just after expdb, and make an ext4 file system in it, like you did for oem.
Cache is about 128MiB big, but you just need it to be 5MiB. Any more is a waste. Delete cache, make it again right below system, with a size of 5MiB, and make an ext4 file system in it. This is what my partition table looks like after doing that.
So, after all that insanity, I just gained a tiny 182MiB of space. I’m not sure about the gen partition, and metadata is apparently used for encrypting data, so I’ll leave those two untouched. In my screenshots, userdata doesn’t have any file system, but that’s because I just unlocked my bootloader. Userdata is usually ext4. So, I’ll delete userdata,
and make userdata again. No need to calculate the end size again, as userdata will occupy all the free space, start sector will be 2232320s and end sector will be 7438335s. Then put an ext4 file system on userdata,
and done!
Now restore the partition 11 and 13 backup. If partition 11 gives an error, just ignore it.
dd if=/microSD/p11 of=/dev/block/mmcblk0p11
dd if=/microSD/p13 of=/dev/block/mmcblk0p13
Now reboot recovery, flash a new rom, restore IMEI, and reboot. Read the next post to get more space.
Reserved
Nice thread dude, though awesome tutorial
error
daemon started successfully P*
error: device not found
error: device not found
you think one is gonna take such a big risk of repartitioning for little more space?
yash sharma100 said:
you think one is gonna take such a big risk of repartitioning for little more space?
Click to expand...
Click to collapse
you think people will not get irritated by quoting such big post?
prazool007 said:
daemon started successfully P*
error: device not found
error: device not found
Click to expand...
Click to collapse
Install adb drivers for your phone. You need both adb itself and the drivers. Get it here http://forum.xda-developers.com/showthread.php?t=2588979
nice tutoriol but have you tried it
Yes, many times.
Great tutorial.
Just a little question. I'm sprout8 users, but i use sprout 4 rom. And in sprout4, the default data storage is on external memory (SDCard). The internal memory (userdata) is hidden (on rooted device, i can acces it in data/media/0/)
I think is a waste of space just to let 5.75 GB space only to be hidden.
the question: Can i convert the user data partition to make the system partition a little bigger?
Shybet said:
Great tutorial.
Just a little question. I'm sprout8 users, but i use sprout 4 rom. And in sprout4, the default data storage is on external memory (SDCard). The internal memory (userdata) is hidden (on rooted device, i can acces it in data/media/0/)
I think is a waste of space just to let 5.75 GB space only to be hidden.
the question: Can i convert the user data partition to make the system partition a little bigger?
Click to expand...
Click to collapse
Yes, definitely. Just delete userdata, then make it again with a smaller size, delete system, and put the free space in system. Then make the ext4 volumes on them.
will it be possible to give a flashable zip that will do the same as its a very risky process and my device cant be recovgnized in sp tools
1) I had intended to make a flashable zip. But I was too lazy to make one. I'll make it soon.
2) A flashable zip might actually be more risky than this manual method.
3) Unlock your phone's bootloader, and install MTK Vcom drivers, then SP Flash will recognize it.
How to backup IMEI?
Hi. Sorry if this is a noob question. In the article, the first and last steps are to backup/recover the IMEI. Is this done by backing up the "nvram" partition?
ex (backup):
adb shell dd if=/dev/block/mmcblk0p2 of=/microSD/nvram.img
adb pull /microSD/nvram.img
ex (restore):
adb push nvram.img /microSD
adb shell dd if=/microSD/nvram.img of=/dev/block/mmcblk0p2
or is there more to it than that?
Great tutorial!
But how do I restore everything back to normal?
Should I undo the steps or just restoring a TWRP Backup will do?
After I boot in TWRP it says error: "no devices/emulators found". Can you please help me ? I love my cheap phone , I just want to make the system partition a little larger so that I can add some extra apps
actyon20 said:
After I boot in TWRP it says error: "no devices/emulators found". Can you please help me ? I love my cheap phone , I just want to make the system partition a little larger so that I can add some extra apps
Click to expand...
Click to collapse
It says that on PC? That probably means that you didn't install the ADB drivers. Google for "Minimal ADB XDA", and download it from there. Then it should work.
If not, run all the commands in this post from TWRP - > Advanced - > Terminal (no need for PC).
By the way, a larger data partition = more user apps (from Play Store, etc). Larger system = more system apps (not usually needed).
CSAkshay said:
Great tutorial!
But how do I restore everything back to normal?
Should I undo the steps or just restoring a TWRP Backup will do?
Click to expand...
Click to collapse
To undo, you can just flash with SP Flash using the format + download mode.
However, many devices have been getting bricked by SP Flash lately. So I suggest repeating the steps in this post, but use the original offsets and sizes. That will also undo it.
wb407 said:
Hi. Sorry if this is a noob question. In the article, the first and last steps are to backup/recover the IMEI. Is this done by backing up the "nvram" partition?
ex (backup):
adb shell dd if=/dev/block/mmcblk0p2 of=/microSD/nvram.img
adb pull /microSD/nvram.img
ex (restore):
adb push nvram.img /microSD
adb shell dd if=/microSD/nvram.img of=/dev/block/mmcblk0p2
or is there more to it than that?
Click to expand...
Click to collapse
Actually, I'm not exactly sure.
It didn't work for me, so I had to use the IMEI fix zip from these forums to rewrite the IMEI.
out386 said:
It says that on PC? That probably means that you didn't install the ADB drivers. Google for "Minimal ADB XDA", and download it from there. Then it should work.
If not, run all the commands in this post from TWRP - > Advanced - > Terminal (no need for PC).
By the way, a larger data partition = more user apps (from Play Store, etc). Larger system = more system apps (not usually needed).
Click to expand...
Click to collapse
First of all , thanks a lot for the reply.
Second , yes , I tried that from pc with windows 10 64-bit.
My steps:
1. From my phone I enabled debugging.
2. I downloaded "android-sdk_r24.4.1-windows.zip" from //developer.android.com/studio/index. After I launch SDK Manager I installed:
*Android SDK Tools
*Android SDK Platform-Tools
*Google USB Drive
At Environment Variables at Path I added ;C:\android-sdk\tools;C:\android-sdk\platform-tools
When I type "adb" in cmd a long list appears.
3. I downloaded some "ADB Drivers_Updated" and I go in that folder , Open new cmd+shfit and I type "adb shell" and the next text appears ( without lines )
[email protected]_P4Life:/ $-----------------
BEFORE this you said that I must root in TWRP so I google it and I did the following steps :
1. Went in C:\android-sdk\platform-tools
2. Open new cmd+shift and I type "adb reboot recovery" the phone reboots and the next image appears:
//i.imgur.com/JLWdPXU.jpg
After this I'm lost because when I type abd shell in cmd it says "/no emulators found..."
I want to make a bigger partition for "system content apps" because even if I have ~5GB internal memory remaining I saw that there is a 1GB partition that when it's full (programs registry or I don't know what ) you can't install program anymore even if you have an empty SD card attached and the Default Write option in system is set to SD card.
Can you please help me ? This is my first time doing this and my phone is Allview P4 Life . I really like that cheap phone.

Categories

Resources