yashsingh1/xdaforums huggingface dataset:
[Milestone XT720 Android Development] Shadowdancer123:
Yes, I have all sensors working as expected, A-GPS works too, other versions caused hard reboots.

I did not however flash the SBF on this page, since it caused boot loops.. I used one on fjfalcons private ftp (came up when googling)

http://fjfalcon.ru/xt720/sbf/

and STR_U2_03.20.1.sbf file
[Milestone XT720 Android Development] Mioze7Ae:
Did you flash the boot.img included with the XDA Special?
[Milestone XT720 Android Development] B_e_n:
yes i restore all in nandroid
[Milestone XT720 Android Development] peshovec:
I am glad to report that i am wrong:):):)

Actually just after the phone is booted, the above values are the ones from the first init scripts (e.g. init.rc and init.maphone_umts.rc from the boot.img)......

....but after while (i have checked about 15 minutes later) they are as (if) modified by the 2ndinit init scripts (e.g. the init* in ramdisk.tar or /etc/rootfs ....)

So i think the door for memory management (as it should be) is open:):):):) (e.g. we are able to change both android framework and kernel level thresholds:)

My personal choice (at least for now) is both to be equal (somewhere between stock presets for 128 MB Ram and stock presests for 256 MB Ram, as i think froyo needs at least little bit more free ram (for the jit) ).

And as I usually use just few application (at a time), i think to lower (may be with 10%, the kernel level ones). This way i expect more smooth multitasking, at the expense of may be slower first time run of newly started application (which is rare with my usage pattern :) )
[Milestone XT720 Android Development] Mioze7Ae:
I've read multiple places that you can't modify ro.* properties but I've also felt like I've been able to change some and it confused me at the time, but I'd forgotten about it. Probably it's a security mechanism for production ROMs that we're either disabling or bypassing. Maybe it's an additional result of setting ro.secure=0 in default.prop or because we have su (just guesses). So maybe those comments in Motorola's init files only apply to the production mode.

Also, I've been quite happy with these settings the past few days:

setprop ro.FOREGROUND_APP_MEM 1536
setprop ro.VISIBLE_APP_MEM 2048
setprop ro.SECONDARY_SERVER_MEM 4096
setprop ro.BACKUP_APP_MEM 10240
setprop ro.HOME_APP_MEM 10240
setprop ro.HIDDEN_APP_MEM 12800
setprop ro.CONTENT_PROVIDER_MEM 15360
setprop ro.EMPTY_APP_MEM 15360

write /sys/module/lowmemorykiller/parameters/minfree 1536,2048,4096,10240,12800,15360

Edit: looking at that now, I think I secondary_server_mem is lower than I intended. I'm going to try some changes.

Edit2: Ok, this is what I'm going to try for a while:

setprop ro.FOREGROUND_APP_MEM 1536 # 6MB
setprop ro.VISIBLE_APP_MEM 2048 # 8MB
setprop ro.SECONDARY_SERVER_MEM 9216 # 36MB
setprop ro.BACKUP_APP_MEM 9216 # 36MB
setprop ro.HOME_APP_MEM 4096 # 16MB
setprop ro.HIDDEN_APP_MEM 15360 # 60MB
setprop ro.CONTENT_PROVIDER_MEM 17920 # 70MB
setprop ro.EMPTY_APP_MEM 20480 # 80MB

# 6MB, 8MB,16MB, 40MB, 50MB, 60MB
write /sys/module/lowmemorykiller/parameters/minfree 1536,2048,4096,10240,12800,15360

