yashsingh1/xdaforums huggingface dataset:
[Milestone XT720 Android Development] Mioze7Ae:
stock221-13-bugfix-1: Overclock persist / Link2SD / ext2 / ext3 / dalvik-cache to sd

Click here for bugfix-2

I hadn't expected Dexter to move on an update before the weekend :) :) :)

Anyway, here are the rest of the bugfixes I'd hoped to squeeze in now as a patch for 1.3.

Features:

Replace /system/oc with modular scripts in /system/etc/init.c/

Fix milestone overclock persistence

Add kousik's ext2/3 mount autodetection trick (ext4 not supported yet)

Changes modeled on CyanogenMod (e2fsck before mount, use noatime,nodiratime)

More control of /sd-ext. Create directories to enable things

/sd-ext/app (move /data/app to /sd-ext [apps2sd])

/sd-ext/dalvik-cache (move /data/dalvik-cache to /sd-ext)

/sd-ext/app-private (move /data/app-private to /sd-ext)

/sd-ext/link2sd (enable Link2SD 1.5.1 support)

Add support for Link2SD 1.5.1 (create /sd-ext/link2sd to enable)

See the README on github for more details. https://github.com/Mioze7Ae/XT720-patch
[Milestone XT720 Android Development] c19932:
so am I supposed to edit oc-settings or the "oc" file? I've been just editing the oc-settings
[Milestone XT720 Android Development] Mioze7Ae:
You're supposed to edit oc-settings to configure the module at boot.

If you want to disable the module even being loaded at all, you have to modify /system/oc.
[Milestone XT720 Android Development] TG2008:
Major BUG...

Hey guys,

Obviously I have an APP or a Setting on my phone that is causing a MAJOR PROBLEM...

I first noticed it with the last update. It was so bad that I went back to 2.1 to troubleshoot and ensure the problem wasn't hardware related; it wasn't.

I installed the latest 1.3 and the problem is back.

The Problem:

The battery drains FASTER than it can charge when connected to charger; yes, that's right. My phone will eventually die (within hours) even when connected to charger.

Has anyone else experienced this?

Again, I first saw it on 1.2b. It's also in 1.3.

Since no one else has mentioned it, it must be an app I am running; or settings I have set that don't agree with the 2 most recent revisions of the firmware.

****************

Edit to add:

I will remove my Milestone startup file; perhaps this is what is causing it? I finally got it setup in the last revision (and 1.3) but maybe I put in a wrong value? I'll update to let you all know if removing it solved the problem.

~Cheers
[Milestone XT720 Android Development] reverendkjr:
It's also possible that your charger is not working correctly.
[Milestone XT720 Android Development] Knoedelkopf:
The download link for version 1.3 is down.
[Milestone XT720 Android Development] 3rdstring:
I think Dexters link on the OP is wrong try this.

[edit] I had the address wrong, should work now. [/edit]
[Milestone XT720 Android Development] Knoedelkopf:
Not Found

The requested URL /xt720/xt72013.zip was not found on this server.

Edit: Now it works, thx!
[Milestone XT720 Android Development] Dexter_nlb:
sorry, its fixed in post #1 , not sure how that happened :-(
[Milestone XT720 Android Development] 3rdstring:
Can you the battery monitor to see what is using the battery?

(Settings >> About Phone >> Battery Use?)
[Milestone XT720 Android Development] c_urbanek:
16G class 6

Ive got cincy bell too, went to 16gb:) class 6, works great. couldn't find a class 10 in 16gb, IDK if they make one yet.
[Milestone XT720 Android Development] scumm_boy:
I'm having the same problem as before, Mioze7Ae. I apply this patch, and my phone just sits at the Motorola M screen. Restoring the 1.3 stock version fixes it.

Sent from my XT720
[Milestone XT720 Android Development] Mioze7Ae:
Does the new bootanimation show up after you've applied the patch? This seems different from the problem I thought I reproduced last time. I'd like to reproduce your partitioning.

Are you able to use adb? If so, do you mind booting into OpenRecovery and then using adb to do this and post the partition table:

