[Script][A2SD]Darktremor 2.7.5.3 Beta 04 [Legend] (01/29/2011)

tkirton

Senior Member
Jul 13, 2009
2,044
224
0
47
Katy Texas
www.darktremor.info
Introducing...
Darktremor Apps2SD 2.7.5.3 Beta 04
Date of Release: January 29, 2011

Download Current Version

Instructions - Change Log - Commands - ROM List - Developer's Guide
Darktremor Apps2SD Fan Page ---- Darktremor Apps2SD Development Group

Are you installing Darktremor Apps2SD on your phone? Here are the instructions to help you: Facebook
Are you a developer wanting to include Darktremor Apps2SD in your latest ROM? Here is the Developer Guide: Facebook
Update on Beta 4
It seems I'm getting mixed results with these betas. I'm not sure why this is occurring, some people have been able to get this working right while others have had a hard time with it.

Currently, I'm rebuilding the entire program. This takes a while because I have to figure out how to pack all these options into the program but make it small enough to where it will run correctly.

I will say that some of the beta features are coming back out...one of them is the search for a partition code. I suspect that code may be leading me into issues with certain platforms, so I'm going back to the 2.7.5.2 method of mounting (mmcblk0p2 or mmcblk1p2).

Also, parts of the code will use Busybox Ash (the only code that won't will be starta2sd, which will still use Bash for the time being). The startup code will definitely use Busybox Ash.

Until then, here are the links to the the last two betas and the last official release:

Version 2.7.5.3 Beta 04 - http://www.darktremor.info/files/a2sd/dtapps2sd-2.7.5.3-beta04-signed.zip
Version 2.7.5.3 Beta 03 - http://www.darktremor.info/files/a2sd/dtapps2sd-2.7.5.3-beta03-signed.zip
Version 2.7.5.2-1 - http://www.darktremor.info/files/a2sd/dtapps2sd-2.7.5.2-1-signed.zip

And, if you want past versions, you can view the repository: ftp://dtuser:[email protected] (ignore the smiley face...that's XDA doing that.)
Beta 04 took longer than I expected to release. I have done major changes to the code:

1. New commands: convert-ext4 - This will convert your EXT3 partition into EXT4. Just a friendly reminder on this command: Not every rom supports EXT4, so it is possible to go into a boot loop if you switch roms. Use with caution.

2. Reworked convert-ext3 (convert-ext4 gets similar code)...now a flag file is set before the reboot (no conversion is done before the reboot). At load time, the conversion is performed. This takes longer in the reboot process and you may think your phone has locked up...wait about five minutes before doing anything with the phone.

3. Repair is rebuilt...now it uses existing commands to repair the setup (reinstall, remove, cachesd, cachepart, nocache, datasd, nodata). Definitely shrinks the code.

4. Added fix_permissions program to the package. This may help with Superuser issues when using the datasd feature. It is used in reinstall, remove, datasd and nodata.

5. a2sd install is back!!! Both a2sd install and a2sd reinstall do the exact same thing.

6. Dalvik heap code has been shrunk and now creates a file called dalvikheap. Actually, the code has been doing this all along (since about 2.7.5.2, I think), but I never put the code in to use the file.

7. Low Memory Killer code has also been shrunk and uses a file caled dtset_lowmem to set the low memory killer parameter.

8. Replaced Busybox PS function with Toolbox PS. The issue with Busybox PS is that it gives a false reading when I look for android.process.acore (which is the main program when the GUI starts up). If that is present, the program thinks you are trying to run Darktremor without any command line parameters. This was because Busybox would report the process was there when, in reality, it wasn't (validated this when my phone was boot looping.) Toolbox's PS reports the correct setting. This should fix the bootlooping issues some people are experiencing.

9. New commands: usedtbusybox and usedefaultbusybox - these commands may help in diagnosing issues that is may be related to the native Busybox on your rom. a2sd usedtbusybox will use the Busybox that is packaged with Darktremor. a2sd usedefaultbusybox will turn back on the scan behavior of the program introduced in Beta 03.

10. Support for Darktremor Apps2SD version 2.7 and earlier has been discontinued. To upgrade correctly from one of those versions, use version 2.7.5.3 Beta 03b or earlier.

11. Finally fixed stalled boot issues (or at least my tests with several roms says so.)

See the change log for additional details.

You will notice that if the program runs repair and finds a problem, it will correct the issue and reboot. You will see a second reboot when the dalvik-cache clears (this is to fix timing issues with CyanogenMod...I can't control that startup as well as I can other roms). This only happens if repair is ran or you flash a new rom (as repair will realign all data). If you are upgrading from a previous version of Darktremor, you should not see the reboots.
This is Darktremor Apps2SD, a multipurpose program that primarily allows a user to execute applications created for the Android OS on their Secure Digital card (with the proper setup...more on that later). But, Darktremor Apps2SD is all about stability. The goal is to be able for all users of the Android OS to be able to take advantage of a method to run their applications from a secure digital card.

But just because the Darktremor Apps2SD is all about stability, doesn't mean it isn't packed with features:

- Move applications (both free and paid) to the Secure Digital card.
- Move Dalvik Cache to run either from your Secure Digital card or from your cache partition and clears the cache on demand.
- Boot Loop Protection: prevents the phone from boot looping in the event the SD card could not be mounted.
- Dalvik JIT for faster performance on Roms which support it.
- User selectable sizes for the Dalvik heap sizes, allowing a user to freely optimize their system.
- Activate a swap partition on your SD card and sets how often the swap partition is utilized.
- Automatically fixes configuration issues.
- Users can check the free space on their SD card and check the installation to make sure all is setup correctly.
- Runs ZipAlign on demand...this makes your programs load faster.
- Built in help system for easy reference of commands.
- All features can also be reversed without repartitioning your Secure Digital card.
- New logging features assists in troubleshooting issues.
- Commands to set the Low Memory Killer feature at boot time. Great for those people who are the "set it and forget it" type.
- And more...

Darktremor Apps2SD is not the same as Froyo Apps2SD. Froyo Apps2SD creates a secure folder on the FAT32 section of your SD card (this is the section that you see when you mount your phone to your computer) and stores the programs there. This is nice as you don't have to do anything special with the phone, but it isn't backwards compatible with older versions of Android (Cupcake, Donut, Eclair) and, because of the way Froyo works, older programs not designed for Froyo will automatically stay on your internal storage (unless you install a program that forces the move to your SD card).

Darktremor Apps2SD takes a different approach. Based on the original CyanogenMod works, Darktremor Apps2SD uses symbolic linking to force Android into moving your applications to the SD card. Because Android will not allow anything to be ran from the FAT32 partition on your SD card (and, in Froyo, it will only allow you to run programs from a special folder), Darktremor utilizes filesystems called EXT2, EXT3 and EXT4. Each one of these filesystems is native to Linux (the operating system running Android), which allows you to run programs from them (same as, say, a computer running Ubuntu). This method is completely compatible with all versions of Android, including Froyo. In fact, you can run both the Darktremor Apps2SD and Froyo Apps2SD at the same time.

Check out the list of Roms that either have Darktremor Apps2SD installed or are compatible with Darktremor Apps2SD. Click on the link labeled ROM List at the top of this message.
 
Last edited:
  • Like
Reactions: -iNCEPTiON-

tkirton

Senior Member
Jul 13, 2009
2,044
224
0
47
Katy Texas
www.darktremor.info
Last edited:

schpinn

Senior Member
May 23, 2010
83
0
0
Tried installing it on Indigo Bean (CyanogenMod 5.0.8 port), didn't work. It seems it can't mount the ext3 partition:

[ ] Launching Darktremor A2SD
[*] Starting Darktremor Apps2SD version 2.7.5 preview fix 1
[ ] Mounting /system as read-write
[ ] Starting Apps2SD in install mode
[ ] Checking SD Card.
[ ] Searching for Mount Point...
[ ] Creating Mount point.
mkdir: cannot create directory '/system/sd': Cannot allocate memory
[X] Mount point could not be created.
Apps2SD cannot mount ext partition.

I re-partitioned my SD card just to be sure (32 / 512 / the rest) with the same results. Don't know if it's because of the ROM or a2sd. Let me know if there's anything I can do to help you diagnose the problem.

EDIT: I know that there were problems other a2sd solutions and the Legend, the fix was to put a short sleep in the a2sd script, don't know if this is of any help to you..
 

tkirton

Senior Member
Jul 13, 2009
2,044
224
0
47
Katy Texas
www.darktremor.info
Your boot sequence is working similar to the Desire (with one exception...yours isn't rebooting when it tries to mount /system as read-write).

Try Preview Fix 3 Test 1: http://www.darktremor.info/files/a2sd/dtapps2sd-2.7.5-pf3-test1-signed.zip

This uses the flash to put the sd directory in /system. It also removes almost all references to remount /system as read-write (the only exception: JIT)

Let's see if this works and I really appreciate your help in testing this.

Tried installing it on Indigo Bean (CyanogenMod 5.0.8 port), didn't work. It seems it can't mount the ext3 partition:

[ ] Launching Darktremor A2SD
[*] Starting Darktremor Apps2SD version 2.7.5 preview fix 1
[ ] Mounting /system as read-write
[ ] Starting Apps2SD in install mode
[ ] Checking SD Card.
[ ] Searching for Mount Point...
[ ] Creating Mount point.
mkdir: cannot create directory '/system/sd': Cannot allocate memory
[X] Mount point could not be created.
Apps2SD cannot mount ext partition.

I re-partitioned my SD card just to be sure (32 / 512 / the rest) with the same results. Don't know if it's because of the ROM or a2sd. Let me know if there's anything I can do to help you diagnose the problem.

EDIT: I know that there were problems other a2sd solutions and the Legend, the fix was to put a short sleep in the a2sd script, don't know if this is of any help to you..
 

schpinn

Senior Member
May 23, 2010
83
0
0
Now I get the following error:

[ ] Launching Darktremor A2SD
[*] Starting Darktremor Apps2SD version 2.7.5 PF3 (Preview Fix 3)
[ ] Starting Apps2SD in install mode
[ ] Checking SD Card.
[ ] Checking for ext partition
[!] Ext partition found, but not mounted.
[ ] Checking Ext partition...
e2fsck 1.40.8 (13-Mar-2008)
/dev/block/mmcblk0p2: clean, 11/249856 files, 39620/499713 blocks
[ ] Mounting ext partitions
mount: mounting /dev/block/mmcblk0p2 on /system/sd failed: No such file or directory
[X] Mounting ext partition failed.
[X] Can't continue script...aborting.
[X] SD card not mounted. Install can't continue.
Problem may be one of the following:

But I was able to manually mount the ext3 partition to /sdcard/sd for instance.
 

tkirton

Senior Member
Jul 13, 2009
2,044
224
0
47
Katy Texas
www.darktremor.info
Sorry...I did something stupid. Forgot to put the /system/sd as part of the package.

http://www.darktremor.info/files/a2sd/dtapps2sd-2.7.5-pf3-test2-signed.zip

Now I get the following error:

[ ] Launching Darktremor A2SD
[*] Starting Darktremor Apps2SD version 2.7.5 PF3 (Preview Fix 3)
[ ] Starting Apps2SD in install mode
[ ] Checking SD Card.
[ ] Checking for ext partition
[!] Ext partition found, but not mounted.
[ ] Checking Ext partition...
e2fsck 1.40.8 (13-Mar-2008)
/dev/block/mmcblk0p2: clean, 11/249856 files, 39620/499713 blocks
[ ] Mounting ext partitions
mount: mounting /dev/block/mmcblk0p2 on /system/sd failed: No such file or directory
[X] Mounting ext partition failed.
[X] Can't continue script...aborting.
[X] SD card not mounted. Install can't continue.
Problem may be one of the following:

But I was able to manually mount the ext3 partition to /sdcard/sd for instance.
 

schpinn

Senior Member
May 23, 2010
83
0
0
It works! Excellent :).

One question, I tried enabling JIT and got the following errors, but I don't know exactly what they mean.

[ ] Launching Darktremor A2SD
[*] Starting Darktremor Apps2SD version 2.7.5 PF3 (Preview Fix 3)
[ ] Starting Apps2SD in jit mode
[ ] Running A2SD JIT Install Program.
[ ] Remounting /system in read-write
[ ] Running JIT Setup.
[ ] Installing JIT.
[ ] Backing up critical files.
cp: cannot create '/data/dalvik-backup/build.prop': No such file or directory
cp: cannot create '/data/dalvik-backup/bin/dalvikvm': No such file or directory
cp: cannot create '/data/dalvik-backup/lib/libdvm.so': No such file or directory

cp: cannot create '/data/dalvik-backup/lib/libnativehelper.so': No such file or
directory
cp: cannot stat '/system/app/HtcLockScreen.apk': No such file or directory
[ ] Modifying /system/build.prop
[ ] Removing HTC Lock Screen (for stability)
[ ] Installing JIT
cp: cannot create '/system/bin/dalvikvm': File exists
cp: cannot create '/system/lib/libdvm.so': File exists
cp: cannot create '/system/lib/libnativehelper.so': File exists
[ ] Synchronizing...
[ ] Erasing contents of Dalvik-Cache
[ ] Rebooting Phone.
reboot returned
[ ] Remounting /system in read-only.
[ ] Setting File System Ready property to 1.
could not set property
 

tkirton

Senior Member
Jul 13, 2009
2,044
224
0
47
Katy Texas
www.darktremor.info
The dalvik-backup is pretty normal...it just means it couldn't find those files in /system/bin. Some roms have it, some don't.

The copying to the /system/bin and /system/lib concerns me...I checked the code, and the busybox cp command is told to force the copy (-f parameter). It doesn't look like that's happening here. I'll look into it and see if I can find out why that's happening.

It works! Excellent :).

One question, I tried enabling JIT and got the following errors, but I don't know exactly what they mean.

[ ] Launching Darktremor A2SD
[*] Starting Darktremor Apps2SD version 2.7.5 PF3 (Preview Fix 3)
[ ] Starting Apps2SD in jit mode
[ ] Running A2SD JIT Install Program.
[ ] Remounting /system in read-write
[ ] Running JIT Setup.
[ ] Installing JIT.
[ ] Backing up critical files.
cp: cannot create '/data/dalvik-backup/build.prop': No such file or directory
cp: cannot create '/data/dalvik-backup/bin/dalvikvm': No such file or directory
cp: cannot create '/data/dalvik-backup/lib/libdvm.so': No such file or directory

cp: cannot create '/data/dalvik-backup/lib/libnativehelper.so': No such file or
directory
cp: cannot stat '/system/app/HtcLockScreen.apk': No such file or directory
[ ] Modifying /system/build.prop
[ ] Removing HTC Lock Screen (for stability)
[ ] Installing JIT
cp: cannot create '/system/bin/dalvikvm': File exists
cp: cannot create '/system/lib/libdvm.so': File exists
cp: cannot create '/system/lib/libnativehelper.so': File exists
[ ] Synchronizing...
[ ] Erasing contents of Dalvik-Cache
[ ] Rebooting Phone.
reboot returned
[ ] Remounting /system in read-only.
[ ] Setting File System Ready property to 1.
could not set property
 

frullewulle

Senior Member
May 23, 2010
287
42
48
Woesten
The dalvik-backup is pretty normal...it just means it couldn't find those files in /system/bin. Some roms have it, some don't.

The copying to the /system/bin and /system/lib concerns me...I checked the code, and the busybox cp command is told to force the copy (-f parameter). It doesn't look like that's happening here. I'll look into it and see if I can find out why that's happening.
maybe you have to symlink those files afterwards ...
 

schpinn

Senior Member
May 23, 2010
83
0
0
The dalvik-backup is pretty normal...it just means it couldn't find those files in /system/bin. Some roms have it, some don't.

The copying to the /system/bin and /system/lib concerns me...I checked the code, and the busybox cp command is told to force the copy (-f parameter). It doesn't look like that's happening here. I'll look into it and see if I can find out why that's happening.
OK, if there's anything I can do to help you diagnose the problem please let me know.

EDIT: typo.
 
Last edited:

UltimoJedi

Senior Member
May 23, 2008
606
41
0
The first LADcity in the world
Hi,
I have tried this application but I don't succeed in making to work it as it would owe.
My problem is that it creates badly the run where they owe the apks to be preserved, to it creates here him to me:

/ data/app

instead that to create here it:

/ system/sd/app

and if I check with adb shell (-> su -> ls -l /data) I don't find me these lines:

dalvik-cache -> /system/sd/dalvik-cache
app-private -> /system/sd/app-private
app -> /system/sd/app
Is there a remedy? :confused:

I have made the test on:

- ROM rooter (poul) [r4]
- My personal ROM


For me Android is new as operating system and therefore I have little experience about it.

Thanks for the answers
 
Last edited:

schpinn

Senior Member
May 23, 2010
83
0
0
After a clean install of the latest Indigo Bean I flashed Darktremor again, ran a2sd jit in recovery, after rebooting got a bunch of FCs (phone and gapps if I'm not mistaken) and the device became totally unusable. Is this somehow fixable?
 

schpinn

Senior Member
May 23, 2010
83
0
0
This is what logcat had to say:

I/Process (22549): Sending signal. PID: 22549 SIG: 9
I/ActivityManager( 241): Process com.android.phone (pid 22549) has died.
I/ActivityManager( 241): Start proc com.android.phone for restart om.android.phone: pid=22559 uid=1001 gids={3002, 3001, 3003, 1015}
I/ActivityManager( 241): Low Memory: No more background processes.
D/dalvikvm(22559): Total arena pages for JIT: 2
D/dalvikvm(22559): Total arena pages for JIT: 3
E/dalvikvm(22559): Can't open dex cache '/data/dalvik-cache/[email protected]@[email protected]': No such file or directory
I/dalvikvm(22559): Unable to open or create cache for /system/app/Phone.apk (/data/dalvik-cache/[email protected]@[email protected])
D/AndroidRuntime(22559): Shutting down VM
W/dalvikvm(22559): threadid=3: thread exiting with uncaught exception (group=0x4001e178)
E/AndroidRuntime(22559): Uncaught handler: thread main exiting due to uncaught exception
E/AndroidRuntime(22559): java.lang.RuntimeException: Unable to instantiate application com.android.phone.PhoneApp: java.lang.ClassNotFoundException: com.android
.phone.PhoneApp in loader [email protected]
E/AndroidRuntime(22559): at android.app.ActivityThread$PackageInfo.makeApplication(ActivityThread.java:523)
E/AndroidRuntime(22559): at android.app.ActivityThread.handleBindApplicat
ion(ActivityThread.java:3996)
E/AndroidRuntime(22559): at android.app.ActivityThread.access$2900(ActivityThread.java:119)
E/AndroidRuntime(22559): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1901)
E/AndroidRuntime(22559): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(22559): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(22559): at android.app.ActivityThread.main(ActivityThrea
d.java:4363)
E/AndroidRuntime(22559): at java.lang.reflect.Method.invokeNative(Native
Method)
E/AndroidRuntime(22559): at java.lang.reflect.Method.invoke(Method.java:5
21)
E/AndroidRuntime(22559): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
E/AndroidRuntime(22559): at com.android.internal.os.ZygoteInit.main(Zygot
eInit.java:618)
E/AndroidRuntime(22559): at dalvik.system.NativeStart.main(Native Method)

E/AndroidRuntime(22559): Caused by: java.lang.ClassNotFoundException: com.android.phone.PhoneApp in loader [email protected]
E/AndroidRuntime(22559): at dalvik.system.PathClassLoader.findClass(PathC
lassLoader.java:243)
E/AndroidRuntime(22559): at java.lang.ClassLoader.loadClass(ClassLoader.j
ava:573)
E/AndroidRuntime(22559): at java.lang.ClassLoader.loadClass(ClassLoader.j
ava:532)
E/AndroidRuntime(22559): at android.app.Instrumentation.newApplication(In
strumentation.java:942)
E/AndroidRuntime(22559): at android.app.ActivityThread$PackageInfo.makeApplication(ActivityThread.java:518)
E/AndroidRuntime(22559): ... 11 more
I/Process ( 241): Sending signal. PID: 22559 SIG: 3
I/dalvikvm(22559): threadid=7: reacting to signal 3
W/ActivityManager( 241): Process com.android.phone has crashed too many times: killing!
I/dalvikvm(22559): Wrote stack trace to '/data/anr/traces.txt'
I/DumpStateReceiver( 241): Added state dump to 1 crashes
I/power ( 241): *** set_screen_state 0
D/SurfaceFlinger( 241): About to give-up screen, flinger = 0x115d38
 

tkirton

Senior Member
Jul 13, 2009
2,044
224
0
47
Katy Texas
www.darktremor.info
Thought I replied to this earlier...guess not.

JIT and SenseUI don't tend to work well together. Not sure if that's the issue here...I see you have a Low Memory issue (this looks oddly like the one that Flipzmode had on his).

Three things you can try:
1. Download 2.7.5 Preview Fix 4 - This was rebuilt last night due to the same issue you are seeing. I have tested on the Hero and all works well...unfortunately, I don't see the same issue you are seeing (or that Flipzmode saw). Hopefully, the rebuild will stop that.

2. After applying Dalvik JIT, erase the entire Dalvik-Cache (a2sd resetcache)

3. Increase the Dalvik Heap Size: 24mb = a2sd largeheap, 32mb = a2sd jumboheap.

This is what logcat had to say:
 

schpinn

Senior Member
May 23, 2010
83
0
0
Thought I replied to this earlier...guess not.

JIT and SenseUI don't tend to work well together. Not sure if that's the issue here...I see you have a Low Memory issue (this looks oddly like the one that Flipzmode had on his).

Three things you can try:
1. Download 2.7.5 Preview Fix 4 - This was rebuilt last night due to the same issue you are seeing. I have tested on the Hero and all works well...unfortunately, I don't see the same issue you are seeing (or that Flipzmode saw). Hopefully, the rebuild will stop that.

2. After applying Dalvik JIT, erase the entire Dalvik-Cache (a2sd resetcache)

3. Increase the Dalvik Heap Size: 24mb = a2sd largeheap, 32mb = a2sd jumboheap.
You actually had already answered, my bad, I crossposted this to the original discussion thread, sorry for that.

I tried the new version, but it got me stuck in a bootloop. Also tried using the old version again, increasing the Dalvik heap size, but it didn't help. And I always cleaned my Dalvik cache when enabling JIT.