New: XDA launches forum for app developers. Discuss coding, tools, marketing, and more.
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
watzone69
Old
(Last edited by watzone69; 3rd March 2010 at 08:23 PM.)
#1  
watzone69's Avatar
Senior Member - OP
Thanks Meter 26
Posts: 966
Join Date: Oct 2008
Location: Austin, Texas
Default [DEV] Apps2SD and Darchstar-2.1 ROM

The focus of this thread is to sort out the Apps2SD issue in cyanogenmod-darch 2.1 ROM (like the title says). Please do not post here unless it relates to this issue.

That being said, here is where I was at in the original darchstar 2.1 thread:

Quote:
Originally Posted by watzone69 View Post

Taken from the instructions darchstar gave in the first post of his thread...
Code:
adb remount
adb push e2fsck /system/bin
adb shell
cd /system/bin
chmod a+x e2fsck
a2sd
reboot
First, the "chmod a+x e2fsck" command doesn't work for me (EDIT: I discovered that it WILL work in recovery mode). I had to use "chmod 777 e2fsck". After entering "a2sd" it gets enabled. After rebooting, apps2SD is NOT enabled anymore. I realized this by doing this test:

Code:
adb shell
cd /data/app
pwd
If your apps2sd is enabled, you will get "/system/sd/app" returned to you.
If you get "/data/app" returned instead then apps2sd is NOT enabled!
Gbhil then replied...

Quote:
Originally Posted by gbhil View Post
After you restart, can you re-enable a2sd by running a2sd from a terminal as root?
If so, do all your apps still appear and are they usable?

If the above is true, try adding this to the end of gumbo.sh

Code:
su -C a2sd
for a quick fix.

Start a thread (to keep things less cluttered) about it and I'll help you guys dig into the boot image and see why it's not sticking.

So, I rebooted and tried to run "a2sd" from the android terminal but it spits out a long string of errors:

Code:
--- Checking ext filesystems
e2fsck 1.41.6 (30-May-2009)
ext2fs_check_if_mount: Can't check if filesystem is mounted due to missing mtab file while determining whether /dev/block/mmcblk0p2 is mounted.
/dev/block/mmcblk0p2: clean, 13/249856 files, 31387/499713 blocks
mount: permission denied. (are you root?)
chown: /system/sd: Read-only file system
chmod: /system/sd: Read-only file system
mkdir failed for /system/sd/app, Read-only file system
chown: /system/sd/app: No such file or directory
chmod: /system/sd/app: No such file or directory
cp: cannot create '/system/sd/app/android.tether.apk': No such file or directory
cp: cannot create '/system/sd/app/android.tether.usb.apk': No such file or directory
cp: cannot create '/system/sd/app/at.abraxas.mountusb.apk': No such file or directory...

(etc.)

...rm: cannot remove '/data/app/org.gmote.client.android.apk': Permission denied
rm: cannot remove '/data/app/org.hermit.substrate.apk': Permission denied
rm: cannot remove '/data/app/org.iplatform.android.apk': Permission denied
rm: cannot remove '/data/app/org.mikeyin.livewallpaper.apk': Permission denied
mkdir failed for /system/sd/app-private, Read-only file system
chown: /system/sd/app-private: No such file or directory
chmod: /system/sd/app-private: No such file or directory
cp: can't open '/data/app-private/com.android.aldiko.apk': Permission denied
cp: can't open '/data/app-private/com.protocol.x.su.fbs.apk': Permission denied
cp: can't open '/data/app-private/com.rerware.android.MyBackupPro.apk': Permission denied
rm: cannot remove '/data/app-private/com.android.aldiko.apk': Permission denied
rm: cannot remove '/data/app-private/com.protocol.x.su.fbs.apk': Permission denied
rm: cannot remove '/data/app-private/com.rerware.android.MyBackupPro.apk': Permission denied
ln: /data/app/app: Permission denied
ln: /data/app-private/app-private: Permission denied
+++ Apps-to-SD successfully enabled
So, there is no "app" or "app-private" in the "system/sd". Is a2sd supposed to generate those directories or are they supposed to be there before hand?

Anyway, the result is that I lose all of my shortcuts to the apps and market shows them as not installed even though they are.

BTW, I am not a dev or even that great at code or linux but I can usually pick stuff up fairly quickly. Just want to help fix this!

EDIT: The only thing I have found to work is to flash this kernel:
http://forum.xda-developers.com/show...postcount=1406
However, some people get stuck in a boot loop after flashing this.
 