$ [B]adb shell[/B]
Milestone XT720-Recovery:/
# [B]fdisk /dev/block/mmcblk0[/B]

Command (m for help): [B]p[/B]

[COLOR="Red"]Disk /dev/block/mmcblk0: 7958 MB, 7958691840 bytes
255 heads, 63 sectors/track, 967 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 * 1 837 6723138 c Win95 FAT32 (LBA)
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(0, 0, 0) logical=(0, 2, 4)
/dev/block/mmcblk0p2 838 967 1044225 83 Linux
[/COLOR]
Command (m for help): [B]q[/B]

Milestone XT720-Recovery:/
# [B]mkdir /sd-ext[/B]
Milestone XT720-Recovery:/
# [B]mount /dev/block/mmcblk0p2 /sd-ext[/B]
Milestone XT720-Recovery:/
# [B]mount | grep sd-ext[/B]
[COLOR="Red"]/dev/block/mmcblk0p2 on /sd-ext type ext2 (rw,errors=continue)[/COLOR]
Milestone XT720-Recovery:/
# [B]umount /sd-ext[/B]
Milestone XT720-Recovery:/
# [B]exit[/B]

I'm interested in the red parts.
[Milestone XT720 Android Development] scumm_boy:
No, I don't get the boot animation after I've applied the patch.

Here is the partition information for you:

fdisk /dev/block/mmcblk0

The number of cylinders for this disk is set to 242880.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p
p

Disk /dev/block/mmcblk0: 7958 MB, 7958691840 bytes
4 heads, 16 sectors/track, 242880 cylinders
Units = cylinders of 64 * 512 = 32768 bytes

Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 206456 6606591+ c Win95 FAT32 (LB
A)
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p2 206457 236859 972871 83 Linux
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p3 236859 240928 130225 82 Linux swap
Partition 3 does not end on cylinder boundary

mount | grep sd-ext
/dev/block/mmcblk0p2 on /sd-ext type ext2 (rw,errors=continue)
[Milestone XT720 Android Development] Mioze7Ae:
Ok, I'll try creating a swap partition--I've not done that before.
[Milestone XT720 Android Development] scumm_boy:
I don't even recall making a swap partition. I could probably blow that away and see if it makes a difference.
[Milestone XT720 Android Development] trajano:
Swap possible?

Is that possible now? I recall the kernels didn't include the swap module.
[Milestone XT720 Android Development] Mioze7Ae:
Just creating a swap didn't cause problems for me, so I've been trying to reproduce this partitioning exactly and I think I just don't have enough info... Can you go back to fdisk and

x

p

d

q

I should be able to reproduce the partitions exactly from those results. I think we have the same sdcard.
[Milestone XT720 Android Development] easye420:
Since ur in ohio you can get a 32gig class 10 for $100 From microcenter. com the sharonville location.
[Milestone XT720 Android Development] reverendkjr:
I love Micro Center. It's like tech heaven. but there is no way i'm spending $100 on a card right now. Next year, it'll be $30.
[Milestone XT720 Android Development] Mioze7Ae:
I don't think it works. scumm_boy has a persistent stuck on M at boot problem from before 1.3 that I'm trying to reproduce.
[Milestone XT720 Android Development] scumm_boy:
x is an unknown command in fdisk, p prints out what I already pasted, and d is delete partition... am I running a different version of fdisk?
[Milestone XT720 Android Development] ronnbon:
just a feedback: update 1.3 and patch from mioze worked fine for me- updated it about 8 hours ago.

Battery seems to be okay too.
[Milestone XT720 Android Development] sariugur:
is there any way to change the file type for video recording to "MP4" ??? i think we can have better quality and maybe lower file size with the right codecs and settings, right??
[Milestone XT720 Android Development] reverendkjr:
look for an app on the market called lgcamera. It will allow you to record in mp4, among other things.
[Milestone XT720 Android Development] Mioze7Ae:
How are you checking the encoding of the videos? Using the Camcorder app and Cincinnati Bell's class 2 card, I'm getting 24fps according to mplayer (same when using a 16GB class 10, btw):

