How To Guide Automated GSI build script (Linux/WSL) - Samsung Galaxy Tab A7 Lite

I've spent last day automating the guide at https://forum.xda-developers.com/t/guide-t220-t225-flash-a-gsi-on-the-a7-lite-without-twrp.4456821/ into a bash script (linux only)!
Here it is releasing it for anyone that needs it
Code:
I am not responsible whatever happens to your device
by using this script, i have tested it on my own device
and it worked but it may or may not work for you.
I will do my best to help you but that may be limited
as i have other responsibilities in life
Before starting read the third post
Usage​Download the your desired firmware from somewhere like samfw.com and extract it
Download your desired GSI image and extract it
Download otatools-mini, gsi-build script and vbmeta image, place them all together inside one directory (extract the otatools-mini next to the script)
Download patched odin
Run this in Linux or WSL!
Code:
$ ./build-gsi.sh <PATH TO YOUR AP FILE .tar.md5> <PATH TO GSI .img>
And let it do the work, may take a while depending on your PC
You may get something like this in the process, ignore it
Code:
Invalid sparse file format at header magic
Then go into download mode (VOLUME UP and DOWN when plugging in USB) and flash the CUSTOM_AP file you got from the script and BL, CSC from the firmware you used, DO NOT USE HOME_CSC
Reboot into recovery and factory reset (VOLUME UP while booting)!
If you are getting dm-verify error then flash the vbmeta_disabled_R (it needs to be .tar, extract it) in odin as AP and try rebooting again into recovery
Downloads​I used to provide one archive but it was large and i couldnt change the script without reuploading it so i am going to use gist for the script and provide other files separately
ota-tools-mini
build-gsi.sh

Getting Help​If you want me to help you ALWAYS post full output from the script, and make sure to use the latest script from the gist

I've spent a lot of time trying to make it work with all GSIs but i could not get it to work consistently
By default it works for all smaller GSIs, if you get the following error
Code:
ERROR: Output image is bigger than original super image, rerun the script with correct super image size
Then you will have to manually provide the new super size which i cannot help you with try to guess but it has to be divisible by 512

Not enough free space to expand partition: vendor
error while repacking
i have a lot of space . but it shows me like that
lpmake E 01-15 23:22:16 100 100 builder.cpp:698] [liblp]Not enough free space to expand partition: vendor
i am using debian wsl

Please post full script log in a spoiler or pastebin

sandorex said:
Please post full script log in a spoiler or pastebin
Click to expand...
Click to collapse

Could you try normal AP file not the magisk patched, i do not know how it modifies it
Also from my experience you do not need to patch whole AP file for magisk, you just need to patch the boot.img, zip it then flash it

OK . i will try

i tried with original ap file but same error

dxsyrz said:
i tried with original ap file but same error
Click to expand...
Click to collapse
It seems for some reason your gsi is too big, i managed to reproduce it, ill see if i can fix it

@dxsyrz can you test this one, it should work now
EDIT: i've updated the gist so you can just use that instead

good util but test more.

tom.android said:
good util but test more.
Click to expand...
Click to collapse
It worked for me, i would not release it if it did not work

sandorex said:
It worked for me, i would not release it if it did not work
Click to expand...
Click to collapse
OK sorry to write that message.

sandorex said:
It worked for me, i would not release it if it did not work
Click to expand...
Click to collapse
Well, something did not work in my case:
:: Uncompressing super image
super.img.lz4 : decoded 5637366988 bytes
:: Running simg2img
./build-gsi.sh: line 79: /mnt/c/Users/Zero/Desktop/otatools-mini/otatools-mini/simg2img: No such file or directory
^ Despite the files actually existing. You tell me cuz I've no idea (do note I do know how to do this manually, was just trying your script to simplify everything).

nirogu325 said:
Well, something did not work in my case:
:: Uncompressing super image
super.img.lz4 : decoded 5637366988 bytes
:: Running simg2img
./build-gsi.sh: line 79: /mnt/c/Users/Zero/Desktop/otatools-mini/otatools-mini/simg2img: No such file or directory
^ Despite the files actually existing. You tell me cuz I've no idea (do note I do know how to do this manually, was just trying your script to simplify everything).
Click to expand...
Click to collapse
You need to place otatools-mini in folder next to the script not together with the script

hi i have this problem

izimen said:
hi i have this problem
View attachment 5814501
Click to expand...
Click to collapse
You havs a space in your path, its actually a bug but you can jist move the files to somewhere without spaces
EDIT: Fixed it on gist

sandorex said:
You havs a space in your path, its actually a bug but you can jist move the files to somewhere without spaces
EDIT: Fixed it on gist
Click to expand...
Click to collapse
ok i try

bro it worked thank you I managed to make it work with a GSI and when I try with another I have this error

Related

Rooted XXALJL boot.img

