[PRJ] [DATA2SD] Flashable zips for converting any Rom to Data2SD, For N1 - Nexus One Android Development

Updated April 7th, 2011
All credit to sibere and droidzone and other devs who've developed the Data2SD codes.
Before you do anything with your phone, Pls nanodroid fisrt!!! And flash your phone at YOUR OWN RISK
It's been a while since this post last updated.
In fact, developers of HTC Desire have already create a stable method to implement Data2sd or whatever you call it, which gives you full use of EXT space to install APPs while improving I/O speed at the same time.
The theory is explained here, in case you want to take a further look at it
[DEV][DATA2SD] More space (and more I/O) for your Desire (Updated/EXT4/Flashable ZIP)
And thanks to sibere and droidzone 's great work, now we could make any ROM we like run with Data2sd. here they provide us Flashable ZIP files to make it done
[DATA2SD] Flashable zips for converting any Rom to Data2SD
Updated Instructions and Zips (14/Mar/2011)
I've streamlined the installation procedure so as to make it more generic and compatible with the newer StarBurst zips.
Basic Installation Steps for Data2SD
1. Install your ROM
2. Install the A2SD Killer (specific for your ROM)
3. Next step differs depending on whether you're reflashing your Rom on an existing install, or whether you are installing for the first time.
If you're installing the ROM for the first time:
· Reboot once after running the A2SD Killer
· Setup the timezone, language etc (But not your Google Account/Market)
·Reboot to recovery once again and install the Data2SD Installer
If you're reflashing the ROM (after having installed Data2SD once previously)
·Do not reboot after running the A2SD Killer
·Install the Data2SD Re-Installer right away
·Now reboot.
Click to expand...
Click to collapse
Download Link:
http://hotfile.com/dl/110226722/85a18a8/Data2SDv11.zip.html
http://www.easy-share.com/1914241904/Data2SDv11.zip
Important Notes from droidzone
Fully supports Cyanogen
Fully supports Clockworkmod3.0+ (Edified)
I wanted to consolidate all the flashable zips for Data2SD into one place, so that I will find it easy to update the links as I modify the scripts, and to also help Sibere to point his link to this post from OP, so that he doesnt need to reupload each file as they are modified.
Once again, I must assert that Data2SD is totally Sibere's work with other devs who've developed Data2SD code of their own. In my opinion, however, this is the best!
My contribution is conversion of his excellent code into flashable scripts which may be installed via Recovery. So you dont have to type out the code.
The flashable zip is packed as a package of zip files. Each zip file within the package is seperate flashable zip
There are the following files:
Killer, Installer and Reinstaller files for Sense Roms
A2SDKillerV11_Sense.zip
Data2SDInstallerv1.3_Sense.zip
Data2SDReInstallerv1.3_Sense.zip
Installer and Reinstaller files for AOSP Gingerbread Roms and CM7 nightlies (excluding Cyanogen 6 and MIUI 2.2 , but including Cyanogen 7 nightlies and MIUI 2.3.3 )
A2SDKillerV11_GB.zip
Data2SDInstallerv1.3_GB.zip
Data2SDReInstaller1.3_GB.zip
Installer and Reinstaller files for Cyanogen 6 and MIUI 2.2 (Not for CM7 nightlies or MIUI 2.3.3), which are Older Version
A2SDKillerV9.zip
Data2SDInstaller_cyanogen.zip
data2sd-Reinstall_cyanogen.zip
Whether you are trying this method for Sense or AOSP Roms, the installation procedure is same. Only the file is different.
Click to expand...
Click to collapse
Following droidzone's instruction, I tried these flashable ZIPs with MIUI 1.4.1(Gingerbread 2.3.3)
A2SDKillerV11_GB.zip
Data2SDInstallerv1.3_GB.zip
And it's working just fine. No random reboots, no data or APP lost or system crash after reboot. It's stable and fast!
One more note, you can ignore the previous information below...
————————————————————————————————————————————————————————————————————
updata from
melethron's post, and his update package data2whatever.zip included.
you can buy melethron a beer if you want. All credits to melethron!
I test the script with new install MIUI N1 12.24,
so far no reboot issues, or data corruption.
[DATA2whatever] Flashable All-in-one-Solution for Data2sd (HUGE update (dec 23th))
data2whatever v0.2
Features:
- Supports: Ext2, Ext3, Ext4 (and if kernel supports it: ) btrfs, ReiserFS
- Supports loop device as optional addon (as siberes data2sd)
- Flashable zip for many app2sd ROMs (no long setup required)
- It does a e2fsck (disk check) on every boot and creates a logfile on the sdcard (/sdcard/e2fscklog.txt)
- looks nice if you do a logcat on boot
- no "settings lost on reboot" bug like in my old or siberes script
- changes the scheduler for the sd-card and internal to noop for better performance on sd.
- Nandroid Backup of EXT2/3/4 external with AmonRa 2.0.0.1 or any clockwork recovery.
- Removes the common app2sd scripts on its own
Requirements
- A second partition (same as app2sd - Min 512 mb - 1024mb is highly recommended - max 2048 MB or there will be issues with market) in any format (as long as the kernel supports - ext2/3/4 support is default in most kernels - Ext4 or ReiserFS is recommended).
- An app2sd or non app2sd ROM (data2sd versions wont work) (this SHOULD work with most or at least many ROMs . Roms that are confirmed to work can be found in the post below. Please report to me it it works or not so i can update this thread. If it doesn't work i try to make it compatible asap. )
Installation
1.) Full wipe (at least needed on first installation)
2.) Flash the app2sd Version of the ROM of your choice
3.) DONT REBOOT
4.) If you rebooted then start over at 1.)
5.) flash the attached "data2whatever.zip"
6.) now reboot
ADDITIONAL INFO: Even without "life on the edge" you should watch the first 4 "don't"s of "life on the edge". The normal script use the same disk safety methods as NTFS on Windows or EXT4 on linux. But as you know you shouldnt just switch off the computer because there can still be issues in very rare cases. Reboots with tools like "snqs power menu" is the same as a batterypull (or pulling the ac plug on PC) and this isn't good in general (and this also applies for using it with app2sd). If you want to go to recovery just make a normal shutdown and switch the phone on with "volume down" button pressed.
Optional life-on-the-edge add on
you can find this add on in melethron's original post, and try it on your own risk
This patch has the same effect as sibere's and ownhere's script (loop device - the way ownhere does in v4 doesnt work though). Other than those scripts it this addon doesnt need any repartitioning or other setup (like FAT or a third partition) and can simply be installed or removed with a flashable zip. All you need for this is a normal ext 2/3/4 partition (as above ^^). Ext4 is recommended for this (as above) since it is the fastest of those 3. This patch is more risky than normal ext3/4 considering the possibility of data loss. If you want to use this add-on you should watch the following (this also applys to ownheres and sibere script and is NOT more risky than their scripts):
- DON'T use the reboot of snq's powermenu (or any other reboot app)
- DON'T use anything in the "ROM Manager" that makes it reboot.
- DON'T do adb reboot / abd reboot recovery / adb reboot bootloader
- DON'T pull the battery while the phone is on (this should be obvious)
- DON'T remove the "sync" mount options for the Quadrant "boost" (this is a fake boost anyway)
All of this is like a powerloss for the sd-card and has a high change of data corruption.
From my test with this i give you an estimate what can happen if a powerloss occurs or any of the 5 points above happen:
- 50% general chance of corruption that will be autofixed on boot (not a problem)
- 10% chance of forcecloses after reboot of some apps (this can be fixed by deleting the app data or restoring it with titanium (or other) backup)
- REALLY tiny chance (didnt happen for me in over 40 "simulated" powerlosses) that partition gets corrupted (needs complete repartitioning of the microSD so all data on it will be gone then)
As long as you watch the 5 points above and as long as you don't drop the phone and the battery jumps out this will be safe.
Installation of the addon:
- Flash the "life-on-the-edge.zip" any time after you installed "data2whatever".
Installation of the addon:
- Flash the "life-on-the-edge-UNPATCH.zip" any time after you installed "data2whatever" and the addon. (this will revert back to the normal script)
Personal remark: While this is a improvement over normal ext4 it is not the "holy-grale" of a data2sd lag fix. I'm not using this myself and use a ReiserFS as second partition instead which is more safe and completly feels the same as a "loop" device considering performance.
--------------------------------------------------------------------------------
__________________________________________________________________________________
Dec14 info update:
I uploaded A mod script for CM6.1 stable by Carrol
Carrol changes the script to create a ext4 loop device on EXT4 partition.
Code:
$BUSYBOX mkdir /mnt/asec/extdata
if [ ! -e /data/data2sd.ext.finish ];
then
echo "+++Need create ext4 loopback device for data, please wait... this is 1/5 size of your ext partition"
extsize=`$BUSYBOX df /dev/block/mmcblk0p2|$BUSYBOX grep mmcblk0p2|$BUSYBOX awk '{print $2}'`
datasize=`$BUSYBOX expr $extsize / 5 / 1024`
$BUSYBOX dd if=/dev/zero of=/data/ext4 bs=1048576 count=$datasize
/system/xbin/mkfs.ext4 -b 4096 -m 0 -F -L userdata /data/ext4
/system/bin/tune2fs -o journal_data_writeback /data/ext4
/system/bin/e2fsck /data/ext4
#/system/bin/tune2fs -O ^has_journal /data/ext4
#$BUSYBOX mount -o loop,errors=continue,noatime,nodiratime,nosuid,nodev /data/ext4 /mnt/asec/extdata
$BUSYBOX mount -o loop,barrier=0,nobh,nouser_xattr,errors=continue,noatime,nodiratime,nosuid,nodev /data/ext4 /mnt/asec/extdata
$BUSYBOX chown 1000.1000 /mnt/asec/extdata
$BUSYBOX chmod 771 /mnt/asec/extdata
$BUSYBOX cp -a /data/data /mnt/asec/extdata/
sleep 1
$BUSYBOX umount /mnt/asec/extdata
sleep 1
$BUSYBOX touch /data/data2sd.ext.finish
fi
/system/bin/e2fsck -y -v -f /data/ext4
#$BUSYBOX mount -o loop,sync,errors=continue,noatime,nodiratime,nosuid,nodev /data/ext4 /mnt/asec/extdata
#$BUSYBOX mount -o loop,errors=continue,noatime,nodiratime,nosuid,nodev /data/ext4 /mnt/asec/extdata
$BUSYBOX mount -o loop,barrier=0,nobh,nouser_xattr,errors=continue,noatime,nodiratime,nosuid,nodev /data/ext4 /mnt/asec/extdata
$BUSYBOX chown 1000.1000 /mnt/asec/extdata
$BUSYBOX chmod 771 /mnt/asec/extdata
Note that this script is for CM6.1 stable only, only ONE EXT partition needed on your SDCard, and it will be formated into EXT4, do nanodroid before you try
Also a CM6.1 ROM with Data2Ext by Carrol can be found here
CM6.1 ROM with Data2Ext by Carrol
download: http://rom.anshouji.com/htc/N1/bbs.anshouji.com-N1-data2sd-20101213.zip
________________________________________________________
ownhere Data2Ext script V4
Data2ExtV4
2010/12/12 update V4 script:
/data/:ext4, disable journaling
/data/data:ext4 loopfile on ext4 device, enable journaling on ext4 device, disable journaling on ext4 loopfile, for fast and stable sqlite3 access.
really smooth this time
Click to expand...
Click to collapse
There's a version for Desire, which is here [DATA2EXT] [11/Dec] FULL BENCHMARK, V4, Improve the efficiency of IO
While improving IO efficiency, it moves all userdata to EXT so to avoid insufficient ROM space, cos the whole EXT is recognized as the internal ROM.
with ownhere's v4 script, I got my miui rom working, no data lost or crash after reboot/battery-removed:
1. miui rom 12.03 clean installation(a2sd+ script removed), then flash update.zip of v4 script. working. applying 12.03 to 12.10 and 12.10 to 12.11 ota packages, working.
2. miui rom 12.11 clean installation, flash v4 update.zip, working.
3. miui rom 12.11 with a2sd+ running, 38 apps installed and /data/data moved to ext. The v4 update.zip can still do the job.
However, one problem is that Root explorer couldnot display Chinese filenames of APK , showing only ???. and if install those apks via root explorer, it just reports errors...
Another thing i am not sure of is not knowing how much v4 script could improve when there is only 1 ext partition. According to ownhere, 2 ext partitions are needed to make the best out of his v4 script...
I attached the v4 updtae.zip - Data2ext_update.zip ,in case you might wanna try:
1. BEFORE you try this package, you need to remove the app2ext script(file like 04apps2sd or 01 apps2sd) from /system/etc/init.d, or you would only get bootloop going on and on
2. And of course, Nanodroid...
3. disable signature checking in recovery...
______________________________________________________________________________________________
I tried merging those files into MIUI N1 ROM.
When N1 boots for the 1st time, everything's working just fine.
Now we know the previous script is faking the Quadrant score...
Quadrant bechmark really rocks with I/O scoring 8000+ and a total score @ 3000+
But after reboot, there came some issues:
System config could not be saved;
Home button wouldn't work;
Flight mode and Quiet mode missing in the reboot menu...
Could someone pls help to rewrite the script to fit in N1 ROM?
I think people using N1 would interested in such a script or rom that brings N1 more I/O performance and more space for Apps.
But I have no knowledge of coding, don't know how to fix the issues above.
So I add download link of the script CREATED by ownhere, not by me, hoping someone could make a N1 MOD...
data2ext.zip
data2ext.zip is not a flashable package
Thanks!

