To those of you who followed link here: don't rush ahead and execute adb command. Read the thread in its entirety, since it contains typos and trial n error.
Gl, hf
Hi. I've been stupid. U may flame me but plz also provide some advice to swallow it with.
I followed bad advice and flashed cwm 5xxxx. After that tried to run superwipe, which got stuck after a few steps. To my horror i realized i had run it from internal. Of course it wiped itself and i got stuck mid-partinioning i think.
Since cwm don't read ext sd i tried to push new recovery via easyflasher, but i can't seem to get a driver that lets my pc interact with the device.
Instead discovered i have adb acess if connected when device is in cwm. From there tried to run PERI v 0.4. At first step, trying to push recovery i get a message of no space available. I think this is due to borked partitioning with superwipe. I guess I can repartition with cwm, but now I've messed so much up I don't wanna do anything more without proper advice.
Thanks
bump
If you have adb access, then use it to push a new rom.
"adb push {shiny new rom or recovery} /sdcard/"
You might have to change /sdcard/ to whatever cwm 5x uses?
Then you can just flash it from cwm.
EDIT: I just saw that you have the tf101G - it might work, but you probably have to find the right rom or recovery.
sent from my transformer
gee one said:
If you have adb access, then use it to push a new rom.
"adb push {shiny new rom or recovery} /sdcard/"
You might have to change /sdcard/ to whatever cwm 5x uses?
Then you can just flash it from cwm.
EDIT: I just saw that you have the tf101G - it might work, but you probably have to find the right rom or recovery.
sent from my transformer
Click to expand...
Click to collapse
Good advice, problem is that im not very savvy. How do i execute that command and what if i need to repartition the internal sd?
When running oneclickrecovery i get following prompts:
Uh-oh! I'm softbricked or have a recovery-bootloop! D:
Never fear sir and/or madam! PERI is here! -trips-
Adb needs to be fully working for this to work properly.
Note that this will wipe your current recovery.
Also note that this may not work, don't taze me bro!
Run? Close if you want to cancel.
Press any key to continue . . .
List of devices attached
0123456789ABCDEF recovery
If you see your device here this will work, if not fix adb.
Press any key to continue . . .
running fix...
dd: writing '/dev/block/mmcblk0p3': No space left on device
4097+0 records in
4096+0 records out
2097152 bytes (2.0MB) copied, 0.345431 seconds, 5.8MB/s
rebooting tab, if at any step it doesn't reboot turn off and turn back on
Once back into an adb possible state continue...
Press any key to continue . . .
Pushing new recovery...
1331 KB/s (4599884 bytes in 3.374s)
Running wolf's exploit...
mv: can't rename '/data/local/tmp': No such file or directory
Going...
ln: /data/local/tmp: No such file or directory
Done!
Now lets reboot your TF again...
Continue when back into ADB again...
Press any key to continue . . .
Flashing new recovery...
dd: can't open '/sdcard/recoveryblob': No such file or directory
Done!
Continue to reboot your tab, do the button combination to test recovery.
(Hold volume-down as it's rebooting and press vol-up to enter recovery)
Press any key to continue . . .
Hopefully that fixed everything!
Press any key to continue . . .
Of course nothing was fixed and I still have cwm 5xxx which can't flash from ext sd. If I can only get another recovery I can flash any rom and that's that.
In device manager the device shows up as android adb interface when booted into cwm. I also have a device named android composite adb interface, but with a warning sign on it.
This is getting tiresome...
Edit: tried using quick adb pusher, but get message that i cant mount as r/w. In cwm cant mount data or sdcard/.android_secure.
Fun thing is I dont have root either.
It looks like your partitions are unformatted.
I think you need to get to a root shell via adb in recovery
- put your phone on recovery and plug into your computer
- type "adb remount" (you might get an error) then type "adb shell"
- you'll be in a terminal shell
- type "mount" to see how/what your sdcard is doing. Look for the line that has /sdcard on it. It might be something like /dev/block/mmcblk0p1 mounted at /sdcard blah blah...
- now to format your sdcard, type "mke2fs /dev/blah/whereever/your/sdcard/is/mounted/from/above"
- allow it to complete and type "exit". you might have to reboot your tab to get everything to remount
- once your tqab is back in recovery, type on your computer "adb push [some new recovery that uses the external sdcard or a new rom] /sdcard"
- if you have recovery bootloops, google around, there is a fix that wipes the reboot command from the misc partition. You can type it from an adb shell it's something like "dd if=/dev/block/zero of=/be/carefule/because/you/have/a/tf101G bs=1 count=13"
- Google is your friend. Linux is your friend. This is a bit of a high level overview, so you'll have to fill in the details yourself. Keep in mind that I don't have a tf101G and I never tried this before (a benefit of never using superwipe!)
Good luck!
OK. I'd like to try the method u describe but as I mentioned I'm really not tech savvy. I don't even know how to get to the point where I type "adb remount". Do I just open a cmd prompt? Tried that - didn't work.
I have downloaded sdk manager for when I did some stuff with my phone earlier and have the basic packages installed.
Are you on Windows? I think it's a path issue. You either need to put everything in the same folder and run everything from there or put adb in your path. I don't use Windows, so that's probably the best advice I can give you. "which adb" and "echo $PATH" probably won't work in Windows like they do in linux.
Ehm.. too techie answer for me to comprehend.
Yes I'm on win 7.
Put what in same folder as what?
Run from there by right clicking empty space in folder and choosing cmd?
What do you mean by putting adb in my path?
For some reason, lots of people on windows just put the recovery/rom and adb in the same folder and run it from there in the command prompt. Put it all in one place and use the cd command in the terminal to get there.
sent while running with scissors
Lol. Don't cut urself man. I might need your help again
I'll try later when kids asleep.
Allright. Learning curve is steep but im clinging on to it:
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb remount
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
remount failed: Success
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb shell
~ # mount
mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
/dev/block/mmcblk0p2 on /cache type ext4 (rw,nosuid,nodev,relatime,user_xattr,ac
l,barrier=1,data=ordered)
~ # mke2fs /dev/block/mmcblk0p2
mke2fs /dev/block/mmcblk0p2
mke2fs 1.41.11 (14-Mar-2010)
/dev/block/mmcblk0p2 is apparently in use by the system; will not make a filesys
tem here!
~ # exit
exit
C:\Program Files (x86)\Android\android-sdk\platform-tools>
Any ideas?
You're almost there... You're /cache partition is already formatted (ext4) Be careful since you can really mess things up with the wrong commands or mis-typed commands.
It looks like you need to mount your sdcard manually. I'm not sure which partition it is. I'll check the stock rom in a little while- I have to run some errands while it downloads.
OK, I downloaded the stock rom and had a look at the /etc/recovery.fstab file in the stock recovery. Should be what we need.
Put your tablet in recovery. Then, in a windows terminal, type "adb remount" and then "adb shell" This wil put you into an android terminal. I don't know if you need read/write permissions in CWM? Who knows? Typing commands in here is the same as typing commands on your tablet (if anyone used the command line any more).
type "ls /dev/block/" and you should see a long list of - look for mmcblk1p1 or mmcblk1. It will probably be the first one.
type "ls /" and look for /sdcard. If it's not there type "mkdir /sdcard" This step creates the mount point if it doesn't exist.
Now type "mount /dev/mmcblk1p1 /sdcard" - Substitute whichever one is in your /dev/block directory from above.
EDIT: If you get errors that it's not formatted or "specify the type" then we'll have to format it first. "mke2fs /dev/block/mmcblk1p1"
Now, in a different windows terminal, type "adb push [a new rom/recovery] /sdcard/"
In CWM, you should be able to flash whatever you pushed there.
If it flashes, but you get bootloops or boot back into CWM, you probably have the dreaded CWM bootloops. You can fix that by typing "dd if=/dev/zero of=/dev/block/mmcblk0p3 bs=1 count=15" in the terminal as the first step after "adb shell" For this you will need root access (with the # prompt, not $) Type "su" if you don't ahve the # prompt. It might work? Note that this is experimental and wipes out a bit of your misc partition. I have no idea of what else is on there, so there might be unintended consequences.
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb remount
remount failed: Success
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb shell
~ # ls /dev/block/
ls /dev/block/
loop0 loop3 loop6 mmcblk0p1 mmcblk0p4 mmcblk0p7 platform
loop1 loop4 loop7 mmcblk0p2 mmcblk0p5 mmcblk1
loop2 loop5 mmcblk0 mmcblk0p3 mmcblk0p6 mmcblk1p1
~ # ls /
ls /
cache proc system
data res tmp
default.prop root ueventd.goldfish.rc
dev sbin ueventd.rc
etc sdcard ueventd.ventana.rc
init staging
init.rc sys
~ # mount /dev/mmcblk1p1 /sdcard
mount /dev/mmcblk1p1 /sdcard
mount: mounting /dev/mmcblk1p1 on /sdcard failed: No such file or directory
~ #
I tried pushing anyway, but can't still mount sdcard on cwm from pad interface.
As for the sdcard contents, I have nothing there that can't be deleted.
use "mount /dev/block/mmcblk1p1 /sdcard" No need to repeat the ls commands.
Sorry for not answering rapidly. Baby chose this night to be at his worst.
First
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb remount
remount failed: Success
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb shell
~ # mount /dev/block/mmcblk1p1 /sdcard
mount /dev/block/mmcblk1p1 /sdcard
~ #
New cmd
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb push cwm-6.0.1.2-t
ouch-external.zip /sdcard/
1332 KB/s (5070063 bytes in 3.715s)
C:\Program Files (x86)\Android\android-sdk\platform-tools>
Can't mount sdcard frow cwm. Can I also flash new rck manually?
Tried reboot and mounting again manually, but cwm won't mount.
Maybe try "mount /dev/block/mmcblk1 /sdcard" ???
I get invalid argument on that command.
What if we forget cwm and try format to default partinioning and push stock?
You could try pushing the stock rom to your tablet and then flashing it via the staging partition. The rom is about 522M, so you might need the sd card, but otherwise, you can push it anywhere it will fit. Staging partition is /dev/block/mmcblk0p4. Google around, the info is certainly in this forum. As long as you can get a root shell via adb, you can flash it. The stock rom is on the Asus sight. Just keep unzipping it until you see the blob file.
Of course, you can flash anything you want via the staging partition, if it's packed in a blob format. You might consider flashing a rooted rom instead of the stock.
I have stock on hd. Shall I mount staging via same commands as i mounted sdcard? Push there via adb. Then what command to flash the blob? The blob has no file extension. Shall i keep it that way?
Edit: ok i tried to unpack the recoveryblob from my desired version of cwm, but tool stopped working during process of writing recoveryblob.sos. I got the tool here http://forum.xda-developers.com/showpost.php?p=21620550&postcount=24
Next problem:
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb remount
remount failed: Success
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb shell
~ # mount /dev/block/mmcblk0p4
mount /dev/block/mmcblk0p4
mount: can't find /dev/block/mmcblk0p4 in /etc/fstab
~ #
Edit 2: I finally managed to get apx working if it somehow can help.
Problem solved, by using an other usb adb driver, instead of universal adb driver ; thx petrov.0
Hi, sorry for my bad english,
I've trouble to understand what's wrong or I miss : want to run the 1st command umount /cache at the 4th step (unmount all partitions of the internal memory )
C:\Program Files (x86)\Minimal ADB and Fastboot>adb shell
[email protected]:/ $ umount /cache
umount /cache
failed: Operation not permitted
1|[email protected]:/ $
Actually the phone are root, TWRP v2.8.6.0 by decker. I've also swap with twrp-2.8.7.0-idol3-6039y-with-gdisk instead of just run it one time : same trouble, Operation not permitted
Any idea ?
Just to be sure, when it writing go to device, we are under the TWRP -> Reboot -> System ... and we go to android ? And at this point I run adb shell, that ok ?
I would also say, that my first smartphone / 1st root / 1st trying
Ok I've discover what's wrong
Need writing on the commande line : adb shell su
SuperSu on the phone ask me an authorization about "adb shell", of course I say yes
Now i can see :
C:\Program Files (x86)\Minimal ADB and Fastboot>adb shell su
[email protected]:/ #
Symbol and "user" have change
shell --> root
$ --> #
Hope now all clear for the next step.
Unfortunaly, it's not to seem that, now I can't writing any caractere in command line
Have try :
C:\Program Files (x86)\Minimal ADB and Fastboot>adb shell
[email protected]:/ $ su
su
[email protected]:/ # gdisk
gdisk
tmp-mksh: gdisk: not found
127|[email protected]:/ #
umount /and-sec directory not found
gdisk not works
...help !
You shouldn't reboot the device. Everything must be done while the phone is in the recovery.
Not sure to understand you
When i'm under TWRP, writing in command line adb shell --> error: device not found
I really need you can detail step by step until there.
bykarat said:
Not sure to understand you
When i'm under TWRP, writing in command line adb shell --> error: device not found
I really need you can detail step by step until there.
Click to expand...
Click to collapse
You do this from Windows, so you need drivers which recognize your device when is in the recovery. I'm not sure which drivers work with the phone. The vendor and the product IDs for the recovery are
Code:
idVendor=18d1, idProduct=4ee2
Yes the problem come from the usb driver, you have good see., despite the id vendor & product number are good
img15.hostingpics.net/pics/282113Sanstitre2.pngWhen I follow an tutorial for rooting, it mention to install "Universal adb driver", enought for that, but not for your Guide "Repartitioning of the internal memory"
Have use those ones of : (can't add link in this forum at this time) 54.247.87.13/softwareupgrade/Driver/ALCATEL_ADB_%20Driver%20Qualcomm_ADB.rar
I want to say lots of thank you for all that :victory:
bykarat said:
Yes the problem come from the usb driver, you have good see., despite the id vendor & product number are good
img15.hostingpics.net/pics/282113Sanstitre2.pngWhen I follow an tutorial for rooting, it mention to install "Universal adb driver", enought for that, but not for your Guide "Repartitioning of the internal memory"
Have use those ones of : (can't add link in this forum at this time) 54.247.87.13/softwareupgrade/Driver/ALCATEL_ADB_%20Driver%20Qualcomm_ADB.rar
I want to say lots of thank you for all that :victory:
Click to expand...
Click to collapse
Glad to see that you made it. There is a thanks button by the way . I will include the link to the drivers in the guide.
Notice : , First of all ,you are responsible for any damages on your tablet and I do not accept any responsibility for that , by reading and doing these procedures , you have already accepted its responsibility by yourself only , secondly this knowledge for Dev people much more ! , of course its written such way that newbies can understand too .
Click to expand...
Click to collapse
Before starting about fetching Stock ROM of TWG10 , maybe you ask ,what is TWG10 ? which Tablet is it ? ,so you can know and Find it from here : Introduction of Datamini TWG10 .
So , we pay attention some introduction and requirements in some steps then considering to the main .
Using of Ubuntu has far better features and advantage respect to Windows to fetch the Stock ROM of any Android devices , So we use Ubuntu too.
First Step is to Install ADB and Fastboot for Ubuntu from here using Terminal of Ubuntu.
Second step is to root your device , Rooting will be released so many privileges that make us to fetch the Stock ROM of any Android Devices .
One of the common and famous way of rooting Android devices is booting TWRP recovery from fastboot and Flashing SuperSu, but when there is no TWRP recovery for your device , you can port and compile it for your device : Porting TWRP From Source .
But always there is a final and better way to root your device which is so easy too -> UNIVERSAL GUIDE for Rooting Any Android Device Manually ! which has worked and been tested on Intel Atom based processor devices .
<<Fetching Factory Imgs>> :
After installing the SU ,now we can access to Android partition scheme of TWG10 , just connect your device through its cable to your PC (Ubuntu) , hoping you have already made USB debugging on in Developer options , just open a new terminal and write
Code:
adb devices
, you should see Baytrail000... in the last line , now command in the terminal ,
Code:
adb shell
and then when it starts , you will see your phone code name ,[email protected]_phone_32:/$ ,it means now you can get controlled fully of your tablet , just type
Code:
su
and press Enter , the information of Android partition scheme is located in /dev/block/platform/dw_mmc/by-name such that , the dw_mmc for TWG10 is 808060F14:00 let's use
Code:
ls -l /dev/block/platform/808060F14:00/by-name
to find locations of , boot.img , system.img, recovery.img and so on(Factory imgs) you will see such below photo : ( you can save this info in your internal storage ,
Code:
ls -la /dev/block/platform/808060F14:00/by-name > sdcard/your selective name.txt
)
also by commanding cat /proc/partition in terminal , you find some info about your tablet partition too
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
As you see ,you can find location of each img file in your device for example : boot.img is in /dev/block/mmcblk0p5 now its time to fetch them using
Code:
dd if=Directory of source of=Directory of Destination
for example :
Code:
dd if=/dev/block/mmcblk0p5 of=/sdcard/boot.img
sdcard is absolute location of your Internal storage :/storage/emulated/legancy.(Notice : NEVER TOUCH basic_data_partition , its data of your windows OS , NEVER TOUCH ESP , its location of your UEFI bios insyde software , NEVER TOUCH Microsoft_reserve_partition , the only img files that you need to dd is boot.img. fastboot.img (bootloader) , system.img, recovery.img ,config.img ,factory.img, these two contains vendor.img and radio.img related connectivity and WIFI)
after fetching all imgs of stock ROM (Factory imgs) of TWG10 , its the time to pull them to your PC .
Just type exit and enter , write in the terminal ,
Code:
adb pull /sdcard/"img File" /" your selective Directory in your PC"
for example :
Code:
adb pull /sdcard/boot.img /home/amir/twg10_imgs
.
Do not worry , if you cant fetch all factory images , you can download them from here :Factory imgs of TWG10
But the important question is : why we need those factory imgs ? because when the Android OS gets damaged and its not booted up or in boot looping condition, we can survive it in below instruction :
Reviving TWG10 Android OS by Flashing Factory imgs via Fastboot:
open a new terminal in the directory which those factory images are there and placed and then write in the terminal :
Code:
adb reboot -bootloader
(we will boot to fastboot)
after restarting :
Code:
sudo fastboot devices
now we need to unlock bootloader for flashing
Code:
sudo fastboot oem unlock
sudo fastboot flashing unlock
sudo fastboot reboot bootloader
after restarting to bootloader ,you should press volume up to enter to fastboot
now its the time for erasing necessary partition, as we saw , ls -l /dev/block/platform/808060F14:00/by-name , shows the portions by name for example /dev/block/mmcblk0p5 is called boot .
so we use this code sudo fastboot erase 'partition by name'
Code:
sudo fastboot erase boot
sudo fastboot erase cache
sudo fastboot erase recovery
sudo fastboot erase date (userdata)
sudo fastboot erase system
now flashing 'partition by name'
sudo fastboot flash 'partition by name' 'img file association'
Code:
sudo fastboot flash boot boot.img
sudo fastboot flash fastboot fastboot.img (flashing bootloader)
sudo fastboot reboot bootloader (reboot to fastboot)
sudo fastboot flash recovery recovery.img
sudo fastboot flash system system.img
sudo fastboot flash config config.img (this is radio.img)
sudo fastboot flash factory factory.img (this is vendor.img)
sudo fastboot reboot
Congratulation ! your stock Android revived !
you can also download and install any Android X86 on your TWG10 , you can make bootable flash memory using Rufus but its important to say , you should use GPT Partition scheme for UEFI in partition scheme and target system type , another important notice is : when your bootable flash memory gets ready , you should open your flash memory and go to /boot/grub and open grub.cfg by gedit and modify it , after root=/dev/ram0 you should "space" and type nomodeset vga=5785 for live , debug and installation and then save , otherwise it wont be booted into TWG10!.
By pressing ESC before going to any OS ,you can select the bootable flash memory in boot manager and enter to boot menu of android X86 , if you did not modify the grub.cfg , you can press E in boot menu of Android X86 installation and modify it ( type and add nomodeset vga=5785 after root=/dev/ram0) and press F10 , but because of the orientation of tablet is in horizontal , maybe its difficult to modify , so its better to modify it before booting the flash memory and its better to install Android X86 on a SD card or another flash memory , because 32 GB is not enough for 3 OSs!
Another notice is you should pay attention to above partition scheme in the time of Android X86 installation.
but when you booted up the Android X86 , nothing works , touch , rotation ,sound and ......
this is because of no one of Android Drivers is installed for TWG10 , so we pay attention to ->
<<Introduction of Android Device Drivers >>
lets your TWG10 is connected to your PC.
Android Device Drivers (modules) are C program in fact , they are kind of modules which will be added to kernel of Android OS and they load and unload in the time of demand , these C program files after compiling ,they convert to the files with extension .ko , these .ko Files are located in /lib/modules .
these ko files are taking care of Device functionality (how they perform and operate) and files of hardware devices( such HDMI , hard disk , sound , touchscreen , WIFI...) are located in /dev
you can see the files of hardware devices using these codes in a terminal :
Code:
adb shell
ls -l /dev/i2c-1
you will see
Code:
crw------- root root 89, 1 2017-11-11 01:02 i2c-1
if the first letter is C its character device , 89 is major number using for identify the driver (which module or .ko file is used for this device file) , after 89 , there is a ',' and then 1 its a minor number which is used to distinguish between devices with same driver ,
for example if we write
Code:
adb shell
ls -l /dev/i2c-2
you will see
Code:
crw------- root root 89, 2 2017-11-11 01:02 i2c-2
i2c-2 used same driver file (major number is same) but another device file (minor number different)
we have two type devices , block devices and character devices.
block devices have a buffer for a request so they can have best response , block devices takes input and gives output only , but character devices can takes so many inputs and give so many outputs .
to see blocks and character devices on your TWG10 , you can use below codes :
Code:
adb shell
cat proc/devices
to create a device file ,using this code :
open a terminal :
Code:
mknod dev/'device name' 'major number' 'minor number'
for example :
Code:
adb shell
mknod dev/i2c 89 3
In fact modules (device drivers ) and devices file (hardware) are connect to each other by major number .
You can pull modules which are control the functionality of devices (hardware) in your PC from the stock Android using ADB and Ubuntu Terminal :
just open a new Terminal , type :
Code:
adb devices
adb pull /lib/modules 'A directory in your PC"
now if you want to see these .ko files are about which Device Driver , just open a terminal in the directory that .ko files are type :
Code:
modinfo 'name of the ko file'
for example
Code:
modinfo 8723bs.ko
We can also see Device Drivers which are activated by using lsmod or cat /proc/modules :
open a new terminal and type :
Code:
adb shell
lsmode or cat/proc/modules
For adding a driver or module to the kernel ,
open a terminal in the directory of .ko file where you pulled them into your PC
Code:
adb push 'directory of modules(drivers) in the PC' /lib/modules
adb shell
modprobe 'the pushed file name'
for example :
Code:
adb push /home/amir/twg10_imgs/drivers /lib/modules
adb shell
modprobe 8723bs
also with insmod command , we can add a driver to the kernel , but its dependencies command , we should add other related driver(module) too.
for example
Code:
adb shell
insmod ./8723bs.ko
the story still has not be started , it will be continued !
amirhtc said:
Before starting about fetching Stock ROM of TWG10 , maybe you ask ,what is TWG10 ? which Tablet is it ? ,so you can know and Find it from here : Introduction of Datamini TWG10 .
So , we pay attention some introduction and requirements in some steps then considering to the main .
Using of Ubuntu has far better features and advantage respect to Windows to fetch the Stock ROM of any Android devices , So we use Ubuntu too.
First Step is to Install ADB and Fastboot for Ubuntu from here using Terminal of Ubuntu.
Second step is to root your device , Rooting will be released so many privileges that make us to fetch the Stock ROM of any Android Devices .
One of the common and famous way of rooting Android devices is booting TWRP recovery from fastboot and Flashing SuperSu, but when there is no TWRP recovery for your device , you can port and compile it for your device : Porting TWRP From Source .
But always there is a final and better way to root your device which is so easy too -> UNIVERSAL GUIDE for Rooting Any Android Device Manually ! which has worked and been tested on Intel Atom based processor devices .
<<Fetching Factory Imgs>> :
After installing the SU ,now we can access to Android partition scheme of TWG10 , just connect your device through its cable to your PC (Ubuntu) , hoping you have already made USB debugging on in Developer options , just open a new terminal and write
Code:
adb devices
, you should see Baytrail000... in the last line , now command in the terminal ,
Code:
adb shell
and then when it starts , you will see your phone code name ,[email protected]_phone_32:/$ ,it means now you can get controlled fully of your tablet , just type
Code:
su
and press Enter , the information of Android partition scheme is located in /dev/block/platform/dw_mmc/by-name such that , the dw_mmc for TWG10 is 808060F14:00 let's use
Code:
ls -l /dev/block/platform/808060F14:00/by-name
to find locations of , boot.img , system.img, recovery.img and so on(Factory imgs) you will see such below photo : ( you can save this info in your internal storage ,
Code:
ls -la /dev/block/platform/808060F14:00/by-name > sdcard/your selective name.txt
)
also by commanding cat /proc/partition in terminal , you find some info about your tablet partition too
As you see ,you can find location of each img file in your device for example : boot.img is in /dev/block/mmcblk0p5 now its time to fetch them using
Code:
dd if=Directory of source of=Directory of Destination
for example :
Code:
dd if=/dev/block/mmcblk0p5 of=/sdcard/boot.img
sdcard is absolute location of your Internal storage :/storage/emulated/legancy.(Notice : NEVER TOUCH basic_data_partition , its data of your windows OS , NEVER TOUCH ESP , its location of your UEFI bios insyde software , NEVER TOUCH Microsoft_reserve_partition , the only img files that you need to dd is boot.img. fastboot.img (bootloader) , system.img, recovery.img ,config.img ,factory.img, these two contains vendor.img and radio.img related connectivity and WIFI)
after fetching all imgs of stock ROM (Factory imgs) of TWG10 , its the time to pull them to your PC .
Just type exit and enter , write in the terminal ,
Code:
adb pull /sdcard/"img File" /" your selective Directory in your PC"
for example :
Code:
adb pull /sdcard/boot.img /home/amir/twg10_imgs
.
Do not worry , if you cant fetch all factory images , you can download them from here :Factory imgs of TWG10
But the important question is : why we need those factory imgs ? because when the Android OS gets damaged and its not booted up or in boot looping condition, we can survive it in below instruction :
Reviving TWG10 Android OS by Flashing Factory imgs via Fastboot:
open a new terminal in the directory which those factory images are there and placed and then write in the terminal :
Code:
adb reboot -bootloader
(we will boot to fastboot)
after restarting :
Code:
sudo fastboot devices
now we need to unlock bootloader for flashing
Code:
sudo fastboot oem unlock
sudo fastboot flashing unlock
sudo fastboot reboot bootloader
after restarting to bootloader ,you should press volume up to enter to fastboot
now its the time for erasing necessary partition, as we saw , ls -l /dev/block/platform/808060F14:00/by-name , shows the portions by name for example /dev/block/mmcblk0p5 is called boot .
so we use this code sudo fastboot erase 'partition by name'
Code:
sudo fastboot erase boot
sudo fastboot erase cache
sudo fastboot erase recovery
sudo fastboot erase date (userdata)
sudo fastboot erase system
now flashing 'partition by name'
sudo fastboot flash 'partition by name' 'img file association'
Code:
sudo fastboot flash boot boot.img
sudo fastboot flash fastboot fastboot.img (flashing bootloader)
sudo fastboot reboot bootloader (reboot to fastboot)
sudo fastboot flash recovery recovery.img
sudo fastboot flash system system.img
sudo fastboot flash config config.img (this is radio.img)
sudo fastboot flash factory factory.img (this is vendor.img)
sudo fastboot reboot
Congratulation ! your stock Android revived !
you can also download and install any Android X86 on your TWG10 , you can make bootable flash memory using Rufus but its important to say , you should use GPT Partition scheme for UEFI in partition scheme and target system type , another important notice is : when your bootable flash memory gets ready , you should open your flash memory and go to /boot/grub and open grub.cfg by gedit and modify it , after root=/dev/ram0 you should "space" and type nomodeset vga=5785 for live , debug and installation and then save , otherwise it wont be booted into TWG10!.
By pressing ESC before going to any OS ,you can select the bootable flash memory in boot manager and enter to boot menu of android X86 , if you did not modify the grub.cfg , you can press E in boot menu of Android X86 installation and modify it ( type and add nomodeset vga=5785 after root=/dev/ram0) and press F10 , but because of the orientation of tablet is in horizontal , maybe its difficult to modify , so its better to modify it before booting the flash memory and its better to install Android X86 on a SD card or another flash memory , because 32 GB is not enough for 3 OSs!
Another notice is you should pay attention to above partition scheme in the time of Android X86 installation.
but when you booted up the Android X86 , nothing works , touch , rotation ,sound and ......
this is because of no one of Android Drivers is installed for TWG10 , so we pay attention to ->
<<Introduction of Android Device Drivers >>
lets your TWG10 is connected to your PC.
Android Device Drivers (modules) are C program in fact , they are kind of modules which will be added to kernel of Android OS and they load and unload in the time of demand , these C program files after compiling ,they convert to the files with extension .ko , these .ko Files are located in /lib/modules .
these ko files are taking care of Device functionality (how they perform and operate) and files of hardware devices( such HDMI , hard disk , sound , touchscreen , WIFI...) are located in /dev
you can see the files of hardware devices using these codes in a terminal :
Code:
adb shell
ls -l /dev/i2c-1
you will see
Code:
crw------- root root 89, 1 2017-11-11 01:02 i2c-1
if the first letter is C its character device , 89 is major number using for identify the driver (which module or .ko file is used for this device file) , after 89 , there is a ',' and then 1 its a minor number which is used to distinguish between devices with same driver ,
for example if we write
Code:
adb shell
ls -l /dev/i2c-2
you will see
Code:
crw------- root root 89, 2 2017-11-11 01:02 i2c-2
i2c-2 used same driver file (major number is same) but another device file (minor number different)
we have two type devices , block devices and character devices.
block devices have a buffer for a request so they can have best response , block devices takes input and gives output only , but character devices can takes so many inputs and give so many outputs .
to see blocks and character devices on your TWG10 , you can use below codes :
Code:
adb shell
cat proc/devices
to create a device file ,using this code :
open a terminal :
Code:
mknod dev/'device name' 'major number' 'minor number'
for example :
Code:
adb shell
mknod dev/i2c 89 3
In fact modules (device drivers ) and devices file (hardware) are connect to each other by major number .
You can pull modules which are control the functionality of devices (hardware) in your PC from the stock Android using ADB and Ubuntu Terminal :
just open a new Terminal , type :
Code:
adb devices
adb pull /lib/modules 'A directory in your PC"
now if you want to see these .ko files are about which Device Driver , just open a terminal in the directory that .ko files are type :
Code:
modinfo 'name of the ko file'
for example
Code:
modinfo 8723bs.ko
We can also see Device Drivers which are activated by using lsmod or cat /proc/modules :
open a new terminal and type :
Code:
adb shell
lsmode or cat/proc/modules
For adding a driver or module to the kernel ,
open a terminal in the directory of .ko file where you pulled them into your PC
Code:
adb push 'directory of modules(drivers) in the PC' /lib/modules
adb shell
modprobe 'the pushed file name'
for example :
Code:
adb push /home/amir/twg10_imgs/drivers /lib/modules
adb shell
modprobe 8723bs
also with insmod command , we can add a driver to the kernel , but its dependencies command , we should add other related driver(module) too.
for example
Code:
adb shell
insmod ./8723bs.ko
the story still has not be started , it will be continued !
Click to expand...
Click to collapse
Is it possible to get a copy of your files?
Upload factory image
If you can, kindly please upload the factory images again
If possible in google drive
Atleat it won't get deleted
amirhtc said:
Before starting about fetching Stock ROM of TWG10 , maybe you ask ,what is TWG10 ? which Tablet is it ? ,so you can know and Find it from here : Introduction of Datamini TWG10 .
So , we pay attention some introduction and requirements in some steps then considering to the main .
Using of Ubuntu has far better features and advantage respect to Windows to fetch the Stock ROM of any Android devices , So we use Ubuntu too.
First Step is to Install ADB and Fastboot for Ubuntu from here using Terminal of Ubuntu.
Second step is to root your device , Rooting will be released so many privileges that make us to fetch the Stock ROM of any Android Devices .
One of the common and famous way of rooting Android devices is booting TWRP recovery from fastboot and Flashing SuperSu, but when there is no TWRP recovery for your device , you can port and compile it for your device : Porting TWRP From Source .
But always there is a final and better way to root your device which is so easy too -> UNIVERSAL GUIDE for Rooting Any Android Device Manually ! which has worked and been tested on Intel Atom based processor devices .
<<Fetching Factory Imgs>> :
After installing the SU ,now we can access to Android partition scheme of TWG10 , just connect your device through its cable to your PC (Ubuntu) , hoping you have already made USB debugging on in Developer options , just open a new terminal and write
Code:
adb devices
, you should see Baytrail000... in the last line , now command in the terminal ,
Code:
adb shell
and then when it starts , you will see your phone code name ,[email protected]_phone_32:/$ ,it means now you can get controlled fully of your tablet , just type
Code:
su
and press Enter , the information of Android partition scheme is located in /dev/block/platform/dw_mmc/by-name such that , the dw_mmc for TWG10 is 808060F14:00 let's use
Code:
ls -l /dev/block/platform/808060F14:00/by-name
to find locations of , boot.img , system.img, recovery.img and so on(Factory imgs) you will see such below photo : ( you can save this info in your internal storage ,
Code:
ls -la /dev/block/platform/808060F14:00/by-name > sdcard/your selective name.txt
)
also by commanding cat /proc/partition in terminal , you find some info about your tablet partition too
As you see ,you can find location of each img file in your device for example : boot.img is in /dev/block/mmcblk0p5 now its time to fetch them using
Code:
dd if=Directory of source of=Directory of Destination
for example :
Code:
dd if=/dev/block/mmcblk0p5 of=/sdcard/boot.img
sdcard is absolute location of your Internal storage :/storage/emulated/legancy.(Notice : NEVER TOUCH basic_data_partition , its data of your windows OS , NEVER TOUCH ESP , its location of your UEFI bios insyde software , NEVER TOUCH Microsoft_reserve_partition , the only img files that you need to dd is boot.img. fastboot.img (bootloader) , system.img, recovery.img ,config.img ,factory.img, these two contains vendor.img and radio.img related connectivity and WIFI)
after fetching all imgs of stock ROM (Factory imgs) of TWG10 , its the time to pull them to your PC .
Just type exit and enter , write in the terminal ,
Code:
adb pull /sdcard/"img File" /" your selective Directory in your PC"
for example :
Code:
adb pull /sdcard/boot.img /home/amir/twg10_imgs
.
Do not worry , if you cant fetch all factory images , you can download them from here :Factory imgs of TWG10
But the important question is : why we need those factory imgs ? because when the Android OS gets damaged and its not booted up or in boot looping condition, we can survive it in below instruction :
Reviving TWG10 Android OS by Flashing Factory imgs via Fastboot:
open a new terminal in the directory which those factory images are there and placed and then write in the terminal :
Code:
adb reboot -bootloader
(we will boot to fastboot)
after restarting :
Code:
sudo fastboot devices
now we need to unlock bootloader for flashing
Code:
sudo fastboot oem unlock
sudo fastboot flashing unlock
sudo fastboot reboot bootloader
after restarting to bootloader ,you should press volume up to enter to fastboot
now its the time for erasing necessary partition, as we saw , ls -l /dev/block/platform/808060F14:00/by-name , shows the portions by name for example /dev/block/mmcblk0p5 is called boot .
so we use this code sudo fastboot erase 'partition by name'
Code:
sudo fastboot erase boot
sudo fastboot erase cache
sudo fastboot erase recovery
sudo fastboot erase date (userdata)
sudo fastboot erase system
now flashing 'partition by name'
sudo fastboot flash 'partition by name' 'img file association'
Code:
sudo fastboot flash boot boot.img
sudo fastboot flash fastboot fastboot.img (flashing bootloader)
sudo fastboot reboot bootloader (reboot to fastboot)
sudo fastboot flash recovery recovery.img
sudo fastboot flash system system.img
sudo fastboot flash config config.img (this is radio.img)
sudo fastboot flash factory factory.img (this is vendor.img)
sudo fastboot reboot
Congratulation ! your stock Android revived !
you can also download and install any Android X86 on your TWG10 , you can make bootable flash memory using Rufus but its important to say , you should use GPT Partition scheme for UEFI in partition scheme and target system type , another important notice is : when your bootable flash memory gets ready , you should open your flash memory and go to /boot/grub and open grub.cfg by gedit and modify it , after root=/dev/ram0 you should "space" and type nomodeset vga=5785 for live , debug and installation and then save , otherwise it wont be booted into TWG10!.
By pressing ESC before going to any OS ,you can select the bootable flash memory in boot manager and enter to boot menu of android X86 , if you did not modify the grub.cfg , you can press E in boot menu of Android X86 installation and modify it ( type and add nomodeset vga=5785 after root=/dev/ram0) and press F10 , but because of the orientation of tablet is in horizontal , maybe its difficult to modify , so its better to modify it before booting the flash memory and its better to install Android X86 on a SD card or another flash memory , because 32 GB is not enough for 3 OSs!
Another notice is you should pay attention to above partition scheme in the time of Android X86 installation.
but when you booted up the Android X86 , nothing works , touch , rotation ,sound and ......
this is because of no one of Android Drivers is installed for TWG10 , so we pay attention to ->
<<Introduction of Android Device Drivers >>
lets your TWG10 is connected to your PC.
Android Device Drivers (modules) are C program in fact , they are kind of modules which will be added to kernel of Android OS and they load and unload in the time of demand , these C program files after compiling ,they convert to the files with extension .ko , these .ko Files are located in /lib/modules .
these ko files are taking care of Device functionality (how they perform and operate) and files of hardware devices( such HDMI , hard disk , sound , touchscreen , WIFI...) are located in /dev
you can see the files of hardware devices using these codes in a terminal :
Code:
adb shell
ls -l /dev/i2c-1
you will see
Code:
crw------- root root 89, 1 2017-11-11 01:02 i2c-1
if the first letter is C its character device , 89 is major number using for identify the driver (which module or .ko file is used for this device file) , after 89 , there is a ',' and then 1 its a minor number which is used to distinguish between devices with same driver ,
for example if we write
Code:
adb shell
ls -l /dev/i2c-2
you will see
Code:
crw------- root root 89, 2 2017-11-11 01:02 i2c-2
i2c-2 used same driver file (major number is same) but another device file (minor number different)
we have two type devices , block devices and character devices.
block devices have a buffer for a request so they can have best response , block devices takes input and gives output only , but character devices can takes so many inputs and give so many outputs .
to see blocks and character devices on your TWG10 , you can use below codes :
Code:
adb shell
cat proc/devices
to create a device file ,using this code :
open a terminal :
Code:
mknod dev/'device name' 'major number' 'minor number'
for example :
Code:
adb shell
mknod dev/i2c 89 3
In fact modules (device drivers ) and devices file (hardware) are connect to each other by major number .
You can pull modules which are control the functionality of devices (hardware) in your PC from the stock Android using ADB and Ubuntu Terminal :
just open a new Terminal , type :
Code:
adb devices
adb pull /lib/modules 'A directory in your PC"
now if you want to see these .ko files are about which Device Driver , just open a terminal in the directory that .ko files are type :
Code:
modinfo 'name of the ko file'
for example
Code:
modinfo 8723bs.ko
We can also see Device Drivers which are activated by using lsmod or cat /proc/modules :
open a new terminal and type :
Code:
adb shell
lsmode or cat/proc/modules
For adding a driver or module to the kernel ,
open a terminal in the directory of .ko file where you pulled them into your PC
Code:
adb push 'directory of modules(drivers) in the PC' /lib/modules
adb shell
modprobe 'the pushed file name'
for example :
Code:
adb push /home/amir/twg10_imgs/drivers /lib/modules
adb shell
modprobe 8723bs
also with insmod command , we can add a driver to the kernel , but its dependencies command , we should add other related driver(module) too.
for example
Code:
adb shell
insmod ./8723bs.ko
the story still has not be started , it will be continued !
Click to expand...
Click to collapse
please upload the factory images again