This boot.img, attached, provides a root shell directly over adb. It is a simple modification of the stock XXALJL boot.img and could be useful for ROM developers who need to adb remount frequently, while still using the stock boot/kernel. I do not recommend this method for users in general since it is very insecure (SuperUser gives you more fine-grained permission control).
Flash it with Odin or under Linux:
Code:
heimdall flash --18 XXALJL-rooted.boot.img
WARNING: contrary to the system.img root method, this WILL increase your download count!
EDIT: in fact it would be better to simply dd the img file into mmcblk0p20, should not increase the download count.
Be careful, this also disables auto updates (now it says the device has been modified, and won't allow OTA updating).
xd.bx said:
Be careful, this also disables auto updates (now it says the device has been modified, and won't allow OTA updating).
Click to expand...
Click to collapse
are you tested if work with custom recovery ?
xd.bx said:
This boot.img, attached, provides a root shell directly over adb. It is a simple modification of the stock XXALJL boot.img and could be useful for ROM developers who need to adb remount frequently, while still using the stock boot/kernel. I do not recommend this method for users in general since it is very insecure (SuperUser gives you more fine-grained permission control).
Flash it with Odin or under Linux:
Code:
heimdall flash --18 XXALJL-rooted.boot.img
WARNING: contrary to the system.img root method, this WILL increase your download count!
Click to expand...
Click to collapse
I just dumped your image and....
Forgive for being i bit confused but in order to have a rooted Insecure image don't you need to set ro.secure=0?
This your Default.prop dumped from your image
Code:
ro.secure=1
ro.allow.mock.location=0
ro.debuggable=0
persist.service.adb.enable=1
Also why is there no root binarys in the image?
So, as far as i can see the only thing this image will do is increase you binary count, nothing else.
If im wrong i apologize in advance.
faria said:
So, as far as i can see the only thing this image will do is increase you binary count, nothing else.
If im wrong i apologize in advance.
Click to expand...
Click to collapse
I did try setting ro.secure to 0 but it didn't work. So I simply patched the setuid/setgid arm instructions inside adbd so that it never drops its privileges, no matter what. (it's very straightforward to do with objdump+a hex editor).
spawk said:
are you tested if work with custom recovery ?
Click to expand...
Click to collapse
I haven't, no.
xd.bx said:
I did try setting ro.secure to 0 but it didn't work. So I simply patched the setuid/setgid arm instructions inside adbd so that it never drops its privileges, no matter what. (it's very straightforward to do with objdump+a hex editor).
Click to expand...
Click to collapse
I see,
I believe that the best way to achieve what you want is to split the boot image ,then dump the the ram disk, edit its contents then rebuild the image.
I have wrote a linux script that does all of that if you are interested .
faria said:
I see,
I believe that the best way to achieve what you want is to split the boot image ,then dump the the ram disk, edit its contents then rebuild the image.
I have wrote a linux script that does all of that if you are interested .
Click to expand...
Click to collapse
Thanks, indeed I am. BTW I just realized it would be much better to root through system.img and then flash by using dd into mmcblk0p20. This way the download count should stay the same.
xd.bx said:
Thanks, indeed I am. BTW I just realized it would be much better to root through system.img and then flash by using dd into mmcblk0p20. This way the download count should stay the same.
Click to expand...
Click to collapse
Our current method of rooting, using the System image does not increase the binary count.
Here is the script
You will need the abootimg tools installed in linux.
unzip the package ,delete everything inside the folder except the unpack file.
Copy the boot.img to the folder.
double click on the unpack file and launch as terminal
Follow the instructions in terminal window.

[Q] How to Extract data from .Backup file ? - Created with android system recovery

