This repository has been archived by the owner on Mar 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 44
Download videos from the doorbell #49
Comments
That's correct. There's no way Ive seen to pull the video via the api |
I decompiled the APK by converting the APK into a JAR using dex2jar and opening the JAR in JD-GUI. It uses some kind of P2P protocol. Maybe port 32100 UDP cloud protocol? Here's what I found:
void onDownloadClick() {
HistoryVideoFragment historyVideoFragment = l();
if (historyVideoFragment != null && !historyVideoFragment.d())
this.f.a(getResources().getString(R.string.download_this_file), historyVideoFragment.d(false)).show();
}
public static final int download_this_file = 2131821792;
public void h() {
if (this.h != null && !TextUtils.isEmpty(this.q)) {
File file = new File(d(false));
if (file.exists())
e.a(file);
this.mLlDownloadProgress.setVisibility(0);
this.mTvDownloadProgress.setText("0%");
this.z = false;
this.G = d(true);
EventData eventData = this.h;
if (eventData.isDownPriorityCloudOrLocal(eventData.device_sn)) {
if (this.o == null) {
this.o = new HubFileDownloader();
this.o.setHubFileDownloadListener(this.I);
}
this.o.setCancelDownload(false);
boolean bool = this.h.needConvertResolution();
int j = this.h.getConvertTargetResolutionWidth();
int k = this.h.getConvertTargetResolutionHeight();
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("needConvertResolution = ");
stringBuilder.append(bool);
com.oceanwing.battery.cam.log.a.a("needConvertResolution", stringBuilder.toString());
QueryDeviceData queryDeviceData = b.a().b(this.h.device_sn);
if (queryDeviceData != null && queryDeviceData.isDoorbell()) {
boolean bool1;
if (this.h.getBestStoragePathType() == 0) {
bool1 = false;
} else {
bool1 = true;
}
if (bool && j != 0 && k != 0) {
this.o.initDownloader(this.G, com.oceanwing.battery.cam.common.c.a.e().a(this.h.cipher_id, this.h.cipher_user_id), c.b(this.h.device_sn), c.f(), bool1, bool, j, k);
} else {
this.o.initDownloader(this.G, com.oceanwing.battery.cam.common.c.a.e().a(this.h.cipher_id, this.h.cipher_user_id), c.b(this.h.device_sn), c.f(), bool1);
}
} else if ((l.C(this.h.device_sn) || l.E(this.h.device_sn) || c.c(this.h.device_sn) || l.I(this.h.device_sn)) && bool && j != 0 && k != 0) {
this.o.initDownloader(this.G, com.oceanwing.battery.cam.common.c.a.e().a(this.h.cipher_id, this.h.cipher_user_id), 16000, 1, this.h.getBestStoragePathTypeNew(), bool, j, k);
} else {
this.o.initDownloader(this.G, com.oceanwing.battery.cam.common.c.a.e().a(this.h.cipher_id, this.h.cipher_user_id), 16000, 1, this.h.getBestStoragePathTypeNew());
}
P2PReceiver.getInstance().setHubFileDownloader(this.o);
ZmediaUtil.dowloadMP4(this.j.a(), this.n, this.h.getBestStoragePath());
} else {
r();
}
com.oceanwing.battery.cam.base.statistics.logging.a.a.a().a("80021", this.h.device_sn, this.h.station_sn);
}
}
public static void dowloadMP4(String paramString1, MediaAccountInfo paramMediaAccountInfo, String paramString2) {
ZMediaCom zMediaCom = new ZMediaCom(paramMediaAccountInfo.mInitStr, paramMediaAccountInfo.mDidStr, paramMediaAccountInfo.mHubSn);
zMediaCom.msgType = 6;
zMediaCom.mCommandType = 1024;
zMediaCom.mValueStr = paramString2;
zMediaCom.mValueStrSub = b.a().d(paramMediaAccountInfo.mHubSn);
zMediaCom.transaction = paramString1;
ZMediaManager.getInstance().putMsg(zMediaCom);
}
public int connectP2P(ZMediaCom paramZMediaCom) |
Check out #3 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am interested in downloading all the saved videos from the doorbell. Looking at the library, it seems that it only starts a stream.
The text was updated successfully, but these errors were encountered: