adamlucia
adamlucia

Reputation: 31

Having trouble creating bootable SD Card (TWRP + OTA + custom apk) to flash android TV box

Web Developer here. Normally, I don't have a problem with new technologies but Android (specifically marshmallow) has been the exception. It seems the search results I'm getting are garbage...muddied with all kinds of Windows-Android tools that I don't want to use, and on top of that, old makeshift processes for extracting files. It seems there isn't "one way" to edit an android files/firmware...whatever and that seems crazy.

Background:

My Goal: Create an SD Card that it can be used to flash new devices. I want to be able to insert the SD Card into the box, hold the reset button, and it flashes itself.

Current situation: I was able to construct a sd card that fit my goal and flashed successfully from (stock probox2 air device) -> (v1). I used this csx tutorial to do it.

That worked, my app launched fine and I used TWRP to make a back-up, just because.

But I cant unpack that original .img file (v1) because I can't tear it apart to make changes to my apk successfully, I've tried many things....

So then I started working with the TWRP backup files (I was able to update those apk files and repack most of the way back up) but I can't get a new working .img (v2) that flashes when its supposed to like it did when flashing v1 (it just boots to TWRP).

I can export this back-up to a sd card and view the files on my computer by renaming system.ext4.win to system.ext4.tar as described here and double clicking to extract. Then using http://www.javadecompilers.com/apk to open the custom apk that I need to change and repack (v2).

From what I gather, the process should go like this. extract .img > extract the android partition (system.img or in this case system.ext4.win) > swap out apk then repackage in reverse order.

I just need some guidance. Where am I going wrong? I feel like android studio should be all I need to do this...

Upvotes: 2

Views: 1774

Answers (0)

Related Questions