I Backup-ed my Acer tab b1-A71 using android system recovery - Just like CWM.
The file name ends with .Backup, and i wanted to extract some files from it..
How to Extract data from .Backup file ? - Created with android system recovery
looking for the same
reena0307 said:
I Backup-ed my Acer tab b1-A71 using android system recovery - Just like CWM.
The file name ends with .Backup, and i wanted to extract some files from it..
How to Extract data from .Backup file ? - Created with android system recovery
Click to expand...
Click to collapse
me too looking for the same thing ..how to extract from or decompile .backup file which we get thru recovery.
hi loverboyritesh :: i and you are in same position.. but some advaaanced users are here that we are telling rumors and lies.. dont worry bro.. even i'm trying to get solution.. will tel you after geeing one.. Still no one can tell me hoe to extract .BACKUP file..
same
i am looking for how to reinstall .backup myself so i can have my original rom install.
but i have notice my .backup is 700+mb while custom rom is 200+mb
do you know how to?
reena0307 said:
I Backup-ed my Acer tab b1-A71 using android system recovery - Just like CWM.
The file name ends with .Backup, and i wanted to extract some files from it..
How to Extract data from .Backup file ? - Created with android system recovery
Click to expand...
Click to collapse
same here. dunno how to open and extract the files from a .backup file. hoping you know already
siiingkeeet said:
same here. dunno how to open and extract the files from a .backup file. hoping you know already
Click to expand...
Click to collapse
Nope.. Still i'm having that file but no one knew
reena0307 said:
Nope.. Still i'm having that file but no one knew
Click to expand...
Click to collapse
been searching for 5 days now :<
not a single answer found on google and forums
cant even post a new thread yet. just joined
hope someone will drop by this thread
still no solution?
got same problem here
Got a bootloop issue with an ASUS MeMo Pad 7 HD and I've booted in recovery <3e> to make a backup.
I've got a userdata_YYYYMMDD_HHMMSS.backup. I tried opening it with a bunch of tools like unyaffs, abe (Android backup extractor), going live on the file using linux tools (open as 7zip, zip, rar, tar, tar.gz, gz, bz2 , mount as iso, ext4 and so on....)
Still no luck :-/
Only clue is that the file seems compressed. During the backup under recovery, it told me 3600MB to backup and the file userdata_xxxxxxxx_xxxxxx.backup show only 2.61GB
I did this backup 3 time to ensure there were no corruption during the write process from the pad and did again the same "tests" to open the file...Not better.
If any dev' have any clue of the file format, I'd be glad to help
It doesn't seem to be a valid unix img file. Tried mounting it to no avail. When it's restored by the recovery it also extracts the individual files because i fails on one in my case and stops the entire restore... I tried unzipping it, changed extension to ,jar, .tar, .zip, etc., none of them are recognised...amazing for a standard android feature to find so little info about it
Any solution?
I called Alcatel's technical service today and they told me that you can use the backup file only from the phone. Mine gives me the following error when I try to restore it: Error Magic header
If anyone knows how to unpack the backup file I would be more than grateful.
It's a 512 byte header in front of a "tar.gz"
hexdump -C userdata_xxxxxxxx_yyyyyy.backup | less​showed the magical zip header "1f8b0800 00000000" at offset 0x200
So, skipping 512 bytes, the rest can be gunzip | tar
dd if=userdata_xxxxxxxx_yyyyyy.backup bs=512 skip=1 | gunzip -c | tar xv​
Sir ektoric what d u mean on ur post?
Sorry cant understand it..
Can u please d a step by step procedure? Please...pls...plss
Thanks in advance...
Steps?
@ektoric sir im a noob in this... Can u show a step by step procedure?
@killen00 sorry, I assume you have a linux machine (or have access to one). The command is actually all there is to it.
Code:
dd if=userdata_xxxxxxxx_yyyyyy.backup bs=512 skip=1 | gunzip -c | tar xv
If you don't have a linux machine available, might I suggest one of the many distros of your choice, most of which have LiveCDs which you can run without installing.
script for gunzip method
maybe on xda it is common sense, but for me it was necessary to know, that these stock android recovery extracted files can be restored with nandroid custom recovery, if you simply repack them into tar archive.
i put this two command lines in a dirty shell script (extract + repack as tar).
thanks to ektoric figuring out his gunzip method!
edit: notamamasboy's mount method added (but not tested yet). if script not works come back few days later, download again and check version, maybe it has changed meanwhile.
with this you're able to transfer data of non-rooted phone to (rooted) similar one.
this is useful in case touchscreen is broken, you haven't custom recovery installed, usb-debugging is disabled and connecting usb-otg-mouse doesn't work.
tested on my Archos 50 b Oxygen (Mediatek MT6582).
it works for me, feel free to improve, port to busybox and publish. no support. use at own risk.
edit: bckp2cwm.sh is deprecated it is FOR JELLY BEAN ONLY (no selinux support)
a newer (selinux) version bckp2win.sh for TWRP you can find here:
http://forum.xda-developers.com/showthread.php?t=3775129
How did you go about determining the magic number found at 0x200? My hexdump output does not have that magic number (1f 8b) in any instance. Leads me to believe my backup is not a tar file. Any suggestions then?
@notamamasboy, you are unfortunately correct.
Someone else also mentioned that their
Code:
userdata_xxxxxxxx_yyyyyy.backup
file was not of the same format I tried some "known magic headers", and could not find anything tell-tale. In which case, without some clues, you are back at square one.
ektoric said:
@notamamasboy, you are unfortunately correct.
Someone else also mentioned that their
Code:
userdata_xxxxxxxx_yyyyyy.backup
file was not of the same format I tried some "known magic headers", and could not find anything tell-tale. In which case, without some clues, you are back at square one.
Click to expand...
Click to collapse
Even more peculiarly, two backups were created a .backup and a .backup2, I wonder if combining with cat I can get somewhere...

[Q] Build system.img or Update.zip from OTA package