Note the mismatch between the setprops and the minfree. The intent is to set the kernel to be less stringent than ActivityManagerService on background processes (basically the kernel is set to AutoKiller's "Optimal" setting but the ActivityManagerService is set to "Strict" with the difference that the secondary server values are taken from the 128mb and 256mb values listed in Motorola's Motoroi init.rc's). I have no idea if this is a good idea or a bad idea. I'll keep this on for a few days and report back. One thing in particular that I'm not sure about is whether ActivityManagerService requires the kernel to signal it at the same memory boundaries when the memory limits are hit to function properly (maybe by throwing intents or something). If so, this is probably not so hot an idea. But rather than do something boring like look at the code or use search, I'll do this empirically... for science!

Edit3: Changed home_app to 4096
[Milestone XT720 Android Development] Shadowdancer123:
Any way to patch the wifi?

It says connecting and authorizing over and over again until it says (disabled) next to the name after maybe 10 tries.
[Milestone XT720 Android Development] LibertyMonger:
My Wifi has been fine. Connects easily. Which ROM are you using? I am using Stock Special. Doesn't seem to be an issue with WiFi.
[Milestone XT720 Android Development] LibertyMonger:
It's not the sbf causing bootloops bud, a fix for that is being worked on. Usually can just reboot to fix it for now.
[Milestone XT720 Android Development] c_urbanek:
CBW SBF

Can you run this rom on top of CincyBell's 2.1 SBF? :confused:
[Milestone XT720 Android Development] peshovec:
IMHO i have figured it out...

Comparing getprop from adb shell and from connectbot (e.g. via usb debuging and directly in phone terminal).

via debuging line (adb shell) getprop return no dns, and old _MEM settings.

on the phone, return the dns settings and the newly _MEM settings:)

it seemed like adb shell was looking at old stale environment... checked and two (2) instances of adbd where running... killed them, reenabled usb debuging (so new instance of adbd was started) and voila:)

adb shell started to show the new environment settings (getprop return dns, show the new _MEM settings...)

This actually is not so important, but i start wondering if some other processes (instead of just adb) are started in "the old" environment? and if any, will it be better to restart them? (so everything will be fresh and according the newer settings...)

btw, still dosen't had time to check, how the sh_hijack understand when to hijack, and when dosen't have to...

edit: just find it. just before 2ndint there is /init, kernel processes ,"/system/xbin/busybox sh /system/bin/mot_boot_mode" and adbd, nothing more:)

so to sleep well, just added

/system/xbin/busybox_16 pkill adbd

in /system/bin/mot_boot_mode.p1.sh just before 2ndint invocation.

btw, i just remember for some additional block layer "optimizations"

echo 640 > /sys/devices/virtual/bdi/179\:0/read_ahead_kb
echo 640 > /sys/devices/virtual/bdi/31\:0/read_ahead_kb
mount -o remount,noatime /data
echo 0 > /sys/block/mtdblock7/queue/rotational
echo 0 > /sys/block/mtdblock9/queue/rotational
echo 0 > /sys/block/mtdblock10/queue/rotational

echo noop > /sys/block/mmcblk0/queue/scheduler
echo noop > /sys/block/mtdblock7/queue/scheduler
echo noop > /sys/block/mtdblock9/queue/scheduler
echo noop > /sys/block/mtdblock10/queue/scheduler

honestly, there is no need of all of the mtdblocks, one is enough, but so it looks better:)

(if someone is curious :

mtd7 system

mtd10 cust

mtd9 data

)

basically it just tell the kernel that mtdblock (e.g. internal nand) is not rotational device (about mmc e.g. the sdcard it was already that way)

and change the io scheduler from cfq to noop (because we don't need optimization for mechanical rotation devices)
[Milestone XT720 Android Development] hellmonger:
For Science!
[Milestone XT720 Android Development] peshovec:
augh, hate to edit my posts after not my posts...

so will post new...

https://github.com/nadlabak/android_system_core/commit/6c27adb5b0e33f214c48ee2411a717f6343c81b8

or just find how the sh_hijack works:)

so all seems pretty good, and i am planing to switch to it (instead of mot_boot_mode.p[12].sh )

before that i will try to make sure, that after replacing sh binaries, openrecovery will still works:)

edit: it seems that today i write to much (and probably to fast).. but anyway...

just pulled /system/bin/sh

and ....

~$ strings /tmp/sh | cgrep prep
/init_prep_keypad.sh

or it seems that the binary is ready:) will run small test....

edit2: okay it looks like it will be better if i stop writing (at least today:)

