BigPart Repartition Upgrade and Resource Center - Xoom Android Development

Hello everyone.
You should know that time ago Motorola decided to stop updating our Xoom, but we showed (and we are still showing) them that our tablet is still alive and kicking.
Let me update this with the last news (a big win, indeed) from @bigrushdog:
IMPORTANT: It should be harmless for your Xoom, but you need to do it at your own risk. Nobody will give you any kind of warranty and we will be not guilty if your Xoom bricks, dies, loses the data, gets cursed, your cow starts to give bitter milk or if it unchains a thermonuclear war.
bigrushdog said:
BigPart Repartition Upgrade and Resource Center
Credits
Much love, credit, and respect go out to @Schischu and @rchtk! Your insight on the kernel patch paved the way! The Motorola Xoom cheats death once again!
Repartition Guide
1) Your data will be totally wiped! If you have Nandroids, TitaniumBackups, or anything of any value on your internal storage, copy them to your microsd or computer! They will be gone forever! Your microsd card is the only safe haven on your Xoom during this process.
2) Put all needed resources on your microsd card! You will need the original TWRP 2.6.3.0 touch recovery from @runandhide05, TWRP 2.6.3.0 BigPart version, your desired rom, and the BigPart boot image that goes with your desired rom. The BigPart boot images can be found in the next section.
3) Reboot into recovery. Flash TWRP BigPart. Don't reboot just yet.
4) Go back into wipe menu and wipe everything but /sdcard.
5) Go to reboot menu and reboot into recovery. Disregard the "No OS" warning and don't install SuperSU when asked.
6) When you come back into recovery, it will think your data is encrypted but it's not. Go into wipe menu and "format data". Type "yes" when prompted. When done, go back into wipe menu. Select "Advanced Wipe". Check "system" and "cache" and wipe them.
7) Hit Home then go to reboot menu and reboot recovery. Once again, disregard "No OS" warning and don't install SuperSU when asked
8) When you come back into recovery, go into mount menu. You should see "cache" and "data" checked. "System" will be unchecked. Check it to confirm it mounts, then uncheck it. Congratulations! You are now repartitioned!
9) Go into install. Recovery should show your microsd storage by default. If not, using the navigation panel, navigate to root then go into "sdcard". Flash your rom, BigPart boot image package, and any other resources as you normally would.
10) Reboot into system. You are done!
Later.... How to restore to stock partitions.
TWRP 2.6.3.0 R.A.H BigPart Edition Recovery
TWRP 2.6.3.0 BigPart
BigPart Eos 4 boot images with the usual modules
WARNING: You must have already executed the repartition before using these boot images. If not, follow the guide above! These will soft brick your device otherwise!
Eos 4 BigPart Wingray Boot Image
Eos 4 BigPart Stingray / Stingray_CDMA Boot Image
Eos 4 BigPart Everest Boot Image
CM10.1 BigPart Kernel by @matt4321
http://d-h.st/IzQ
For CM10.1, follow instructions in the OP but when getting to the flashing of ROMs, flash CM10.1, then flash thi
BigPart @dreamcwli MyWingray 4.3 (or in theory any 4.3) boot image with the usual modules
Note: This is a new kernel rebased on @dreamcwli 's tree. No overclock or gpu overclock yet, but soon ;D
WARNING: You must have already executed the repartition before using these boot images. If not, follow the guide above! These will soft brick your device otherwise!
MyWingray 4.3 BigPart wingray Boot Image
Click to expand...
Click to collapse
Q&A
Q: OK to understand this right, now we have a new recovery and boot. Which ROM do we use? The same as before? And BigPart @dreamcwli MyWingray 4.3 is only for wingray?
A: Yes, we have new recovery and boot. For this recovery and boot you need to use the new BigPart roms. If you are not using BigPart roms, you will need to install old recovery and boot and format everything again. And yes, it seems like @dreamcwli MyWingray 4.3 is only for wingray at the moment, but brd published a version of the last EOS4 stable with the new kernel working for BigPart.
Q: Does this new space mean we can start using full blown GApps Instead of the scaled down versions we had been previously?
(I understand there may be NEON ramifications causing a NO Answer here)
A: You can use the GApps that you prefer. Now we have space enough, but scaled down versions might be slightly faster as it uses less resources (I guess).
Q: Seems like a good time to ask and reveal my limited understanding of why user space is formatted vfat. I'm a linux fan who dislikes being limited to 4096 Mb when creating a linux.img. A yes or no answer will suffice. As long as the devs are pushing the limits, can the user space (sdcard) be formatted ext2, 3 or 4?
A: I think that that is something to implement in the kernel. I think that it is easy to do and our bakers eventually will implement it.
Q: Can cm10.2 be flashed instead of an eos4 rom after the repartition?
A: You need to replace BOOT.img in the CM zip with the BigPart compatible with your Xoom, and if the kernel is compatible with CM it will work.
Q: I'm on stingray_cdma.....unless i can flash a wingray rom and boot.img after the repart?
A: No idea, but it's safer to use roms build for your device. Take a look to the previous question.
Q: im on stingray and i tried using cm10.1 as my rom and it didnt get to the bootanimation so i tried eos 3 and it works well. couldnt get eos 4 to download from goo.im
A: brd published some EOS4 working with BigPart (see http://forum.xda-developers.com/showpost.php?p=47005701&postcount=1 )
Q: I am asking again to understand this right, now we have a new recovery and boot.
Which ROM do we use? The same as before? Do we have to change the boot IMG in the ROM with the big part one?
And BigPart @dreamcwli MyWingray 4.3 is only for wingray or it can be used with everest as well? And what is its difference with the other big part in the kernel?
A: Use only BigPart roms. You will need to change the boot.img from the rom if the rom is not compatible with BigParts, but if the rom is not compatible with the new kernel, it is useless... MyWingray is compatible with Everest but you will not have 3G, I guess... But I'm not sure.
Q: That's great. @bigrushdog @realjumy Is there a way to get the radios for everest and stingray on a separate zip?
A: The rom must be cooked with the radios...
Q: I wanna ask you because i have my xoom forma two years, and laste time i format it and give me error with dev block mmblck or something else and i think that i could have my internal storage corrupt.. If i install your 4.3 image modded, and then the repartition, Will it works fine?? Thanks and sorry me
A: No idea.
Q: Followed the instructions for the re-partitioning. Everything worked except the Xoom cannot see the external sd card in recovery. I have re-formated it as fat32 and tried another card. When I view the files in the PC they are there. Any ideas?
A: Something something went wrong... Copy the data from the SD to your PC, format SD and put back data. Let's see if that works...
Q: How can we identify which ROMs are for the new partition layout? Just assume everything 4.3 and later? It would be nice if we added [BigPart] to the thread title to make them more easily identifiable.
A: Only roms with BigPart in their name can be used with the new layout.
Q: I was under the impression that we could use old roms provided we replaced the boot.img in the zip with the NEW BIGPART boot.img for our unit? (Only after repartitioning has been completed) Is that wrong and we need to wait for a particular build?
A: Not all the roms are compatibles with the boot.img method (kernel method). You will need to try to be sure. EOS4 and Dream's have proper versions. If you want to use, for example, CM you will need to:
option 1.- Build it yourself patching the kernel
option 2.- Use CM and try to use a different kernel
option 3.- Ask to the CM maintainer to release BigPartition versions.
There is a lot of 4.2.2 projects running, some 4.3 and if we are successful, MAYBE we will be able to port 4.4 to our devices. One of the main problems (but not the only one) is the internal storage structure of the tablet. It seems that is not too hard to solve, as in other devices (mainly Samsung) is common to change it.
The aim of this project is to compare how the internal partitions are setted up in order to change them and have more room for system and apps. This will improve all the ROMS (4.1, 4.2.*, 4.4). @bigrushdog is doing a big effort to change it but we need more data from all models to compare and be sure that we don't break anything.
It will take up to 3 hours (depends on the model) but is something that can work while you are sleeping or not using the tablet. With the data provided by you, we can compare and choose the best changes.
IMPORTANT: It should be harmless for your Xoom, but you need to do it at your own risk. Nobody will give you any kind of warranty and we will be not guilty if your Xoom bricks, dies, loses the data, gets cursed, makes your cow begin to give bitter milk or if it unchains a thermonuclear war.
IMPORTANT: It should be harmless for your PC, but you need to do it at your own risk. Nobody will give you any kind of warranty and we will be not guilty if your PC bricks, dies, gets cursed, loses the data, makes your cow begin to give bitter milk or if it unchains a thermonuclear war.
What are you going to do:
You are going to do a 1:1 copy of your internal storage into your PC. Then, we will detect the partitions and where begins and ends each one. Nothing else. We will compare the different versions and in the future a tool will be released to make the changes.
What you will need:
Linux (maybe you can use a Live DVD / USB?). It should be a way to do this process under Windows. If you know how to do it, please, share the info.
33GB of disk space in your computer, anywhere.
Android SDK working (that means that if you plug your tablet turned on and run
Code:
./adb devices
in the folder "platform-tools" of your SDK will provide a serial number): http://developer.android.com/sdk/index.html
3 hours (can be done while sleeping, not using the tablet, etc) if you have a 32GB Xoom.
Rooted Xoom.
Before you begin:
DO A NANDROID BACKUP!!!!!
READ EVERYTHING AND ASK IF YOU DON'T UNDERSTAND SOMETHING
Step by step:
Full charge your tablet (or keep it connected to AC?) and turn it on WITHOUT SDCARD.
If your Android SDK is not installed or working properly, fix it now: http://developer.android.com/sdk/index.html
Install the dependencies. For Ubuntu / LinuxMint / Debian:
Code:
apt-get install testdisk netcat pv extundelete testdisk
Activate USB Debug on your device (in order to connect with adb). You can find it under Settings > Developer options.
Note: On Android 4.2 and newer, Developer options is hidden by default. To make it available, go to Settings > About phone and tap Build number seven times. Return to the previous screen to find Developer options.
Click to expand...
Click to collapse
Plug your tablet (it must be on) and run
Code:
./adb devices
in the folder "platform-tools" of your SDK. If you don't get as a result a serial number, STOP. Something is wrong with your SDK. Please, fix it to continue.
Open a terminal on your computer, go to the Android SDK directory's subdirectory sdk/platform-tools (where adb is located).
We will setup a forward port to be able to download the data to our PC:
Code:
./adb forward tcp:5555 tcp:5555
Now we will connect to the tablet
Code:
./adb shell
Maybe you need to grant permission to do it. Take a look to your tablet's screen.
We become superuser:
Code:
su
Grant permanent permissions when asked. You can revoke the permissions later if you want.
With this we will transfer the data to the port that we set previously:
Code:
/system/xbin/busybox nc -l -p 5555 -e /system/xbin/busybox dd if=/dev/block/mmcblk0
DON'T CLOSE THAT TERMINAL. An now OPEN A NEW ONE IN THE PC.
Go again to the folder "platform-tools" of your SDK and let's collect the data:
Code:
./adb forward tcp:5555 tcp:5555
Code:
nc 127.0.0.1 5555 | pv -i 0.5 > mmcblk0.raw
If you want to save the file in a different place/partition, change what is after ">". For example, if I want to save the file in my home folder, I will write /home/jumy/mmcblk0.raw. If you are not sure or don't know how to do it, don't change it.
You will to wait up to 3 hours until it finish.
When the transfer is finished, run this in the folder where the dump is located (if you changed nothing, it is located in the older "platform-tools" of your SDK):
Code:
testdisk mmcblk0.raw
First restore the GPT partition table. Select mmcblk0.raw in the TestDisk interface and choose Proceed.
Choose EFI GPT.
Then select Analyse.
Choose Quick Search.
The search will return a table that you should copy and paste in this thread.
Now you can exit and remove the dumped file (mmcblk0.raw).
Please, when you provide the data, tell us which model, storage size, ROM name and version and indicate if it is the Hong Kong model.
Info collected from http://www.df.lth.se/~jokke/androidfilerecovery/ --> Visit it if you want some screenshots.

Everest, 32GB, using EOS4 V170, NOT Hong Kong model.
Code:
Partition Start End Size in sectors
>P MS Data 47104 51199 4096
P MS Data 61440 65535 4096
P MS Data 122880 647159 524280
P MS Data 647168 993279 346112
P MS Data 993280 62319583 61326304

Ill Help!
Testing in progress... =]
Device: XOOM 32GB Wingray MZ604
Android: 4.2.2
ROM: EOS4 Nightly 203
EDIT: i did my bloody SD card... did it again and now heres the internal 32GB
Code:
Disk mmcblk0_1.raw - 31 GB / 29 GiB - CHS 3880 255 63
Partition Start End Size in sectors
P MS Data 47104 51199 4096
P MS Data 61440 65535 4096
P MS Data 122880 647159 524280
P MS Data 647168 993279 346112
P MS Data 993280 62319583 61326304