mattrb said:
This goes in Q and A.
Also the answer is darktremor. A simple search of the the Nexus One Android Development gets that answer.
Click to expand...
Click to collapse
Sorry, but I don't think Darktremor Apps2SD script could do the job.
Since there is difference between Apps2SD and Data2Ext:
Apps2SD moves
/data/app, /data/app-private and /data/dalvik-cache to EXT
And with some commands /data/data could also be moved to EXT
But Data2Ext moves
/data/app to EXT4
/data/data to a virtual EXT2 device on EXT4, which is the trick to improve IO efficiency working at peak level...
SO I don't know if there is a answer fort this in Q&A...

this comes up after searching
G1 data2sd instruction works for the N1 i suppose ?
http://forum.xda-developers.com/showthread.php?t=527636&highlight=app2sd
**There is NO booting into recovery and wiping of the phone!**
My bad for not being clear on the wipe instructions!
1) (optional) If you are to wipe it (your choice it is not required), then press menu->settings->SD card & phone storage->scroll to bottom of screen and select "Factory data reset". This will wipe the /data partition only removing all apps and settings. BACKUP YOUR /data dir to sd, First or you will need to down load all your apps again to include paid apps!!
2) place data2sd.img in root of SDcard (fat32)
3) terminal in or adb shell in.
4) cp /sdcard/data2sd.sh to /data/local/bin - to copy the script to your user-space
5) chmod 0750 /data/local/bin/data2sd.sh - to make it executable
6) /data/local/bin/data2sd.sh or data2sd.sh may work to run the script
7) once the install is done it should tell you to reboot. If you had the ddms debugger running, you can observer the log as it is working.
8) done. It may boot a little longer if you clean-slate installed and then restored your apps by copying them back into /data/app and /data/app-private which has the affect of reinstalling everything, and thus the boot will take a while if you have alot of apps like I do. Again you can observe this as the Android boots if you have the debugger running.
Click to expand...
Click to collapse

