How to create an ext3 partition - Other TouchPad Development

I have the latest CM9 installed on my Touchpad and now I want to move some .mkv files onto it but they are over 4GB in size. How can I add an ext3 partition if I don't have any installed?

You can use the instructions described in this bash script if you have some linux knowledge and if you can handle a terminal in webOS or novaterm.
Otherwise there are some helpful commands in this thread.
Best, z3no
edit: some lines which may help (no guarantee for that but I think it should work):
pkill -SIGUSR1 cryptofs
umount /media/internal
PARTITION=4096 <-- HERE YOU CHOOSE THE RIGHT PARTITION SIZE YOU WANT TO HAVE
CURRENTSIZE=$(lvm.static lvdisplay -c store/media | awk -F: '{print $7/2048}')
NEWSIZE=$(($CURRENTSIZE - $PARTITION))
resizefat /dev/store/media ${NEWSIZE}M
lvresize -L -${PARTITION}M /dev/store/media
lvcreate -L ${PARTITION}M -n ext3 store
mkfs.ext3 /dev/store/ext3

Thanks,
is this line in bytes??
PARTITION=4096 <-- HERE YOU CHOOSE THE RIGHT PARTITION SIZE YOU WANT TO HAVE

no, the line should be in mb (in the following lines after each variable the "M" indicates that the number is in mb).
In fact, this line only defines a variable which is needed later in the script.

OK makes more sense

And what is the easiest way to delete an extf3 partition? I created one for Linux, but now I have all the functionality I want, with Android ICS and WebOS, and would like to recover the space for data use.
By the way, I have a 64 GB TouchPad. That should make a difference when reassigning.
---------- Post added at 03:22 AM ---------- Previous post was at 03:07 AM ----------
deleted below