The situation:
System partition has been wiped, would like to restore it using OTA.zip available from OEM
What I have
Access to fastboot and adb sideload in stock recovery
OTA zip package from OEM
What I have tried and my background
I have been on the client side of mods\recoveries\dev for android platforms on various devices for 4-5 years. I'm capable with Linux, and self teach quickly, I know just enough to get myself into trouble at the moment(hence the trouble I'm in).
1. I have tried to convert the system data in the OEM package to a yaffs etx4 style .img and send via fastboot, but I get "Invalid sparse file format at header magi" this led down a road to a tool called sparse converter that compressed the img into smaller parts, but then I get a more generic error "FAILED (remote: flash_cmds error!) For giggles , even know I know this would have been useless even if it had worked I tried it with the stock SDK 4.4.2 system.img just to see if I could fastboot any system files, same result.
2. So then I thought perhaps I could go the ADB side-load approach, first I tried just sending over the provided OTA zip package, but I get an error on the device after if finishes transferring "end of footer from /tmp/update.zip not 0xffff (file exists)" and "Signature verification failed" this led me to using a tool called "UpdatezipCreator" to generate a zip with the system files and sign the package, this also was a dead end.
So i'm turning to the wisdom and experience of XDA for some guidance, I'm willing to put in the leg work, I just need some direction.
TF103C Update
A couple of things. Im having the same issues with creating a yaffs ext4 .img and have the same error when i got to flash the image. Intel actually has a repo some place for bay trail (with bay lake included) device setup (https://01.org/android-ia). I did the same thing you did with AOSP and as expected it tries to boot but fails and boot loops.
I have however been able to flash the update.zip that is on the Asus website through recovery. First question did you unzip the the first zip file? The zip that is the link contains another zip which is the one you upload and update (sideload worked for me).
Im wondering if you can help me out too. I got an OTA about a day ago and hit the back button but it decided to update anyway. The tablet rebooted and just flashed a red bar at me then turned off. I can get to the droidboot to load images but I cant boot into recovery and im not sure why. Ive tried using the zenRoot recoveries that were used for rooting, but no luck. Booting to system or recovery produces a red bar and turns off. Do you by chance have a recovery I could try? Thanks.
Hope that was helpful.
Eclipse00 said:
The situation:
System partition has been wiped, would like to restore it using OTA.zip available from OEM
What I have
Access to fastboot and adb sideload in stock recovery
OTA zip package from OEM
What I have tried and my background
I have been on the client side of mods\recoveries\dev for android platforms on various devices for 4-5 years. I'm capable with Linux, and self teach quickly, I know just enough to get myself into trouble at the moment(hence the trouble I'm in).
1. I have tried to convert the system data in the OEM package to a yaffs etx4 style .img and send via fastboot, but I get "Invalid sparse file format at header magi" this led down a road to a tool called sparse converter that compressed the img into smaller parts, but then I get a more generic error "FAILED (remote: flash_cmds error!) For giggles , even know I know this would have been useless even if it had worked I tried it with the stock SDK 4.4.2 system.img just to see if I could fastboot any system files, same result.
2. So then I thought perhaps I could go the ADB side-load approach, first I tried just sending over the provided OTA zip package, but I get an error on the device after if finishes transferring "end of footer from /tmp/update.zip not 0xffff (file exists)" and "Signature verification failed" this led me to using a tool called "UpdatezipCreator" to generate a zip with the system files and sign the package, this also was a dead end.
So i'm turning to the wisdom and experience of XDA for some guidance, I'm willing to put in the leg work, I just need some direction.
Click to expand...
Click to collapse
I have the same problem, keysersoza42. I did a "fastboot wipe system" and now I only have access to fastboot. Just need to find a way to put system back
keysersoza42 said:
I have however been able to flash the update.zip that is on the Asus website through recovery. First question did you unzip the the first zip file? The zip that is the link contains another zip which is the one you upload and update (sideload worked for me).
Click to expand...
Click to collapse
Can you please tell me the exact steps you used to get sideload to work? I have the same problem as Eclipse00 : "after if finishes transferring "end of footer from /tmp/update.zip not 0xffff (file exists)" and "Signature verification failed""
Asus TF103C update.zip
UPDATE: Link to system.img
goo.gl/Oz2X7o
Honestly all i did was follow the normal steps to do a side load. One thing to make sure of is that you have the correct version of the firmware; BBY, WW, etc. When you first download it it is a Zip file in a zip file so the second one is the one you need to side load. To step this out:
1) Download from Asus the correct update. If you dont know which version you have you can boot into the bootloader and one of the versions will say BBY, WW, etc...
2) Unzip the contents of the download from Asus. This should be another zip file.
3) Boot into recovery. If you get the 'dead android' press and hold vol down for about 5 seconds then press vol up.
4) In recovery enter sideload mode
5) adb sideload innerUpdate.zip file (the zip file you unzipped from the downloaded file).
6) works???
This is what worked for me. The other option is to fastboot a system.img. This is hard b\c Asus doesnt release them and when i dd'ed a system image off of the partition it wouldn't load. I did however find a way to get a system image on there through fastboot. If it comes down to this let me know and ill post more on it. Good luck!
RaVe-N said:
Can you please tell me the exact steps you used to get sideload to work? I have the same problem as Eclipse00 : "after if finishes transferring "end of footer from /tmp/update.zip not 0xffff (file exists)" and "Signature verification failed""
Click to expand...
Click to collapse
---------- Post added at 08:55 PM ---------- Previous post was at 08:36 PM ----------
Sorry this is old, but just a couple of weeks ago i got the fastboot system.img to load. Here are the steps I did to produce this.
Some times its helpful to unpack a system image and/or repack to be flashed to an android device. For example the Asus tf103c required special compressing for parsing.
Tools you will need:
simg2img
make_ext4fs
Windows
SparseConverter_1.0.0.exe
Note: There were system.img files that were pulled directly from a rooted device using dd. These images would always give an error (flash_cmds_error!) while trying to write the image even if it had been compressed. The only way I got around this was to mount and unpack an image known to flash correctly (in my case the Intel BayTrail image from the intel android repo). The replace the contents with what every you wish to be in there (in my case the system folder from the Asus update.zip). The limitation here is you are limited to the size of the original flashable .img. Usually you can remove odex files to get around this and push those later if needed.
For the Asus images the NFC was removed from the list of features b\c it didnt have NFC which resulted in the settings app to crash during onCreate. These files were removed from the system directory.
/system/etc/permission/*.nfc*
Step-by-step guide
Steps 1-6 may be done in linux but step 7 and 11-15 must be done in windows.
In your workspace create a dir. mkdir sys
./simg2img system.img sys.raw
If you get : "Invalid sparse file format at header magi Failed to read sparse file"
You must decompress the image first with SparseConverter.
go to step 9 except replace 14 with this: SparseConverter.exe /decompress [.img to decompress] [.img to write to] then return to this step and continue.
SparseConverter.exe /decompress E:\system.img_sparsechunk1 D:\system.img
sudo mount -t ext4 -o loop sys.raw sys/
sudo ./make_ext4fs -s -l 1638M -a system new.img sys/
Note: The size needs to change depending on how big of an im age it is.
You may try to push the image as is, but if you get a "Invalid Sparse File Format At Header Magi" you have a compression error in the system image and can not be separated properly.
In windows open a command prompt window
Navigate to the SparseConverter_1.0.0.exe
SparseConverter.exe /compress [.img to compress] [.img to write to] [size in MB]
SparseConverter.exe /compress D:\system.img E:\ 256MB
Good Luck!
AndroidDestoryer said:
I have the same problem, keysersoza42. I did a "fastboot wipe system" and now I only have access to fastboot. Just need to find a way to put system back
Click to expand...
Click to collapse
Thanks.
I think the reason sideload isn't working is that my OTA update version is higher than the version downloadable as a zip...
Those are the steps I followed but it just doesn't work.
What exactly is the system image file you have linked to? Has it already gone through all the steps mentioned below? Is it plain old AOSP?
Thanks for all the help.
keysersoza42 said:
UPDATE: Link to system.img
goo.gl/Oz2X7o
Honestly all i did was follow the normal steps to do a side load. One thing to make sure of is that you have the correct version of the firmware; BBY, WW, etc. When you first download it it is a Zip file in a zip file so the second one is the one you need to side load. To step this out:
1) Download from Asus the correct update. If you dont know which version you have you can boot into the bootloader and one of the versions will say BBY, WW, etc...
2) Unzip the contents of the download from Asus. This should be another zip file.
3) Boot into recovery. If you get the 'dead android' press and hold vol down for about 5 seconds then press vol up.
4) In recovery enter sideload mode
5) adb sideload innerUpdate.zip file (the zip file you unzipped from the downloaded file).
6) works???
This is what worked for me. The other option is to fastboot a system.img. This is hard b\c Asus doesnt release them and when i dd'ed a system image off of the partition it wouldn't load. I did however find a way to get a system image on there through fastboot. If it comes down to this let me know and ill post more on it. Good luck!
---------- Post added at 08:55 PM ---------- Previous post was at 08:36 PM ----------
Sorry this is old, but just a couple of weeks ago i got the fastboot system.img to load. Here are the steps I did to produce this.
Some times its helpful to unpack a system image and/or repack to be flashed to an android device. For example the Asus tf103c required special compressing for parsing.
Tools you will need:
simg2img
make_ext4fs
Windows
SparseConverter_1.0.0.exe
Note: There were system.img files that were pulled directly from a rooted device using dd. These images would always give an error (flash_cmds_error!) while trying to write the image even if it had been compressed. The only way I got around this was to mount and unpack an image known to flash correctly (in my case the Intel BayTrail image from the intel android repo). The replace the contents with what every you wish to be in there (in my case the system folder from the Asus update.zip). The limitation here is you are limited to the size of the original flashable .img. Usually you can remove odex files to get around this and push those later if needed.
For the Asus images the NFC was removed from the list of features b\c it didnt have NFC which resulted in the settings app to crash during onCreate. These files were removed from the system directory.
/system/etc/permission/*.nfc*
Step-by-step guide
Steps 1-6 may be done in linux but step 7 and 11-15 must be done in windows.
In your workspace create a dir. mkdir sys
./simg2img system.img sys.raw
If you get : "Invalid sparse file format at header magi Failed to read sparse file"
You must decompress the image first with SparseConverter.
go to step 9 except replace 14 with this: SparseConverter.exe /decompress [.img to decompress] [.img to write to] then return to this step and continue.
SparseConverter.exe /decompress E:\system.img_sparsechunk1 D:\system.img
sudo mount -t ext4 -o loop sys.raw sys/
sudo ./make_ext4fs -s -l 1638M -a system new.img sys/
Note: The size needs to change depending on how big of an im age it is.
You may try to push the image as is, but if you get a "Invalid Sparse File Format At Header Magi" you have a compression error in the system image and can not be separated properly.
In windows open a command prompt window
Navigate to the SparseConverter_1.0.0.exe
SparseConverter.exe /compress [.img to compress] [.img to write to] [size in MB]
SparseConverter.exe /compress D:\system.img E:\ 256MB
Good Luck!
Click to expand...
Click to collapse
Versions and system.img
Oh yeah i forgot about that. If you are ahead of the update then it will reject the load. Last i checked there was an "2.0.33.80" and a "2.0.33.101" on the asus website. I think 101 is 4.4.4, but not 100% sure on that.
The system.img is a stock image of the ASUS TF103C. It has no NFC b\c the device does not have NFC and if you leave some of the files in there the settings app will crash b\c it thinks its a feature it should find. The version should be "80" or 4.4.2. This will load regardless of the version that is currently loaded since you are loading it through the bootloader. I have tried this on both the WW and BBY versions and it worked. It has already gone through the steps i listed below.
RaVe-N said:
Thanks.
I think the reason sideload isn't working is that my OTA update version is higher than the version downloadable as a zip...
Those are the steps I followed but it just doesn't work.
What exactly is the system image file you have linked to? Has it already gone through all the steps mentioned below? Is it plain old AOSP?
Thanks for all the help.
Click to expand...
Click to collapse
Thanks mate.
I'll give it a whirl tonight and see how it goes. I should just be able to use "fastboot flash system system.img" correct?
keysersoza42 said:
Oh yeah i forgot about that. If you are ahead of the update then it will reject the load. Last i checked there was an "2.0.33.80" and a "2.0.33.101" on the asus website. I think 101 is 4.4.4, but not 100% sure on that.
The system.img is a stock image of the ASUS TF103C. It has no NFC b\c the device does not have NFC and if you leave some of the files in there the settings app will crash b\c it thinks its a feature it should find. The version should be "80" or 4.4.2. This will load regardless of the version that is currently loaded since you are loading it through the bootloader. I have tried this on both the WW and BBY versions and it worked. It has already gone through the steps i listed below.
Click to expand...
Click to collapse
fastboot
Yes that is correct and in the bootloader.
Did you give this a try? Did it work?
RaVe-N said:
Thanks mate.
I'll give it a whirl tonight and see how it goes. I should just be able to use "fastboot flash system system.img" correct?
Click to expand...
Click to collapse
keysersoza42 said:
Yes that is correct and in the bootloader.
Did you give this a try? Did it work?
Click to expand...
Click to collapse
YES! Thanks so much! had to fastboot erase cache and data as well but it works!
Cheers!
keysersoza42 said:
Yes that is correct and in the bootloader.
Did you give this a try? Did it work?
Click to expand...
Click to collapse
Hi again.
So after a couple of days usage I've noticed a few things...
There appears to be no camera driver. The camera app just complains that you need to have a camera to use it...
Also some things that used to work don't anymore: So far I've noticed the Google Inbox app doesn't work, and any dosbox app doesn't work. They just FC.
Should I retry again, maybe redo the factory reset. Maybe wipe the data partition from fastboot?
Camera and other crashes
Ill have to take a look at it. I hadnt used any of those so ill have to checkout it out. Ill try to get some time this week.
RaVe-N said:
Hi again.
So after a couple of days usage I've noticed a few things...
There appears to be no camera driver. The camera app just complains that you need to have a camera to use it...
Also some things that used to work don't anymore: So far I've noticed the Google Inbox app doesn't work, and any dosbox app doesn't work. They just FC.
Should I retry again, maybe redo the factory reset. Maybe wipe the data partition from fastboot?
Click to expand...
Click to collapse
Same issue
Hi guys,
Just noticed this thread, and gave the uploaded system.img a try using fastboot command.
It gives me the error that the system img cannot exceed a certain amount of bytes (500 mb'ish)
any tips?
Brick3d said:
Hi guys,
Just noticed this thread, and gave the uploaded system.img a try using fastboot command.
It gives me the error that the system img cannot exceed a certain amount of bytes (500 mb'ish)
any tips?
Click to expand...
Click to collapse
Try this: http://forum.xda-developers.com/showpost.php?p=60638910&postcount=78
RaVe-N said:
Try this: http://forum.xda-developers.com/showpost.php?p=60638910&postcount=78
Click to expand...
Click to collapse
If you need to unbrick your tablet, have a look at my simple guide here!
http://forum.xda-developers.com/android/help/comprehensive-guide-unbricking-asus-t3106719
keysersoza42 said:
Asus TF103C update.zip
UPDATE: Link to system.img
goo.gl/Oz2X7o
Honestly all i did was follow the normal steps to do a side load. One thing to make sure of is that you have the correct version of the firmware; BBY, WW, etc. When you first download it it is a Zip file in a zip file so the second one is the one you need to side load. To step this out:
1) Download from Asus the correct update. If you dont know which version you have you can boot into the bootloader and one of the versions will say BBY, WW, etc...
2) Unzip the contents of the download from Asus. This should be another zip file.
3) Boot into recovery. If you get the 'dead android' press and hold vol down for about 5 seconds then press vol up.
4) In recovery enter sideload mode
5) adb sideload innerUpdate.zip file (the zip file you unzipped from the downloaded file).
6) works???
This is what worked for me. The other option is to fastboot a system.img. This is hard b\c Asus doesnt release them and when i dd'ed a system image off of the partition it wouldn't load. I did however find a way to get a system image on there through fastboot. If it comes down to this let me know and ill post more on it. Good luck!
---------- Post added at 08:55 PM ---------- Previous post was at 08:36 PM ----------
Sorry this is old, but just a couple of weeks ago i got the fastboot system.img to load. Here are the steps I did to produce this.
Some times its helpful to unpack a system image and/or repack to be flashed to an android device. For example the Asus tf103c required special compressing for parsing.
Tools you will need:
simg2img
make_ext4fs
Windows
SparseConverter_1.0.0.exe
Note: There were system.img files that were pulled directly from a rooted device using dd. These images would always give an error (flash_cmds_error!) while trying to write the image even if it had been compressed. The only way I got around this was to mount and unpack an image known to flash correctly (in my case the Intel BayTrail image from the intel android repo). The replace the contents with what every you wish to be in there (in my case the system folder from the Asus update.zip). The limitation here is you are limited to the size of the original flashable .img. Usually you can remove odex files to get around this and push those later if needed.
For the Asus images the NFC was removed from the list of features b\c it didnt have NFC which resulted in the settings app to crash during onCreate. These files were removed from the system directory.
/system/etc/permission/*.nfc*
Step-by-step guide
Steps 1-6 may be done in linux but step 7 and 11-15 must be done in windows.
In your workspace create a dir. mkdir sys
./simg2img system.img sys.raw
If you get : "Invalid sparse file format at header magi Failed to read sparse file"
You must decompress the image first with SparseConverter.
go to step 9 except replace 14 with this: SparseConverter.exe /decompress [.img to decompress] [.img to write to] then return to this step and continue.
SparseConverter.exe /decompress E:\system.img_sparsechunk1 D:\system.img
sudo mount -t ext4 -o loop sys.raw sys/
sudo ./make_ext4fs -s -l 1638M -a system new.img sys/
Note: The size needs to change depending on how big of an im age it is.
You may try to push the image as is, but if you get a "Invalid Sparse File Format At Header Magi" you have a compression error in the system image and can not be separated properly.
In windows open a command prompt window
Navigate to the SparseConverter_1.0.0.exe
SparseConverter.exe /compress [.img to compress] [.img to write to] [size in MB]
SparseConverter.exe /compress D:\system.img E:\ 256MB
Good Luck!
Click to expand...
Click to collapse
the link to system.img is not working

Sailfish OS on X

Instructions:
https://jolla.com/sailfishxinstall/
Download:
http://images.devaamo.fi/sfe/suzu/
thanks to all the guys that worked on this port.
Kernel source:
https://github.com/mer-hybris/android_kernel_sony_msm
This make_ext4fs works for flashing on macOS
For some reason with this build the system-icons vanish for me after restarting the device once :/
I had much better results using this build.
Also by default (at least with the image I linked) only two of the 6 cpu-cores are enabled. To fix that one must add this under the init-section of the /init.loire.pwr.rc file and reboot (All credit for this go to abranson from the #sailfishos-porters irc).
Thanks for this port! are you planning to continue building for Xperia X or is a test build before official release?
Enviado desde mi F5121 mediante Tapatalk
keep going till then, also ive updated the above link
how flash it?
FuLiterary said:
how flash it?
Click to expand...
Click to collapse
read the first post
FuLiterary said:
how flash it?
Click to expand...
Click to collapse
make sure when you are flashing sailfish support only F5121 and does not support sdxc
Hello, friend! I am a Chinese user, I do not understand the tutorial, there is no mor
Jozinek said:
so only Linux or MacOS too?
Click to expand...
Click to collapse
Flashing works on macOS too. You just need to use the make_ext4fs I linked instead of the one linked on top.
janeliang34 said:
Hello, friend! I am a Chinese user, I do not understand the tutorial, there is no mor
Click to expand...
Click to collapse
extract the tar, open a terminal inside the extracted folder and run ./flash.sh
One question. Zip file with AOSP should be moved intact or only vendor folder from inside it?
Seems it has to be whole .zip.
Jozinek said:
i never make something like this in MacOS (i have Macbook Air, but also with Windows), can you write step by step how to make it. This is something totally new for me (i flashed hundreds of XPERIA smartphones, i have Emma tool, but never try this...)
Click to expand...
Click to collapse
Sure thing
First of all your bootloader needs to be unlocked. I'm assuming you already did that but if not you should read about backuping your drm-keys because otherwise they can't be recovered after unlocking your bootloader unless you do that.
If you don't have fastboot installed yet follow this guide.
After that download the first file linked at the top of this thread.
Unpack the archive (if you can't open it I recommend "the unarchiver" from the app-store).
Place both this file and the zip from the third link at the top in the unpacked folder (in the path where the flash.sh is). Don't unpack the .zip file!
After that open a terminal and navigate to your unpacked folder (if you don't know how to do that google for "terminal tutorial mac").
Run
Code:
chmod +x flash.sh
chmod +x make_ext4fs
to mark the flash-script and the make_ext4fs-file as executable.
Boot your device into fastboot mode (hold volume up while it's turned off and plug in your usb-cable) and finally run
Code:
./flash.sh
to install sailfishOS on the device.
If there is a "hybris-recovery.img" file in the directory (can't quite remember if that's the case with this build) also run
Code:
fastboot flash recovery hybris-recovery.img
to install a sailfishOS specific recovery.
After that you can reboot your device and enjoy Sailfish OS
@Jozinek
You didn't unpack the .tar.bz, inside are all files needed to flash. Than You have to move make_ext4fs, AOSP.zip and flash.fs into created (by unpacking) folder and start/cd Terminal there.
Jozinek said:
Edit3 - it worked now, it was bad make_ext4fs, thanks all of you
Click to expand...
Click to collapse
So that means you are doing a review on YouTube, right?
Friend, is there a tutorial for Windows installation? To be more detailed, this is my first contact
janeliang34 said:
Friend, is there a tutorial for Windows installation? To be more detailed, this is my first contact
Click to expand...
Click to collapse
Right now there is no windows support. The final build (which will be officially sold by Jolla) will make windows-installation possible.
If you know your way around cygwin you could probably get it to flash using windows (other than the flash.sh script there's nothing *nix-exclusive).
Is the rom stable enough for daily use ? and is Alien Dalvik available in this rom to run Android apps ?
no android dalvik or any software that needs license, this version is just community version like aosp without play store.
when flashing there's error make_ext4fs: no such file or directory, when i use the second one there's error: wrong exec format

Extract boot image from payload.bin on Android?

Is there any kind of tool FOR Android that can extract a boot image from a payload.bin? Or do you basically need a PC for the task? I do it all the time from my desktop, but a tool to do it on my phone itself would be super convenient if it exists somewhere. Thanks guys!
H4X0R46 said:
Is there any kind of tool FOR Android that can extract a boot image from a payload.bin? Or do you basically need a PC for the task? I do it all the time from my desktop, but a tool to do it on my phone itself would be super convenient if it exists somewhere. Thanks guys!
Click to expand...
Click to collapse
There's a high likelihood that Termux can do it. If you have a payload.bin that you can link me I'll try it. I think it can run these python scripts assuming there's nothing wrong with them.
https://github.com/cyxx/extract_android_ota_payload
Spaceminer said:
There's a high likelihood that Termux can do it. If you have a payload.bin that you can link me I'll try it. I think it can run these python scripts assuming there's nothing wrong with them.
https://github.com/cyxx/extract_android_ota_payload
Click to expand...
Click to collapse
Here's a download link for the latest OxygenOS build for a OnePlus 7 Pro: https://www.oneplus.com/support/softwareupgrade/details?code=PM1574156267635
I tried to run the python script with Termux, it said it couldn't execute the script, permission was denied. I granted it superuser too. Try it out, I may have done it wrong. Thanks man! [emoji16]
EDIT: You'll have to extract the payload.bin, that link is to a full flashable rom zip.
H4X0R46 said:
Here's a download link for the latest OxygenOS build for a OnePlus 7 Pro: https://www.oneplus.com/support/softwareupgrade/details?code=PM1574156267635
I tried to run the python script with Termux, it said it couldn't execute the script, permission was denied. I granted it superuser too. Try it out, I may have done it wrong. Thanks man! [emoji16]
EDIT: You'll have to extract the payload.bin, that link is to a full flashable rom zip.
Click to expand...
Click to collapse
I think I know what happened. Was the file on an sdcard? Because scripts can't run there, and I totally forgot about that. You normally have to copy the file into termux's home location. /data/data/com.termux/files/home If you get permission denied there, then change the group owner, and user to what's in the screen shot and it'll work. You can avoid that situation entirely though, by downloading the file directly into Termux's home folder using wget. For those scripts to run you'll need to install python and protobuf too. From termux run, (without root), pkg install protobuf & pkg install python.
I'm going to try extracting that. Downloading it now.
Edit: I tried but I can't get it to work. The scripts error out because it's expecting some kind of info from Google. I tried adjusting the metainfo structure to match a pixel device and it got further into the process, but it still gives an error. What do you use on pc? I might be able to port it to Termux.
Spaceminer said:
I think I know what happened. Was the file on an sdcard? Because scripts can't run there, and I totally forgot about that. You normally have to copy the file into termux's home location. /data/data/com.termux/files/home If you get permission denied there, then change the group owner, and user to what's in the screen shot and it'll work. You can avoid that situation entirely though, by downloading the file directly into Termux's home folder using wget. For those scripts to run you'll need to install python and protobuf too. From termux run, (without root), pkg install protobuf & pkg install python.
I'm going to try extracting that. Downloading it now.
Edit: I tried but I can't get it to work. The scripts error out because it's expecting some kind of info from Google. I tried adjusting the metainfo structure to match a pixel device and it got further into the process, but it still gives an error. What do you use on pc? I might be able to port it to Termux.
Click to expand...
Click to collapse
Thanks for testing this out, sorry for the late reply, life's been hectic. The tool I USUALLY use for WIndows is payload dumper 64. I'll link it here.
Link: https://androidfilehost.com/?fid=818070582850510260

Categories

Resources