4.4
No problem for test

Would love to test
I would really love to test Android 4.4 on my Xoom... The new platform seems to be much faster and my Xoom feels very slow and clumpy on Android 4.2 and even 4.1

djripster said:
I would really love to test Android 4.4 on my Xoom... The new platform seems to be much faster and my Xoom feels very slow and clumpy on Android 4.2 and even 4.1
Click to expand...
Click to collapse
4.4 will have the same problem that 4.2.* and 4.3 as it is a problem with the storage. That is the reason why we need so badly to change the partitions, and that is why we are asking for help to collect this data.

I'm running it now!
Sent from my Xoom

notbrodie said:
I'm running it now!
Sent from my Xoom
Click to expand...
Click to collapse
That's great!!!!

i got no Linux box. will see if i can do some research over the weekend on Windoze tools.

I derped my development laptop so I was down a few days. I think we have what we need for a repartition script. As some of you know kitkat source dropped. Under the hood, not much changed. At least from what I hear. So I'll slap together a theoretical repartition script. Any volunteers?

realjumy said:
That's great!!!!
Click to expand...
Click to collapse
Disk mmcblk0.raw - 1967 MB / 1875 MiB - CHS 240 255 63
Partition Start End Size in sectors
>P MS Data 47104 51199 4096
P MS Data 61440 65535 4096
P MS Data 122880 647159 524280
P MS Data 647168 993279 346112
P MS Data 1860958 1862168 1211 [\^I]
Xoom WiFi 32GB EOS-203, Not Hong Kong.
also: 3 hours... lol. it took 18 minutes
---------- Post added at 08:09 PM ---------- Previous post was at 08:06 PM ----------
bigrushdog said:
I derped my development laptop so I was down a few days. I think we have what we need for a repartition script. As some of you know kitkat source dropped. Under the hood, not much changed. At least from what I hear. So I'll slap together a theoretical repartition script. Any volunteers?
Click to expand...
Click to collapse
Count me in! i've got a nandroid on my external sdcard, though I'm not sure what good that'll do if the repartitioning fails...
---------- Post added at 08:18 PM ---------- Previous post was at 08:09 PM ----------
about to load 4.4 on my N4... let's see if this super-hyped new android is really that much different/better than 4.3!

Model: MZ604 (wifi-only)
Storage size: 32GB
ROM: EOS Stable release 3.0
NOT Hong Kong model
testdisk output:
Code:
Disk mmcblk0.raw - 32 GB / 29 GiB - CHS 3892 255 63
Partition Start End Size in sectors
>P MS Data 43008 47103 4096
P MS Data 57344 61439 4096
P MS Data 118784 643063 524280
P MS Data 643072 989183 346112
P MS Data 989184 62512095 61522912
Took a bit more than 3 hours...
notbrodie, there may be something wrong in your experiment as the dump file is only around 2GB. Or maybe you just have non-standard partitioning, I am not sure...
PS: Small correction to the instructions (just to make it perfect):
- closing code tag seems to be lost in ./adb shell command
- A typo in "If you want to save the fine"

Thank you guys!
Sent from my Nexus 4 using Tapatalk

DaniLoveSky said:
Model: MZ604 (wifi-only)
Storage size: 32GB
ROM: EOS Stable release 3.0
NOT Hong Kong model
testdisk output:
Code:
Disk mmcblk0.raw - 32 GB / 29 GiB - CHS 3892 255 63
Partition Start End Size in sectors
>P MS Data 43008 47103 4096
P MS Data 57344 61439 4096
P MS Data 118784 643063 524280
P MS Data 643072 989183 346112
P MS Data 989184 62512095 61522912
Took a bit more than 3 hours...
notbrodie, there may be something wrong in your experiment as the dump file is only around 2GB. Or maybe you just have non-standard partitioning, I am not sure...
PS: Small correction to the instructions (just to make it perfect):
- closing code tag seems to be lost in ./adb shell command
- A typo in "If you want to save the fine"
Click to expand...
Click to collapse
Thanks mate. I will correct the post later from the PC.
Sent from my Nexus 4 using Tapatalk

I'm dumping stingray right now. From what i can see, it already looks like the offsets are different for different models. That's very good to know. So calculations will need to be made for each version. After talking with @Roach2010 he says there may be partition table info that needs updating somewhere in the NAND dump. However, it doesn't appear that is the case for all devices. Once i get this dump we can play some more.
EDIT: found some interesting information http://forum.xda-developers.com/showthread.php?t=1388996

You guys... are brilliant... I'm in. My Xoom is just collecting dust since Eos shutdown.

also guys im getting my nexus 5 by the end of the week, let me know if you want any information extracted from that ! will be rooting that m*****f***er soon as! which leaves me with 2 dev devices XOOM and S2

I have a mz605 umt_everest model, at monday in my lab I will do this and post here.

bigrushdog said:
I'm dumping stingray right now. From what i can see, it already looks like the offsets are different for different models. That's very good to know. So calculations will need to be made for each version. After talking with @Roach2010 he says there may be partition table info that needs updating somewhere in the NAND dump. However, it doesn't appear that is the case for all devices. Once i get this dump we can play some more.
EDIT: found some interesting information http://forum.xda-developers.com/showthread.php?t=1388996
Click to expand...
Click to collapse
Nice find, so by doing this research and analysis it will be possible to create a universal partition structure (in terms of the XOOM versions). am i right in thinking this?

LOGMD said:
Nice find, so by doing this research and analysis it will be possible to create a universal partition structure (in terms of the XOOM versions). am i right in thinking this?
Click to expand...
Click to collapse
No... Whit this we will be able to:
1.- Check if every Xoom version have the same or different partition structure (done, each model has a different structure).
2.- See how every model need to be restructured (pending, that will be next step).
3.- Provide a script to make it easy to do (we need to do the 2nd step first).
Sent from my Nexus 4 using Tapatalk

Related

[Guide] Eden Midas 8" Tablet