but look that beauty:

/system/bin/sh /init_prep_keypad.sh
/system/bin/sh: Can't open /system/bin/sh_hijack.sh

the door for switching from mot_boot_mode to sh_hijack is wide open:)

edit last for today promise:

done:)

as simple as that:

/system/bin$ ls -al mot_boot_mode*
lrwxrwxrwx 1 0 0 17 Jul 26 16:22 mot_boot_mode -> mot_boot_mode.bin
-rwxr-xr-x 1 0 2000 5508 Jul 15 12:29 mot_boot_mode.bin
-rwxr-xr-x 1 0 0 548 Jul 26 15:50 mot_boot_mode.p1.sh
-rwxr-xr-x 1 0 0 99 Jul 26 15:34 mot_boot_mode.p2.sh
lrwxrwxrwx 1 0 0 24 Jul 15 12:29 mot_boot_mode_lwhijack -> /system/lw/mot_boot_mode

/system/bin$ cat sh_hijack.sh | uniq

#!/system/xbin/busybox sh
/system/xbin/busybox mount -oremount,rw rootfs /
/system/xbin/busybox cp /system/rootfs/* /
#/system/xbin/busybox tar xf /system/ramdisk.tar -C /
#/system/xbin/busybox tar xf /system/raminit.tar -C /
/system/xbin/busybox chmod 666 /dev/usb_device_mode
#/system/xbin/busybox mount -obind /system/lw2 /system/lw
#/system/xbin/busybox echo "will execute 2nd init" > /boot.log
#/system/xbin/busybox ps >> /boot.log

/system/xbin/busybox_16 pkill adbd

#/system/xbin/busybox echo "after pkill adbd" >> /boot.log
#/system/xbin/busybox ps >> /boot.log
/system/bin/2nd-init

openrecovery still works as expected

don't forget :

copy /init_prep_keypad.sh to another location (i use /system/)

populate /system/rootfs

ls -al /system/rootfs/
total 40
drwxrwxrwx 1 0 0 2048 Jul 26 16:17 .
drwxr-xr-x 1 0 0 2048 Jul 26 16:17 ..
-rw-r--r-- 1 0 0 146 Jul 26 16:17 default.prop
-rwxr-xr-x 1 0 0 19678 Jul 26 16:20 init.mapphone_umts.rc
-rwxr-xr-x 1 0 0 15825 Jul 26 16:17 init.rc

and don't forget to modify /system/rootfs/init.mapphone_umts.rc

exec /system/init_prep_keypad.sh

/system/rootfs
[Milestone XT720 Android Development] JiroPrinz8:
Is there any possibility we can incorporate peshovec's optimizations onto the stock special please? Like an update or even a new nandroid wouldn't be too bad.. Just a thought, as for a noob like me all those listed above are just letters.. hehehe!! Thanks for all the hardwork guys! :D
[Milestone XT720 Android Development] LibertyMonger:
HaHa I'm itchin to flash something too lol. It's been about a week, havin withdrawals lmao.

Here is the only problems I seem to have everything else is great. Just thought I would refresh where i am since i been running it for about 3-4 days.

I occasionally get "lost connection to server" and i.m.'s don't send but still show good signal. Also timeouts where my texts won't send. Not sure how often it occurs but seems it happens more than normal. and Email pops up saying it has to forceclose. Without having it open. Also notifications for emails do not work. and whenever I open contacts it says usim synch.

I was playing cut the rope and samurai last night nice and smooth no probs.

You can and it will seem fine but it's not recommended. Tv-out will not work and maybe other little problems. It is recommended to flash the Singapore sbf first.
[Milestone XT720 Android Development] Shadowdancer123:
SO I finally made this work for me...

The SBF that is on the front page of this thread, causes my WIFI and ALL sensors to go dead, including proximity sensor and earpiece volume...

What I made was this, I found the Singapore 2.1 rom, flashed it (phone says starhub on boot)

I ran the official reset data (phone kept boot looping forever when going from UK rom)

Steps from Motorola homepage:

"Turn off phone

Press Power key + Camera Key + GalleryKey to power on the phone and bring up the recovery screen

When the Triangle/Exclamation point screen appears, press Volume Up + Gallery Key down and tap the camera key to show the recovery menu.

When the recovery window appears, use the volume up/down keys to navigate the menu and the camera key to enter your selection.

Select Wipe data/factory reset

Select Reboot Phone"

After this, I was greeted with an unlock screen and could install recovery and "XT720 special stock beta"

Now EVERYTHING works, buttons, TV out through 3,5mm, and sensors are much smoother, no more jittery steering wheel in NFS Shift.

And of course: Phone is brutalizing the iPhone 4 in everything, it's so fast I feel stressed out...

I get 1300 points in Quadrant, I was never above 900 before, even overclocked to 1.2ghz on Dexter.
[Milestone XT720 Android Development] hellmonger:
Great work btw, how can i change these settings and make them permanent, like where are they exactly? in the boot img?

setprop ro.FOREGROUND_APP_MEM 1536
setprop ro.VISIBLE_APP_MEM 2048
setprop ro.SECONDARY_SERVER_MEM 4096
setprop ro.BACKUP_APP_MEM 4096
setprop ro.HOME_APP_MEM 4096
setprop ro.HIDDEN_APP_MEM 5120
setprop ro.CONTENT_PROVIDER_MEM 5632
setprop ro.EMPTY_APP_MEM 6144
[Milestone XT720 Android Development] JiroPrinz8:
A little help guys, so i decided to delete the handcent app that came with the rom as i wanted to upgrade to the latest version, now i can't inatall the latest version from anywhere.. i deleted syst/app/handcent and also deleted dalvik cache for handcent, rebooted, and now it always says application not installed.. any ideas..? Flashing all over again is my last resort obviously .. thanks!!
[Milestone XT720 Android Development] Mioze7Ae:
They are in /system/etc/rootfs/init.rc and /system/etc/rootfs/init.mapphone_umts.rc (sh_hijack.sh replace the ones from boot.img with copies of the immediately before 2nd-init). The settings go in both files and also don't forget the minfree settings in both files (a few lines below).
[Milestone XT720 Android Development] LibertyMonger:
Volume-Down bootloater feature Five stars!

Great work on everything Mioze7Ae but wanted to say awesome touch with the volume down on bootup feature. It makes it really nice and convenient when switching to my backup battery everday. Before I would have to boot all the way first before rebooting into bootloader to fastboot the fjkernel. now all I have to is hold volume down as I turn my phone back on from the battery switch. Genius move bud!
[Milestone XT720 Android Development] reaperzero:
one word. the boot animation is *AMAZING!*
[Milestone XT720 Android Development] Hahutzy:
Alfa? What's that?
[Milestone XT720 Android Development] reaperzero:
alfa romero?

or does he mean that the rom is in its ALPHA stage of its dev?
[Milestone XT720 Android Development] Shadowdancer123:
Go to manage applications, and see if you can find handcent there and click uninstall.

Some root uninstallers don't remove settings, so phone thinks it's still installed.
[Milestone XT720 Android Development] Knoedelkopf:
Hmm milestone overclock doesn't autoload for me, using fjfalcon's ROM??
[Milestone XT720 Android Development] Woody:
Me and Mioze were having this conversation the other day.

Check out this thread

http://xdaforums.com/showthread.php?p=15976244#post15976244
[Milestone XT720 Android Development] hellmonger:
Ok great thanks man, i made a few nice modifications that will keep the Home app alive and leave more RAM available, so thats good

Now the bad news, there is something really messed up with the apps2sd scripts,

Suck on M and bootloop galor any ideas where i should start?

My Experience Stuck on M

Reboot some times resolves some times dosen't

Boot loop some times resolves some times does not

Damn inconsistent 3$%
[Milestone XT720 Android Development] Mioze7Ae:
Let's throw them out.

My initial approach for ESB was to port the darktremor scripts since they've got a pretty big user base:

http://xdaforums.com/showthread.php?t=715116

another reason I was interested is that we could maybe use A2SDGUI to manage it all:

http://xdaforums.com/showthread.php?p=12069632#post12069632

https://market.android.com/details?id=com.elgubbo.a2sdGUI

But the a2sdgui doesn't run on 2.1 and I was having some difficulty getting the scripts to work on eclair (they're quite complicated and I wasn't quite sure which version to use) so I tried something different. I propose that's what we go for darktremor. Objections? Let's start with version 2.7.5.2-1

Alternative: What's the most popular way to do this on Milestone A853?
[Milestone XT720 Android Development] syrenz:
Have there been any new versions of this ROM put up recently? Can't be bothered to sort through the last 15 pages :p

I'm going to be going away for a few weeks soon and likely won't be able to flash anything during that time so I'm looking for stable, fast and complete ROM (that I like) to keep for a while... Might use 2.1 for that time, since it simply works for me - but if there's a new version of this ROM with the completed theme I'd jump to that.

Thanks :)
[Milestone XT720 Android Development] Mioze7Ae:
Dangerous experimental update

Here's an update for Stock XDA Special (also works with WanHu+Mz05, probably works for the other XDA Special) that

Completely replaces /system/etc/init.d (i.e. if you have anything custom there, it will be deleted, make a backup)

Completely removes app2ext support

Completely removes link2sd support

Completely removes memhack (dalvik-cache to /cache) support

Completely removes automatic mounting of swap

Adds ext2 and ext3 modules (UNTESTED)

Adds overclock preferences hack (TESTED)

Prepares for install of Darktremor A2SD dtapps2sd-2.7.5.2-1-signed.zip (MINIMALLY TESTED)

Prepares for Link2SD (UNTESTED)

YOU MUST WIPE CACHE PARTITION AFTER APPLYING

Upgrade proceedure:

MAKE BACKUPS! PUT THEM SOMEWHERE SAFE! THIS MAY EAT YOUR DATA!

Download update-XDASpecial-Mz01.zip

Download dtapps2sd-2.7.5.2-1-signed.zip from

Place both in /sdcard/OpenRecovery/updates

Boot to OpenRecovery

OpenRecovery > Apply Update > update-XDASpecial-Mz01.zip

OpenRecovery > Apply Update > dtapps2sd-2.7.5.2-1-signed.zip

OpenRecovery > Wipe Cache Partition (MINIMUM)

OpenRecovery > Wipe Data / Cache Partition (hopefully optional, possibly required)

Reboot (will take a while because dalvik is rebuilt)

In the old regime, you controlled things by creating directories on your /sd-ext. That nolonger works. Now you use the darktremor scripts. These are described here. Briefly:

Move dalvik-cache to /cache: a2sd cachepart

Move dalvik-cache to ext2/3/4 partition: a2sd cachesd

Move apps to ext2/3/4 partition: a2sd install

Move apps back from ext2/3/4 partition: a2sd remove

Also, many more commands check the docs

Or try the app frontend: A2SDGUI (seems somewhat buggy)

I have no idea whether Link2SD can work after update-XDASpecial-Mz01.zip is applied. I expect Link2SD to work if dtapps2sd-2.7.5.2-1-signed.zip has not been applied. In the past because of the automatic app2ext in Dexter's ROM, it was impossible to use the Link2SD init script. We probably need a better solution because (at least in the past) the init.d script install script has been somewhat naive and doesn't do things like filesystem checks.

The darktremor scripts are supposed to have swap support (UNTESTED).

MAKE BACKUPS! REPORT SUCCESS/FAILURE!
[Milestone XT720 Android Development] jigglynuts:
applied updates with no problem. I did have to wipe data and cache/partition which is not a huge deal to me. I have not had a chance to get too in depth yet but will update as soon as I do.
[Milestone XT720 Android Development] Shadowdancer123:
I found that the phone will boot if restarted if I unplug the SD card.

This is however the only bug I've encountered as of yet.

I had 70% battery left at midnight last night!!

I always reach critical after 18 hours, outstanding.

The phone is as fast as a retarded goat, and everything runs stable.

AND I get tv-out! Finally emulator games on the TV lag free!

Some minor tweaks and this is the ultimate rom imo.

Using SINGAPORE Starhub rom however, all other SBF I tried, Russian, UK and Korea all worked like crap. The rom on the first page of this thread is wrong!

You should replace the link.
[Milestone XT720 Android Development] LibertyMonger:
PLMN Registration Failed

I just flashed the update and have no homescreen. I think it might be cause I flashed over top 3rd's theme. So I will have to try again fresh. I also been getting this error message saying PLMN Registration Failed. And got it again both times I rebooted after the update.

**EDIT**

OOPs nevermind, I didn't follow directions lol.

I started from scratch, Singapore sbf then the special then the updates. Everything seems ok so far, had one freezeup and reboot but that is maybe normal. All my apps seem to be automatically restoring pretty good, I haven't had that luxury in a while for some reason, usually have to restore from titanium. I'm down to 76mb internal storage and my apps aren't finished yet. I had as much as 136mb free with 80 apps installed before on Khal's. I will have to see how it is when it finishes. killing running apps with the go launcher task manager widget seems better already, hit the X once and all clear at once instead of a couple at a time.
[Milestone XT720 Android Development] Knoedelkopf:
I have a very big problem for me with the camera. Taking the first picture works, takes a few seconds. Then taking another picture does also seem to work, it is taken and seems to be saved, after a few seconds I can also see the taken picture and the preview. But I can only find the first picture in my gallery then, status bar says: "failed to read/write sd card - gallery may not work as expected"!! :(

So where is the second picture ? Already happened to three important pics !?? :( but in my opinion they should have been saved!
[Milestone XT720 Android Development] LibertyMonger:
Hard to say bud when it don't appear to be a ROM issue my camera has been working great. Well i can't say it isn't the ROM but my cam has been great, a second delay
[Milestone XT720 Android Development] LibertyMonger:
Almost all my apps restored really quick except a few. It's trying to update Milestone Overclock and a few others and is not making any progress. It has also kicked background data off about 3-4 times. Not sure if this has anything to do with the update or not. Titanium Backup, Pandora, Go Launcher ex and Milestone Overclock. I guess cancel and retry?

Yeah background data keeps disabling itself

Duh... I turned WiFi on I think it helped.

Ps... Milestone Overclock keeps it's setting!!!

***Fjfalcon boot5.img doesn't seem to be working... only have 66-69mb free ram. after killing apps. which is great except I usually get about 80-90mb with the fastboot kernel. Wondering if I should try other kernels?
[Milestone XT720 Android Development] Mioze7Ae:
Previously the dalvik-cache was automatically moved to the cache partition. That doesn't happen automatically anymore--you have to set that up manually using the Darktremor a2sd command. You need to get to a shell on the phone (for example use adb) and run the command: "a2sd cachepart". This will move your dalvik-cache from /data to /cache and reboot. (I tried doing that with the A2SDGUI and it didn't work complaining about not enough free space--but it displays all partitions as having 0used/0available so something's clearly wrong in A2SDGUI's ability to read free space...)
[Milestone XT720 Android Development] Mioze7Ae:
I think this is also darktremor related. Can you use adb to run "a2sd check" after fastboot and post the output?
[Milestone XT720 Android Development] LibertyMonger:
i used Terminal Emulator and ran it and on line 43: /data/dta2sd.log: Permission denied same with a2sd check.

Do you want to see the whole output?

I just killed apps and had 80mb free. not sure how to check if the kernel is working or not.
[Milestone XT720 Android Development] Mioze7Ae:
It sounds like you didn't run as root? (i.e. did you run "su" first after you open the terminal?)

I think I may have figured out my problem with A2SDGUI--the phone I'm testing right now doesn't have an ext partition. When I run "a2sd diskspace", I get an error because the second partition doesn't exist. I don't have my microsd adapter with me, so I'll have to wait till this evening to repartition and test. So, you may actually have success with A2SDGUI since you have a swap partition (which I expect is partition #3).