BACKGROUND
After many time I stressful with Low Disk Space when Installing many Applications, or Slow Performance when Installing Data2sd or dalvik-cache to SD. I came up with some simple Idea to make my phone have big Internal Memory Storage, yet still robust in performance.
Click to expand...
Click to collapse
Introducing....
AD2SDX - AMARULLZ DATA TO SD-EXT
by amarullz [at] yahoo [dot] com
* Oct 20 2011 (ALPHA02) - Update Compatibility
* Oct 19 2011 (ALPHA01)
WHAT IS IT??
This mod will move all Internal Memory (data) into sd-ext, "but not like data2ext", this mod will maintain the performance, because it still place dalvik-cache and system application data in Internal Memory.
HOW IT WORK??
The script will do this in the first boot:
Move Mounting Internal Memory (/data) Into /sd-ext
Mount SDCard-Ext (mmcblk0p2) partition into /data
Create dalvik-cache directory in Internal Memory data (/sd-ext), and symlink it to mmcblk0p2 (/data)
Create data directory in mmcblk0p2 (/data) And symlink it into Internal Memory data (/sd-ext)
Create symlink of app, app-private, app_s and lib_s from mmcblk0p2 (/data) to Internal memory data (/sd-ext)
Create symlink for all non-symllink of Internal Memory data (/sd-ext) into mmcblk0p2 (/data)
After Initializing Setup (First Boot), reboot the system (Just reboot, don't go into recovery), the mod will automatically do this following:
Create data_s in Internal Memory data (/sd-ext)
Move All mmcblk0p2(/data)/data/com.htc* and com.android* into Internal Memory data(/sd-ext)/data_s
Create symlink all files/directory from Internal Memory data (/sd-ext)/data_s/* into mmcblk0p2(/data)/data/ So the System Application Data still read into Internal memory, but rest Application Data will read Into SDCard.
ILLUSTRATION
{
"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"
}
INSTALLATION
For now, use adb shell and Install it manually, I am android newbie , still unfamiliar with recovery zip installer.
Delete Any A2SD Script in /system/etc/init.d ( common name was 40a2sd )
Copy 40ad2sdx into /system/etc/init.d Don't forget to chmod 755/777 it
Reboot ( 2x optional )
INSTALLATION WITH ADB IN RECOVERY MODE
Code:
C:\>adb shell
# mount /system
# exit
C:\>adb push 40ad2sdx /system/etc/init.d/
C:\>adb shell
# cd /system/etc/init.d
# rm 40a2sd
# chmod 755 40ad2sdx
# cd /
# umount /system
# exit
C:\>
NOTE: the "rm 40a2sd" should be the name of app2sd init.d file.
NOTE
If you install it after clean flash you need to reboot your phone at the 1st boot to activate System App Data on Internal Memory.
CAUTION!!!
YOU SHOULD UNZIP AND MANUALY COPY THE FILE INTO /system/etc/init.d/ - THE ZIP FILE WASN'T AUTO INSTALLER THAT CAN BE RUN IN RECOVERY!!!!
WARNING!!!
THIS MOD ONLY IN TEST STAGE, ONLY ADVANCE USER I SUGGEST TO TRY THIS SCRIPT.
I DON'T TAKE ANY RESPONSIBILITY IF YOU BROKE/BOOTLOOPS YOUR SYSTEM/ROM/PHONE.
TESTED-DEVICE / ROM
HTC Desire (Bravo)
- Cool3D RunnyMede Sense 3.5 v2, v3
- Cool3D AceS Sense 3.0 v3, v4
If You Already Test it and works,.. Please send me a feedback in your comment...
LOGS
Code:
VERSION 1.0 ALPHA02
===================
* Add framework_s into strict mmcblk0p2
* Add Create symlink for rest non-symlink files from mmcblk0p2 to mtdblock5 ( Hope will fix bootloop )
* Change loop method from `ls -d *` to `ls -a` ( may fix error on .systemapp and all file with dot name at first char )
VERSION 1.0 ALPHA01
===================
* Initial Release
* Support for clean flash or already running system
* com.android* and com.htc* set as System App Category
* dalvik-cache on Internal Memory
* add umount /sd-ext in first command
SCRIPT: ALPHA01
Code:
#!/system/bin/sh
#
# AMARULLZ DATA TO SD-EXT MOD FOR ANDROID ( AD2SDX )
# ==================================================
#
# by amarullz [at] yahoo [dot] com
# xda-developers : amarullz
# (c) 2011
# * Oct 19 (ALPHA01)
#
# Info: ~ For Changing Log
##
###
# Initializing
###
#-- SDCard Speed Fix
if [ -e /sys/devices/virtual/bdi/179:0/read_ahead_kb ]
then
/system/xbin/echo "8192" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;
fi;
#-- Unmount /sd-ext if it already mounted
busybox umount /sd-ext;
#-- Mount /data and move it to /sd-ext
busybox mount /data;
busybox mount --move /data /sd-ext;
#-- Mount sd-ext to /data ( You Will Get 1GB/2GB Internal Memory :D )
busybox mount -t ext4 -o noauto_da_alloc,data=ordered,commit=15,barrier=1,nouser_xattr,errors=continue,noatime,nodiratime,nosuid,nodev /dev/block/mmcblk0p2 /data;
busybox chown 1000:1000 /data;
busybox chmod 771 /data;
###[ SDEXT mmcblk0p2 STRICT ]###
# app, app_s, lib_s, app-private, data : should in /data (mmcblk0p2)
#
# ~ ALPHA02 - Add framework_s into (mmcblk0p2) strict
###
for i in framework_s app app_s lib_s app-private data;
do
#-- If Symlink in /data, delete it
if [ -h /data/$i ]
then
busybox rm /data/$i;
fi;
#-- If Directory Exists in /sd-ext, move it to /data
if [ -d /sd-ext/$i ]
then
busybox mv /sd-ext/$i /data/;
fi;
#-- If Directory Not Extst in /data, create it
if [ ! -d /data/$i ]
then
busybox mkdir /data/$i;
#-- Just Open All Permissions ;)
busybox chmod 0777 /data/$i;
fi;
#-- Now Create Symlink From /sd-ext to /data
if [ ! -h /sd-ext/$i ]
then
busybox ln -s /data/$i /sd-ext/$i;
fi;
done;
###[ INTERNAL mtdblock5 STRICT ]###
# For performance, dalvik-cache should be on /sd-ext
###
for i in dalvik-cache;
do
#-- If Symlink in /data, delete it
if [ -h /sd-ext/$i ]
then
busybox rm /sd-ext/$i;
fi;
#-- If Directory Exists in /sd-ext, move it to /data
if [ -d /data/$i ]
then
busybox mv /data/$i /sd-ext/;
fi;
#-- If Directory Not Extst in /data, create it
if [ ! -d /sd-ext/$i ]
then
busybox mkdir /sd-ext/$i;
#-- Just Open All Permissions ;)
busybox chmod 0777 /sd-ext/$i;
fi;
#-- Now Create Symlink From /sd-ext to /data
if [ ! -h /data/$i ]
then
busybox ln -s /sd-ext/$i /data/$i;
fi;
done;
###
# Now create symlink of the rest non Symlink Directories and Files on /sd-ext to /data
#
# ~ ALPHA02 - Fix ls to ls -a, it's ok, because we test -h for symlink
###
cd /sd-ext;
for i in `ls -a`;
do
if [ $i != ".." -a $i != "." ]
then
if [ ! -h /sd-ext/$i ]
then
if [ ! -h /data/$i ]
then
busybox ln -s /sd-ext/$i /data/$i;
fi;
fi;
fi;
done;
cd /;
###
# It should also need to create the rest non Symlink Directories and Files on /data to /sd-ext
# ~ ALPHA02 - Some Directory may be missing if we don't use it
###
cd /data;
for i in `ls -a`;
do
if [ $i != ".." -a $i != "." ]
then
if [ ! -h /data/$i ]
then
if [ ! -h /sd-ext/$i ]
then
busybox ln -s /data/$i /sd-ext/$i;
fi;
fi;
fi;
done;
cd /;
###
# Now Important Thing, is to move the com.htc* and com.android* data to /sd-ext (internal)
# For Good performance. So the system applications will run smooth.
#
# System application will read/write in Internal memory, and 3rd apps will run on sdcard
#
# Notice: Will be affected in 2nd boot :D, so Reboot the system after 1st boot...
###
#-- Prepare data_s in /sd-ext ( For system data )
if [ ! -d /sd-ext/data_s ]
then
busybox mkdir /sd-ext/data_s;
#-- Just Open All Permissions ;)
busybox chmod 0777 /sd-ext/data_s;
fi;
#-- Now Move All com.htc* and com.android* to Internal Memory
cd /data/data/;
for i in `ls -d com.htc* com.android*`;
do
#-- Only Non Symlink
if [ ! -h /data/data/$i ]
then
busybox mv /data/data/$i /sd-ext/data_s/;
fi;
done;
#-- Create Symlink of /data/data_s/* to /data/data/ (mmcblk0p2)
cd /sd-ext/data_s/
for i in `ls -d *`;
do
#-- Only If Symlink Not Exists
if [ ! -h /data/data/$i ]
then
busybox ln -s /sd-ext/data_s/$i /data/data/$i
fi;
done;
#-- Of Finished.... :D
INSTALL ZIP FROM RECOVERY?
Thanks to tezgomet -- Download Attachment by tezgomet >>
tezgomez said:
SD-EXT Mod - AMARULLZ DATA TO SD-EXT
from recovery
tested on BlissMod007_v03_a-STOCK
install rom and without rebooting install script
!!!WARNING!!!
INSTALL IT ON YOUR OWN RISK.
Click to expand...
Click to collapse
KNOW BUG
Titanium Backup - Restore the Application Data ( com.android*/com.htc* data )
NOT WORK ON YOUR ROM?, DON'T WORRY I WILL HELP YOU
This script (AD2SDX) alghoritm should be compatible in any android phone that support init.d, busybox and rooted, but it still depended on how the ROM place the files in your phone.
To make this script compatible with more ROM+PHONE, you can send me your file system information with this sh script (also available in attachment to download):
Code:
#!/bin/sh
echo "AD2SDX - Dump Logs...";
echo " by amarullz [at] yahoo [dot] com"
echo ""
echo "WARNING!!!"
echo "This script WILL dump an Informations About your Storages,"
echo "If you allow me to know your filesystem structures,"
echo "maybe I can help to improve AD2SDX Compatibility..."
echo ""
echo "This script WILL NOT dump any PHONE NUMBER, IMEI, DEVICE NAME"
echo "SERIAL NUMBER and ANY PERSONAL INFORMATIONS..."
echo ""
echo "But Please provide me your Device Name and ROM when you"
echo "submit it on AD2SDX Thread..."
echo ""
sleep 1
echo "Mounting data, sd-ext, and sdcard..."
mount /data
mount /sd-ext
mount /system
mount /sdcard
echo ""
echo "Dumping FileSystem..."
echo "DF" > /sdcard/ad2sdx-dump.txt
echo "==" >> /sdcard/ad2sdx-dump.txt
df >> /sdcard/ad2sdx-dump.txt
echo "" >> /sdcard/ad2sdx-dump.txt
echo "" >> /sdcard/ad2sdx-dump.txt
echo "Dumping File List on data files..."
cd /data
echo "LIST /data" >> /sdcard/ad2sdx-dump.txt
echo "==========" >> /sdcard/ad2sdx-dump.txt
ls -la >> /sdcard/ad2sdx-dump.txt
echo "" >> /sdcard/ad2sdx-dump.txt
echo "" >> /sdcard/ad2sdx-dump.txt
echo "Dumping File List on /sd-ext files..."
cd /sd-ext
echo "LIST /sd-ext" >> /sdcard/ad2sdx-dump.txt
echo "============" >> /sdcard/ad2sdx-dump.txt
ls -la >> /sdcard/ad2sdx-dump.txt
echo "" >> /sdcard/ad2sdx-dump.txt
echo "" >> /sdcard/ad2sdx-dump.txt
echo "Dumping File List on /system files..."
cd /system
echo "LIST /system" >> /sdcard/ad2sdx-dump.txt
echo "============" >> /sdcard/ad2sdx-dump.txt
ls -la >> /sdcard/ad2sdx-dump.txt
echo "" >> /sdcard/ad2sdx-dump.txt
echo "" >> /sdcard/ad2sdx-dump.txt
echo "Dumping File List on /system/etc/init.d files..."
cd /system/etc/init.d
echo "LIST init.d" >> /sdcard/ad2sdx-dump.txt
echo "===========" >> /sdcard/ad2sdx-dump.txt
ls -la >> /sdcard/ad2sdx-dump.txt
echo "" >> /sdcard/ad2sdx-dump.txt
echo "" >> /sdcard/ad2sdx-dump.txt
echo ""
echo "Finished... Thanks..."
HOW TO DUMP?
You should use adb, or Script Manager as root
Copy ad2sdx-dumpinfo.sh into your /sdcard/
(for ADB): Run "sh ad2sdx-dumpinfo.sh" in adb shell
Copy "/sdcard/ad2sdx-dump.txt" from your phone to your pc ( If you not trust me, you can review it before you send it to me )
Post comments + content of "/sdcard/ad2sdx-dump.txt" in this thread "use CODE or attachment"
COPY FILES WITH ADB
From PC to Phone
Code:
adb push c:\ad2sdx-dumpinfo.sh /sdcard/
From Phone to PC
Code:
adb pull /sdcard/ad2sdx-dump.txt c:\ad2sdx-dump.txt
SHELL
Code:
adb shell
* You are more advance than me about it ...
WARNING!!!
This script WILL dump an Informations About your Storages,
If you allow me to know your filesystem structures,
maybe I can help to improve AD2SDX Compatibility...
This script WILL NOT dump any PHONE NUMBER, IMEI, DEVICE NAME
SERIAL NUMBER and ANY PERSONAL INFORMATIONS...
USE IT YOUR OWN RISK!!!
But Please provide me your Device Name and ROM when you
submit it on AD2SDX Thread...
EXAMPLE DUMP FILE
Code:
DF
==
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 206664 64 206600 0% /dev
tmpfs 206664 0 206664 0% /mnt/asec
tmpfs 206664 4 206660 0% /mnt/asec/download
tmpfs 206664 0 206664 0% /mnt/obb
tmpfs 8192 0 8192 0% /app-cache
/dev/block/mtdblock3 148480 124428 24052 84% /system
/dev/block/mtdblock5 294528 152336 142192 52% /sd-ext
/dev/block/mtdblock4 5120 1228 3892 24% /cache
/dev/block/mmcblk0p2 1968876 547236 1321624 29% /data
/dev/block/vold/179:1
13656560 4473152 9183408 33% /mnt/sdcard
/dev/block/vold/179:1
13656560 4473152 9183408 33% /mnt/secure/asec
LIST /data
==========
drwxrwx--x 13 1000 1000 4096 Oct 20 15:16 .
drwxr-xr-x 16 0 0 0 Oct 20 15:16 ..
-rwxrwxrwx 1 0 0 1069 Oct 20 08:17 99SuperCharger.sh
lrwxrwxrwx 1 0 0 13 Oct 20 07:49 DxDrm -> /sd-ext/DxDrm
-rw-rw-rw- 1 0 0 14 Oct 20 08:17 SuperChargerAdj
-rw-rw-rw- 1 0 0 34 Oct 20 08:17 SuperChargerMinfree
-rw-rw-rw- 1 0 0 4 Oct 20 08:17 SuperChargerOptions
drwxrwxr-x 2 1000 1000 4096 Oct 20 13:32 anr
drwxrwx--x 2 1000 1000 4096 Oct 20 08:05 app
drwxrwx--x 2 1000 1000 4096 Oct 20 07:50 app-private
drwxr-xr-x 2 0 0 12288 Oct 20 08:20 app_s
drwx------ 5 1000 1000 4096 Oct 20 15:52 backup
lrwxrwxrwx 1 0 0 9 Oct 20 07:49 d -> /sd-ext/d
lrwxrwxrwx 1 0 0 20 Oct 20 07:49 dalvik-cache -> /sd-ext/dalvik-cache
drwxrwx--x 59 1000 1000 12288 Oct 20 08:22 data
lrwxrwxrwx 1 0 0 14 Oct 20 08:07 data_s -> /sd-ext/data_s
lrwxrwxrwx 1 0 0 17 Oct 20 07:49 dontpanic -> /sd-ext/dontpanic
drwxr-xr-x 2 0 0 4096 Oct 20 07:40 framework_s
lrwxrwxrwx 1 0 0 13 Oct 20 07:49 hosts -> /sd-ext/hosts
lrwxrwxrwx 1 0 0 13 Oct 20 07:49 htcfs -> /sd-ext/htcfs
drwxr-xr-x 2 0 0 4096 Oct 20 07:40 lib_s
lrwxrwxrwx 1 0 0 13 Oct 20 07:49 local -> /sd-ext/local
drwxr-xr-x 2 0 0 16384 Oct 20 07:49 lost+found
lrwxrwxrwx 1 0 0 12 Oct 20 07:49 misc -> /sd-ext/misc
lrwxrwxrwx 1 0 0 16 Oct 20 07:49 property -> /sd-ext/property
drwx------ 3 1000 1000 4096 Oct 20 07:50 secure
drwxrwxr-x 9 1000 1000 4096 Oct 21 01:00 system
-rw-r--r-- 1 0 0 3107 Oct 20 15:16 zipalign.log
LIST /sd-ext
============
drwxrwx--x 1 1000 1000 2048 Oct 20 07:38 .
drwxr-xr-x 16 0 0 0 Oct 20 15:16 ..
lrwxrwxrwx 1 0 0 23 Oct 20 08:22 99SuperCharger.sh -> /data/99SuperCharger.sh
dr-xr-xr-x 1 0 0 2048 Oct 20 07:49 DxDrm
lrwxrwxrwx 1 0 0 21 Oct 20 08:22 SuperChargerAdj -> /data/SuperChargerAdj
lrwxrwxrwx 1 0 0 25 Oct 20 08:22 SuperChargerMinfree -> /data/SuperChargerMinfree
lrwxrwxrwx 1 0 0 25 Oct 20 08:22 SuperChargerOptions -> /data/SuperChargerOptions
lrwxrwxrwx 1 0 0 9 Oct 20 08:07 anr -> /data/anr
lrwxrwxrwx 1 0 0 9 Oct 20 07:49 app -> /data/app
lrwxrwxrwx 1 0 0 17 Oct 20 07:49 app-private -> /data/app-private
lrwxrwxrwx 1 0 0 11 Oct 20 07:49 app_s -> /data/app_s
lrwxrwxrwx 1 0 0 12 Oct 20 08:07 backup -> /data/backup
drwxr-xr-x 16 0 0 0 Jan 1 1970 d
drwxrwx--x 1 1000 1000 2048 Oct 20 07:49 dalvik-cache
lrwxrwxrwx 1 0 0 10 Oct 20 07:49 data -> /data/data
drwxrwxrwx 1 0 0 2048 Oct 20 07:49 data_s
drwxr-x--- 1 0 1007 2048 Oct 20 07:49 dontpanic
lrwxrwxrwx 1 0 0 11 Oct 20 07:49 drm -> /data/local
lrwxrwxrwx 1 0 0 17 Oct 20 07:49 framework_s -> /data/framework_s
-rw-r--r-- 1 0 0 708302 Aug 1 2008 hosts
drwxr-xr-x 16 0 0 0 Oct 20 15:16 htcfs
lrwxrwxrwx 1 0 0 11 Oct 20 07:49 lib_s -> /data/lib_s
drwxrwx--x 1 2000 2000 2048 Oct 20 07:49 local
drwxrwx--- 1 0 0 2048 Oct 20 07:49 lost+found
drwxrwx--t 1 1000 9998 2048 Oct 20 15:16 misc
drwx------ 1 0 0 2048 Oct 20 21:54 property
lrwxrwxrwx 1 0 0 12 Oct 20 08:07 secure -> /data/secure
lrwxrwxrwx 1 0 0 12 Oct 20 08:07 system -> /data/system
lrwxrwxrwx 1 0 0 18 Oct 20 08:07 zipalign.log -> /data/zipalign.log
LIST /system
============
drwxr-xr-x 1 0 0 2048 Oct 20 07:41 .
drwxr-xr-x 16 0 0 0 Oct 20 15:16 ..
lrwxrwxrwx 1 0 0 13 Oct 20 07:41 app -> /sd-ext/app_s
drwxr-xr-x 1 0 2000 2048 Oct 20 07:41 bin
-rw-r--r-- 1 0 0 7966 Oct 20 08:17 build.prop
-rw-r--r-- 1 0 0 7437 Oct 20 08:17 build.prop.unsuper
drwxr-xr-x 1 0 0 2048 Oct 20 07:40 customize
drwxr-xr-x 1 0 0 2048 Oct 20 07:41 etc
drwxr-xr-x 1 0 0 2048 Oct 20 07:40 fonts
lrwxrwxrwx 1 0 0 19 Oct 20 07:41 framework -> /sd-ext/framework_s
drwxr-xr-x 1 0 0 2048 Oct 20 07:47 lib
drwxr-xr-x 1 0 0 2048 Oct 20 07:40 lost+found
drwxr-xr-x 1 0 0 2048 Oct 20 07:41 media
drwxr-xr-x 1 0 0 2048 Oct 20 07:41 usr
drwxr-xr-x 1 0 2000 2048 Oct 20 07:41 xbin
LIST init.d
===========
drwxr-xr-x 1 0 2000 2048 Oct 20 07:47 .
drwxr-xr-x 1 0 0 2048 Oct 20 07:41 ..
-rwxr-xr-x 1 0 0 446 Oct 20 13:36 00aroc
-rwxr-xr-x 1 0 2000 1167 Aug 1 2008 02ramtweaks
-rwxrwxrwx 1 0 0 4151 Oct 20 07:47 40a2sd
-rwxr-xr-x 1 0 2000 1938 Aug 1 2008 77tweaks
-rwxr-xr-x 1 0 2000 1499 Aug 1 2008 97zipalign
-rwxrwxrwx 1 0 0 1097 Oct 20 08:17 99SuperCharger
-rwxr-xr-x 1 0 2000 176 Aug 1 2008 99complete
Great!!!
Working with Leo on HyperDroid-CM7-v5.3.0.
But weired behavior: Titanium Backup crashes after every app installation immediately.
Edit: After third reboot Titanium doesn't crash any more!
This script runs like hell....wow!
---------- Post added at 07:27 PM ---------- Previous post was at 06:36 PM ----------
Strange...Titanium only crashes if I try to install apps+data...but not if I only install apps.
Waiting to install, want to see a few more guinea pigs first
It mount only ext4 partition?...
Can you add support for ext2 or ext3 partitions?
Ok, I evaluate first on my sga with xm7.1
Nice to see you again amarullz.
EXT3,2 ??
You can edit this line:
Code:
busybox mount -t ext4 -o noauto_da_alloc,data=ordered,commit=15,barrier=1,nouser_xattr,errors=continue,noatime,nodiratime,nosuid,nodev /dev/block/mmcblk0p2 /data;
busybox chown 1000:1000 /data;
busybox chmod 771 /data;
icke said:
Great!!!
Working with Leo on HyperDroid-CM7-v5.3.0.
But weired behavior: Titanium Backup crashes after every app installation immediately.
Edit: After third reboot Titanium doesn't crash any more!
This script runs like hell....wow!
---------- Post added at 07:27 PM ---------- Previous post was at 06:36 PM ----------
Strange...Titanium only crashes if I try to install apps+data...but not if I only install apps.
Click to expand...
Click to collapse
Ok, I will try, and look what Titanium Backup Do (may be the error occur when it remove/change com.android* or com.htc* data files)...
-- TIPS --
May Be try this: If you want to restore system applications data (com.android* & com.htc*), Do that in the first boot (clean flash), so the com.android* & com.htc* still in sdcard (not symlinked), after you reboot it, the mod will automatically move it to Internal Memory...
cause me bootloops
jukalo said:
cause me bootloops
Click to expand...
Click to collapse
What ROM & Device?... make sure you do the clean flash, then delete a2sd first
I am using a sense froyo rom 2.38 with kernel infinity on my device and I did a clean flash my device is wildfire even replace the ext4 to ext3 as you be explained in a above post and still the same problem
Hi Amarullz
To my understanding this is simply exchange the sd-ext becomes data partition and data partition now becomes sd-ext.
The script will move all sd-ext contents to data partition and data partition contents will mve to sd-ext. This will limit the size of sd-ext contents (not the size of sd-ext) max at data partition size. When the size of sd-ext contents is more than data partition size, the phone will not boot pass the splash screen or maybe bootloop.
Is there anyway we can mod the script to move only specific folders on sd-ext to data partition ? For example I have app_s, lib_s, frameworks_s and font_s but I want to move only app_s & lib_s to data partition and leave the rest on the sd-ext. I am totally a noob when it comes to scripting.
ckpv5 said:
Hi Amarullz
To my understanding this is simply exchange the sd-ext becomes data partition and data partition now becomes sd-ext.
The script will move all sd-ext contents to data partition and data partition contents will mve to sd-ext. This will limit the size of sd-ext contents (not the size of sd-ext) max at data partition size. When the size of sd-ext contents is more than data partition size, the phone will not boot pass the splash screen or maybe bootloop.
Is there anyway we can mod the script to move only specific folders on sd-ext to data partition ? For example I have app_s, lib_s, frameworks_s and font_s but I want to move only app_s & lib_s to data partition and leave the rest on the sd-ext. I am totally a noob when it comes to scripting.
Click to expand...
Click to collapse
No, I don't move all sd-ext data into /data partition. Actually:
1. Move "mount point" of /data to /sd-ext
2. Mount mmcblk0p2 (commonly mounted on /sd-ext) to /data
All Data remain on mmcblk0p2 but symlinked to /sd-ext for app2sd compatibility except for com.android*, com.htc* and dalvik-cache.
But I know it may not work on all device/rom yet ( still need to fix compatibility ), because something like this maybe happened:
My Script blacklisted "app, app_s, lib_s, app-private, data" in Internal Storage (will move it into mmcblk0p2), If ROM used another directory name, example for app_s is .systemapp, system won't boot, because /system/app symlinked to /sd-ext/.systemapp and there is no /sd-ext/.systemapp because the /sd-ext was originally (/data) [ /system/app should be pointed to /data/.systemapp or /sd-ext/.systemapp pointed to /data/.systemapp ] - Understand what I mean? .
This area on script will strict the "app, app_s, lib_s, app-private, data" into mmcblk0p2 ( in original data only symlink )
Code:
###
# app, app_s, lib_s, app-private, data : should in /data (mmcblk0p2)
###
for i in app app_s lib_s app-private data;
do
#-- If Symlink in /data, delete it
if [ -h /data/$i ]
then
busybox rm /data/$i;
fi;
#-- If Directory Exists in /sd-ext, move it to /data
if [ -d /sd-ext/$i ]
then
busybox mv /sd-ext/$i /data/;
fi;
#-- If Directory Not Extst in /data, create it
if [ ! -d /data/$i ]
then
busybox mkdir /data/$i;
#-- Just Open All Permissions ;)
busybox chmod 0777 /data/$i;
fi;
#-- Now Create Symlink From /sd-ext to /data
if [ ! -h /sd-ext/$i ]
then
busybox ln -s /data/$i /sd-ext/$i;
fi;
done;
And this area will strict "dalvik-cache" in Internal Memory
Code:
for i in dalvik-cache;
do
#-- If Symlink in /data, delete it
if [ -h /sd-ext/$i ]
then
busybox rm /sd-ext/$i;
fi;
#-- If Directory Exists in /sd-ext, move it to /data
if [ -d /data/$i ]
then
busybox mv /data/$i /sd-ext/;
fi;
#-- If Directory Not Extst in /data, create it
if [ ! -d /sd-ext/$i ]
then
busybox mkdir /sd-ext/$i;
#-- Just Open All Permissions ;)
busybox chmod 0777 /sd-ext/$i;
fi;
#-- Now Create Symlink From /sd-ext to /data
if [ ! -h /data/$i ]
then
busybox ln -s /sd-ext/$i /data/$i;
fi;
done;
You can modify this line for your needs:
for i in app app_s lib_s app-private data;
for i in dalvik-cache;
UPDATE ALPHA 02, WITH Compatibility Fix, Add strict framework_s into mmcblk0p2, + dot files fix (.systemapp)
492 free space on internal memory!
I tried this mod on RunnyMede V3 (with coolexes move dalvik to sd script) on a working system (didn't install from scratch) and it works.
Some "problems" I noticed:
- After restart had to resync everything, from contacts, Calendar to fb shortcuts in contacts
- All htc widgets on homescreens were gone (inclusive clock)
- the biggest one: there are no more shortcuts on lockscreen. Try to get them back from personalisation menu, no chance!
I think it should be tried with fresh install. Maybe if I'll find the time I'll try it.
Anyway. Thanks for the script and keep up the work!
flash it from recovery!!!!
Amarullz plz could you make it to flash it from recovery??? PLz it will be gourgeos!!!
Klewe said:
492 free space on internal memory!
I tried this mod on RunnyMede V3 (with coolexes move dalvik to sd script) on a working system (didn't install from scratch) and it works.
Some "problems" I noticed:
- After restart had to resync everything, from contacts, Calendar to fb shortcuts in contacts
- All htc widgets on homescreens were gone (inclusive clock)
- the biggest one: there are no more shortcuts on lockscreen. Try to get them back from personalisation menu, no chance!
I think it should be tried with fresh install. Maybe if I'll find the time I'll try it.
Anyway. Thanks for the script and keep up the work!
Click to expand...
Click to collapse
Try clean flash, I not test it on already running system yet.
About zip install on recovery... I will learn it first... cause I am newbie in Android
751 mb free space internal memory!!
On Blissy mod007 Rom fresh install with stock hboot i have 123 mb internal memory, then with root explorer i erase 40a2sd from system/etc/init.d and i copy you`re 40a2sdx and reboot.After reboot i have 751 mb free space on internal memory, but no icons on lockscreen and no widgets at all!!!
Appreciate a lot you`re work man!!!TNX a lot!!
blissmod007 v03--->774mb internal storage
I used to use data2w..
But i will give it a shot..
Sent from my HTC Desire using xda premium
SD-EXT Mod - AMARULLZ DATA TO SD-EXT
SD-EXT Mod - AMARULLZ DATA TO SD-EXT
from recovery
tested on BlissMod007_v03_a-STOCK
install rom and without rebooting install script
!!!WARNING!!!
INSTALL IT ON YOUR OWN RISK.
Hey,
this is a very nice and good script..much faster as data2ext with sense 3.5 roms..
i have only one problem..i get a wifi error with this script..(tried on 2 different roms...also the same if i change the file in rom.zip and flash it)
Maybe you have a tip for me..?!? (because its strange..not get this error with data2ext or a2sd)
otherwise really good work
with kind regards...Alex
Related
I've been receiving frequent "cleaning memory (low memory)" warnings recently.
I'm on a rooted RC33 and I have all my caches and my apps (both app and app-private) moved to my sdcard and that partition has TONS of space.
I do have a lot of apps installed, but most are not constantly running background-type apps/services.
What can I do to resolve this? I am happy to post the output of various diagnostic things if anyone has suggestions.
Thanks
moving apps to flash won't have any effect low mem has to do with low ram not flash.
do u have dxtop installed? the latest ver stays in memory which means less mem for other apps
Have you installed aHome? I noticed the low memory warning too for the first time last night. I think the only thing new I installed was aHome.
I also have dxTop and found this in the release notes. Maybe this is what caused the msg to pop up.
"More memory released when the phone gets low on memory."
wimbet said:
Have you installed aHome? I noticed the low memory warning too for the first time last night. I think the only thing new I installed was aHome.
Click to expand...
Click to collapse
I do, but I decided not to use it as it was really slow. It is still installed, but it never comes up (shouldn't even run) as I set dxTop to my default home app.
wimbet said:
I also have dxTop and found this in the release notes. Maybe this is what caused the msg to pop up.
"More memory released when the phone gets low on memory."
Click to expand...
Click to collapse
Interesting. Maybe my phone was running low on memory all along and it is just that now dxTop is report it to me visually
if you have dxTop go to the setting of dxTop > menu >> dxTop uncheck what it says disabel persistance.
it eats all ur memory.. uncheckign that will run a lil slower when returnign to home but will have more memory for other apps
Nitro212 said:
if you have dxTop go to the setting of dxTop > menu >> dxTop uncheck what it says disabel persistance.
it eats all ur memory.. uncheckign that will run a lil slower when returnign to home but will have more memory for other apps
Click to expand...
Click to collapse
Oh, ok, I'll try that. Thanks.
I'm also getting the "low space" icon, which makes no sense because I have tons of space (all apps/caches moved to sdcard).
Code:
# busybox df -h
busybox df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 48.4M 0 48.4M 0% /dev
tmpfs 4.0M 0 4.0M 0% /sqlite_stmt_journals
/dev/block/mtdblock3 67.5M 67.2M 284.0K 100% /system
/dev/block/loop0 1.5M 1.5M 0 100% /system/modules
/dev/block/loop1 3.1M 3.1M 0 100% /system/xbin
/dev/mmcblk0p2 1.0G 89.2M 887.8M 9% /system/sd
/dev/block/mtdblock5 74.8M 67.3M 7.5M 90% /data
/dev/block/mtdblock4 67.5M 2.7M 64.8M 4% /cache
/dev/block/mmcblk0p1 6.4G 4.8G 1.6G 75% /sdcard
#
what conditions trigger the "low on space" indicator?
<moving this specific question to a new thread (http://forum.xda-developers.com/showthread.php?p=3450296#post3450296) as it is somewhat unrelated>
xDtop claims they fixed it in the latest version. Don't see the message anymore.
Low memory means low RAM, not low flash or storage space. Completely different things.
mlevin said:
Oh, ok, I'll try that. Thanks.
I'm also getting the "low space" icon, which makes no sense because I have tons of space (all apps/caches moved to sdcard).
Code:
# busybox df -h
busybox df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 48.4M 0 48.4M 0% /dev
tmpfs 4.0M 0 4.0M 0% /sqlite_stmt_journals
/dev/block/mtdblock3 67.5M 67.2M 284.0K 100% /system
/dev/block/loop0 1.5M 1.5M 0 100% /system/modules
/dev/block/loop1 3.1M 3.1M 0 100% /system/xbin
/dev/mmcblk0p2 1.0G 89.2M 887.8M 9% /system/sd
/dev/block/mtdblock5 74.8M 67.3M 7.5M 90% /data
/dev/block/mtdblock4 67.5M 2.7M 64.8M 4% /cache
/dev/block/mmcblk0p1 6.4G 4.8G 1.6G 75% /sdcard
#
Click to expand...
Click to collapse
idk, it seems that the two users that showed their df -h command output have an awful lot of data being used, many of my apps run all the time and i am only using 19% rather than the 90 and 91 in the previous posts. i have dxtop installed and have had it for a while and have NEVER gotten this problem.
what *specific* conditions trigger the "low on space" indicator?
I'm confused. I have my apps and caches moved to my sdcard but I am still getting the "low on space" indicator. Which directories/filesystems are causing it to think it is low on space? Can anyone explain why it would say I am low on space under these circumstances?
This is how my device looks at the moment (and I am currently getting the "low on space" indicator):
Code:
# busybox df -h
busybox df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 48.4M 0 48.4M 0% /dev
tmpfs 4.0M 0 4.0M 0% /sqlite_stmt_journals
/dev/block/mtdblock3 67.5M 67.2M 284.0K 100% /system
/dev/block/loop0 1.5M 1.5M 0 100% /system/modules
/dev/block/loop1 3.1M 3.1M 0 100% /system/xbin
/dev/mmcblk0p2 1.0G 100.8M 876.2M 10% /system/sd
/dev/block/mtdblock5 74.8M 68.0M 6.8M 91% /data
/dev/block/mtdblock4 67.5M 2.7M 64.8M 4% /cache
/dev/block/mmcblk0p1 6.4G 4.8G 1.6G 75% /sdcard
#
The only one that seems a bit high is /data.
On there, I have:
Code:
# ls -l /data
ls -l /data
drwxrwxrwx 1 1000 1000 2048 Feb 6 23:10 anr
lrwxrwxrwx 1 0 0 14 Feb 7 05:38 app -> /system/sd/app
lrwxrwxrwx 1 0 0 22 Mar 2 22:24 app-private -> /system/sd/app-private
drwxrwx--x 1 1000 1000 2048 Feb 6 23:10 app-private.ORIGINAL
drwxrwx--x 1 1000 1000 2048 Mar 2 21:08 app.ORIGINAL
drwxrwx--x 1 1000 1000 2048 Feb 6 23:10 dalvik-cache
drwxrwx--x 1 1000 1000 2048 Feb 6 23:10 data
drwxrwx--x 1 2000 2000 2048 Feb 6 23:10 local
drwxrwx--- 1 0 0 2048 Feb 6 23:10 lost+found
drwxrwx--t 1 1000 9998 2048 Feb 6 23:10 misc
drwx------ 1 0 0 2048 Feb 6 23:10 property
drwxrwxr-x 1 1000 1000 2048 Feb 6 23:10 system
drwxr-xr-x 1 1000 1000 2048 Feb 11 13:32 tombstones
#
Code:
# busybox du -h -c /data | grep -v '/data/data/'
busybox du -h -c /data | grep -v '/data/data/'
2.0K /data/app.ORIGINAL
2.0K /data/tombstones
15.0K /data/system/location
691.5K /data/system
57.5K /data/anr
35.0M /data/dalvik-cache
4.0K /data/property
2.0K /data/app-private.ORIGINAL
28.6M /data/data
2.0K /data/local/tmp
4.0K /data/local
2.5K /data/misc/dhcp
8.0K /data/misc/wifi/sockets
10.5K /data/misc/wifi
6.0K /data/misc/hcid/00:17:E8:EA:E9:FF
8.0K /data/misc/hcid
31.5K /data/misc
2.0K /data/lost+found
64.4M /data
64.4M total
#
Does anything look amiss?
I'm on a rooted RC33 w/ JF1.41.
Thanks
Hmmm...
9.6M /data/data
3.5K /data/property
72.0K /data/anr
2.0K /data/lost+found
35.6M /data
35.6M total
I'm not sure... but this was my results. I have apps to sd too.
Hmm... I wonder if /data/data could/should be moved/symlinked as well...?
EDIT: Yeah, that seemed to help. The low space warning went away.
try moving dalvik-cache to free some space of the data thats what i did
Code:
# busybox du -h -c /data | grep -v '/data/data/'
busybox du -h -c /data | grep -v '/data/data/'
3.5K /data/property
4.3M /data/data
7.5K /data/local/bin
2.0K /data/local/mnt
1.2M /data/local/tmp
1.2M /data/local
2.0K /data/misc/wifi/sockets
4.5K /data/misc/wifi
2.0K /data/misc/hcid
2.5K /data/misc/dhcp
17.0K /data/misc
42.0K /data/anr
2.0K /data/lost+found
283.5K /data/system
2.0K /data/lost+found
5.8M /data
5.8M total
that folder grows pretty big.. now, im not sure if we are allow to move it to the sd? i moved mine.. have not gotten any problems errors yet.. but try movign it to your ext2 partition
Code:
busybox cp -a /data/dalvik-cache /system/sd/dalvik-cache
rm -rf /data/dalvik-cache
ln -s /system/sd/dalvik-cache /data/dalvik-cache
reboot
edit: wops did not read ur last post, wjhere u moved the whole data folder
this posting will be merged with your OLDER postings about the same thing.
Anymore X-posting or multiple thread openings about the same issue will be resulted to a closure of each thread and/or up to a temp ban.
Nitro212 said:
try moving dalvik-cache to free some space of the data thats what i did
Click to expand...
Click to collapse
Thanks for the tip -- I just did that (moved davlik-cache) and that seemed to help as well. I hope I'm all set for now.
Note to moderator: apologies for the violation of protocol. It won't happen again.
NOTE:
1. Must have a rooted phone
2. Must have two partitions on the sd card (fat32 for everything, and ext2 for "expanding" the phone's memory).
3. Must have Android SDK installed (so that adb will work)
Ok.. So I got sick of all the commands running back and forth. I found that I'm wiping my phone several times testing out new things and didn't want to continuously put in all these commands to get the apps to sd thing to work.
Therefore, I created a file to automatically do it for me!!! I just run this file with the usb connected to the phone, and let it run all the commands.
I've attached a file "tmp.zip". Download this file and extract it to your c:
The folder it extracts NEEDS to be at c:/tmp
After extracting, navigate to the folder and double click on "appsToSD1.bat". Follow the instructions and you'll be on your way.
I hope this helps!!!!
egyptianbman said:
NOTE:
1. Must have a rooted phone
2. Must have two partitions on the sd card (fat32 for everything, and ext2 for "expanding" the phone's memory).
3. Must have Android SDK installed (so that adb will work)
Ok.. So I got sick of all the commands running back and forth. I found that I'm wiping my phone several times testing out new things and didn't want to continuously put in all these commands to get the apps to sd thing to work.
Therefore, I created a file to automatically do it for me!!! I just run this file with the usb connected to the phone, and let it run all the commands.
I've attached a file "tmp.zip". Download this file and extract it to your c:
The folder it extracts NEEDS to be at c:/tmp
After extracting, navigate to the folder and double click on "appsToSD1.bat". Follow the instructions and you'll be on your way.
I hope this helps!!!!
Click to expand...
Click to collapse
EXCELLENT!!! I have already set my apps to sd... but I always welcome alternatives. Good work. I can't wait to try it out some time.
Thanks!
looking at the bat, it looks just like the commands from that other thread. Any1 game to try and share if it it works =]?
Nice, I might finally try this when I get home today...
Anyone try this out yet?
Just tried it
Failure, after last reboot i am stuck at the flashing android loader.
I did verify i was all the stuff the bat file said to look for
# busybox df -h
busybox df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 48.4M 0 48.4M 0% /dev
tmpfs 4.0M 0 4.0M 0% /sqlite_stmt_journals
/dev/block/mtdblock3 67.5M 67.1M 456.0K 99% /system
/dev/block/loop0 1.5M 1.5M 0 100% /system/modules
/dev/block/loop1 3.1M 3.1M 0 100% /system/xbin
/dev/block/mtdblock5 74.8M 20.9M 53.8M 28% /data
/dev/block/mtdblock4 67.5M 1.1M 66.4M 2% /cache
/dev/block/mmcblk0p1 978.6M 4.0K 978.6M 0% /sdcard
is my card partitioned I did it through paragon, but It only shows the one partition here what am I doing wrong its a 2 gig card, Ill try if I can get my damn card partioned lol.
Thanks it worked for me.... ...but Im not sure if ext2 patitioon should be primary
http://forum.xda-developers.com/showthread.php?p=3483058#post3483058
...I made it primary and it worked...
$ df
/dev: 49520K total, 0K used, 49520K available (block size 4096)
/sqlite_stmt_journals: 4096K total, 0K used, 4096K available (block size 4096)
/system: 69120K total, 66180K used, 2940K available (block size 4096)
/system/modules: 1532K total, 1532K used, 0K available (block size 4096)
/system/xbin: 3172K total, 3172K used, 0K available (block size 4096)
/system/sd: 1033712K total, 5116K used, 1028596K available (block size 4096)
/data: 76544K total, 21760K used, 54784K available (block size 4096)
/cache: 69120K total, 1160K used, 67960K available (block size 4096)
/sdcard: 6172916K total, 588568K used, 5584348K available (block size 4096)
sdcard - 6GB
sd - 1GB
$ mount
rootfs on / type rootfs (ro)
tmpfs on /dev type tmpfs (rw,mode=755)
devpts on /dev/pts type devpts (rw,mode=600)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /sqlite_stmt_journals type tmpfs (rw,size=4096k)
/dev/block/mtdblock3 on /system type yaffs2 (ro)
/dev/block/loop0 on /system/modules type cramfs (ro)
/dev/block/loop1 on /system/xbin type cramfs (ro)
/dev/mmcblk0p2 on /system/sd type ext2 (rw,noatime,nodiratime,errors=continue)
/dev/block/mtdblock5 on /data type yaffs2 (rw,nosuid,nodev)
/dev/block/mtdblock4 on /cache type yaffs2 (rw,nosuid,nodev)
/dev/block/mmcblk0p1 on /sdcard type vfat (rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1000,fmask=0711,dmask=0700,codepage=cp437,iocharset=iso8859-1,utf8)
$ cd /data
$ ls -al
ls: can't open '.': Permission denied
$ su
# ls -al
drwxrwx--x 1 1000 1000 2048 Oct 5 07:41 .
drwxr-xr-x 12 0 0 0 Mar 18 17:31 ..
drwxrwxrwx 1 1000 1000 2048 Oct 5 07:41 anr
lrwxrwxrwx 1 0 0 14 Mar 18 17:30 app -> /system/sd/app
lrwxrwxrwx 1 0 0 22 Mar 18 17:30 app-private -> /system/sd/app-private
drwxrwx--x 1 1000 1000 2048 Oct 5 07:41 dalvik-cache
drwxrwx--x 1 1000 1000 2048 Oct 5 07:41 data
drwxrwx--x 1 2000 2000 2048 Oct 5 07:41 local
drwxrwx--- 1 0 0 2048 Oct 5 07:41 lost+found
drwxrwx--t 1 1000 9998 2048 Oct 5 07:41 misc
drwx------ 1 0 0 2048 Oct 5 07:41 property
drwxrwxr-x 1 1000 1000 2048 Oct 5 07:41 system
drwxr-xr-x 1 1000 1000 2048 Mar 15 12:15 tombstones
#
russenreaktor said:
Thanks it worked for me.... ...but Im not sure if ext2 patitioon should be primary
http://forum.xda-developers.com/showthread.php?p=3483058#post3483058
...I made it primary and it worked...
$ df
/dev: 49520K total, 0K used, 49520K available (block size 4096)
/sqlite_stmt_journals: 4096K total, 0K used, 4096K available (block size 4096)
/system: 69120K total, 66180K used, 2940K available (block size 4096)
/system/modules: 1532K total, 1532K used, 0K available (block size 4096)
/system/xbin: 3172K total, 3172K used, 0K available (block size 4096)
/system/sd: 1033712K total, 5116K used, 1028596K available (block size 4096)
/data: 76544K total, 21760K used, 54784K available (block size 4096)
/cache: 69120K total, 1160K used, 67960K available (block size 4096)
/sdcard: 6172916K total, 588568K used, 5584348K available (block size 4096)
sdcard - 6GB
sd - 1GB
$ mount
rootfs on / type rootfs (ro)
tmpfs on /dev type tmpfs (rw,mode=755)
devpts on /dev/pts type devpts (rw,mode=600)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /sqlite_stmt_journals type tmpfs (rw,size=4096k)
/dev/block/mtdblock3 on /system type yaffs2 (ro)
/dev/block/loop0 on /system/modules type cramfs (ro)
/dev/block/loop1 on /system/xbin type cramfs (ro)
/dev/mmcblk0p2 on /system/sd type ext2 (rw,noatime,nodiratime,errors=continue)
/dev/block/mtdblock5 on /data type yaffs2 (rw,nosuid,nodev)
/dev/block/mtdblock4 on /cache type yaffs2 (rw,nosuid,nodev)
/dev/block/mmcblk0p1 on /sdcard type vfat (rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1000,fmask=0711,dmask=0700,codepage=cp437,iocharset=iso8859-1,utf8)
$ cd /data
$ ls -al
ls: can't open '.': Permission denied
$ su
# ls -al
drwxrwx--x 1 1000 1000 2048 Oct 5 07:41 .
drwxr-xr-x 12 0 0 0 Mar 18 17:31 ..
drwxrwxrwx 1 1000 1000 2048 Oct 5 07:41 anr
lrwxrwxrwx 1 0 0 14 Mar 18 17:30 app -> /system/sd/app
lrwxrwxrwx 1 0 0 22 Mar 18 17:30 app-private -> /system/sd/app-private
drwxrwx--x 1 1000 1000 2048 Oct 5 07:41 dalvik-cache
drwxrwx--x 1 1000 1000 2048 Oct 5 07:41 data
drwxrwx--x 1 2000 2000 2048 Oct 5 07:41 local
drwxrwx--- 1 0 0 2048 Oct 5 07:41 lost+found
drwxrwx--t 1 1000 9998 2048 Oct 5 07:41 misc
drwx------ 1 0 0 2048 Oct 5 07:41 property
drwxrwxr-x 1 1000 1000 2048 Oct 5 07:41 system
drwxr-xr-x 1 1000 1000 2048 Mar 15 12:15 tombstones
#
Click to expand...
Click to collapse
Ive been struggling with this for three days, using paragon how exactly do you partition a card it says mines has been partitioned and showes the ext2 and the fat32 both as being primary but It wont show on busybox as my previous post above states, from there how do I go on to complete apps on sd card, it just aint working for me Im getting frustrated
Joeriginal said:
Ive been struggling with this for three days, using paragon how exactly do you partition a card it says mines has been partitioned and showes the ext2 and the fat32 both as being primary but It wont show on busybox as my previous post above states, from there how do I go on to complete apps on sd card, it just aint working for me Im getting frustrated
Click to expand...
Click to collapse
Since ext2 is a linux partition I would use a Live Ubunut CD to partition the card. This is the safest bet.
androidmonkey said:
Since ext2 is a linux partition I would use a Live Ubunut CD to partition the card. This is the safest bet.
Click to expand...
Click to collapse
I have read how people do it through paragon Id rather not download a 700mb file just to format my card, but thanks for the suggestion.
Joeriginal said:
I have read how people do it through paragon Id rather not download a 700mb file just to format my card, but thanks for the suggestion.
Click to expand...
Click to collapse
If you have a good net connection it will download in 10-15 minutes. Worth the time knowing that method works
Also, having a Live CD is a good troubleshooting tool for future issues.
androidmonkey said:
If you have a good net connection it will download in 10-15 minutes. Worth the time knowing that method works
Also, having a Live CD is a good troubleshooting tool for future issues.
Click to expand...
Click to collapse
Im at work on a dialup network if I start downloading I should finish by dinner time.....Friday.
Joeriginal said:
Im at work on a dialup network if I start downloading I should finish by dinner time.....Friday.
Click to expand...
Click to collapse
ah, i see.
Well there are many small linux distros. Puppy Linux is one, only 98MB
http://www.puppylinux.org/
androidmonkey said:
If you have a good net connection it will download in 10-15 minutes. Worth the time knowing that method works
Also, having a Live CD is a good troubleshooting tool for future issues.
Click to expand...
Click to collapse
Excellent points.
modem_over said:
Failure, after last reboot i am stuck at the flashing android loader.
I did verify i was all the stuff the bat file said to look for
Click to expand...
Click to collapse
More than likely because you didn't have the partitions on SD correct. READ THE NOTE FIRST!
I think you're going to have to clear the phone. You might even need to re-install an update.
Joeriginal said:
# busybox df -h
busybox df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 48.4M 0 48.4M 0% /dev
tmpfs 4.0M 0 4.0M 0% /sqlite_stmt_journals
/dev/block/mtdblock3 67.5M 67.1M 456.0K 99% /system
/dev/block/loop0 1.5M 1.5M 0 100% /system/modules
/dev/block/loop1 3.1M 3.1M 0 100% /system/xbin
/dev/block/mtdblock5 74.8M 20.9M 53.8M 28% /data
/dev/block/mtdblock4 67.5M 1.1M 66.4M 2% /cache
/dev/block/mmcblk0p1 978.6M 4.0K 978.6M 0% /sdcard
is my card partitioned I did it through paragon, but It only shows the one partition here what am I doing wrong its a 2 gig card, Ill try if I can get my damn card partioned lol.
Click to expand...
Click to collapse
Nope, I'm not seeing a "/system/sd" partition on your phone.
Don't know how easy using LiveCD Ubuntu is... but there's no way it's easier than Paragon Partitioner...
I dl'ed it, Personal Trial version.
Inserted my G1 via USB.
Create partition.
Select sd card.
Choose size.
DONE!
That's it. Voila. Sd card partitioned into 2 parts.
xdavidn88 said:
Don't know how easy using LiveCD Ubuntu is... but there's no way it's easier than Paragon Partitioner...
I dl'ed it, Personal Trial version.
Inserted my G1 via USB.
Create partition.
Select sd card.
Choose size.
DONE!
That's it. Voila. Sd card partitioned into 2 parts.
Click to expand...
Click to collapse
I ended up having to use Ubuntu. I'm not sure why, I installed Paragon on my work computer (new, running Vista x64) and it couldn't create the partitions correctly... kept on giving me some error. I think it had something to do with mounting... So I thought maybe it's because I was on an x64. Took it home to my laptop running Windows XP and had the same problem. I finally got tired of it and got Ubuntu who worked like a charm
egyptianbman said:
I finally got tired of it and got Ubuntu who worked like a charm
Click to expand...
Click to collapse
Yep, Ubuntu will work every time. Since EXT2 is a linux format, having Windows create it is a mixed bag. I tried creating windows partitions on my Mac awhile back and it was a disaster.
Hello,
I am unable to install busybox
it says that "it looks like the installation of busybox was not successful.." and asks to install in some other location.
I tried Xbin and Bin but it could not be installed properly.
All app which need root permission are working fine.
I tried to uninstall and re install ..re install using busybox installer.
Also I re-flash CM 10 beta 6 ( Format /System ) deleted xbin , bin directory and reflashed rom) but nothing works
Its confusing that even after deleting xbin, bin directory formatting /system reflashing CM10 yet busybox is not installing.
PS: Busybox was installed successfully on stock ROM it was for a brief period was installed successfully on CM 10 as well. But when I reflash my rom (due to some reason) and tried to install busybox since then I am having problems
Any help is appreciated.
Thanks!
Nikhil_android said:
Hello,
I am unable to install busybox
it says that "it looks like the installation of busybox was not successful.." and asks to install in some other location.
I tried Xbin and Bin but it could not be installed properly.
All app which need root permission are working fine.
I tried to uninstall and re install ..re install using busybox installer.
Also I re-flash CM 10 beta 6 ( Format /System ) deleted xbin , bin directory and reflashed rom) but nothing works
Its confusing that even after deleting xbin, bin directory formatting /system reflashing CM10 yet busybox is not installing.
PS: Busybox was installed successfully on stock ROM it was for a brief period was installed successfully on CM 10 as well. But when I reflash my rom (due to some reason) and tried to install busybox since then I am having problems
Any help is appreciated.
Thanks!
Click to expand...
Click to collapse
Htc? if so then: S-off?
Check the space on the /system partition.
Do you have read and write permissions for root on /system/xbin?
Deleting xbin and bin will make you unable to install busybox for sure.
What application are you using to install busybox?
Run the commands below on your phone or through adb.
Code:
su
df
chmod /system/xbin/
chown 0:0 /system/xbin/
ls -l /system
Post the output from the commands above here.
Lgrootnoob said:
Htc? if so then: S-off?
Check the space on the /system partition.
Do you have read and write permissions for root on /system/xbin?
Deleting xbin and bin will make you unable to install busybox for sure.
What application are you using to install busybox?
Run the commands below on your phone or through adb.
Code:
su
df
chmod /system/xbin/
chown 0:0 /system/xbin/
ls -l /system
Post the output from the commands above here.
Click to expand...
Click to collapse
Yes HTC - S-off rooted and running on CM10
I have tried busybox Stephen (Stericson) latest version
and when it was not getting installed I have trued busybox installer as well
while installing /system/xbin has R/W permission
I deleted files in xbin as coz I didnt know what to do .. I deleted only those files which were created by busybox and then I immediately flashed the ROM, but even after flashing (and wiping /system through cwm) those files were still there.
Here is the output:
/system/xbin mounted as R/W as usual
Code:
[email protected]:/ $ su
[email protected]:/ # df
Filesystem Size Used Free Blksize
/dev 206.4M 48K 206.4M 4096
/mnt/asec 206.4M 0K 206.4M 4096
/mnt/obb 206.4M 0K 206.4M 4096
/system 235.3M 229.6M 5.7M 4096
/cache 59M 2.3M 56.7M 4096
/data 554.1M 447.8M 106.4M 4096
/data/misc 150M 2.5M 147.5M 4096
/data/property 150M 2.5M 147.5M 4096
/data/radio 150M 2.5M 147.5M 4096
/storage/sdcard0 6.8G 4.7G 2.1G 4096
/mnt/secure/asec 6.8G 4.7G 2.1G 4096
/mnt/asec/com.startv.gumrah-1 4M 2.3M 1.7M 4096
[email protected]:/ # chmod /system/xbin/
Usage: chmod [OPTION] <MODE> <FILE>
-R, --recursive change files and directories recursively
--help display this help and exit
10|[email protected]:/ # chown 0:0 /system/xbin/
[email protected]:/ # ls -1 /system
ls: Unknown option '-1'. Aborting.
1|[email protected]:/ #
/system/xbin mounted as r/o purposely
Code:
[email protected]:/ $ su
[email protected]:/ # df
Filesystem Size Used Free Blksize
/dev 206.4M 48K 206.4M 4096
/mnt/asec 206.4M 0K 206.4M 4096
/mnt/obb 206.4M 0K 206.4M 4096
/system 235.3M 229.6M 5.7M 4096
/cache 59M 2.3M 56.7M 4096
/data 554.1M 447.5M 106.7M 4096
/data/misc 150M 2.5M 147.5M 4096
/data/property 150M 2.5M 147.5M 4096
/data/radio 150M 2.5M 147.5M 4096
/storage/sdcard0 6.8G 4.7G 2.1G 4096
/mnt/secure/asec 6.8G 4.7G 2.1G 4096
/mnt/asec/com.startv.gumrah-1 4M 2.3M 1.7M 4096
[email protected]:/ # chmod /system/xbin/
Usage: chmod [OPTION] <MODE> <FILE>
-R, --recursive change files and directories recursively
--help display this help and exit
10|[email protected]:/ # chown 0:0 /system/xbin/
Unable to chown /system/xbin/: Read-only file system
10|[email protected]:/ # ls -1 /system
ls: Unknown option '-1'. Aborting.
1|[email protected]:/ #
Thanks
Nikhil_android said:
Yes HTC - S-off rooted and running on CM10
I have tried busybox Stephen (Stericson) latest version
and when it was not getting installed I have trued busybox installer as well
while installing /system/xbin has R/W permission
I deleted files in xbin as coz I didnt know what to do .. I deleted only those files which were created by busybox and then I immediately flashed the ROM, but even after flashing (and wiping /system through cwm) those files were still there.
Here is the output:
/system/xbin mounted as R/W as usual
Code:
[email protected]:/ $ su
[email protected]:/ # df
Filesystem Size Used Free Blksize
/dev 206.4M 48K 206.4M 4096
/mnt/asec 206.4M 0K 206.4M 4096
/mnt/obb 206.4M 0K 206.4M 4096
/system 235.3M 229.6M 5.7M 4096
/cache 59M 2.3M 56.7M 4096
/data 554.1M 447.8M 106.4M 4096
/data/misc 150M 2.5M 147.5M 4096
/data/property 150M 2.5M 147.5M 4096
/data/radio 150M 2.5M 147.5M 4096
/storage/sdcard0 6.8G 4.7G 2.1G 4096
/mnt/secure/asec 6.8G 4.7G 2.1G 4096
/mnt/asec/com.startv.gumrah-1 4M 2.3M 1.7M 4096
[email protected]:/ # chmod /system/xbin/
Usage: chmod [OPTION] <MODE> <FILE>
-R, --recursive change files and directories recursively
--help display this help and exit
10|[email protected]:/ # chown 0:0 /system/xbin/
[email protected]:/ # ls -1 /system
ls: Unknown option '-1'. Aborting.
1|[email protected]:/ #
/system/xbin mounted as r/o purposely
Code:
[email protected]:/ $ su
[email protected]:/ # df
Filesystem Size Used Free Blksize
/dev 206.4M 48K 206.4M 4096
/mnt/asec 206.4M 0K 206.4M 4096
/mnt/obb 206.4M 0K 206.4M 4096
/system 235.3M 229.6M 5.7M 4096
/cache 59M 2.3M 56.7M 4096
/data 554.1M 447.5M 106.7M 4096
/data/misc 150M 2.5M 147.5M 4096
/data/property 150M 2.5M 147.5M 4096
/data/radio 150M 2.5M 147.5M 4096
/storage/sdcard0 6.8G 4.7G 2.1G 4096
/mnt/secure/asec 6.8G 4.7G 2.1G 4096
/mnt/asec/com.startv.gumrah-1 4M 2.3M 1.7M 4096
[email protected]:/ # chmod /system/xbin/
Usage: chmod [OPTION] <MODE> <FILE>
-R, --recursive change files and directories recursively
--help display this help and exit
10|[email protected]:/ # chown 0:0 /system/xbin/
Unable to chown /system/xbin/: Read-only file system
10|[email protected]:/ # ls -1 /system
ls: Unknown option '-1'. Aborting.
1|[email protected]:/ #
Thanks
Click to expand...
Click to collapse
Ok, it looks like your system partition does not have enough space on this rom.
Please remove some unneeded system apps with something like titanium backup to make /system space.
Looks like we are making progress.
Lgrootnoob said:
Ok, it looks like your system partition does not have enough space on this rom.
Please remove some unneeded system apps with something like titanium backup to make /system space.
Looks like we are making progress.
Click to expand...
Click to collapse
Done. It got installed successfully thanks
Nikhil_android said:
Done. It got installed successfully thanks
Click to expand...
Click to collapse
Glad to see it worked.
Please consider checking out my other work in my signature or donating to me.
Have a good day.
Hello everyone, first time poster but longer time lurker
Last week I treated myself with the new NotePro 12.2 tablet after dreaming what might cn be done with it once it runs a complete desktop :fingers-crossed:
Since last saturday I have been trying to no availe to get ubuntu running and about to go crazy with the amount of failed attempts.
My hopes are on the Complete Linux Installer as it is being actively developed but I ran into a weird issue with permissions when running the boot script.
I would post in the developer thread, but as a new user I will have to do it here (original thread http://forum.xda-developers.com/showthread.php?t=1585009 )
On with the info:
{
"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"
}
Device: Galaxy NotePro 12.2 (SM-P900)
Android 4.4.2
Kernel: 3.4.39-433754
Rooted
SuperSu Pro: passed root
Busybox Pro: passed root
Complete Linux Installer + key (ofcourse!)
Linux version: Ubuntu 13.10 Large
The issue:
When executing the bootscript.sh the error "operation is not permitted"
Code:
Checking loop device... MISSING
Creating loop device... mknod: /dev/block/loop255: Operation not permitted
Command: /system/xbin/busybox mknod /dev/block/loop255 b 7 255
FAILED
Error: Unable to create loop device!
Doing my homework for few hours and seeing more people have had this problem, but after some head scratching I simply tried the command manually to see if I am going crazy or not:
Code:
/system/xbin/busybox mknod /dev/block/loop255 b 7 255
v/block/ |grep loop <
brw------- root root 7, 0 2014-04-02 19:20 loop0
brw------- root root 7, 1 2014-04-02 19:20 loop1
brw------- root root 7, 2 2014-04-02 19:20 loop2
brw------- root root 7, 255 2014-04-02 19:59 loop255
brw------- root root 7, 3 2014-04-02 19:24 loop3
brw------- root root 7, 4 2014-04-02 19:20 loop4
brw------- root root 7, 5 2014-04-02 19:20 loop5
brw------- root root 7, 6 2014-04-02 19:20 loop6
brw------- root root 7, 7 2014-04-02 19:20 loop7
Success! :victory:
Launch the app for a retry:
Code:
Checking loop device... FOUND
Command: /system/xbin/busybox losetup /dev/block/loop255 /sdcard/ubuntu/ubuntu.img
mount: mounting /dev/block/loop255 on /data/local/mnt failed: Permission denied
So I keep getting permission denied error one after the other, but when I execute the commands directly in the terminal it`s all fine and dandy and the only thing that doesn`t show anything is when I try to chroot.
With a little bit of linux knowledge I dived into the bootscript and started to look where something goes wrong, I even downloaded 2 different scripts but none made a difference.
Code:
Checking loop device... FOUND
Command: /system/xbin/busybox losetup /dev/block/loop255 /sdcard/ubuntu/ubuntu.img
mount: mounting /dev/block/loop255 on /data/local/mnt failed: Permission denied
Command: /system/xbin/busybox mount -t ext4 /dev/block/loop255 /data/local/mnt
mount: mounting devpts on /data/local/mnt/dev/pts failed: No such file or directory
Command: /system/xbin/busybox mount -t devpts devpts /data/local/mnt/dev/pts
mount: mounting proc on /data/local/mnt/proc failed: No such file or directory
Command: /system/xbin/busybox mount -t proc proc /data/local/mnt/proc
mount: mounting sysfs on /data/local/mnt/sys failed: No such file or directory
Command: /system/xbin/busybox mount -t sysfs sysfs /data/local/mnt/sys
mount: mounting /sdcard on /data/local/mnt/sdcard failed: No such file or directory
Command: /system/xbin/busybox mount -o bind /sdcard /data/local/mnt/sdcard
mkdir failed for /data/local/mnt/root/cfg, No such file or directory
mount: mounting /sdcard/ubuntu on /data/local/mnt/root/cfg failed: No such file or directory
Command: /system/xbin/busybox mount -o bind /sdcard/ubuntu /data/local/mnt/root/cfg
mount: mounting /sys/fs/selinux on /data/local/mnt/selinux failed: No such file or directory
Command: /system/xbin/busybox mount -o bind /sys/fs/selinux /data/local/mnt/selinux
mount: mounting /storage on /data/local/mnt/external_sd failed: No such file or directory
No user defined mount points
net.ipv4.ip_forward = 1
bootscript.sh[234]: can't create /data/local/mnt/etc/resolv.conf: No such file or directory
Error: Unable to write resolv.conf file!
Having all commands echo`d in the terminal made the manual work abit easier:
Code:
/xbin/busybox losetup /dev/block/loop255 /sdcard/ubuntu/ubuntu.img <
xbin/busybox mount -t ext4 /dev/block/loop255 /data/local/mnt <
/xbin/busybox mount -t devpts devpts /data/local/mnt/dev/pts <
xbin/busybox mount -t proc proc /data/local/mnt/proc <
xbin/busybox mount -t sysfs sysfs /data/local/mnt/sys <
xbin/busybox mount -o bind /sdcard /data/local/mnt/sdcard <
xbin/busybox mount -o bind /sdcard/ubuntu /data/local/mnt/root/cfg <
xbin/busybox mount -o bind /sys/fs/selinux /data/local/mnt/selinux <
meserver 8.8.4.4" >> $mnt/etc/resolv.conf <
tmp-mksh: can't create /etc/resolv.conf: Read-only file system
27.0.0.1 localhost" > $mnt/etc/hosts <
tmp-mksh: can't create /etc/hosts: Read-only file system
Code:
ls -la /data/local/mnt/
al/mnt/ <
drwxr-xr-x root root 2013-10-09 12:19 android
drwxr-xr-x root root 2013-10-23 04:45 bin
drwxr-xr-x root root 2013-04-25 18:08 boot
drwxr-xr-x root root 2013-10-09 12:01 dev
drwxr-xr-x root root 2013-10-23 04:46 etc
drwxr-xr-x root root 2013-10-10 14:03 external_sd
drwxr-xr-x root root 2013-10-09 12:18 home
drwxr-xr-x root root 2013-10-10 18:35 lib
drwx------ root root 2013-10-09 11:51 lost+found
drwxr-xr-x root root 2013-10-09 11:54 media
drwxr-xr-x root root 2013-04-25 18:08 mnt
drwxr-xr-x root root 2013-10-09 11:54 opt
dr-xr-xr-x root root 1970-01-01 01:00 proc
drwx------ root root 2013-10-23 04:55 root
drwxr-xr-x root root 2013-10-23 04:55 run
drwxr-xr-x root root 2013-10-23 04:45 sbin
drwxrwx--x root sdcard_r 2014-04-01 19:49 sdcard
drwxr-xr-x root root 1970-01-01 01:00 selinux
drwxr-xr-x root root 2013-10-09 11:54 srv
dr-xr-xr-x root root 2014-04-02 19:20 sys
drwxrwxrwt root root 2013-10-23 04:55 tmp
drwxr-xr-x root root 2013-10-09 11:54 usr
drwxr-xr-x root root 2013-10-09 11:54 var
Looks very familiar :fingers-crossed:
Code:
Checking loop device... FOUND
Command: /system/xbin/busybox losetup /dev/block/loop255 /sdcard/ubuntu/ubuntu.img
mount: mounting /dev/block/loop255 on /data/local/mnt failed: Permission denied
Command: /system/xbin/busybox mount -t ext4 /dev/block/loop255 /data/local/mnt
mount: mounting devpts on /data/local/mnt/dev/pts failed: Permission denied
Command: /system/xbin/busybox mount -t devpts devpts /data/local/mnt/dev/pts
mount: mounting proc on /data/local/mnt/proc failed: Permission denied
Command: /system/xbin/busybox mount -t proc proc /data/local/mnt/proc
mount: mounting sysfs on /data/local/mnt/sys failed: Permission denied
Command: /system/xbin/busybox mount -t sysfs sysfs /data/local/mnt/sys
mount: mounting /sdcard on /data/local/mnt/sdcard failed: Permission denied
Command: /system/xbin/busybox mount -o bind /sdcard /data/local/mnt/sdcard
mount: mounting /sdcard/ubuntu on /data/local/mnt/root/cfg failed: Permission denied
Command: /system/xbin/busybox mount -o bind /sdcard/ubuntu /data/local/mnt/root/cfg
mount: mounting /sys/fs/selinux on /data/local/mnt/selinux failed: Permission denied
Command: /system/xbin/busybox mount -o bind /sys/fs/selinux /data/local/mnt/selinux
mount: mounting /storage on /data/local/mnt/external_sd failed: Permission denied
No user defined mount points
net.ipv4.ip_forward = 1
bootscript.sh[231]: can't create /data/local/mnt/etc/resolv.conf: Permission denied
bootscript.sh[232]: can't create /data/local/mnt/etc/hosts: Permission denied
chroot: can't change root directory to '/data/local/mnt': Operation not permitted
Command: /system/xbin/busybox chroot /data/local/mnt /root/init.sh ubuntu.img
Shutting down Linux ARM
umount: can't umount /data/local/mnt/root/cfg: Permission denied
umount: can't umount /data/local/mnt/sdcard: Permission denied
umount: can't umount /data/local/mnt/external_sd: Invalid argument
umount: can't umount /data/local/mnt/dev/pts: Permission denied
umount: can't umount /data/local/mnt/dev: Invalid argument
umount: can't umount /data/local/mnt/proc: Permission denied
umount: can't umount /data/local/mnt/sys: Permission denied
umount: can't umount /data/local/mnt/selinux: Permission denied
umount: can't umount /data/local/mnt: Permission denied
Still nothing and now it goes on to the shutdown section
Doing the chroot command does nothing and to be honest, I wouldn`t even know if it was supposed to do anything as this function is new for me.
Code:
/system/xbin/busybox chroot /data/local/mnt /root/init.sh ubuntu.img
All the commands work with just being root (command su) or through busybox.
All the files have root owner/group and they are executable.
Debug so far:
Rename supplied busybox version to busybox.org => removed it entirely with a fixed link to busybox itself.
3 different bootscript.sh
Changed ext2 to ext4, latest was ext4.
Reinstalled, rebooted, kicked it a few times.
Checked perms on everything and it *looks* all good.
All commands the bootscript.sh tries to call do work when doing it manually in the command shell, but even "sh bootscript.sh" fails on all.
Changed "setenforce 0" as some one has suggested.
Here is my butcherd bootscript.sh script that I try to run it with:
Code:
###########################################
# Linux boot script V8 for Android v4.3 #
# Built by Zachary Powell (zacthespack) #
# and Martin M..ller (Tuxling) #
# Thanks to: #
# Johan Vromans #
# Marshall Levin #
# Vaykadji #
# and to everyone at XDA! #
# Feel free to edit/use this script as you#
# like but credit Linuxonandroid.org #
###########################################
# $ver: V8 #
###########################################
###########################################
# This is a function we use to stop the #
# script in case of errors #
###########################################
error_exit() {
echo "Error: $1"
exit 1
}
###########################################
# Set up variables #
###########################################
export bbox=/system/xbin/busybox
# echo $bbox
export usermounts=android # Base folder all user mounts are done in, should be moved to app later
export imgfile=/sdcard/ubuntu/ubuntu.img # Default image file, another can be set by using an argument
export bin=/system/xbin9
export mnt=/data/local/mnt
export USER=root
if [[ ! -d $mnt ]]; then mkdir $mnt; fi
export PATH=$bin:/usr/bin:/usr/local/bin:/usr/sbin:/bin:/usr/local/sbin:/usr/games:$PATH
export TERM=linux
export HOME=/root
###########################################
# Handle arguments if present #
###########################################
if [ $# -ne 0 ]; then
if [ -f $1 ]; then # Is full path present?
imgfile=$1
elif [ -f $(dirname $0)/$1 ]; then # Is only a filename present?
imgfile=$(dirname $0)/$1
else
error_exit "Image file not found!($1)"
fi
fi
###########################################
# If a md5 file is found we check it here #
###########################################
#if [ -f $imgfile.md5 ]; then
# echo "MD5 file found, use to check .img file? (y/n)"
# read answer
# if [ $answer == y ]; then
# echo -n "Validating image checksum... "
# $bbox md5sum -c -s $imgfile.md5
# if [ $? -ne 0 ];then
# echo "FAILED!"
# error_exit "Checksum failed! The image is corrupted!"
# else
# echo "OK"
# rm $imgfile.md5
# fi
# fi
#
#fi
################################
# Find and read config file #
# or use defaults if not found #
################################
use_swap=no
cfgfile=$imgfile.config # Default config file if not specified
if [ -f $imgfile.config ]; then
source $imgfile.config
fi
###########################################
# Set Swap up if wanted #
# #
###########################################
if [ $use_swap == yes ]; then
if [ -f $imgfile.swap ]; then
echo "Swap file found, using file"
echo "Turning on swap (if it errors here you do not have swap support"
swapon $imgfile.swap
else
echo "Creating Swap file"
dd if=/dev/zero of=$imgfile.swap bs=1048576 count=1024
mkswap $imgfile.swap
echo "Turning on swap (if it errors here you do not have swap support"
swapon $imgfile.swap
fi
fi
###########################################
# Set up loop device and mount image #
###########################################
echo -n "Checking loop device... "
if [ -b /dev/block/loop255 ]; then
echo "FOUND"
else
echo "MISSING"
# Loop device not found so we create it and verify it was actually created
echo -n "Creating loop device... "
$bbox mknod /dev/block/loop255 b 7 255
echo -n "Command: $bbox mknod /dev/block/loop255 b 7 255 \n"
if [ -b /dev/block/loop255 ]; then
echo "OK"
else
echo "FAILED"
error_exit "Unable to create loop device!"
fi
fi
$bbox losetup /dev/block/loop255 $imgfile
echo -n "Command: $bbox losetup /dev/block/loop255 $imgfile \n"
if [ $? -ne 0 ];then error_exit "Unable to attach image to loop device! (Image = $imgfile)"; fi
$bbox mount -t ext4 /dev/block/loop255 $mnt
echo -n "Command: $bbox mount -t ext4 /dev/block/loop255 $mnt \n"
if [ $? -ne 0 ];then error_exit "Unable to mount the loop device! \n"; fi
###########################################
# Mount all required partitions #
###########################################
$bbox mount -t devpts devpts $mnt/dev/pts
echo -n "Command: $bbox mount -t devpts devpts $mnt/dev/pts \n"
if [ $? -ne 0 ];then $bbox mount -o bind /dev $mnt/dev; $bbox mount -t devpts devpts $mnt/dev/pts; fi
if [ $? -ne 0 ]; then error_exit "Unable to mount $mnt/dev/pts!"; fi
$bbox mount -t proc proc $mnt/proc
echo -n "Command: $bbox mount -t proc proc $mnt/proc \n"
if [ $? -ne 0 ];then error_exit "Unable to mount $mnt/proc!"; fi
$bbox mount -t sysfs sysfs $mnt/sys
echo -n "Command: $bbox mount -t sysfs sysfs $mnt/sys \n"
if [ $? -ne 0 ];then error_exit "Unable to mount $mnt/sys!"; fi
$bbox mount -o bind /sdcard $mnt/sdcard
echo -n "Command: $bbox mount -o bind /sdcard $mnt/sdcard \n"
if [ $? -ne 0 ];then error_exit "Unable to bind $mnt/sdcard!"; fi
if [[ ! -d $mnt/root/cfg ]]; then mkdir $mnt/root/cfg; fi
$bbox mount -o bind $(dirname $imgfile) $mnt/root/cfg
echo -n "Command: $bbox mount -o bind $(dirname $imgfile) $mnt/root/cfg \n"
$bbox mount -o bind /sys/fs/selinux $mnt/selinux
echo -n "Command: $bbox mount -o bind /sys/fs/selinux $mnt/selinux \n"
###########################################
# Checks if you have a external sdcard #
# and mounts it if you do #
###########################################
if [ -d /sdcard/external_sd ]; then
$bbox mount -o bind /sdcard/external_sd $mnt/external_sd
fi
if [ -d /Removable/MicroSD ]; then
$bbox mount -o bind /Removable/MicroSD $mnt/external_sd
fi
# This is for the HD version of the Archos 70 internet tablet, may be the same for the SD card edition but i dont know.
if [ -d /storage ]; then
$bbox mount -o bind /storage $mnt/external_sd
fi
###########################################
# Mount all user defined mounts if any #
###########################################
if [ -f $imgfile.mounts ]; then
olddir=$(pwd)
echo "Mounting user mounts"
cd $mnt
if [[ ! -d $mnt/$usermounts ]]; then $bbox mkdir -p $usermounts; fi
echo "# Script to unmount user defined mounts, do not delete or edit!" > $imgfile.shutdown
echo "cd $mnt/$usermounts" > $imgfile.shutdown
cd $mnt/$usermounts
for entry in $(cat "$imgfile.mounts"); do
ANDROID=${entry%;*}
LINUX=${entry#*;}
if [[ -d $ANDROID ]]; then
echo -n "Mounting $ANDROID to $usermounts/$LINUX... "
if [[ ! -d $mnt/$usermounts/$LINUX ]]; then $bbox mkdir -p $LINUX; fi
$bbox mount -o bind $ANDROID $mnt/$usermounts/$LINUX &> /dev/null
if [ $? -ne 0 ];then
echo FAIL
if [[ -d $mnt/$usermounts/$LINUX ]]; then $bbox rmdir -p $LINUX; fi
else
echo OK
echo "$bbox umount $mnt/$usermounts/$LINUX" >> $imgfile.shutdown
echo "$bbox rmdir -p $LINUX" >> $imgfile.shutdown
fi
else
echo "Android folder not found: $ANDROID"
fi
done
echo "cd $mnt" >> $imgfile.shutdown
echo "$bbox rmdir -p $usermounts" >> $imgfile.shutdown
cd $olddir
else
echo "No user defined mount points"
fi
###########################################
# Sets up network forwarding #
###########################################
$bbox sysctl -w net.ipv4.ip_forward=1
if [ $? -ne 0 ];then error_exit "Unable to forward network!"; fi
# If NOT $mnt/root/DONOTDELETE.txt exists we setup hosts and resolv.conf now
#if [ ! -f $mnt/root/DONOTDELETE.txt ]; then
# echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
# if [ $? -ne 0 ];then error_exit "Unable to write resolv.conf file!"; fi
echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
echo "127.0.0.1 localhost" > $mnt/etc/hosts
# if [ $? -ne 0 ];then error_exit "Unable to write hosts file!"; fi
#fi
###########################################
# Chroot into ubuntu #
###########################################
$bbox chroot $mnt /root/init.sh $(basename $imgfile)
echo -n "Command: $bbox chroot $mnt /root/init.sh $(basename $imgfile) \n"
###########################################
# Shut down ubuntu #
###########################################
echo "Shutting down Linux ARM"
#for pid in `lsof | grep $mnt | sed -e's/ / /g' | cut -d' ' -f2`; do kill -9 $pid >/dev/null 2>&1; done
for pid in `$bbox lsof | $bbox grep $mnt | $bbox sed -e's/ / /g' | $bbox cut -d' ' -f2`; do $bbox kill -9 $pid >/dev/null 2>&1; done
sleep 5
###########################################
# Unmount all user defined mounts if any #
###########################################
if [ -f $imgfile.shutdown ]; then
echo "Unmounting user defined mounts"
sh $imgfile.shutdown
rm $imgfile.shutdown
fi
$bbox umount $mnt/root/cfg
$bbox umount $mnt/sdcard
$bbox umount $mnt/external_sd
$bbox umount $mnt/dev/pts
$bbox umount $mnt/dev
$bbox umount $mnt/proc
$bbox umount $mnt/sys
$bbox umount $mnt/selinux
$bbox umount $mnt
I am at my whips end, the 12.2 is an awsome device to finally run a desktop on as a tablet, my mom already calls it a "TabTop" tablet+laptop, all I see though is a hole in the wall that is the size of my head
Could anyone please assist me with this strange issue? Pretty please? :angel:
With the new beta coming soon™ for CLI and that there won`t be many people like me that buy this toy for fun, I also volunteer to help to make this app idiot proof (point to self) as the work is awsome, even if it didn`t run out of the box :highfive:
No one an idea?
Kamuchi said:
No one an idea?
Click to expand...
Click to collapse
I also have this problem... I think it's caused by the kernel that is set to enforcing... ; (
But you can use Debian no root it uses a fakechroot so you can use it without root and it uses the X server and you needn't to vnc in it. Hope I could help
prohackerbro said:
I also have this problem... I think it's caused by the kernel that is set to enforcing... ; (
But you can use Debian no root it uses a fakechroot so you can use it without root and it uses the X server and you needn't to vnc in it. Hope I could help
Click to expand...
Click to collapse
did you get debian to work ?
great!!
Hi there,
I'm working with a stock, non rooted, lollipop 5.0.2 for xt1032 Moto G ROM, I'm trying to create a symbolic link from "popcorn download" folder to "my downloads" folder, so other programs can take the movies for streaming or whatever (who cares why anyways) but even when a touch or rm command works fine, ln commands doesn't like to lend a hand.
bad boy LN, bad boy.
Here is an exerpt on what i did:
1|[email protected]_umts:/sdcard/Download $ pwd
/sdcard/Download
[email protected]_umts:/sdcard/Download $ ls -l /sdcard/time4popcorn/downloads
drwxrwx--- 3 root 1028 4096 Apr 25 02:29 3980d0dd-29a9-4711-9a83-7955661b1aef
drwxrwx--- 3 root 1028 4096 Apr 25 02:34 3f02c279-84bb-4d74-bb69-2a7959a23774
drwxrwx--- 2 root 1028 4096 Apr 25 02:31 50548bf9-6cf6-436b-9b80-179ec8fc8bca
drwxrwx--- 3 root 1028 4096 Apr 25 02:00 c20989ae-375b-46e0-aa6e-d373c0bf2659
[email protected]_umts:/sdcard/Download $ touch popcorn
[email protected]_umts:/sdcard/Download $ ls -l
-rw-rw---- 1 root 1028 457290 Apr 24 22:29 422.pdf
drwxrwx--- 2 root 1028 4096 Apr 19 04:17 BigBang Theory
drwxrwx--- 2 root 1028 4096 Apr 19 04:12 Super_Mario_Theme
-rw-rw---- 1 root 1028 0 Apr 25 18:00 popcorn
[email protected]_umts:/sdcard/Download $ rm popcorn
[email protected]_umts:/sdcard/Download $ ln -s /sdcard/time4popcorn/downloads popcorn
ln: popcorn: Operation not permitted
1|[email protected]_umts:/sdcard/Download $ whoami
app_135
[email protected]_umts:/sdcard/Download $ id
uid=10135(app_135) gid=10135(app_135) groups=1015(sdcard_rw),1028,3003(inet),9997,50135(app_40135)
[email protected]_umts:/sdcard/Download $
I hope you can trhow some light to me and help me out
.
Thanks in advance, and kind regards to everyone! :highfive:
Gnokix