Moderators, please permit me to leave the tablet's Korean name (Eden Midas: 이든 마이다스) here so it shows up in google searches (if you don't have Korean fonts, it will probably show as garbage, but it really does say "Eden Midas" in Korean script).
This thread is intended as a place to collect together information about the Eden Midas tablet. It's quite possible that we will eventually find that the internals are the same as one of the Chinese tablets using the RK2918 chipset, in which case the thread may just turn into a pointer to that other thread.
What is the Eden Midas tablet?
In the form I have it, an 8" tablet based on the RK2918 chipset, with ICS 4.0.3 and kernel 3.0.8+ (whatever the plus may mean). It's quite nice, with a very clean 1024*768 screen. But like most RK2198 builds, severely locked down and marketed just as an entertainment station. At present, it seems to be only sold online in Korea. My build is V1.0.1.IMK74K.eng.root_20120508.165508_HW:1.0.0.0 (I wonder if the HW stands for huawei??).
Rooting[\B]
This is all I've done so far. Here's what I did:
On Linux
What's needed:
You may need to have root privileges on your linux system (you will need to mount some filesystems, and edit a udev rule file - depends on the linux system who is allowed to do these). You will also need rk2918tools ( https://github.com/lamegopinto/rk2918tools) - these are tools collected by lamegopinto, credits inside to the original authors; specifically, you will need ivop's rkflashtool.
In theory, this shouldn't remove your applications, data, and settings. In practice, on my machine, it did. So I'd back everything up first. And take out any external sd card so it's safe. Also, I better warn that I had a few scary moments getting to here, so please make sure you have really good backups. You will need (on your linux system) copies of su, Superuser.apk and busybox.
Connect the tablet by USB to your linux machine (real or virtual). Put the tablet into fastboot mode by holding down the whole +/- key, then pressing the start key for about 3 seconds. Keep holding the +/- key for up to ten seconds. If the system boots or goes into the boot screen (android open robot icon) you need to try again.
On the linux system, type lsusb (if you get an error, you probably need to install usbutils - how you do this depends on the linux system). If you see 2207:290a, you are OK. If you see 2077:0000, you missed fastboot mode and need to try again.
Tell linux about your device. You need to install udev rules.
Code:
cd /etc/udev/rules.d
sudo pico 61-android.rules
then create the content
Code:
# USB devices
SUBSYSTEM=="usb",ATTRS{idVendor}=="2207",ATTRS{idProduct}=="0000",MODE="0666",GROUP="users"
SUBSYSTEM=="usb",ATTRS{idVendor}=="2207",ATTRS{idProduct}=="290a",MODE="0666",GROUP="users"
This is for fedora 17. On current ubuntu the priority number (the 61 in the file name) probably needs to be different (maybe 51?). In earlier systems, the udev rule format is different, you're going to need to google this. The above rules also include one for adb mode, which will probably turn out useful. If you want adb mode, you will also need to do this:
Code:
pico ~/.android/adb_usb.ini
and create the content
Code:
0x2207
Create a directory called MIDAS inside the directory where you stored the rkflashtools. You need to have probably 2 times the capacity of your sdcard available (if you have an 8GB internal sdcard, I'd aim for 16GB+ free). Go into that directory.
Use ivop's rkflashtool to retrieve the first 2K blocks of memory:
Code:
../rkflashtool r 0x0 0x2000 > headers
This will create a file called headers. It's a binary file, but the important bit is readable. Try
Code:
more header
to read it, and carefully note down the partition locations (note that the order parameter order is the opposite to what rkflashtool uses. [email protected] means that the partition consists of X blocks starting at Y. Whereas for rkflashtool, you specify "rkflashtool (r or w) Y X (< or >) filename". The numbers X and Y are in hex notation (that's what the 0x at the start means). Note also that the MIDAS has a different layout to the tablet Ivop was discussing).
Now retrieve all the other partitions from the device, giving them descriptive names. For root, the only one you will actually need should be system.img. But get the rest just in case, as backups... Please note that there seem to be some funnies with this device, and rewriting partitions often causes it to reinitialise everything. It's probably doing some checksumming... Please keep these image files safe, and don't edit them! But you can gzip them to reduce the space they take up. Please note also that the last partition - usually the user partition - goes to the end of your card. So you need to convert your flash card size into a hex number (e.g. 8GB is 0x200000000 bytes, or 0x10000000 512B blocks). Suppose the user partition starts at 0x32A000. Then you need to put its length as 0x10000000 - 0x32A000 = CD6000 blocks (you may need a hex calculator for this).
Download su, Superuser.apk and busybox (these are all public domain) into your MIDAS directory
Code:
cp system.img system.new.img
mkdir mnt
sudo mount -t ext3 system.new.img mnt
Copy su into mnt/xbin, busybox into mnt/bin and Superuser.apk into mnt/app (simplest is to use a file manager to do this - or use linux commands). At this point, your image is complete!
Code:
umount mnt
../rkflashtool w (the system partition address and length for _your_ system image, which might be different from mine) < system.new.img
../rkflashtool b
Disconnect the USB cables
Your system should now reboot. If you're lucky (I wasn't) it will reboot as a rooted system with all your files intact. If you're semi-lucky, it will reboot as a rooted system, but without your files. Hope your backups were good... If you're really unlucky, it won't reboot. You may need to recreate all partitions from the copies you just made above, and try again. If the system seems completely bricked, the reset button (the tiny pinhole in the back, just above the external sd card door) is your friend. Pressing it and going into fastboot mode can allow you to reload all your partitions (you did make those backup copies of all partitions, didn't you)?
On Windows[\I]
Sorry, I have no idea. If someone drafts a guide, I'm happy to put it up. Alternatively, you can easily install a ubuntu virtual machine inside your windows box. It will probably be easier, and the linux experience won't go astray in working with android anyway.
[Tun Drivers and Openvpn]
For some reason known only to themselves, the manufacturers have removed the Tun drivers from the ics kernel build. The kernel doesn't have the ability to load modules. (This makes sense for phones, maybe, but I can't understand why anyone would remove the ability to load modules in a tablet. Perhaps the Chinese government doesn't want it to be too easy for people to set up vpns?) Anyway, you can install what appears to be a suitable Tun module using Tun.ko installer. It installs OK but when you try to use it, the system freezes for about 10 seconds, then reboots. If anyone finds a version of the 3.0.8+ kernel (maybe 3.0.8- kernel would be a better name), suitable for the Midas and with either a built-in tun driver, or the ability to load kernel modules, please let me know.
Complete Reflashes
Not sure if there are any that will work right now. If you're really stuck, the cyanogenmod version for Cube might work, but it sounds like it is still a work-in-progress.
Do you have the kernel of the tab?
- Oma -
Oma7144 said:
Do you have the kernel of the tab?
Click to expand...
Click to collapse
Sorry, no - and sorry for the delay in replying, I didn't get notification for the thread.
Dump the firmware and upload the files: http://forum.xda-developers.com/showpost.php?p=35298423&postcount=462
- Oma -

[Root] [Rom] [Dev] [Recovery] Archos 50 Platinum Dev Topic (Gen11)

Tweeks:
Camera Tweek (You need busybox installed for this), or you can unpack the zip and apply the patch manually/setting the permission corectly.
It will improve the overall video recording quality, by increasing the size limit cap of the video (old setting 600 Kb vs new 1200 Kb)
Custom Firmwares
Reserved
Recovery
CWM WITH ACCESS AT THE SYS_BOOT PARTITION ======>>>>> Bigger chance in bricking your device if you sleep while you flash something.
CWM NON TOUCH / NO ACCESS TO SYS_BOOT
Way to flash:
Version 1)
- enable usb debugging
- install adb drivers
- use the command adb reboot bootloader
- use the command fastboot flash recovery recovery.img
Version 2)
- shut down the phone
- press the volume key minus and power key
- use the command fastboot flash recovery recovery.img
Do not forget to unpack the zip files.
Please have in mind that with the no_sys CWM, you cannot restore the phone to stock using an official update.
Unbricking
Copied from here
Here's a small tutorial for people who bricked their phone while formatting the sys_boot partition in CWM Recovery. When you format that partition, nothing works except a screen shows up saying "RESET FOR ENTRY QPST DOWNLOAD". This screen is also known as the Qualcomm Diagnostic Mode.
Requirements:
A linux distribution (Ubuntu)
sys_boot.img (https://docs.google.com/file/d/0BxJJu-wXKdltTE90SGtEMmFQZHM/edit)
Follow the steps to restore the sys_boot partition:
1. Connect your phone to a pc using the cable
2. Install the drivers if necessary:
https://dl.dropboxusercontent.com/u/17562266/USB Modem Driver.rar
3. Open your terminal
4. Type "lsblk" (without the quotes).
You should see a list, showing every connected disk and partition. Look for a partition with a size around 50M. This is the partition we need, so remember the corresponding name under the 'NAME' column. It can be "sdc", "sdd" or "sde" followed by a number.
5. Cd to the directory you placed sys_boot.img in
cd [filename]
6. Type "sudo dd if=/dev/NAME of=sys_boot.img bs=512
Replace NAME with the name you got from lsblk, and press enter.
The output should look something like this:
3959420000 bytes (3866621 KB) copied, [ time spent], [KB/s]
7. Remove the cable from your device, do a battery pull and try to boot your device
Normally, it should boot correctly. If you formatted the /system partition too, you have to get into recovery mode by holding the upper volume button while booting, until a red screen appears.
If you have any questions, or if this doesn't work for you – let me know in the comments.
Thanks a lot to Adonis K. and globula_neagra for the sys_boot image and pointing me in the right direction.
Credits to DieterHolvoet from arctablet for putting it together.
THX! Much appreciated!
I own this device since today and you Sir made me very happy with your cwm and ability to root.
---------- Post added at 08:19 PM ---------- Previous post was at 07:42 PM ----------
I can confirm. Touchversion of CWM does not work.
File for non-touch CWM seems the same as touch btw. Could you please fix the link? Thx!
Yes, the touch version doesn't work.
The no-touch no-sys version works fine.
Here is the link for the no-touch/no-sys version (taken from the arctablet forums): http://globula.arctablet.com/ARCHOS_50_PLAT/CWM_A50_Plat_NoTouch_No_SYS.img.zip
globula must have misstyped it
IN CWM I cannot mount the sdcard. So I can't install any Zip-Files this way
Nash123 said:
IN CWM I cannot mount the sdcard. So I can't install any Zip-Files this way
Click to expand...
Click to collapse
I will fix these issues tomorrow.
Thank you!
GEN 11 ?
cajl said:
GEN 11 ?
Click to expand...
Click to collapse
Yes the Archos 50/53 Platinum and Archos 80 Xenon are Generation 11
NO !
it will be announced at IFA and I would see in Berlin
cajl said:
NO !
it will be announced at IFA and I would see in Berlin
Click to expand...
Click to collapse
I could try to convince you that they are Gen11, but you will have to trust me, the update page does not lie.
OK Archos 53 also ...
Anyone know if it's possible to partition the internal memory and internal sdcard together? I'm getting really low in internal space intended for app installations (180mb left, getting insufficient space errors)
Updated the third post with a new touch cwm, test version, i don`t have a platinum to test it.
Adonis, i don`t think is possible, tough you can use directory binder
I need some help with some file from the Archos 50 Platinum, I want to test if the phone function works on Archos 80 Xenon (it should in theory as this is not the first tablet made by Archos/Arnova that has a crippled phone function, my 7C G3 is capable if doing/receiving phone calls)
Hmmm, i see. In my previous phone the developers found a way to repartition the device and play around with them so we could balance the phone and internal memory to our advantage. Could really use the /storage/sdcard1 as part of my /data and /system partitions.
http://i.imgur.com/MJkdLS9.png
Never heard of directory binding, is it like symlinking?
I will test touch version in a few mins, gotta watch something first.
edit: Nope, touch still not working. Same results as the previous one.
Adonis K. said:
Hmmm, i see. In my previous phone the developers found a way to repartition the device and play around with them so we could balance the phone and internal memory to our advantage. Could really use the /storage/sdcard1 as part of my /data and /system partitions.
http://i.imgur.com/MJkdLS9.png
Never heard of directory binding, is it like symlinking?
I will test touch version in a few mins, gotta watch something first.
edit: Nope, touch still not working. Same results as the previous one.
Click to expand...
Click to collapse
Then it will be no touch for the moment, tough is strange, on the Archos 80 Xenon is working fine.
Not having the phone is a big impediment for me to test things, and I have the Xenon only till 28`th, so this is my main platform for testing for now (identical spec with the 50 Plat, even the partition layout is identical , that`s why i believe that the phone function should work)
I will do another try with the touch version from the Xenon in the next days, maybe with will work with that one.
Yes, the directory binding is the same as simlinking
Does anyone know a fix for the incompatability with older routers? (Non Wifi-N support).
Sorry for the OT btw.
Edit: Second question. How do I revert back to stock firmware or stock mode [without root and CWM-recovery]? I used the non_sys-version.
Edit2: Tomorrow I will flash original firmware. Hopefully the alterations will be gone.
Nash123 said:
Does anyone know a fix for the incompatability with older routers? (Non Wifi-N support).
Sorry for the OT btw.
Edit: Second question. How do I revert back to stock firmware or stock mode [without root and CWM-recovery]? I used the non_sys-version.
Edit2: Tomorrow I will flash original firmware. Hopefully the alterations will be gone.
Click to expand...
Click to collapse
I think you will need the sys_boot recovery for that, or the stock one, the non_sys boot will not allow you to flash stock firmware.

THBK1-10 thread: extend, root, hack !

Hello,
I'm the proud owner of an hybrid monster, called THBK1-10.
This is basically an affordable tablet, running both Windows 8 and Android 4.2.2.
10.1 display, running x86 Atom 4cores, 2Gb RAM, 32Gb eMMC, USB host enabled. It is shipped with an external keyboard/touchpad (no port, no battery, no extended storage on it). More informations: http://www.thomsoncomputing.eu/dualboot.html
Windows 8 comes in x86 flavor...
The boot process let you choose Windows or Android.
There is no play store. My main goal actually is:
- (ok) rooting Android part
- (ok) installing Play Store
- (ok) increasing space
- (nok) installing a recovery (CWM/TWRP) allowing you to flash non-signed updates
- (nok) running Linux from an external USB drive
Partition layout: http://forum.xda-developers.com/showpost.php?p=54095052&postcount=8
Rooting / play store guide: http://forum.xda-developers.com/showpost.php?p=55513404&postcount=23
Known clones: http://forum.xda-developers.com/showpost.php?p=54282229&postcount=10
Increasing space with external SD: http://forum.xda-developers.com/showpost.php?p=54914759&postcount=17
Timezone issue Android/Windows: http://forum.xda-developers.com/showpost.php?p=54945950&postcount=19
BIOS default (SlateDroid): http://www.slatedroid.com/topic/106594-thbk110-default-bios-values/
Have fun !
I know there are EXT2 drivers for Windows, and EXT3 is just EXT2 + Journaling (the journaling is an important feature, but it's not part of the security model). However, I'm not sure if any of those drivers can modify file permissions. Alternatively, one could of course hex-edit the Android partition and try to tweak the file permissions that way, but that would require much more understanding of the EXT filesystem than I have. The source code is all open, though...
Thank you. Here is what i did:
a) trying to handle EXT3 fs from Windows
-> with Ext2Fsd, i have accesses to all the partitions, including /system and /data, but unfortunatly, permissions are not correct
-> i trying with other tool (Explore2Fs) not luck
-> ltools seems to provide a lattr util that could do it, but i'm unable to see the files (certainly because of the GPT partition
b) trying to use VirtualBox with raw disk access for handling, with a linux guest, permissions:
-> up to partition 7, this seems correct
-> from partition 8 (/system), i can mount it in RO but it crashes in RW
c) trying to boot to any linux supporting EFI32 and GPT
-> thanks to paperwastage, i could achieve it (thread here: http://forum.xda-developers.com/showthread.php?t=2500078 )
-> i have strange troubles: the system only detect mmcblk0 to mmcblk7, and is throwing an error (error -110 + unknow command)
-> both, in clonezilla and ubuntu
d) tryed to use so android local tricks to force change mode, but once, i'm stuck with no eXecute flag. I dig around the local.prop or any stuff that would help me to achieve this goal. The recovery is not available (nor i found it) and the only thing i can do is factory reset.
It really seems only Windows got the proper drivers for this eMMC. This could explain why i had hard time to dump it (and, actually, i would not try to restore b/c i'm not sure everything is backuped correctly and don't want to brick my tablet), and why i could only write from Windows and why it cuts at partition7 (i have at least 12 partitions. NTFS windows main is the #11 iirc)
What i could try actually:
-> double check with newer ubuntu (when i started "install to disk", it seems it could detect the whole disk, have to look again)
-> double check with local THBK install (copy 3 apks bundled with the tablet, but perhaps a command script is available to be executed ?)
-> double check with virtual box & raw disk acces (i focused on /system, but perhaps /data is ok ?)
-> recompile Ext2Fsd to have different default properties
-> dig the hardware to see if a real recovery boot is not available, or change the recovery to something more usefull than factory reset
Thank you if you have more and more ideas
Quick notes:
- THBK1 does NOT connect to PC/MAC
- THBK1 does NOT have USB Debug activated. The micro-usb is aimed to put a (normal) cable, not an OTG one nor a charging cable. You can reach ADB only over Wireless.
-> Currently trying TowelRoot with different parameters, but for now not successfull. Basically this is a 4.2.2 kernel so i could expect a low resistance at exploits, it worths to be tested
Good news, i was able to boot from an USB stick (with EFI), and while the MMC is not accessible, i found a trick to change permissions.
I have now full R/W support on EXT3 partition.
But sadly SU is not enough to gain root accesses.... damn.
Anyone able to find doc or explain how root access is triggered ?
I found an update, and i'm now able to flash the whole system partition. Sadly, i could not flash another update.zip, so i guess this is signed (and sadly it is).
I have also tryed z4root, towelRoot exploits, not working.
Basically i could somehow bypass the sign system in applying myself the content of the update.zip (as long as it deals with /data and /system files & perms). I'll try that for at least google apps.
edit: ok i have now play store and the whole google suite is working after a big playstore update (talkback, vocal syntgetisis and so on). Only google+ is FCing but it should only be a matter of installation. I should remove it and reinstall it from the market.
Only thing missing is root
Status on Android forum side: http://forum.xda-developers.com/android/help/hacking-thbk1-10-getting-root-t2804631/post53896017
As today, the tablet is now rooted. It works flawlessly.
Next step is the handling of recovery to flash non-signed zip files. It would ease the process of installing GAPPS or rooting the tablet.
But i'll take a break before
TODO list, from top to crazy:
- recovery
- test and deploy various system tweaker sur as Xposed framework
- bugfix vibrator (only working when you hit Windows button, not in apps)
- new rom, new kernel
Here is the actual partition layout:
Code:
Model: MMC BIWIN (sd/mmc)
Disk /dev/mmcblk0: 30.9GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 1049kB 269MB 268MB fat16 ANDROID!bootloader boot, hidden, legacy_boot
2 269MB 337MB 67.1MB ANDROID!panic
3 337MB 873MB 537MB ext4 ANDROID!factory
4 873MB 2484MB 1611MB ANDROID!fake
5 2484MB 2618MB 134MB ext4 ANDROID!config
6 2618MB 4229MB 1611MB ext4 ANDROID!cache
7 4229MB 5303MB 1074MB ext4 ANDROID!logs
8 5303MB 7450MB 2147MB ext4 ANDROID!system
9 7450MB 11.7GB 4295MB ext4 ANDROID!data
10 11.7GB 11.7GB 1049kB ANDROID!misc
11 11.7GB 11.8GB 33.6MB ANDROID!boot
12 11.8GB 11.9GB 134MB ANDROID!recovery
13 11.9GB 11.9GB 33.6MB ANDROID!droidboot
14 11.9GB 12.3GB 315MB ntfs Basic data partition diag
15 12.3GB 12.5GB 273MB fat32 EFI system partition boot
16 12.5GB 12.7GB 134MB Microsoft reserved partition msftres
17 12.7GB 30.9GB 18.3GB ntfs Basic data partition msftdata
I'm not able to read the partition w/o filesystem (2, 4, 10, 11, 12, 13).
I tryed with yaffs2, but i'm not able to see them (and since it is not MTD...)
I'm working on dd image of the 32Gb MMC.
In example, hexdump of partition 12 shows it is a kernel. Certainly the recovery kernel directly flash, i should dig this.
Guide: installing Google Apps and Rooting the tablet
THIS POST IS DEPRECATED. See http://forum.xda-developers.com/showpost.php?p=55513404&postcount=23
:good: /!\ Please click thanks or offer me a coffee with donate if it was usefull for you /!\ :good:
This is rather technical, but i can help if you are stuck. Thank you for your comments.
Here is how you could install Google App suite to the THBK1-10 and certainly many ones based on Inside H2O bios, board name: CARD_B (see above for detailled specs)
Basically, to install some stuff, the concept is to get rid of all the caveats (special MMC drivers, EFI 32 bits with GPT, etc...) through actual Windows 8.1 installation. Everything takes place through classic Windows desktop. For convenience, personnally worked with TeamViewer, doing this with the dock/touchpad is pain in the ass. You can void your warranty and break the android part of your tablet, so operate carefully, i'm not responsible of what you do !
This leads to 3 phases:
a) accessing EXT4 Android partitions
b) transfer files from Windows to Android
c) change permissions
a) Accessing EXT4. I used coLinux to access and handle Android EXT4 partitions:
- download and install coLinux http://sourceforge.net/projects/colinux/files/latest/download?source=files. At the 'Choose components' screen, uncheck 'Root filesystem image Download', and accept everything (including TAP drivers)
- download and unzip Debian Squeeze image in coLinux folder (c:\program files\colinux). Warning, this leads to a 2Gb file, ensure you have proper space. You could unzip it in your external SDcard, but you would have to change the path to rootfs and swap in above squeeze.conf
http://sourceforge.net/projects/col... 6.0 Squeeze/Debian-6.0.1-squeeze.7z/download
- test it: click on the squeeze.bat file into c:\program files\colinux (if you have an error co-slirp, simply close colinux and restart it). Once you have the 'debian login:' prompt simply type root then enter. You are now under coLinux.
First, install your local keyboard (if needed)
Code:
apt-get update
apt-get install console-setup locales console-data
In case you miss the point for the keyboard:
(choose select keyboard from full list / pc azerty or whatever...)
Code:
dpkg-reconfigure console-data
- you should now update your /etc/apt/sources.list file:
Code:
nano /etc/apt/sources.list
- fill with the following lines (remove all before)
Code:
deb http://ftp.fr.debian.org/debian/ squeeze main contrib non-free
deb http://security.debian.org/ squeeze/updates main contrib non-free
- update your apt repository:
Code:
apt-get update
- you would like to sync the clock from Linux with Windows: edit /etc/default/rcS and change UTC=yes to UTC=no
Code:
nano /etc/default/rcS
You can exit coLinux, we have things to tweak now.You can then download the attached Squeeze.conf, and put it into your colinux folder, replacing the old. Remember, if you have changed the path for rootfs and swap, you must change them to reflect your current installation.
Squeeze.conf:
Code:
kernel=vmlinux
cobd0="c:\program files\coLinux\rootfs_2gb.img"
cobd1="c:\program files\coLinux\\swap_128mb.img"
cofs0="C:\share"
cobd8=\Device\HarddiskVolume8
root=/dev/cobd0 ro
initrd=initrd.gz
mem=256
eth0=slirp
b) transfer files from Windows to coLinux
We would create a share folder at the root of C:\.
You must have C:\share folder.
- Create a directory in /mnt
Code:
mkdir /mnt/win
- then mount the folder into your coLinux
Code:
mount -t cofs cofs0 /mnt/win
FOLLOW THE ABOVE ONLY FOR GAPPS:
- You must now download the google apps files. The operation is done under Windows:
download Android 4.2.2 ones: http://goo.im/gapps/gapps-jb-20130812-signed.zip and extract all the file into C:\share
This folder must contains the whole gapps (you 'll see folders named: system, META-INF, optional...).
You must directly DELETE 3 files and 1 folder:
file system\app\GooglePlus.apk
file system\app\LatinImeDictionary.apk
file system\lib\libjni_latinime.so
fodler system\tts
If everything is ok, browsing /mnt/win/ from coLinux (not windows)
Code:
ls /mnt/win
should show the share directory content (META-INF,system,optional,...).
FOLLOW THIS ONLY IF ROOT:
- You must now copy su binary to your tablet: download attached files, unzip, copy it to your windows desktop shared folder
Nota: this file is extracted from Koush' superuser APK. This is the x86 su binary. Feel free to replace with newest version if available or if you fear something
FOLLOW THIS IF ROOT & GAPPS
c) access to Android partition
- create a system folder in /mnt
Code:
mkdir /mnt/system
- mount android to system
Code:
mount /dev/cobd8 /mnt/system
- check you are ok with
Code:
ls /mnt/system
You must see app, bin, usr, etc .... folders.
*** at this point, /mnt/system contains ALL your android system. NO MISTAKE ! ***
FOLLOW THIS ONLY IF GAPPS
- part 1: removing files. Browse to /mnt/system/app and CAREFULLY delete the 8 files (some could be missing, don't bother):
Code:
cd /mnt/system/app
rm Provider.apk
rm Provider.odex
rm QuickSearchBox.apk
rm QuickSearchBox.odex
rm SetupWizard.apk
rm SetupWizard.odex
- part2: copy. Copy the files from Windows to Android - it could take up to 2 minutes -
Code:
cp -rp /mnt/win/system/* /mnt/system
- then fix the permissions:
Code:
chmod -R 755 /mnt/system/addon.d
chmod 755 /mnt/system/app/*
sync
At this point, this is over. You can exit from colinux, reboot to Android, and come back to windows uninstalling coLinux, if anything is ok
The whole GAPPS are installed. Enjoy !
FOLLOW THIS ONLY IF ROOT
- copy attached x86 su binary to android
Code:
cp -p /mnt/win/su /mnt/system/bin
- then fix the permissions:
Code:
chmod 755 /mnt/system/bin/su
chmod u+s /mnt/system/bin/su
ln -s /mnt/system/bin/su /mnt/system/xbin/su
sync
At this point, this is over. Reboot, you can now download and install superuser https://f-droid.org/repository/browse/?fdfilter=superuser&fdid=com.koushikdutta.superuser
Your tablet is now rooted. Enjoy !
Know clones (feel free to help):
- Danew i1012 dual boot (strictly identical to Thbk1)
- VOYO A1 (Windows 8 only).
- Cube U100GT (Windows 8 only)
Certainly clones:
- Ramos i10 pro (dual boot)
- Pipo W1 / Work W1 (Windows 8 only)
- ColorFly i106 (Windows 8 only)
- Toshiba WT8-AT01G (Windows 8 only)
Graveen said:
Know clones (feel free to help):
- Danew i1012 dual boot (strictly identical to Thbk1)
- VOYO A1 (Windows 8 only).
- Cube U100GT (Windows 8 only)
Certainly clones:
- Ramos i10 pro (dual boot)
- Pipo W1 / Work W1 (Windows 8 only)
- ColorFly i106 (Windows 8 only)
- Toshiba WT8-AT01G (Windows 8 only)
Click to expand...
Click to collapse
Considering getting a voyo a1 or a pipo w2. But 99% of my interest in windows 8 tablets is running old windows games on them. What's your experience with win 8 and older games for windows? Touchscreen make anything unplayable? Thinking old command and conquer or Warcraft 1-3 etc. With some RPG thrown in.
I hate the idea of being limited to just windows, but I'm hesitant to spend too much on what might not work like I hope.
StridAst said:
Considering getting a voyo a1 or a pipo w2. But 99% of my interest in windows 8 tablets is running old windows games on them. What's your experience with win 8 and older games for windows? Touchscreen make anything unplayable? Thinking old command and conquer or Warcraft 1-3 etc. With some RPG thrown in.
I hate the idea of being limited to just windows, but I'm hesitant to spend too much on what might not work like I hope.
Click to expand...
Click to collapse
Honestly,i installed Steam and played some to test. But, alas, it is not successfull. If you can wire a BT pad, let's say it is ok, but else, generally, the touchpad is not suitable, really.
Of course some point'n clic games should work nicely. But except theses, you 'll be forced to add keyboard/mouse. Or, as i mentionned, a bluetooth gamepad, with some keyboard mapping, such as XPadder, could work fine.
Graveen said:
Honestly,i installed Steam and played some to test. But, alas, it is not successfull. If you can wire a BT pad, let's say it is ok, but else, generally, the touchpad is not suitable, really.
Of course some point'n clic games should work nicely. But except theses, you 'll be forced to add keyboard/mouse. Or, as i mentionned, a bluetooth gamepad, with some keyboard mapping, such as XPadder, could work fine.
Click to expand...
Click to collapse
So basicly, the hardware ran things OK, but the interface sucks, oh well. Probably not worth the headaches of dealing with windows again. I'd imagine it's a real PITA to fix things if it gets a virus.
StridAst said:
So basicly, the hardware ran things OK, but the interface sucks, oh well. Probably not worth the headaches of dealing with windows again. I'd imagine it's a real PITA to fix things if it gets a virus.
Click to expand...
Click to collapse
Like a windows. The 'dock' is allowing light computer use, and Office 2013 home is shipped for free with the tablet. But yeah, Windows legacy is the key when dealing with windows
Hey mate,
I have one of these - http://www.ebay.co.uk/itm/390900023783?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649
are you implying that I should be able to get it to dual boot Windows and Android following your guide?
Thanks
Karl
Hello Karl,
Yes it should be possible if strictly identical.
Increase data space with Link2SD
You can dedicate a part of external SD to increase /data size. Link2SD is ok for this, and will, in the free version, allows you to move APK to external partition.
Your tablet MUST be rooted !
1) ensure you have a FAT32 partition (primary, 1st position)
2) ensure you have an EXT2 or EXT4 partition (primary, 2nd position)
3) install Link2SD https://play.google.com/store/apps/details?id=com.buak.Link2SD
You can now use Link2SD which 'll create links and move your APKs to your new EXT partition.
Personnaly, i have a 32Gb SD with 24Gb FAT + 8Gb EXT4 partition.
Increase data space with Link2SD : Good news !!! You are the Boss. THNK1-10 is available at Carrefour (an another good news)
Time is changing between windows and Android
You can simply set timezone to GMT+0 and disable network time.
On Debian, you set UTC to YES, but need to seek where it takes place in Android.
bu3304 said:
Increase data space with Link2SD : Good news !!! You are the Boss. THNK1-10 is available at Carrefour (an another good news)
Click to expand...
Click to collapse
carrefour or conforama.
thomson carrefour and /danew in conforama.
even saw on internet that MSI is also having this tablet and just sticking there logo on it. atleast looked like this tablet.
---------- Post added at 12:05 AM ---------- Previous post was at 12:01 AM ----------
hum. i think i will go for the new asus transformer book t100 with atom z3775 processor.
i like the battery life of the asus.
but prefer the acer switch 10 in terms of look and the magnetic dock
but yeah choice of 11 hours of battery or 8. makes a difference
and the new 3775 or 3745. cpu

[Tools/Recovery] TWRP for LG Optimus F3Q

TWRP Recovery for the LG F3Q (codenames: fx3q, d520)
Background story (who ever wants to know):
As I'm currently testing around with flashing etc I hated it to re-flash the stock ROM again and again. It is sooo time consuming..
In that kind of ROM compiling learning process I also was able to build a working TWRP recovery for the LG F3Q so that was such a good feeling But as said the caveat was that because of the locked bootloader we can reach TWRP (or CWM) only when executing "adb reboot recovery" from the running system. That was not really satisfying me though..
Some day I've done a factory reset and well I saw that this is starting my TWRP recovery when executing it! Well it isn't such a surprise as TWRP sits on the recovery partition and will be triggered by the factory reset script but... well do you think what I think? When it would be possible to start TWRP fully and not that factory reset part of TWRP than we would have a workaround to reach the recovery mode without booting the system (which is in fact not possible anymore when flashing of system.img/boot.img fails)
That said.. I was in touch with the TWRP developers bigbiff and Dees_Troy and many thanks for the hint they gave me! I have build a new TWRP version based on that information I got and well the idea of that is:
Vol Down + Power -> LG Factory Reset screen appears
Confirming with power 2 times as asked
Voila: No factory reset anymore but TWRP is here!
Well that will have a caveat - READ CAREFULLY:
As you may think of the factory reset in the boot-up process and within the ROM will not working anymore until you flash another recovery!
But if you know that it is not such a caveat because you can choose the wipe options within TWRP to do a "manual" factory reset.
v2.8.1.0 build 5
USE THAT ON YOUR OWN RISK! BACKUP BEFORE!
Working (quickly tested):
Install (to flash a custom Kernel)
Mounting partitions
Reboot Recovery | System
adb shell (also see known issues)
Backup (compressed | uncompressed | encrypted (!) | unencrypted)
Restore (unencrypted | encypted (!) | compressed | uncompressed)
Internal storage /data/media
MTP which mounts the external storage!
File Manager
Terminal Command
Power charging while in TWRP
Displaying CPU temp
Totally untested:
WIPE (should work)
decrypting /data (but should work as it do so for encrypted backups already)
Every option which is not stated as "Known issue" or "Working"
Known issues (with workarounds):
ADB works only when screen "timed out" (manual locking does not help it must time out) therefore ADB can take up to 1 minute after boot until it becomes available (because screen need to be timed out first)
Workaround: set the time limit in the screen menu to e.g. 10 sec (that is the default value for now)
Timezone is not set correctly (that seems to be a well known bug in several devices using TWRP.... )
Workaround: set a timezone which displays the most accurate timezone
Known issues (without workarounds):
When you use the "Power Off" option in the "Reboot" menu the device will reboot instead of powering off
Wiping /data not possible after "factory reset buttons" used. You need to choose "wipe" and then "format data" manually (or use mke2fs on CLI).
Vibration is not working (I will not fix that atm because I like it that way)
Hardware keys at bottom doesn't work
If you use the factory reset button /data partition will be inaccessible and need to be re-flashed (means you will LOOSE your app and system configs when you use factore reset)
Download:
Attached you will find the TWRP v2.8.1.0 version ready to use even with locked bootloader:
BACKUP EVERYTHING BEFORE USING THIS. USE AT YOUR OWN RISK!
DD Image file:twrp_v2.8.1.0_build5_fx3q_FR-OFF.img.zip = FactoryReset is disabled / TWRP will be loaded instead (also see known issues)
Read the Installation & Usage instructions in this thread on how to install that file.
Installation & Usage instructions
Pre-Requirements
Read the FAQ
YOU NEED ROOT! (check FAQ)
YOU SHOULD do a NANDroid BACKUP! (check FAQ)
You need to boot up, enable USB debugging and then connect USB cable.(check FAQ get ROOT - the link contains a guide on that)
You better doing a NANDroid backup right? (I mentioned that before - but DO it! NOW!)
For the best usage experience install the sediKERNEL or use joel's debloated stock ROM which includes it already
Bulletproof Method 1: "the average user"
Use this guide if you simply want to install & use TWRP like it should be. If you're unsure use this guide!
Install:
Download the TWRP recovery file and unzip it
copy it to your device (e.g. adb push or simply copy & paste by your file browser)
Download the loki_tool (https://github.com/djrbliss/loki/raw/master/bin/loki_tool)
copy loki_tool to your device (e.g. adb push or simply copy & paste by your file browser)
execute:
adb shell
su (you may need to grant permission)
mount -oremount,rw /system
cp /PATH-WHERE-YOU-COPIED/loki_tool /system/bin/ && chmod 755 /system/bin/loki_tool
loki_tool flash recovery /PATH-WHERE-YOU-COPIED/twrp_X.X.X.X_recovery_FRoff/off.img
reboot recovery --> you should see the TWRP screen
Usage (sediKERNEL v2.0 or higher installed):
Power on the device
when you see the LG logo the first time do NOTHING!!
When the screen goes black THEN press Volume UP + Volume DOWN. Both the same time and hold them pressed.
Release the buttons when the screen goes black again
Wait. You will see the LG logo a third time and then you will see the recovery screen!
If you see a kernel crash then you have pressed the magic keys too early! Read and follow the above steps carefully and you should be fine.
Usage (without sediKERNEL v2.0 or higher):
boot into your ROM
execute "adb reboot recovery" from your PC or open a Terminal on your device and execute "su" then "reboot recovery"
Bulletproof Method 2: "developers only"
This is the developers preferred way of installing TWRP. It ensures that even when your ROM or Kernel gets damaged that you still be able to boot into recovery. This is to the developers or heavy testers who are knowing what they do ONLY!
But even when you think this is for you: Read the important hint at the end before deciding if you want to choose this method.
Install:
flash recovery image to your RECOVERY partition:
adb shell su -c dd if=/storage/external_SD/twrp_vXXXXX_fx3q_FR-OFF.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery
adb reboot recovery
A user reports the the by-name does not worked for him but this one:
adb shell su -c dd if=/storage/external_SD/twrp_vXXXXX_fx3q_FR-OFF.img of=/dev/block/mmcblk0p17
-> If you can see TWRP now everything is fine - Otherwise DO NOT continue!
BACKUP YOUR WHOLE DEVICE NOW! I highly recommend to backup everything except /data from within TWRP because it is easy and works (from TWRP v2.8build5 or higher)
BACKUP /data is recommended to be done NOW and this way:
adb shell su -c dd if=/dev/block/platform/msm_sdcc.1/by-name/userdata of=/external_sd/userdata_backup_stock.img
--> This can take a long while but it contains also the backup for the internal storage not only /data and that internal part is not backupable over TWRP
while in TWRP flash the same recovery image to your BOOT partition now (do not think that this is dangerous. The boot partition is not a magic thing or so it is only the partition which will be started from the bootloader thats all about it. So yes you can install a recovery image on the boot partition without any harm.):
adb shell su -c dd if=/external_sd/twrp_vXXXXX_fx3q_FR-OFF.img.loki of=/dev/block/platform/msm_sdcc.1/by-name/boot
watch carefully that the process ended without errors and that the size is exactly the same as it should be (about 1,3GB)
adb shell sync
power off the device by taken out the battery (do not use reboot or something we want to be sure that the next step is absolutely really the normal boot up)
Boot up normally --> you should see TWRP !! You're NOT in recovery mode you're booting the normal boot mode!
Go on with flashing the sediKERNEL into your RECOVERY partition:
Download the sediKERNEL from here (the stock one could work, too but never tested ...)
push it to your device with adb or MTP (since v2.8build5)
Flash the sediKERNEL to your RECOVERY partition:
adb shell su -c dd if=/external_sd/sediKERNEL_JB-vXXXX.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery
Reboot into Recovery by using TWRP GUI or by executing "adb reboot recovery"
Your ROM will boot.
Usage:
From now on every time your device booting up you will see the TWRP screen and need to choose Reboot-->Recovery to boot your ROM.
This is the absolute best way to use TWRP if you want to be sure that you will reach the recovery even when your ROM gets damaged and is confirmed to work very well (as always guarantees are not available )
Important hint:
Be sure that you keep in mind that from now on your recovery and boot partition are not the same anymore (you can always revert back to the normal behaviour, of course!). So if you want to flash a kernel image you need to ensure that it goes to the RECOVERY partition instead of the normal BOOT partition (because on boot partition is TWRP now).
If I got my ROM working I will definitively add an option to the installer where this will be ensured and I asked @joel.maxuel for his stock ROM to add that, too. As for now we are the only ones who are developing for the F3Q so you should be save enough atm but you will need to keep that always in mind when you want to replace the kernel and/or ROM.
What would happen if you forget about that? Well nothing really bad because when you install a kernel or ROM the boot image partition simply gets overwritten and that means only that your TWRP is not there anymore but the system will boot (if the new kernel/ROM is not buggy or damaged). You then could install TWRP by method 1 or using method 2 by using the boot image/Kernel you want to install.
Damage your device - booting (NOT RECOMMENDED will loose /data ):
You probably NEVER want to use this method. It is here for reference only.
I highly recommend to choose one of the above bulletproof versions instead of this one because it WILL damage /data and you need to restore that whole partition afterwards.
All my tests has shown that this comes not from TWRP (in one of my tests I disabled everything in the sourcecode of TWRP which wipes /data) but coming from LG itself. The factory reset button/option do something with the /data partition sturucture and afterwards you cannot use that anymore. I also tried to restore the partition info by trying all backup superblocks but that doesn't worked. No backup superblock is accessible.
Restoring them by mke2fs and e2fsck does not work unfortunately.. (mke2fs -S /dev/block/platform/msm_sdcc.1/by-name/userdata && e2fsck -yf /dev/block/platform/msm_sdcc.1/by-name/userdata)
So if you have loosed your /data and/or internal storage you need to have a DD imaged backup near.
Install:
same as for "Bulletproof Method 1" above
Usage:
When you choosen FR-OFF then TWRP will be able to start without booting up the whole system (also see known issues):
Power Off the device (remove battery)
Vol Down + Power --> Then put the battery back --> LG Factory Reset screen appears
Confirming with power button 2 times as asked - if you downloaded and flashed the FRoff version of TWRP it will NOT open the normal reset procedure but /data and the internal storage are not accessible afterwards (read above about the details). That means your app configs and systems configs get lost that way. You have been warned!
Voila: No (full) factory reset anymore but TWRP is here when you have damaged your ROM or for some dev approach
If you want the factory reset back simply choose the file twrp_2.7.1.0_recovery_FRon.img.lok and follow the above instructions. Afterwards you will have TWRP but it will be reachable only when you execute "adb reboot recovery" from the running system.
XDA:DevDB Information
sediTWRP for LG Optimus F3Q, Tool/Utility for the General Discussion
Contributors
xdajog
Source Code: https://github.com/xdajog/bootable_recovery_twrp_fx3q
Version Information
Status: Stable
Current Stable Version: v2.8.1.0 build 5
Stable Release Date: 2014-11-18
Created 2015-05-19
Last Updated 2015-07-20
FAQ
Frequently Asked Questions (FAQ)
What is that "adb" thing?
adb stands for: Android Debug Bridge and can help a lot when it comes to work with your device. It is not for developers only but they use it a lot of course.
But a normal user can use this to exchange files without the need of mounting, backing up the device, reboot the device and use it as a very comfortable way of having a terminal emulator.
Normally adb itself is not available as a standalone application - it comes with the Android SDK which is very big and heavy if you want to use adb and/or fastboot (another great tool) only.
But we live in a great world with many people wanting to make things easy so here you go when you want/need only adb and fastboot:
download & install adb at lifehacker
(Direct link for Windows users: Go to easy ADB install thread)
How to get root for the F3Q?
Here is the tool and guide: Saferoot
[*]What is a "nandroid" backup?
nandroid means essentially: "a full image of all your partitions" so it is a full snapshot of your ROM including all your apps and contents.
The name NANDroid is a portmanteau of "NAND" (as in Flash memory - NAND flash) and "Android." (Source)
[*]How to create a "nandroid" backup?
(See above for the meaning of "nandroid backup")
You have several options on how to do that.
The normal and absolutely recommended way is to do that "offline" (from within recovery mode) but you can also do it "online" (while Android is running).
.
Offline nandroid backup by using TWRP recovery: Guide
If you have no custom recovery installed read on.
.
Online nandroid backup:
by using an app:
There is 1 (known to me) "online" nandroid backup tool available which will backup from within your running Android: PlayStore.
I tested it and still using it since a while and I really like it but I would not fully resist on it.
I had no problems backing up but sometimes an app is lost when restoring. This may have been fixed but well it is like imaging a running Windows or Linux system:
Do not do it online if you can - it may/will work but there could be problems/inconsistencies later!!
If you never made a nandroid before doing it online will not harm anything and should be your first start. So install the Online Nandroid backup tool and begin.
Check out this guide for some hints: Guide
(If you like the Android app do not hesitate to buy the unlock key to support the developer!)
by using commandline tools:
First of all you need "adb" installed (check out the FAQ answer number 1 above).
Then you need someone who is telling you the device partition table and you need a big sized SD card to hold the images.
The reason is that you will use a special command named "dd" which images the whole partition (not the content only!).
dd is a VERY dangerous tool because if you use it wrong your device may get bricked so it is essential that you are using the
correct command and check that twice!
Check out the next FAQ on how to do this for the F3Q.
[*]How to create a "nandroid" backup for the F3Q - WITHOUT having a custom recovery?
The whole process will take a big amount of time but it is worth to follow each step including the md5sum checks at the end.
Please read the previous FAQ first because there you will find more information about background and other options you may have.
Ensure you have a SD card inserted which is big enough and having enough free space available (4GB at least! I recommend at least 8 GB but this depends on the size of your current data partition. A completely stock ROM with nothing installed and unused will need 3 GB space).
.
Install "adb" on your pc (check out the FAQ #1 above).
root your device (check out FAQ #2 above)
connect with adb to your (running) F3Q:
adb shell
(you should see a prompt)
su
(you need to grant permission if you haven't yet)
Then backup your current ROM and data:
dd if=/dev/block/platform/msm_sdcc.1/by-name/system of=/storage/external_SD/system.2015-07-20.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/boot of=/storage/external_SD/boot.2015-07-20.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/userdata of=/storage/external_SD/userdata.2015-07-20.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/recovery of=/storage/external_SD/recovery.2015-07-20.img
# If you never backed up your EFS you really should do that once:
dd if=/dev/block/platform/msm_sdcc.1/by-name/modemst1 of=/storage/external_SD/modemst1.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/modemst2 of=/storage/external_SD/modemst2.img
Click to expand...
Click to collapse
Just to be sure you can do an online backup now, too ( Guide ) Online Nandroid backup App
.
copy the backup(s) to your device (connect USB cable - open your external storage and drag&drop) <--- DO NOT SKIP THIS STEP!!!! It is absolutely essential!
Check your copy on your device:
md5sum /storage/external_SD/system.2015-07-20.img
md5sum /storage/external_SD/boot.2015-07-20.img
md5sum /storage/external_SD/userdata.2015-07-20.img
md5sum /storage/external_SD/recovery.2015-07-20.img
md5sum /storage/external_SD/modemst1.img
md5sum /storage/external_SD/modemst2.img
Click to expand...
Click to collapse
Download a md5sum checker like this one Windows MD5 and load each file you copied to it (on Linux the "md5sum" command can be used of course).
compare the md5sums from the above output and ensure that they are all matching.
[*]Why is factory reset not working when installing TWRP? (or: AAAAaaaah my /data is inaccessible after doing a factory reset!!!!)
All my tests has shown that this comes not from TWRP (in one of my tests I disabled everything in the sourcecode of TWRP which wipes /data) but coming from LG itself. The factory reset button/option do something with the /data partition sturucture and afterwards you cannot use that anymore. I also tried to restore the partition info by trying all backup superblocks but that doesn't worked. No backup superblock is accessible.
Restoring them by mke2fs and e2fsck does not work unfortunately.. (mke2fs -S /dev/block/platform/msm_sdcc.1/by-name/userdata && e2fsck -yf /dev/block/platform/msm_sdcc.1/by-name/userdata)
So if you have loosed your /data and/or internal storage you need to have a DD imaged backup near. Sorry but you have been warned (known issues) before.
.
if you want the factory reset back simply choose the file twrp_2.7.1.0_recovery_FRon.img.lok and follow the above instructions. Afterwards you will have TWRP but it will be reachable only when you execute "adb reboot recovery" from the running system. v2.7. is not recommended to use but atm the only option if you really want that. Instead I would better try the wipe options from within TWRP and re-installing your ROM of choice or simply using the official LG flashing tool to get your F3Q fully reset.
.
History / Changelog
Previous development (v2.7.1.0)
I HIGHLY RECOMMEND USING v2.8 instead of this version!
You have been warned.. If you still want that buggy version go on here:
USE THAT ON YOUR OWN RISK! I STRONGLY RECOMMEND TO BACKUP EVERYTHING BEFORE PROCEEDING.
Working:
Install (to flash a custom Kernel)
Mounting partitions (see known issues for the internal one)
Reboot Recovery | System
adb shell
File Manager
Terminal Command
Totally untested:
WIPE (may work)
Known issues:
If the device becomes locked and then unlocked by the user adb will restart on the device (or crash and start again. haven't had looked into that yet)
When you use the "Power Off" option in the "Reboot" menu the device will reboot instead of powering off
RESTORE (will NOT work!)
BACKUP (will NOT work!)
You cannot mount the external sd via USB or MTP
Vibration is not working (I will not fix that atm because I like it that way)
Timezone is not set correctly (that seems to be a well known bug in several devices using TWRP....
Internal storage is missing (/data/media)
Hardware keys at bottom doesn't work
If you use the factory reset button /data partition will be inaccessible and need to be re-flashed (means you will LOOSE your app and system configs when you use factore reset)
Download:
Attached you will find the loki'ed TWRP version (v2.7.1.0):
AGAIN: THIS IS A PROOF-OF-CONCEPT only. It definitively WILL have bugs and problems! I want to proof that it will be possible to have TWRP on this device and also have a way to boot up into TWRP without booting the whole system.
twrp_2.7.1.0_recovery_FRoff.img.lok = FactoryReset is disabled / TWRP will be loaded instead
twrp_2.7.1.0_recovery_FRon.img.lok = FactoryReset is enabled / TWRP can be reached with "adb reboot recovery" only
Read the Installation & Usage instructions in the OP on how to install that file.
Awesome work! Saves having to risk modifying the bootloader (for now). :laugh: :highfive: Thanks!
xdajog said:
TWRP Recovery for the LG F3Q / D520
...
Click to expand...
Click to collapse
I'm unable to get logs from TWRP, it does crash reliably when messing about in settings and such.
Timezone fix is needed. (Devices time is set to the correct local time, but TWRPs timezones arent correct.)
Device does not show internal storage.
Wipe menu does not differentiate from internal storage and /data
there's no /mnt, /storage or /sdcard present while in TWRP.
Uhm, I'm sure there's some more I've missed, but that's all I've got for now.
eriklion said:
I'm unable to get logs from TWRP, it does crash reliably when messing about in settings and such.
Click to expand...
Click to collapse
Uhm what do you mean? adb shell and then open /tmp/recovery.log? Clicking on the small mini icon at middle bottom of the screen? Both working for me. Have you tested the above attached version or the one I gave you at dropbox? The above is a more current one!
Timezone fix is needed. (Devices time is set to the correct local time, but TWRPs timezones arent correct.)
Click to expand...
Click to collapse
hm I will look into that
Device does not show internal storage.
Click to expand...
Click to collapse
yeah forgot to mention that. Is that shown in CWM btw?
Wipe menu does not differentiate from internal storage and /data
Click to expand...
Click to collapse
Could you explain what does that means?
there's no /mnt, /storage or /sdcard present while in TWRP.
Click to expand...
Click to collapse
/mnt and /storage are not needed or am I wrong? /sdcard would point to the internal storage I think but I decided to use /external_sd instead which is accessible in the latest version.
Finally got around to test. Looks great, I love having TWRP over CWM!
Unfortunately the backup function is not working. TWRP errors out and reloads itself. I have a pastebin, sorry it's so long but I wanted to try a couple different backup options before I gave up and produced a log file:
http://pastebin.com/QUfNw6Rk
The portions of interest are:
Code:
Backing up Cache...
I:Creating backup...
I:Creating tar file '/external_sd/TWRP/BACKUPS/1db9cba/1970-01-24--22-43-59 JZO54K//cache.ext4.win'
I:addFile '/cache/recovery' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
I:addFile '/cache/recovery/log' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
...
Code:
Backing up Data...
I:Creating backup...
I:Creating tar file '/external_sd/TWRP/BACKUPS/1db9cba/1970-01-24--22-43-59 JZO54K//data.ext4.win'
I:addFile '/data/dontpanic' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
I:addFile '/data/dontpanic/last_kmsg0' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
I:addFile '/data/dontpanic/next_count' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
I:addFile '/data/dontpanic/last_kmsg1' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
I:addFile '/data/dontpanic/last_kmsg2' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
I:addFile '/data/dontpanic/last_kmsg3' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
I:addFile '/data/dontpanic/last_kmsg4' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
I:addFile '/data/dontpanic/last_kmsg5' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
I:addFile '/data/dontpanic/last_kmsg6' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
I:addFile '/data/dontpanic/last_kmsg7' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
__bionic_open_tzdata: couldn't find any tzdata when looking for localtime!
__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
Starting TWRP 2.7.1.0 on Sun Jan 25 03:44:01 1970
I:Single storage only.
I:No internal storage defined.
I:No storage defined, defaulting to /sdcard.
I:Lun file '/sys/devices/platform/usb_mass_storage/lun0/file' does not exist, USB storage mode disabled
I:Found brightness file at '/sys/class/leds/lcd-backlight/brightness'
I:TWFunc::Set_Brightness: Setting brightness control to 255
Starting the UI...Pixel format: 480x800 @ 32bpp
Pixel format: RGBX_8888
Not using qualcomm overlay, 'msmfb43_80201'
framebuffer: fd 4 (480 x 800)
=> Linking mtab
=> Processing recovery.fstab
I:Processing '/boot'
I:Processing '/cache'
I:Processing '/data'
I:Processing '/misc'
I:Processing '/recovery'
I:Processing '/external_sd'
I:Processing '/system'
I:Creating Android Secure: /external_sd/.android_secure
I:Backup folder set to '/external_sd/TWRP/BACKUPS/1db9cba'
I:Settings storage is '/external_sd'
Updating partition details...
I:Unmounting main partitions...
E:Unable to unmount '/data'
I have a stock based ROM to test, and I want to make sure I can enter recovery through the bootloader should things go sour. If TWRP can backup and restore, that allows me to go back to my true stock after the test. Any ideas?
joel.maxuel said:
Finally got around to test. Looks great, I love having TWRP over CWM!
Unfortunately the backup function is not working. TWRP errors out and reloads itself. [.....] Any ideas?
Click to expand...
Click to collapse
Yes.
There are several things coming in place when it comes to backing up out of TWRP atm...
You hopefully have read the big fat red warning ? What I mean is the part regarding /data gets lost when you do a factory-reset
That said if you have entered TWRP by pressing the physical keys your /data partition will be wiped (really bad thing but that it is made for and I haven't had the time to look into that further)
The result is a cleaned /data which is not mountable until you format it with mke2fs.
(e.g.: "adb shell mke2fs -T ext4 /dev/block/mmcblk0p15")
If you do not do that what MAY happens is that TWRP failing because of missing /data (and if not then you should ensure that /data was really backed up)
But as your log told me it seems to be not the problem here 'cause the /data partition is detected by TWRP. so it could be 2)
Mounting points.
As stated the mount points are not fully working in TWRP atm. That means when it comes to /sdcard which is the internal device storage it will fail, too because it cannot be found. The reason for this is that LG mounts /sdcard by the sdcard service but that is somehow tricky thats why it is not working atm.
And on top: the internal storage normally needs to be mounted to "/data/media" especially when we want to use MultiROM later.
So +1 for /sdcard or/and internal storage related
background info: http://teamw.in/DataMedia
The last one I could imagine is "something else" which could be catched by "/proc/last_kmsg"
The important thing is that this file gets written only after a crash and when the battery was not removed. So if the device reboots to TWRP again try to adb shell to the device and then paste the last_kmsg again. Maybe we can find something here.
When I will continue on TWRP I think of upgrading to v2.8 because they enable MTP here which could be good for copying data between device and pc..
BTW:
I have no idea what CWM port which is also be available would do in case of starting a backup especially what will REALLY gets backed up!!!!
IMHO the best way on doing a nandroid backup atm is "adb shell dd ...." Takes a long time but then you can be sure. I can give you all the mountpoints if you need them.
As I currently have not such much success with porting the ROM I will now come back here to TWRP and will finish it to have a hopefully fully working recovery. I cannot say the timeline for this but it will definitively be the next what I want to do because when this is done I can better match the rest for the ROM.
xdajog said:
<SNIP>
IMHO the best way on doing a nandroid backup atm is "adb shell dd ...." Takes a long time but then you can be sure. I can give you all the mountpoints if you need them.
As I currently have not such much success with porting the ROM I will now come back here to TWRP and will finish it to have a hopefully fully working recovery. I cannot say the timeline for this but it will definitively be the next what I want to do because when this is done I can better match the rest for the ROM.
Click to expand...
Click to collapse
This should work (I've done it before for eriklion):
Code:
adb shell
dd if=/dev/block/platform/msm_sdcc.1/by-name/system of=/storage/external_SD/system.2014-11-12.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/boot of=/storage/external_SD/boot.2014-11-12.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/cache of=/storage/external_SD/cache.2014-11-12.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/userdata of=/storage/external_SD/userdata.2014-11-12.img
Now, is there a recommended adb command to wipe data and cache, since factory reset function is not the best choice? I see a few with the following process...
Code:
adb shell
su
format DATA
format CACHE
...but not much commentary on it.
I appreciate the second (third, whatever you are on) crack at TWRP. Hopefully the next version will squash the bugs. Btw, I will see if I can provide a /proc/last_kmsg tonight have posted a last_kmsg here.
joel.maxuel said:
This should work (I've done it before for eriklion):
Code:
adb shell
dd /dev/block/platform/msm_sdcc.1/by-name/system /storage/external_SD/system.2014-11-12.img
dd /dev/block/platform/msm_sdcc.1/by-name/boot /storage/external_SD/boot.2014-11-12.img
dd /dev/block/platform/msm_sdcc.1/by-name/cache /storage/external_SD/cache.2014-11-12.img
dd /dev/block/platform/msm_sdcc.1/by-name/userdata /storage/external_SD/userdata.2014-11-12.img
Click to expand...
Click to collapse
yes thats all you need to backup & restore
joel.maxuel said:
Now, is there a recommended adb command to wipe data and cache, since factory reset function is not the best choice? I see a few with the following process...
Code:
adb shell
su
format DATA
format CACHE
...but not much commentary on it.
I appreciate the second (third, whatever you are on) crack at TWRP. Hopefully the next version will squash the bugs. Btw, I will see if I can provide a /proc/last_kmsg tonight.
Click to expand...
Click to collapse
I always do it that way:
Code:
Starting TWRP
adb shell
("su" in TWRP not needed normally)
mke2fs -T ext4 /dev/block/mmcblk0p15 (for userdata)
mke2fs -T ext4 /dev/block/mmcblk0p14 (for cache)
Then you can be sure it is clean and well formatted. ext4 is for both cache and userdata and works fine for me.
twrp v2.8 with many enhancements and fixes is on its way
Stay tuned ....
if you get bored in the meanwhile ... click thanks
Is someone here with running the stock ROM (or absolutely not modified means formatted! /data partition) who is willing to give me a quick help? It must be stock or placed back to stock by using a backuped image dump if you have one.
The following need to be done in recovery so you need to have CWM or TWRP installed. Boot into recovery (adb reboot recovery) and then use "adb shell" to connect.
I need your output of this command:
Code:
mke2fs -n /dev/block/platform/msm_sdcc.1/by-name/userdata
This will not do/destroy/modify anything.
It should display some information about that partition. Read the details here http://linux.die.net/man/8/mke2fs
The reason is that LG factory reset seems to wipe superblocks (wanted by LG or not - fact is that they are thrown) and THEN forwarding to the recovery tool like TWRP but to be sure I need the above output from 1 or 2 people to be sure enough on how to proceed.
Thanks in advance
As Joel investigated that may destroy /data cause of a buggy version of mke2fs!! Oh man..
-----
Sent from my SGH-I927 using XDA Android mobile app
Ok thx to joel I'm able to investigate the LG facotry reset further.
In parallel I will try another way which will be (if I get it working) absolutely smooth and will not have such workaround character like the current idea (hijacking factory reset).
Give me some time but if that works it would be a great solution for accessing recovery..
Stay tuned some good things may happen...
-----
Sent from my SGH-I927 using XDA Android mobile app
Finally v2.8 for F3Q has arrived !!! I think a very good approach now!
Have fun and as usual any thx click.... and so on
Check out the OP for Download and details:
http://forum.xda-developers.com/showpost.php?p=55239027&postcount=1
UPDATE:
I have completely reworked the "Installation & Usage instructions" section in the OP. PLEASE READ and be happy
xdajog said:
Finally v2.8 for F3Q has arrived !!! I think a very good approach now!
Have fun and as usual any thx click.... and so on
Check out the OP for Download and details:
http://forum.xda-developers.com/showpost.php?p=55239027&postcount=1
UPDATE:
I have completely reworked the "Installation & Usage instructions" section in the OP. PLEASE READ and be happy
Click to expand...
Click to collapse
Great work.
Am looking at method two. If I was to install a ROM, wouldn't the boot partition (thus my new recovery) be overwritten by the ROM package's boot.img? And when I was cooking with the Kitchen, the ROM required a specific mount point for the boot partition. If it is supposed to point to recovery, seems to me that neither would boot (overwritten recovery, ROM pointing in the wrong location).
So, what is this solution getting around? So we have an option to load TWRP before a system we don't necessarily trust will boot? Thus avoiding the bootloader fallback even more? Or is it a broken boot.img breaks TWRP as well so even if we try to go in through the bootloader, TWRP fails to load as well?
Sorry for my confusion, still trying to grasp all this new information.
joel.maxuel said:
Great work.
Click to expand...
Click to collapse
Thanks
Am looking at method two. If I was to install a ROM, wouldn't the boot partition (thus my new recovery) be overwritten by the ROM package's boot.img?
Click to expand...
Click to collapse
Method 2 will suggest that if you install a custom ROM that you are be able to use/choose the boot.img partition (I hoped that the "hint" at the was clear enough but better to ask of course!)
And when I was cooking with the Kitchen, the ROM required a specific mount point for the boot partition. If it is supposed to point to recovery, seems to me that neither would boot (overwritten recovery, ROM pointing in the wrong location).
Click to expand...
Click to collapse
Well yes you either need to point to the recovery partition or (and that would be what I recommend) you let the user choose what he wanted to do.
So, what is this solution getting around?
Click to expand...
Click to collapse
The best we can do here (and that is what I will do for my custom ROM if I get it done some day) to use AROMA installer and ask the user if he has a recovery installed in the boot partition or not. Then you can choose what to do in the updater script.
I uploaded an example of my AROMA installation setup for the "sediROM for Samsung Captivate Glide" in this post. This one is VERY complex but you will get the idea and many input on how to do things.
So we have an option to load TWRP before a system we don't necessarily trust will boot? Thus avoiding the bootloader fallback even more?
Click to expand...
Click to collapse
Yes using method 2 we have always coming TWRP up when powering on the device. We then can choose to do things in there or to boot to "recovery" which will be the ROM. What do you meant with "bootloader fallback"?
Or is it a broken boot.img breaks TWRP as well so even if we try to go in through the bootloader, TWRP fails to load as well?
Click to expand...
Click to collapse
Not sure If I got you. When the boot partition gets overwritten TWRP and any possibility to get into TWRP will be lost because it sits only in the boot partition when using method 2. If you choose to do a factory reset when powering on the device or from within the ROM I have no idea what happens then unfortunately. That is untested but if you willing to test..
Sorry for my confusion, still trying to grasp all this new information.
Click to expand...
Click to collapse
No worry about that happy if that is useful for someone
xdajog said:
I uploaded an example of my AROMA installation setup for the "sediROM for Samsung Captivate Glide" in this post. This one is VERY complex but you will get the idea and many input on how to do things.
Click to expand...
Click to collapse
Thanks! I will take a look at this in the next few days.
xdajog said:
Yes using method 2 we have always coming TWRP up when powering on the device. We then can choose to do things in there or to boot to "recovery" which will be the ROM. What do you meant with "bootloader fallback"?
Click to expand...
Click to collapse
Bootloader fallback as in having to access TWRP via the bootloader. Our regular method is to access form the ROM, but if the ROM is bricked for whatever reason, the fallback is through the bootloader.
xdajog said:
Not sure If I got you. When the boot partition gets overwritten TWRP and any possibility to get into TWRP will be lost because it sits only in the boot partition when using method 2. If you choose to do a factory reset when powering on the device or from within the ROM I have no idea what happens then unfortunately. That is untested but if you willing to test..
Click to expand...
Click to collapse
I was alluding to the scenario if one was to choose method one, installed a ROM, and things got busted badly... Would you even be able to access TWRP with a bad boot partition? I think so, because recovery partition should be self sufficient (I think you proved it by swapping their places by way of method two), it is just getting into recovery by way of bootloader) I don't particularly like.
Had to face that fear last night, and ultimately, TWRP started up fast enough from the bootloader that it seemed like nothing happened, but when i went to dump the log, it could not recognize the sdcard. DD'ing my userdata partition back fixed that issue.
joel.maxuel said:
Bootloader fallback as in having to access TWRP via the bootloader. Our regular method is to access form the ROM, but if the ROM is bricked for whatever reason, the fallback is through the bootloader.
Click to expand...
Click to collapse
You mean "factory-reset" right? By either pressing the factory reset buttons (or by choosing from within the ROM) correct?
I was alluding to the scenario if one was to choose method one, installed a ROM, and things got busted badly... Would you even be able to access TWRP with a bad boot partition? I think so, because recovery partition should be self sufficient (I think you proved it by swapping their places by way of method two), it is just getting into recovery by way of bootloader) I don't particularly like.
Click to expand...
Click to collapse
If you install TWRP with method 1 and your boot partition gets corrupt you still be able to reach TWRP by using the factory-reset buttons. But you will loose /data then.
If you install TWRP with method 2 and your boot partition has gone you can not start TWRP anymore because it sits on there.
So you're more bulletproof by choosing method 1 because you would reach TWRP even when the boot partition gets damaged but you will loose /data then! Mentioned in the known issues in the OP.
Had to face that fear last night, and ultimately, TWRP started up fast enough from the bootloader that it seemed like nothing happened, but when i went to dump the log, it could not recognize the sdcard. DD'ing my userdata partition back fixed that issue.
Click to expand...
Click to collapse
When you have TWRP installed with method 1 you will reach TWRP by factory reset buttons and it will DO NOTHING ! Really! It simply starts TWRP because I patched TWRP that way that it will not wipe anything when triggered by the factory-reset command / button!
I can say that for double sure since today because:
1) In one of my tests I had disabled REALLY EVERY wipe option within TWRP - compiled it - installed it and even then /data gets lost!
2) I have installed the BOOT image means KERNEL on the RECOVERY partition today again and then used the factory-reset buttons again (after I restored /data of course)... and /data gets lost AGAIN--?!!
That means even when there is absolutely no custom recovery in place (like TWRP) which would normally handle wiping /data then nevertheless /data gets corrupted! I have tested that twice so I can say now for sure that this has nothing to do with TWRP but it comes from the LG bootloader instead! That bootloader is CRAP. sorry.
I had tested one approach which is build in boot image RAM disk which catches the keys which are pressed and then reboot into recovery. That would work but only as long as you have a working boot image partition. So that is the same good/bad as having TWRP sitting within the boot partition which is much easier to do so I decided to go this way for now.
One last word about the crappy factory-reset by LG: I have tried a lot to find out what really happens to the partition or partition table of /data when those keys are pressed but the only thing I can say is that the superblocks are inaccessible and the same for the backup superblocks. doing a "mke2fs -S" does not work (and wouldn't fix the root cause of the issue) and I have no idea what LG do here. Therefore cannot fix that ..
so I believe we will need to live with one of the 3 methods described in the OP....
Hope that answered some of your questions...
Bad news..
The Desire Z of my wife is completely broken now.
That means I cannot develop anymore..
- I ported and released the latest TWRP version to the F3Q
- I'm able to build AOSP JellyBean (not booting yet though),
- I compiled and released a custom AOSP Kernel (named sediKERNEL)
.... and a lot more..
I have everything I need to continue here in place...
I have the will and the ability to continue...
But no device anymore..
If someone has a F3Q to give away.. then I will continue but I'm not willing to buy a F3Q for developing only. So if you have an idea how we could continue let me know.
Update:
Check out the following link if you want to help http://forum.xda-developers.com/showthread.php?t=2952919
Otherwise that will end here for me unfortunately...
Hopefully not.
Yours
Xdajog.
-----
Sent from my SGH-I927 using XDA Android mobile app
I will update the installation instructions soon!
Because of the new sediKERNEL v2.0 the instructions will be made bullet proof only .. and i try to do it more detailed @Kediil
-----
Sent from my SGH-I927 using XDA Android mobile app

[REPARTITION] Nexus 5 Repartition [HAMMERHEAD] [16GB/32GB] [UA TWRP]

Nexus 5 Repartition​
No one is responsible for your actions except yourself. Everything written further may potentially brick your device, although risk is reduced to minimum.
This repartition package offers 1.5G /system; a /vendor partition and it is fully backward compatible with any ROM (including stock system.img).
Known-issues
HTML:
- If repartition pack says that device isn't correct,
than, if partition table wasn't modified before,
congrats! your device has different memory chip
that those I worked with. No worry, PM me and
I'll add support for it.
DO THE BACKUPs. Repartition will erase all your data
USB connection to PC is MANDATORY else you will not have opportunity to push ROM to your device
Installation
HTML:
# Before processing further we highly recommend you backup persist using terminal and dd comand and EFS
# Or you might lose your IMEI/WIFI + BT mac addresses
# This mod is backwards compatible with any ROM so we highly recommend NOT to reverse it if repartition went well.
# You should use ONLY recovery from this thread since other don't support all benefits of this mod.
# When installing ROM just after you flashed zip and before installing GAPPs you MUST make a resize in TWRP since all roms are build for ~1G system.
# To restore stock layout use same zip and steps as for repartition.
1. Boot into recovery (You need to allow system partition modification to be able resize /system in recovery).
2. Backup your data & Move your files from flash to your PC.
3. Flash repartition pack zip.
4. Do the actions asked by repartition pack (go to Terminal in ordinary recovery and input word that pack will tell you. Everything else will be done automatically).
5. Phone will reboot into recovery.
6. Install TWRP from below (it is build with support of new partitions layout and sizes. It can be differed from official TWRP by next format 3.x.x-1 UA).
7. Format everything. (mount errors will not affect formatting!)
- In TWRP: Wipe > Format data
- Type yes
- Once this completes go to: Wipe > Advanced Wipe
- Tick all the boxes and wipe. There should be no further mount errors.
8. Install ROM which you like.
9. Enjoy better flash partition layout.
If something gone wrong - we recommend you NOT to do anything by yourself. Write here for help, else you may do only worse.
Downloads:
Repartitioning package: GitHub
Credits:
Special thanks to
- Unlegacy-Android team;
- Sudokamikaze;
- surfrock66 for his gide for Nexus 5;
As usual, feedback is appreciated
XDA:DevDB Information
Nexus 5 Repartition, Tool/Utility for the Google Nexus 5
Contributors
Clamor
Source Code: https://github.com/clamor95/android_device_unlegacy_recovery
Version Information
Status: Stable
Created 2018-09-19
Last Updated 2019-01-18
Common issues and F. A. Q.
Repartition pack should be safe for most devices. Common mistakes, issues and their solution will be published here.
1. You shouldn't flash any internal parts of repartition pack (*.sh files) only flash whole zip using TWRP. You may use my scripts for personal use or projects but authorship should to be kept.
2. If something isn't mounting after repartition try to format partitions that don't mount using Wipe -> Advanced Wipe in TWPR. Ideally you should format in that way all partitions in Advanced Wipe menu (see 5-th step of installation guide).
3. To be sure that repartition went well I enclose loging zip. Flash it after repartition (when device reboots into TWRP). It won't modify anything only generates a partition.log in root of internal storage and outputs your current partition layout to screen. You shoud check if your layout is same as those fragments I provide under spoiler (file systems doesn't matter). If there are any differences you have to discribe what you did and enclose partition.log to your post.
HAMMERHEAD STOCK
Code:
25 192937984B 1266679807B 1073741824B system
26 1266679808B 1298137087B 31457280B crypto
27 1298137088B 2032140287B 734003200B cache
HAMMERHEAD MODIFIED
Code:
25 192937984B 1803551231B 1610613248B system
26 1803551232B 2065695231B 262144000B vendor
27 2065695232B 2097152511B 31457280B crypto
28 2097152512B 2306867711B 209715200B cache
4. Flashable resize zip for ROMs that support addon.d (automatic resize when dirty flashing updates).
5. To backup persist partition you need PC with installed adb. Boot your hammerhead in TWRP and plug to PC. Than use next commands.
Code:
adb root
adb shell
dd if=/dev/block/mmcblk0p16 of=/sdcard/persist.img
Than copy .img file from root of internal storage to your PC. Although, script doesn't affect that area, backup of this partition may help in case of any problems with mac address etc.
Thank you for this zip!!! It works fine but I used nano package gapps for the face unlock but still does not work on LOS 15.1. Any suggestions
Vendor partition means support for treble.... Right?
---------- Post added at 04:11 AM ---------- Previous post was at 03:44 AM ----------
After flashing a ROM the system partition resizes back to 1009mb...
Can this be fixed?
@sinkoo1979 try bigger gapps, alse, it may be Lineage problem.
@getrooted0019 you didn't read Installation part carefully, did you? You need to use resize option in TWRP to restore original size after flashing ROMs since they are build for 1G /system partition.
getting a message in twrp "this is not a nexus 5" and won't let me switch back to stock.
@sinkoo1979 send me your partition table in bytes
Clamor said:
@sinkoo1979 send me your partition table in bytes
Click to expand...
Click to collapse
Data and vendor partitions in my nexus 5 are 0mb and not present. System showing about 1028mb while cache is on 29mb.
Thank you for your help but can't change the cache storage back to stock. Can't access the internal storage in TWRP. I think I corrupted my partitions on the nexus 5. Nexus 5 boots into TWRP but can't access nothing. Tried to flash different rom with OTG but bootloops. Can't flash stock because the cache partition is too small.
@sinkoo1979 just stop. I'd ask you to create a telegram account and PM it to me here. I'll help you, just don't do anything
Clamor said:
@sinkoo1979 just stop. I'd ask you to create a telegram account and PM it to me here. I'll help you, just don't do anything
Click to expand...
Click to collapse
Thank you for your help
This is fixable! I was a noob and didn't resize my system partition after flashing rom. Flashed the hh repartition to go back to stock in the ua twrp and got a bunch of errors. Then flashed stock recovery and tried again. This is not a Nexus 5 popped up. The backup file is inside the flashable zip. I just used adb shell and parted to execute the commands listed in backup and viola my Nexus 5 is back. So those freaking out that they messed up their phone...don't worry it's fixable just listen to Clamor. Anyone can pm me too if you need help.
@typow102 if repartition pack says "It is not Nexus 5" than you shouldn't continue without asking here. Using scripts from pack on them own is dangerous as well. Currently I don't know how many types of MMC installed in our Nexus 5 and "It is not Nexus 5" on repartition or on returning to stock may indicate a new type MMC chip like it was with Nexus 7 (2013)
Clamor said:
@typow102 if repartition pack says "It is not Nexus 5" than you shouldn't continue without asking here. Using scripts from pack on them own is dangerous as well. Currently I don't know how many types of MMC installed in our Nexus 5 and "It is not Nexus 5" on repartition or on returning to stock may indicate a new type MMC chip like it was with Nexus 7 (2013)
Click to expand...
Click to collapse
That's the thing though It worked perfectly the first time I flashed it. No errors. Luckily I have had quite a bit of experience with terminal and parted so I felt confident in what I was doing. Can I help you in any way with this? There very well maybe a different mmc chip we don't know about yet.
@typow102 feel free to help if you are certain you can.
For those who downloaded repartition pack before this message is published, please redownload pack since previous version might have a problems with repartition. If repartition was already made, don't worry everything should be fine. Just use up-to-date pack.
Do I need to resize the partition in twrp every time after flashing any ROM and then flash gapps package?
@bagajohny yeah, till devs decide to support it officially.
When I install the ROM (crDroid 4.6) after change the partitions, when I go to TWRP, Wipe > Advanced Wipe, selecting system and pushing over Repair or Change File System button and then over Resize File System, this message was shown:
Repairing system before resizing.
Repairing system using e2fsck...
Done.
Resizing...
/sbin/resize2fs /dev/block/mmcblk0p25 process ended with ERROR: 1
Unable to resize system.
So no resizing is made.
@froilson resize once more, if fails, change mounting state of system and try once more
@Clamor with this can we have treble support ?

Categories

Resources