Just do: (additional information starts with #)
pkill -SIGUSR1 cryptofs
umount /dev/mapper/store-media
# if the umount does not work, restart the device and try again, DO NOT CONTINUE IF IT DOES NOT WORK!!!
# in the next line, ext3fs should be replaced with the correct name of the partition you want to remove, e.g. store/ubuntu-root
PARTITION=$(lvm.static lvdisplay -c store/ext3fs | awk -F: '{print $7/2048}')
CURRENTSIZE=$(lvm.static lvdisplay -c store/media | awk -F: '{print $7/2048}')
NEWSIZE=$(($CURRENTSIZE + $PARTITION))
# in the next line, ext3fs should be replaced with the correct name of the partition you want to remove, e.g. /dev/mapper/store-ubuntu--root (yes this line is correct, use two "-" if your partition has a "-")
lvremove /dev/mapper/store-ext3fs
lvresize -l +100%FREE /dev/mapper/store-media
resizefat /dev/mapper/store-media ${NEWSIZE}M
works for every kind of TP (I have a 64 TP myself)
edit: added information to delete partitions which are not named "ext3fs"

Thanks, will everything remain intact on the main partition? No reinstallation necessary?
Using Internalz Pro I see that the partition is called ext3fs, so I just use your original commands? I am not sure if the real name is being displayed there.

The problem: can PC read and write on this partition?

HansTWN said:
Thanks, will everything remain intact on the main partition? No reinstallation necessary?
Using Internalz Pro I see that the partition is called ext3fs, so I just use your original commands? I am not sure if the real name is being displayed there.
Click to expand...
Click to collapse
Everything should be intact after repartitioning.
Regarding the name: if you don't know the exact name you can lookup with this command:
ls /dev/store/
There you should see the three cm stores (if you have CM installed) and log, mojodb, swap, update, filecache, media, root and var
The one I have not listed is the ext3fs (e.g. ubuntu-root or something)
---------- Post added at 07:09 PM ---------- Previous post was at 07:08 PM ----------
hakkinenvthh said:
The problem: can PC read and write on this partition?
Click to expand...
Click to collapse
if you use novaterm, yes

z3no said:
Just do: (additional information starts with #)
pkill -SIGUSR1 cryptofs
umount /dev/mapper/store-media
# if the umount does not work, restart the device and try again, DO NOT CONTINUE IF IT DOES NOT WORK!!!
# in the next line, ext3fs should be replaced with the correct name of the partition you want to remove, e.g. store/ubuntu-root
PARTITION=$(lvm.static lvdisplay -c store/ext3fs | awk -F: '{print $7/2048}')
CURRENTSIZE=$(lvm.static lvdisplay -c store/media | awk -F: '{print $7/2048}')
NEWSIZE=$(($CURRENTSIZE + $PARTITION))
# in the next line, ext3fs should be replaced with the correct name of the partition you want to remove, e.g. /dev/mapper/store-ubuntu--root (yes this line is correct, use two "-" if your partition has a "-")
lvremove /dev/mapper/store-ext3fs
lvresize -l +100%FREE /dev/mapper/store-media
resizefat /dev/mapper/store-media ${NEWSIZE}M
works for every kind of TP (I have a 64 TP myself)
edit: added information to delete partitions which are not named "ext3fs"
Click to expand...
Click to collapse
My ext3fs partition actually was called ext3fs. And your instructions worked like a charm, except that I had to add the line
umount /dev/mapper/store-ext3fs
before the lvremove command, since the ext3fs partition was mounted. You saved me a lot of time, I just couldn't get tailor working.

Glad to see my scripts being put to use outside of the Ubuntu project.

JesusFreak316 said:
Glad to see my scripts being put to use outside of the Ubuntu project.
Click to expand...
Click to collapse
Since these are your scripts, thanks to you, too!

Thanks very much, I can make a script to uninstall Ubuntu now

hakkinenvthh said:
Thanks very much, I can make a script to uninstall Ubuntu now
Click to expand...
Click to collapse
Already made one actually, just haven't added it to the wiki yet. http://dl.dropbox.com/u/11867712/4GBUninstall.sh

Related

System Dump

Has anybody made a system dump of the nook color?
mattpall said:
Has anybody made a system dump of the nook color?
Click to expand...
Click to collapse
Yes, dumps have been made.
pokey9000 said:
Yes, dumps have been made.
Click to expand...
Click to collapse
I don't see where any dumps have been made, not with the commands listed anyway. It doesn't actually say they've dumped them...just lists commands that will do it?
I tried using various commands and can't seem to get it to dump.
gormly said:
I don't see where any dumps have been made, not with the commands listed anyway. It doesn't actually say they've dumped them...just lists commands that will do it?
I tried using various commands and can't seem to get it to dump.
Click to expand...
Click to collapse
I can't get it to work with the those commands. I get a "...mmcblk0 not a file or directory."
I'm getting the same "remote object... ...not a file or directory" thing too. Does this have to be done from a non-windows machine?
I can see the files I am trying to pull in a file manager, just not having any luck pulling them over adb.
I was able to perform the dump in linux.
F8
I was also able to pull (from linux) but the real question is has anyone verified the resulting images? I mean, it's not really a backup until you've done a successful restore with it.
I guess I don't know the quirks of "adb pull" well enough yet to give it the same trust as say, a "dd" generated image...
Well, be it what we need or not, I pulled it on OSX. What I am wondering now is why it doesn't seem to be working on windows (at least on my Win7 x64).
To pull and read the whole disk under Ubuntu, first make sure you have package kpartx installed.
-pull the image
Code:
$ adb pull /dev/block/mmcblk0 nook_emmc.img
1701 KB/s (-645922816 bytes in 2094.821s)
-mount loopback and map it to partitions
Code:
$ sudo losetup /dev/loop0 nook_emmc.img
$ sudo kpartx -av /dev/loop0
add map loop0p1 (252:0): 0 144522 linear /dev/loop0 63
add map loop0p2 (252:1): 0 144585 linear /dev/loop0 144585
add map loop0p3 (252:2): 0 610470 linear /dev/loop0 289170
add map loop0p4 (252:3): 0 14121135 linear /dev/loop0 899640
add map loop0p5 (252:4): 0 931707 252:3 63
add map loop0p6 (252:5): 0 1959867 252:3 931833
add map loop0p7 (252:6): 0 722862 252:3 2891763
add map loop0p8 (252:7): 0 10506447 252:3 3614688
-partitions are now in /dev/mapper. Mount a filesystem:
Code:
$ sudo mount /dev/mapper/loop0p5 /mnt
$ ls /mnt
app build.prop fonts lib media usr
bin etc framework lost+found recovery-from-boot.p
-when done, you have to unmount all mountpoints, release the partition map, and undo the loopback device:
Code:
$ sudo umount /mnt
$ sudo kpartx -d /dev/loop0
$ sudo losetup -d /dev/loop0
You can actually dd within the Nook firmware. I dd'ed all the partitions to /media and then pulled them over via adb.
Also, there's a full factory backup sitting in a zip file on partition 3. I mounted it temporarily and grabbed it.
http://forum.xda-developers.com/showpost.php?p=9536709&postcount=3

[MOD] Full Linux (Debian) inside WebTop! v0.2.7 [2012/01/18] [11.30 GMT+2:00]

[size=+4]Take back WebTop![/size]​
Use anythings you can imagine! LibreOffice, Java, Firefox 4, ecc...
[size=+2]WHAT THIS MOD DOES:[/size]
Installing WebTopMOD your awm dock will be populated with 3 new icons: leafpad, lxterminal and a penguin.
Leafpad and lxterminal works inside WebTop but clicking on the penguin you get a Debian menu chrooted http://en.wikipedia.org/wiki/Chroot in a Debian enviroment. In xterm you can use synaptic and apt-get to install anything in this new enviroment.
For example I need gimp:
Code:
# apt-get update //refresh packages list from internet
# apt-get install gimp
# gimp //
Clicking another time on the penguin open another xterm IN THE SAME ENVIROMENT so I can start another program
Code:
# oo-writer //openoffice writer
NOTE: Debian disk contain a Debian stable (squeeze) release, some software could be "outdated", if you would live on the edge change stable to unstable in /etc/apt/sources.list IN CHROOT ENVIRONMENT. DO NOT TRY TO CHANGE REPOSITORY IN ORIGINAL WEBTOP ROOT
Look here (http://www.debian.org/releases/) to understand what differ between Debian branches
For example LibreOffice is not yet in stable branch, so you can install OpenOffice or switch repo to testing or unstable
Firefox is renamed Iceweasel and the latest version in unstable is 3.5 and from experimental 4.0.
REMEMBER THAT 0.x VERSION MEAN THAT THIS SOFTWARE CAN BE BUGGED AND I CONSIDER IT IN ALPHA TESTING
[size=+2]PREREQUISITES:[/size]
- A rooted Atrix
- At least 2GB free in internal memory (could be more or less with the customized installation)
- A little bit terminal knowledge and willpower
- Brain
- Liquorice mojito
[size=+2]INSTALLATION:[/size]
[size=+1][1st way - EASY METHOD][/size]
Prerequisite for this method is:
On your phone: CWM installed
0) Download Debian disk - http://droid.makrit.net/WebTopMOD/WebTopMOD-20110707.7z
1) Unpack in your internal or external storage (path should be /sdcard(-ext)/WebTopMOD/linuxdisk)
Please don't use "adb push" it corrupt big files
2) Download easy-signed.zip - http://www.multiupload.com/C5GEIHDEM0, MIRROR
3) Install using CWM, reboot and enter in WebTop!
Uninstaller for version >=0.2.7 http://www.multiupload.com/18H5OHND90, MIRROR
Uninstaller for version <= 0.2.2 http://www.multiupload.com/W37DT6HJ7X
Uninstaller for version 0.2.1 http://www.multiupload.com/TO6W9X7CBU
Uninstaller for version >= 0.2 http://www.multiupload.com/GLKUZA2KP9
[size=+1][2nd way - CUSTOM METHOD][/size]
Temporary deprecated
Code:
Prerequisite for this method is:
On your computer: have a Debian installation or a Debian live cd or download this file ([url]http://www.multiupload.com/403F0OQEDA[/url] -> 2GB disk in 66MB), unpack it and skip to step 8
On your phone: install a "complete" busybox thought any free market apps and be connected to internet with a wireless network.
[b][On your phone][/b]
0) Start WebTop and leave it opened
[b][On your computer][/b]
1) Create a file with the dimensions that fit your needs using dd (I used this command to create the 2GB file: dd bs=1024 count=1 seek=$((1024*1024*2-1)) if=/dev/zero of=debian)
2) Format the new "disk" using ext3 (mkfs.ext3 debian)
3) Create a folder to mount the disk (mkdir temp)
4) Mount the disk (sudo mount -t ext3 -o loop debian temp)
5) Debootstrap! (sudo debootstrap --foreign --arch armel stable temp [url]http://ftp.debian.org/debian[/url])
6) Wait...
7) Unmount disk (sudo umount temp) and remove temp directory (rmdir temp)
8) Copy debian in your internal storage inside a folder called "DEBIAN" (uppercase without quotes)
[b][On your computer if you are using adb (recommended) or on your phone using terminal emulator, connectbot, ecc)][/b]
9) Open a terminal and type:
Get superuser permissions
[code]
# su
edit sudoers
Code:
# vi /etc/sudoers
You should add "%admin ALL=NOPASSWD: ALL" after the line containing "%admin ALL=(ALL) ALL". You can try typing this:
Please note that if you are using a terminal emulator on your phone escape is bad interpreted by Android using a physical keyboard, you have to send the escape key in another way.
Code:
GkyyPjwwwld3wi
NOPASSWD: [with a space]
[Escape]
:wq!
Now we enter in a more complete and privileged bash
Code:
# /usr/bin/sudo -H -u adas bash
Enable AWM to launch anything
Search→Go To… line 1317
Take this line:
use_profile 3
and turn it into:
use_profile 2
Code:
sudo leafpad /etc/tomoyo/domain_policy.conf
Now you can add any launcher to your AWM, look in easy-signed.zip (/usr/share/applications and /home/michele/easy/home/adas/.gconf/apps/avant-window-navigator)
Mount debian disk:
Code:
# cd /sdcard/DEBIAN
# mkdir root
# sudo mount -t ext3 -o loop=/dev/block/loop7 debian root
Debootstrap! (second stage)
Code:
# sudo chroot root /debootstrap/debootstrap --second-stage
Disable X ACL (in WebTop)
Code:
# export DISPLAY=:0
# xhost +
Enter in the new system
Code:
# sudo cp /etc/hosts /sdcard/DEBIAN/root/etc/hosts
# sudo cp /etc/fstab /sdcard/DEBIAN/root/etc/fstab
# sudo cp /etc/resolv.conf /sdcard/DEBIAN/root/etc/resolv.conf
# sudo mount -o bind /proc /sdcard/DEBIAN/root/proc
# sudo mount -o bind /dev /sdcard/DEBIAN/root/dev
# sudo mount -o bind /dev/pts /sdcard/DEBIAN/root/dev/pts
# sudo mount -o bind /dev/shm /sdcard/DEBIAN/root/dev/shm
# sudo mount -o bind /sys /sdcard/DEBIAN/root/sys
# sudo mount -o bind /var/run/dbus/ /sdcard/DEBIAN/root/var/run/dbus/
# sudo chroot /sdcard/DEBIAN/root /bin/bash
Export X display (in chroot)
Code:
# export DISPLAY=:0
Add Debian main repository
Code:
# echo "deb http://ftp.debian.org/debian/ stable main non-free contrib" > /etc/apt/sources.list
Finish debian installation
Code:
# apt-get update ; apt-get install dbus dialog locales
Configure your locale
Code:
# dpkg-reconfigure locales
Install xterm
Code:
# apt-get install xterm
Run xterm!
Code:
# xterm
Now you can install anything simply using "apt-get install PROGRAM_NAME" or installing synaptic
Before unplug HDMI cable you should exit form chroot environment and unmount the chroot:
Code:
# exit
# sudo umount /sdcard/DEBIAN/root/proc
# sudo umount /sdcard/DEBIAN/root/dev
# sudo umount /sdcard/DEBIAN/root/dev/pts
# sudo umount /sdcard/DEBIAN/root/dev/shm
# sudo umount /sdcard/DEBIAN/root/sys
# sudo umount /sdcard/DEBIAN/root/var/run/dbus
# sudo umount /sdcard/DEBIAN/root
[size=+2]USE:[/size] (ONLY FOR CUSTOM METHOD)
[On your computer if you are using adb or on your phone using terminal emulator, connectbot, ecc)]
9) Open a terminal and type:
Get superuser permissions
Code:
# su
Now we enter in a more complete and privileged bash
Code:
# /usr/bin/sudo -H -u adas bash
Mount debian disk:
Code:
# cd /sdcard/DEBIAN
# sudo mount -t ext3 -o loop=/dev/block/loop7 debian root
Disable X ACL (in WebTop)
Code:
# export DISPLAY=:0
# xhost +
Enter in the new system
Code:
# sudo cp /etc/hosts /sdcard/DEBIAN/root/etc/hosts
# sudo cp /etc/fstab /sdcard/DEBIAN/root/etc/fstab
# sudo cp /etc/resolv.conf /sdcard/DEBIAN/root/etc/resolv.conf
# sudo mount -o bind /proc /sdcard/DEBIAN/root/proc
# sudo mount -o bind /dev /sdcard/DEBIAN/root/dev
# sudo mount -o bind /dev/pts /sdcard/DEBIAN/root/dev/pts
# sudo mount -o bind /dev/shm /sdcard/DEBIAN/root/dev/shm
# sudo mount -o bind /sys /sdcard/DEBIAN/root/sys
# sudo chroot /sdcard/DEBIAN/root /bin/bash
Export X display (in chroot)
Code:
# export DISPLAY=:0
Run xterm!
Code:
# xterm
Before unplug HDMI cable you should exit form chroot environment and unmount the chroot:
Code:
# exit
# sudo umount /sdcard/DEBIAN/root/proc
# sudo umount /sdcard/DEBIAN/root/dev
# sudo umount /sdcard/DEBIAN/root/dev/pts
# sudo umount /sdcard/DEBIAN/root/dev/shm
# sudo umount /sdcard/DEBIAN/root/sys
# sudo umount /sdcard/DEBIAN/root
[/code]
[size=+2]THANKS TO:[/size]
Sogarth - for http://forum.xda-developers.com/showthread.php?t=983208
kennethpenn - for motoblur remove tool! many many thanks!
Chainfire - for Gingerbreak
makr8100 - for http://droid.makrit.net/ mirror
and many other users that works actively to hack this phone!
[size=+2]NOTE:[/size]
- exporting library you can start a lot of programs without starting chroot (obviously mounting the loop device), for example you can use xterm inside WebTop launching
Code:
# LD_LIBRARY_PATH=.:/sdcard/DEBIAN/root/usr/lib /sdcard/DEBIAN/root/usr/bin/xterm
- you can use sd-card replacing /sdcard/DEBIAN to /sdcard-ext/DEBIAN
If you would like to support my work click the this droid
[size=+2]MANY THANKS FOR CONTRIBUTOR:[/size]
Francisco Bravo
Robert Johnson
[size=+2]CHANGELOG:[/size]
v0.2.7 [2012/01/18] [11.30 GMT+2:00]
easy-signed: http://www.multiupload.com/C5GEIHDEM0
uninstaller: http://www.multiupload.com/18H5OHND90
EASY:
- Disabled Tomoyo (no more firefox issues between different webtop versions)
- New uninstaller
v0.2.6 [2011/07/07] [14.15 GMT+2:00]
Debian disk: http://droid.makrit.net/WebTopMOD/WebTopMOD-20110707.7z
easy-signed: http://droid.makrit.net/software/atrix/easy_v0.2.6.zip-signed.zip
EASY:
- binded in chroot tmp folders
- correct typo in missing disk message
- changed umount function (should works fine now!)
- added linuxdisk check (0 size, is a file)
- 2.3.4 compatibility
- cleaned mount function
LINUXDISK:
- added pdmenu and menu
- added device etc mountpoint in /mnt/DEVICE/etc
- dynamic change of resolv.conf (thanks to krkeegan)
- linuxdisk now is ~4gb (4095MB)
- added device etc mountpoint in /mnt/DEVICE/usr
- added plugins folder symlink to use flash player or other plugins between browser (inside and outside chroot) (FLASH DOESN'T WORK YET)
v0.2.5.1b [2011/07/07] [10.15 GMT+2:00]
Debian disk: unmodified
easy-signed: http://www.multiupload.com/ZAPZW2XX45
EASY:
- removed firmware check
- using a newer version of update-binary
v0.2.5 [2011/05/27] [9.30 GMT+2:00]
Debian disk: unmodified
easy-signed: http://www.multiupload.com/F68D73KF26
EASY:
- fixed unmount function
- removed motorola links
- fixed leafpad icon
v0.2.4 [2011/05/26] [20.30 GMT+2:00]
Debian disk: unmodified
easy-signed: http://www.multiupload.com/VI4JEFWLI6
EASY:
- corrected calls to loopdevice function (thanks Cryofix)
- check awm folders existence and fully reset permissions
- set different permissions to linux script, xmessage, lxterminal and WebTopMOD folder
v0.2.3 [2011/05/26] [15.45 GMT+2:00]
Debian disk: unmodified
easy-signed: http://www.multiupload.com/2JAO6F42Z4
EASY:
- corrected typo (remember..) in installation
- make new loop device (avoid conflict)
- renfoced unmount function
- fix permission for linux.desktop (awm launcher)
v0.2.2 [2011/05/25] [22.00 GMT+2:00]
Debian disk: http://www.multiupload.com/DVF6BJGJR3
easy-signed: http://www.multiupload.com/NKSFL81ODW
EASY:
- removed /mnt/androidroot (doesn't work)
- added /mnt/sdcard and /mnt/sdcard-ext
- code clean
- corrected lxterm policy
- replaced backup script
- corrected sudoers replace
- replaced debian with a more generic linux notation
- added check disk existence
- disk can be in sdcard or sdcard-ext
CUSTOM:
- Temporary deprecated (I've no time to update it today)
v0.2.1 [2011/05/25] [10.30]
DebianEnabler: http://www.multiupload.com/F8TMHY8VQA
Images: 2gb: http://www.multiupload.com/A1B6LG9YYF
easy-signed.zip: http://www.multiupload.com/HPA820KCKR
EASY:
- replaced xterm with native lxterminal
- introduced backup original files
- added uninstaller for version >= 0.2 http://www.multiupload.com/GLKUZA2KP9
- added uninstaller for version <= 0.2.1 http://www.multiupload.com/TO6W9X7CBU
v0.2 [2011/05/24] [17.30]
EASY:
DebianEnabler: http://www.multiupload.com/F8TMHY8VQA
Images: 2gb: http://www.multiupload.com/A1B6LG9YYF
easy-signed.zip: http://www.multiupload.com/NHJGJD7E3E
- easy method!
- symbolic link in /mnt/androidroot to real root
- added image already configured with dbus, locales and dialog
- added launcher for debian chroot and xterm in awm
CUSTOM:
- added instruction to make custom launcher in awm
- added instruction to configure locales, dbus and dialog
- corrected chroot adding /var/run/dbus
v0.1 [2011/05/24]
- initial release
Pro. This looks like the real deal (no compromises). I will be waiting for the noob version though
Sent from my MB860 using XDA Premium App
What versions does this work with? 1.8.3, 1.5.7, 1.2.6 ?
XxKILLx3RxX said:
What versions does this work with? 1.8.3, 1.5.7, 1.2.6 ?
Click to expand...
Click to collapse
I used an ATT Atrix with 1.8.3 firmware.
However this guide should be applicable to any atrix (att, bell, ecc) with any firmware...
Can i use ubuntu as the debian system on the pc to do the image, secondly how do i make a 4 or even 6 gb image, thirdly is this similar to the chroot modes?
crnkoj said:
Can i use ubuntu as the debian system on the pc to do the image, secondly how do i make a 4 or even 6 gb image, thirdly is this similar to the chroot modes?
Click to expand...
Click to collapse
6gb:
Code:
dd bs=1024 count=1 seek=$((1024*1024*6-1)) if=/dev/zero of=debian
5gb:
Code:
dd bs=1024 count=1 seek=$((1024*1024*5-1)) if=/dev/zero of=debian
4gb:
Code:
dd bs=1024 count=1 seek=$((1024*1024*4-1)) if=/dev/zero of=debian
3gb:
Code:
dd bs=1024 count=1 seek=$((1024*1024*3-1)) if=/dev/zero of=debian
1gb:
Code:
dd bs=1024 count=1 seek=$((1024*1024*1-1)) if=/dev/zero of=debian
debootstrap from ubuntu
Code:
sudo apt-get install debootstrap
sudo debootstrap --foreign --arch armel squeeze temp http://ftp.debian.org/debian
Thanks man, ill go and try it out within the next few hours. Btw i already have lxterminal working in the webtop, can i use that instead of adb/ terminal emulator to enter those commands?
crnkoj said:
Thanks man, ill go and try it out within the next few hours. Btw i already have lxterminal working in the webtop, can i use that instead of adb/ terminal emulator to enter those commands?
Click to expand...
Click to collapse
Sure! I assumed that on 1.8.3 terminal is not available...
SystemR89 said:
Sure! I assumed that on 1.8.3 terminal is not available...
Click to expand...
Click to collapse
ye thats true, i copied it over from an old /osh dump and it seems to work fine, if you want/need it i can send it to you (only the lxterminal or the whole /osh dump) just started the procedures to get it on.
SystemR89 said:
6gb:
Code:
dd if=/dev/zero of=/data/6GB.swap bs=1024 count=6144000
4gb:
Code:
dd if=/dev/zero of=/data/6GB.swap bs=1024 count=4096000
debootstrap from ubuntu
Code:
sudo apt-get install debootstrap
sudo debootstrap --foreign --arch armel squeeze temp http://ftp.debian.org/debian
Click to expand...
Click to collapse
those commands returned the error:
dd: opening '/data/6GB/swap': No such file or directory
hmm in your first post the one for dding a 2gb file is different as these two.
AWESOME!!
You beat me to it!! I just ordered a Atrix and it's enroute to me over here in Japan... I was thinking I would try to build Gentoo on the webtop somehow.
I have experience there doing the whole bootstrapping thing, but then it hit me-- "How will I compile the programs?" since everything gets made from source and not from RPMs or DEBs in that distro.
Now I am totally chomping at the bit for my Atrix to get here; I am going to experiment using it as my ONLY computer at work, and out and about. I tend to use cloud-based apps even when creating content (I'm a teacher/photographer/web developer) and I feel uneasy about taking my loaded-to-the-gills Macbook on crowded Tokyo trains with me everyday.
Now with your find, I can still manage to do some light graphics work at times in GIMP too maybe?
crnkoj said:
those commands returned the error:
dd: opening '/data/6GB/swap': No such file or directory
hmm in your first post the one for dding a 2gb file is different as these two.
Click to expand...
Click to collapse
ops.. you are right.. corrected!
starrwulfe said:
Now with your find, I can still manage to do some light graphics work at times in GIMP too maybe?
Click to expand...
Click to collapse
I've not tried gimp, but it should works, we have 1gB of ram!
I was thinking how great gentoo would be too. kholk said once he manages to get kexec and a custom kernel to work he will start work for on gentoo to replace the webtop, that ought to be awesome than
Cannot wait to give this a shot! I just need to order a blue tooth mouse and keyboard.
SystemR89 said:
ops.. you are right.. corrected!
Click to expand...
Click to collapse
ya thought so to just change to debian, btw why do you say if in ubuntu you use the squeeze tag and if just debian you use the stable tag when doing the debootstrap?
crnkoj said:
ya thought so to just change to debian, btw why do you say if in ubuntu you use the squeeze tag and if just debian you use the stable tag when doing the debootstrap?
Click to expand...
Click to collapse
I'm not sure that stable tag works with ubuntu..
Wow amazing I will try when I can, will be funny or nice if we can connect the display to a chinese tablet xD so we can get a portable display xD
.......................................................
Sent from my loved atrix ;D
update.zip, multiple size disk and terminal-less installation and usage will be ready in the next hours!
Stay tuned!

[INIT.D][10-05-2012]Super APP2SD Script [MAJOR UPDATE][BETA]

UPDATES, WARNINGS, AND INSTALLATION STEPS ARE AVAILABLE IN THE 2ND POST
WHAT DOES THIS SCRIPT DO?
* It is the only method, that I am aware of to have apps trully run, and be installed directly to the external storage without completely switching the internal storage with the external storage.
This bings different benefits to different people:
1 - If you have a device that comes from factory with only a small amount of storage available, you can now install as many apps, and apps as big as the partition you setup to use with this script. For example, if you have a phone with only 512 MB of app storage, you can now install games that take over 1GB of app storage so long as your external partition has the space available.
2 - If you bought a 16GB device and wish you had bought a 32GB device, this is great for you as well (I'm one of these). With this script, your apps will not take up any space in your internal storage, which means that your 16GB (or whatever is left of it after factory partitioning, 11.66 GB in my case) is now available for pictures, videos, downloads, backups, or whatever else you might want to put there or have easy access to when you connect your device to your computer.
3 - If you have a lot of Android games, this is great for you too, specially if you're playing games that take a lot of space. Just get a large MicroSD (I have a 64GB partitioned to 32/32) and put as much space as you need in the second partition, and now you can have all your games intalled at the same time. No need to keep uninstalling games so that you can install other ones.
* Once and Done, across the board setup. That's right, launchers, keyboards and widgets will run from the external storage natively, something never done before in Android as far as I know.
This means that once you have the script up and running, you're good to go until the next time you reflash your /system partition. No need to choose what apps to move. No symlinks or anything. Your apps now belong in the external storage, plain and simple.
* No need to backup all your stuff before running the script (and eventually no need to back up your stuff when you want to disable it either).
That's right, the script does the hard work for you. All your stuff gets safely moved to the external storage, with all ownerships and permissions intact. It all happens so smoothly that some people have a hard time telling that the script is already at work. Nothing gets deleted from the internal storage until you're certain that everything is working as expected either. So even if something goes wrong, as long as you have ADB, all your stuff can go back to normal without a problem
(Even though you don't have to backup and restore in order to get the script going, it's always greatly recommended that you keep a backup of your apps).
* Simple intallation:
To get the script going all you have to do is download it, extract it, and run 3 commands in the terminal. It will then ask you a couple of questions, and then you'll be all set. The one downfall is that because the script requires user input (no, the required information cannot be picked from a list), the script cannot be run from a recovery zip. However, I'll emphasize once again that it only takes 3 commands to get the script going.
Also, the script comes with an options file that allows you to setup device specific variables, making the script malleable to work on just about any Android device. Just open the USER_OPTIONS file before runing the install script, and as long as you have the variables there set correctly, the script should be compatible with your device.
* You can still use the external partition for other stuff if you want to. Just remember that it's mounted to /mnt/sd-ext (or /storage/sd-ext in JB). So if you still have a ton of space left in the partition and need the space, you can still use it. Just ensure not to touch the folders Android, app and data.
* Now this is a bit more technically, but in theory, you could a third partition for this script instead of the second partition, and then still be able to use app2sd solutions, though personally I don't see what advantage there would be to doing this since apps would still be in the external storage no matter what.
WHAT DOES THIS SCRIPT NOT DO?
*** IT CANNOT BE CONVERTED INTO A RECOVERY ZIP DUE TO USER INPUT REQUIREMENT ***
*** YOU CANNOT PICK AND CHOOSE WHAT APPS TO MOVE, THAT'S PLAIN AND SIMPLE NOT THE PURPOSE OF THIS SCRIPT ***
SCREENSHOTS
{
"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"
}
Above you can see my storage screen. If you add the amount of used space and the amount of available space, it's ~18 GB, well over the available 11.66GB in the internal storage. Also note that when the script is enabled, the bar displaying storage usage is unreliable. All other information is reliable, including, and most importantly, the amount of available free space.
Above you can see the output of some commands in the terminal. The most important part of the output for mount above are
Code:
/dev/block/mmcblk0p12 on /mnt/temp/data type ext4 (rw,relatime,barrier=1,journal_async_commit,data=ordered,noauto_da_alloc,discard)
/dev/block/mmcblk1p2 on /mnt/sd-ext/data type ext4 (rw,nosuid,nodev,noatime,barrier=1,data=ordered)
/dev/block/mmcblk1p2 on /data/media/Android type ext4 (rw,nosuid,nodev,noatime,barrier=1,data=ordered)
/dev/block/mmcblk1p2 on /data/app type ext4 (rw,nosuid,nodev,noatime,barrier=1,data=ordered)
/dev/block/mmcblk1p2 on /data/data type ext4 (rw,nosuid,nodev,noatime,barrier=1,data=ordered)
As you can see, mmcblk1p2, the external storage, is mounted to /data/app, /data/data and /data/media/Android, which means that as far as Android is concerned, those folders are in the external storage. Also note that all these mounts took place before /sdcard itself was mounted, meaning that the script is ensuring that these mounts take place soon enough in the boot process to avoid problems related to mounting the app storage locations after Android has loaded the available apps.
Finally, the fact that mmcblk0p12 is mounted to /mnt/temp/data is important because of the next two commands
The output of du -sh shows the amount of storage used by a folder, and as such because the internal storage is mounted to /mnt/temp/data;
/mnt/temp/data/app = internal /data/app = 8KB
/mnt/temp/data/data = internal /data/data = 72KB
/mnt/temp/data/media/Android = internal /data/media/Android = 4KB
whereas
/data/app = 1GB
/data/data = 624.3 MB
/data/media/Android = 5.6 GB
For a grand total of 7.22 GB of used app storage in the external storage as opposed to 84 KB in the internal storage.
CREDITS
*smaw51 - Testing
*ArangeLTX - Testing and Debugging
*Laggan - Testing
*aadiflesher - Testing
*Others who tested the script but weren't in direct contact with me.
*People who said it wasn't possible to run widgets, launchers and keyboards from External Storage (They provided the challenge I needed to make this work)
If anybody needs help or if anything doesn't work, I'll help through irc (much quicker than posting here) on freenode - #and-host
UPDATES:
09-26-2012: Major Update, Overhauled most of previous code.
09-27-2012: Found badass typo in one of the files, fixed and uploaded correction.
09-27-2012: Added install Script.
10-02-2012: Corrected install script so that things now run properly. Don't forget to double check USER_OPTIONS and set ENABLED=true
10-02-2012: Added MMCBLKXPX variable to user options so now devices that mount SD-EXT to different block can use script easily.
10-03-2012: More fixes to the install script, also added check for storage location as well as user input. Started working on compatibility for devices where /sdcard/Android is in different partition from /data
10-03-2012: Updated this post with more organized information.
10-04-2012: Modified script so that debugging output works properly in JB
10-05-2012: Finished working on compatibility for devices with /sdcard and /data in different partitions (PENDING TESTING)
10-05-2012: Added automatic detection for such devices ^ (New variable is automatically created in USER_OPTIONS, called fukedupFS)
10-05-2012: Added extra security for $deletepostmove (Will not take effect until stage 3 is detected)
10-05-2012: Added switch on install script to do a clean install, (using sh ./install-a2sd -clean) which will erase all current options/vars and reset stage to 0.
WARNINGS:
1 - PROCEED WITH THE FOLLOWING STEPS AT YOUR OWN RISK. IF ANYTHING BREAKS I'LL GLADLY TRY TO HELP (IF I CAN), BUT YOU DO WHAT YOU DO AT YOUR OWN RESPONSIBILITY.
2 - THE INSTALLATION SCRIPT REQUIRES USER INPUT, WHICH MEANS THAT IT CANNOT BE MADE INTO A RECOVERY ZIP. DO NOT BOTHER TO ASK FOR ONE. IF YOU CAN'T LEARN HOW TO USE THE TERMINAL, THEN JUST STICK TO OTHER SUCKY APP2SD SOLUTIONS.
3 - THIS SCRIPT IMPLEMENTS INIT.D BY DEFAULT, IF YOU ALREADY HAVE INIT.D FUNCTIONALITY MAKE SURE TO CHANGE:
Code:
/system/bin/logwrapper busybox run-parts /system/etc/init.d
TO
Code:
# /system/bin/logwrapper busybox run-parts /system/etc/init.d
IN THE B]sysinit[/B] FILE.
4 - THIS SCRIPT IMPLEMENTS INIT.A, WHICH IS ESSENTIALLY LIKE INIT.D, BUT HAPPENS EXTREMELY EARLY AT BOOT TIME, IT IS SUGGESTED THAT REGULAR USERS DO NOT PUT ANY SCRIPTS IN INIT.A UNLESS THEY KNOW WHAT THEY'RE DOING, JUST USE INIT.D FOR OTHER SCRIPTS.
5 - UPDATE YOUR BUSYBOX TO THE LATEST VERSION (1.20.2 AT THE WRITING OF THIS). SOME EARLIER VERSIONS OF BUSYBOX ARE KNOWN TO NOT HAVE SOME OF THE REQUIRED SWITCHES FOR THE COMMANDS USED IN THE SCRIPT.
6 - AT THIS POINT THE SCRIPT REQUIRES THAT YOU HAVE A SECOND PARTITION IN YOUR MICROSD FORMATTED TO EXT4, ANYTHING ELSE WILL NOT WORK. THIS MAY CHANGE IN THE FUTURE, BUT AT THIS POINT IT'S A REQUIREMENT.
7 - FULLY READ THE INSTALLATION INSTRUCTIONS, MORE THAN ONCE IF POSSIBLE, BEFORE RUNNING THE SCRIPT. FAILING TO COMPREHEND WHAT'S GOING ON CAN POSSIBLY LEAVE YOUR DEVICE SEMI-BRICKED/CAUSE MAJOR HAVOC AND FORCE-CLOSES AND YOU'LL HAVE TO RESTORE A BACKUP. MORE THAN ANYTHING MAKE SURE TO BACKUP YOUR APPS.
INSTALLATION:
1 - Download the attached file on your device or PC.
2 - Extract the files and move it to an easy to access location in your device, such as /sdcard. Open USER_OPTIONS and ensure that all variables correctly apply to your device, LEAVE deletepostmove='false' until later. Set ENABLED='true' once you're reviewed everything.
3 - Open a terminal app (Rom Toolbox and such probably won't work because the script requires user input)
4 - Assuming that you moved all 6 files to /sdcard, execute the following commands in the terminal:
Code:
su
cd /sdcard
sh ./install-a2sd
You can also perform a clean install by using the command:
Code:
sh ./install-a2sd -clean
5 - The script will ask a couple of questions, answer them (ask someone for help if you're not sure).
6 - If all went well (The script will tell you that folders were created, files were copied and permissions were set) you'll be told that upon pressing enter your device will be rebooted. Press ENTER when ready or reboot manually if it fails to reboot on its own.
7 - STAGE 1 - NOTHING WILL HAVE NOTICIABLY CHANGED UPON THE FIRST REBOOT. This is normal. The first reboot will only garther many variables needed for the script to run properly, it will also give the opportunity to review the variables and ensure that everything is ok, so that you can disable the script in case the gathered variables are not correct, so that things don't get broken unecessarily. Please take a look at:
Code:
/sdcard/Tweaked.Scripts/A2SD/options/vars
If all looks good in there (even if you don't understand what the variables are for, ensure that the paths make sense, don't worry if you don't have /mnt/sd-ext and /mnt/temp, or /storage/sd-ext and /storage/temp as these will be created).
Reboot again after reviewing the variables.
8 - STAGE 2 - ONCE AGAIN, WHEN YOU REBOOT, NOTHING WILL APPEAR TO HAVE HAPPENED. In fact, this is not the case this time. If all variables were correct in STAGE 1, every app along with their data and files will have started to be copied over to the external storage as soon as the device finished booting. You should be able to see the process for this by opening the terminal and running the command:
Code:
logcat | busybox grep "01a2sd"
You can also run the following command in the terminal to ensure that there are extra mounts that did not exist prior:
Code:
mount
***THIS IS THE MOST IMPORTANT STEP IN THE PROCESS. MAKE SURE THAT YOU DO NOT REBOOT YOUR DEVICE UNTILL THE FOLLOWING FILE IS CREATED:
Code:
/sdcard/Tweaked.Scripts/A2SD/DEVICE_IS_READY
Failing to do so is the single worst mistake that you can do. Rebooting the device before the copying is done might cause all your apps to look like they're not installed, as well as major FCs, to the point where stuff is unusable and you have to restore a backup.
Just be patient during this step, specially if you already have a lot of apps installed, even more so if you have games that use a large amount of space.
9 - STAGE 3 - After rebooting from STAGE 2, the device will mount the external storage in every location where apps would reside in the internal storage. This is why it's extremely important that STAGE 2 is completed properly, because unless everything has been moved properly, files that were not copied will seem like they don't exist, possibly causing FCs and major havoc.
If everything went ok, it will actually look like nothing happened, but in fact, everything should be running from the external storage. You can confirm this by running the following command in the terminal:
Code:
mount
You should see three mounts that weren't there before that look like
Code:
/dev/block/mmcblk1p2 on /data/media/Android type ext4 (rw,nosuid,nodev,noatime,barrier=1,data=ordered)
/dev/block/mmcblk1p2 on /data/app type ext4 (rw,nosuid,nodev,noatime,barrier=1,data=ordered)
/dev/block/mmcblk1p2 on /data/data type ext4 (rw,nosuid,nodev,noatime,barrier=1,data=ordered)
At this point, it should be safe to open USER_OPTIONS in /sdcard/Tweaked.Scripts/A2SD/options and change deletepostmove='true'. Just remember that with this variable set on, all your apps will be wiped from external storage. This means that if you reboot without your MicroSD or if you lose the stuff in the MicroSD your alls will be gone. Becase of this, ensure that you have your apps backed up somewhere.
TweakerL said:
To install, download attached file (then rename it to 01a2sd) or copy code and save it to (01a2sd).
Copy the file to /system/etc/init.d (Can be done with any file manager that has root access)
Change permission to 755 (Can be done with most file managers with root access)
Change Options in script to your liking.
Enjoy the extra storage after reboot.
Code:
#! /system/bin/sh
########################################################################################################
########################################################################################################
## ##
## Super APP2SD by TweakerL ##
## Visit us at http://and-host.com ##
## Chat with us on freenot at #and-host ##
## ##
########################################################################################################
########################################################################################################
export PATH=/sbin:/system/sbin:/system/bin:/system/xbin
########################################################################################################
## Options #############################################################################################
## ##
## Feel free to change these: ##
## ##
## moveAndroid: Moves /sdcard/Android to external storage. ##
## moveApps: Not yet implemented ##
## moveData: Not yet implemented ##
## ##
## deletepostmove: If 'true ' Deletes files from internal storage after they have been moved. ##
## ##
## pruneoldlogs: If 'true' Deletes logs older than X hours set in prunehoursold. ##
## prunehoursold: If 'X' greater than 0 logs older than X hours will be deleted ##
## If 'X' equal 0 all logs will be deleted ##
## ##
## debugging: If 'true' files will be created in /sdcard for debugging purposes ##
## ##
moveAndroid='true' ##
##
deletepostmove='true' ##
##
pruneoldlogs='true' ##
prunehoursold='1' ##
##
debugging='false' ##
########################################################################################################
########################################################################################################
## Constants ###########################################################################################
## ##
## Don't touch these unless you're told to by someone who knows what they're doing: ##
## ##
append_android='/Android' ##
append_data='/data' ##
append_obb='/obb' ##
append_ext4='/ext4' ##
append_tweaked='/Tweaked.Scripts' ##
append_movethis='/movethis.txt' ##
append_temp='/temp' ##
append_media='/media' ##
append_A='A' ##
append_logs='/logs' ##
##
data='/data' ##
########################################################################################################
########################################################################################################
if [ -f /sbin/busybox -o -f /system/sbin/busybox -o -f /system/xbin/busybox -o -f /system/bin/busybox ]
then
has_busybox='true'
fi
if busybox blkid | busybox egrep -i "mmcblk1p2" > /dev/null
then
has_mmcblk1p2='true'
fi
if busybox blkid | busybox egrep -i "mmcblk1p2" | busybox awk '{print $4}' | busybox cut -f2 -d'"' > /dev/null
then
is_ext4='true'
fi
if [ $has_busybox == 'true' -a $has_mmcblk1p2 == 'true' -a $is_ext4 == 'true' ]
then
# DEBUGGING
# Get vars part 1
if [ $debugging == 'true' ]
then
set > /sdcard/vars.1
fi
# END DEBUGGING
# Start defining functions
makedir () {
if [ ! -d $1 ]
then
busybox mkdir -p $1
fi
busybox chmod $2 $1
busybox chown $3:$4 $1
}
# End defining functions
mnt_sd=$( busybox mount | busybox egrep -i '/sdcard' | busybox awk '{print $3}' )
mnt=$( busybox dirname $mnt_sd )
sd_uid=$( busybox ls -ln $mnt_sd | busybox egrep -i "Android" | busybox awk '{print $3}' )
sd_gid=$( busybox ls -ln $mnt_sd | busybox egrep -i "Android" | busybox awk '{print $4}' )
blk_ext4=$( busybox ls -lR /dev | busybox egrep -i "mmcblk1p2 ->" | busybox awk '{print $11}' )
blk_data=$( busybox mount | busybox egrep -m 1 '/data' | busybox awk '{print $1}' )
mnt_ext4=$mnt$append_ext4
ext_data=$mnt_ext4$data
ext_android=$ext_data$append_android
mnt_temp=$mnt_ext4$append_temp
temp_android=$mnt_temp$append_media$append_android
datetime=$( busybox date -Iseconds )
sd_android=$mnt_sd$append_android
sd_tweaked=$mnt_sd$append_tweaked
tweaked_logs=$sd_tweaked$append_logs
txt_movethis=$sd_tweaked$append_movethis
makedir $sd_tweaked 775 $sd_uid $sd_gid
data_media=$( busybox dirname $( busybox find /data -type d -follow -name 'Tweaked.Scripts' ) )
data_android=$data_media$append_android
data_uid=$( busybox ls -lnd $data | busybox awk '{print $3}' )
data_gid=$( busybox ls -lnd $data | busybox awk '{print $4}' )
android_uid=$( busybox ls -ln $data_media | busybox egrep -i "Android" | busybox awk '{print $3}' )
android_gid=$( busybox ls -ln $data_media | busybox egrep -i "Android" | busybox awk '{print $4}' )
# DEBUGGING
# Get vars part 2
if [ $debugging == 'true' ]
then
set > /sdcard/vars.2
busybox diff /sdcard/vars.1 /sdcard/vars.2 | busybox grep "+" | busybox egrep -v "@|_=" > /sdcard/vars.txt
fi
# END DEBUGGING
busybox chmod 775 $sd_tweaked
busybox chown $android_uid:$android_gid $sd_tweaked
makedir $tweaked_logs 775 $sd_uid $sd_gid
echo 'Logging Started' > $tweaked_logs/a2sd-$datetime.log
echo '' >> $tweaked_logs/a2sd-$datetime.log
busybox mount -o remount,rw /
makedir $mnt_ext4 775 $data_uid $data_gid
busybox mount $blk_ext4 $mnt_ext4
sleep 1
makedir $mnt_temp 775 $data_uid $data_gid
busybox mount $blk_data $mnt_temp
sleep 1
makedir $ext_data 775 $data_uid $data_gid
makedir $ext_android 775 $android_uid $android_gid
busybox mount -o bind $ext_android $data_android
sleep 3
busybox mount -o remount,ro /
if [ $moveAndroid == 'true' ]
then
busybox find $temp_android -type f -follow -print > $txt_movethis
fi
if [ $moveAndroid == 'true' ]
then
echo 'Copying files from internal storage to external storage\n' >> $tweaked_logs/a2sd-$datetime.log
while read line
do
source=$line
destappend=$append_A$( echo "$line" | busybox cut -f2-100 -d'A' )
dest=$ext_android/$destappend
destfolder=$( busybox dirname $dest )
if [ ! -f "$dest" ]
then
if [ ! -d "$destfolder" ]
then
busybox mkdir -p "$destfolder"
fi
busybox cp -pdf "$source" "$dest"
if [ -f "$dest" ]
then
echo -e $source'\ncopied to\n'$dest'\n' >> $tweaked_logs/a2sd-$datetime.log
else
echo -e 'Failed to copy: '$source'\n' >> $tweaked_logs/a2sd-$datetime.log
fi
else
echo -e 'Already exists: '$dest'\n' >> $tweaked_logs/a2sd-$datetime.log
fi
if [ $deletepostmove == 'true' ]
then
if [ -f "$dest" ]
then
busybox rm -f "$line"
if [ ! -f "$line" ]
then
echo -e 'deletepostmove = true - Deleted: '$source'\n' >> $tweaked_logs/a2sd-$datetime.log
echo -e '____________________________________________________________ ' >> $tweaked_logs/a2sd-$datetime.log
else
echo -e 'Failed to delete: '$source'\n' >> $tweaked_logs/a2sd-$datetime.log
echo -e '____________________________________________________________ ' >> $tweaked_logs/a2sd-$datetime.log
fi
fi
fi
done < $txt_movethis
busybox rm -f $txt_movethis
busybox chmod -R 775 $ext_android/*
busybox chown -R $android_uid:$android_gid $ext_android/*
fi
busybox umount $mnt_temp
if [ $pruneoldlogs == 'true' ]
then
(( prunehours = ($prunehoursold * 60) ))
find $tweaked_logs -mmin +$prunehours -exec rm {} \;
echo "All logs older than "$prunehoursold" hours old have been deleted"
fi
echo -e '\nEnd of Log' >> $tweaked_logs/a2sd-$datetime.log
fi
Click to expand...
Click to collapse
Where to find premission? Please advice.
Sent from my GT-N8000 using xda app-developers app
andylam16 said:
Where to find premission? Please advice.
Sent from my GT-N8000 using xda app-developers app
Click to expand...
Click to collapse
use a root file browser then press and hold on the file, select permissions. Change to: Owner (rwx), group and other (rx)
Sent from my GT-N8013 using Tapatalk 2
My device doesn't have intI. D folder in system/Etc
I have to create new folder?
Rename the file without . Txt?
Sent from my GT-N8000 using Tapatalk 2
lm that guy said:
use a root file browser then press and hold on the file, select permissions. Change to: Owner (rwx), group and other (rx)
Sent from my GT-N8013 using Tapatalk 2
Click to expand...
Click to collapse
Thanks bro, is r = read , w = write , x = ???
Please advice.
Sent from my GT-N8000 using xda app-developers app
andylam16 said:
Thanks bro, is r = read , w = write , x = ???
Please advice.
Sent from my GT-N8000 using xda app-developers app
Click to expand...
Click to collapse
Execute
Sent from my GT-N8013 using Tapatalk 2
lm that guy said:
Execute
Sent from my GT-N8013 using Tapatalk 2
Click to expand...
Click to collapse
Got it, thanks!:thumbup:
Sent from my GT-N8000 using xda app-developers app
kaipro said:
My device doesn't have intI. D folder in system/Etc
I have to create new folder?
Rename the file without . Txt?
Sent from my GT-N8000 using Tapatalk 2
Click to expand...
Click to collapse
+1
fauzin said:
+1
Click to expand...
Click to collapse
I suggest this thread: http://forum.xda-developers.com/showthread.php?t=1883125
Sent from my GT-N8013 using Tapatalk 2
kaipro said:
My device doesn't have intI. D folder in system/Etc
I have to create new folder?
Rename the file without . Txt?
Sent from my GT-N8000 using Tapatalk 2
Click to expand...
Click to collapse
Check link in my sig for my other thread where you can get the init.d enabler.
After did the procedure as mentioned nothing happened the apps still go to the scared not the external. Please advice anything I missed. Thanks
Sent from my GT-N8000 using xda app-developers app
---------- Post added at 10:54 AM ---------- Previous post was at 10:12 AM ----------
One more thing there is a file "99testinit" inside the init.d , do I need to anything about it?
Sent from my GT-N8000 using xda app-developers app
andylam16 said:
After did the procedure as mentioned nothing happened the apps still go to the scared not the external. Please advice anything I missed. Thanks
Sent from my GT-N8000 using xda app-developers app
---------- Post added at 10:54 AM ---------- Previous post was at 10:12 AM ----------
One more thing there is a file "99testinit" inside the init.d , do I need to anything about it?
Sent from my GT-N8000 using xda app-developers app
Click to expand...
Click to collapse
Exactly same as me.
Sent from my GT-N8000 using Tapatalk 2
If you guys read everything, this is still an early version. At the moment, only /sdcard/Android is getting moved, which is the location that stores extra files downloaded by apps, not the apps themselves. If the script is running, you can go on terminal and type:
Code:
df -h
and you should see mmcblk1p2 (which is the ext4 partition in the MicroSD) and how much space is being used, which is the amount of space that should be getting saved from the internal storage. Also, if you look under storage under settings, the amount of space available should have increased considerably, specially if you have a lot of games.
I'll be working on the other two parts throughout this week (moving APK and DATA) Then you will be able to notice a bigger difference, although it will always look like apps are installed in the internal storage, even when they're in the external storage.
The reason for this is because the script works by mounting the external storage to:
/data/app (not yet implemented)
/data/data (not yet implemented)
/data/media/Android (already implemented)
while at the same time copying the contents of those locations from internal to external then wiping them from internal. Essentially when it's all said and done, the OS pretty much thinks that nothing has changed, except that whenever anything gets written to those folders it takes space from the external storage instead of internal.
A good way to test it would be to download a free gameloft game like MIB3 or Six Guns. Take a look at storage before installing. After you install MIB3, your available storage should drop by roughly 500MB, but if you're using the script, even at preview stage, the available storage will only drop by about 30MB, even though storage settings will say that the game takes up ~500MB.
Also, you can mount your normal data partition and take a look at how much space is being used there, as opposed to the external partition like this:
(All the following commands in terminal)
make sure which partition is mounted to /data
# mount
mount data to temp location (assuming data is mmcblk0p12)
# mount /dev/block/mmcblk0p12 /mnt/ext4/temp
check amount of space used in internal storage:
# du -dh /mnt/ext4/temp/media/Android
check amount of space used in external storage
# du -dh /mnt/ext4/data/Android
In the future I'll add to the script a way to automatically calculate the amount of space saved
The script itself is not working. Init.d is working, did rename the file and changed permission. I use script manger and try to run the script but it's got error,
Sent from my GT-N8000 using xda app-developers app
htainlin said:
The script itself is not working. Init.d is working, did rename the file and changed permission. I use script manger and try to run the script but it's got error,
Sent from my GT-N8000 using xda app-developers app
Click to expand...
Click to collapse
I'm gonna be uploading a new version soon with more debugging so I can see why people might have issues.
EDIT - Done updating OP
Is there any recommendations for the partition other than ext4, like swap size and what not? I also assume a reboot is required in order to get it to run right? I am still getting insufficient storage available when updating apps in the play store. I was getting that error before, even though I have plenty of space, like more than 10 gb on the internal memory so I don't know if it is just a batch update issue on the play store with my note for whatever reason. But even individual updates stop with an insufficient storage error.
I have tried using both the attached file in the op as well as the copy and paste method. The file should have no extension once in place right?
It seems as though it is still not working right
I have init.d working, confirmed with the test file and your method, Busybox installed, partitions with 0 swap and 1024 size at ext4
I have not been able to locate a log created, where is it dumped to to see if it is even running the script?
EDIT: never-mind, I figured out why my stuff was't updating but still able to add new apps, in rom tool box, I set it to install to sd card after most of my apps were already put on the internal memory. Just switched it to auto and it fixed it up
smaw51 said:
Is there any recommendations for the partition other than ext4, like swap size and what not? I also assume a reboot is required in order to get it to run right? I am still getting insufficient storage available when updating apps in the play store. I was getting that error before, even though I have plenty of space, like more than 10 gb on the internal memory so I don't know if it is just a batch update issue on the play store with my note for whatever reason. But even individual updates stop with an insufficient storage error.
I have tried using both the attached file in the op as well as the copy and paste method. The file should have no extension once in place right?
It seems as though it is still not working right
I have init.d working, confirmed with the test file and your method, Busybox installed, partitions with 0 swap and 1024 size at ext4
I have not been able to locate a log created, where is it dumped to to see if it is even running the script?
EDIT: never-mind, I figured out why my stuff was't updating but still able to add new apps, in rom tool box, I set it to install to sd card after most of my apps were already put on the internal memory. Just switched it to auto and it fixed it up
Click to expand...
Click to collapse
Had a similar problem when i had the tf201, kept getting an error whenever playstore started installing an app after the initial download, and i had the same problem a couple of days ago with the note which i resolved by deleting all odex files in the data\apps folder, i used es file explorer, navigated to the app folder and did a search for 'odex', then deleted them, i can now install apps again
Dont know if this is the same issue as yours , and ive just now seen your edit, so i see youve resolved it, so no worries, hopefully our solutions will help out others
Edit: dont quote me but my particular issue i 'think' has something to do with titanium backup, so for those having 'inssuficient storage errorr' in the playstore AND you have titanium backup, this may help
It might be a restore from backup in general issue, after you mention you used titanium. I used my backup pro to restore apps and data from my tf 700 to the my note. Only halfsies worked but maybe that caused some issues.
This is going to be very nice one apk and data are enabled to move to sd
how do I know that I have ext4 in my SDcard? and if I dont have it , How do I make ext4 ?
Thanks

[WIP/DEV Only] Ubuntu Touch on Nexus S

This topic is for developers and future testers, we are at least 3-4 people that try to boot Ubuntu Touch on Nexus S. Joint work would be better, don't you think?
IRC Channel: irc.androidirc.com #ubuntu-touch-crespo
Mibbit: http://client00.chat.mibbit.com/?server=irc.androidirc.org&channel=#ubuntu-touch-crespo
So now I am here: http://pastebin.com/RnvjqMBx
Blobs list: https://github.com/CyanogenMod/android_device_samsung_crespo/blob/cm-10.2/proprietary-blobs.txt
nyl said:
So now I am here: http://pastebin.com/RnvjqMBx
Blobs list: https://github.com/CyanogenMod/android_device_samsung_crespo/blob/cm-10.2/proprietary-blobs.txt
Click to expand...
Click to collapse
You can have tricks on the REAME-20130807 https://drive.google.com/#folders/0B_fPIBhY3pcRSVVBSDY1TjJKQXc
---------- Post added at 07:59 PM ---------- Previous post was at 07:54 PM ----------
Tygerlord said:
You can have tricks on the REAME-20130807 https://drive.google.com/#folders/0B_fPIBhY3pcRSVVBSDY1TjJKQXc
Click to expand...
Click to collapse
First step I think is trouble of data space (up to 1Go) seems too small
My goals is to modify script of saucy-preinstalled-touch-armhf.zip to
1 ) create /sdcard/tubuntu.img, ext4 image disk of up to 4 Go
2 ) mount loop /sdcard/tubuntu.img to /data/tubuntu
3 ) create symlink betwen /data/tubuntu/ubuntu /data/ubuntu
Q: Why I don't mount directly tubuntu.img to /data/ubuntu
A: deploy script use temp directories that need to be moved.
Currently process fail on creating file system tubuntu.img with code:
busybox mkfs.ext2 -F /sdcard/tubuntu.img
mkfs.ext2: lseek: Value too large for defined data type :crying::crying:
My saucy-preinstalled-touch-armhf+crespo.zip can be found here:
https://drive.google.com/#folders/0B_fPIBhY3pcRSVVBSDY1TjJKQXc
This can be installed with recovery (and should break anything). It take up to 10 minutes to install.
try making it vfat (not sure if ubuntu reads vfat), anyway something like this should be for a 4gb vfat i think.
Code:
mkdir /data/tubuntu
su
dd if=/dev/zero of=/sdcard/tubuntu.img bs=1024 count=4194340
busybox mkfs.vfat /sdcard/tubuntu.img
mount -o loop -t vfat /sdcard/tubuntu.img /data/tubuntu
Edit: http://e2fsprogs.sourceforge.net/ would be better for creating ext4 image
nyl said:
try making it vfat (not sure if ubuntu reads vfat), anyway something like this should be for a 4gb vfat i think.
Code:
mkdir /data/tubuntu
su
dd if=/dev/zero of=/sdcard/tubuntu.img bs=1024 count=4194340
busybox mkfs.vfat /sdcard/tubuntu.img
mount -o loop -t vfat /sdcard/tubuntu.img /data/tubuntu
Edit: http://e2fsprogs.sourceforge.net/ would be better for creating ext4 image
Click to expand...
Click to collapse
vfat can't support linux os...
Never mind, I've solved my problem.
Now I've a disk image tubuntu.img with saucy-preinstalled-touch-armhf expended on it.
I've /data/tubuntu to mount this image and symbolic link /data/ubuntu -> /data/tubuntu/ubuntu :good:
Next step, build kernel for crespo with mounting /sdcard/tubuntu.img and use root dir /data/ubuntu...
Tygerlord said:
vfat can't support linux os...
Never mind, I've solved my problem.
Now I've a disk image tubuntu.img with saucy-preinstalled-touch-armhf expended on it.
I've /data/tubuntu to mount this image and symbolic link /data/ubuntu -> /data/tubuntu/ubuntu :good:
Next step, build kernel for crespo with mounting /sdcard/tubuntu.img and use root dir /data/ubuntu...
Click to expand...
Click to collapse
almost done with the kernel hope it will work )
edit, find kernel here: https://drive.google.com/?tab=wo&authuser=0#folders/0B34Kseus4HL2ZEM5Mjd4YzNyREE
nyl said:
almost done with the kernel hope it will work )
Click to expand...
Click to collapse
Previous link for shared documents seems not working, this one should work better... I hope
okay i got into adb shell tried to manually mount /data/ubuntu, didn't work
Current test
nyl said:
okay i got into adb shell tried to manually mount /data/ubuntu, didn't work
Click to expand...
Click to collapse
mount -t ext4 /sdcard/tubuntu.img /data/tubuntu
This work for me, but my kernel build don't. Seem having trouble mounting system partition see attached file for dmesg.
Ok after lot of efforts I've install script creating ubuntu.img (based on saucy-preinstalled-touch-armhf.zip) on sdcard and kernel,
kernel mount correctly ubuntu.img but stay locked on google logo...
Adb is working and I retreive dmesg (see debug.txt file)
There are plenty of error and I can't understand what happen , missing knowledge on ubuntu touch process to debug that...
Since first release start on october 17 I think that developpers will be too busy for help now...
I can't progress anymore, current developments are available here
So I wait for help or more documentations on ubuntu touch process to continue...
Tygerlord said:
Ok after lot of efforts I've install script creating ubuntu.img (based on saucy-preinstalled-touch-armhf.zip) on sdcard and kernel,
kernel mount correctly ubuntu.img but stay locked on google logo...
Adb is working and I retreive dmesg (see debug.txt file)
There are plenty of error and I can't understand what happen , missing knowledge on ubuntu touch process to debug that...
Since first release start on october 17 I think that developpers will be too busy for help now...
I can't progress anymore, current developments are available here
So I wait for help or more documentations on ubuntu touch process to continue...
Click to expand...
Click to collapse
Last kernel seem produce less errors.. (but display still not working). I've message on log lxc-android-boot.log,
cp: cannot stat '/usr/lib/lxc-android-config/70-crespo.rules': No such file or directory
but I've created file (make a copy of other) and error still present, very strange!!!
Matsca09 Any news??

Froma newbiz : Mirek 7 is working !!!

My first post on xda about my first flashing ever. Mirek seems to work. Still need 9 more posts to be able to post on dev forum.
By the way, i plan to install debian on it. Either by replacing winshiiiiiii*, either by doing a install with a shared kernel (but not as chroot as seen in gnu root debian).
Still need to post 9 more posts before i can thank Mirek.
10.
that's 9
By the way it's a very stressing situation when you never flashed a rom.
I plan to remove the windows partitions in order to install the debian system on a separate partition but i first need to back up the partition table of the current installation in order to reinstall windows (in case something go wrong).
Use dd command to Bacup windows partition .
In the future I add that possibility in my flash tool .
7
Thank for your answer.
That's what i did. (In fact, it's the very first thing i did).
But i want to backup the partition table in order to reinstall as origin, even if this will probably never happen.
I want to remove all the msft partition in order to make room for debian root & home and make the data partition larger. I guess it is possible to do so by editing the .tbl file in the partition folder.
But do you know a tool to extract the current partition table ? Or do i have to make it manually ?
You have to make it manually .
If you want know how big is each partition - easy way install partition info ( in that program check advanced view )
Or use terminal ....
With my partitions you have partition editor .
Only diffrences will be on the last 4 petitions /cache / sytem /data and windows last partition .
Or if you install teclast windows then windows create 4 partitions for itself at the end partition tables .
PS I tried boot Debian ....and failed ... looks like in half of booting from usb just usb stoped working ( I have powered usb hub ) .
I finally figured it out for the partition editor. Thanks.
About debian, it's not the usb way i'm talking about but more something like that :
whiteboard.ping.se/Android/Debian
The article is a little old but...
It's less straithforward than usb but you keep the advantage of android (and the drivers) with the full fonctionnality of debian (no chroot).
Oh, i forgot.
The rom is a nice improvement of the system. The battery life lasts far longer.
I had a few bug (apps closing like xprivacy).
There is also semething else. I'm not able anymore to setenforce selinux in enforcing mode. I did it with the Selinuxmodechanger but the change to enforce mode prevented other apps as well selinuxmode changer & terminal emulator to restart.
I had to reboot the device.
Don't change to enforce mode because mods will stop works.
I have a question :
What is exactly efilinux-userdebug.efi ? It seems you flash it before any operation on the device.
This is EFI boot able partition ( small partition ) that allow to boot droidboot in ram disk .
Ok...
I have issue with your rom :
Some apps are crashing (privacy X).... I think there is an issue with permission system.
I had also to screen freezes. May be related to Gravity box or apex, may be both.
I removed animation of the dock swipe from apex settings and now it's ok.
But he selinux issue is a big issue for me, i don't feel it well. It like going outside with just a T-shirt in the middle of the winter.
And i want to try Remix. I will maybe come back to Mirek later.
In order to flash Remix from my debian pc, I adapted your batch script in bash. and your partition.tbl
your excel sheet was inspiring. I backed-up the current partition table with fdisk command for all partition. It give something equals to the excel sheet for the first partitions.
I upload the 2 necessary file (script & partition flash) in the hope you could take a look at it.
teclast_remix_partition.sh :
#!/bin/bash
#Flash osloader & boot from droidboot.img
fastboot flash osloader ROM/efilinux-userdebug.efi
fastboot boot ROM/droidboot.img
fastboot devices
sleep 30
#Wipe ESP
fastboot oem wipe ESP
echo "ESP wiped"
####Start partitionning####
echo "start partitioning"
fastboot oem start_partitioning
fastboot flash /tmp/partition.tbl ROM/partition.tbl
fastboot oem partition /tmp/partition.tbl
echo "start erasing..."
####Erase partitions####
fastboot erase system
echo "system erased"
fastboot erase cache
echo "cache erased"
fastboot erase config
echo "config erased"
fastboot erase data
echo "data erased"
fastboot erase logs
echo "logs erased"
fastboot erase factory
echo "factory erased"
fastboot oem stop_partitioning
#Flash partitions
fastboot flash ESP ROM/esp.img
echo "esp flashed"
fastboot flash fastboot ROM/droidboot.img
echo "droidboot flashed"
fastboot flash boot ROM/boot.img
echo "boot flashed"
fastboot flash recovery ROM/recovery.img
echo "recovery flashed"
fastboot flash system ROM/system.img
echo "system flashed"
fastboot continue
echo "All should be OK now"
sleep 10
Click to expand...
Click to collapse
partition.tbl :
partition_table=gpt
create -z /dev/block/mmcblk0
create /dev/block/mmcblk0
boot -p /dev/block/mmcblk0
reload /dev/block/mmcblk0
add -b 40 -s 131072 -t efi -u C12A7328-F81F-11D2-BA4B-00A0C93EC93B -l ESP -T 0 -P 0 /dev/block/mmcblk0
add -b 131112 -s 131072 -t data -u 80868086-8086-8086-8086-FFFFFFFFFFF0 -l reserved -T 0 -P 0 /dev/block/mmcblk0
add -b 262184 -s 32768 -t data -u 80868086-8086-8086-8086-000000000100 -l boot -T 3 -P 15 /dev/block/mmcblk0
add -b 294952 -s 32768 -t data -u 80868086-8086-8086-8086-000000000101 -l recovery -T 3 -P 14 /dev/block/mmcblk0
add -b 327720 -s 32768 -t data -u 80868086-8086-8086-8086-000000000102 -l fastboot -T 3 -P 13 /dev/block/mmcblk0
add -b 360488 -s 32768 -t data -u 80868086-8086-8086-8086-FFFFFFFFFFF1 -l reserved_1 -T 3 -P 0 /dev/block/mmcblk0
add -b 393256 -s 131072 -t data -u 80868086-8086-8086-8086-000000000104 -l test -T 3 -P 12 /dev/block/mmcblk0
add -b 524328 -s 65536 -t data -u 80868086-8086-8086-8086-000000000001 -l panic -T 0 -P 0 /dev/block/mmcblk0
add -b 589864 -s 32768 -t data -u 80868086-8086-8086-8086-000000000002 -l factory -T 0 -P 0 /dev/block/mmcblk0
add -b 622632 -s 32768 -t data -u 80868086-8086-8086-8086-000000000003 -l misc -T 0 -P 0 /dev/block/mmcblk0
add -b 655400 -s 32768 -t data -u 80868086-8086-8086-8086-000000000004 -l config -T 0 -P 0 /dev/block/mmcblk0
add -b 688168 -s 2097152 -t data -u 80868086-8086-8086-8086-000000000005 -l cache -T 0 -P 0 /dev/block/mmcblk0
add -b 2785320 -s 524288 -t data -u 80868086-8086-8086-8086-000000000006 -l logs -T 0 -P 0 /dev/block/mmcblk0
add -b 3309608 -s 4194304 -t data -u 80868086-8086-8086-8086-000000000007 -l system -T 0 -P 0 /dev/block/mmcblk0
add -b 7503912 -s 50331648 -t data -u 80868086-8086-8086-8086-000000000008 -l data -T 0 -P 0 /dev/block/mmcblk0
add -b 57835560 -s 31457280 -t data -u 80868086-8086-8086-8086-000000000009 -l debianroot -T 0 -P 0 /dev/block/mmcblk0
add -b 89292840 -s $calc($lba_end-16384) -t data -u 80868086-8086-8086-8086-000000000010 -l debianhome -T 0 -P 0 /dev/block/mmcblk0
reload /dev/block/mmcblk0
Click to expand...
Click to collapse
Is everything ok ?
PS : I don't understand the use of the xml and cmd files, since everything can be done from the batch files
Ok i get it. that's for the intel MFT.
get a huge connectivity problem with the rom : i couldn't g et internet anymore.
I had to make a factory reset.
Hi!
I install mirek190_rom_v7.0 - android Lollipop, I had a few bug (apps closing like facebook, word, powerpoint) and apps OLX are hang, and help only reboot by pressing on 10s power button.
Battery start show full capacity and take on all day after fully discharge and charge on power-off device
And after reboot or shut down when tablet on again, when pressing "last up" soft button i see app what working on last session, they likely didn't close.
In Titanium Backup i cant uninstall, integrate updates 'system' app like Youtube, Apex.. TB wrote "app dont find"
Also on my c9j8 don't work camera.
I can suggest you the remix os rom for x98 on jide website. But you will have to customise it with a kitchen in order to have root access.
You can even build it with malware in it and propose it on the forum, like the russian version proposed by allegator in the teclat-remix thread. (I cheked the adbd binary in the ramdisk with a hexadecimal editor ; at the end there is a fair number of call of external functions).
It seems android herited some of the bad common practices met in the windows world. Coming from the Linux world, Android looks like the Wild West in comparaison.
But the good part is the Android implementation is far more accessible for system programming and general understanding than the desktop versions of linux. It is possible to quickly make your own tweaks.
By the way, the official jide rom offers a great improvement in android gui like a task bar which allow you to switch easily from one app to another. Once you get used to it, you cannot come back to regular android gui.
But you will have to get your hands dirty if you want root access without having to flash dubious 'custom' rom.
If your interested i suggest you to look for kitchen in the search engine and tutorials about ramdisk and kernel. It can take a little time to get it all, but that's not rocket science.

Categories

Resources