I'm also confused, how does darktremor move all of that to ext? Please explain. I thought darktremor moves apps to ext. If you fail, then you sir are an idiot and gtfo.
A "simple" reread (If that's even enough, maybe 100x more for you) would've told you want he wanted.
Sorry for invading your post jayfallen!!
I for one, am glad you posted this and would like to try it once you get it going.

Try this: http://forum.xda-developers.com/showthread.php?t=853001
I recommend only moving the data of non-essential apps and those apps which DO NOT contain security sensitive data (games, Google Earth, etc. should be fine).

I edited the thread title, and added download link of the script created by ownhere.
someone might wanna take a look, if you're interested in bring your N1 more I/O performance and more space for Apps.
Thanks for everyone replying this thread. I will try your suggestions.

eVil's hd rom~
it's not work on the evil's hd sense?i try that last night~ but it's very hard!!!

i m abt to try this
http://www.miui.com/thread-10723-1-1.html?extra=page=1
wish me luck

the thread @ miui.com was posted by me earlier...
that rom is just experimental, if you don't reboot, everything works fine.
once rebooted, config lost and homebutton lost...
I don't know how to fix, that's why I start this thread @ xda, hoping someone could make it work for N1...

Wow this I want

Not sure if this can help..
Found a post on HiAPK (a Chinese Android discussion forum)
here's the link to the post:
http://www.hiapk.com/bbs/viewthread.php?tid=717815&extra=page=1&filter=type&typeid=211
And here's the link to the ROM:
http://rom.anshouji.com/htc/N1/bbs.anshouji.com-N1-data2sd-20101208.zip
The rom is said to be based on Cyanogen Mod 6.1 Stable, with data2EXT enabled by default.
The attached screenshot comes from a user of the data2Ext rom, note that the internal storage has 0.9GB left.

luciefer said:
it's not work on the evil's hd sense?i try that last night~ but it's very hard!!!
Click to expand...
Click to collapse
That because the current script will only move system/app to ext. There is nothing else in there to tell it to move any other folder, thus failing.

there's been new development...
as houzuoguo mentioned, a CM6.1stable+data2ext mod ROM is out, but there're still some issues
ownhere update his script to V3
http://forum.xda-developers.com/showthread.php?t=859419
1.change loopback device to real partition for powersave and better write performance.
2.disable second partition's journaling.
3.You need 3rd partition for /data/data. But even without the third partition of this script can also work(not stable). My partition settings:second partition:1.5G, thrid partition:0.5G
meanwhile, another new approach is coming out:
http://forum.xda-developers.com/showthread.php?t=868102
NILFS2 - data2nilf2 will be much faster then data2ext and won't have Lags.

whoa
i m glad there are so many new development out everyday
feel so good knowing the n1 is not being left behind
speaking of this is pretty freaking awesome
houzuoguo said:
Not sure if this can help..
Found a post on HiAPK (a Chinese Android discussion forum)
here's the link to the post:
http://www.hiapk.com/bbs/viewthread.php?tid=717815&extra=page=1&filter=type&typeid=211
And here's the link to the ROM:
http://rom.anshouji.com/htc/N1/bbs.anshouji.com-N1-data2sd-20101208.zip
The rom is said to be based on Cyanogen Mod 6.1 Stable, with data2EXT enabled by default.
The attached screenshot comes from a user of the data2Ext rom, note that the internal storage has 0.9GB left.
Click to expand...
Click to collapse
...

That is a huge improvement in IO!
Lets hope this reaches a stable state soon
I wonder why quadrant weighs so much on disk IO for the total score.

Would this be possible on other devices? lets say the g2?

Would someone mind explaining what tangible improvements this makes? Obviously there is an impressive boost in Quadrant scores, but I'm unsure what difference it makes to the actual operation of the device.

bcpk said:
Would someone mind explaining what tangible improvements this makes? Obviously there is an impressive boost in Quadrant scores, but I'm unsure what difference it makes to the actual operation of the device.
Click to expand...
Click to collapse
App2sd u get 512mb for ext3.
Data2ext u get at least 2gb for apps and stuff

Lol. Are u serious. For io scores it cheats. See the script. Fake ext2 for quadrant

truth to be told,they say TTL 2000+ and IO 3000 is the actual scroe...

Related

[READ FIRST] [REF] Dictionary for n00b - What is.../What does ...mean? (2011/01/17)

Dictionary for n00b - What is.../What does ...mean?​
Start read from 1st to last one and don't jump from one to another. If you will read all, it bring complex knowladge, if not you can be confused
Read summary to make sure, that you know everything if you think that some part(s) is not necessary to read for you!
If you post link here, please link to 1st post! Than everybody can know, what he/she can find here
Atin001 helps with some updates/corrections in Dictionary - take a minute to thanks him also.
Did you miss something here? Send me PM what you want to have here!
Basics of Unix-like system (ROOT)
su, root, rooting, superuser app - what is it, why we need it
sh, bash, user/root shell - what is bash, sh; what is user shell; what is root shell; how I can recognise it each other
Bussybox - what BusyBox is, basic list of commands from BusyBox
(in progress) Kernel - what is going on? Do I need it?
Android platform and it's specifics
adb shell - what is it, for what it is
Android SDK - what is it, tool which provides, where to download
Tools for work with Android adb shell - Terminal Emulator, ADB shell from Android SDK and how to use it
Custom recovery
What custom recovery is - what custom recovery is
Tools which custom recovery provides - list of tools with description which custom recovery bringing
ADB as root user
USB-MS Toggle
Backup/Restore
Flash ZIP from sdcard
Wipe menu
Partition sdcard + etx2, ext3, ext4 filesystem description
Mounts
Others
Is it save to install? - possible problems, why should I try it?, backup/restore of original recovery
How this whole thing works - Drellisdee's installation steps description/elaboration
Custom ROMs (generally)
What custom ROM is?
Is save install custom ROM? - potencional problems
What I need for install?
What can custom ROM brings - kernel, update, performance, customization, theme, ....
what is ...
deodexed, zipaglined, png-optimized
JIT, HW:acceleration, VM.Heap Size, stagefright
apps2sd + dalvik2sd
custom kernel (recompiled, ...)
Android versions (collecting informations)
List of versions of Android for Optimus One (official&unofficial) - what we can install into our device
What version can be rooted and how? - version list, how to root, which version can be rooted, which can't
Sources (collecting)
http://en.wikipedia.org/wiki/Android_version_history
Tools which you must have
Android SDK Tools (adb shell)
Terminal emulator
KDZ Updater tool
...
So I'm on way, where I can start doing advanced stuff?
Follow Noejn's sign-post You can find here main point for start.
If you now know basic "words of android world" you can take a look on really great tutorial how to root, install recovery and so on.
Have you some questions? Make sure that you look on Mihir287's FAQ
1. Basics of Unix-like system
su, root, rooting - what is it, why we need it
sh, bash, busybox - what BusyBox is, basic list of commands from BusyBox, bash, sh
Kernel - What is it?
su
Also referred as substitute user - is command for changing of the account in current terminal (usually black screen with blinking cursor). Default account is root account. So if you insert into terminal 'su' and hit enter, you will become root user.
root
Root alias superuser or poweruser is special user account for system administration. Similar to windows having its administrator account, unix-like system have system have the root. With this user you can do anything and if you will run command for delete whole system, unix will just do it! No asking, no confirming. So, watch your steps!
rooting
Rooting is just enabling power of root for applications or our proposes. You can read great article about Rooting on androidpolice. Kepp on your mind, that some steps described on this page are NOT compatible with our Optimus One!!
Superuser app
After rooting is done, you will see new app called superuser in app drawer. This app can delegate applications to use su (root) feature. When app ask for first use, popup window will appear asking if the application should be allowed to use root permission.
sh, bash
is a command-line interpreter or shell that provides a traditional user interface for the Unix operating system and for Unix-like systems. So simply, it is some interface, which can execute command(s), which you have entered. Many shells exist, but in scope of android you can (as far as I know) use only sh (standard - Bourne-shell) or bash (compiled in BusyBox or separately on XDA). Both are basically same, but bash has much more future and it is comfortable. It's too big to describe here, so if you are interested in learning more, follow links in sources section.
user/root shell
How do I know if I'm root or normal user? It's simple. Root's shell is ended with # (usually it's shell looks like "bash-3.2# _") and user's ends with $ (usually bash-3.2$ _). In terminal emulator you also can have only [path]($|#) (for root for example "/etc # _")
BusyBox
also called "The Swiss Army Knife of Embedded Linux" is a tool which brings into Android basic tools known from unix system, but is much more smaller than standard tools is. But this "packing" brings also limits in possibilities in comparison to standard tools in unix-system (missing special modes of tool, color output and so on). Many application use this. For example busybox grep (filtering of text) is needed for application called Market enabler.
BusyBox commands
list of commands is really wide, so it's not possible explain all, so I pickup only top few. (hint: if you want what some command do, just search on google for "man <command_name>" for example man mv or enter command here
cd - cange directory - same like in windows. You can switch directory. example: cd /sdcard
ls - list of files in actual directory (have few switches like for example: ls -l /sdcard/*.png (detailed listing)
cat - print file into standart output (like more in windows) Example: cat /sdcard/data.txt
vi - editing of file. But on limited phone keyboard (no keyboard) it is little harder Read more about vi
cp - copy of one or more file. Example: cp /sdcard/bike.jpg /sdcard/media/bike-wallpaper.jpg
mv - moving/rename files, Example: mv /sdcard/bike.jpg /sdcard/media/renamed-moved-bike.jpg
rm - delete file (rm -R for recursive, or for delete whole folder), Example: rm -R /sdcard/wallpaper-bad/*
find - search for files, Example find / -name "best-chopper-ever.avi"
mkdir - make directory - creates directory, Example: mkdir mynewdir
chmod - changes access of files
less - similar like cat, but you can scroll in it and it doesn't produce any output. Example: less /sdcard/funnytext.txt
Please, take due note that man pages are documentation of unix tools. For BusyBox's tool help, just enter BusyBox <command_name> -h.
Many time, when is BusyBox installed, are also symbolic links created. It means, that is not necessary do BusyBox <command>, but only <command> will be enough.
Kernel
http://en.wikipedia.org/wiki/Kernel_%28computing%29
Work in progress...
Links/thanks:
----------------------------------------------------
su (Unix); wikipedia.org
Superuser; wikipedia.org
Bourne shell (sh); wikipedia.org
Bourne-Again shell (bash); wikipedia.org
BusyBox; benno.id.au; BusyBox.net
Kernel; wikipedia.org
----------------------------------------------------
==========================
Main topic
==========================
2. Android platform and it's specifics
adb shell - what is it, for what it is
Android SDK - what is it, tool which provides, where to download
Tools for work with Android adb shell - Terminal Emulator, ADB shell from Android SDK and how to use it
ADB (shell)
ADB - Android Debug Bridge is a versatile tool lets you manage the state of an emulator instance or Android-powered device. It is a client-server program that includes three components:
A client, which runs on your development machine. You can invoke a client from a shell by issuing an adb command. Other Android tools such as the ADT plugin and DDMS also create adb clients.
A server, which runs as a background process on your development machine. The server manages communication between the client and the adb daemon running on an emulator or device.
A daemon, which runs as a background process on each emulator or device instance.
Generally it can be compared with standard cmd prompt in windows (you can write commands which will be executed locally, for example in Terminal Emulator) or it can be just like SSH in unix-like system (you connect to terminal through adb client (in Android SDK) and commands will be run remotely.
Android SDK
Android software development kit is complex set of tools for developing app on Android. It includes fully usable emulator of Android OS on your PC, where you can do everything. You can install/delete apps, browse web page in embedded web browser, play games or make your own application in Eclipse (widely used IDE for development). Of course, with emulator you can use also GPS or camera. Emulated android phone is just like "normal" phone.
Android SDK tools
Fully emulated Android device
Android Development Tools Plugin (Eclipse IDE)
Android Virtual Devices (AVDs)
Hierarchy Viewer
layoutopt
Draw 9-patch
Dalvik Debug Monitor Service (ddms)
Android Debug Bridge (adb)
Android Asset Packaging Tool (aapt)
Android Interface Description Language (aidl)
sqlite3
Traceview
mksdcard
dx
UI/Application Exerciser Monkey
monkeyrunner
Android
zipalign
Tools for work with Android adb shell
You have two ways ho to connect into ADB service - locally and remotely.
Locally - for local access you will need some application which can connect to local adb shell.
Terminal Emulator (free) - probably most commonly used app from market, which works and looks like standard unix shell.
ConnectBot (free) - same as Terminal Emulator, but it can be also used for connecting via SSH or telnet
Remotelly- For remote connection you need phone configuration adjustment:
Home desktop -> [menu button] -> Settings -> Applications -> Development -> USB debugging [ON].
Also you need connect your phone via USB (or finds on market some widget/app, witch enable using ADB also via wi-fi)
adb tool from Android SDK
After download Android SDK, extract archive somewhere (in example I extracted it in c:/AndroidSDK). Then follow instruction on developer.android.com for installation of SDK Platform-tools (contains adb). After installation click on start menu and in Run... (in Windows7 in search bar) enter 'cmd' and press Ok or [enter]. Then write in cmd line:
Code:
cd c:\AndroidSDK\android-sdk-windows\tools [enter]
now you can enter following command to connect to phone's adb shell if you don't have more connected device (virtual or real-one)
Code:
adb shell
If you have more then one, you need explicitly say which one should be used for connection. So list connected devices with
Code:
adb devices
which shows you serial number of connected devices. Than use
Code:
adb -s <serial-number> shell
Links/thanks:
----------------------------------------------------
ADB; android-dls.com; developer.android.com
Android SDK; wiki.androidforum.cz [CZ]
Basic adb/shell commands for noobs; forum.xda-developers.com
15 Useful Android Terminal (ADB Shell) Commands; gadgetsdna.com
----------------------------------------------------
==========================
Main topic
==========================
3. Custom recovery
What custom recovery is
Tools which custom recovery provide - NAND backup/restore, formatting of SDcard, partitioning (ext1,ext2, ext3), wiping, flashing of Custom ROM, ...
Is it save to install that? - potential problems, backup/restore of original recovery
How this whole thing works - installation description (not how-to install, just explanation of what is done during installation)
What custom recovery is
Recovery is image (binary data) stored in internal memory. This image contains something like "program" maybe better say "tool", which can boot-up independently on Android system. In other words, when this tool is running (booted up), than Android system is not. This tool is part of phone system, and in PC terminology recovery can by compared to BIOS with some added features. This recovery state can be reached on all phone, but if you don't have custom recovery, it will do so-called HW reset and automatically restart itself into standard boot mode. So what is difference between original recovery and custom recovery? Custom recovery didn't call master reset after start and also didn't restart itself.
Tools which custom recovery provides
Let's go check what custom recovery brings (I will describe Drellisdee's custom recovery so another recovery can brings another menu and tools)
In Drellisdee's post is picture of main screen with list and description of tools so let's look on it:
ADB as root user
what is root user, and what is adb, you should already know. If not, follow link on main post.
USB-MS Toggle :mounts sdcard as mass storage
It just mounts your phone as USB-mass storage (USB disk) so in PC you will see new disk where you can see folders based on mountes (lower) and were you can upload what you want.
Backup/Restore:
Nand Backup : runs a nandroid backup of data, cache, boot, system
Nand Backup + .android secure : backs up above plus .android_secure on sdcard (froyo native apps on sd)
//Native app which notify "application can be moved into SD card" if you can move some app. It's good to use, if you used it.
Nand + ext backup : data, cache, system, boot, plus apps2sd on ext partition (old style apps2sd)
//old style apps2sd is used on some custom ROM because can move every application into SD card instead of Froyo's apps2sd
Nand Restore : browse to and select nandroid backup to restore
Absolutely GREAT feature. With NAND you can do 1:1 copy (image) of your actual system (phone's memory). It means, that you didn't backup only SMS, contacts or apps, but whole system with all configuration, customization, wallpapers, system's tweaks... just everything - it creates image of whole phone system. This image will be written to your SD card which you are then free to copy around and back up on your computer.
What it means? You find custom ROM which looks awsome so you create NAND backup and install new ROM, but after few hour/days... you know, ROM before was better. So you boot into recovery, use NAND restore of your old ROM backup and .... woala you have your system just like before backup - as if nothing had happened. For about 2 minutes!! It sounds great, isn't? But one, little problem exist. You can not use for restore only some part of backup. You have to restore all, or nothing.
Flash Zip From Sdcard: Update.zip must be in root of sdcard
This tool is designed for install of custom ROM or for tweaks. If you have instruction to install via custom recovery, and file have .zip extension than you should use this menu. Never unzip file, because file contain meta-information about itself with some validate-checks so if you edit it, or unpack and pack back, it shouldn't work. And of course you can't select *.zip file if it doesn't exist because you unpack it, also you have not to rename it to update.zip, you can just select file to update in list of .zip files. And, at the end, file have to be in root (main folder) of sdcard.
Wipe Menu:
Wipe data/factory reset: wipes data & cache
- wipe of users data (contacts, apps, configuration, ...) and cache (caches of applications)
Wipe cache
- wipe cache only
Wipe Dalvik cache : Wipes Dalvik cache in all possible locations if moved by apps2sd
- wipe of Dalvik cache?
Wipe SD:ext : Wipes Apps2sd ext partition
- if you used Partition SDcard option, you can wipe it here
Wipe Battery Stats
- If you think, that your battery life is too short, you can try delete battery stats. Than let phone fully charge. (more)
Wipe rotate settings
- wipe senzor setting (acceleration, ...)
Wipe .android secure : Wipes froyo native .android_secure on sdcard
- wipe information about moved apps
Partition Sdcard:
Partition SD: Partition's sdcard for apps2sd (this formats card so all non backed-up data is lost)
- will create ext2 partition (you will be asked for size of ext2 and cache)
Repair Sd:ext
SD:ext2 to ext3 : coverts apps2sd ext2 partition to ext3 (requires kernel support for ext3)
SD:ext3 to ext4 : same as above but ext3 to ext4 (requires kernel support for ext4)
ext2 - file system for the Linux kernel (no journal, fast but not recovery of I/O error)
ext3 - file system for the Linux kernel (journal, slower than ext2 because of journal, but provides recovery on I/O error)
ext4 - file system for the Linux kernel (journal, enhanced version of ext3)
Links/thanks
----------------------------------------------------
How to increase battery life; androidforums.com
Comparison of file systems; wikipedia.org
ZeroXtreme's filesystem answer (thanks); forum.xda-developers.com
----------------------------------------------------
Mounts:
Gui mounts to avoid typing in terminal to mount and cd into a dir to mount system, data, cache, sd-ext (if exists), sdcard
Other:
Fix apk uid mismatches
//I'm not sure, can somebody helps?
Move recovery log to SD
Toggle Signature Verify : Turn of signature checking on flashing zips
Key Test : Output keycodes for debugging recovery
I thing that this is clear enough.
Is it save to install that?
Well, nothing isn't without any risk. Anyway, from what I know, nobody has had any problems, if Drellisdee's steps are followed, but you have to have P500, not derivate from Sprint, for example. From my point of view the installation of recovery is without any problems. After update with KDZ_FW_UPD tool I had rewritten also recovery. But this tool is really dangerous, so try to avoid to it.
Anyway, original recovery can be backuped before installation of custom recovery and this can be done by command
Code:
dd if=/dev/mtd/mtd2 of=/sdcard/<name-of-old-recovery>.img bs=4096
for example:
Code:
dd if=/dev/mtd/mtd2 of=/sdcard/my-original-recovery.img bs=4096
For restore,just use same step (command) that you used for flashing, but replace name of .img file.
Code:
flash_image recovery /sdcard/my-original-recovery.img
NOTE: You don't have to do other commands before and after as you done for install of recovery!!
So, where can problems arise?
loss of warranty - LG service have much more advanced software and hardware and they can check what problem caused - make dump of memory and so on
bricking of phone - if something goes wrong, then phone may not start at all
deletion of all data if installation fails - if old recovery remains, than hw reset will be performed
custom recovery doesn't work at all - incompatible devices
Why to try?
NAND backup/restore - the most useful tool ever
you can install custom ROM
high count of successful flashing of custom recovery
for now (what I read on forum), when you had said that you brick your phone by standard LG tool, your warranty repair was approved
How this whole thing works (description of installation's steps)
Let's see on how to:
Copy flash_image and recovery-RA-GNM-thunderg-1.1.0.img to the root of your sdcard
Nothing hard I think.
via adb shell or terminal type this from root su # shell. (Do not type the # as its just for reference to show you need a root # shell not a $ user shell)
Ok, it seems that it doesn't make sense, isn't. But what is root and su we already knows, same as user shell and root shell. Also follows commands probably aren't some "normal" task, so some special user approve will be necessary - so it probably means use of root. So, enter 'su [enter]' for become a root.
Code:
[B]# mount -o remount,rw -t yaffs2 /dev/block/mtdblock1 /system[/B]
// remounting of filesystem for write
[B]# cat /sdcard/flash_image > /system/bin/flash_image[/B]
// print contend of flash_image into /system/bin/flash_image (it is just copying)
[B]# chmod 755 /system/bin/flash_image[/B]
// set up file access for running (basic of unix-like systems)
[B]# mv /system/etc/install-recovery.sh /system/etc/install-recovery.sh.bak[/B]
// rename install-recovery as install-recovery.sh.back
// NOTE: many guys haven't this file, so they get error: [I]"failed on '/system/etc/install-recovery.sh' - No such file or directory"[/I]
// it's normal. If it happens, just ignore it and continue.
[B]# mount -o remount,ro -t yaffs2 /dev/block/mtdblock1 /system[/B]
// remount of filesystem into read-only mode
[B]# flash_image recovery /sdcard/recovery-RA-GNM-thunderg-1.1.0.img[/B]
// using of program/script flash_image for flashing of recovery image
// you can do by same way also restore of your original recovery
[B]# reboot recovery[/B]
// reboots into recovery mode
I think, that was also nothing hard. As was said "#" on beginning means that root's shell should be used for running that command. Maybe you remember what I had written, that if you run something on root's account, it doesn't ask for confirmation and will just do it. Same with responses. If there is nothing to say, then nothing will be said. So if command runs without any problems, nothing will be shown. If something doesn't work, than you will be informed.
Key combo to boot custom recovery from powered off is vol_down + home + power and release keys at LG splash.
Nothing special I guess. But I recommend keep vol down + home keep pressed until custom ROM menu appear.
Note this recovery and the one for the LG Vortex have a service that instantly reboots out of recovery once you load it & I disabled it and thats why you get a E: "Bad Boot Message" on inital startup. Its completely fine.
IMPORTANT NOTE!! Too many of n00bs asking "I have problem, E: "Bad Boot Message appeared, what I should do?" Read ALL carefully before every action!!
Recovery Key mapping:
Up & down : vol-up and vol-down
Select : Menu
Backup : Back
Key map for moving in menu (touch screen doesn't work... )
Links/thanks:
----------------------------------------------------
Drellisdee's custom recovery description; androidforums.com
----------------------------------------------------
==========================
Main topic
==========================
4. Custom ROM (generally)
What custom ROM is?
Is it save to install custom ROM? - potential problems
What I need for install?
What can custom ROM brings - kernel, update, performance, customization, theme, ....
what is ...
deodexed, zipaglined, png-optimized
JIT, HW:acceleration, VM.Heap Size, stagefright
apps2sd + dalvik2sd
custom kernel (recompiled, ...)
What custom ROM is?
Custom ROM is every somehow changed manufacturer's ROM or ROM compiled from source code of Android. "Change/s" can starts with adding/removing default application and can extend to kernels, cpu over/under-clocking, enable/disable features (ROOT, HW acceleration, ...), themes (frameworks, color, ...), keyboards and many other features.
Custom ROM is mostly distributed like signed ZIP package with included installation script for custom recovery. This ZIP is flashed via custom recovery tool.
Is it save to install custom ROM?
Yes, it is. May be I can say, that installation of custom ROM is almost mandatory, because it cost you only few minute if you will not be satisfied - you can just restore your old ROM from NAND backup, if you will be satisfied, you can keep it. And yes, you can also use backup tools like for example Astro for backup of your apps or Titanium Backup backup everything (SMS, call list, preferences, APNs, ...) and restore this in your new ROM (NOTE: In this case it's strongly recommended that both ROM should have same or very similar source/base ROM).
So, it is really simple:
1) Do NAND backup
2) Try new ROM
3) Keep new, or restore old one.
What I need for install?
1) Rooted phone
2) Installed custom recovery
3) Signed .ZIP file of ROM compatible with recovery
#) RECOMMENDED: NAND backup of your actual ROM
What does custom ROM bring
Custom ROM brings almost every feature you can image.
ex:
optimization for maximal power (games), long battery life, calling, texting, playing videos,...
awsome look - changed icons, colors, animations, wallpapers, menu, ....
simple work - feature that will short some work (add restart button, reorganized menu, shorts, gestures, ...)
allow tweaking - overclok/underclok your device, ROOT, ....
It's really not possible describe here every possibility what you can do/get with custom ROM.
what is ...
deodexed - needed for using themes. If you want replace/change some file in system (change theme) you need deodex file which you want change. In most cases it's going on services.jar which contains definition of colour for clock for example.
APKs zipaligned - optimization of APK archive, so it takes less memory and is much faster.
png-optimized - png files takes less memory, are loads faster
JIT - just-in-time compilation also known as dynamic translation, is a method to improve the runtime performance of computer programs, but it takes some time to convert into it on start.
HW:acceleration - using of HW acceleration for rendering GUI. Little increase battery consumption.
VM.Heap Size - maximum memory an application can consume
stagefright - In Android 2.2 new media framework that supports local file playback and HTTP progressive streaming
Apps2SD - (mostly DarkTremor's a2sd) If you create ext partition on your SD card, you can mount it like internal memory (you will have more space on phone memory) and move app on SD.
Dalvik2SD - move of Dalvik into SDcard (saves space)
custom kernel - compiled standard unix kernel (can bring support for features like support ext4 for example)
Links/thanks
----------------------------------------------------
P500 custom ROM list; forum.xda-developers.com
What's Deodex and Odex?; forum.xda-developers.com
What Is Zipalign In Android And How To Make Apps Zipaligned; www.addictivetips.com
PNG compress; http://www.gotow.net/creative/wordpress/?p=79
Just-in-time compilation; wikipedia.org
VM Heap size; forum.cyanogenmod.com
stagefright; developer.android.com
----------------------------------------------------
==========================
Main topic
==========================
Thanks
Very good and hard work
Hats off to you.
rakesh_4utoo said:
Very good and hard work
Hats off to you.
Click to expand...
Click to collapse
Thanks You are welcome!!
very very nice guide, cant wait for you to finish it :X ! Thx alot dude for all the hard work!
Very good work!
Please post it on czech androidforum.cz
Thank you,
David Ullmann, Czech Republic
Very nice. A bit rough around the edges but I'm sure most people can understand it easily enough ^__^ Good job. It came like two days too late for me though since I already asked my questions everywhere on xda to install void
raylgo said:
Very nice. A bit rough around the edges but I'm sure most people can understand it easily enough ^__^ Good job. It came like two days too late for me though since I already asked my questions everywhere on xda to install void
Click to expand...
Click to collapse
But you can be happy and proud, that you probably inspired me!
While backing up the old recovery what do you mean by:
recovery-dump-T
My first line went ok in terminal emulator but second line didn't go ok. That's why I am asking this.
Your the Man! Thank You So much! all are much clearer to me now! now lets gets things started!
lekhwani said:
While backing up the old recovery what do you mean by:
recovery-dump-T
My first line went ok in terminal emulator but second line didn't go ok. That's why I am asking this.
Click to expand...
Click to collapse
It is just example
I think this post should be read for evey noob even before powering his mobile on !
Great work !
Sent from my LG-P500 using XDA App
Quite helpful for noobs like me
So...because I wrote what I wanted, you can make suggestions what are you missing here.... I'm looking forward...
how long should the recovery flashing take?
bazo666 said:
how long should the recovery flashing take?
Click to expand...
Click to collapse
Few minutes
hm, i left it running for like half an hour and nothing happenned. then i unplugged the phone from usb and closed the adb shell, because i had to go.
but the phone boots fine so i think nothing has flashed.
what can be the problem?

[SEP 18][V0.3] Stable Customized BT5 for HD2 - Links updated

Zen's Backtrack 5 For HD2 (and other) Android Smartphones
V0.3
----------------------------------------------------------
New app for loading this (and other) Linux Systems! - https://play.google.com/store/apps/details?id=com.linux.autoloader
Image and app support can be found here --> http://www.zenfulapps.com/
Packed - 640mb
Unpacked - 2.6gig (fits on 3.3 img now.)
--GRAB THE UPDATED SCRIPTS ATTACHED TO THIS POST, THEY ARE NOT PACKAGED INTO THE ZIP--
--Scripts are set to load from EXT4 partition, when i modify them for the .img's ill add them to the script pack--
--if you have .img mounting scripts from previous versions, they will work, as long as file names and directories match--
V0.3 Download
http://www.zenfulapps.com/Android/backtrack5-0.3.7z
(MD5 is still the same
MD5sum (of .7z file) - 9a4796f0ed96e03579c2b4a684d026f5
--------------------
Script pack contains
--------------------
btgo - mounts BT5, and askes how you would like to start, CLI or VNC
bts - stops BT5, and unmounts everything for it.
btl - used to login to bt5 after it has been mounted, to avoid all those "resource busy" messages
mkcore - directory installation and swap file creation
-------------
What you need
-------------
Rooted Android Smartphone
Linux on PC
Busybox installed on your device
SDcard adapter or reader, if neccesary
----------
Lets begin
----------
There are 3 different ways you can do this:
1. Fresh install on EXT4 Sdcard partition ( I HIGHLY recommend this method if possible, much better, a bit faster (no double loops to write to)
2. Create Fresh .img
3. Replace old BT5 system .img
=========================================
1. Fresh install on EXT4 Sdcard Partition
=========================================
This portion of the guide is to install BT5 on a FRESH EXT4 partition on your SDcard. Throughout this porcess, you will:
Backup your current sdcard (EVERY PARTITION, this is why we use PC-linux and not windows)
Fully erase and repartition your SDcard
Replace Android system and user data
Install BT5 on third partition
prepare system for chroot and VNC connection
----------------------------------------
Boot into your Linux operating system. **I DO NOT recommend using virtualbox or vmware, as drivers for usb and SDcard connections arent direct, things can go wrong.**
Shutdown your phone, and remove your SDcard. Do not use adb, or any other tools to do this.
insert your SDcard into your computer (adapter or reader yada yada) and mount every partition.
Make careful note of what is on which partition. safest way to back everything up is through the command line with the command
Code:
sudo cp -Rfvp /media/your-sdcard-partition/* /where/your/backup/folder/is
Do this for each partition, whether you have 1, 2, 3, or more.
In my case, my backup directory looks like this:
Code:
[[email protected] sdcard-backup]$ ls -l
total 12
drwxrwxr-x. 2 hookup-cellular hookup-cellular 4096 Sep 13 18:48 ext2
drwxrwxr-x. 2 hookup-cellular hookup-cellular 4096 Sep 13 18:48 ext4
drwxrwxr-x. 2 hookup-cellular hookup-cellular 4096 Sep 13 18:48 fat32
(ignore the empty directory sizes, my TRUE backup folder is MUCH more vulgar and i wont display it publicly, people may tear thier eyes out )
After everything is backed up, open your partition manager (in Gnome it is gparted, cant remember the name in others)
Navigate to your SDcard, and DELETE every partition. every one.
afterwards, recreate them using this strategy:
partition 1 - FAT32 size = total sdcard size minus ext2 and ext4 partition sizes
partition 2 - EXT2 size = 256mb, 512mb, 1gb, depending on how you like your apps2sd
partition 3 - EXT4 size = size you want for linux, minimum should be 4gb (mines at 10gb, i like my linux and got 3 different ones on it at the same time.)
When you are done, copy back your fat32 and ext2 stuff using the SAME COMMAND AS ABOVE (sudo cp -Rfvp from/here to/here)
Now, unzip/tar the .tar.gz package. I recommend extracting it to your pc before trying to put it on your sdcard.
Using the copy command above, put the extracted files onto your sdcard's EXT4 partition.
Double check the partition (navigate to it in nautilus or whatever filemanager your using) and ensure that it has the system copied over properly. You should see /boot /etc /root /sys so on and so forth, NOT just one folder with all of those inside of it.
Insert your SDcard, power on your phone, go to terminal emulator, and enter this:
Code:
su
cd /sdcard/scripts
sh mkcore
Swap file is damn near neccessary if your planning on using any GUI tools (armitage, zenmap)
Your directory structure is now in place, swap file created, and you start BT5 by typing (from /sdcard/scripts OR /data/linux):
Code:
sh btgo
=================================
2. Fresh Image Creation
=================================
for this, we use the dd command and mkfs.ext4 command.
Code:
dd if=/dev/zero of=/path/to/where/you/want/the/img bs=1M count=3300
Change this command as needed, running it as is wont do anything good. Change the of= to where you want your img to be located.
next is mkfs.ext4
Code:
mkfs.ext4 /path/to/where/you/want/your/img
select yes when it cautions about "not a block device"
When this is finished, mount it using these commands:
Code:
su
-your password-
mkdir -p /mnt/bt5img
mount -t ext4 /path/to/your/img /mnt/bt5img
now, extract the BT5 package to a place on your Computer. When finished, run this command:
Code:
sudo cp -Rfvp /path/to/bt5/core/* /mnt/bt5img/
changing parameters accordingly.
After this, copy the .img to /sdcard/bt5 and run the start scripts from your terminal emulator.
================================
3. Replace Existing Image
================================
Mount your bt5 image, erase what is inside of it, and copy in the new system:
Code:
su
-your password-
mkdir -p /mnt/bt5img
mount -t (your ext type) -o loop /path/to/your/bt5/img /mnt/bt5img
rm -Rfv /mnt/bt5img/*
cp -Rfvp path/to/bt5/core/* /mnt/bt5img/
unmount your .img, place it on your sdcard, and your all set.
==============================
Changes in v0.3
==============================
- Trimmed alot of fat, fits inside of 3.3 image now, though space is SEVERLY limited (removed CUPS and sound stuff, who needs to print from within thier phone anyways?)
- various small changes for performace improvements.
- a few new tools installed, but not tested
- restored my personal version that i nuked. It works now.
NEW STUFF TO COME, STAY TUNED!!!
First off, My apologies for starting a second thread on this, I've made ALOT of changes and i feel the first thread is dead and useless. (Reprimand me if needed
-pics coming once I find my camera could be a small while-
---------------------------------------
Backtrack5 for HD2 - v0.2
Customized by z3n
My goal: the perfect stealth
tool in your pocket
just one tap away
---------------------------------------
========================
Codename
Squeaky Wheel
========================
Updated, check second post for changelog
========================
DOWNLOAD
========================
Please use the scripts attached at the bottom of this post instead of the packaged ones, and i havent had a change to update the full image zip with it (uploads take a while )
V 0.2
Part 1 - http://www.megaupload.com/?d=D0MQVAS4
Part 2 - http://www.megaupload.com/?d=M2MRYLAH
MD5 - 06225e18cdbfee6f88daf7e9ee3a1163
SHA1 - eeba19e53565a1643703cf8938be2f8cfc12db9a
V 0.1
Part 1 - http://www.megaupload.com/?d=83B22Y00
Part 2 - http://www.megaupload.com/?d=SB98AA19
mirror - (NOT interchangeable)
Part 1 - http://www.megaupload.com/?d=HU320Z81
Part 2 - http://www.megaupload.com/?d=QN9C560Z
Checksums of bt5.img
MD5 = 863e6db99e5207a81ad0df7d13998235
SHA1 = c84d8f27df8b9b51059e5a6b09e65853f11de970
7zip required to extract.
Just over 1gb packed, unpacked is 4.9gb.
========================
INFO
========================
This is my first release of a customized, working, mostly stable BT5.
Many things have been added, taken out, and configured to be used within the Android system. For a full list, please see the bottom of this post.
Mounting is different than most other linux .img installations, allowing for a full (and expandable) image.
V 0.2 Now has a swap file created when you run the mkdirectory script. This swap file is necessary, as with all my tests, When you run VNC with most of the major tools, there's a high chance of the phone running out of memory (im running no extra apps, completely stock Hyperdroid)
(if you have a swapfile already, you can say no to creating another, just make sure that the file is located at /data/bt and named btswap.)
**This image is in ext4, make sure your kernel supports it!**
**Everything tested on Hyperdroid-CM7 by pongster**
==============
INSTALLATION
==============
You need:
-Full Nandroid Backup in case something goes batty
-16gb HD2
-ext4 support on your ROM/kernel (lost my ext2 image due to my own stupidity, will create another matching one later)
-Linux on PC (to create the ext4 partition)
-Busybox (from market)
-VNC Viewer (from market) (optional)
FAT32/EXT4 Split card
---------------------
1.
Back up your HD2 and SDCard to safe places (off of the phone and sdcard)
2.
Boot your linux installation and open partition manager. erase all the partitions on yor SDcard. Then create them in this order.
1. FAT32 - size of this is total sdcard size minus 6.5g (for bt image) minus 100mb for aps2sd
2. ext2 - 100mb
3. ext4 - 6.5 gb
3.
Copy the bt5.img to the root of your third partition.
copy the bts folder to the root of your FAT32 partition.
4.
if this is your first time using this script/image, run the mkdirectory script first with
Code:
su
sh /pathtoscripts/mkdirectory
Load up your android terminal and type
Code:
su
cd /path/to/scripts
sh go
5.
Now it asks you if you want to log in to the console or start vnc automatically. (check log for port, usually 5901 or 5902)
DEFAULT VNC PASSWORD IS: toortoor
DEDICATED SDCARD
----------------
Same as everything above, minus the FAT32 partition.
"sh ded"
starts for dedicated SDcard instead of
"sh go"
Proper Shutdown Procedure
=====================
Stop script has been modified to shutdown backtrack and all of the (usual) programs that stop things from unmounting properly.
Exit any VNC connection you currently have.
1. Run sh stop (from your scripts location)
2. Reboot phone as a precaution.
One thing i did personally to make this easier was load the scripts onto /data/bt, so switching SDcards or locations doesnt matter.
(I also changed the terminal start directory to my scripts folder easy quick access)
=======================
Main Features I've gotten to work
=========================
-Clean mount/umount, as long as VNC and MySQL are killed BEFORE exiting the chroot - stop script kills these now
-Apps no longer disappear for good with sdcard removed, only disappear until SDcard is reinserted (apps2SD/loop device problem, any ideas?)
-MySQL for metasploit
-Metasploit working
-Armitage working, missing some "Attack" options (looking into it)
-Zenmap installed
-OpenVPN installed
-Traffic analysis possible with tcpdump (local only)
-Enables possibility for FakeAP attacks
-macchanger works (kinda, phone needs a reboot for original MAC to return)
-Armitage Launcher placed on Desktop (takes a while to load, be patient)
-Terminal Launchers in various places (updating may randomly remove your terminal, synaptic placed on desktop as standby to redownload terminals
-guake installed (drop down Terminal, makes commands easier to see while working) (not configured to a key yet)
This probably works with other Android phones too. If you change the scripts, and as long as it has a external SDcard you can partition.
if your using a different phone, this is untested unless specified otherwise.
-boot and shutdown scripts run clean as long as VNC and MySQL are shut off(in almost all cases)
@ XDA
http://forum.xda-developers.com/show....php?t=1152994
PASSWORDS
------------
MySQL - user: root pass: toor
VNC - User: root pass:toortoor
sys pass - user:root pass:toor
(I know, standard ones, but this should answer a few questions)
===============================
Thanks
===============================
anantshri - for the original scripts and BT5 img for android
BT dev team - (of course )
and all of you
===============================
Information, bugs, and oddities
===============================
One important thing, While performing heavy operations, its normal for your screen to not turn on for a while if it turns off. Dont panic, just give it some time to finish whatever you were running and your phone will be back to normal again. DO NOT PULL THE BATTERY UNLESS ABSOLUTELY NECESSARY.
To avoid this, get wakelock (known to cause problems) or set your screen timeout to some large number.
Swap file will help with alot of this.
These are the features I've tested out so far.
No major changes to anything, (except new packages) just configuring everything i see.
If you find anything you want added in or that is acting odd, please let me know. Same goes for if you fix something!!
Overall
-------
-Repo's activated, most things work (upstart processes fail, for now)
-startvnc and stopvnc no longer give that pesky USER error
-startvnc starts mysql database for metasploit
-stopvnc stops mysql (mostly, invoke ps -A and look for mysqld. Kill it with fire(-9) if need be)
-network traffic is capture-able with tcpdump, with wifi hotspot activated
-working on adding in a swap partition on sdcard (if possible)
-openoffice installed
-openVPN installed (the quieter you become...)
-Removed Zoho Web services
MySQL
-----
default user - root
default pass - toor
-Starts automatically with startvnc
-stops automatically with stopvnc
-start manually by invoking "mysqld"
-Only runs as root (for now)
-Console hangs when it is manually loaded or shutdown, service continues running though. killall --signal 9 mysqld if needed.
Metasploit
----------
-Loads up alright (45-90 seconds)
-MySQL already set as default DB
-Must manually connect to MySQL DB each instance of metasploit by invoking (from msf) db_connect root:[email protected]
-working on a possible way to limit cpu consumption to prevent system hangs(cpulimit does some nasty things)
-So far, this is the only connection string ive been able to get to work: root:[email protected]
Armitage
--------
-Takes forever to load (30 seconds for connect screen, 4 minutes or so for main client)
-Causes system hangs frequently (to minimize this, leave the vnc server on your screen, and set the display timeout to 10 minutes-switch it back when done to conserve battery life)
-So far, this is the only connection string ive been able to get to work: root:[email protected]
-Can Crash phone if running too big of an operation (Max Phone memory problem, fixed in v.2 with swapfile added)
Zenmap
------
-Slows phone down (incredibly bad with more complex scans, of course)
-Some Complex scanning options can crash phone (Nothing damaging has happened)
-will attempt to throttle cpu usage in the future
-Can Crash phone if running too big of an operation (Max Phone memory problem, fixed in v.2 with swapfile added)
Aircrack-ng suite
-----------------
-Aircrack-ng works
-Airodump-ng doesnt work (needs monitor)
-Airdecap-ng untested
-Airdecloak-ng untested
-Airbase-ng doesnt work (needs monitor)
-Airmon-ng doesnt work (needs monitor)
-Aireplay-ng doesnt work (needs monitor)
-Airdriver-ng doesnt work (yet)
-Airolib-ng works (doesnt do anything yet)
-Airserv-ng doesnt work (needs monitor)
-Airtun-ng doesnt work(needs monitor)
Plus lots of stuff for the future, stay tuned!!
http://forum.xda-developers.com/show....php?t=1152994
In the future
=========
-nessus
-Booting via HD2 Toolbox by d4n14l (sp?)
-Custom kernel (WAYYYY down the road, but working on it)
and more
--Copyrighted by z3n, 2011
(just kidding, but it looks good )
Looks good will give it a go.
Thanks for sahring
I we could get our wifi card into monitor mode --> awesome!!!!
Thanks to z3nful & everyone made this possible!
Enjoy everyone
The next release is going to be faster, stabler, and more useful
I'm also working on a round-about way for packet injection and monitor mode
Stay tuned
Sent from my Hyperdroid Pocket Laptop
cool.. good job man..
Are you trying to patch the wifi drivers ? =D
Holy crap.....this is a dream in the making Bring on monitor mode and packet injection
I've done some researches.. and found out that many devs have tried making the driver to work on the Monitor mode.. but they failed to do that.
It looks to me that Backtrack on HD2 is kinda useless.
Not useless, just last night I ganked my roommates computer with my phone
As far as monitor mode and injection go, sadly, they may be right that its not possible, but I got some ideas that may make it work, I just need to hammer out some kinks in BT first
And who needs monitor when you can fakeAP?
"Make them hand you the keys and you don't have to break their Window(s)™"
Sent from my Hyperdroid Pocket Laptop
A m a z i n g
Next release is going to be even better this 5gig image is almost full, so I'm going to expand it to 6gig, along with instructions on how to expand your own image if that's to large or want even more space.
Btw, Wine should be good to go in the next one
stay tuned!!
Sent from my HD2 "Pocket Laptop"
I would love to see some Sceenshots (or better: a video) here!
Lol will do, gotta go find my 10 year old Polaroid I've been using this phone or all my pics and videos, so this could be tricky
Sent from my HD2 "Pocket Laptop"
good to see development beyond just starting up the image... I would be taking some pointers from here for my device too....
hope you don't mind that....
Not at all, I've been trying to track down your name again so it can add you to the credits part, as the basis of the scripts was yours lol, I just changed the loops and mounting structures around a bit, and added some stability checks.
The scripts for this image are slightly out of date but I got new ones going up once I have time they should fix a few of the small eerrors people get while mounting
My next version is a little ways out (works gotten crazy busy lately) but it'll be out eventually
Sent from my HD2 Pocket Laptop
Not Booting!
Hi Thank you for sharings this up!!! this is like a dream for alot of people.
i have followed all your steps but i have a problem when i run the scripts, the folders dont get created because when i run go i get a bounch of folder not found.
my SD card had some differences is a 16GB
with
Fat32
Ext-sd/ EXT2 -->1GB
EXT3 --> 100MB
EXT4 --> 6.5GB
could this setup causing the script to look on the wrong partitions? i have alot of time with out playing with Shell scripting but i would like to know if that is the place i should start looking for a fix
-edit- just double checked (forgot scripts were on my phone... its been a long week lol) and you should just need to change the mount -t ext4 /dev/block/vold/179:3 to /dev/block/vold/179:4
Also, did you run the new mkdirectory script? If you have the one packaged with the image its out of date. The attachment on the fist post has the updated ones
Ignore all mmcblk's
For another "buffer" partition, you need t point the sdcard parts (mmcblk0p* and vold/179:*) to what yours are in /dev/block. In your case I think you just need to change any vold/179:3 to 179:4. If you go to /dev/block/vold it will have folders from each partition (they are numbered 0 and up, but 1 would be your fat32, 2 is ext2 so on and so forth)
When I'm near my computer ill figure out the full ones for you
Sent from my HD2 Pocket Laptop
can I get it for Htc desire..??
It should work, as long as you have a big enough sdcard, your phomes kernel suppers ext4, and you might have to change a few small variables
Sent from my HD2 Pocket Laptop

[HowTo] Archos gen8 firmware 2.3.81-2.4.83+rw iptables and 1GB ext4 data

I just wanted my Archos Gen8 to have the latest stock firmware, root access, iptables support (for Droidwall) and a 1GB ext4 data partition. I will show you how to create this setup yourself. This howto describes all steps for a Linux PC with a working adb connection to the Archos Gen8. I am sure all steps can be done from a Windows PC too, but I cannot help you there: I only speak linux. [edit: Harfainx has written a thread on http://forum.archosfans.com/viewtopic.php?f=76&t=54637 that explains how to do these steps on windows; if you to do this from windows and have iptables and ext4, use my attached kernel and ext4 modifications instead of Harfainx' suggested chulri kernel]
[Archos] = do on tablet
[Linux] = do on PC
[Shell] = do in a terminal on PC
[ADB] = do in a adb shell from PC
[GParted] = do in gparted in PC
[Editor] = do in your favorite text editor on PC
All credits for this procedure go to other people (see end of this post); my only contribution is this write up, and the compilation of the new kernel.
1. Use chulri's root method to obtain root+rw with the latest Archos firmware on your Archos Gen8 (download the proper firmware version, and take care to rename the downloaded firmware file to firmware_archos_android_gen8.aos).
2. Install the matching version of my kernel + initramfs (see links below)
reboot Archos device and hold down "Vol-" button after screen went black
Go to "Recovery Menu" and then "Developer Edition Menu"
choose "Flash Kernel and Initramfs"
connect your Archos device by USB to your computer
upload zImage and initramfs.cpio.gz to your device
safely disconnect the USB connection
press ok on Archos device
reboot
3. Repartition your internal SD card
reboot Archos device and hold down "Vol-" button after screen went black
Go to "Recovery Menu" and then "Repair system” ->"Start USB MSC"
Connect tablet to your linux pc
Resize interal SD card and add an ext4 partition:
[Shell] sudo gparted
[GParted] find Archos device. For me it is found on /dev/sdc
[GParted] select the Archos partition and resize to have 1024MiB at the end left
[GParted] create a new primary partion using all the space you just created, filesystem ext4 and align to MiB
[GParted] apply all selected actions, let it finish and quit gparted.
unplug and reconnect your device so Linux finds it again.
Format the ext4 partition with some nice settings (if your device was on /dev/sdb replace /dev/sdc2 with /dev/sdb2 below):
[Shell] sudo mkfs.ext4 -b 4096 -E stride=64,stripe-width=64 -O extent,^huge_file -m 0 -L data /dev/sdc2
[Shell] sudo tune2fs -c -1 -i 0 -m 1 -O ^huge_file -o journal_data_writeback /dev/sdc2
[Shell] sudo e2fsck /dev/sdc2
press ok on Archos device
reboot
4. Make your new ext4 partition your /data partition
Boot up your Archos and proceed through the startup wizard; do not put too much effort in this because all information you enter now will be lost after this step.
Open options->applications and enable debugging support.
Connect the Archos to your linux PC
[Shell] adb shell
[ADB] su; stop; cp /init.rc /sdcard/
[Shell] adb pull /sdcard/init.rc
Modify init.rc:
[Editor] Open the just downloaded init.rc
[Editor] Replace the "mount ext3 /dev/block/mmcblk0p4 /data noatime nosuid" with "mount ext4 /dev/block/mmcblk1p2 /data rw noatime nosuid nodev barrier=0 data=writeback nobh"
[Editor] save file and close
[Shell] adb push init.rc /sdcard/
[ADB] cp /sdcard/init.rc /init.rc
[ADB] start
reboot
5. Now your device should start up and use your new ext4 partition as /data. In my case after reboot I had to force another reboot (hold on/off for 10sec) for the system to properly boot and come up with the Archos startup wizard again (the previous startup’s data is lost because we have a new /data partition).
6. Enjoy!
All credits for this procedure go to other people; my only contribution is this write up, and the compilation of the new kernel.
Rooting method: chulri
1GB data partition: chulri and wdl1908
Ext4 format flags: Sibere
Proper compilation of iptables and ext4: $aur0n and woti23
Howto compile the kernel yourself
Compiling this kernel yourself is not very hard.
1. Set-up chulri's development enviroment
2. Configure the new kernel
[Shell] cd $ARCHOS
[Shell] make kernel-config
[Config] In Networking support -> Networking options -> Network packet filtering framework (Netfilter)
Core Netfilter Configuration -> Netfilter Xtables support: y; Xtables -> "owner" match support: y
IP: Netfilter Configuration -> IP tables support: y; Packet filtering: y; REJECT target support: y; LOG target support: y
[Config] In Filesystems
The Extended 4 (ext4) filesystem: y
Ext4 extended attributes: y
[Config] save changes and exit
[Shell] make kernel-build
After compilation, locate your kernel zImage and flash it together with chulri's initramfs.cpio.gz (which is also provided in the zip in the first post).
Recommendations to speed up your tablet
Now that you have your Archos Gen8 as you want it, I can recommend two additions to speed up your system.
1. You now have a fast, big ext4 data partition which you should use for all applications:
[Shell] adb shell pm setInstallLocation 1
2. Replace the default Launcher *ANY* launcher but the Archos one. Personally I recommend the Zeam launcher, since it is really lightweight:
Get your copy of zeam, install it, press "home" button and make it default to zeam.
[ADB] su; cd /system/app; mv Launcher2.apk Launcher2.apknot
The last step makes sure that the Archos launcher does not startup anymore, saving your memory. The last steps also removes the default Archos wallpapers, so make a copy of the one you want or get some nice new ones.
Since the device setup of this thread uses unionfs to make changes to the /system, you could also just remove /system/app/Launcher2.apk. To restore it you can remove /mnt/system/unionfs/system/app/.wh.Launcher2.apk. (Thanks to skeeterfood for pointing it out.)
Great work! Thumbs up!
Thanks for this awesome tutorial!!!!!!
Thanks to all the people who work on our Archos Gen8 devices!!!!
is the performance comperable to urukdroid? i really like urukdroid but the mediascanner issue drive me nuts .
Anyway great work and thanks for the tutorial, now a kernel to be able to overclock and it would be awesome
cHarOn99 said:
is the performance comperable to urukdroid? i really like urukdroid but the mediascanner issue drive me nuts .
Anyway great work and thanks for the tutorial, now a kernel to be able to overclock and it would be awesome
Click to expand...
Click to collapse
I don't know if performance is comparable to UrukDroid; I've used Uruk 1.0 for some months but I haven't run any benchmarks. The reason for that is that Quadrant keeps giving errors in fixed landscape mode and I always used fixed landscape because the stock Archos launcher takes for ever to redraw on screen rotation.
Now of course I replaced the Archos launcher with Zeam, and now redraws on screen rotation are very fast. Replacing the Archos launcher in UrukDroid with Zeam would of course give you the same improvement. Anyway, with the configuration described above @800MHz (I could set it at 1GHz but I didn't) I get Quadrant scores of 1810. If you run it on UrukDroid, we can compare.
Definitely my system is booting much faster now than than it did before, but that might just be Zeam.
Right now sibere is making kernels for UrukDroid which give a nice performace improvement; perhaps he is willing to make kernels for stock too, or help me a bit along? Also when I have some more time, I hope to port some of Ardatdat's kernel improvements to the latest firmware kernel. Maybe someone else is working on that already?
WhoDunnit said:
I don't know if performance is comparable to UrukDroid; I've used Uruk 1.0 for some months but I haven't run any benchmarks. The reason for that is that Quadrant keeps giving errors in fixed landscape mode and I always used fixed landscape because the stock Archos launcher takes for ever to redraw on screen rotation.
Now of course I replaced the Archos launcher with Zeam, and now redraws on screen rotation are very fast. Replacing the Archos launcher in UrukDroid with Zeam would of course give you the same improvement. Anyway, with the configuration described above @800MHz (I could set it at 1GHz but I didn't) I get Quadrant scores of 1810. If you run it on UrukDroid, we can compare.
Definitely my system is booting much faster now than than it did before, but that might just be Zeam.
Right now sibere is making kernels for UrukDroid which give a nice performace improvement; perhaps he is willing to make kernels for stock too, or help me a bit along? Also when I have some more time, I hope to port some of Ardatdat's kernel improvements to the latest firmware kernel. Maybe someone else is working on that already?
Click to expand...
Click to collapse
I agree with you, Zeam is the best Launcher for Archos . When installing UrukDroid, my Archos is longer battery life, LCD is more sensitive and it very fast . Another devices, when you increase speed of cpu, battery life is softer .
I don't think Uruk firmware had been cooked with stock kernel, stock kernel's not stability.
thanks for the reply, personally i don't care about quadrant which is the worst benchmark at all , you already answered the question good enough for me, you said booting is faster and general the feel is fast, thats for me a better benchmark result then any syntetic test which gives you results like in the lottery .
I use Golauncher on the A43 and it works also good, i never used the stock launcher .
I think i will try your solution out and look forward to some kernel improvements if you make one, if not then also fine.
Thanks again
i prefer VTL.Launcher. it is based on adw, but better configurable. i remove ALL soft buttons, all panels and the notificationbar. instead i use Button Savior to have HOME/BACK/SEARCH/MENU buttons.
runs pretty smooth and i can use fullscreen.
any launcher goes
Right, that's the beauty of android: Anything can be replaced and modified to your own taste. I modified my recommendations above about replacing the default launcher with Zeam: *ANY* launcher is better that the Archos default one. My only reason for recommending Zeam is because it is lightweight.
Bottom line: replace the launcher with any alternative and you will have a smoother system.
I love open source and, of course, linux(android) and the power of freedom it has. i hope it will never become mainstream as Windows or Mac is.
Thats the reason why i donate as much as i can to oss projects instead buying expensive Windows software.
And thats why i have big respect to all people who made our computerworld a little bit better to use! Call me a idealist, i am proud to be one! If we were no idealists things like Android wouldn´t exist.
OK, enough
back to topic!
WhoDunnit said:
Now that you have your Archos Gen8 as you [*] [ADB] su; cd /system/app; mv Launcher2.apk Launcher2.apknot
[/LIST]
Click to expand...
Click to collapse
Might as well just do:
[ADB] su; cd /system/app; rm Launcher2.apk
since it's really not deleting the file, but instead creating a .wh.Launcher2.apk file in /mnt/system/unionfs/system/app/ that causes unionfs to hide the file. You can always get it back by removing the /mnt/system/unionfs/system/app/.wh.Launcher2.apk file.
-John
Is the ext4 1 gig of data for extra app space?
skeeterfood said:
Might as well just do:
[ADB] su; cd /system/app; rm Launcher2.apk
since it's really not deleting the file, but instead creating a .wh.Launcher2.apk file in /mnt/system/unionfs/system/app/ that causes unionfs to hide the file. You can always get it back by removing the /mnt/system/unionfs/system/app/.wh.Launcher2.apk file.
Click to expand...
Click to collapse
Right, thank you. I added it to the steps to follow.
darren1 said:
Is the ext4 1 gig of data for extra app space?
Click to expand...
Click to collapse
That's the idea: All (non-system) apps and data will be stored in the 1GB ext4 partition.
WhoDunnit said:
That's the idea: All (non-system) apps and data will be stored in the 1GB ext4 partition.
Click to expand...
Click to collapse
Great, thanks.
A70H Compatible?
Thanks for all the work. Looks great and I'm about ready to try it but need to know first, will this work on the A70H (250gb version)?
H_Scrappy said:
Thanks for all the work. Looks great and I'm about ready to try it but need to know first, will this work on the A70H (250gb version)?
Click to expand...
Click to collapse
It's been suggested that you shouldn't perform this operation on the hard-drive versions. Constant app re-writes on the hard-drive could be a cause for early drive failures.
Nice write-up here WhoDunnit. I did a Windows-based write-up last month over at the ArchosFans forum. Now it looks like people have some options for methods to create their partitions on both Linux and Windows. More information is always a good thing
http://forum.archosfans.com/viewtopic.php?f=76&t=54637
Harfainx said:
I I did a Windows-based write-up last month over at the ArchosFans forum. Now it looks like people have some options for methods to create their partitions on both Linux and Windows. More information is always a good thing
http://forum.archosfans.com/viewtopic.php?f=76&t=54637
Click to expand...
Click to collapse
OK, great. I added a link to your thread so people can find answers if they want to do this from windows.

[KERNEL][MOD] Mugetsu v2 > experimental / kernel / patched sqlite3 / sd-ext tools

Mugetsu is a package for Urushi (SE Ray) comprised of:
Custom kernel
Patched libsqlite.so
/sd-ext tools
Even though it's a single package, I've split everything between 3 posts according to the above schematic.
Clicking on each one will take you to its own dedicated section.
I have reserved a last post for instructions on how to port this over to other XPERIA 2011 devices.
Mugetsu is mainly a custom kernel based on FXP's source up until 3/11. The credit of every work prior to this date, as well as providing the wlan source needed to compile wireless modules, belongs to FXP team. I've just tweaked and messed a bit in order to optimize performance, internet speed, battery and memory management, while keeping it as light as possible.
Currently working for:
CyanogenMOD 7 (lastly tested with FXP045)
SEMC 4.0.2.A.0.42 *
MIUI (lastly tested with MIUI 1.10.21)
* wifi is broken since I'm unable to compile wlan modules for stock
Features\Changelog:
Code:
[I]version two[/I]:
- Increased OC support up to 2.0 Ghz.
- [URL="https://market.android.com/details?id=com.skvalex.callrecorder"]Added support for voice calls recording[/URL]. (experimental)
- Further optimizations to Deadline I/O Scheduler.
- Lowmemorykiller.c parameters tuned.
[I]version one[/I]:
- Bumped version to 2.6.32.18
- Overclock support up to 1.6 Ghz
- Tiny RCU (+ optimizations)
- SLQB memory allocator
- Many new CPU freq governors (+ optimizations)
- Many new I/O schedulers (+ optimizations)
- Bumped BFQ to last version
- Support for CPU unaligned access
- Veno TCP Congestion control *
- Stochastic Fair Blue network scheduler *
- Bumped jHash to last version *
- Improved RWSEM algorithm
- Improved CRC32 algorithm
- Disabled swappiness
- Increased Config_HZ
- Increased data transfer rate
- Sysctl and lmk tweaking
- Stripped of unnecessary crap. So you have an idea, stock kernel has 3.2 MB, FXP has 3.0 and this one has 2.6 MB.
* huge internet/market page loading boost
CM version is updated to the latest build so it has wifi, haptic feedback and vibration working.
SEMC has an insecure boot.img so it can be rooted with SuperOneClick and I've also added CWM recovery.
Available modules:
Code:
- TUN
- CIFS
- Powersave governor *
- Performance governor *
- Logcat
* since powersave lowers cpu max frequency to same value as the min frequency and performance the other way around, these just seem kind of irrelevant when you have cpu sliders; however, I've included them as a module for advanced users
For activating a module, run this command on terminal: insmod /system/lib/<module.ko>
You may want to add afterwards a line to a init.d for automatic insmod.
Available governors:
Code:
- Ondemand
- Conservative
- Interactive
- InteractiveX
- Smartass2 *
- Smoothass
- BrazillianWax
- SavagedZen
- MinMax
- Scary
* default
For choosing the governor use CM settings > performance, SetCPU, ROM Toolbox or any other app.
More information: http://forum.xda-developers.com/showpost.php?p=17131902&postcount=1
Available I/O schedulers:
Code:
- Noop
- BFQ
- CFQ
- Deadline *
- Simple
- VR
- Anticipatory
* default
For choosing the I/O scheduler use No-Frills app or the following command:
echo "scheduler-name" > /sys/block/mmcblk0/queue/scheduler (cat this path for the names)
More information: http://forum.xda-developers.com/showpost.php?p=17131914&postcount=2
Download (SE Ray only):
v1: SEMC 4.2.0.A.0.42 - 414c02bb24712eec04e92d1ec858c9f0 || CM/FXP - c058878d24f90871ee808e18c3f6b8f1 || MIUI - (check in MIUI thread)
v2: removed for giving wifi problems to some people.
Instructions:
Download the package.
[CM7] Copy the package to your microSD card.
Extract boot.img from it.
Boot your phone into fastboot mode: turn off, plug USB cable while holding vol+ (blue light).
Use fastboot tools to flash the kernel: fastboot -i 0xfce flash boot boot.img
Unplug cable, turn on phone.
[CM7] Keep hitting vol- while the phone is booting to get into CWM.
[CM7] Flash the package in CWM (flash zip from sdcard).
[CM7] Reboot.
[CM7-Optional] Read about /sd-ext tools.
I'll try to update it as frequently as I'm able to but don't be expecting much, I don't have much spare time and this is only a hobby for me; I'm not a computer engineer, I do this mainly for myself and to keep the brain sharp and always learning.
If you go back to another kernel (boot.img) you may find yourself without wireless if you're using CM.
In this case, just flash this in CWM, no wipe required: http://www.multiupload.com/LIX7E96BGX
I have patched the libsqlite.so present in /system/lib/ in order to disable the sync feature for a higher write efficiency. So basically this will return more I/O performance while observable gains should be through a faster opening/closing of applications.
Currently working for:
CyanogenMOD 7 (lastly tested with FXP045)
It is already included in the package that you flash on kernel section instructions.
More information: http://forum.xda-developers.com/showthread.php?t=903507
My past devices always had ext3 native filesystem (eMMc devices), instead of XPERIA's yaffs2 (MTD devices). I usually upgraded these to ext4, removed journalism and with proper mount flags I have found its I/O performance much better than yaffs2 or anything else.
However, in MTD as far as I know there's no such way to format it to ext4 but there's a way around: move applications, data and dalvik-cache to a partition in microSD card called /sd-ext and have it formatted as ext4. Like for the patched libsqlite.so, a higher I/O performance equals to gains in overall smoothness.
Currently working for:
CyanogenMOD 7 (lastly tested with FXP045) *
* even though it's possible in theory for SEMC ROM I will not describe it here
Unfortunately there seems to be no official support for /sd-ext and CWM recovery on CM doesn't have the option to partition the sdcard so we have to find another way to create the /sd-ext partition and force the mount.
Requirements:
Mugetsu package already flashed through CWM (it has essential binaries)
MicroSD card of, at least, class 6 (higher the class, better the performance)
S2E application by Oleg Krikun which can be downloaded from the market
Terminal application (already included on CM but can be downloaded from the market) or ADB
Make sure to backup your microSD card contents as it will be fully wiped.
Instructions:
Navigate to settings > storage and unmount the microSD.
Open terminal/ADB shell and run these commands:
su (allow superuser access so the symbol turns # if it isn't already)
parted /dev/block/mmcblk0
print
Take note of the size of microSD card (in my case is 7937 MB), now remove the existing partitions:
rm 1
[Optional]rm 2 (remove n partitions until when you run the print command you won't have any)
Now we create the partitions. Let's go with a 512 MB /sd-ext and the rest for storage (FAT32). Now you'll need to write that (total space - 512 MB) - in my case 7425:
mkpartfs primary fat32 0 7425
mkpartfs primary ext2 7425 7937
Remember to change these values according to your own microSD card storage capacity; if you mess up, go to point 6 and repeat.
Now, we upgrade ext2 to ext3 and then to ext4, but first, exit parted with:
quit
Now back on to terminal/adb shell, run these commands to force ext3 and ext4 upgrade:
mount -o remount,rw /system
echo "" > /system/etc/mtab
tune2fs -j /dev/block/mmcblk0p2
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p2
e2fsck -fpDC0 /dev/block/mmcblk0p2
The crucial part now, we need to force the mount of /sd-ext so S2E can recognize it and take it from there:
mount -t ext4 /dev/block/mmcblk0p2 /sd-ext
After this open S2E and choose to move everything to the microSD card. You may need to enable advanced menu in S2E settings in order to be able to move data (reboot was required in my case); also make sure to enable "mount sd-ext as ext4 without journaling" and "set read buffer". If you run into problems with S2E recognizing the /sd-ext (everything is disabled) you need to mount it with the command above. You can check if it's mounted with the following command: "mount".
This way your applications as well as application data will be moved to /sd-ext, thus improving overall snappiness through a greater I/O performance. If on the opposite, you notice any sluggishness is because your microSD card isn't fast enough (slower than yaffs2). I recommend microSD cards who bench at least 8 MB on write test in the SDtools application.
Every time you plug and enable USB connection you'll also see that the new partition gets mounted and can be accessed.
Given the similarity and common core source between all XPERIA 2011 devices, this kernel can be easily ported to others such as Arc and Neo, as well as the patched libsqlite (it needs to be compiled for each device though) and /sd-ext tools. At least for CM7 it will work, this much I can guarantee.
I could release a version for these other devices but since I don't have one for more objective testing and debugging and I really don't have the time to follow the many threads I'd have to create, it's best if I go at this in another way which I'll now describe.
If you wish to port this to your device, make sure that:
You have a linux distro and you're familiar with it.
You know your way around kernels and android.
You have a device to which you want to port to.
You have time and you're active.
Anyone interested who meet the above criteria can contact me through PM, Google+, Twitter or whatever. I'll build everything you need at first for testing purposes and if it returns satisfying results I'll guide you through the rest in order to set it up. In exchange I only ask for you to keep the name and add a link to the original thread (this one).
hi, can i give you a suggestion? there's a way to improve wifi signal? my lg optimus one is much more better than ray.
Have you an idea?
powerfull kernel!
I successfully install it in _semc_ variant. trying to enter to recovery show many text strings (warnigs or what else) but show menu.
in normal mode all ok. there are many modern governeur variants. wifi just not turned on, say 'error' (not hang or reboot as official fxp))).
all other described features of kernel explode my brain)). I will read next times your links for understanding all features.
knzo, can you embed external cards support into kernel? (OTG) or this hard? as in Doomlords' arc kernel.
Thanks for your work!
Sadly SEMC's version has broken wifi (which can be seen in #2 post).
The reason for this is because:
1. FXP wlan source can compile SEMC modules but they don't work.
2. SEMC wlan source can't compile modules.
From what I gather it seems SEMC sources need to be cleaned but I haven't had the time to take a good look at it, it doesn't seem that easy to do.
Anyway, I'm going to study an Arc version for release, then I can take a look at that.
coolkaas said:
knzo, can you embed external cards support into kernel? (OTG) or this hard? as in Doomlords' arc kernel.
Click to expand...
Click to collapse
knzo said:
My past devices always had ext3 native filesystem (eMMc devices), instead of XPERIA's yaffs2 (MTD devices). I usually upgraded these to ext4, removed journalism and with proper mount flags I have found its I/O performance much better than yaffs2 or anything else.
However, in MTD as far as I know there's no such way to format it to ext4 but there's a way around: move applications, data and dalvik-cache to a partition in microSD card called /sd-ext and have it formatted as ext4. Like for the patched libsqlite.so, a higher I/O performance equals to gains in overall smoothness.
Currently working for:
CyanogenMOD 7 (lastly tested with FXP045) *
* even though it's possible in theory for SEMC ROM I will not describe it here
Unfortunately there seems to be no official support for /sd-ext and CWM recovery on CM doesn't have the option to partition the sdcard so we have to find another way to create the /sd-ext partition and force the mount.
Requirements:
Mugetsu package already flashed through CWM (it has essential binaries)
MicroSD card of, at least, class 6 (higher the class, better the performance)
S2E application by Oleg Krikun which can be downloaded from the market
Terminal application (already included on CM but can be downloaded from the market) or ADB
Make sure to backup your microSD card contents as it will be fully wiped.
Instructions:
Navigate to settings > storage and unmount the microSD.
Open terminal/ADB shell and run these commands:
su (allow superuser access so the symbol turns # if it isn't already)
parted /dev/block/mmcblk0
print
Take note of the size of microSD card (in my case is 7937 MB), now remove the existing partitions:
rm 1
[Optional]rm 2 (remove n partitions until when you run the print command you won't have any)
Now we create the partitions. Let's go with a 512 MB /sd-ext and the rest for storage (FAT32). Now you'll need to write that (total space - 512 MB) - in my case 7425:
mkpartfs primary fat32 0 7425
mkpartfs primary ext2 7425 7937
Remember to change these values according to your own microSD card storage capacity; if you mess up, go to point 6 and repeat.
Now, we upgrade ext2 to ext3 and then to ext4, but first, exit parted with:
quit
Now back on to terminal/adb shell, run these commands to force ext3 and ext4 upgrade:
mount -o remount,rw /system
echo "" > /system/etc/mtab
tune2fs -j /dev/block/mmcblk0p2
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p2
e2fsck -fpDC0 /dev/block/mmcblk0p2
The crucial part now, we need to force the mount of /sd-ext so S2E can recognize it and take it from there:
mount -t ext4 /dev/block/mmcblk0p2 /sd-ext
After this open S2E and choose to move everything to the microSD card. You may need to enable advanced menu in S2E settings in order to be able to move data (reboot was required in my case); also make sure to enable "mount sd-ext as ext4 without journaling" and "set read buffer". If you run into problems with S2E recognizing the /sd-ext (everything is disabled) you need to mount it with the command above. You can check if it's mounted with the following command: "mount".
This way your applications as well as application data will be moved to /sd-ext, thus improving overall snappiness through a greater I/O performance. If on the opposite, you notice any sluggishness is because your microSD card isn't fast enough (slower than yaffs2). I recommend microSD cards who bench at least 8 MB on write test in the SDtools application.
Every time you plug and enable USB connection you'll also see that the new partition gets mounted and can be accessed.
Click to expand...
Click to collapse
Thx for your efforts, if u have time take a look on dooms latest modified cwm in arc thread, it has ext support, app2sd in arc android thread is working for ray, I use it now with an ext4 partition but cwm in cm does not recognize it.
funiewski said:
Thx for your efforts, if u have time take a look on dooms latest modified cwm in arc thread, it has ext support
Click to expand...
Click to collapse
Ext and sd-ext support are 2 different things. This kernel also has ext support.
knzo said:
Ext and sd-ext support are 2 different things. This kernel also has ext support.
Click to expand...
Click to collapse
sorry for my bad and incorrect english, if I understand it correct dooms modified cwm had sd-ext support, link:
http://forum.xda-developers.com/showthread.php?t=1172885
first post
here is app2sd witch use sd-ext:
http://forum.xda-developers.com/showthread.php?t=1201902
once more, thx for your work it is highly appreciated
Hm, he says only support for backup/restore when the really handy thing would be partition sdcard support. If CWM had this option then most steps on post #4 would be redundant. However, it would still need to have its mount forced so S2E can recognise it! But this could also be easily added to the RAMdisk.
Added MIUI support.
Just pulled this one:
Could you please add the ability to use the accelerometer by other applications when the screen is locked?
Please ​
working flawlessly so far, thx for urs hard work
Working like a charm with Cm7 FXP45 Thank you so much and keep up the good work
I found this app on the Market: https://market.android.com/details?id=com.skvalex.callrecorder&hl=en
Requires the kernel with 2-way call recording patch and ROOT permissions:
Click to expand...
Click to collapse
Does your kernel has this patch?
veimus said:
I found this app on the Market: https://market.android.com/details?id=com.skvalex.callrecorder&hl=en
Does your kernel has this patch?
Click to expand...
Click to collapse
I'll try to add support for that today.
Sent from my ST18i using XDA App

[30 OCT 2012][DEV] NativeSD Rom Boot Script for HD2

This is an idea to make the HD2 faster and fancy, I worked with Xylograph to make it more usable and easy to implement by common users.
Index
Post 1 Introduction
Post 2 ROMs, Scripts, Installer template for Devs by Xylograph
Post 3 Q&A
Introduction
We have SD ROMs for very long time, but I think most of the people should agree with me that the SD ROMs are slower than NAND ROMs. because the SD ROMs use system.ext4 and data.ext4 files to store all the ROM contant on the FAT partition, the IO access is the bottleneck.
My Class10 SD card has 10MB/s R/W speed, but the NAND flash R/W speed is only about 4MB/s. so if we can directly install the ROMs to SDCARD and boot from SDCARD we will get lots of benifits:​
Faster Read/Write speed than NAND ROMs
Bigger data partition for user space (depends on how big the ext4 partition on SDCARD)
Install servel ROMs at the same time. and each ROM share the same space
Muilt-boot support, easy to switch between the ROMs been installed.
The NativeSD Rom is a new kind of ROM it needs an ext4 partition on your SDCARD.
This thread will tell you how to install a ROM to SDCARD and give some script templates for ROM Devs to make the ROM installer which can support install the ROM to NAND flash or SD/EXT4.
Install the ROM to SD/EXT4 will not effact the ROM(WM or Android) on NAND flash, NativeSD should support run from MAGLDR CLK or WM6.5(need test).
Important Notes:
Backup all the SDCARD content to PC before you create the ext4 partition on SDCARD.
Change Log:
05-09-2012 @2nd Post [05-09-2012] NativeSD Dual Installer v2 [nand/sdext][wip]
10-09-2012 Add NativeSD CM7 script template
13-09-2012 nativeSDMultiBoot Version4 Credits to datagr
20-09-2012 nativeSDMultiBoot Version5 Credits to datagr
26-09-2012 nativeSDMultiBoot Version6 Credits to datagr
30-10-2012 nativeSDMultiBoot Version9 Credits to datagr
30-10-2012 New initrd mod for NativeSD Credits to marco.palumbi
[05-09-2012] NativeSD Dual Installer v2 [nand/sdext][wip]
{
"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"
}
NativeSD Dual Installer v2
Keep in mind that this is a work in progress featuring a possibility to run a full nand rom on a SD-EXT partition..
Please check my current AOKP & PA jellybean ROMS or CM9ight ICS ROM for some 'NativeSD functionality' in action
​
Features:
Compatible with every bootloader and stock OS
Recovery package for users without Android on nand
Pre-Installation Requirements and recommendations:
HTC HD2 Phone
Sdcard with enough free space (performance may differ based on the quality of your card)
4EXT Recovery (Highly recommended)
Primary Fat32 partition and Primary EXT4 partition
Downloads : (Please do not mirror stuff)
Download 4EXT Recovery from here.
Pick the SD version if you would like to boot 4EXT Recovery from SD (unpack to your sdcard)
Pick the NAND version if you would like to flash the 4EXT Recovery on your NAND (flashable via recovery)
Users with non-working hardware keys can try the various touch recoveries I've ported , though I highly recommend 4EXT recovery..
Dual_Installer_v2_example.zip (only for advanced users, unpack the contents to your computer)
Contents :
4EXTRecoverySD for users with no or a different recovery on nand:
Code:
- Contains 4EXT Recovery ported for SD users.
- Unpack to the root of your sdcard
- Set your SD Boot to the Recovery folder or use clcad/haret to boot
4EXTRecoveryNAND for users who would like this recovery on nand:
Code:
- Contains 4EXT Recovery for android NAND users
- Flash it using DAF.exe (Magldr) cLK users can flash it using the HD2 toolkit
Dual Installer example Package (advanced users) :
Code:
- Contains an example (not flashable!) of how I use this for my roms.
- You can check all the stuff, folder structure and scripts.
- I've tried to make the updater-script and aroma-config 'easy to read'
- Placeholders with text on what to put where when porting stuff to NativeSD.
Installation Steps & Instructions:
Sdcard for NativeSD:
Code:
1. First make sure you have at least 1 Fat32 partition and 1 EXT4 partition on your sdcard
2. If you don't have these partitions ?? [B]backup your sdcard[/B][COLOR="Red"][B] , because everything will be wiped from your sdcard when you create partitions and format them ![/B][/COLOR]
3a Use the [URL="http://goo.im/devs/Xylograph/Various/Recoveries"]provided 4EXT recovery (NAND or SD version)[/URL] to create the partitions and format them.
3b If you rather use a computer for creating and formatting partitions keep in mind that both partitions [B]must[/B] be primary partitions (not logical)
4. The recommended size of your EXT4 partition is depending on how many roms and apps you are going to install.. 512M is the minimal size..
5. Restore/move the sdcard contents back to the Fat32 partition
6. (WP7 users) make sure the EXT4 partition is located @ /dev/block/mmcblk0p2
To check this mount your sd-ext partition in 4EXT recovery and use adb shell or QtADB shell and type [B]df[/B]
7. Your sdcard is now ready for NativeSD usage..
NativeSD Installation for Magldr NAND Android & WP7 users :
Code:
1. WP7 and SD users set your SD BOOT directory to the 'Recovery' folder by choosing '10.services' , '1. Bootsettings' , 3. AD SD Dir in the Magldr menu.
2. Boot into (NAND or SD) 4EXT recovery.
3. Flash the ROM.zip package and follow instructions
4. Set your SD BOOT directory to the 'NativeSD' folder after flashing the ROM (see step 1)
5. Boot into the ROM and have fun..
NativeSD Installation for cLK NAND Android users : (thanks clio94)
Code:
1. Copy the [URL="http://www.mediafire.com/?nhyausx0p5whu"]flash_bootv2.zip[/URL] to your sdcard.
2. Boot into cLK and make a sboot partition.Be aware that only clk from kokotas allows to make a sboot partition directly from device
3. Boot into recovery (4EXT recovery = recommended) and install rom by choosing sd-ext method
4. After installation finishes,dont reboot, but install flash_sbootv2.zip and then reboot to cLK
5. In cLK choose to boot from sboot and wait for the ROM to boot.
6. If you are stuck on the boot animation,try to wipe your ext partition and install the ROM again.
NativeSD Installation for Windows Mobile and other OS users :
Code:
1. Boot into recovery by executing the usual clcad and haret stuff inside the Recovery folder.
2. Flash the ROM.zip package and follow instructions
3. Reboot and boot the ROM by executing the usual clcad and haret stuff inside the NativeSD folder.
RMNET or PPP ??? summary :
Code:
- as of dual installer v2 you can choose your data connection during ROM installation
- For Magldr users I recommend using the RMNET connection
- For all other users I recommend using the PPP connection (default)
- PPP connection should work for all users !
Switch between different NativeSD ROMS ?
Code:
- If you want to use a previously installed/other NativeSD ROM ?
- Copy the contents of that roms folder found inside the NativeSD folder to the root of the NativeSD folder (overwriting the kernel+ramdisk)
- Boot to sd and that ROM will boot !
- Repeat the above steps when you want to switch again
- In the future we want to make the above steps easier and possible with either a 'gscript' or an 'android app'
Previous Roms (Examples) featuring NativeSD and Dual Installer :
Code:
- [URL="http://d-h.st/pFR"]PA_v1.992se_dual_installer_v2.zip[/URL] - [B][URL="http://tinyw.in/Xhft"]mirror[/URL][/B] (Flash via recovery) - md5: ce2138748c6b2cbc62848272acf92600
- [URL="http://d-h.st/p33"]AOKP_N2408se_dual_installer.zip (Magldr only!)[/URL] - [B][URL="http://tinyw.in/clMS"]mirror[/URL][/B] (Flash via recovery) - md5: 6a116ad3eebb0f92729af6954f0a9217
*** all flashing is at your own risk ! Always make backups in recovery and/or titanium backup ! ***
*** This is a NativeSD thread ! Please, Keep this thread NativeSD related and report issues with roms in the rom thread !!! ***
Thanks & Credits to : securecrt, Phoenix, clio94, LNE team and everybody I forgot !​
Q&A
How is the NativeSD ROM work?
To boot the Android from SD card, the old SD ROMs mount the system.ext4 and data.ext4 before the init(rename to init.android) thread is start. I changed the initrd.gz to make it mount the ext4 partition before the android init.android start. here is the main code for the init script
Code:
echo "mount system and data partition on sdcard"
# change the rom_name TO PA MIUI CM7 will support
# to boot other system on SD/EXT4
# the system layout :
# /NativeSD/NexusHD2/
# /system
# /data
# /PA/
# /system
# /data
# /MIUI/
# /system
# /data
# /app
# the app dir is shared for all ROMs
#
# set the name of the rom to boot
rom_name="PA"
# mount the 1st (NativeSD) SD-EXT partition
mkdir -p /NativeSD
mount -t ext4 -o rw,noatime,nodiratime,barrier=0 /dev/block/mmcblk0p2 /NativeSD
# mount the system data app dir
mount --bind /NativeSD/$rom_name/system /system
mount --bind /NativeSD/$rom_name/data /data
# create app data/app dir
mkdir -p /NativeSD/app
mkdir -p /data/app
mount --bind /NativeSD/app /data/app
So for the ROM Devs should create new initrd.gz which is different with the NAND version, use different rom_name distinguish with others the whole templete is in 2nd post by Xylograph​
How is the multi-boot works on NativeSD ROM?
Set the SD boot dir /sdcard/NativeSD in Magldr or CLK,the dir structure is
/sdcard/NativeSD/NexusHD2/zImage
/sdcard/NativeSD/NexusHD2/initrd.gz
/sdcard/NativeSD/PA/zImage
/sdcard/NativeSD/PA/initrd.gz
/sdcard/NativeSD/zImage
/sdcard/NativeSD/initrd.gz​
The Magldr& CLK always read the /sdcard/NativeSD/zImage /sdcard/NativeSD/initrd.gz files to boot, so if you want to switch from PA to NexusHD2 just only need to copy the zImage & initrd.gz to the up layer dir, use the NativeSD ROM switch app made by datagr​
How to convert the NAND ROM to NativeSD ROM?
HOWTO port NAND ROM to NATIVESD STEP-BY-STEP Credits to c1cl0n
This is for Devs and advanced users only. For example if we got the NAND version of the NexusHD2 extract the zip file and replace 2 files and add 1 file will finish the convert.
/kernel/boot/initrd.gz
the initrd.gz is similar with the SD ROMs but need to change the init script to mount the ext4 partition
/META-INF/com/google/android/updater-script
the updater-script is used for CWM to execute the install process; execute install.sh before copy the system content to the ext4, here is the sample code
Code:
package_extract_file("install.sh", "/tmp/install.sh");
set_perm(0,0, 0777, "/tmp/install.sh");
run_program("/tmp/install.sh");
show_progress(0.8, 80);
if file_getprop("/tmp/nfo.prop","NativeSD") == "true"
then
package_extract_dir("kernel/boot", "/boot");
package_extract_dir("kernel/boot", "/boot_dir");
package_extract_dir("system", "/system");
......
else
ui_print("can't find ext4 partition on your SDcard");
ui_print("install failed");
endif;
/install.sh
Code:
#!/sbin/sh
# Set the ROM name
ROM_NAME=NexusHD2
export ROM_NAME
mmcblk0p2=`ls /dev/block/mmcblk0p2`
# Mount the ext4 partition
if [ $mmcblk0p2 == "/dev/block/mmcblk0p2" ]
then
mkdir -p /ext4p
mkdir -p /sdcard/NativeSD/$ROM_NAME
mkdir -p /boot /boot_dir
mount -t ext4 /dev/block/mmcblk0p2 /ext4p
mkdir -p /ext4p/$ROM_NAME/system /ext4p/$ROM_NAME/data
mount --bind /ext4p/$ROM_NAME/system /system
mount --bind /ext4p/$ROM_NAME/data /data
mount --bind /sdcard/NativeSD/$ROM_NAME /boot
mount --bind /sdcard/NativeSD /boot_dir
#delete the old system
rm -rf /system/*
#clean the dalvik-cache
rm -rf /data/dalvik-cache/*
#all the dir has ready write some info for updater-script
echo "NativeSD=true" >> /tmp/nfo.prop
else
#no ext4 partition found
echo "NativeSD=false" >> /tmp/nfo.prop
fi
​
How to make ext4 partition on my SDCARD?
http://forum.xda-developers.com/showthread.php?p=31414628#post31414628
Spaqin said:
You just posted it, but I have a couple of questions - what is it really? How SD builds will be faster because of that? What can we expect? How will it work? Any details?
Click to expand...
Click to collapse
Securecrt will explain everything.. give the man some time to create the first post..
Expect the same/similar or even better performance compared to android on NAND with a descent SD card.
I will post an example ROM which I am working on so people can check it out @ 2nd post when I am done with it..
Spaqin said:
You just posted it, but I have a couple of questions - what is it really? How SD builds will be faster because of that? What can we expect? How will it work? Any details?
Click to expand...
Click to collapse
:laugh: Just be patient. I am updating the post.
Wow man! I can hardly wait!
securecrt said:
[coming soon] ...
This is an idea to make the HD2 more faster, I worked with Xylograph to make it more usable and easy to implement by common users.
Click to expand...
Click to collapse
Xylograph said:
Securecrt will explain everything.. give the man some time to create the first post..
Expect the same/similar or even better performance compared to android on NAND with a descent SD card.
I will post an example ROM which I am working on so people can check it out @ 2nd post when I am done with it..
Click to expand...
Click to collapse
Looking forward to trying this
Sent from my GT-I9100 using Tapatalk 2
Well everybody (especially sd rom users) waiting to test this stuff can already start by making sure they have an SD-EXT (EXT4 if possible) partition on their sd-card..
Make a big one for future use
Xylograph said:
Well everybody (especially sd rom users) waiting to test this stuff can already start by making sure they have an SD-EXT (EXT4 if possible) partition on their sd-card..
Make a big one for future use
Click to expand...
Click to collapse
ready - steady ...
dimdimdim said:
ready - steady ...
Click to expand...
Click to collapse
GO GO GO !!!
ext4 partition can be made from windows using minitool partition wizard home edition http://www.partitionwizard.com/download.html
I assume FAT32 partition should be first and ext4 partition second.
Robbie P said:
ext4 partition can be made from windows using minitool partition wizard home edition http://www.partitionwizard.com/download.html
I assume FAT32 partition should be first and ext4 partition second.
Click to expand...
Click to collapse
What size partition should I create?
I usually use partitions of 1 or 2 GB on 16 or 32 GB cards
hi..
my phone's hardware button (green button) is not working.. so i can not make any changes to magldr..
currently, my boot folder is set to ICS..
I was just wondering if its possible to edit the initrd.gz as mentioned in post 3 in such a way that it would reflect my folder (ICS) instead of NativeSD?
should i just replace all places which have NativeSD with my folder that is ICS? or is it just some specific places?
jjblaster3 said:
hi..
my phone's hardware button (green button) is not working.. so i can not make any changes to magldr..
currently, my boot folder is set to ICS..
I was just wondering if its possible to edit the initrd.gz as mentioned in post 3 in such a way that it would reflect my folder (ICS) instead of NativeSD?
should i just replace all places which have NativeSD with my folder that is ICS? or is it just some specific places?
Click to expand...
Click to collapse
I did not consider this case... let me think how to solve it.
Robbie P said:
ext4 partition can be made from windows using minitool partition wizard home edition http://www.partitionwizard.com/download.html
I assume FAT32 partition should be first and ext4 partition second.
Click to expand...
Click to collapse
Yes sir, or use recovery for partitioning your sdcard.. I recommend 4EXT recovery for the job.
aldai2 said:
What size partition should I create?
I usually use partitions of 1 or 2 GB on 16 or 32 GB cards
Click to expand...
Click to collapse
Depends on how many roms you are going to install...
I think 2 GB is a nice start.. especially when apps will be shared in future updates you won't have to install all apps over and over again.
securecrt said:
I did not consider this case... let me think how to solve it.
Click to expand...
Click to collapse
much appreciated friend, keeping my hopes up
Great work guys, have installed on a class 6, speed seems fine (personally I haven't found there to be any noticeable lag with SD builds).
Have just run some benchmarks; would attach if i could find a screenshot button. And will see how it performs for a day or two and report back before messing with it.
Just a suggestion, but with future builds are you considering adding an option to choose which ext to install to? So that you can have multiple sd-ext builds and/or a NAND build with a sd-ext and a separate sdext rom.
Likin' the installer as well, haven't used aroma too often, but you've customised this one and made it your own.
Nice Work.
Can't find screenshot, so. Using a class 6 card in:
Code:
System Test = 3398 ; SD card read/write = 13.6/8.0 MB/s
PassMark Performance = 816 ; Internal Storage read/write = 14.7/13.1 MB/s External Storage r/w = 15.1/8.27 MB/s
AnTuTu = 2741 (typical SDROM score) SD card r/w = 9.7/7.4 MB/s
jjblaster3 said:
hi..
my phone's hardware button (green button) is not working..
Click to expand...
Click to collapse
So besides changing the folder are you actually able to enter recovery without a working green key?
You'll need that 2
Xylograph said:
So besides changing the folder are you actually able to enter recovery without a working green key?
You'll need that 2
Click to expand...
Click to collapse
Couldn't he copy the files into the partition on the desktop? Using ubuntu for example, or while in a running nand build? Or would that be likely to cause issues?
Xylograph said:
So besides changing the folder are you actually able to enter recovery without a working green key?
You'll need that 2
Click to expand...
Click to collapse
well to b honest when i read on the first post that wm6.5 users and magldr users using wp7 in nand are also to be supported in the future, i never considered that recovery was a must.. guess i was wrong

Categories

Resources