$ [B]mplayer -identify -frames 0 2011-02-23_23-55-02_849.3gp[/B]
MPlayer SVN-r1.0~rc3+svn20090426-4.4.3 (C) 2000-2009 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing 2011-02-23_23-55-02_849.3gp.
libavformat file format detected.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x29f4220]multiple edit list entries, a/v desync might occur, patch welcome
ID_VIDEO_ID=0
[lavf] Video stream found, -vid 0
ID_AUDIO_ID=1
[lavf] Audio stream found, -aid 1
VIDEO: [mp4v] 1280x720 24bpp [B]24.000 fps[/B] 0.0 kbps ( 0.0 kbyte/s)
ID_FILENAME=2011-02-23_23-55-02_849.3gp
ID_DEMUXER=lavfpref
ID_VIDEO_FORMAT=mp4v
ID_VIDEO_BITRATE=0
[B]ID_VIDEO_WIDTH=1280
ID_VIDEO_HEIGHT=720
ID_VIDEO_FPS=24.000[/B]
ID_VIDEO_ASPECT=1.7778
ID_AUDIO_FORMAT=255
ID_AUDIO_BITRATE=0
ID_AUDIO_RATE=16000
ID_AUDIO_NCH=1
ID_LENGTH=16.13
ID_SEEKABLE=1
ID_CHAPTERS=0
open: No such file or directory
[MGA] Couldn't open: /dev/mga_vid
open: No such file or directory
[MGA] Couldn't open: /dev/mga_vid
[VO_TDFXFB] Can't open /dev/fb0: Permission denied.
[VO_3DFX] Unable to open /dev/3dfx.
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
ID_VIDEO_CODEC=ffodivx
==========================================================================
Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
FAAD: compressed input bitrate missing, assuming 128kbit/s!
AUDIO: 32000 Hz, 2 ch, s16le, 128.0 kbit/12.50% (ratio: 16000->128000)
ID_AUDIO_BITRATE=128000
ID_AUDIO_RATE=32000
ID_AUDIO_NCH=2
Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
AO: [pulse] 32000Hz 2ch s16le (2 bytes per sample)
ID_AUDIO_CODEC=faad
Starting playback...

Exiting... (End of file)
ID_EXIT=EOF
[Milestone XT720 Android Development] reverendkjr:
I'm copying the file over to windows and checking there. Properties shows 21 fps on almost all the videos I take.
[Milestone XT720 Android Development] sariugur:
i'll check it ;)
[Milestone XT720 Android Development] Mioze7Ae:
You're right... Windows 7 says the same file is 21fps. :confused: We need to figure out something authoritative... I'll try a Mac. They don't have bugs for non-quicktime file formats, right? :D I also tried the linux movie player Totem, and it also says 24fps, but it may be using the same backend libraries.
[Milestone XT720 Android Development] reverendkjr:
I am curious to see what an impartial party has to say about this. I think I believe Windows over Linux. Don't tell anyone I said that... :eek:
[Milestone XT720 Android Development] Mioze7Ae:
Ok, so I was reading this, https://supportforums.motorola.com/thread/40629 which has a post copied from XDA which I think comes from http://xdaforums.com/showthread.php?t=758014

Along with general *****ing about the poor quality of Motorola's camera sensors, basically what they're saying is the actual frame rate will depend on how much light is hitting the sensor. Brighter scenes record frames faster. So, the container is probably nominally marked 24fps as a target (which is what linux is reporting) but the actual frame rate is variable which Windows reports.

To confirm this, I took a video filling the screen with the florescent fixture above my head and another video looking at the dark recesses below my desk. The lights came up at 23fps in Windows and the darkness came up at 21fps.
[Milestone XT720 Android Development] scumm_boy:
Okay, so I managed to get the patch working. First I deleted that Linux Swap partition on my SD card. Then I nandroid'd a fresh copy of 1.3, and wiped the user data and Dalvik cache. After a successful boot, I went back into OpenRecovery and ran your patch, and wiped the user data again. The boot took a while, and I had to do a couple of battery pulls during the inital setup, but I now have it running with Milestone Overclock and SetCPU both working properly at boot.
[Milestone XT720 Android Development] B_e_n:
So what are the best way to part the sd?? Swap or not? ext3 or not? witch one first???

