It is possible to export data of steps, sleep and continuous heart rate? - Amazfit

Hello. It is possible to export to PC steps, sleep and continuous heart rate? I would like to analyze in PC with something like a spreadsheet. Thank you.

Nothing? with MiFit you can not view continuous heart rate..

franx1s said:
Nothing? with MiFit you can not view continuous heart rate..
Click to expand...
Click to collapse
You can extract the data from the DB files stored by the app com.huami.WearHealth
If you are running pacefied, it is simple to extract using the below commands.
commands:
Code:
adb root
adb pull /data/data/com.huami.watch.health/databases/datacenter.db
adb pull /data/data/com.huami.watch.health/databases/motion
adb pull /data/data/com.huami.watch.health/databases/allday_heartrate.db
All the three files are SQLite DB files that you can browse using SQLite DB Browser.
Datacenter.db has data related to the weekly and daily activity reports. motion (also db file) has data related to daily steps, Sleep and heartrate
If you are not using Pacefied, use adb backup command to back the data and extract db file using abe jar.
-adb backup -f /export_data.ab -noapk com.huami.watch.health
- java -jar abe.jar unpack export_data.ab export_data.tar (abe is android backup extractor)
- extract the tar file using winrar
- navigate to export_data\apps\com.huami.watch.health\db folder and open db using DB browser

madtech360 said:
You can extract the data from the DB files stored by the app com.huami.WearHealth
If you are running pacefied, it is simple to extract using the below commands.
commands:
Code:
adb root
adb pull /data/data/com.huami.watch.health/databases/datacenter.db
adb pull /data/data/com.huami.watch.health/databases/motion
adb pull /data/data/com.huami.watch.health/databases/allday_heartrate.db
All the three files are SQLite DB files that you can browse using SQLite DB Browser.
Datacenter.db has data related to the weekly and daily activity reports. motion (also db file) has data related to daily steps, Sleep and heartrate
If you are not using Pacefied, use adb backup command to back the data and extract db file using abe jar.
-adb backup -f /export_data.ab -noapk com.huami.watch.health
- java -jar abe.jar unpack export_data.ab export_data.tar (abe is android backup extractor)
- extract the tar file using winrar
- navigate to export_data\apps\com.huami.watch.health\db folder and open db using DB browser
Click to expand...
Click to collapse
Thank you. Can someone try it? I haven´t my watch yet...

franx1s said:
Thank you. Can someone try it? I haven´t my watch yet...
Click to expand...
Click to collapse

madtech360 said:
If you are not using Pacefied, use adb backup command to back the data and extract db file using abe jar.
-adb backup -f /export_data.ab -noapk com.huami.watch.health
- java -jar abe.jar unpack export_data.ab export_data.tar (abe is android backup extractor)
- extract the tar file using winrar
- navigate to export_data\apps\com.huami.watch.health\db folder and open db using DB browser
Click to expand...
Click to collapse
Hi! I just tried this method but the backup file comes up empty... Any suggestions?
Thanks

madtech360 said:
-adb backup -f /export_data.ab -noapk com.huami.watch.health
- java -jar abe.jar unpack export_data.ab export_data.tar (abe is android backup extractor)
- extract the tar file using winrar
- navigate to export_data\apps\com.huami.watch.health\db folder and open db using DB browser
Click to expand...
Click to collapse
My backup file is also empty. And if I do a full backup of my Pace, there is no com.huami.watch.health package in the apps folder.

Same here.
Is there anyone around who actually exported daily sleep and steps data???
None of the suggestions seem to work. The only exportable available data concerns sports / gps tracking info.

How to export Heart Rate Data from Amazefit Bip?
How can I export Heart Rate Data from Amazefit Bip? Thanks very much

Related

[Q] 7zip for Android?

