[Q] Custom kernel with loopback support - Desire Q&A, Help & Troubleshooting

I'm looking for a custom kernel with loopback support (possibility mount img files).
I've tried: cyanogenmod kernel, tiamat - there's no it.

What img files u want mount?
Sent from my HTC Desire

I've got debian linux in .img file and I can't mount it on my HTC Desire - cause kernel doesn't support it.

Hm... weird.
Code:
# zcat /proc/config.gz | grep -i loop
CONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_CRYPTOLOOP is not set
# CONFIG_RC_LOOPBACK is not set
Code:
# mknod /dev/block/loop0 b 7 0
and still:
Code:
mount: can't setup loop device: No such file or directory
P.S.: Sorry for double-post, I don't see delete or merge option.
I found a solution. The problem was non-existent device, try with different numbers for /dev/loop.
Example:
Code:
# mknod /dev/block/loop0 b 7 0
# mknod /dev/block/loop2 b 7 0
# mknod /dev/block/loop255 b 7 0

Related

CM7 A2SD?

I can't seem to get the Ext A2SD to work. I've got the partition but nothing installs there. Am I missing something? I remember on my G1 it was all pretty much automatic.
Sent from my CM7 EVO using XDA App.
i'm pretty sure that the most recent builds of CM do A2SD in the same fashion that Froyo implemented it.
Meaning that the apps run off your SD off the main partition, making the EXT 2/3/4 unnecessary.
The main difference between CM's version and the stock version of A2SD right now is that CM has implemented a way to get all apps unlocked to be able to go to your SD card, and not just the ones that have been enabled by the market publisher.
in general, there is no reason to keep the EXT partition on your card anymore if you are running CM. You can just reformat it and get that precious disk space back.
Hmm. Well that sucks. I always liked the Ext A2SD because it loaded much faster. With the Froyo method it takes a few once booted because the sd is mounted.
Sent from my CM7 EVO using XDA App.
IIRC CM7 supports Darktremor ext a2sd/cache2sd script. This is a necessity for me, so I hope that's correct.
The problem could be related to a bug
http://forum.cyanogenmod.com/topic/14813-darktremor-apps2sd-issue/
Have you tried the firerat a2sd+ script?
Data2sd support for performance enhancement would be nice also.
Ok, I am somewhat confused. I am coming from a sense-based rom that had a2sd enabled. I have a ton of apps so this is necessary. Was running my Dalvik from the \cache\ partition and apps from ext3.
Is this still possible in CM7?
I tried running a2sd check in CM& and it said "a2sd not located" (or something to that effect).
I've had a a2sd issue with recent aosp roms, my find is that if yours is not working and you have a2sd installed then it's the kernel, I had to try multiple kernels to get mine working, I found Sbc bcnice v7 works perfect, shows up properly partitioned and apps are utilizing it, all the new zendroids and savagezen dont support a2sd, neither does snap 7.6
my95z34 said:
I can't seem to get the Ext A2SD to work. I've got the partition but nothing installs there. Am I missing something? I remember on my G1 it was all pretty much automatic.
Sent from my CM7 EVO using XDA App.
Click to expand...
Click to collapse
use Link2SD it is the best a2sd replacement, it supports fat32 and ext as your 2nd partition.
my95z34 said:
I can't seem to get the Ext A2SD to work. I've got the partition but nothing installs there. Am I missing something? I remember on my G1 it was all pretty much automatic.
Sent from my CM7 EVO using XDA App.
Click to expand...
Click to collapse
Hey dude,
I had the same problem (or need depending on your view) - I tried to apply "cm7_legacy_a2sd_r3-signed.zip" which failed for some reason I couldn't be bothered to work out.
Which lead me to look inside and see how it was going to apply itself. Which then took me on a happy journey of discovery that resulted in the following How-To: pastebin.com/TgqtMuYX
Check it out and let me know how it goes. If you have any issues along the way either pm me or reply here if it's helpful to the wider audience. I'll feedback any relevant details if necessary.
Cheers.
AC
PS. The phone I applied this on was my Hero (GSM) before they pulled CyanogenMod-7.0.0-Hero - seems to behave quite well when you increase the heap to 32MB, but it's still work in progress for testing.
# Android.Control 2011/04
How to manually apply a2sd on CM7 from recovery - Carried out on a Hero, but other phones should be the same.
(details taken from cm7_legacy_a2sd_r3-signed.zip)
Boot into your recovery image. I used ClockworkMod as it allowed me to mount /system very easilly
If adb it is NOT in your search path you will need to specify the /full/path/to/adb
DO NOT complain to me if the adb commands below fail if adb is not in your path
All adb commands issued from a regular user account on Linux - (Windoze will be the same, I'm sure you can work it out)
Let us begin...
1. Mount the /system partition
Recovery: Select: [mounts and storage] > [- mount /system]
[ALTERNATIVE]
Code:
$ adb shell mount /system
Just to check all went well
Code:
$ adb shell df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 98400 0 98400 0% /dev
/dev/block/mtdblock4 133120 122304 10816 92% /cache
/dev/block/mtdblock3 174080 118224 55856 68% /system
2. Find your sd-ext partition - usually /dev/block/mmcblk0p2
Recovery: Select [mounts and storage] > [- mount /sd-ext]
[ALTERNATIVE]
Code:
$ adb shell mount /sd-ext
Just to check all went well and to see what the /sd-ext device details are
Code:
$ adb shell df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 98400 0 98400 0% /dev
/dev/block/mtdblock4 133120 122304 10816 92% /cache
/dev/block/mtdblock3 174080 118224 55856 68% /system
/dev/block/mmcblk0p2 505636 10532 468999 2% /sd-ext
Recovery: Select [mounts and storage] > [- umount /sd-ext]
[ALTERNATIVE]
Code:
$ adb shell umount /sd-ext
3. Manually aplly firstboot.sh actions - from cm7_legacy_a2sd_r3-signed.zip
Using "/dev/block/mmcblk0p2" from the df output above exceute the following (replace with apropriate value for your phone!)
Code:
$ adb shell
~ # /system/bin/e2fsck -fy /dev/block/mmcblk0p2
~ # /system/bin/tune2fs -O has_journal /dev/block/mmcblk0p2
~ # /system/bin/e2fsck -fy /dev/block/mmcblk0p2
~ # /system/bin/tune2fs -c 0 -i 0 /dev/block/mmcblk0p2
~ # /system/bin/tune2fs -l /dev/block/mmcblk0p2
4. Then mount the sd-ext partition using existing script
Need additional entry in PATH to allow /system/etc/init.d/05mountsd to work
Code:
~ # PATH=$PATH:/system/bin
~ # /system/etc/init.d/05mountsd
You should see something very similar to below
Code:
e2fsck 1.41.10 (10-Feb-2009)
/dev/block/mmcblk0p2: clean, 11/130560 files, 27008/522112 blocks
5. Create app and app-private in sd-ext
If app and app-private [or dalvik-cache] exist on sd-exe BUT are NOT a directory then they must be removed!
Code:
~ # rm /sd-ext/app
~ # rm /sd-ext/app-private
[OPTIONAL]
Code:
~ # rm /sd-ext/dalvik-cache
Now we can create the directories proper
Code:
~ # install -m 771 -o 1000 -g 1000 -d /sd-ext/app
~ # install -m 771 -o 1000 -g 1000 -d /sd-ext/app-private
[OPTIONAL]
Code:
~ # install -m 771 -o 1000 -g 1000 -d /sd-ext/dalvik-cache
If you didn't see any errors you can assume everything is ok, but just to make sure...
Code:
~ # ls -l /sd-ext/
drwxrwx--x 2 system system 1024 Apr 16 13:49 app
drwxrwx--x 2 system system 1024 Apr 16 13:49 app-private
drwxrwx--x 2 system system 1024 Apr 16 13:49 dalvik-cache
drwx------ 2 root root 1024 Apr 16 01:42 lost+found
6. Create the userinit.d and functions script directories on /sd-ext
Code:
~ # install -m 755 -o 0 -g 0 -d /sd-ext/userinit.d
~ # install -m 755 -o 0 -g 0 -d /sd-ext/userinit.d/functions
Now we need to quit adb back to the host to push some files onto the phone
Code:
~ # exit
7. Push the userinit.d files into /sd-exe/userinit.d
(extract the contents of "cm7_legacy_a2sd_r3-signed.zip" to a temporary directory, then cd into sd-ext for the following adb commands)
Code:
$ adb push ./userinit.d/functions/a2sd /sd-ext/userinit.d/functions/a2sd
$ adb push ./userinit.d/10cache2sdext-binds /sd-ext/userinit.d/10cache2sdext-binds
$ adb push ./userinit.d/11data2sdext-binds /sd-ext/userinit.d/11data2sdext-binds
$ adb push ./userinit.d/12app2sdext-binds /sd-ext/userinit.d/12app2sdext-binds
$ adb shell
~ # chmod 750 /sd-ext/userinit.d/functions/a2sd
~ # chmod 750 /sd-ext/userinit.d/10cache2sdext-binds
~ # chmod 750 /sd-ext/userinit.d/11data2sdext-binds
~ # chmod 750 /sd-ext/userinit.d/12app2sdext-binds
~ # chown root:shell /sd-ext/userinit.d/functions/a2sd
~ # chown root:shell /sd-ext/userinit.d/10cache2sdext-binds
~ # chown root:shell /sd-ext/userinit.d/11data2sdext-binds
~ # chown root:shell /sd-ext/userinit.d/12app2sdext-binds
~ # exit
[ADVISORY]
If app, app-private or dalvik-cache was NOT working you would see a line similar to these lines below in the logcat output
Code:
I/busybox ( 113): sd-ext /sd-ext/app bindings not enabled
I/busybox ( 113): sd-ext /sd-ext/app-private bindings not enabled
I/busybox ( 113): sd-ext /sd-ext/dalvik-cache bindings not enabled
Reboot the phone, then quickly run adb logcat to watch the initial progress to confirm success
If you do NOT see any lines like those above in the logcat output then everything went OK
Code:
$ adb logcat
- waiting for device -
--------- beginning of /dev/log/main
I/cm ( 67): Welcome to Android 2.3.3 / CyanogenMod-7.0.0-Hero
I/cm ( 68): _
I/cm ( 69): __ __ _ ___ _ _ __ ___ __ _ _ _ _ __ __))
I/cm ( 70): ((_ \(/'((_( ((\( ((_)((_( (('((\( ((`1( ((_)((_(
I/cm ( 71): )) _))
I/cm ( 72):
I/mountsd ( 87): Checking filesystems..
I//system/xbin/run-parts( 62): e2fsck 1.41.10 (10-Feb-2009)
I//system/xbin/run-parts( 62): /dev/block/mmcblk0p2: recovering journal
I//system/xbin/run-parts( 62): /dev/block/mmcblk0p2: clean, 555/500856 files, 428759/1000173 blocks
I/logwrapper( 93): busybox terminated by exit(0)
I/logwrapper( 97): busybox terminated by exit(0)
I/logwrapper( 99): busybox terminated by exit(0)
I/mountsd ( 101): /sd-ext successfully mounted
I/busybox ( 113): sd-ext /sd-ext/data bindings not enabled
I/busybox ( 113): sd-ext /sd-ext/system bindings not enabled
I/logwrapper( 113): busybox terminated by exit(0)
I/logwrapper( 62): /system/xbin/run-parts terminated by exit(0)
...
Please be patient while any existing files in /data/app, /data/app-private and /data/dalvik-cache are copied to /sd-ext/app, /sd-ext/app-private and /sd-ext/dalvik-cache respectively
If you have manually populated the app directory prior to enabling a2sd, then this will further delay your first boot while the dalvik-cache is updated for each unseen .apk file
[NOTE]
$ = regular user shell prompt (on your PC, depending which user you use for you adb environment)
# = root user shell prompt (on your phone)

[Q] My GoogleMaps (or other application that uses OpenGL) is freezing/irresponsive

16) My GoogleMaps (or other application that uses OpenGL) is freezing/irresponsive. What can I do?
Open terminal or adb shell and type these commands:
Code:
$ su
# mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
# echo sysctl -w vm.min_free_kbytes=4096 >> /system/etc/install-recovery.sh
# chmod 744 /system/etc/install.sh
# mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
Hi all i have some question about this!
So this is a countermeasure like a mod? I type it in then everything goes well?
Or i have to type it after every restart?
and if i write this it kills the app or it will run before the freezing?
is this working with opengl games?.
Thanks!
Ernő
when i tried typing this line
# chmod 744 /system/etc/install.sh
no such file exists
maybe this?
# chmod 744 /system/etc/install-recovery.sh
PS: Has this anything to do with recovery 2ndinit or something?
not exactly sure what this does, I think it makes sure at least 4096kb of RAM is free.
but try
$ su
# mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
# echo vm.min_free_kbytes = 4096 >> /system/etc/sysctl.conf
# mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
# sysctl -p
it worked for me and has kept the setting after restarts
Just download sysctl in market and set it at 4096 it higher. If you have setvsel, it had option to increase min kb to 4096
Sent from my MB525 using XDA App
My Defy 2.2 also freezes when trying Maps (the only one that works is 5.0.0) - so I've tried sysctl with 8192 at min. kb. free.
No success, still freezing with 5.6.0/5.7.0 .
Uninstall updates in maps then update a fresh one.
Sent from my MB525 using XDA App

[Q no /system rw access

I am trying to:
* run backtrack image on my slide the small custom smaller image not the +4gig one for fat32
* get RW to /system for su updated and allow rootkeeper to 'work' http://forum.xda-developers.com/showthread.php?p=21219704
* I seen several tutorials but I am not sure what one to follow .. i have S-ON and I assume I need that off for su to update within clockwork etc ... none of the other root apps work.. the superuser.apk is installed and I allow perms but nothing seems to work.. I am hoping it is a easy fix ..
INFO:
Code:
# CM 7
Linux localhost 2.6.32.17-cyanogenmod-g46ca326 #1 PREEMPT Thu Apr 21 20:36:02 EDT 2011 armv6l GNU/Linux
ESPRESSO PVT SHIP S-ON
HBOOT-1.02.0000
MICROP-0620
When I try to mount loop etc ..
Code:
# losetup /dev/loop254 $kit/bt5.img
losetup /dev/loop254 $kit/bt5.img
losetup: /dev/loop254: No such file or directory
# ls /dev/loop254
ls /dev/loop254
/dev/loop254
# uname -a
uname -a
# busybox mknod /dev/loop2 b 7 0
busybox mknod /dev/loop2 b 7 0
mknod: /dev/loop2: File exists
# mount -o loop,noatime -t ext2 $kit/bt5.img $mnt
mount -o loop,noatime -t ext2 $kit/bt5.img $mnt
mount: can't setup loop device: No such file or directory
# losetup /dev/block/loop7 $kit/bt5.img
losetup /dev/block/loop7 $kit/bt5.img
losetup: /dev/block/loop7: No such file or directory
# losetup /dev/block/loop2 $kit/bt5.img
losetup /dev/block/loop2 $kit/bt5.img
losetup: /dev/block/loop2: No such file or directory
# losetup /dev/loop2 $kit/bt5.img
losetup /dev/loop2 $kit/bt5.img
losetup: /dev/loop2: No such file or directory
# losetup /dev/loop7 $kit/bt5.img
losetup /dev/loop7 $kit/bt5.img
losetup: /dev/loop7: No such file or directory
# ls /dev/loop2
ls /dev/loop2
/dev/loop2
# ls /dev/loop7
ls /dev/loop7
/dev/loop7
#
ah i dont know.. top it for ya~

Sgs3 cm10.1 ums rooted (ext4 xfat)

Hi all,
since i could not use the UMS mode on my sgs3 and all of the tested Applications do not work i made 2 scrips for gscrip.
First check if all mount points are correct for you, if not correct them. Run mount, check mount point of sdcard (/dev/fuse /storage/sdcard1)
But i think on all sgs3 with cm10.1 it should be the same.
edit:
I get a transfer rate of ~8.5MB/s writing and ~ 18MB/s reading so for copying mp3 to the mobile i will still plug the card to the pc.
!!! AND DON'T FORGET TO UNMOUNT/EJECT YOUR SDCARD BEFORE ums_off !!!
And don't forget you are working as root so you can screw up a lot
[email protected]:/ # mount
...
/dev/block/vold/179:49 /mnt/fuse/sdcard1 ext4 rw,dirsync,nosuid,nodev,noexec,noatime,barrier=1 0 0
/dev/fuse /storage/sdcard1 fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
...
Click to expand...
Click to collapse
ums_on
Code:
setprop persist.sys.usb.config mass_storage,adb
umount /storage/sdcard1
echo /dev/block/vold/179:49 > /sys/devices/platform/s3c-usbgadget/gadget/lun0/file
ums_off
Code:
echo "" > /sys/devices/platform/s3c-usbgadget/gadget/lun0/file
setprop persist.sys.usb.config mtp,adb
vold
Hints:
If you are using Linux and your sdcard is ext4 like mine and can't write as a user to the root of the sdcard just add a group to "/etc/group" for me it was (the id you see when you type mount)
Code:
mobile_sd:x:1023:dark-wulf
Check and Disable journal on ext4 sdcard with a card-reader
Code:
root # tune2fs -l /dev/sdXY | grep has_journal
root # tune2fs -O ^has_journal /dev/sdXY
And remove reserved blocks for root
Code:
root # tune2fs -m 0 /dev/sdXY
Thanks to http://forum.xda-developers.com/showpost.php?p=27282116 for bringing me the idea
Greetings
dark-wulf

[Q] Ubuntu Touch with MultiRom expand Memory

Is there an easy way to add more space to Ubuntu Touch, installed via multirom, from the 2gb default to say 16gb on the internal storage?
I have a 32gb N7(2013) and am trying to dual boot but need more space on ubuntu touch, but I don't want to use and external usb for it.
What I do is, I start Lil'Debi and then
Code:
$ su
# /debian/shell
# cd /data/media/0/multirom/roms/utouch_devel/data
# ls -lh system.img
2.0G system.img
# truncate -s 4G system.img
# resize2fs system.img
# ls -lh system.img
4.0G system.img
In Ubuntu I can then do
Code:
# df -h | head -n 2
Filesystem Size Used Avail Use% Mounted on
/dev/loop0 4.0G 2.1G 1.7G 56% /
Hth.

Categories

Resources