I m a bit lost....
[Milestone XT720 Android Development] scumm_boy:
I spoke too soon :( I managed to get my device booting with the patch, but every time I tried to update a program (specifically Facebook and Gmail) it would hard lock on "Installing" and I would need to do a battery pull to reboot the phone.

For the time being I have gone back to a stock 1.3 just for stability's sake.
[Milestone XT720 Android Development] Mioze7Ae:
What are you using to partition the card? Did you use Ubuntu to format the ext? Also, are you partitioning with the card in the phone or are you removing it (better)? The thing about the android kernel is it doesn't reload the partition tables (I don't even know if it can without rebooting, but rebooting can hose your partitions if the kernel flushes filesystems to their old locations.) I ended with a really messed up sdcard when I first started because I assumed the android kernel behaved like Ubuntu's.

You may want to

remove the sdcard, and insert directly into your Ubuntu box

backup the fat partition (you need the OpenRecovery files),

use gparted

delete all partitions on the sdcard using gparted

Create a fat32 primary partition leaving 512mb-1gb(1024mb) free for an ext2 (or ext3) partition (I use 1gb ext3)

Set the boot flag on the fat32 partition.

create a primary ext2 (or 3) partition in the remaining 512-1gb

copy back the files from the old fat32 to the new fat32

I cannot stress how little faith I now have in modifying partitions through USB access mode.
[Milestone XT720 Android Development] hellmonger:
Il try it where is the patch i' sure my partitions are good.
[Milestone XT720 Android Development] scumm_boy:
I will try this once I get back to my ubuntu machine. Thanks so much for your Help!
[Milestone XT720 Android Development] hellmonger:
Wheres the patch?????

Found it!
[Milestone XT720 Android Development] hellmonger:
stock221v13-bugfix-1.zip

Perfect!!! Milestone OC saves settings !!!! no issues so far! install Apps NP! :)
[Milestone XT720 Android Development] hellmonger:
Finger dance light will not install -18 error same with a few other games Links2sd says i have apps2sd installed and gun bros just closes!
[Milestone XT720 Android Development] R-D:
I haven't had a chance to re-try oc-settings, but have had some other strangeness which may or may not be related. [Edit: Not related, bootanimation.zip issue, the other errors may still be of value so I will leave them here]

If I power off the phone (through the menu), when I boot back up it takes 2-3 minutes at the splash screen (boot animation).

When the screen finally comes up, it is at lock screen and when I unlock it immediately has on the screen:

Sorry!

Process system is not responding.

With Force Close or Wait.

In behind this message is the selection box for default Home or ADWLauncher. If I pick Wait or FC I can pick my launcher as normal.

I tried booting up with DDMS running, I didn't notice anything too out of the ordinary but I thought I would share a few errors I saw, not sure if they are important;

02-25 20:10:44.335: DEBUG/dalvikvm(2002): Trying to load lib lib_glossary.so 0x0

02-25 20:10:44.335: INFO/dalvikvm(2002): Unable to dlopen(lib_glossary.so): Cannot load library: load_library[1051]: Library 'lib_glossary.so' not found

02-25 20:10:44.335: ERROR/MBGlossaryManager(2002): lib_glossary.so can't be loaded

02-25 20:11:08.601: ERROR/(1651): A component of name 'OMX.TI.JPEG.Encoder' already exists, ignoring this one.

02-25 20:11:08.601: ERROR/(1651): A component of name 'OMX.TI.Video.Decoder' already exists, ignoring this one.

02-25 20:11:08.601: ERROR/(1651): A component of name 'OMX.TI.Video.encoder' already exists, ignoring this one.

02-25 20:11:08.601: ERROR/(1651): A component of name 'OMX.TI.AMR.encode' already exists, ignoring this one.