have anyone seen 7zip for Android?
AndroZip handels 7zip
Sent from my GT-I9000 using XDA App
MiMikri said:
AndroZip handels 7zip
Sent from my GT-I9000 using XDA App
Click to expand...
Click to collapse
Unless it is pw-protected.
AllGamer said:
have anyone seen 7zip for Android?
Click to expand...
Click to collapse
I've just compiled p7zip-9.20.1, it's the command line version of 7zip, if you still want it, you can download it from here:
http://dl.dbank.com/c0mtm6i3wa
(sorry, it's a file share site provided by Huawei company in Chinese language, outseas file share sites are blocked by "opening" China government)
Code:
$ uname -a
uname -a
Linux localhost 2.6.35.7-perf #1 PREEMPT Sat Dec 3 17:57:38 CST 2011 armv7l GNU/Linux
$ ls -l /system/bin/7z /data/local/bin/7za-9.20
ls -l /system/bin/7z /data/local/bin/7za-9.20
-rwxr-xr-x 1 2000 2000 1702540 Dec 26 03:37 /data/local/bin/7za-9.20
lrwxrwxrwx 1 0 0 24 Dec 26 03:03 /system/bin/7z -> /data/local/bin/7za-9.20
$ 7z
7z
7-Zip (A) 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
p7zip Version 9.20 (locale=C,Utf16=off,HugeFiles=on,1 CPU)
Usage: 7za <command> [<switches>...] <archive_name> [<file_names>...]
[<@listfiles...>]
<Commands>
a: Add files to archive
b: Benchmark
d: Delete files from archive
e: Extract files from archive (without using directory names)
l: List contents of archive
t: Test integrity of archive
u: Update files to archive
x: eXtract files with full paths
<Switches>
-ai[r[-|0]]{@listfile|!wildcard}: Include archives
-ax[r[-|0]]{@listfile|!wildcard}: eXclude archives
-bd: Disable percentage indicator
-i[r[-|0]]{@listfile|!wildcard}: Include filenames
-m{Parameters}: set compression Method
-o{Directory}: set Output directory
-p{Password}: set Password
-r[-|0]: Recurse subdirectories
-scs{UTF-8 | WIN | DOS}: set charset for list files
-sfx[{name}]: Create SFX archive
-si[{name}]: read data from stdin
-slt: show technical information for l (List) command
-so: write data to stdout
-ssc[-]: set sensitive case mode
-t{Type}: Set type of archive
-u[-][p#][q#][r#][x#][y#][z#][!newArchiveName]: Update options
-v{Size}[b|k|m|g]: Create volumes
-w[{path}]: assign Work directory. Empty path means a temporary directory
-x[r[-|0]]]{@listfile|!wildcard}: eXclude filenames
-y: assume Yes on all queries
Hi lovetide. What kind of compression did you use?
I can't find a way to open it :/
Guys I found another working port of p7zip for android.
I Tried to post a link but becouse i'm a 'noob' here i'm not allowed to.
So you can search for "port2android" at google and you will find it
ilbolza said:
Hi lovetide. What kind of compression did you use?
I can't find a way to open it :/
Click to expand...
Click to collapse
It's not an archive file, it's an executable file, you can execute it directly. It's static linked, so it should work on most Android phones.
lovetide said:
I've just compiled p7zip-9.20.1, it's the command line version of 7zip, if you still want it, you can download it from here:
http://dl.dbank.com/c0mtm6i3wa
(sorry, it's a file share site provided by Huawei company in Chinese language, outseas file share sites are blocked by "opening" China government)
Click to expand...
Click to collapse
Link does demand to pay for it. Can you upload attachment on the forum?
You have to click the link several times. It will work after some time.
But scroll down... Mirror is attached.
Here version 9.38.1 for arm-v7a, 7za is standalone, 7z needs 7z.so in /system/lib, 7zr a reduced version of 7za, Codecs must be in current dir for rar support (optional)
in the archive I've also added makefile.machine if you want to compile from source (you need to replace the one in the source directory, it needs to be edited for paths)
sherpya said:
Here version 9.38.1 for arm-v7a, 7za is standalone, 7z needs 7z.so in /system/lib, 7zr a reduced version of 7za, Codecs must be in current dir for rar support (optional)
in the archive I've also added makefile.machine if you want to compile from source (you need to replace the one in the source directory, it needs to be edited for paths)
Click to expand...
Click to collapse
Thank you very much for this indeed. XDA won't let it download no matter how many times I try, would it be possible for you to post it in a mirror somewhere ?
Edit : Never mind, finally got it. XDA glitch.
Edit 2 : Shoot, this will not run in Android 5 and newer systems... ( Error: only position independent executables (PIE) are supported. )
sorry but I didn't have an arm android 5.x to test it, I'm attaching pie build, I think it should work also on android < 5, but anyway there is still the old attachment in previous post
Hey...
I think the Zarchiver app from the play store would just work.
Hit thanks if I helped you!
ClawSpark said:
Hey...
I think the Zarchiver app from the play store would just work.
Click to expand...
Click to collapse
Does it support being called via command line, from eg a bash script?
To the rest: did the PIE build work fine?
p7zip 16.02 stand-alone attached.
help needed. anybody know how to set HugeFiles=on? compiling with -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE does not give expected result
- - -
edit: many thanks to superbeef150 @ XDA for solution!
aIecxs said:
p7zip 16.02 stand-alone attached.
help needed. anybody know how to set HugeFiles=on? compiling with -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE does not give expected result
Click to expand...
Click to collapse
Does this work on Android 6.0?
aIecxs said:
p7zip 16.02 stand-alone attached.
Click to expand...
Click to collapse
Thanks for sharing! I'm able to get this to run on several devices, but for some reason it errors out when running it in TWRP (which is coincidentally where I hope to run it):
Code:
~ # chmod 777 /data/local/tmp/p7zip
~ # /data/local/tmp/p7zip
/sbin/sh: /data/local/tmp/p7zip: not found
~ # sh /data/local/tmp/p7zip
/data/local/tmp/p7zip: line 1: syntax error: unexpected word (expecting ")")
Has anyone observed this different behavior between TWRP and the normal OS occur with 7zip or any other terminal/shell/CLI apps?
superbeef150 said:
Has anyone observed this different behavior between TWRP and the normal OS occur with 7zip or any other terminal/shell/CLI apps?
Click to expand...
Click to collapse
I got this figured out in case anyone stumbles across this in the future.
The default shell in TWRP (in my case) is at /sbin/sh . From what I've read, it sounds like this is the one that is supplied with BusyBox rather than the normal one. When I ran 7z using /system/bin/sh I had a lot better luck.
I'm now running into issues with larger ISO files. It seems like ones over 2GB are the problematic ones, I can't extract, test, or list contents on them, instead I always get an "E_FAIL" error message.
Googling that in the context of 7z seems to indicate a space issue, but testing and listing contents should make that irrelevant. For the sake of trying I attempted this with the ISOs on an exFAT usb flash drive as well as an NTFS usb hard drive with the same results.
I suspect that the HugeFiles=off setting that @aIecxs mentioned earlier may be related, but unfortunately the only information on the topic I could find were on one of his posts on p7zip's SourceForge forum where someone suggested a few different compile flags that didn't seem to make a difference for him or myself.
If anyone has any thoughts on this I'd really appreciate it! Thanks!
maybe compiling on 64-bit machine will support Hugefiles
aIecxs said:
maybe compiling on 64-bit machine will support Hugefiles
Click to expand...
Click to collapse
I'm doing that currently, but unfortunately HugeFiles is still showing up as off :/

[Q] How to implement Admob into App Inventor Apps

Hello All
I have tried using App2Market to let the Eclipse read the app but it can't :|
is there any way to make this done ?
Thanks and Best Regards..
Any Ideas ?
Use APKTOOL to Decompile App Inventor App
first put a copy of your ai app in the windows directory
Once you Download and extract the APKTOOL to your (i use windows) directory, open command prompt.
cd to the directory you extracted the apktool into. cd\Windows)
enter this line of command:
apktool d -s c:\windows\YOURAPPNAME.apk
it will take a sec to decompile the app. but once it does, your app will show up as a folder in windows dir.
from here, you can go into eclipse and create new android project from existing source. and navigate to the extracted version of your app. you will find the APK tool on here if you search for it. and the instructions there are better.

[Q] how extract an *.ab file (Helium Backup)

Hi,
I've backup a few apps from my Nexus 5 (Unrooted),
I've copied the .ab file to my PC and I wondered how can I extract it to edit some file and then repack it again.
I've already tried to extract it using DroidExplorer but I'm getting an un-openable tar file.
Can someone please point me how to can I do it right? and how can I repack it again,
Thanks in advance!
Gilco:good:
There is a sweet guide here
UltraWelfare said:
There is a sweet guide here
Click to expand...
Click to collapse
Thanks man, I tried but I get an error while trying to extract the tar file,
also I saw this warning at the end of the guide:
Warning about Helium (Carbon): helium backups are just android adb backups that are not compressed with Java Deflater. It means they were created with the option static final boolean COMPRESS_FULL_BACKUPS = false.
A normal adb restore should work.
see log from first step:
C:\Users\Gil\Desktop\BandR>java -jar abe.jar unpack com.gameinsight.airport.ab A
C.tar
Strong AES encryption enabled
Magic: ANDROID BACKUP
Version: 1
Compressed: 1
Algorithm: none
20664320 bytes read
gilc8 said:
Thanks man, I tried but I get an error while trying to extract the tar file,
also I saw this warning at the end of the guide: ...
Click to expand...
Click to collapse
Hi all, I play a bit with the conversion from Helium backups. Here is the utility:
xaos.ic.cz/Helium_ab2tar.zip . Still don't know what are the last four bytes in the Helium .ab file. Is that some checksum or what? Anyone knows?
xaos.cz said:
Hi all, I play a bit with the conversion from Helium backups. Here is the utility:
xaos.ic.cz/Helium_ab2tar.zip . Still don't know what are the last four bytes in the Helium .ab file. Is that some checksum or what? Anyone knows?
Click to expand...
Click to collapse
Thank you so much! It's working. I was able to extract my (unencrypted) Helium backup. Did you publish the code somewhere else? Here's a Makefile in case someone wants to build it for Linux. (Just remove .txt before running make or make extract)
Archived utility on Github
Hey everyone,
since the original utility has vanished and is somewhat hard to find, I've archived it at Github for convenience: github.com/floe/helium_ab2tar
If the original author wishes, I can transfer the repo to their ownership.
Best, Floe
floemuc said:
Hey everyone,
since the original utility has vanished and is somewhat hard to find, I've archived it at Github for convenience: github.com/floe/helium_ab2tar
If the original author wishes, I can transfer the repo to their ownership.
Best, Floe
Click to expand...
Click to collapse
Hi, the "helium_ab2tar" finally helped me. Good work!
I was running Win7 and didn't have any C compiler installed, so here is what I found:
• from the link above, extract helium_ab2tar-master.zip to a new directory
• from http://gnuwin32.sourceforge.net/packages/make.htm download Binaries and Dependencies and extract files make.exe, libintl3.dll, libiconv2.dll to your helium_ab2tar-master directory
• from https://bellard.org/tcc/ download a recent TinyCC build and extract the whole zip into your helium_ab2tar-master directory
• edit the makefile and change "CC=gcc" to "CC=tcc\tcc.exe"
• change "-o ab2tar_cut" to "-o ab2tar_cut.exe", "-o ab2tar_corr" to "-o ab2tar_corr.exe", "-o tar2ab_cut" to "-o tar2ab_cut.exe", "-o tar2ab_corr" to "-o tar2ab_corr.exe"
• finally run make.exe
How to use:
ab2tar_cut [.ab file] [temporary file]
ab2tar_corr [temporary file] [.tar file]
Thanks Commander!
It doesn't work for me =(
That's what I'm getting while trying to start it thru terminal
make: *** No targets specified and no makefile found. Stop.
download https://github.com/floe/helium_ab2tar, unzip, run make.exe from helium_ab2tar-master folder
aIecxs said:
download "https://github.com/floe/helium_ab2tar"]https://github.com/floe/helium_ab2tar, unzip, run make.exe from helium_ab2tar-master folder
Click to expand...
Click to collapse
there is no such file as make.exe.
of course, you must follow the steps in Post #7
or use linux. you can use Unetbootin and install Xubuntu to usb flash drive
aIecxs said:
of course, you must follow the steps in Post #7
or use linux. you can use Unetbootin and install Xubuntu to usb flash drive
Click to expand...
Click to collapse
I did so and it gives me another error
Code:
tcc\tcc.exe ab2tar_cut.c -o ab2tar_cut.exe
process_begin: CreateProcess(NULL, tcc\tcc.exe ab2tar_cut.c -o ab2tar_cut.exe, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [ab2tar_cut] Error 2
try with full path in makefile for example CC="C:\Users\Admin\Downloads\helium_ab2tar-master\tcc\tcc.exe" (path to tcc.exe)
aIecxs said:
try with full path in makefile for example CC="C:\Users\Admin\Downloads\helium_ab2tar-master\tcc\tcc.exe" (path to tcc.exe)
Click to expand...
Click to collapse
ok it seems to work,
PS C:\Users\danbe\Downloads\folders\helium_ab2tar-master\helium_ab2tar-master> C:\Users\danbe\Downloads\folders\helium_ab2tar-master\helium_ab2tar-master\make.exe
C:\Users\danbe\Downloads\folders\helium_ab2tar-master\helium_ab2tar-master\tcc.exe ab2tar_cut.c -o ab2tar_cut.exe
C:\Users\danbe\Downloads\folders\helium_ab2tar-master\helium_ab2tar-master\tcc.exe ab2tar_corr.c -o ab2tar_corr.exe
C:\Users\danbe\Downloads\folders\helium_ab2tar-master\helium_ab2tar-master\tcc.exe tar2ab_corr.c -o tar2ab_corr.exe
C:\Users\danbe\Downloads\folders\helium_ab2tar-master\helium_ab2tar-master\tcc.exe tar2ab_cut.c -o tar2ab_cut.exe
PS C:\Users\danbe\Downloads\folders\helium_ab2tar-master\helium_ab2tar-master>
Click to expand...
Click to collapse
what's next ?
---------- Post added at 01:52 PM ---------- Previous post was at 01:47 PM ----------
aIecxs said:
try with full path in makefile for example CC="C:\Users\Admin\Downloads\helium_ab2tar-master\tcc\tcc.exe" (path to tcc.exe)
Click to expand...
Click to collapse
what should be instead of [temporary file] ?
backup.ab.tmp (or any other name)
aIecxs said:
backup.ab.tmp (or any other name)
Click to expand...
Click to collapse
PS C:\Users\danbe\Downloads\folders\helium_ab2tar-master\helium_ab2tar-master>
>> ab2tar_cut backup.ab backup.ab.tmp
ab2tar_cut : The term 'ab2tar_cut' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:2 char:1
+ ab2tar_cut backup.ab backup.ab.tmp
+ ~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (ab2tar_cut:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Suggestion [3,General]: The command ab2tar_cut was not found, but does exist in the current location. Windows PowerShell does not load commands from the current location by default. If you trust this command, instead type: ".\ab2tar_cut". See "get-help about_Command_Precedence" for more details.
PS C:\Users\danbe\Downloads\folders\helium_ab2tar-master\helium_ab2tar-master>
Sorry I was using powershell for it, it doesn't work in PS but it works in CMD
Hello, I am feeling as dumb as a caveman right now because I could not figure out how to decompress and .ab file created with an old version of Helium which pretty much screw me over this.
I'm pretty much an illiterate with command lines in general. I tried cygwin but can't manage to find the right command combo, also android backup extractor doesn't even work despite I've installed the Java SE SDK etc (running Win10 x64). Can someone tell me step by step how I can decompress this hellish .ab file once for all? Thank you in advance.
P.s.= And yes, I also tryied using the method described on these last 2 pages and I get this:
C:\Users\Dingo Dash>"C:\Users\Dingo Dash\Desktop\helium_ab2tar-master\bin\make.exe" ab2tar_cut "C:\Users\Dingo Dash\Downloads\com.koushikdutta.backup\SM-G900F - 353687063301086\backup.ab" xxx.tmp
make: *** No rule to make target `ab2tar_cut'. Stop.
Click to expand...
Click to collapse
- download and edit makefile from post #5
- compile the binaries (.exe files)
- unpack backup + convert to tar
- unpack tar file
aIecxs said:
- download and edit makefile from post #5
- compile the binaries (.exe files)
- unpack backup + convert to tar
- unpack tar file
Click to expand...
Click to collapse
Thank you but I wanted to know what I was doing wrong on the prompt because I had already compiled the binaries aka followed the whole procedure.
Anyway, I managed to extract the whole damn file on another device. I don't have an explaination of why helium behaved this way but it actually worked on a more recent device instead of the original one, were the backup was created, also using a 2015 or so old version of the app, which should be the one the file came from.

Up to Date ADB and Fastboot [Mac]

Welcome
I was trying to unlock the bootloader for my Nexus 6P, but the commands were not working. I had to update the files for adb and fastboot, but it finally worked with the new command "fastboot flashing unlock" . So I have uploaded a zip with the up to date files so you guys can also use adb and fastboot.
If you haven't set up your fastboot/adb here is a quick guide on how to set it up easily.
---Guide---
1. Unzip the file, and copy the adb folder to your preferred destination.
2. Open up terminal and type : nano ~/.bash_profile
3. Use the path of the folder and add this line (replace kingmikel with your username, and replace Documents with your path) : export PATH=${PATH}:/Users/kingmikel/Documents/adb
Credits: @AshtonTS and his thread http://forum.xda-developers.com/showthread.php?t=1917237
Is there some reason to not do this with the SDK?
crachel said:
Is there some reason to not do this with the SDK?
Click to expand...
Click to collapse
This is easier. You don't have to download Java and then download the SDK.

[GUIDE] Modifying apk/jar files on the Axon 7

So I decided to write up a little guide on how to modify apk and jar files on the Axon 7 for those of you who do not know how and would like to make some modifications such as the ones in my guides.
Prerequisites
A Windows/Linux/Mac computer
A rooted device with TWRP Recovery
USB cable
ADB installed and USB debugging enabled
Java JDK: http://www.oracle.com/technetwork/java/javase/downloads/index.html
APKTool: https://ibotpeaches.github.io/Apktool/install/ (Follow all the instructions)
Baksmali: https://bitbucket.org/JesusFreke/smali/downloads/baksmali-2.2.0.jar
7-Zip or another archive manager
1. Install the frameworks to your computer
Open a command window in your working directory and connect your device to your computer with the USB-C cable.
Pull the framework files with
Code:
adb pull /system/framework/framework-res.apk
adb pull /system/framework/framework-zte-res.apk
Install them
Code:
apktool if framework-res.apk
apktool if framework-zte-res.apk
Depending on which ROM you are on you may need to install other frameworks. The above is for the stock ROM.
2. Decompile the apk/jar file.
Pull the apk/jar you want to decompile with
Code:
adb pull path_to_apk_or_jar
Here are paths for some commonly modified apk/jars:
SystemUI: /system/priv-app/SystemUI_ZTE/SystemUI_ZTE.apk
Settings: /system/priv-app/Settings_ZTE/Settings_ZTE.apk
services.jar: /system/framework/services.jar
Decompile the apk with
Code:
apktool d <apk/jar>
If you did everything correctly, a folder should now exist with the name of your apk/jar.
3. Decompile the .odex file
You can skip this step if your apk/jar does not have an .odex associated with it or you only need to modify res and not smali.
Pull the odex file
Code:
adb pull path_to_odex
For example if you want to pull the odex file for SystemUI you would do
Code:
adb pull /system/priv-app/SystemUI_ZTE/oat/arm64/SystemUI_ZTE.odex
Create a folder called "smali" in the directory of your decompiled apk/jar. Then go back to your working directory.
Pull all boot oat files from your device with
Code:
adb pull /system/framework/arm64
Move all the oat files inside the arm64 folder on your PC to your working directory.
Using baksmali, decompile the odex file to smali
Code:
java -jar baksmali.jar deodex -a <api> filename.odex
where api is 23 for Android 6.0, 24 for Android 7.0, and 25 for Android 7.1
A new folder should now be created called "out". Cut and paste the files and folders inside this folder into the "smali" folder you created earlier.
4. Make your modifications.
5. Recompile the apk/jar
From the working directory (not the directory of the decompiled apk/jar) Recompile the apk/jar with
Code:
apktool b name_of_folder
where name_of_folder is the name of the directory of the decompiled apk/jar.
The complied apk/jar should now exist in the "dist" folder in the directory of the decompiled apk/jar.
6. Sign the apk.
Using 7-zip or another archive manager, copy the res folder, resources.arsc file, and the classes.dex file (if you modified smali in steps 3 and 4) from the NEW apk to the ORIGINAL apk.
7. Replace the apk/jar on your device.
Reboot your device into TWRP recovery with
Code:
adb reboot recovery
For user apps: Make sure data is mounted in TWRP's mount menu. If you have encryption turned on you must enter your password otherwise data will not be mounted!
For system apps and framework files: Make sure system is mounted in TWRP's mount menu. Uncheck "Mount system read-only" if it is checked.
Push the ORIGINAL apk/jar to the correct directory on your device
Code:
adb push <apk/jar> path_to_apk_or_jar
Set correct permissions on the apk/jar
Code:
adb shell chmod 0644 path_to_apk_or_jar
If you did step 3, use TWRP's file manager in Advanced<File Manager to navigate to the apk/jar file's directory and delete the existing .oat or .odex file associated with it.
You did it
No go
Hi,
Tried it with the SystemUI_ZTE.apk (and odex) from the 2017G B08 ROM. I ended up with a folder named SystemUI_ZTE. I created a smali folder in that folder and moved the android, com and cn folders (that I got using the "java -jar oat2dex.jar smali SystemUI_ZTE.odex" command) to that smali folder. But when I try the apktool b command I get the following error:
Code:
C:\Users\Blub\ZTE>apktool b SystemUI_ZTE
I: Using Apktool 2.3.0
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
SystemUI_ZTE\smali\android\support\v17\leanback\app\BackgroundManager.smali[102,4] iput-wide-volatile is an odexed instruction. You cannot reassemble a disassembled odex file unless it has been deodexed.
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file: android/support/v17/leanback/app/BackgroundManager.smali
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:75)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:59)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:36)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:412)
at brut.androlib.Androlib.buildSources(Androlib.java:343)
at brut.androlib.Androlib.build(Androlib.java:299)
at brut.androlib.Androlib.build(Androlib.java:270)
at brut.apktool.Main.cmdBuild(Main.java:224)
at brut.apktool.Main.main(Main.java:75)
Any idea what I am doing wrong?
TIA,
Cheers,
/Cacti
le_cactus said:
Hi,
Tried it with the SystemUI_ZTE.apk (and odex) from the 2017G B08 ROM. I ended up with a folder named SystemUI_ZTE. I created a smali folder in that folder and moved the android, com and cn folders (that I got using the "java -jar oat2dex.jar smali SystemUI_ZTE.odex" command) to that smali folder. But when I try the apktool b command I get the following error:
Any idea what I am doing wrong?
TIA,
Cheers,
/Cacti
Click to expand...
Click to collapse
I updated the OP with a different tool for the odex file. Try it now.
Hi,
Thanks,but "java -jar baksmali-2.2.0.jar -a 25 -x SystemUI_ZTE.odex -d %CD%" gives me this error
Code:
Exception in thread "main" com.beust.jcommander.MissingCommandException: Expected a command, got -a
at com.beust.jcommander.JCommander.parseValues(JCommander.java:725)
at com.beust.jcommander.JCommander.parse(JCommander.java:304)
at com.beust.jcommander.JCommander.parse(JCommander.java:287)
at org.jf.baksmali.Main.main(Main.java:90)
Cheers,
/Cacti
le_cactus said:
Hi,
Thanks,but "java -jar baksmali-2.2.0.jar -a 25 -x SystemUI_ZTE.odex -d %CD%" gives me this error
Cheers,
/Cacti
Click to expand...
Click to collapse
Try it without any arguments: "java -jar baksmali-2.2.0.jar SystemUI_ZTE.odex"
Hi,
The command "java -jar baksmali.jar deodex -a 25 SystemUI_ZTE.odex"gives me
Code:
Error occurred while loading class path files. Aborting.
org.jf.dexlib2.analysis.ClassPathResolver$ResolveException: Error while loading oat file boot.oat
at org.jf.dexlib2.analysis.ClassPathResolver.loadEntry(ClassPathResolver.java:250)
at org.jf.dexlib2.analysis.ClassPathResolver.loadLocalClassPathEntry(ClassPathResolver.java:179)
at org.jf.dexlib2.analysis.ClassPathResolver.loadLocalOrDeviceBootClassPathEntry(ClassPathResolver.java:191)
at org.jf.dexlib2.analysis.ClassPathResolver.<init>(ClassPathResolver.java:120)
at org.jf.dexlib2.analysis.ClassPathResolver.<init>(ClassPathResolver.java:105)
at org.jf.baksmali.AnalysisArguments.loadClassPathForDexFile(AnalysisArguments.java:129)
at org.jf.baksmali.AnalysisArguments.loadClassPathForDexFile(AnalysisArguments.java:86)
at org.jf.baksmali.DisassembleCommand.getOptions(DisassembleCommand.java:203)
at org.jf.baksmali.DeodexCommand.getOptions(DeodexCommand.java:71)
at org.jf.baksmali.DisassembleCommand.run(DisassembleCommand.java:177)
at org.jf.baksmali.Main.main(Main.java:102)
Caused by: org.jf.dexlib2.analysis.ClassPathResolver$NotFoundException: Cannot find dependency boot-core-libart.oat in null
at org.jf.dexlib2.analysis.ClassPathResolver.loadOatDependencies(ClassPathResolver.java:270)
at org.jf.dexlib2.analysis.ClassPathResolver.loadEntry(ClassPathResolver.java:248)
... 10 more
Cheers,
/Cacti
le_cactus said:
Hi,
The command "java -jar baksmali.jar deodex -a 25 SystemUI_ZTE.odex"gives me
Cheers,
/Cacti
Click to expand...
Click to collapse
pull boot-core-libart.oat from /system/framework/arm64/boot-core-libart.oat and try again
Muchas gracias
Hi,
Had to pull all the .oat files from the /system/framework/arm64/ folder, only then I didn't get an error any more using the command "java -jar baksmali.jar deodex -a 25 SystemUI_ZTE.odex". The "command "java -jar baksmali.jar -a 25 -x SystemUI_ZTE.odex -d %CD%" still gave an error, you might wanna change that in the OP.
Now apktool b SystemUI_ZTE didn't give me any errors anymore. Executed the other steps, and bingo! Everthing seems to work. And byy replacing the charging.ogg, my device charges silently.
Thanks from my wife as she now doesn't wake up when I go to bed (and connect the charger). Many thanks for your patience and your excelent guide! I guess I'll bemodding some more APK's now
Cheers,
/Cacti
le_cactus said:
Hi,
Had to pull all the .oat files from the /system/framework/arm64/ folder, only then I didn't get an error any more using the command "java -jar baksmali.jar deodex -a 25 SystemUI_ZTE.odex". The "command "java -jar baksmali.jar -a 25 -x SystemUI_ZTE.odex -d %CD%" still gave an error, you might wanna change that in the OP.
Now apktool b SystemUI_ZTE didn't give me any errors anymore. Executed the other steps, and bingo! Everthing seems to work. And byy replacing the charging.ogg, my device charges silently.
Thanks from my wife as she now doesn't wake up when I go to bed (and connect the charger). Many thanks for your patience and your excelent guide! I guess I'll bemodding some more APK's now
Cheers,
/Cacti
Click to expand...
Click to collapse
Great! I'll add that to the OP! Thanks for helping me out!
Updated the OP with a new signing method that should fix boot hang issues with some apks (aka Settings_ZTE)
bkores said:
Updated the OP with a new signing method that should fix boot hang issues with some apks (aka Settings_ZTE)
Click to expand...
Click to collapse
IMO it was just the same as your previous method (under 5.)was saying : move META-INF ( and manifest but not necessary imo) from original apk into the new apk (in dist folder).
Now you're saying : put res, resources and classes from new apk into new apk...that's just the same, no ? Only more files to move imo.
Since res, resources and classes are indeed changing by compile, wouldn't it be better by just saying : put META-INF from original apk into new apk, like you first wrote in OP ? Easier no ?
ALSO : under 6. you say : Open a command window in the "dist" folder and push the ORIGINAL apk/jar to the correct directory on your device
Shouldn't that be : push ORIGINAL (since you copied files under 5 from NEW(in "dist") to ORIGINAL(in working folder) ) FROM WORKING FOLDER ? Since there is no original apk in DIST folder, only our new apk. Imo you make things a bit confusing here, no ? :cyclops:
raystef66 said:
IMO it was just the same as your previous method (under 5.)was saying : move META-INF ( and manifest but not necessary imo) from original apk into the new apk (in dist folder).
Now you're saying : put res, resources and classes from new apk into new apk...that's just the same, no ? Only more files to move imo.
Since res, resources and classes are indeed changing by compile, wouldn't it be better by just saying : put META-INF from original apk into new apk, like you first wrote in OP ? Easier no ?
ALSO : under 6. you say : Open a command window in the "dist" folder and push the ORIGINAL apk/jar to the correct directory on your device
Shouldn't that be : push ORIGINAL (since you copied files under 5 from NEW(in "dist") to ORIGINAL(in working folder) ) FROM WORKING FOLDER ? Since there is no original apk in DIST folder, only our new apk. Imo you make things a bit confusing here, no ? :cyclops:
Click to expand...
Click to collapse
Fixed!
bkores said:
Fixed!
Click to expand...
Click to collapse
Thnx Mate ! Appreciate all your work :good:
i have some problem with framework.jar, it doesn't have classes.dex in jar but it also doesn't have odex file in /system/framework/oat/arm64 (also arm). Because of it i can't decompile it using smali/baksmali tool. I want to make more volume steps mode like VolumeSteps+ but without Xposed. Hope someone can help.

Categories

Resources