gernade23
Old
#2  
Member
Thanks Meter 3
Posts: 86
Join Date: Apr 2008
Running into the same issues as Watzone so I can confirm that he is doing it correctly. =P
 
watzone69
Old
(Last edited by watzone69; 8th March 2010 at 10:48 PM.) Reason: For those who search, more is revealed.
#3  
watzone69's Avatar
Senior Member - OP
Thanks Meter 26
Posts: 966
Join Date: Oct 2008
Location: Austin, Texas
Here are all of the related commands that have been suggested whenever the question of apps2sd has come up in the darchstar 2.1 thread.

Code:
adb remount
adb shell
mkdir /system/sd
Code:
adb remount
adb shell
busybox --install /system/xbin
a2sd
Code:
cd C:\android-sdk-windows\tools
adb remount
adb shell
chown system.system /data/app
chmod 0771 /data/app
For the next command, boot into recovery and do the following:

Code:
adb shell
mount /system
exit
adb push e2fsck /system/bin
adb shell
cd /system/bin
chmod 777 e2fsck
Now, boot normally and go back to your CMD prompt...
Code:
adb remount
adb shell
a2sd
EDIT: In other threads I have seen the command...
Code:
apps2sd on
...used to enable apps2sd.

Doing all of these WILL allow the final "a2sd" command to enable (testing with the "pwd" command) but it all goes KAPUT after a reboot.
 
darchstar
Old
#4  
darchstar's Avatar
Recognized Developer
Thanks Meter 959
Posts: 2,292
Join Date: Dec 2009
why it's not being enabled at boot time is because the init.rc isn't calling /system/etc/init.d/04apps2sd . I'll be sure that we fix that in my next release
 
gbhil
Old
#5  
Senior Member
Thanks Meter 0
Posts: 330
Join Date: Oct 2009
Location: Basement
And there you go.

It works here, but now I know why. I'm still using an old version of the boot image that looks for /system/bin/a2sd to load it, and an older version of the ROM. No sense in me to keep flashing fixes until I'm done tweaking the kernel. When darch says the kernel is good, then I'll catch up lol.

We might as well use this thread to learn to play with the boot image though, that is if you guys want to.
 
gernade23
Old
#6  
Member
Thanks Meter 3
Posts: 86
Join Date: Apr 2008
Awesome can't wait for the next release then! Lotsa apps out there calling out to me! Thanks guys =)
 
watzone69
Old
#7  
watzone69's Avatar
Senior Member - OP
Thanks Meter 26
Posts: 966
Join Date: Oct 2008
Location: Austin, Texas
Quote:
Originally Posted by gbhil View Post
We might as well use this thread to learn to play with the boot image though, that is if you guys want to.
You bet. It's about time I got my hands dirty.
 
gernade23
Old
#8  
Member
Thanks Meter 3
Posts: 86
Join Date: Apr 2008
I'm game let me know if you need me to test anything!
 
gbhil
Old
(Last edited by gbhil; 24th February 2010 at 02:36 AM.)
#9  
Senior Member
Thanks Meter 0
Posts: 330
Join Date: Oct 2009
Location: Basement
Cool deal. You need Linux to extract and compress the boot.img, and you need to be current with Perl and running jre5 or higher.

Ubuntu 9.04+ is set up out of the box, but any version can be made to work.

Then grab these files from Lox -
http://forum.xda-developers.com/atta...2&d=1254004933

http://forum.xda-developers.com/atta...0&d=1254622769

and extract them into your sdk/tools dir. (or any dir in your path)

get all that, then pick a boot.img from a rom and put it in a work folder.

Holler when you get that far, or if you have any q's.
 
david279
Old
#10  
david279's Avatar
Senior Member
Thanks Meter 815
Posts: 4,129
Join Date: Sep 2007
Location: New Orleans
I wanna learn myself. This should apply to mac os as well?


------------------------

http://gplus.to/David279


XDA PORTAL POSTS

Pearl Chen to Talk NFC Development at XDA:DevCon 2013

From HTML to LEDs or Android to Arduino, Hardware Hacking is a pastime of many people … more

Avoid Framework Bootloops on Xperias Running Jelly Bean

If you’re a Sony device owner running a stock Android Jelly Bean firmware and … more

Forum Added for the Samsung Galaxy Mega

What do you do when the Galaxy Note line is simply not big enough? You get theSamsung Galaxy Mega. … more

Voice Control Your Phone with Tasker and AutoVoice – XDA Developer TV

XDA Developer TV Producer Kevin set up his phone to respond to … more