02-25 20:11:08.601: ERROR/(1651): A component of name 'OMX.TI.WBAMR.encode' already exists, ignoring this one.

02-25 20:11:08.601: ERROR/(1651): A component of name 'OMX.TI.AAC.encode' already exists, ignoring this one.

I think I will reformat my SD card and see if it helps and also get rid of SWAP partition. To get the apps back onto the phone first do I just move everything in /sd-ext/app to /data/app ?
[Milestone XT720 Android Development] eaglegreek:
guys i am stuck in this screen after following the instrucitons above

this keeps on going with android loading.

please help!!! is there a any way to fix this?

thanks in advance
[Milestone XT720 Android Development] 3rdstring:
I saw the same thing while trying different boot animations, some work fine but some cause the extended boot time & the force close error.
[Milestone XT720 Android Development] Mioze7Ae:
For Link2SD to work you can't have /sd-ext/app. If you have /sd-ext/app at boot then /data/app is set up as a symbolic link to /sd-ext/app and Link2SD will give that error. You have to have one or the other. Migrating from apps2sd to Link2SD is currently a manual process that require some terminal proficiency. If you use adb from OpenRecovery, your ext partition will have been automouted to /sddata at boot. You can't delete or rename /sd-ext/app from non-OpenRecovery adb (believe me I've tried)--the directory will be back after you reboot. Another safe choice is to remove the card and make the changes on a linux computer. One good approach is to first rename /sd-ext/app to /sd-ext/app.old. Then after reboot move/copy apk's from /sd-ext/app.old to /data/app and reboot again.

Did those games work on one of Dexter's earlier 2.2 releases?
[Milestone XT720 Android Development] eaglegreek:
please help!!! android won't load... i waited for like 30 minutes and i can't turn-off the phone. i need to take out the battery.

help will greatly appreciated
[Milestone XT720 Android Development] Mioze7Ae:
Remove battery.

Press and hold volume up button while replacing battery and powering on until you reenter OpenRecovery.

Wipe Data / Factory Reset.

Reboot
[Milestone XT720 Android Development] R-D:
Thanks, I had no idea the bootanimation itself could cause this so I didn't think of removing it.

I replaced the boot animation with the stock bootanimation.zip from 2.1. This solved the slow boot and Force Close error on boot.

In case anyone wants the stock animation I have attached it here as well.
[Milestone XT720 Android Development] Mioze7Ae:
Is the md5sum of /system/framework/framework.jar on your phone 5cab441f557365153a4e331e15fc6faf ?
[Milestone XT720 Android Development] R-D:
md5sum /system/framework/framework.jar
5cab441f557365153a4e331e15fc6faf /system/framework/framework.jar
[Milestone XT720 Android Development] Mioze7Ae:
Yes. But be aware that 1.3 without the patch will automatically move them right back at boot and remove them from /data/app. You can also just back them up somewhere while you repartition and then copy them back into /sd-ext/app on the freshly formatted partition.
[Milestone XT720 Android Development] eaglegreek:
thanks for the help... i totally missed those few last but important steps

thanks again...
[Milestone XT720 Android Development] R-D:
Thanks for the note on ubuntu, I was pulling the sdcard without ejecting first, I made sure it was not writing but that could be an issue, I will eject it first now on.

I am assuming by updating the freq table that when I am in Milestone Overclock the pre-set steps on the slider will be what I have entered?

Editing before I post - I was about to paste my oc-settings file and have a question - in the oc script right now the lines are commented out but they are:

# echo 46 > /proc/overclock/max_vsel
# echo 800000 > /proc/overclock/max_rate
# echo 1 125000000 12 > /proc/overclock/mpu_opps
# echo 2 250000000 26 > /proc/overclock/mpu_opps
# echo 3 400000000 30 > /proc/overclock/mpu_opps
# echo 4 600000000 34 > /proc/overclock/mpu_opps
# echo 5 800000000 46 > /proc/overclock/mpu_opps
# echo 0 800000 > /proc/overclock/freq_table
# echo 1 400000 > /proc/overclock/freq_table
# echo 2 250000 > /proc/overclock/freq_table
# echo 3 125000 > /proc/overclock/freq_table

I used this same sample as my base for my original oc-settings file.

Two problems;

1) Only the first echo to each file should be a single >, the subsequent echo commands should be a double >> so as to append the file, not overwrite it. For example:

$ echo 1 > newfile
$ echo 2 > newfile
[COLOR="Red"]$ cat newfile
2[/COLOR]

$ echo 1 > newfile
$ echo 2 >> newfile
[COLOR="SeaGreen"]$ cat newfile
1
2[/COLOR]

2) The existing files are formatted with additional information, not just:

1 125000000 32​

but

mpu_opps[1] rate=125000000 opp_id=1 vsel=32​

Should we not be maintaining this same file format, or does it also read it okay with the simpler format?
[Milestone XT720 Android Development] reverendkjr:
I know these questions will be asked:

Is the patch supposed to create anything on the /sd-ext? If I reformat, what steps should I take afterwards to assure the best performance of my newly formatted ext3 partition? Can I just dump any apps that I want onto the /sd-ext/app directory and they'll work?
[Milestone XT720 Android Development] Mioze7Ae:
These aren't really files. The /proc is a filesystem-like interface to communicate with the kernel. They very often behave differently when read or written to. It's up to the kernel module to understand what you're writing to it. At the least the >> is not needed, but I don't know if it does any harm. See

http://code.google.com/p/milestone-overclock/wiki/KernelModule#Changing_the_frequency/vsel_tables
[Milestone XT720 Android Development] R-D:
Ah okay, that explains that. :) Didn't know how that worked.

So in that case, here is my non-working oc-settings file, is there some other obvious error I am overlooking?

#!/system/bin/sh
echo 56 > /proc/overclock/max_vsel
echo 850000 > /proc/overclock/max_rate
echo 1 250000000 38 > /proc/overclock/mpu_opps
echo 2 400000000 42 > /proc/overclock/mpu_opps
echo 3 550000000 46 > /proc/overclock/mpu_opps
echo 4 720000000 52 > /proc/overclock/mpu_opps
echo 5 850000000 56 > /proc/overclock/mpu_opps
echo 6 1000000000 58 > /proc/overclock/mpu_opps
echo 0 1000000 > /proc/overclock/freq_table
echo 1 850000 > /proc/overclock/freq_table
echo 2 720000 > /proc/overclock/freq_table
echo 3 550000 > /proc/overclock/freq_table
echo 4 400000 > /proc/overclock/freq_table
echo 5 250000 > /proc/overclock/freq_table

Edit: Can I execute this manually or does it have to be done during boot?
[Milestone XT720 Android Development] Mioze7Ae:
For a freshly formated /sd-ext by default nothing will happen.

If you want app2sd create an empty /sd-ext/app directory and at boot app2sd will be enabled and all apps will be moved from /data/app to /sd-ext/app automatically.

If you want to move the dalvik-cache to /sd-ext, create an empty /sd-ext/dalvik-cache and at boot dalvik-cache will be moved to /sd-ext (can be slow the first boot)

If you want link2sd create an empty /sd-ext/link2sd directory

Don't do both /sd-ext/link2sd and /sd-ext/app If you do, link2sd will refuse to run.

Personally, I've been using /sd-ext/link2sd and /sd-ext/dalvik-cache.

The idea is that later a menu could be added to OpenRecovery to manage this, but that's down the road.
[Milestone XT720 Android Development] Mioze7Ae:
Yes, you can execute it manually. But there must be something wrong with your tables because they crash my phone. I've only ever set max_vsel and max_rate from oc-settings and I haven't tried to modify the tables myself.
[Milestone XT720 Android Development] reverendkjr:
That is exactly what I was looking for. Thank you. I'm eventually going to make another tutorial video explaining the process for all of this.
[Milestone XT720 Android Development] earthsword:
Hurray! i am getting really confused by all the terms used in this forum. Any tutorial would really help greatly!