Hello guys!
As I wrote on other threads, these some tools that I wrote in order to download, extract and flash the firmware of the NP1 via fastboot. Check them out! And feel free to contribute!
GitHub - sh4tteredd/nothing-phone-1-tools: A collection of scripts and stuff for the Nothing's first phone!
A collection of scripts and stuff for the Nothing's first phone! - GitHub - sh4tteredd/nothing-phone-1-tools: A collection of scripts and stuff for the Nothing's first phone!
github.com
good
i will try , i wish to fix my NP1
Nothing firmware downloader by @sh4ttered V1.1.0
Do you need the [G]lobal firmware or the [E]uropean firmware (G/E)? G
Downloading the global firmware 1.1.0
This may take a way depending on your internet speed
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 40 100 40 0 0 63 0 --:--:-- --:--:-- --:--:-- 64
[fw.zip]
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of fw.zip or
fw.zip.zip, and cannot find fw.zip.ZIP, period.
2022/08/10 19:46:45 File does not exist: payload.bin
mv: rename extracted*/* to images/*: No such file or directory
cleaning...
rm: payload_properties.txt: No such file or directory
rm: payload.bin: No such file or directory
rm: apex_info.pb: No such file or directory
rm: care_map.pb: No such file or directory
sh4tteredd said:
Hello guys!
As I wrote on other threads, these some tools that I wrote in order to download, extract and flash the firmware of the NP1 via fastboot. Check them out! And feel free to contribute!
GitHub - sh4tteredd/nothing-phone-1-tools: A collection of scripts and stuff for the Nothing's first phone!
A collection of scripts and stuff for the Nothing's first phone! - GitHub - sh4tteredd/nothing-phone-1-tools: A collection of scripts and stuff for the Nothing's first phone!
github.com
Click to expand...
Click to collapse
i know its a stupid question, how do i install the androud platform tools, all i can find are zip files with bat files and other files, but no installer
aBsolute_Blue said:
i know its a stupid question, how do i install the androud platform tools, all i can find are zip files with bat files and other files, but no installer
Click to expand...
Click to collapse
OS?
bottom said:
good
i will try , i wish to fix my NP1
Nothing firmware downloader by @sh4ttered V1.1.0
Do you need the [G]lobal firmware or the [E]uropean firmware (G/E)? G
Downloading the global firmware 1.1.0
This may take a way depending on your internet speed
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 40 100 40 0 0 63 0 --:--:-- --:--:-- --:--:-- 64
[fw.zip]
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of fw.zip or
fw.zip.zip, and cannot find fw.zip.ZIP, period.
2022/08/10 19:46:45 File does not exist: payload.bin
mv: rename extracted*/* to images/*: No such file or directory
cleaning...
rm: payload_properties.txt: No such file or directory
rm: payload.bin: No such file or directory
rm: apex_info.pb: No such file or directory
rm: care_map.pb: No such file or directory
Click to expand...
Click to collapse
Just found out that androidfilehost (that is where it's hosted the nothingOS) change the link of the files every ~24h. Fixing in a while!
sh4tteredd said:
OS?
Click to expand...
Click to collapse
windows 7-8-10-11, either one that works
i can also boot into linux/ubuntu, but i´d be lost there
aBsolute_Blue said:
windows 7-8-10-11, either one that works
i can also boot into linux/ubuntu, but i´d be lost there
Click to expand...
Click to collapse
im really sorry, im a bit slow mentally, i do my best. you ment the os im using? mainly win11, but it depends on what i want to do, and doing stuff with android and that is all new to me, probably why i bricked my phone to be stuck in fastbootd and bootloader
aBsolute_Blue said:
windows 7-8-10-11, either one that works
i can also boot into linux/ubuntu, but i´d be lost there
Click to expand...
Click to collapse
I'm actually developing the tool for Windows, but you can always do it manually. Install this https://forum.xda-developers.com/t/...fastboot-installer-latest-sdk-update.3516898/ , then download the firmware that you need and follow this guide https://forum.xda-developers.com/t/...one-1-update-04-08-2022.4470155/post-87230593 . You'll need to know how to open the cmd but believe me it's not that difficult
sh4tteredd said:
I'm actually developing the tool for Windows, but you can always do it manually. Install this https://forum.xda-developers.com/t/...fastboot-installer-latest-sdk-update.3516898/ , then download the firmware that you need and follow this guide https://forum.xda-developers.com/t/...one-1-update-04-08-2022.4470155/post-87230593 . You'll need to know how to open the cmd but believe me it's not that difficult
Click to expand...
Click to collapse
yeah i know how cmd works xD
i tired that guide already, but flashing vendor.img, system.img, odm.img and 2 others i forgot the names of gives out an error, that the partition cant be found, so i figured i give this script here a try, maybe it makes a difference.
bottom said:
good
i will try , i wish to fix my NP1
Nothing firmware downloader by @sh4ttered V1.1.0
Do you need the [G]lobal firmware or the [E]uropean firmware (G/E)? G
Downloading the global firmware 1.1.0
This may take a way depending on your internet speed
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 40 100 40 0 0 63 0 --:--:-- --:--:-- --:--:-- 64
[fw.zip]
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of fw.zip or
fw.zip.zip, and cannot find fw.zip.ZIP, period.
2022/08/10 19:46:45 File does not exist: payload.bin
mv: rename extracted*/* to images/*: No such file or directory
cleaning...
rm: payload_properties.txt: No such file or directory
rm: payload.bin: No such file or directory
rm: apex_info.pb: No such file or directory
rm: care_map.pb: No such file or directory
Click to expand...
Click to collapse
As I already said androidfilehost changes the link. I'm changing the script and after the update you'll have to download the firmware manually and the give it to the script.
aBsolute_Blue said:
yeah i know how cmd works xD
i tired that guide already, but flashing vendor.img, system.img, odm.img and 2 others i forgot the names of gives out an error, that the partition cant be found, so i figured i give this script here a try, maybe it makes a difference.
Click to expand...
Click to collapse
actually I don't think because it's pretty the same but automatized. You'll probably need to wait the EDL tool and firmware
sh4tteredd said:
actually I don't think because it's pretty the same but automatized. You'll probably need to wait the EDL tool and firmware
Click to expand...
Click to collapse
in that case i send it in for replacement/repair. gave the shop a call and i got offered to send it in, have it checked, and only if they would charge me i can still decide. and if i want to get it back without paying, i wouldnt even pay the shipment either way, or it having be checked
would it be possible, that you add a "backup partition" feature to the script also? so everyone with a working phone and root can backup his own partitions... ATM i do this with an app on the phone and transfer it manually to the pc.
HofaTheRipper said:
would it be possible, that you add a "backup partition" feature to the script also? so everyone with a working phone and root can backup his own partitions... ATM i do this with an app on the phone and transfer it manually to the pc.
Click to expand...
Click to collapse
If this is possible, I'll add it ASAP! good idea!
sh4tteredd said:
If this is possible, I'll add it ASAP! good idea!
Click to expand...
Click to collapse
For my Oneplus Nord 2 someome created this: https://forum.xda-developers.com/t/tool-no-root-partitionsbackupper-nandroid-alternative.4366055/
Maybe you could look into this.
without root TWRP is neccesary... with root it should work over adb shell, su... as i used these dd commands already myself to backup several imgs
HofaTheRipper said:
without root TWRP is neccesary... with root it should work over adb shell, su... as i used these dd commands already myself to backup several imgs
Click to expand...
Click to collapse
oh I didn't get the part "with root". I'm pretty sure that with root it's possible, looking forward to add this feature!
bottom said:
good
i will try , i wish to fix my NP1
Nothing firmware downloader by @sh4ttered V1.1.0
Do you need the [G]lobal firmware or the [E]uropean firmware (G/E)? G
Downloading the global firmware 1.1.0
This may take a way depending on your internet speed
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 40 100 40 0 0 63 0 --:--:-- --:--:-- --:--:-- 64
[fw.zip]
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of fw.zip or
fw.zip.zip, and cannot find fw.zip.ZIP, period.
2022/08/10 19:46:45 File does not exist: payload.bin
mv: rename extracted*/* to images/*: No such file or directory
cleaning...
rm: payload_properties.txt: No such file or directory
rm: payload.bin: No such file or directory
rm: apex_info.pb: No such file or directory
rm: care_map.pb: No such file or directory
Click to expand...
Click to collapse
Just fixed it, check it out and let me know!
Same problem..can't download a file [fw.zip]
Nothing firmware downloader by @sh4ttered V1.1.0
Do you need the [G]lobal firmware or the [E]uropean firmware (G/E)? g
Downloading the global firmware 1.1.0
This may take a way depending on your internet speed
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 40 100 40 0 0 66 0 --:--:-- --:--:-- --:--:-- 66
[fw.zip]
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of fw.zip or
fw.zip.zip, and cannot find fw.zip.ZIP, period.
2022/08/10 21:50:35 File does not exist: payload.bin
mv: rename extracted*/* to images/*: No such file or directory
cleaning...
rm: payload_properties.txt: No such file or directory
rm: payload.bin: No such file or directory
rm: apex_info.pb: No such file or directory
rm: care_map.pb: No such file or directory
bottom said:
Same problem..can't download a file [fw.zip]
Nothing firmware downloader by @sh4ttered V1.1.0
Do you need the [G]lobal firmware or the [E]uropean firmware (G/E)? g
Downloading the global firmware 1.1.0
This may take a way depending on your internet speed
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 40 100 40 0 0 66 0 --:--:-- --:--:-- --:--:-- 66
[fw.zip]
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of fw.zip or
fw.zip.zip, and cannot find fw.zip.ZIP, period.
2022/08/10 21:50:35 File does not exist: payload.bin
mv: rename extracted*/* to images/*: No such file or directory
cleaning...
rm: payload_properties.txt: No such file or directory
rm: payload.bin: No such file or directory
rm: apex_info.pb: No such file or directory
rm: care_map.pb: No such file or directory
Click to expand...
Click to collapse
you have to download the new version from github!
Related
Good morning family!
It's my very first time posting in this subforum, but I think this tutorial was actually something needed, since all threads everyone can found while Googling are quite old (like, from the Xperia S times ), and also I'm quite tired of infinite threads like this and this, so...
Today I bring you an extensive and unified guide on how to extract ANY SYSTEM FILE from a FlashTool's Firmware (FTF), whether it's from the userdata.sin or from the system.sin.
Since this is going to be a guide for all OSes, there are some programs you'll need in general,
Latest version available of FlashTools (for SIN dumping purposes).
A reader tool for the extracted image, which can be:
An EXT4 reader / mounter.
An Unyaffs2, if you're using this guide for an old device (like the already mentioned Xperia S, and older).
Some cups of coffee, and lots of patience [IMPORTANT].
But, some of them will be platform specific, so the thread will split in:
2nd post: WINDOWS
3rd post: LINUX
4th post: OSX
Here you've a video tutorial showing the whole process for the 3 OSes:
If you're enjoying it, don't forget to press Thanks button and rate this thread!
WINDOWS GUIDE
Step 1 - Extract the SIN we need
Using your favourite archive manager (WinRAR, 7-Zip, etc), open the FTF you want to extract the files from. (FYI: an FTF is just a Zip file with renamed extension)
Now copy/extract the SIN you want to unpack to a folder of your preference.
Step 2 - Dump the SIN
I'll take into account you already had installed Flashtools and Java JRE, in which case I highly encourage you to update both to the latest version available.
Now, open Flashtools. Click on Tools, Sin Editor. Hit the [...] and locate the SIN you previously extracted. Now, hit the [Extract Data] button. After a couple of minutes the bar should start running.
Once finished, you can have 2 kind of files: a .yaffs2 or a .ext4/.ext3/.ext2 file, which require different procedures on how to see it's contents.
Step 3.a - Convert the file to a readable format - UnYaffs2
If the file you get is a .yaffs2 format file, you're going to need to extract it. For doing so, you need this tool, which contains a executable and a cygwin dll.
Extract this .rar contents to the very same folder where you placed the SIN, and thus, where the .yaffs2 is located.
Now, while you're in that folder press the shift key in your keyboard, and while you keep pressing it, right click on a blank space in that folder. In the menu choose Open a Command Prompt here.
To end the proccess, type
Code:
unyaffs2.exe [COLOR="DarkOrchid"]<the-name-of-the-yaffs2>[/COLOR]
Where <the-name-of-the-yaffs2> you must type the file name of the yaffs2 (e.g. system.yaffs2)
The files will get extracted and you'll be able to pick the ones you need.
Step 3.b - Mount the image - Linux Reader
There're many many tools to mount a EXT format image in Windows, but in this case, I'll use the Diskinternals Linux Reader, since it's free and it's compatible with all 3 possible formats you can encounter: .ext4/.ext3/.ext2.
Download it from here and install it. (It must be this version, since newer ones are broken.)
Once done, you should be perfectly able to double-click-to-mount the EXT file Flashtools generated without any trouble.
LINUX GUIDE
Step 1 - Extract the SIN we need
Using your favourite archive manager (Ark, Peazip, etc), open the FTF you want to extract the files from. (FYI: an FTF is just a Zip file with renamed extension)
Now copy/extract the SIN you want to unpack to a folder of your preference.
Step 2 - Dump the SIN
I'll take into account you already had installed Flashtools and Java JRE, in which case I highly encourage you to update both to the latest version available.
Now, open Flashtools. Click on Tools, Sin Editor. Hit the [...] and locate the SIN you previously extracted. Now, hit the [Extract Data] button. After a couple of minutes the bar should start running.
Once finished, you can have 2 kind of files: a .yaffs2 or a .ext4/.ext3/.ext2 file, which require different procedures on how to see it's contents.
Step 3.a - Convert the file to a readable format - UnYaffs2
If the file you get is a .yaffs2 format file, you're going to need an extra tool to extract it. For doing so, you are going to need the unyaffs2 tool.
You can download a pre-compiled binary from here, or you can compile your own using GCC with the source code, the header and the code below inside a Terminal (Ctrl+Alt+T to open it).
Code:
gcc -o unyaffs unyaffs.c
Once you've a working UnYaffs2 binary, just copy it to the very same folder where you placed the SIN, and thus, where the .yaffs2 is located, and type in a Terminal (Ctrl+Alt+T to open it).
Code:
cd [COLOR="DarkOrchid"]<file-route-of-the-sin>[/COLOR]
./unyaffs2 [COLOR="Blue"]<the-name-of-the-yaffs2>[/COLOR]
Where <file-route-of-the-sin> is where the SIN was located, and where <the-name-of-the-yaffs2> you must type the file name of the yaffs2 (e.g. system.yaffs2)
The files will get extracted and you'll be able to pick the ones you need.
Step 3.b - Mount the image
Since we're already in Linux, mounting a EXT image is not that hard. Just mount it using this commands in a Terminal (Ctrl+Alt+T to open it).
Code:
cd [COLOR="DarkOrchid"]<file-route-of-the-sin>[/COLOR]
mkdir android
sudo mount -t ext[color="RED"]*[/color] -o loop <name-of-the-image> android/
Where <file-route-of-the-sin> is where the SIN was located, where <the-name-of-the-image> you must type the file name of the ext image (e.g. system.ext4), and finally, where ext*, replace * with the version number of the EXT image you're mounting, usually, ext4
Now, once finished, to unmount it, type in a Terminal.
Code:
sudo umount android
rm -fr android
OSX GUIDE
Step 1 - Extract the SIN we need
Using your favourite archive manager (UnRarX, ZipEg, etc), open the FTF you want to extract the files from. (FYI: an FTF is just a Zip file with renamed extension)
Now copy/extract the SIN you want to unpack to a folder of your preference.
Step 2 - Dump the SIN
I'll take into account you already had installed Flashtools and Java JRE, in which case I highly encourage you to update both to the latest version available.
Now, open Flashtools. Click on Tools, Sin Editor. Hit the [...] and locate the SIN you previously extracted. Now, hit the [Extract Data] button. After a couple of minutes the bar should start running.
Once finished, you can have 2 kind of files: a .yaffs2 or a .ext4/.ext3/.ext2 file, which require different procedures on how to see it's contents.
Step 3.a - Convert the file to a readable format - UnYaffs2
If the file you get is a .yaffs2 format file, you're going to need an extra tool to extract it. For doing so, you are going to need the unyaffs2 tool.
You can download a pre-compiled binary from here, or you can install your own using Brew. From a Terminal (Command+Space, then type in Terminal) type the following commands.
Code:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null #This is just to Install Brew for the first time. If you already have it, it's not needed.
brew install unyaffs
If you chose using the UnYaffs2 binary, copy it to the very same folder where you placed the SIN, and thus, where the .yaffs2 is located.
If you chose the Brew installation, just continue.
Now, type in a Terminal (Command+Space, then type in Terminal).
Code:
cd [COLOR="DarkOrchid"]<file-route-of-the-sin>[/COLOR]
unyaffs2 [COLOR="Blue"]<the-name-of-the-yaffs2>[/COLOR]
Where <file-route-of-the-sin> is where the SIN was located, and thus, where the yaffs2 file is located; and where <the-name-of-the-yaffs2> you must type the file name of the yaffs2 (e.g. system.yaffs2)
The files will get extracted and you'll be able to pick the ones you need.
Step 3.b - Mount the image - Ext4FUSE
There're many many tools to mount a EXT format image in OSX, but in this case, since we don't need RW access, but just RO, I'll use ext4fuse, since it's free and it's more than compatible with our needs.
To install it you'll need Brew. To get things ready, type the following commands in a Terminal (Command+Space, then type in Terminal).
Code:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null #This is just to Install Brew for the first time. If you already have it, it's not needed.
brew tap homebrew/fuse
brew install Caskroom/cask/osxfuse
brew install ext4fuse
If you're on OSX Yosemite, El Capitan, or Leopard, you may need an extra command to add yourself to the Operator group, so that you can have readonly permissions to the disks.
Use it only if you get an error while trying to access the mounted EXT image later.
Code:
sudo dscl . append /Groups/operator GroupMembership [COLOR="red"]<your-user>[/COLOR]
Where your user <your-user> is your username.
Now, to mount the ext4 image, type in a Terminal (Command+Space, then type in Terminal).
Code:
mkdir android
ext4fuse [COLOR="DarkOrchid"]<path-to-the-ext4-image>[/COLOR] android
Where <path-to-the-ext4-image> you must type in the full path where the SIN was located, and thus, where the EXT4 image is located.
Use this as reference.
Reserved
In case I need it
Great job! Keep up the good work!!
Well. great guide.
Just a note, Microsoft officially released Bash on Ubuntu on Windows yesterday. Try it. It's a full fledged Linux subsystem but unfortunately only available to Windows Insiders. It would be the best alternate to cygwin.
Boot.img
How can i extract the boot.img
or is this applicable to every single .sin file present in the .ftf file
serajr said:
Great job! Keep up the good work!!
Click to expand...
Click to collapse
Thank you, I appreciate your words
mfbcool said:
Well. great guide.
Just a note, Microsoft officially released Bash on Ubuntu on Windows yesterday. Try it. It's a full fledged Linux subsystem but unfortunately only available to Windows Insiders. It would be the best alternate to cygwin.
Click to expand...
Click to collapse
I know, I saw the demonstration in the //build/, but since it hasn't been released for all yet (I guess it'll be for Redstone 2?), I didn't saw it necessary to be included.
sandeep.sethi said:
How can i extract the boot.img
or is this applicable to every single .sin file present in the .ftf file
Click to expand...
Click to collapse
No, this is only applicable for system.sin, userdata.sin, cache.sin and probably modem.sin.
However, if many of you request it, I could try making another for the kernel (boot.img)... But remember, every device doesn't have the same way/method to unpack the kernel, so making a generic tutorial for all wouldn't be possible
No, this is only applicable for system.sin, userdata.sin, cache.sin and probably modem.sin.
However, if many of you request it, I could try making another for the kernel (boot.img)... But remember, every device doesn't have the same way/method to unpack the kernel, so making a generic tutorial for all wouldn't be possible
Click to expand...
Click to collapse
if u can provide the guide it would be very helpful :fingers-crossed: :fingers-crossed:
This thread got featured in XDA Portal, thank you guys!
I tried extracting Xperia Pro's system SIN (can't remember the exact name but the one with the largest file size) using the latest version of Flashtool but wasn't successful. Like it's not supported yet.
To developers.
My question is simple. After years to discover where are the files to the nominal capacity of a battery, i know that the system stores this data in a file called charge_full_design.
In my s3 neo (I9301I) the original battery capacity is 2100 Mah and that file contents only a number (2100000).
My answer is very simple. What are i to do to change this number with the capacity of my battery (anker 7200 mah) in that file?. The system tell me that i Can't do.
Thanks.
My rom now CM 11 ( )
Sincerely Juan Carlos
I have same battery...
take a try on TWRP mode
needforszpit said:
I have same battery...
take a try on TWRP mode
Click to expand...
Click to collapse
How do I edit files in TWRP?
chmod 755...or use total commander to edit file(root mode)
needforszpit said:
chmod 755...or use total commander to edit file(root mode)
Click to expand...
Click to collapse
In total commander it keeps saying that it can't be saved because of not enough memory. And in TWRP mod I slide to apply chmod 755 but then nothing happens.
755 chmod enable write access...
try to rename the file and after create a file with 7200000 with original name
needforszpit said:
755 chmod enable write access...
try to rename the file and after create a file with 7200000 with original name
Click to expand...
Click to collapse
When I rename the file it stays the same and nothing happens. Also when I try to Change the value in it, it always changes back to the original value when I save. I have System read write but it´s not working.
dead end...
needforszpit said:
dead end...
Click to expand...
Click to collapse
Do you have a suggestion on how to solve this problem?
without I know where is file located on system is littlebit hard to say anything.
But.... the file was writed by code included on another file... it's needed to find it because probably include the needed function
needforszpit said:
without I know where is file located on system is littlebit hard to say anything.
But.... the file was writed by code included on another file... it's needed to find it because probably include the needed function
Click to expand...
Click to collapse
The file is located in sys/devices/qpnp-charger-e89dec00/power_supply/battery "charge_full" and "charge_full_design". I don´t know if this is the correct file that determines the recognized battery capacity.
I try a solution bu its not tested...
1. download and install: https://play.google.com/store/apps/details?id=com.battery.chargingstatus
Install termux: https://play.google.com/store/apps/details?id=com.termux
2. Save on PC framework-res.apk ( find it on: /sytem/framework directory) editable in apk: /res/xml/power_profile.xml U find a line with: battery.capacity 2100....change to 7200
For that action I use Kubuntu linux and MC(midnight commander).
Save ....
3.Upload to your phone the edited apk.
4.Start recovery mode...delete original framework-res.apk and copy the edited apk
5. reboot sytem.
6. Start Termux and use commands:
su
echo 7200000 /sys/class/power_supply/battery/charge_full_design
7. Reboot
8 Start battery status app and its show 7200
needforszpit said:
I try a solution bu its not tested...
1. download and install: https://play.google.com/store/apps/details?id=com.battery.chargingstatus
Install termux: https://play.google.com/store/apps/details?id=com.termux
2. Save on PC framework-res.apk ( find it on: /sytem/framework directory) editable in apk: /res/xml/power_profile.xml U find a line with: battery.capacity 2100....change to 7200
For that action I use Kubuntu linux and MC(midnight commander).
Save ....
3.Upload to your phone the edited apk.
4.Start recovery mode...delete original framework-res.apk and copy the edited apk
5. reboot sytem.
6. Start Termux and use commands:
su
echo 7200000 /sys/class/power_supply/battery/charge_full_design
7. Reboot
8 Start battery status app and its show 7200
Click to expand...
Click to collapse
So I´m stuck on uploading the edited apk to my phone. Everytime I replace the framwork-res.apk with the modded version I get stuck on the boot image. I don´t know what the problem is.
"echo 7200000 /sys/class/power_supply/battery/charge_full_design".....useless...its not rewrite the file...
Other....the rewrite of framework-res.apk its just a "looklike" thing...in chargingstatus looks battery like 7200 but on system works like an original
Solution NOT works
This is a complete working guide on how to extract the /system partition from a Samsung S7 FW/OTA package using Windows (This is the same package one might flash to their phone with ODIN.) You can get this FW/OTA package from sites like Samsung-Firmware.org & SamMobile.com. It is very likely this works (or parts of it duct-taped together ) on other Phone models,etc, but I vouch that this guide works on the Samsung S7. Please chime in if it works on other models & brands!
Intro:
I found a LOT of guides similar to this, but couldn't get any to work with the Samsung S7 packages! And there are MANY different versions of the tools I mention below, many not working! So be sure to use the tool versions I post below. Over much time, it was a tiny step with each new attempt until I finally got it...& wanted to share!
Purpose:
Why would anyone want to do this? If you're reading this thread and don't know the answer to that, then I'm confused But I'll answer anyway - What is the purpose of this thread?
You would want to do this because you're a ROM Developer and don't want to have to go through the time & trouble of installing an OTA, then do a dd/cat to get the system image, etc. (With this method you don't even need a phone, just a PC!)
You are using a custom ROM, but want a stock app; for example the custom ROM you're using has the Google Dialer/Phone app builtin, but you prefer the stock Samsung Phone. Doing the steps outlined here will yield a "system" folder in Windows that you can simply navigate to /system/app or /system/priv-app and copy over the apk to your phone and install it! (via ADB or phone File manager app, etc). Obviously not all apks will work. Or maybe you want the libraries from another phone OTA package in order for an apk to work, and so on...
You are just curious what's in the /system partition for an OTA package!
Tools:
7-Zip
LZ4
simg2img: "Clone or download"->Download ZIP
Ext2Explore (Same as Ext2Read)
Guide:
Download FW/OTA (TMB-G930TUVU4CRI2.zip) from SamMobile website (or whereever)
Use 7zip to extract TMB-G930TUVU4CRI2.zip to a folder
Use 7zip to extract AP_G930TUVU4CRI2*.tar.md5 to a folder (ignore "There is no correct record at end of archive" error)
Use lz4 to extract system.img.ext4.lz4 -> system.img.ext4
lz4 system.img.ext4.lz4
Extract simg2img_win-master.zip -> \simg2img_win-master\
Copy system.img.ext4 to \simg2img_win-master\ folder
Rename system.img.ext4 -> system.img
Use simg2img_win-master to convert system.img -> system.ext4.img
Double-click convert.bat (or run in cmd prmpt) (This will take a few minutes)
Create new folder to save contents in, eg: "C:\System"
Use ext2explore to mount system.ext4.img: Open ext2explore->File->Open Image->Select system.ext4.img
Click Save icon->Save to your new folder, eg: "C:\System"
Wait for it to extract. Once complete, enjoy!
Links & Useful Resources:
Tmobile Versions: https://support.t-mobile.com/docs/DOC-30276
Search Keywords:
(This section is here so this thread comes up in searches for the many errors I came across while trying to get this to work in both Windows & Linux. That's right! I tried in both OSs and actually got it to work first in Windows... & yet to get it to work in Linux!)
- losetup /dev/loop2 /media/sf_Share/system.img.ext4 ->warning file does not fit into 512-byte sector; the end of the file will be ignored
- mount /dev/loop2 /mnt/mysystem2 -> mount: /mnt/mysystem2: cant read superblock on /dev/loop2
- mount -t ext4 /media/system.img /mnt/mysystem6 -> wrong fs type, bad option, bad superblock on /dev/loop6, missing codepage or helper program, or other error
fsck /media/system.img -> ext2fs_open2: Bad magic number in super-block
fsck.ext2: Superblock invalid, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open ...
The superblock could not be read or does not describe a valid ext2/ext3/ext4 filesystem. If the device is valid and it really contains an ext2/ext3/ext4 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate suberblock: ...
Reserved
Just happened to see this thread.
Dropping in the let you know for linux just do this
Code:
simg2img system.img.ext4 system.img
mkdir system
sudo mount -t ext4 system.img system/
Of course all work is done in the current working directory.
You can just copy whatever you want from this mounted loop device of the system.img or whatever.
This is what i do because it seems to be the fastest in terms of work.
Hope it helps. I prefer all android work on linux
kevin71246 said:
Reserved
Click to expand...
Click to collapse
oh man you saved my day thanks man none of the old method worked but this did wonders
OSS 9.0.15
Magisk 19.3
Magisk Manager 7.3.2
Can't write in root folder cause says that root folder has 0 byte space available
Example: if i try to Copy a file in root\system\media
Total Commander report error cause 0 byte available
Mixpolorer, solid Explorer etc Copy file buy with 0 dimension
What's wrong ?
Fil76 said:
What's wrong ?
Click to expand...
Click to collapse
OnePlus.
They filled the /system partition, if you want to copy/move something, you will have to delete something first.
Did u give root permission.?
I guess u haven't
All file Explorer asked and i give permission
How can i check ?
Btw see message before your
Edit: for root checker it's all ok
onliner said:
OnePlus.
They filled the /system partition, if you want to copy/move something, you will have to delete something first.
Click to expand...
Click to collapse
Bad news
I have 10 MB of free space, but the system claims there's none. My build.prop is currently a 0 byte file after I tried to edit it. I can manage the file in any way except increase it's size. I wonder if this would be the case under twrp as well. I'm afraid to reboot until I have access to my PC in case I need to re-flash the ROM if I can't restore my build.prop.
Did you fix it dude, I have the same problem. =/
Hi fellows
I'm a kind of newbie in the Android world, but I created a set of shell scripts to work with Topway TS10 Firmware:
---------------------------------------------------------------------------------------------------------------
TS10-Firmware-WorkbenchScripts intended to mount the Topway TS10 Firmware, make modifications and reassemble the firmware They can retrieve the firmware from specified location and after modification, they can put the firmware into another specified location
Files:
1-) config.ini = A file to setup parameters, paths for the original firmware and patched firmware, temp directory to work with firmware files and mount point to edit the firmware
2-) import_original.sh = Retrieves the files .0 .1 .2 and .3 from the location specified in config.ini
3-) import_patched.sh = Retrieves the same files that 'import_original.sh' but from the patched location specified in the config.ini (normally a firmware that you've already patched before)
4-) unpack.sh = Unpack the imported firmware and create the mount moint (as specified in the config.ini file) to work with the firmware
5-) repack.sh = Unmount the modified firmware from the mount point, delete the mount point, split the firmware in files .0 .1 .2 and .3 and move it to the patched directory as specified in config.ini
6-) inject_tweaks.sh = Modify locale, dataroaming and remove (if necessary) the values in ro.fota.device to avoid message "UI unauthorized, please contact the supplier"
7-) inject_mods.sh = This will copy all the contents of the '_mods' folder inside firmware. I.E. I put a 'gps_debug.cfg' inside 'system/etc/' and it will be injected into firmware overwritting the existent
inject_su.sh = This will inject su binary into firmware as a daemon, this is dangerous as the firmware is permanently rooted and the apps don't ask for permissions (they already have the root access) USE AT YOUR OWN RISK
9-) clean_local.sh = This script will unmount the firmware and delete it, it will also delete temporary files. as its name says, it cleans the dir !
External (included) tools:
tools/twt (Topwaytool) forked from https://github.com/mkotyk/topwaytool
_mods folder containing a sample file 'gps_debug.cfg'
N'joy it !
---------------------------------------------------------------------------------------------------------------
News
This will allow you to have root privileges in original firmware, but read VERY CAREFULLY as this method int NOT SAFE at all
At least for me it do the trick as I expected
I'll have my Topway TS10 THEME1 HU in a week and, if I am brave enough, I'll give it a go.
mariodantas said:
News here
https://github.com/mariodantas/TS10-Firmware-Workbench
This will allow you to have root privileges in original firmware, but read VERY CAREFULLY as this method int NOT SAFE at all
At least for me it do the trick as I expected
Click to expand...
Click to collapse
Is this way to root ownice k7 radio that i wish?? TT wow.....
This will ROOT, but everything inside will have ROOT privileges, UNSAFE, but as I said, for me, it did the trick and I'm happy with this !
mariodantas said:
This will ROOT, but everything inside will have ROOT privileges, UNSAFE, but as I said, for me, it did the trick and I'm happy with this !
Click to expand...
Click to collapse
Hello mariodantas.
I'm trying to utilize the project you made to mount firmware and inject su.
I'm a little new to some of this, so any guidance would be grateful.
Question:
How do i know what the mount point should be while using unpack.sh in config.ini?
! Creating _mountpoint folder...
Step 4 of 4 - Mounting ready raw firmware into '_mountpoint/' folder
mount: exec /Library/Filesystems/auto.fs/Contents/Resources/mount_auto for /Users/me/Desktop/TS10-Firmware-Workbench-main/_mountpoint: No such file or directory
mount: /Users/me/Desktop/TS10-Firmware-Workbench-main/_mountpoint failed with 72
READY !!!, you can go into '_mountpoint/' folder.
But _mountpoint folder is empty.
Andason74 said:
Hello mariodantas.
I'm trying to utilize the project you made to mount firmware and inject su.
I'm a little new to some of this, so any guidance would be grateful.
Question:
How do i know what the mount point should be while using unpack.sh in config.ini?
! Creating _mountpoint folder...
Step 4 of 4 - Mounting ready raw firmware into '_mountpoint/' folder
mount: exec /Library/Filesystems/auto.fs/Contents/Resources/mount_auto for /Users/me/Desktop/TS10-Firmware-Workbench-main/_mountpoint: No such file or directory
mount: /Users/me/Desktop/TS10-Firmware-Workbench-main/_mountpoint failed with 72
READY !!!, you can go into '_mountpoint/' folder.
But _mountpoint folder is empty.
Click to expand...
Click to collapse
What is your platform ? OSX ?
mariodantas said:
What is your platform ? OSX ?
Click to expand...
Click to collapse
Yes, OSX. I was checking more last night and maybe the issue is how mac handles the "auto" for file type.
Yes it sould be the mount command for OSX, but i can't help with OSX sorry, maybe you can clone the repo and after find the solution issue a pull request ?
after rooting the firmware doesn't seem to pass the checksum, everything is not working please help me ts10 1.2 ols10. ownice
Hello, have to check what's wrong with my code against 1.2 ols10 firmware, will check tonight and come back ASAP !
Cannot open file patch /init.rc.patch do not such how to fix please
Ok will check tonight !
@binharmani please add this to your config.ini
#Super User Folder
SUPERUSERFOLDER="_ superuser"
Click to expand...
Click to collapse
thank bro tool is ok . amazing good job
Thanks fellow
you can modify the "build.prop" manually after using "unpack.sh" by entering into "_mountpoint", modifying what you need and then repack the file and reflash in your headunit
How to set 775 file build.prop on linux
binharmani said:
How to set 775 file build.prop on linux
Click to expand...
Click to collapse
chmod 0775 build.prop
you should use a command line instead of the interface !
Mario good morning, if possible for you check the metode for change image car on display of ownice K7 ? Image in centrale display is very bad ifnpossible change png image with other car .......?
hello!
i've managed to use your tool, but there is a mention:
i've used it in a ubuntu vm (latest) and the mountpoint directory is empty if i don't run everything as root
repacked ok after this
my question is if i have to add the other files originally found in my original firmware folder with the newly repacked firmware files.
original firmware content (TS10.1.2_20210505.171701_TW1-V2):
a53f244a-9cbf-11ea-bb71-8bb1f7c98e0b.*
a71a8002-9cbf-11ea-b64e-578022b8a84a
ab2e7e2e-9cbf-11ea-bb71-fbb02866c44e
repacked firmware content:
a53f244a-9cbf-11ea-bb71-8bb1f7c98e0b.*