Related
Update! Much improved APP version is available here: http://forum.xda-developers.com/showpost.php?p=8230964&postcount=143
Still not recommended for anybody without a fully working recovery mode.
------------
This is very much ALPHA! Don't try it unless you have something to prove!
Does not work with the latest froyo builds
Start off with a clean firmware without any other lagfixes. It should work in other cases, but I've only tested it with a clean JM8. It should work fine in a clean JPC Froyo too. You're gonna need busybox (1.17.1) or similar tools.
Step 1: You need a 512byte MBR file. If you have a 8GB I9000 like me, you can use my attached file. Else, proceed to post #2 on how to create this file for your device.
Step 2: Copy all of the required files to the correct place.
Code:
adb push test.sh /sdcard/test.sh
adb push parted-static /sdcard/parted-static
adb push partprobe-static /sdcard/partprobe-static
adb push playlogos1 /sdcard/playlogos1
adb shell
su
busybox cp /sdcard/test.sh /system/bin/userinit.sh
busybox cp /sdcard/parted-static /dbdata/parted-static
busybox cp /sdcard/partprobe-static /dbdata/partprobe-static
busybox mv /system/bin/playlogos1 /system/bin/playlogosnow
busybox cp /sdcard/playlogos1 /system/bin/playlogos1
chmod 755 /system/bin/playlogos1
chmod 755 /system/bin/userinit.sh
Step 3: Put the MBR file in place. It must be a 512byte file, and it must be placed in /dbdata/test2 - Refer to 2nd post to create one, or use my included one in the zip.
EDIT: Missed a step. You need to move the binary '/system/bin/fsck_msdos' to '/system/bin/fsck_msdos.bak' or other name. You won't be able to unmount if the FAT32 check is running. It will have to be done manually after.
Step 4: This is the hard part! Reboot your phone. The boot logo will be 20 seconds delayed. This is because there is a 'sleep 20' command inside the boot script, as it seems to take 10+ seconds for mmcblk0p3 to show up in /dev/block. I don't know why, it should show up instantly. Anyway, it'll boot up after you see the messed up boot logo.
Step 5: Create the EXT2 partition
Code:
adb shell
su
busybox mkfs.ext2 -b 4096 -m 0 /dev/block/mmcblk0p3
mount -t ext2 -o noatime,nodiratime,errors=continue /dev/block/mmcblk0p3 /data/data2
Step 6: Copy your /data/data across, and whatever else you want too
Code:
mkdir /data/data2
busybox cp -rp /data/data /data/data2/
busybox mv /data/data /data/data.bak
busybox ln -s /data/data2/data /data/data
You can repeat the cp, mv, and ln for app, app-private, system, dalvik-cache
Step 7: Reboot. It'll have the messed up boot animation again.
Congratulations!
Quadrant scores are around 1900 (database writes take longer than EXT2 on RFS, as the buffer is smaller)
It runs very very smoothly though!
Good luck if you try this!
I'll have an app to do all of this later in the week / next week.
If anybody can tell me why I need the 'sleep 20' before /dev/block/mmcblk0p3 is created, I'd really like to know.
Updates / Known Issues
GPS breaks on boot. Fix it with 'kill pid', where pid is found with 'ps' and the process is called '/system/bin/gpsd/glgps_samsungJupiter'
20 second pause is too long, and some apps may start to load before hand! I changed the 20 sec sleep in test.sh to 10 sec, and it seems a lot better. Still need to find out why a pause is needed at all.
How to create your own MBR 512byte file:
First, make sure you have /dbdata/parted-static. See above post on how to copy it.
Then, you need to knock /sdcard/sd and /sdcard out of operation. This method is easiest:
Code:
busybox fuser -km /sdcard/sd
busybox fuser -km /sdcard
umount /sdcard/sd
umount /sdcard
Now you need to create the partition using parted-static. You could use sfdisk or busybox fdisk too, but I like parted!
Code:
/dbdata/parted-static /dev/block/mmcblk0
First, list the existing partitions with 'print'. You should get something like this:
Code:
Number Start End Size Type File system Flags
1 32.8kB 6208MB 6208MB primary fat32 lba
2 6208MB 8221MB 2013MB primary lba
Now, resize your /sdcard partition. It's the big one (6208MB in my case):
Code:
resize 1 32.8kB 5208MB
And then, you need to create a new partition using the remaining space:
Code:
mkpart
logical
5208MB
6208MB
And now list the partitions again with print. You should have something like this:
Code:
Number Start End Size Type File system Flags
1 32.8kB 5208MB 5208MB primary fat32 lba
3 5208MB 6208MB 999MB primary ext2
2 6208MB 8221MB 2013MB primary lba
All done! Exit parted with 'quit'
Now, you need to create the 512byte file. Really easy:
Code:
dd if=/dev/block/mmcblk0 of=/dbdata/test2 bs=1 count=512
And now you have your own MBR file sitting in /dbdata/test2, all ready for use by the reboot script.
Thanks for your work ryan
i Guess you need root
mazsuper said:
Thanks for your work ryan
i Guess you need root
Click to expand...
Click to collapse
Hahah, you very much need root! If root is a problem for you, you really shouldn't try this out! It's fairly complicated. Difficulty Level: Advanced!
That said, this will be hopefully end up in OCLF as a one click option (well, it might have to be 2 clicks). I'm not sure how much testing this is going to need. I guess the more people who help test it out, the sooner I can move it up. I'm sure there are a lot of bugs.
MBR file
Would be willing to give it a try if you could pre-bake a MBR file that is compatible with the 16gb version !
bratfink said:
Would be willing to give it a try if you could pre-bake a MBR file that is compatible with the 16gb version !
Click to expand...
Click to collapse
It's really easy, just follow the steps in post 2. Shouldn't take more than 5 mins.
You just resize the big partition (look for the one with the biggest size) and then enter the start as the same as the current start, and the end as end-1000MB or whatever.
The 20 sec wait seems to be too long though. It is possible to lose apps if they try to load up too soon.
Shows up after doing a few reboots. Should be fixable.
That looks promising. But do I understand it correctly that the system is still running off of rfs? Thumbs up in any case, this looks like it could finally fix the lagging on my JPC
Ok RyanZA, I finally understood what you meant
Meister_Li said:
That looks promising. But do I understand it correctly that the system is still running off of rfs? Thumbs up in any case, this looks like it could finally fix the lagging on my JPC
Click to expand...
Click to collapse
Nope, the system runs completely off EXT2. It's very fast.
Bug found: The fix breaks the GPS deamon for some reason! Interesting, I wonder why.
Anyway, workaround is easy: just kill the gps deamon and it will automatically restart, and work fine. GPS deamon is called /system/bin/gpsd/glgps_samsungJupiter - It can be found with 'ps' and killed with 'kill pid'
Gotta make notes of all of this stuff..
supercurio said:
Ok RyanZA, I finally understood what you meant
Click to expand...
Click to collapse
Woooooooohoooooooooo!!
You see? It works after all! Got some bugs and stuff still, but with a bit of work it is definitely possible to make this bulletproof. I think, anyway.
Do you know why it takes ~5-10 seconds for /dev/block to update? Looking at the log, it seems to wait for vold to do it. I guess I need to find a way to force vold to re-check it quicker?
I'm quite liking this fix so far. Makes JPC a LOT nicer.
Anyway, I'll use this for a day and report back on any issues tomorrow night. If anybody else could give it a try, that would be awesome!
Hi ryan
Thanks for your great work as ever
2 questions
Do I have to do this every time I flash a new rom
And how do I undo this
Sent from my SAMSUNG-SGH-I897 using XDA App
Thank you, RyanZA, for your work! It's very appreciated.
Sent from my GT-I9000 using XDA App
wow first voodoo now this These lag fixes can only get better. Will try this on the weekend when my phone have some "downtime"
Maybe even go back to JPC as well lol Only reason I'm using JM cos of lagfixes lol
Thank you both for you work Curio and Ryan.Im very happy with the voodoo so far but if u are going to make an app like one click i probably wanna try it.Afterall maybe we can get froyo and lagfix next week hein??
Ryan, I'm lazy mate... have you got this into any sort of package yet, or do I need to read the destructions carefully? (Running JPC with your 1.6x lagfix)
Any hope for an apk or similar noob proof stuff?
toca79 said:
Any hope for an apk or similar noob proof stuff?
Click to expand...
Click to collapse
RyanZA said:
That said, this will be hopefully end up in OCLF as a one click option (well, it might have to be 2 clicks). I'm not sure how much testing this is going to need. I guess the more people who help test it out, the sooner I can move it up. I'm sure there are a lot of bugs.
Click to expand...
Click to collapse
Message for char limit.
I mean com'on. Look at when he created this thread. Look at the text in bright red to get an idea of where this is at.
Installing Debian Squeeze on Android Optimus S - Walk-throughs
This is slowly becoming a larger topic. So for now i will post various ways proven to work on the Optimus S and V as links below:
Installing Debian Squeeze on Android Optimus - Walk-through Compiled by uamadman
Install Debian Squeeze - non-loop sd-ext chroot method (prebuilt!) By bigsupersquid
ALL-Thumbs GUI to replace LXDE By bigsupersquid
4 Steps to Linux on your Optimus S - written by uamadman hosted by uamadman
All of this work was done by other people. I am simply compiling information and specializing it to the Optimus S.
This method does not require a pc, and everything is done through your android interface.
Current Abilities I've tested with success.
Play Sound
Surf the web
Access entire SD Card
Currently Working on:
Flash Support through IceWeasel
Completed:
Making this a simple download and phone restore - Done
Needs:
A GUI with bigger buttons and scaled for 480x320 - Done thanks bigsupersquid
Transparent Keyboard
Sources:
Howto Install Ubuntu by NexusOneHacks.net
secret hidden note to self psychocats.net/ubuntu/nonfree
Lets begin.
You need the following requirements:
Recommended: 2+ gigabytes of free SD card Space (Minimum 1.25gb)
A Rooted Optimus S
Kernel/Recovery: Xionia CWMA v1.2518.6
ROM:The Scott Pilgrim ROM (CM7 Gingerbread, Zefie Edition)
BusyBox Installer - You can get this from google apps store by JRummy16
Linux Installer – You can get this from google apps store by Galoula
Items worth having to things that make this easier:
A Wifi Internet Connection
A fully Charged Battery and a Wall Charger ^.^
2 Bottles of Mountian Dew
Your favorite Movie
and
The Patience to NOT Touch/use your phone for the 2 hours needed to complete the initial install process.
I started this endeavor with a clean install of the ROM listed above.
!!Make backups if you MUST save your data before you proceed any further!!
Warning: In The Simplest Terms(More detail will be in the final walkthrough)
Sometimes the Linux Installer doesn't work or if it is working and the process is interrupted while creating the .LOOP or extracting the build. The Linux Installer will stop working. I've found two (2) ways to fix the issues. The first is to go into setting and clear the cache for Linux Installer, Then open the superuser app and forget the permissions assigned to Linux Installer (Note: Try this a few times before resorting to a clean wipe, this method sometimes takes a few tries). The second is a clean wipe/recovery of the phone. Additionally if for some reason there is a interruption and the process stops. reboot the phone delete linux.loop off your sdcard and start from scratch. BEWARNED
*Walk-through - Under Construction*
To clarify any confusion the button names I use from left to right:
Home : Menu : Back : Search
Pre-Install Check List for Formatting/Reloading Rom
install sdcard with ROM/Recovery's
Reboot > Recovery
wipe data/factory reset
mounts and storage> format system
install zip from sdcard >choose zip from sdcard > update-cm-7-04282011-NIGHTLY
install zip from sdcard >choose zip from sdcard > gapps-gb-20110120
Remove sdcard with ROMS
Install sdcard marked for Linux
mounts and storage > format sdcard
reboot system now
Pre-install Checklist phone prep. (If you choose to overclock your phone this would be a great time to do it)
Wait 2 minutes for phone to fully load
tap droid
tap skip
tap next/done
Settings > Display > Screen timeout > 30 minutes
Settings > Applications > Check Unknown sources (not sure if nessesary)
Settings > Applications > Development > Check Stay awake (Required!!!!)
Settings > Accounts & Sync > Add Account (Go Through Menu's should take you though Market Install)
Market > Search Busy Box > tap BusyBox Installer by JRummy16 > free > ok
Market > Search Linux Installer > tap Linux Installer by Galoula > free > ok
Market > Search vnc > tap android-vnc-viewer Installer by androidVNC team + antlersoft > free > ok
Press Home Key
Apps> Busybox Installer >Allow Permissions> OK > Install
Install Check List
Warning
DO NOT ROTATE YOUR PHONE
ALLOW THE SCREEN TO SHUT OFF
LOCK THE PHONE
WHILE THIS APP IS OPEN UNLESS STATED
(you will see bad things if you do)
For Debian
Apps > Linux Installer > Allow SU Permissions > Allow SU Permissions > Allow SU Permissions > Click OK (First time start up, Yes 3 Approvals. If you don't recieve 3 notifications from super user it means Linux Installer is bugged. Go Settings>Applications>Manage Applications> under the Downloaded tab find Linux Installer > Select > Clear Data > Try step again. May take a few tries.)
Press Menu Key > Tap Setup > Tap File Size > Set to 1250 or more but must be less than the size of your SD Card.> ok > Press The Back Key (Linux installer will exit to your apps menu)
For Ubuntu - Currently bugged. I would avoid this. The source.list seems to have issues and won't download packages.
REQUIRED: Set you phone some where flat plugged into power Do Not Let The Screen Rotate!!!!!Apps>Linux Installer > Tap 1) Create target loop
Be Patient Wait until the Creating LOOP menu disappears. The length of time is dependent on the size of Megabytes set in the File Size option. About 10 minutes for 1500 Mb
Tap Liberate Loop -- Really Fast
Tap Format target loop (ext2) - This is the Buggy Part. If you get an Error message everything is most likely ok. Pickup your phone and Physically Rotate it so the screen rotates. Two additional menu's should appear. [3) Copy and Extract into loop and Install Linux Boot Script]
Lay your phone back down flat it doesn't matter if the screen rotates back to its original.
From here on DO NOT let the Screen Rotate Again! The process will be interrupted and you will get to start from step 1
Tap 3) Copy and Extract into Loop (it will start downloading and extracting the packages necessary to install Linux) This can take up to an hour. On a good 3g connection less than 45minutes.
Tap 4) Install into loop (This takes less than 10 minutes)
Tap Install Linux boot script
30 Seconds Later you officially have a version of Linux installed on your phone
CONGRATS
Verify Install Works
Apps > Terminal Emulator > Type: su > Enter > Grant Permissions > Type: linuxboot > Enter
You should get a string of code then get something like:
[email protected]:/
Most of the next portion comes from the Nexusonehecks.net
Setting up VNC and LXDE (so you don't have to look at terminal lines all day)
Apps > Terminal Emulator > Type: linuxboot > Enter <---If your not already in already.
Type > apt-get update > enter --- 5 minutes
Tight VNC Server
Type > apt-get install tightvncserver > Type y > Press enter --10 minutes
LXDE
Type > apt-get install lxde > type y > Press enter - 30 Minutes+
After a while you should get this screen
Press Menu > Preferences > Control key > Choose Camera Key > Back key > Back Key
Fully Depress the Camera Button Down and Tap the number 9 on the soft key board > Release Camera key > Tap Space Bar -- now two times more
Fully Depress the Camera Button Down and Tap the number 9 on the soft key board > Release Camera key > Tap Space Bar
Fully Depress the Camera Button Down and Tap the number 9 on the soft key board > Release Camera key > Tap Space Bar
The process should continue installing LXDE
tightvncserver Setup
Type> export USER=root > enter
Type> vncserver -geometry 1024x800 > enter
enter password > enter (use something simple you can remember i used 123123123 like they did on the nexusonehacks.net writeup)
verify password > enter
Press Enter after typing each line of the following code. Be Very Slow and Deliberate. Double Check Each line for Capitalization and accuracy before pressing Enter! I do not know how to edit this again --hidden note-->Perhaps some one can show me/tell me how
cat > /root/.vnc/xtartup
#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
icewm &
lxsession
Now Press and Hold the Camera Key and Tap D twice on the soft keyboard > Press Enter (it may ask to press 1 do not and only press enter)
If your camera key wasn't set look here to set it again--->Press Menu > Preferences > Control key > Choose Camera Key > Back key > Back Key
Setting up VNC on android ... After all those command lines I'm sure this is a very very nice change xD
Press Home Screen
Apps > androidVNCviewer > For Password enter 123123123 (Or whatever you set it to in the previous server setup)
Scroll to Port and enter 5901
Change the Color Format if you wish. It runs rather nicely on 24bit color but consumes more cpu cycles.
Tap Connect -- A Very Pretty LXDE should appear with a working CPU Monitor and everything nice
I know you want to play but we have a little more work to do this next step uses Terminal Emulator as the auto start/config file to boot linux and start and configure tightvncserver
Press Home
Open Termial > Menu Key > Preferences > Initial Command > Tap to Edit
Make Edit look like this
export PATH=/data/local/bin:$PATH
linuxboot
vncserver -geometry 600x480
Tap OK > Back out of Teminal to home
vncserver -geometry 600x480<--- this is where you change your screen size. you need a minimum of 600x480 to use the synaptic package manager and a few other things. but when i'm surfing the net or other things I prefer 480x320 (The Exact Size of the Optimus S Screen)
Now whenever you want to run linux simply open the Terminal Emulator. Wait 60 seconds for the code to run.
open androidVNCviewer and click Connect
DONE
Extra things go here
apt-get install synaptic - installs synaptic manager a nice GUI interface for the apt-get command
I have been running a Debian chroot on my optimus V for a few months now, squeeze and sid both work fine. I did it manually without the stuff from the market, and I use the sd-ext partition instead of a loop file
per your GUI issues:
I like xfce4 better than lxde on my optimus V.
Code:
apt-get install xfce4 xfce4-goodies
instead of lxde.
oh, also, the OP pointed out to me that
Code:
apt-get install xfce4-goodies
alone will also pull down xfce4 as a dependency (and that I left out the word install which is now corrected.)
modify the /root/.vnc/xstartup accordingly.
replace
Code:
icewm&
lxsession
with
Code:
xfce4-session&
or, you can cut-and paste my complete file here:
Code:
echo "#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
export XKL_XMODMAP_DISABLE=1
xfce4-session&" > /root/.vnc/xstartup
I have modified a theme for xfce to be more finger-friendly.
see attachment
decompress that file, it contains a folder, Xfce_large.
place the folder in /usr/share/themes
tap on the rat in the lower-left of the desktop (opens menu)
select Settings by tapping its arrow (xfce is twitchy about the menu through the VNC, it may take a few tries to select items on the main menu.)
select Appearance. Then Style.
Scroll down to Xfce_large and tap it, then tap Close at the bottom.
Voila, oversized scrollbars and menu bar buttons!
If you don't like the size, the settings I modified are in the gtk-2.0 subfolder of Xfce_large in the file gtkrc
the modified settings are not tabbed over like the rest of the settings in the file.
I also changed the default font size, icon size, icon font size, and DPI settings, but that has to be done in the settings menus.
The optimus display is about 120 DPI, the default is 75. 120 looks much nicer I think.
You are awesome
good luck with flash. gnash only plays ads on my V, not whole videos.
get-flash-videos from google code works nicely, but it's a capture utility.
it does try to play with mplayer, but only shows a couple of frames per few seconds because the VNC display method of manually copying the framebuffer is very slow.
using a bandwidth meter (debian package cbm to be exact) the vnc uses from 14 to 80Kb per second of system bandwith on device l0.
I don't know what's pegging your CPU use, mine only tops out when the debian system is doing something. I built my chroot with debootstrap instead of using the market installer, no telling what is preinstalled on the image it downloads.
I am going to try this out once i'm finished trying to get the ubuntu side of the house working.
Can I append this to my post here and androidcentral with proper credits due to you so all may share?
uamadman said:
...Can I append this to my post here and androidcentral with proper credits due to you so all may share?
Click to expand...
Click to collapse
certainly. just test the instructions for functionality before adding them in.
I considered starting a thread on this myself but never got around to it.
I'll continue to contribute info as this develops.
as an extra, here's a link I've posted, a few places on both forums, with a clean debootstrapped debian filesystem, tarred up to shrink it for download.
I goofed a bit when compressing it though, when decompressed it's a single folder containing the filesystem.
http://www.4shared.com/file/iWuUtZgS/squeeze_05_2011tar.html
uncompressed, 9645 items, totalling 264.3 MB
compressed, 116.3 MB (121929580 Bytes)
this will either need the contents of the freshsqueeze folder it contains copied to an ext2 (or ext3/ext4 if you want to brave the damage from journalling on a SD card, which seemed to cause corruption when I tried ext4) partition on your SD card, or, copied into a blank loop ext filesystem if you prefer.
with an empty debian img file mounted as a loop filesystem on a linux box, you can copy everything from the freshsqueeze folder to the loop filesystem by:
Code:
cp -av /path/to/freshsqueeze/* /path/to/loopmountedimg
the loop filesystem method should allow you to continue using your startup scripts as-is, they'll need slight modifications to work with an ext partition like I'm using.
its resolv.conf and sources.list are already configured for 3g access and the main Debian repository, so it's pretty much plug-n-play. no extra packages are installed, you'll need to apt-get tightvncserver and a window manager of your choice, unless you just want the bash shell.
the first time you chroot in, you should use passwd to set a root password, and adduser to get a non-root account on there.
this is not a loop filesystem like what you are using. it is a full directory tree of a base squeeze install.
I would like to see this on the V.its my only phone right now.if I had 2 I would try it.
Sent from my BumbleV using XDA Premium App.
ummkiper said:
I would like to see this on the V.its my only phone right now.if I had 2 I would try it.
Sent from my BumbleV using XDA Premium App.
Click to expand...
Click to collapse
I don't think a chroot can hurt your phone. I even run mine bind-mounted into the root filesystem, with system r/w, and haven't ever had any problems a reboot didn't solve. and it's been since April since I had a forced reboot from running stuff in debian.
now, I don't know about the installer from the market, if it asks for root access multiple times, I'm not sure just what it's doing. I'll post my sd-ext startup script and instructions for using it here after dinner if you want to try it that way instead of with the installer app.
honestly, it's a much simpler process than the OP, but, hey, if it works, I'm not one to dismiss the method out-of-hand.
bigsupersquid said:
I don't think a chroot can hurt your phone. I even run mine bind-mounted into the root filesystem, with system r/w, and haven't ever had any problems a reboot didn't solve. and it's been since April since I had a forced reboot from running stuff in debian.
now, I don't know about the installer from the market, if it asks for root access multiple times, I'm not sure just what it's doing. I'll post my sd-ext startup script and instructions for using it here after dinner if you want to try it that way instead of with the installer app.
honestly, it's a much simpler process than the OP, but, hey, if it works, I'm not one to dismiss the method out-of-hand.
Click to expand...
Click to collapse
Sounds good to me.
non-loop sd-ext chroot method (prebuilt!)
Standard disclaimer:
These scripts and chroot method may bork up your phone, trash your userdata, destroy system files, get you slapped by your mother, make your phone catch fire and/or explode, and etc., ad nauseum.
Use at your own risk.
MAKE A NANDROID BACKUP BEFORE DOING THIS!
You'll probably be just fine, but it's nice to have a backup in case something goes haywire.
Disclaimer aside, it's worked great for me since March, hasn't crashed for months, and I use it multiple times per day.
My main inspiration was Saurik and his Debian & Android together on G1.
I'm sorry that I can't point to all the many, many sources I read through over the couple weeks it took me to get this set up, I took little bits from here, there, and everywhere, but Saurik's work was the main core of this system.
Apologies if you see some tidbit of your work in this... let me know and I'll be happy to give you credit.
Dysfunctions:
things that don't work while the chroot is running:
wifi hotspot in aospCmod and Bumblebee won't initialize; does work during chroot in aospCmod if turned on before chroot, though.
network info II app won't start during chroot; if opened before chroot it's fine.
ringtones on SDcard don't work in Bumblebee; but OI File Manager can read the sdcard during chroot.
these things still work ok once the chroot is exited on aospCmod. The chroot borks wifi on Bumblebee until reboot.
Click to expand...
Click to collapse
Info:
This script remounts / and /system both read/write and leaves them that way until you type exit in the bash shell of the chroot. Without r/w mounting of the / directory, installing Debian packages gives some errors, since it's running in the real root filesystem. Also, the / directory is wiped out on a reboot, so it's relatively safe to have mounted r/w. /system doesn't need to be r/w, I just like it that way, and I haven't had trouble with it since I was first experimenting with this. Feel free to modify the 'boot' script if having /system mounted r/w makes you nervous.
This has been tested on Zefie'sCM7 (outdated) and aospCmodOV ROMs.
It also worked on Bumblebee, but not as effectively.
The chroot will not stop Android from functioning. If Debian is busy with something, it will slow Android down, though.
You will still get/can make phone calls, text messages, etc. You can send the VNC viewer to the background and use Android apps while the Debian system is in the background.
Click to expand...
Click to collapse
On to the meat of the matter. I'm using an 8Gb SD card. I advise no smaller than 4Gb unless you just want to do command-line work in Debian and don't need a GUI.
First, these instructions require a Linux pc. On M$ Windoze? Use a Live CD or a virtual box, or you're on your own.
The first part of these instructions is to be completed on your pc. I'll let you know when to switch to the phone.
1) Mount your <empty> SD card on the pc. If it's not empty, back it up, because this will wipe it out. You'll need at least two partitions on it, three if you're using something like apps2sd (which I'm not using, and not really familiar with, so this tutorial is set up assuming you don't need to dodge an existing ext partition,) and another if you have a swap-enabled kernel and want to use it.
2) Use Gparted or a similar tool to partition the SD card. First partition FAT32 for Android, whatever size you feel you need. I'm using 1Gb.
Second partition is an ext2, ext3, or ext4 partition. Apps2SD style, you know what size and filesystem type you need here, I don't. For Debian on the 2nd partition, I advise 3Gb or more, ext2. ext4 corrupted my files, so I switched back to ext2. If you need an apps2sd partition, Debian will go on the 3rd partition, and you'll have to modify the two attached scripts accordingly.
If you're lucky enough to have a swap-enabled kernel, you can make a swap partition; it'll go last, whatever size is left. 256Mb-1Gb should be plenty depending on whether you use image processing or large compiling projects or some other memory hogging programs.
3) Mount the sd FAT32 and Debian ext partitions on the pc.
4) Download to your pc the base Debian Squeeze filesystem which I've debootstrapped, configured, and uploaded for you to save hours of hassle.
Also download to the same directory the two attached script files.
boot.txt
firstrun.txt
5) Open a ROOT shell. You need root privleges to untar the filesystem and retain its permissions. If you don't have a root shell, put sudo in front of the tar and cp-av commands.
6) cd to the directory you downloaded the squeeze_05_2011.tar.gz into. then type
Code:
tar -zxvf squeeze_05_2011.tar.gz
cp -av ./freshsqueeze/* /full/path/to/sdextDebianpartition
sync
and wait for it to finish.
7) type
Code:
cp ./boot.txt /full/path/to/sdFAT32partition/boot
cp ./firstrun.txt /full/path/to/sdFAT32partition/firstrun
sync
8) Now is the time to copy back the stuff you backed up from the SD card to the FAT32 partition, and any apps2sd style stuff if you have it. Then unmount your SD card and put it in the phone.
Now all remaining steps are done on your Optimus. You're finished with the desktop pc.
9) Open a terminal on your Optimus. I like SL4A, but Terminal Emulator works well too. Both are free.
10) Next step merges your existing Android system files into the Debian partition. This is neccesary because I haven't compiled a kernel and don't know of one for the Optimus with UFS enabled. So, Debian gets bind-mounted over the Android rootfs ( / directory) and having the Android system files accessible in the Debian filesystem is required to keep them playing nicely together, while protecting the original Android files from Debian at the same time.
Code:
sh /sdcard/firstrun
You won't need this script ever again unless you change ROMs and/or need to reinstall Debian. Changing ROMS without reinstalling a fresh copy of Debian may mess things up a bit since system files vary between ROMs and you'll still have the Android files from your previous ROM in your Debian filesystem.
This script and the 'boot' script are both listed at the bottom of this post if you want to read 'em.
11) Next, remount system r/w, copy the 'boot' file to /system/xbin and chmod 4755 /system/xbin/boot. If scripts are in /system/xbin and executable, you can run them with 'su -c'
Code:
su
mount -o remount,rw /system /system
cp /sdcard/boot /system/xbin
chmod 4755 /system/xbin/boot
mount -o remount,ro /system /system
OK, a basic Debian filesystem with no extra packages is now installed!
my Debian filesystem is on my 2nd sdcard partition. The comments in the 'boot' script should explain how to use another partition if you have apps2sd running or somesuch (I don't have many Android apps on my phone so don't need/use apps2sd function)
to use the script as-is, your linux flavor should be in the 2nd card partition. I use Debian, but any Debian-based distro should work, for example Ubuntu or DSL.
open a terminal and type
Code:
su -c boot
don't kill the terminal app... leave it running in the background.
when you're finished with linux, reopen the same terminal and type
Code:
exit
to cleanly dismount your linux. No reboot required!
Before you exit the first run of your new Debian system, you should download some packages. I advise tightvncserver, xfce4 (and xfce4-goodies if you want the extra glitz like a cpu monitor, bandwidth monitor, and such, without hunting the individual packages) and iceweasel so you can have a real rebranded firefox on your Optimus.
Code:
apt-get update
apt-get install tightvncserver xfce4 xfce4-goodies iceweasel
It'll take a while to download all that. Lots of data.
Once it's done downloading, configure tightvncserver.
Code:
vncserver
It'll ask you for a password. Choose one that's easy to remember. You'll need to enter it in the VNC viewer as well (next step)
IMPORTANT!
tightvncserver will ask you if you want a view-only password. Tell it no!
next:
Code:
vncserver -kill :1
to politely exit the vncserver. Otherwise you'll have to exit the chroot, reboot the phone, and run the 'boot' script again or it'll open server :2, :3, and so on each time you type vncserver. Each instance will eat more CPU, RAM, etc.
configure /root/.vnc/xstartup
Code:
echo '#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
export XKL_XMODMAP_DISABLE=1
xfce4-session&' > /root/.vnc/xstartup
after that,
you should use
Code:
passwd
to set a root password, and
Code:
adduser
to get a non-root account on there.
Code:
exit
will close the chroot. You can close the terminal after that until you're finished setting up the VNCviewer and want to start your lovely GUI.
Now, set up the VNC viewer like in the OP. Make sure your password matches the one you gave tightvncserver!
I advise 24 bit color. It slows things down ever so slightly, but to me, it's well worth the increase in eye candy you get over 8 bit.
most of the tutorials on the VNC suggest modifying the /root/.bashrc file to start the vncserver automatically (like here on xda) but I don't like that myself. I use the shell a lot, and the vncserver eats system resources. So, I manually start and stop the vncserver from the command line.
Code:
vncserver
to start, it defaults to a 1024x768 which seems to make programs happier than the 480x320 phone native resolution.
Code:
vncserver -kill :1
to stop it politely. Otherwise a phone reboot is required to get rid of vncserver files (by clearing out everything in the / directory which isn't replaced by the boot.img ramdisk) which make it open desktop :2, :3, and so on each time you run the program.
One major advantage to the bind-mounting in the rootfs is that Thunar works as a root explorer, and has access to the entire Android filesystem (except for the bind-mounted Debian directories, which hide the Android directories underneath, including /system/etc which is symlinked to /etc by the boot.img ramdisk,) as well as the complete Debian filesystem.
Pretty much everything I've tried works, unless it wants speed from the display. The VNC just slows that down way to much to use for video or games or suchlike. I'm working on native window support for X, but I need more practice in C to get it done.
Iceweasel works great, if a little slow, a rebranded full firefox on an ARMv6 device that mozilla won't release an apk for its wussy mobile version on. Go figure. The biggest problem is finding plugins compiled for ARM, the 'get plugin' button send you to sites offering x386 versions of the plugins. Yuk.
Icedtea open source java works fine.
Gnash plays ads but not videos.
Gimp works well.
Qemu works!
Eclipse even installs and runs (very slowly)
get-flash-videos captures flash exceptionally well. combined with an Android video player for .mp4 files, you can download and watch flash from lots of places, just not streaming.
alsa audio works through Iceweasel. Played audio clips from yodajeff.com just to test it.
3g works great.
Wifi detects the connection with iwconfig, I haven't tried sending data through it but the way 3g plugs right in I bet that wifi works equally well.
Since wifi and 3g work out of the box, I bet bluetooth would too with some config, but it needs extra packages to see the functionality.
The network meter plugin for xfce works. The device is rmnet0.
The cpu meter plugin also works.
At one point I had the battery meter from xfce-power-manager working but my last install broke it somehow. Ah, well.
once it's all together
open a terminal
to start it up:
Code:
su -c boot
for a gui,
Code:
vncserver
to kill the GUI,
Code:
vncserver -kill :1
to exit the chroot,
Code:
exit
the first time you run the GUI, you might want to add my Xfce_large theme to make the scrollbars and menubars easier to hit on the touchscreen. See the earlier post.
hopefully this helps people out. I spent quite a while getting it just how I wanted it, many googlings and picking bits from here and there.
contents of the scripts follow.
firstrun
Code:
#make /sd-ext directory if it doesn't exist
if [ ! -d /sd-ext ]
then
mkdir /sd-ext
fi
# mount 2nd sdcard partition
# if your linux is on a different partition than 2, substitute that number for the 2 in .../mmcblk0p2 below
# first unmount it; if not already mounted, system will echo 'umount: can't forcibly umount /dev/block/mmcblk0p2: Invalid argument' but this isn't an error to worry about
umount -l /dev/block/mmcblk0p2
mount -o noatime,exec,suid /dev/block/mmcblk0p2 /sd-ext
#copy files from Android to Debian without overwriting anything
yes n | cp -aiv /etc/* /sd-ext/etc
yes n | cp -aiv /root/* /sd-ext/root
yes n | cp -aiv /sbin/* /sd-ext/sbin
yes n | cp -aiv /sys/* /sd-ext/sys
boot
Code:
# debian lives here
export mnt=/sd-ext
# remount / and /system rw
mount -o remount,rw / /
mount -o remount,rw /system /system
# make new subdirectories in / for binding
for x in \
bin boot home lib media \
opt selinux tmp usr var
do
mkdir /$x
done
#make $mnt directory if it doesn't exist
if [ ! -d $mnt ]
then
mkdir $mnt
fi
# mount 2nd sdcard partition
# if your linux is on a different partition than 2, substitute that number for the 2 in .../mmcblk0p2 below
# first unmount it; if not already mounted, system will echo 'umount: can't forcibly umount /dev/block/mmcblk0p2: Invalid argument' but this isn't an error to worry about
umount -l /dev/block/mmcblk0p2
mount -o noatime,exec,suid /dev/block/mmcblk0p2 $mnt
# cleanup last session's tmp files, including last VNC session
rm -r -f $mnt/tmp
mkdir $mnt/tmp
# bind mount debian directories to /
for x in \
bin boot home lib media \
opt selinux tmp usr var \
etc root sbin
do
mount --bind $mnt/$x /$x
done
# set some system variables
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/etc:/sys:$PATH
export TERM=linux
export USER=root
export HOME=/root
# mount proc,sys,devpts
umount -l devpts
mount -o remount -t proc proc /proc
mount -o remount -t sysfs sysfs /sys
mount -t devpts devpts /dev/pts
# softlink framebuffer (for future use,) and existing mounts
ln -s /dev/graphics/fb0 /dev/fb0
cat /proc/mounts > /etc/fstab
cat /proc/mounts > /etc/mtab
# 'boot' with chroot into debian bash shell at /
chroot / /bin/bash
# done now, clean up after exit to keep Android happy
# remove softlinks and replace backed up mtab and fstab
rm /dev/fb0
cd /
# unmount subdirectories
for x in \
bin boot home lib media \
opt selinux tmp usr var \
etc root sbin
do
umount -l /$x
done
# remove non-Android subdirectories
for x in \
bin boot home lib media \
opt selinux tmp usr var
do
rmdir /$x
done
# remount / and /system ro
mount -o remount,ro / /
mount -o remount,ro /system /system
That is an excellent write up. Link added to first post.
appreciate the compliment.
it took two hours to type up and another two to redo it all after firefox crashed on my pc right as I was finishing.
if anyone notices issues or errors in it, let me know and I'll try to fix 'em.
I'll try to help out if anyone has problems getting it working, odds are I missed some detail or typo.
well it took me all day to install ubuntu on this pc to find out it was my video card so im using the built in video on the mb and it worked.I will be doing this tomorrow as its 2am here now.ive never had a problem installing ubuntu before lol.the live cd would just freeze no matter which flavor of linux i used.
ummkiper said:
well it took me all day to install ubuntu on this pc to find out it was my video card so im using the built in video on the mb and it worked.I will be doing this tomorrow as its 2am here now.ive never had a problem installing ubuntu before lol.the live cd would just freeze no matter which flavor of linux i used.
Click to expand...
Click to collapse
eek.
I don't really like ubuntu much, it reminds me too much of Windoze, all bloated up and running a bunch of stuff I never told it to
but I put it on after reading dev reccomendations to use it when making the final switch from windoze, and now I only use it for watching dvds and the stupid digital tv the broadcasters switched to a while back to obsolete everyone's receivers (use an hvr950 usb tuner, which I had to force an older driver into the kernel to get working.)
put debian on the pc to dev with, much less gripey and intrusive, but trickier to configure.
ummkiper said:
well it took me all day to install ubuntu on this pc to find out it was my video card so im using the built in video on the mb and it worked.I will be doing this tomorrow as its 2am here now.ive never had a problem installing ubuntu before lol.the live cd would just freeze no matter which flavor of linux i used.
Click to expand...
Click to collapse
I have yet to get Ubuntu running nicely on a android. I'm sure i'll figure it out soon enough. I'm donating close to 2-4 hours a day to this right now. I hope i can get everything running how i like without learning how to write my own code... which would take forever ...
oh i dont want it on android i just wanted it on my desktop but it appears my desktop has issues while everything works fine in windows ubuntu still freezes or restarts the gui.i have xubuntu on my ibm thinkpad its slow but runs its ubuntu with xfce so i guess ill use my laptop to do this and keep win on my desktop.
ummkiper said:
oh i dont want it on android i just wanted it on my desktop but it appears my desktop has issues while everything works fine in windows ubuntu still freezes or restarts the gui.i have xubuntu on my ibm thinkpad its slow but runs its ubuntu with xfce so i guess ill use my laptop to do this and keep win on my desktop.
Click to expand...
Click to collapse
it shouldn't really matter too much what machine you use to set things up, the key things you need are a way to untar the premade filesystem, ext2 support, and a usb port to transfer files to the phone.
you could download the files in windoze if your laptop lack web access.
you <might> be able to use a windoze utility to format the first part of the SD card with a small FAT32 partition, then use CWMA recovery to add an ext2 partition to the card, then extract with 7zip on windoze into the ext partition.
I used to have a freeware program to add ext2 support to windoze, but it's buried on one of my old 500Mb harddrives in a box somewhere. bet you could google something like that up if your laptop gives you trouble.
cp ./boot.txt /media/disk/boot
cp ./firstrun.txt /media/disk/firstrun
sync
cp: cannot stat `./boot.txt': no such file or directory
cp: cannot stat `./firstrun.txt': no such file or directory
yeah um i dont see these files in the tar and this is the errorr im getting so where do i get these 2 files from
ummkiper said:
cp ./boot.txt /media/disk/boot
cp ./firstrun.txt /media/disk/firstrun
sync
cp: cannot stat `./boot.txt': no such file or directory
cp: cannot stat `./firstrun.txt': no such file or directory
yeah um i dont see these files in the tar and this is the errorr im getting so where do i get these 2 files from
Click to expand...
Click to collapse
I made the tar some time back.
boot.txt and firstrun.txt are attached to the bottom of the instructions.
edit: per ummkiper's suggestion I have also linked the attachments right after the filesystem link.
First, let me define "bricked". When I say bricked, I mean it doesn't boot past the acer logo, only stops there, recovery can be attempted, but seems to always fail loading update.zip in stock recovery, or can not mount anything in custom recovery (CWM so far, haven't seen TWRP do this yet).
Updates will be listed here.
Updated 6-27:
-Added fstab, ideas and theories that I have so far, and a list of things I have noticed so far in various threads.
Updated 8-14-13:
-Added a link to a massively helpful thread concerning the Samsung Brick Bug, which is apparently what we also have. Well, the firmware of our EMMC has.
-Updated the "things to try" section in post 3 with updated information and tactics.
Ok, calling in all owners with Bricked A100s, the information for this is scattered all around multiple threads, and I would like to compile a list into 1 central thread for past and present bricked A100 owners.
Please post in with the following information if available:
Date of purchase (it can be a rough guess if you don't know)
ROM it was running, was it stock acer OTA update ICS, modded stock, CM9 etc
Did you flash and unlock the bootloader, if so, where did you get it?
Did you flash and use a custom recovery, if so, where did you get it? CWM, or TWRP?
Did you have any freezes, random reboots, odd behaviour before the brick?
Did you hard reboot (use the reset button, or hold the power button)?
Did you run a custom kernel (ezterry or any others) or stock kernel?
Did you overclock, if so what was max, and did you undervolt, if so, how low?
What have you done since the brick, any wipes, roms you've attempted to use as update.zip, any flashes attempted.
The above is no longer needed, we know now that it occurs on any and all kernels/roms and any combination of either.
I'll compile the results in the second post, and hopefully someone can maybe make more sense then I can of what is occuring.
Things I have noticed compiling data from all the threads and posts about bricking I have seen:
The brick will eventually occur regardless of the Android version or kernel installed, HC, ICS, JB, no version is any safer then another, though HC seems to take much longer to happen.
It appears to be corruption or otherwise loss of access to the GPT, which stores the partition information, as this is damaged the tablet no longer knows where to find a partition, so it fails to mount (partition here).
All reports are usually prefaced by some sort of freeze and a hard reboot to brick.
Partitions always fail to mount.
Partitions that failed to mount one try will rarely mount another (cache/recovery have done this)
Flashing different recoveries seems to make no difference in mounting.
Fastboot does seem to still work provided the bootloader is intact. It allows flashing of recovery.
CPUID> SBK doesn't work. I had figured it was our flashed bootloaders, but it seems to fail on stock bootloaders as well. Likely A100 uses a different key then A500.
Happens even on completely stock, unrooted, untouched Acer HC or ICS.
adb shell cat /sys/devices/platform/sdhci-tegra.3/mmc_host/mmc0/mmc0:0001/name shows that our EMMC is M8G2FA, and mine in particular was revision 0xB, which bricked. This can also be checked with the Got Brick Bug? app for Samsung devices, while it won't tell you accurately if you are going to brick, it will give you this information as well.
After some discussion with WDS from the CM9 team, there was a rash of these bricks on other devices as well, and seemed to be the result of a bad batch of EMMC chips, or controllers for it, that caused corruption and failure to be read from or written to. The solution was difficult, but obtainable, with NVFlash to partition around the bad area, leaving itself a separate partition for itself, an island away from the rest. Difficult and time consuming, this is not an option for us as we can NOT use NVFlash at all, we can't pass the bootloader verification for NVFlash access. Either the A100 key needs leaked or released, or Acer needs to allow us to fully unlock the bootloader (no encryption anymore) for NVFlash to be an option.
This leaves us with simple tools, ADB and Fastboot, which as long as you can get to the Acer screen, you can use.
ADB doesn't give us an out right way to create, move, delete, and modify partitions, just what is on an existing partition. So, we can use tools like DD to read from and write to any given partition, as long as the device know it exists, and is functioning within that range. If the data corruption is in say, /system, and it exists within the range of the OS, then it will not work. If it exists just outside of the OS, but then gets accessed later during usage, then it will fail. Same for any partition it may have corruption or bad sectors in, it could be any partition anywhere at anytime.
Here is a massively useful thread concerning the Samsung bug, but seems to be pretty much what we have going on ourselves.
http://forum.xda-developers.com/showthread.php?t=1644364
Filesystem Table (taken from recovery)
-------------------------------------------------------------------------------
Mount Point Filesystem Device Partition
-------------------------------------------------------------------------------
/system | ext4 | /dev/block/mmcblk0p3
/data | ext4 | /dev/block/mmcblk0p8
/cache | ext4 | /dev/block/mmcblk0p4
/misc | emmc | /dev/block/mmcblk0p5
/flexrom | ext4 | /dev/block/mmcblk0p6
/sdc | vfat | /dev/block/mmcblk1p1
/boot | emmc | /dev/block/mmcblk0p2
/recovery | emmc | /dev/block/mmcblk0p1
/sd-ext | ext4 | /dev/block/mmcblk1p2
cat /proc/partitions gives this:
------------------------------------------------------------------------------
major minor #blocks name
179 0 7815168 mmcblk0
179 1 6144 mmcblk0p1
179 2 8192 mmcblk0p2
179 3 614400 mmcblk0p3
179 4 1253376 mmcblk0p4
179 5 4096 mmcblk0p5
179 6 102400 mmcblk0p6
179 7 10240 mmcblk0p7
179 8 5801984 mmcblk0p8
179 32 31166976 mmcblk1
179 33 31162880 mmcblk1p1
*Note*
While is says /data is EXT4, I think it's actually EXT3, but since it shares with internal SD as /data/media, that may be why it shows EXT4 in some places and EXT3 in others.
EMMC filesystem partitions can't be read by normal means, they don't have a true filesystem.
VFAT is any FAT/FAT32 formatted device, so external SD shows up as VFAT.
I'm pretty certain this is not complete, there are partitions that don't show up under normal usage, so there may be hidden partitions on the device.
Ideas or theories I have and things to try
I'm pretty well convinced we suffer from bad EMMC, that corruption I mentioned in post 2. However, it could also be something as simple as the partitions get scrambled, and while they are there, they can't mount due to being damaged, so I have a few things I wanted to try (hence my request for a loaned or donated bricked A100 for testing in another post I made).
1. DD system and cache partitions, the entire thing, from a working device. (done, I did this on my own tab)
2. DD the image back to a bricked A100, since cache almost always fails to mount, DD cache.img to it (haven't tried yet, don't have a bricked unit)
3. If DD fails, check where it is failing at, it will report records in/out, however DD doesn't handle bad sectors well, and may just hang.
4. If DD fails, and doesn't return a records in/out summary (hangs) attempt fastboot flash cache cache.img (requires a mounting SD card)
5. If DD fails, and external SD is NOT mountable, then ADB Shell is out, and requires launching from adb dd, which I haven't found a way to do yet. (DD would use the image from PC, not SD)
6. If DD is completely out, and fastboot can't flash either, we'll need to work on the partitions directly, using parted or some other tools that can modify the partitions, which is beyond my abilities.
All unsuccessful.
JTAG may or may not work, as it has been mentioned that even JTAG will fail to write to the EMMC with its damaged section. At this point there is only 2 possible methods that may work:
1. Motherboard replacement. Either Acer under warranty (or out of warranty if you can get your case elevated, some users report this being possible) or you replace it yourself. It's not terribly difficult, and I can probably even make a video of it if needed.
2. Someone with a reflow station may be able to remove the EMMC from the board and replace it with a non damaged unit. This place would require a method to read/dump a good chip and be able to write this back to the new one, we can not just NVFlash a system back onto the system. I don't suggest anyone with a hair dryer or heatgun attempt this. The cost for this may be high, but maybe a deal can be worked out of a shop or person is willing to take on this job, as there are TONS of dead A100s around (and A210 appears to be prone to it also, way to go Acer!)
Prevention:
There is currently no way to prevent this, however I have begun modifying Samsung's firmware patch to maybe work with our boards. This isn't something I'm good at, or even know what I'm doing, so it may work, or may not. Information can be found in the newly included link about the brick bug in post 1, however the rundown is this: Every power up (not reboot, power on) the kernel will run a check against the model and revision of the EMMC, if it falls into a given range, then it will attempt to bypass the erase functions of the EMMC firmware so it will, idealy, not write that 32 byte section of 0s causing the EMMC to crash. If it doesn't match, then it does nothing. It's originally written for Samsung devices, of course, so requires reworking for the A100, but it may work, it may not.
I purchased it in December.
It was running the first ZeroNull MOD.
Yes, I unlocked the bootloader with a method found here.
I flashed CWM with a method found here and I used it only for backing up and for flashing the mod.
Only hardly ever it random rebooted.
I was running stock kernel, and I never overclocked/undervolted.
I tried to Wipe cache and to mount all the mountable from recovery. Nothing happened.
Oh, last thing: my tab passes the Acer green logo, but it doesn't pass this:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Please, help me!
ok i have an a100 that is bricked wont boot past acer logo screen. Recovery says mmcblk0p5 is screwed and before i flashed to stock recovery cwm said mmcblk0p4 was screwed. I have a fully functional a100 with me too made backups mmcblk0p1-mmcblk0p7 and tried restoring them one by one. Some work and restore ok but others give errors. I have used this partiton table to try and attempt and restore thanks to smokku. Last night I somehow flashed the wrong img to the wrong partiton and went to recovery through update.zip in stock recovery and it actually made progress about 1/3 of the way through. It has never done that before and I wished I had given it more time to complete but it was late so I gave up. I dont have the cpuid so Im stumped. Any insight would be great as this tablet is my nephews. I guess I could make a claim with acer but then I'd be out my tablet while his is being fixed. Somehow his less than 3 month old 32gb sdcard died when the tablet died too. Thanks
Coming from cm-9-26-21-b11-a100-pm with unlocked bootloader and cwm 5.5.0.4 with ezterry
Tablet had problem with play store 921 error 3 days ago I then fixed the play store and the tablet worked fine. 3 days later the battery ran out and he recharged it to never boot again.
I have v.03.06-ics unlocked bootloader and can access fastboot and adb too but partitons are borked beyond my recovery skills
/dev/block/mmcblk0p1 SS recovery (/etc/install-recovery.sh)
/dev/block/mmcblk0p2 LX boot (boot.img)
/dev/block/mmcblk0p3 AP /system ext4
/dev/block/mmcblk0p4 CC /cache ext4
/dev/block/mmcblk0p5 MC misc
/dev/block/mmcblk0p6 FX /system/vendor ext4 (flexrom.img)
/dev/block/mmcblk0p7 AB APK (p1 and p2 signatures)
/dev/block/mmcblk0p8 UA /data ext4
Ok I'm going to ask one thing, please include all of the information I requested in the first post, it will help alot in figuring out all possible causes.
Well, ok two things, second is if you have CWM or TWRP custom recoveries, please do not flash stock recovery. If you do, we only have APX mode, which we can't use, and fastboot, which is basic flashing, no real tools to use for figuring this out. CWM and TWRP will have ADB abilities, which we need the tools for.
I'll be including the full filesystem table in the third post, which will show the device partitions and where they mount do. It will help with flashing images to the proper partitions. I'll try to have that included pretty soon.
EDIT: brendan802 Says ADB does still work in stock recovery, so my above message may not be true.
Ok I flashed back to cwm 5.5.0.4 through fastboot.
Funny thing is even on the acer loading screen I can still access adb with stock recovery. I have been trying to get fastboot update update.zip to work with no success. I have rewritten all partitons I can through fastboot with no luck. I think the partiton tables need to be rewritten through adb somehow or through apx mode but the cpuid is no longer attainable
brendan802 said:
Funny thing is even on the acer loading screen I can still access adb with stock recovery. I have been trying to get fastboot update update.zip to work with no success. I have rewritten all partitons I can through fastboot with no luck. I think the partiton tables need to be rewritten through adb somehow or through apx mode but the cpuid is no longer attainable
Click to expand...
Click to collapse
CPUID doesn't matter for our devices, the SBK isn't valid for A100s.
Fastboot doesn't rewrite partitions, just dumps the information to the partition, if the partition fails to mount, it can't do anything with it anyways.
Thanks for letting me know stock recovery allows ADB, I wasn't aware of that. I'm going to try talking to morfic and faux about using parted to manually partition the device, hopefully it means we can rebuild the partitions completely, and get the system to mount then correctly, then we can start on what caused it.
pio_masaki said:
After some discussion with WDS from the CM9 team, there was a rash of these bricks on the A500 as well, and seemed to be the result of a bad batch of EMMC chips, or controllers for it, that caused corruption and failure to be read from or written to. The solution was difficult, but obtainable, with NVFlash to partition around the bad area, leaving itself a separate partition for itself, an island away from the rest.
Click to expand...
Click to collapse
Misinformation,
I was talking about the G2 (Desire Z/Vision) & it was a problem also affecting the MT4G/DHD & others.
There was no solution
waydownsouth said:
Misinformation,
I was talking about the G2 (Desire Z/Vision) & it was a problem also affecting the MT4G/DHD & others.
There was no solution
Click to expand...
Click to collapse
Ah I apologise I thought you were talking about the A500, my bad. I'll edit that to be little more accurate. However I have read about partitioning around the corruption on the A500 with NVFlash, so I know thats possible. Well, given almost ideal circumstances it is.
brendan802 said:
Funny thing is even on the acer loading screen I can still access adb with stock recovery. I have been trying to get fastboot update update.zip to work with no success. I have rewritten all partitons I can through fastboot with no luck. I think the partiton tables need to be rewritten through adb somehow or through apx mode but the cpuid is no longer attainable
Click to expand...
Click to collapse
As you seem to have a working ADB, would it be possible for you to boot to recovery, and using adb do this:
adb shell cat /proc/partitions
then copy it out and paste it in a post, then
adb shell cat /proc/cmdline
also copied into a post here
It can then be compared to a working device (mine) and see if anything is different.
For anyone on the stock bootloader, please do the same commands and report them back. It seems we used the A200 bootloader, which may be leading to this, or at least why the SBK fails. Also for any reponses, please include the recovery and if your bootloader was unlocked.
pio_masaki said:
Thanks for letting me know stock recovery allows ADB, I wasn't aware of that. I'm going to try talking to morfic and faux about using parted to manually partition the device, hopefully it means we can rebuild the partitions completely, and get the system to mount then correctly, then we can start on what caused it.
Click to expand...
Click to collapse
No thanks for all of your knowledge and support. I am giving this tab 1 more day and if I cant restore its going back to acer. I still dont understand how the recovery started actually showing the blue progress bar on the bottom instead of an immediate red triangle. I sent the wrong command with the wrong image I think something similar to this "fastboot flash ext4 mmcblk0p4.img" or mmcblk0p5.img and of course it errored due to size mismatch but then I was able to start to flash update.zip through recovery. Still baffles me
---------- Post added at 09:55 PM ---------- Previous post was at 09:50 PM ----------
Here is my output:
C:\android-sdk\platform-tools>adb shell cat /proc/partitions
- exec '/system/bin/sh' failed: No such file or directory (2) -
C:\android-sdk\platform-tools>adb devices
adb server is out of date. killing...
* daemon started successfully *
List of devices attached
0123456789ABCDEF device
C:\android-sdk\platform-tools>adb shell cat /proc/partitions
adb server is out of date. killing...
* daemon started successfully *
- exec '/system/bin/sh' failed: No such file or directory (2) -
C:\android-sdk\platform-tools>
C:\android-sdk\platform-tools>adb shell cat /proc/cmdline
- exec '/system/bin/sh' failed: No such file or directory (2) -
C:\android-sdk\platform-tools>adb devices
adb server is out of date. killing...
* daemon started successfully *
List of devices attached
0123456789ABCDEF device
C:\android-sdk\platform-tools>
brendan802 said:
No thanks for all of your knowledge and support. I am giving this tab 1 more day and if I cant restore its going back to acer. I still dont understand how the recovery started actually showing the blue progress bar on the bottom instead of an immediate red triangle. I sent the wrong command with the wrong image I think something similar to this "fastboot flash ext4 mmcblk0p4.img" or mmcblk0p5.img and of course it errored due to size mismatch but then I was able to start to flash update.zip through recovery. Still baffles me
---------- Post added at 09:55 PM ---------- Previous post was at 09:50 PM ----------
Here is my output:
C:\android-sdk\platform-tools>adb shell cat /proc/partitions
- exec '/system/bin/sh' failed: No such file or directory (2) -
C:\android-sdk\platform-tools>adb devices
adb server is out of date. killing...
* daemon started successfully *
List of devices attached
0123456789ABCDEF device
C:\android-sdk\platform-tools>adb shell cat /proc/partitions
adb server is out of date. killing...
* daemon started successfully *
- exec '/system/bin/sh' failed: No such file or directory (2) -
C:\android-sdk\platform-tools>
C:\android-sdk\platform-tools>adb shell cat /proc/cmdline
- exec '/system/bin/sh' failed: No such file or directory (2) -
C:\android-sdk\platform-tools>adb devices
adb server is out of date. killing...
* daemon started successfully *
List of devices attached
0123456789ABCDEF device
C:\android-sdk\platform-tools>
Click to expand...
Click to collapse
Odd, this is the exact same issue I just ran into. I actually kinda bricked my device earlier today, but besides that, I was testing a Jellybean build, and it was giving these exact same errors. Basically, you have no /system, or rather, nothing there. That would certainly explain why there is no booting.
This was done in bootloader, or in recovery? If this wasn't in recovery, please try there. The other option we can try is I'll upload my system.img, which IIRC has CM9, but its a full partition image, 1.2GB. Since you seem to have access to fastboot, you can do a fastboot flash system system.img and see what it does. If it still can't work, I guess you can see if DD will work in recovery, but it would need external sd to be mountable.
Also, that CPUID is interesting. As in, that isn't close to right lol
Ive already flashed a full system backup from a working a100 with no luck in fastboot. Recovery gives nothing but mount errors. I guess I need to find a way to replace the unlocked bootloader with the original locked one and send it to acer. I do appreciate your help though.
brendan802 said:
Ive already flashed a full system backup from a working a100 with no luck in fastboot. Recovery gives nothing but mount errors. I guess I need to find a way to replace the unlocked bootloader with the original locked one and send it to acer. I do appreciate your help though.
Click to expand...
Click to collapse
I think dd a full partition in adb would give better results then a data only flash but its just a theory. Thanks for taking the time to test some stuff out for us
Tapatalked from my Galaxy S II.
Bootloader v.0.03.06-ICS
TWRP Recovery
This is my output:
C:\android-tools>adb shell
~ # cat proc/partitions
cat proc/partitions
major minor #blocks name
~ # cat proc/cmdline
cat proc/cmdline
tegraid=20.1.4.0.0 [email protected] vmalloc=256M video=tegrafb [email protected]
x3db3d000 console=none usbcore.old_scheme_first=1 [email protected] brand=
acer tegraboot=sdmmc gpt
~ #
I have access to fastboot too. But I tried everything I found on the forum without good results :crying:
LeRx79 said:
Bootloader v.0.03.06-ICS
TWRP Recovery
This is my output:
C:\android-tools>adb shell
~ # cat proc/partitions
cat proc/partitions
major minor #blocks name
~ # cat proc/cmdline
cat proc/cmdline
tegraid=20.1.4.0.0 [email protected] vmalloc=256M video=tegrafb [email protected]
x3db3d000 console=none usbcore.old_scheme_first=1 [email protected] brand=
acer tegraboot=sdmmc gpt
~ #
I have access to fastboot too. But I tried everything I found on the forum without good results :crying:
Click to expand...
Click to collapse
This is a little scary, yet exactly what I was expecting. There is no partition table, at all. Unless you happened to not paste the output of cat /proc/partitions.
The other thing I noticed, in cat /proc/cmdline, there is no bootloader listed. Also, no CPUID, which is alot bootloader related. So, this explains why SBK fails, partially I think due to us using A200 bootloaders, and partially because if the bootloader is fubar, it won't pass anyways.
So we're left with either the EMMC corrupted or failed, and took the partitions with it, or its a bootloader issue, as it doesn't show up. Of course, its entirely possible the bootloader partition is also lost, which means it can't boot past the initial boot stage, the acer screen. Also explains why nothing can be mounted, but it strikes me as a little odd that recovery DOES work, but also doesn't show up in the partition list, even while IN recovery. I mean recovery runs from RAM, but it loaded from somewhere, right?
Only other option I can suggest, at least for you, LeRx79, is to flash the bootloader blob again. Fastboot will dump whatever to where ever you point it to, but doesn't mean it can actually flash it, if the partition is missing, or invalid, then it can't write to that partition, it doesn't exist.
If you still have the tools from when you unlocked the bootloader, try this:
adb reboot bootloader
fastboot flash bootloader whateverblobfileyouused
And report back if it fails, or does it, and actually attempts to boot again, and please do
adb reboot recovery
adb shell
adb cat /proc/partitions
adb cat /proc/cmdline
and see if they change.
I've got an error when I try to flash the bootloader:
FAILED <remote: <00030003>>
LeRx79 said:
I've got an error when I try to flash the bootloader:
FAILED <remote: <00030003>>
Click to expand...
Click to collapse
OK then I suppose its gone too.
Try uhm...
Adb shell
Mount /data
See what it says probably not found but report it back here.
Then try
Parted /dev/block/mmcblk0p8 print
This should return partition info for /data including internal SD. Try for device mmcblk0p1 - mmcblk0p8 and paste what it says.
Its really looking like emmc failure which means new motherboard time. Only other thing is trying to create partitions.
Tapatalked from my Galaxy S II.
Hello guys, i wanted to reply to thread http://forum.xda-developers.com/showthread.php?t=1492461 but sadly forum doesnt let me due to insuficient rights (i think you need 10 posts to post in developer forums), so here is my analysis on Phone Encryption feature based on jerl92`s current CM9-vision-RC2 ROM. So feel free to move my posting whereever you feel it belongs to...
Also forum rules seem to force me to formulate a question of of this (lol), so here is my question:
Q: How to get Phone encryption running STABLE on a DesireZ aka vision device using command line vdc, or get it running anway using GUI?
A: Partially and unstable i was able to get it working using jerl92's CM9-vision-RC2 ROM : Please read below...
I wasnt able to get phone encryption working on ROMs based on newer Android codebase, but I was able to successfully encrypt a HTC vision device (Desire Z) using the following procedure for Phone Encryption with CM9-vision-RC2 ROM (which sidesteps the filesystemsizeproblem described below, FORMATS /data partition and leads in case of CM9-vision-RC2.zip to a HIGHLY unstable system afterwards):
adb shell
su
vdc cryptfs enablecrypto wipe yourpass
* The system will freeze for a few seconds (follow adb logcat), reboots and then comes up with a password prompt.
* Phone encryption password is yourpass
* After having arrived back at home screen, the device reboots after 2minutes without any indication in logcat. So you only have roughly 2 minutes time for debugging *g*.
* BUT AT LEAST ENCRYPTION WORKS AND ROM DEVELOPMENT CAN GO ON: adb shell mount | grep /data
/dev/block/dm-0 /data ext4 rw,nosuid,nodev,noatime,barrier=1,data=ordered,noauto_da_alloc 0 0
*vdc cryptfs cryptocomplete: 200 0
*vdc cryptfs verifypw yourpass: 200 0
*vdc cryptfs verifypw wrongpass: 200 1
I am sure jerl92 can identify the reason for those reboot loops in the logcat of such encrypted CM9-vision-RC2 system and its just one or more of the hacks at systemstart which he already applied to normal system and need to be repeated after START {cmp=com.android.settings/.CryptKeeper$Blank} in logcat!
My configuration:
* ROM: CM9-vision-RC2
* hboot-eng.img: vision.hboot-0.84.2000
* TRUE RADIO S-OFF: Despite the knowledge about different partition layouts throughout different Radio firmwares it does NOT seem to be important which Radio version is currently on the phone: I tested below's procedure with Vision_Radio_12.62.60.27_26.13.04.19, as well as with Vision_Radio_12.57.60.25_26.10.04.12-PC10IMG and Vision_Radio_12.62.60.27_26.13.04.19(From T_MOBLIE OTA 2.16.531.5, and there doesnt seem a difference in behavior).
Then I was able to identify at least 2 problems with (i think all) jerl92's ROMs using normal phone encryption using Settings | Security | Encrypt phone:
1) The /data filesystem has the wrong size (fitting mmcblk0p26 100%, which is 16 Kbytes too large)
2) There is another issue at around 50% of encryption progress. My only idea is that there is a problem encrypting the sdcard, based on logcat showing several timeouts in the mounting procedure while the encryption progress is running.
Workaround for 1):
For better understanding please read: https://source.android.com/tech/encryption/android_crypto_implementation.html
immediately after having tapped on Settings | Security | Encrypt phone, and initiating the encryption process, adb logcat shows:
D/VoldCmdListener( ): cryptfs enablecrypto inplace {}
E/Cryptfs ( ): Orig filesystem overlaps crypto footer region. Cannot encrypt in place.
(you can tap back-button to go back)
The short term solution for that error is described at https://code.google.com/p/cyanogenmod/issues/detail?id=5678#c21, and also comment #46: #c46
But use your own /data partition which is in case of HTC vision mmcblk0p26: adb shell mount | grep /data
/dev/block/mmcblk0p26 /data ext4 rw,nosuid,nodev,noatime,barrier=1,data=ordered,noauto_da_alloc 0 0
Following format command worked for me inside recovery using CWM after having mounted /system: /system/xbin/mkfs.ext2 -l 1143979008 /dev/block/mmcblk0p26
(alternative command mounting /data shortly to test size using df, and 1099608-16=1099592: mke2fs /dev/block/mmcblk0p26 1099592)
@jerl92: Long term solution I think should be modification of fstab (like https://android.googlesource.com/device/moto/wingray/+/android-4.1.1_r2/recovery.fstab ) as described in second part of https://jira.cyanogenmod.org/browse...issuetabpanels:comment-tabpanel#comment-10700.
Ideas on 2):
logcat is full with "W/MountService( ): Waiting too long for mReady!" during the regular GUI encryption process.
and also showing up with
"D/VoldCmdListener( ): volume mount /mnt/sdcard
W/VoldConnector( ): Unhandled event '612 Volume sdcard /mnt/sdcard mount failed - no media'
E/MountService( ): Boot-time mount failed (-2)
"
Probably there is an issue starting encryption of sdcard at 50% of total encryption progress (as part of the implementation described on http://source.android.com/tech/encryption/android_crypto_implementation.html).
And no, my microSDcard is inserted; i even made sure NOT to have special cards inserted like a goldcard, which i initially thought of the problem could be...
Other ideas to get the /data partition on vision devices encrypted
*Modified CWM as described here http://forum.xda-developers.com/showthread.php?t=1167089 for another device
*Using an old way initially designed for wildfire but it might also work on vision devices: https://github.com/guardianproject/luksunlock I wasnt able to compile using current toolchain for ICS and higher :-/
* Adopting the issue to CM10.1 and helping to develop/debug following idea: https://code.google.com/p/cyanogenmod/issues/detail?id=5678#c34, currently migrated to https://jira.cyanogenmod.org/browse/CYAN-87 (maybe someone tells Flinny for his ROMs): In which ROM does these changes flow to, so one can test them on vision devices?
So how do you guys think is the cheapest and fastest way to get our devices encrypted?
I cant "cook", nor do i know how to apply patches / modify to already existing ROMs using recovery update :-/
Few days ago I decide to encrypt my phone. And as I want to install nightly so I rebooted and it want the password but then I discover I can't remember I tried adb shell but it says that I do not have permission (sudo does not works). So what should I basically do now? use terminal/ adb shell in TWRP and format /data and /sdcard with dd, or what is way to do it correctly? I come across to this https://android.stackexchange.com/questions/33398/cannot-factory-reset-after-encrypting#48264 but it's 4 years old I do not get completely "Substitute /dev/block/mmcblk0p12 and ext4 according to the recovery filesystem table (for /data). " part. I've LG G2.
Thanks Rob
roberto32 said:
Few days ago I decide to encrypt my phone. And as I want to install nightly so I rebooted and it want the password but then I discover I can't remember I tried adb shell but it says that I do not have permission (sudo does not works). So what should I basically do now? use terminal/ adb shell in TWRP and format /data and /sdcard with dd, or what is way to do it correctly? I come across to this https://android.stackexchange.com/questions/33398/cannot-factory-reset-after-encrypting#48264 but it's 4 years old I do not get completely "Substitute /dev/block/mmcblk0p12 and ext4 according to the recovery filesystem table (for /data). " part. I've LG G2.
Thanks Rob
Click to expand...
Click to collapse
I'm not an expert on this but since every device's partition map is unique, dd should be given the specific partition offsets and filesystem type for your device when performing any destructive operations or else you run the risk of bricking your device when using dd to write to your internal flash. That's what the "substitute" part is about because it varies from device-to-device.
I would suggest checking on one of LG G2 forums here, someone there can probably give you the proper parameters. (Here is the general LG G2 section, there are also some others eg for particular carriers like T-Mobile US)
I've already asked there but no answer. I'll rahter specifically ask about how to find partition table map. Thanks anyway